openc3-cosmos-tool-admin 7.1.1 → 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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/tools/admin/ArrayWidget-DMSm_P6c-efc7746a4ba953cd6808.js +2 -0
  3. data/tools/admin/{ArrayplotWidget-D5McM1rY-ddc534bbeddb80cec6bc.js → ArrayplotWidget-fdXLhGAl-bb78ab3e4fdecdfebd67.js} +1 -1
  4. data/tools/admin/{BarColumn-BtP1cQcf-82f974689484e0cd197b.js → BarColumn-Bb305iCi-1d14dd1f021f8d8d5f6a.js} +1 -1
  5. data/tools/admin/{BlockWidget-BKMse4hP-164a326ca46bea8d5f68.js → BlockWidget-Do3W6tZh-30b366b735726d3e884d.js} +2 -2
  6. data/tools/admin/{ButtonWidget-BLNVL46w-30bec2fb7ca85627479b.js → ButtonWidget-DukCQt0F-c8a88a1d238108f85fc0.js} +2 -2
  7. data/tools/admin/CanvasWidget-BRdVWln5-68610c4a029476073178.js +1 -0
  8. data/tools/admin/CanvasdotWidget-DV8PeDWz-da21bd87f779b9139269.js +1 -0
  9. data/tools/admin/{CanvasimageWidget-B_JxCI_f-3aba8a9c0ffbf85e4ba8.js → CanvasimageWidget-Czbq1GuF-5f841f468351c7d6bdbf.js} +1 -1
  10. data/tools/admin/{CanvasimagevalueWidget-DwHIZzWo-e0dfe009cee365df1777.js → CanvasimagevalueWidget-DKt5JgEt-c79bbec74e5403f7b6ec.js} +1 -1
  11. data/tools/admin/CanvaslabelWidget-DW2I1ra1-bf0c322f7c308654cfc2.js +1 -0
  12. data/tools/admin/CanvaslabelvalueWidget-BhzvZVfD-ba39d0f36fbf3db6cd9c.js +1 -0
  13. data/tools/admin/CanvaslineWidget-DsjY37tp-97707caf9ea6147f085e.js +1 -0
  14. data/tools/admin/{CanvaslinevalueWidget-DOrasE2j-c868199c9a3a2f7a6773.js → CanvaslinevalueWidget-ihI97G8T-a7ccb7b7ca2d2628fdd5.js} +1 -1
  15. data/tools/admin/{CheckbuttonWidget-A07FryqU-0634ed338432ebf5d77c.js → CheckbuttonWidget-B778Z-Zo-9dbaeff7a2a74130539a.js} +1 -1
  16. data/tools/admin/ComboboxWidget-CuuvOL9K-838f18b5b010cb3d71ae.js +1 -0
  17. data/tools/admin/{DateWidget-DrYZJta_-d8e297f2ffd787082b4f.js → DateWidget-COvQTAeo-fdab60f30b292f493736.js} +1 -1
  18. data/tools/admin/{DetailsDialog-CFCaJZWz-0c96f055ca678fb4b14b.js → DetailsDialog-DE7lK17G-434a9ce6dcc8e6636a47.js} +1 -1
  19. data/tools/admin/{DynamicWidget-BuSbQVhf-6fa02157bd57bdfe5a20.js → DynamicWidget-BuSbQVhf-f880988884028652fefc.js} +1 -1
  20. data/tools/admin/{FilechecksumWidget-CTf0XGST-6ed4722d9224c4df6268.js → FilechecksumWidget-DRnOt_UE-b118998ed499ab04e025.js} +1 -1
  21. data/tools/admin/{FiledisplayWidget-DLJuesmU-b1518c36285da46a9b11.js → FiledisplayWidget-26R46EjS-312ad25b3132af381df5.js} +1 -1
  22. data/tools/admin/{FormatvalueWidget-DODmUWPH-1382c1a42d71c017c1d2.js → FormatvalueWidget-BxyscMJc-9965b0bd2806cfbe79cb.js} +1 -1
  23. data/tools/admin/Graph-BKw7xw1a-947d95e03148698e323f.js +1 -0
  24. data/tools/admin/{GraphWidget-Rc-fnHCt-c6e6fd9f630161952121.js → GraphWidget-Cs9mvqUu-f9a29adafa014c1e26e4.js} +1 -1
  25. data/tools/admin/{HorizontalWidget-CZqN6UYp-4a0ef7500fe5f1b800ee.js → HorizontalWidget-fWLFj7Kg-46768f166783e7c59c1c.js} +1 -1
  26. data/tools/admin/{HorizontalboxWidget-BV7cyhwN-8d7f0d302b4441d96a28.js → HorizontalboxWidget-DEaXhKEz-b0ba376ca37ee17a7d70.js} +1 -1
  27. data/tools/admin/HorizontallineWidget-Bvu1QP3S-2ef01995448de3e2d6b7.js +1 -0
  28. data/tools/admin/{IframeWidget-BdOS5sm_-1d18e5795b367cb1d5d1.js → IframeWidget-B143k4lo-47d90846ad305990fd45.js} +1 -1
  29. data/tools/admin/{ImageLoader-CnlQ4xLd-eb76057b8cc6b4338f5c.js → ImageLoader-BCpmQHIl-90267960b7246cba4d23.js} +1 -1
  30. data/tools/admin/{ImageviewerWidget-DoJBe5eZ-eed183a8926d96ba8c90.js → ImageviewerWidget-CLrvr6dw-6adafd871908af16336a.js} +1 -1
  31. data/tools/admin/InterfacesTab-zhl06TGR-269bf95691e1ca1133d0.js +1 -0
  32. data/tools/admin/{LabelWidget-DYwcB_S4-38e094d08a4b3b72c53d.js → LabelWidget-CA1bTX2B-cf65a81edc2678cf21d0.js} +1 -1
  33. data/tools/admin/{LabelledWidget-D4N2gPxJ-ce836b128a960d3d8b14.js → LabelledWidget-BDhvr03J-d661081e5e66658337e8.js} +1 -1
  34. data/tools/admin/{LabelprogressbarWidget-CRnteLAo-b725b573eb33e7bb4393.js → LabelprogressbarWidget-g7A5CE8S-3e6d2543cbb4356e663b.js} +1 -1
  35. data/tools/admin/LabelsparklineWidget-B27xXxWg-46ed8faac17cc5e23e2c.js +1 -0
  36. data/tools/admin/LabelvalueWidget-DFn8o6LC-83776b27319b83d8f0db.js +1 -0
  37. data/tools/admin/{LabelvaluedescWidget-D5aDNr1o-d05b1c9bc4f065fc00f8.js → LabelvaluedescWidget-BQpaxFaB-577f3f571587fc3e28a8.js} +1 -1
  38. data/tools/admin/LabelvaluelimitsbarWidget-C-z96q8z-05aedeebb4882527347a.js +1 -0
  39. data/tools/admin/LabelvaluelimitscolumnWidget-D2TMEv9O-8f2ba12f3d8541a80f4f.js +1 -0
  40. data/tools/admin/LabelvaluerangebarWidget-D99dZCjz-f2a7ecfb05831ee9ece6.js +1 -0
  41. data/tools/admin/{Layout-BBLYT0gE-48666c2ab3e940bc8337.js → Layout--_zNJWnw-a75e57affb59e71889ad.js} +1 -1
  42. data/tools/admin/{LedWidget-CL2dOxb7-ab1b39b52db247c57a22.js → LedWidget-D2uxHxe3-b432e645d6f5ac424a50.js} +1 -1
  43. data/tools/admin/{LimitsBar-59_qNqi8-96460dbb2763eddb0f7a.js → LimitsBar-DN1s8-MS-5fcc0dd234e18f768e31.js} +1 -1
  44. data/tools/admin/{LimitsbarWidget-C0N2611W-be09215203ef71c51ca8.js → LimitsbarWidget-Cqhh7LKU-68bbd725e553a8fbb473.js} +1 -1
  45. data/tools/admin/{LimitscolorWidget-GfNCPo3i-055d04908d1764ec7f4c.js → LimitscolorWidget-haGB4RbY-2bbe52d1c80aded0cc12.js} +1 -1
  46. data/tools/admin/{LimitscolumnWidget-ut6NX68S-83764251827e9d6da919.js → LimitscolumnWidget-B1GdmlR_-ea359135deab006453c1.js} +1 -1
  47. data/tools/admin/LinegraphWidget-COSOQ0uM-d51c56629154333d44e4.js +1 -0
  48. data/tools/admin/{MatrixbycolumnsWidget-Cni63alW-5b6abb266b8468a11951.js → MatrixbycolumnsWidget-coHlLETG-860f23fb48426b9fd387.js} +1 -1
  49. data/tools/admin/{MicroservicesTab-gCXt9Jlh-ae566dd9addb4d797386.js → MicroservicesTab-eR0hpoO1-90e70bfd68ca8cece876.js} +2 -2
  50. data/tools/admin/{OpenC3TimePicker-WVlNQdKk-82dafbfd86f21e02b597.js → OpenC3TimePicker-B8Vu9GBz-c1433e91ea28dd0e883e.js} +1 -1
  51. data/tools/admin/{OutputDialog-wOewjnk2-c514efc45c452c84f902.js → OutputDialog-B0DR879Y-1fe936426c84cb442ac4.js} +1 -1
  52. data/tools/admin/PackagesTab-aA0fmiQh-fb563fc6f35c8b0be850.js +1 -0
  53. data/tools/admin/{PluginsTab-CLQ0EbDl-5047f5c4aeb9e86537a5.js → PluginsTab-C-ItW862-32d7ee9164d04691765d.js} +2 -2
  54. data/tools/admin/{ProgressbarWidget-BWqCsk87-e2c5a2d279a805d3efd2.js → ProgressbarWidget-D_yFssIZ-d10aa4e57145b3259669.js} +1 -1
  55. data/tools/admin/{RadiobuttonWidget-Dza2r34f-c6fbd6f9a688c787717a.js → RadiobuttonWidget-DL0jVTcb-3c465bd94a1d1501b9aa.js} +1 -1
  56. data/tools/admin/{RadiogroupWidget-DWmZMNmr-0e525d07fbef318dfdc3.js → RadiogroupWidget-2-td69IA-a20b41e0ee16fca8216f.js} +1 -1
  57. data/tools/admin/{RangebarWidget-DsGCC1x7-3f74f8f0831b6b40a42d.js → RangebarWidget-i2mlnxys-4eec6df5412c7c011047.js} +1 -1
  58. data/tools/admin/RedisTab-WR7ODfau-47151697811af67bb310.js +1 -0
  59. data/tools/admin/{RollupWidget-DGElKXm3-907a5e3ee1b40da8ff9b.js → RollupWidget-BEJ2Icg1-e244836ce5d601a70583.js} +1 -1
  60. data/tools/admin/{RoutersTab-Dpq_F5it-6e53c3f7b80a8a4394c0.js → RoutersTab-DUvEd6IA-b95f4c2224cc6903fd12.js} +1 -1
  61. data/tools/admin/{ScrollwindowWidget-BvKT59rV-8b79650ff16295ee4a65.js → ScrollwindowWidget-BU1cRpL8-db955ba3d4a28aa695c0.js} +1 -1
  62. data/tools/admin/{SecretsTab-DAZeb63H-99fe50bcd5dfb4c1b37b.js → SecretsTab-CkjjSxCg-e1665e5ecea3aed8dad6.js} +1 -1
  63. data/tools/admin/SettingsTab-CJp0hFpx-bae27f27a99072352713.js +6 -0
  64. data/tools/admin/{SignalWidget-DRAFunW0-e30484c76f7b3ba91fe1.js → SignalWidget-hiTkeem9-803814029a9fe6a17581.js} +1 -1
  65. data/tools/admin/{SimpleTextDialog-B7XASoZh-b3385c2f5d921dc0cd8e.js → SimpleTextDialog-tGqcHHCx-aac1d333cbb9a93606d6.js} +1 -1
  66. data/tools/admin/{SpacerWidget-CUGpXBpA-879386da94febbdd5df4.js → SpacerWidget-CBmzzS_X-207fd991cbf6a40fe4b0.js} +1 -1
  67. data/tools/admin/{SparklineWidget-SBWjRrqq-1ad442e32af7d1bb78fe.js → SparklineWidget-CizRh6QR-125aeb303d4965c33db7.js} +1 -1
  68. data/tools/admin/{TabbookWidget-7l6fPoRA-1c5b5399c2d730902eef.js → TabbookWidget-CvL3Ozmx-392ae93cab5b7cbb9764.js} +1 -1
  69. data/tools/admin/{TargetsTab-DcHwCcSU-89e9ff5556005b9dc355.js → TargetsTab-KTV_gfLE-3a9c157196f584e54664.js} +1 -1
  70. data/tools/admin/{TextboxWidget-Qb0TNt4Y-5238a3bf1aa8a0007cc7.js → TextboxWidget-BtEwXzDO-e4893abb472b9a687d25.js} +1 -1
  71. data/tools/admin/TextfieldWidget-BDbb57HP-51b0d1e6a5aa914e5ac8.js +1 -0
  72. data/tools/admin/TimeWidget-DzD8U8l8-2591897a5196cb54b68d.js +1 -0
  73. data/tools/admin/TitleWidget-CL53vf14-6e11a61576950ccd39fd.js +1 -0
  74. data/tools/admin/{ToolsTab-MCjy5Bf6-0637f1a3a75fdf06961e.js → ToolsTab-yFxYcJ-o-7c21c60dd470d658fe4d.js} +1 -1
  75. data/tools/admin/TsdbTab-B0BR-V6A-ab626c8be8b9836c1c78.js +4 -0
  76. data/tools/admin/{VWidget-BgNciXK1-6f5fa1e1cbd09779ddb3.js → VWidget-5qOYva88-4db083a6475508bbf7ce.js} +1 -1
  77. data/tools/admin/{ValueWidget-B1OvCmXK-eb266467c9a31a007e30.js → ValueWidget-CAkuc_w_-6037c5f1b4e7c0e9c790.js} +1 -1
  78. data/tools/admin/ValuelimitsbarWidget-Y8sO05E1-c51344904eca186c081f.js +1 -0
  79. data/tools/admin/ValuelimitscolumnWidget-iOjB_fCj-c8c67d58522b7f505b4f.js +1 -0
  80. data/tools/admin/{ValuerangebarWidget-DjL4ze3d-81cc1402830d1310230c.js → ValuerangebarWidget-DsCoeAm6-a486168810aca7f0e206.js} +1 -1
  81. data/tools/admin/VerticalWidget-C6O0dhRU-7511fd89efa71860286e.js +1 -0
  82. data/tools/admin/{VerticalboxWidget-OigMLjH8-417cdb72cb30aa8bfbff.js → VerticalboxWidget-B-CoqRJG-29951e73bb5144b9ca2c.js} +1 -1
  83. data/tools/admin/{Widget-BiaunQ83-f5d5cb8cc1b25880c13e.js → Widget-CtYQauzA-ae8839a2e4146c799aec.js} +1 -1
  84. data/tools/admin/main-040488697a5f3eed5115.js +1502 -0
  85. data/tools/admin/main.js +1 -1
  86. data/tools/admin/{settings-08OS6cx2-962b0af96c2434c7b414.js → settings-BrhbKDEv-791c3f57ac7979ee13b6.js} +1 -1
  87. metadata +85 -85
  88. data/tools/admin/ArrayWidget-CmKZQfWB-c2dd94f2c6f8abe8b7ee.js +0 -2
  89. data/tools/admin/CanvasWidget-1jy1JskS-d04e89c5942d4e27d8a9.js +0 -1
  90. data/tools/admin/CanvasdotWidget-DxuFGoWt-05d4284fd1e1ba0469bf.js +0 -1
  91. data/tools/admin/CanvaslabelWidget-Tt4dmAOI-079e7a005cce5d64dda3.js +0 -1
  92. data/tools/admin/CanvaslabelvalueWidget-D1-kZsi--2b8271b0530cf7fa746a.js +0 -1
  93. data/tools/admin/CanvaslineWidget-Din8LMyF-15b79b120e48dc68eb02.js +0 -1
  94. data/tools/admin/ComboboxWidget-xayce-aY-8dd8816f5d7dad721df4.js +0 -1
  95. data/tools/admin/Graph-Cwghj5Pc-0525f379d6f1496a3999.js +0 -1
  96. data/tools/admin/HorizontallineWidget-ChDLR_8D-708d272ff70ce91dbd57.js +0 -1
  97. data/tools/admin/InterfacesTab-CITUnMac-0085a7a386d1f92a98db.js +0 -1
  98. data/tools/admin/LabelsparklineWidget-Bbjjio1S-def15333338347ba53b1.js +0 -1
  99. data/tools/admin/LabelvalueWidget-Bc6HtTMO-b8a4464c57b19a98d4b3.js +0 -1
  100. data/tools/admin/LabelvaluelimitsbarWidget-CMnJoNKz-ca94e01d6d1794ed3ebe.js +0 -1
  101. data/tools/admin/LabelvaluelimitscolumnWidget-R5ofG4q1-56a2a76adac3f95c82e2.js +0 -1
  102. data/tools/admin/LabelvaluerangebarWidget-Qa3R2_4p-241f8c6ffc9a55e60551.js +0 -1
  103. data/tools/admin/LinegraphWidget-DaCyvdnI-d6f10e223bb947f1a3b1.js +0 -1
  104. data/tools/admin/PackagesTab-DmsuQSmU-294a5184dcaa0a941c15.js +0 -1
  105. data/tools/admin/RedisTab-9hUKvLT7-309940c3d130392a1f70.js +0 -1
  106. data/tools/admin/SettingsTab-CHcHYnay-28b2eddedc8430da6c99.js +0 -5
  107. data/tools/admin/TextfieldWidget-DcSGRfnF-4230617ca7538e7f4447.js +0 -1
  108. data/tools/admin/TimeWidget-aoMkDgRR-545325e26528dd70b1dc.js +0 -1
  109. data/tools/admin/TitleWidget-C8b9Vp5r-c553e464f08b0cdc3dea.js +0 -1
  110. data/tools/admin/TsdbTab-4OaejSum-06231378c66fdfdefcc3.js +0 -4
  111. data/tools/admin/ValuelimitsbarWidget-CUd9P_Xg-64f29a5b94c0d8b25711.js +0 -1
  112. data/tools/admin/ValuelimitscolumnWidget-CbThSMma-594c17c8ddaa58712e1b.js +0 -1
  113. data/tools/admin/VerticalWidget-V5-vGq7l-e930aaa06160609a20b9.js +0 -1
  114. data/tools/admin/main-05290d67af0d2bba595e.js +0 -1501
@@ -1,1501 +0,0 @@
1
- System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Tn,et){"use strict";var Ue,rt,Pt,ze,We,nn,qn,Yp,Xp,Jp,gn,si,ho,Zp,It,ja,Tu,ls,Ur,Zs,zl,Qs,Qp,eg,tg,ng,Mu,rg,ig,og,sg,ag,Lu,lg,cg,ug,hg,dg,fg,Iu,pg;return{setters:[_t=>{Ue=_t.resolveComponent,rt=_t.openBlock,Pt=_t.createBlock,ze=_t.withCtx,We=_t.createVNode,nn=_t.createElementBlock,qn=_t.createElementVNode,Yp=_t.useCssVars,Xp=_t.defineAsyncComponent,Jp=_t.Teleport,gn=_t.toDisplayString,si=_t.Fragment,ho=_t.renderList,Zp=_t.ref,It=_t.createTextVNode,ja=_t.mergeProps,Tu=_t.createSlots,ls=_t.normalizeStyle,Ur=_t.createCommentVNode,Zs=_t.h,zl=_t.withKeys,Qs=_t.withModifiers,Qp=_t.toRaw,eg=_t.defineComponent,tg=_t.warn,ng=_t.inject,Mu=_t.computed,rg=_t.shallowRef,ig=_t.watchEffect,og=_t.normalizeClass,sg=_t.getCurrentInstance,ag=_t.provide,Lu=_t.createApp,lg=_t.withDirectives,cg=_t.vShow},_t=>{ug=_t.createRouter,hg=_t.createWebHistory},_t=>{dg=_t.defineStore,fg=_t.createPinia},_t=>{Iu=_t.getMountedApps},_t=>{pg=_t.createVuetify}],execute:(function(){Tn({B:Gr,D:Lm,G:fo,H:oh,I:Im,N:ah,P:Am,V:ia,W:_m,e:Ir,i:Qa,j:Mm,n:V0,v:oa,x:km});var _t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gg(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable}))),e.push.apply(e,r)}return e}function cs(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?gg(Object(e),!0).forEach((function(r){Vx(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):gg(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function Vx(n,t,e){return(t=(function(r){var d=(function(h,p){if(us(h)!=="object"||h===null)return h;var v=h[Symbol.toPrimitive];if(v!==void 0){var s=v.call(h,p);if(us(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(h)})(r,"string");return us(d)==="symbol"?d:String(d)})(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function us(n){return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,d=String(e),h=d.length,p=-1,v="",s=d.charCodeAt(0);++p<h;)(r=d.charCodeAt(p))!=0?v+=r>=1&&r<=31||r==127||p==0&&r>=48&&r<=57||p==1&&r>=48&&r<=57&&s==45?"\\"+r.toString(16)+" ":p==0&&h==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+d.charAt(p):d.charAt(p):v+="�";return v};n.CSS||(n.CSS={}),n.CSS.escape=t})(_t);var Gx={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function qx(n){if(us(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=cs(cs({},Gx),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(us(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:Kx.bind(null,t,e),mount:Yx.bind(null,t,e),unmount:Jx.bind(null,t,e),update:Xx.bind(null,t,e)}}function Kx(n){return n.loadRootComponent?n.loadRootComponent().then((function(t){return n.rootComponent=t})):Promise.resolve()}function Yx(n,t,e){var r={};return Promise.resolve().then((function(){return(function(d,h){return typeof d.appOptions=="function"?d.appOptions(h):Promise.resolve(cs({},d.appOptions))})(n,e).then((function(d){var h;if(e.domElement&&!d.el&&(d.el=e.domElement),d.el)if(typeof d.el=="string"){if(!(h=document.querySelector(d.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(d.el))}else(h=d.el).id||(h.id="single-spa-application:".concat(e.name)),d.el="#".concat(CSS.escape(h.id));else{var p="single-spa-application:".concat(e.name);d.el="#".concat(CSS.escape(p)),(h=document.getElementById(p))||((h=document.createElement("div")).id=p,document.body.appendChild(h))}if(!n.replaceMode&&(d.el=d.el+" .single-spa-container",!h.querySelector(".single-spa-container"))){var v=document.createElement("div");v.className="single-spa-container",h.appendChild(v)}r.domEl=h,d.render||d.template||!n.rootComponent||(d.render=function(f){return f(n.rootComponent)}),d.data||(d.data={});var s=d.data;if(d.data=function(){return cs(cs({},typeof s=="function"?s.call(this,this):s),e)},n.createApp){if(r.vueInstance=n.createApp(d),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(d.el),t[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(d.el)}else if(r.vueInstance=new n.Vue(d),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return t[e.name]=r,r.vueInstance}));return t[e.name]=r,r.vueInstance}))}))}function Xx(n,t,e){return Promise.resolve().then((function(){var r=t[e.name],d=cs(cs({},n.appOptions.data||{}),e),h=r.root||r.vueInstance;for(var p in d)h[p]=d[p]}))}function Jx(n,t,e){return Promise.resolve().then((function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const Zx=(n,t)=>{const e=n.__vccOpts||n;for(const[r,d]of t)e[r]=d;return e},Qx={};function eC(n,t){const e=Ue("router-view"),r=Ue("v-app");return rt(),Pt(r,{id:"innerapp"},{default:ze(()=>[We(e)]),_:1})}const tC=Zx(Qx,[["render",eC]]),mg=function(n){!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),n.children?.forEach(mg)},Ez="modulepreload",Rz=function(n){return"/"+n},Tz={},tt=function(t,e,r){let d=Promise.resolve();function h(p){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=p,window.dispatchEvent(v),!v.defaultPrevented)throw p}return d.then(p=>{for(const v of p||[])v.status==="rejected"&&h(v.reason);return t().catch(h)})},qi=Tn("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,d]of t)e[r]=d;return e}),nC="/icons/customIcons.svg",Ou={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return nC+"#"+this.icon}}},vg=()=>{Yp(n=>({v4ccb3d08:n.color}))},yg=Ou.setup;Ou.setup=yg?(n,t)=>(vg(),yg(n,t)):vg;const rC={class:"cosmos-custom-icon"},iC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},oC=["href"];function sC(n,t,e,r,d,h){return rt(),nn("span",rC,[(rt(),nn("svg",iC,[qn("use",{href:h.iconSrc},null,8,oC)]))])}const aC=qi(Ou,[["render",sC],["__scopeId","data-v-54b83b01"]]);function bg(n,t){return function(){return n.apply(t,arguments)}}const{toString:lC}=Object.prototype,{getPrototypeOf:Bl}=Object,{iterator:Wl,toStringTag:wg}=Symbol,jl=(n=>t=>{const e=lC.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ki=n=>(n=n.toLowerCase(),t=>jl(t)===n),Hl=n=>t=>typeof t===n,{isArray:ea}=Array,ta=Hl("undefined");function Ha(n){return n!==null&&!ta(n)&&n.constructor!==null&&!ta(n.constructor)&&ai(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const xg=Ki("ArrayBuffer");function cC(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&xg(n.buffer),t}const uC=Hl("string"),ai=Hl("function"),Cg=Hl("number"),Ua=n=>n!==null&&typeof n=="object",hC=n=>n===!0||n===!1,Ul=n=>{if(jl(n)!=="object")return!1;const t=Bl(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wg in n)&&!(Wl in n)},dC=n=>{if(!Ua(n)||Ha(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},fC=Ki("Date"),pC=Ki("File"),gC=n=>!!(n&&typeof n.uri<"u"),mC=n=>n&&typeof n.getParts<"u",vC=Ki("Blob"),yC=Ki("FileList"),bC=n=>Ua(n)&&ai(n.pipe);function wC(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const _g=wC(),kg=typeof _g.FormData<"u"?_g.FormData:void 0,xC=n=>{if(!n)return!1;if(kg&&n instanceof kg)return!0;const t=Bl(n);if(!t||t===Object.prototype||!ai(n.append))return!1;const e=jl(n);return e==="formdata"||e==="object"&&ai(n.toString)&&n.toString()==="[object FormData]"},CC=Ki("URLSearchParams"),[_C,kC,AC,SC]=["ReadableStream","Request","Response","Headers"].map(Ki),$C=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Va(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),ea(n))for(r=0,d=n.length;r<d;r++)t.call(null,n[r],r,n);else{if(Ha(n))return;const h=e?Object.getOwnPropertyNames(n):Object.keys(n),p=h.length;let v;for(r=0;r<p;r++)v=h[r],t.call(null,n[v],v,n)}}function Ag(n,t){if(Ha(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,d;for(;r-- >0;)if(d=e[r],t===d.toLowerCase())return d;return null}const hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sg=n=>!ta(n)&&n!==hs;function Nu(...n){const{caseless:t,skipUndefined:e}=Sg(this)&&this||{},r={},d=(h,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const v=t&&Ag(r,p)||p,s=Du(r,v)?r[v]:void 0;Ul(s)&&Ul(h)?r[v]=Nu(s,h):Ul(h)?r[v]=Nu({},h):ea(h)?r[v]=h.slice():(!e||!ta(h))&&(r[v]=h)};for(let h=0,p=n.length;h<p;h++)n[h]&&Va(n[h],d);return r}const EC=(n,t,e,{allOwnKeys:r}={})=>(Va(t,(d,h)=>{e&&ai(d)?Object.defineProperty(n,h,{__proto__:null,value:bg(d,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,h,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),RC=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),TC=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(n.prototype,e)},MC=(n,t,e,r)=>{let d,h,p;const v={};if(t=t||{},n==null)return t;do{for(d=Object.getOwnPropertyNames(n),h=d.length;h-- >0;)p=d[h],(!r||r(p,n,t))&&!v[p]&&(t[p]=n[p],v[p]=!0);n=e!==!1&&Bl(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},LC=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},IC=n=>{if(!n)return null;if(ea(n))return n;let t=n.length;if(!Cg(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},OC=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Bl(Uint8Array)),NC=(n,t)=>{const e=(n&&n[Wl]).call(n);let r;for(;(r=e.next())&&!r.done;){const d=r.value;t.call(n,d[0],d[1])}},DC=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},PC=Ki("HTMLFormElement"),FC=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Du=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),zC=Ki("RegExp"),$g=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Va(e,(d,h)=>{let p;(p=t(d,h,n))!==!1&&(r[h]=p||d)}),Object.defineProperties(n,r)},BC=n=>{$g(n,(t,e)=>{if(ai(n)&&["arguments","caller","callee"].includes(e))return!1;const r=n[e];if(ai(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},WC=(n,t)=>{const e={},r=d=>{d.forEach(h=>{e[h]=!0})};return ea(n)?r(n):r(String(n).split(t)),e},jC=()=>{},HC=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function UC(n){return!!(n&&ai(n.append)&&n[wg]==="FormData"&&n[Wl])}const VC=n=>{const t=new Array(10),e=(r,d)=>{if(Ua(r)){if(t.indexOf(r)>=0)return;if(Ha(r))return r;if(!("toJSON"in r)){t[d]=r;const h=ea(r)?[]:{};return Va(r,(p,v)=>{const s=e(p,d+1);!ta(s)&&(h[v]=s)}),t[d]=void 0,h}}return r};return e(n,0)},GC=Ki("AsyncFunction"),qC=n=>n&&(Ua(n)||ai(n))&&ai(n.then)&&ai(n.catch),Eg=((n,t)=>n?setImmediate:t?((e,r)=>(hs.addEventListener("message",({source:d,data:h})=>{d===hs&&h===e&&r.length&&r.shift()()},!1),d=>{r.push(d),hs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ai(hs.postMessage)),KC=typeof queueMicrotask<"u"?queueMicrotask.bind(hs):typeof process<"u"&&process.nextTick||Eg,YC=n=>n!=null&&ai(n[Wl]),Ce={isArray:ea,isArrayBuffer:xg,isBuffer:Ha,isFormData:xC,isArrayBufferView:cC,isString:uC,isNumber:Cg,isBoolean:hC,isObject:Ua,isPlainObject:Ul,isEmptyObject:dC,isReadableStream:_C,isRequest:kC,isResponse:AC,isHeaders:SC,isUndefined:ta,isDate:fC,isFile:pC,isReactNativeBlob:gC,isReactNative:mC,isBlob:vC,isRegExp:zC,isFunction:ai,isStream:bC,isURLSearchParams:CC,isTypedArray:OC,isFileList:yC,forEach:Va,merge:Nu,extend:EC,trim:$C,stripBOM:RC,inherits:TC,toFlatObject:MC,kindOf:jl,kindOfTest:Ki,endsWith:LC,toArray:IC,forEachEntry:NC,matchAll:DC,isHTMLForm:PC,hasOwnProperty:Du,hasOwnProp:Du,reduceDescriptors:$g,freezeMethods:BC,toObjectSet:WC,toCamelCase:FC,noop:jC,toFiniteNumber:HC,findKey:Ag,global:hs,isContextDefined:Sg,isSpecCompliantForm:UC,toJSONObject:VC,isAsyncFn:GC,isThenable:qC,setImmediate:Eg,asap:KC,isIterable:YC},XC=Ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),JC=n=>{const t={};let e,r,d;return n&&n.split(`
2
- `).forEach(function(h){d=h.indexOf(":"),e=h.substring(0,d).trim().toLowerCase(),r=h.substring(d+1).trim(),!(!e||t[e]&&XC[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Rg=Symbol("internals"),ZC=/[^\x09\x20-\x7E\x80-\xFF]/g;function QC(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}function Ga(n){return n&&String(n).trim().toLowerCase()}function e_(n){return QC(n.replace(ZC,""))}function Vl(n){return n===!1||n==null?n:Ce.isArray(n)?n.map(Vl):e_(String(n))}function t_(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const n_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Pu(n,t,e,r,d){if(Ce.isFunction(r))return r.call(this,t,e);if(d&&(t=e),!!Ce.isString(t)){if(Ce.isString(r))return t.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(t)}}function r_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function i_(n,t){const e=Ce.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{__proto__:null,value:function(d,h,p){return this[r].call(this,t,d,h,p)},configurable:!0})})}let Vr=class{constructor(t){t&&this.set(t)}set(t,e,r){const d=this;function h(v,s,f){const i=Ga(s);if(!i)throw new Error("header name must be a non-empty string");const a=Ce.findKey(d,i);(!a||d[a]===void 0||f===!0||f===void 0&&d[a]!==!1)&&(d[a||s]=Vl(v))}const p=(v,s)=>Ce.forEach(v,(f,i)=>h(f,i,s));if(Ce.isPlainObject(t)||t instanceof this.constructor)p(t,e);else if(Ce.isString(t)&&(t=t.trim())&&!n_(t))p(JC(t),e);else if(Ce.isObject(t)&&Ce.isIterable(t)){let v={},s,f;for(const i of t){if(!Ce.isArray(i))throw TypeError("Object iterator must return a key-value pair");v[f=i[0]]=(s=v[f])?Ce.isArray(s)?[...s,i[1]]:[s,i[1]]:i[1]}p(v,e)}else t!=null&&h(e,t,r);return this}get(t,e){if(t=Ga(t),t){const r=Ce.findKey(this,t);if(r){const d=this[r];if(!e)return d;if(e===!0)return t_(d);if(Ce.isFunction(e))return e.call(this,d,r);if(Ce.isRegExp(e))return e.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ga(t),t){const r=Ce.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Pu(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let d=!1;function h(p){if(p=Ga(p),p){const v=Ce.findKey(r,p);v&&(!e||Pu(r,r[v],v,e))&&(delete r[v],d=!0)}}return Ce.isArray(t)?t.forEach(h):h(t),d}clear(t){const e=Object.keys(this);let r=e.length,d=!1;for(;r--;){const h=e[r];(!t||Pu(this,this[h],h,t,!0))&&(delete this[h],d=!0)}return d}normalize(t){const e=this,r={};return Ce.forEach(this,(d,h)=>{const p=Ce.findKey(r,h);if(p){e[p]=Vl(d),delete e[h];return}const v=t?r_(h):String(h).trim();v!==h&&delete e[h],e[v]=Vl(d),r[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ce.forEach(this,(r,d)=>{r!=null&&r!==!1&&(e[d]=t&&Ce.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(d=>r.set(d)),r}static accessor(t){const e=(this[Rg]=this[Rg]={accessors:{}}).accessors,r=this.prototype;function d(h){const p=Ga(h);e[p]||(i_(r,h),e[p]=!0)}return Ce.isArray(t)?t.forEach(d):d(t),this}};Vr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Vr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ce.freezeMethods(Vr);const o_="[REDACTED ****]";function s_(n){if(Ce.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(Ce.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function a_(n,t){const e=new Set(t.map(h=>String(h).toLowerCase())),r=[],d=h=>{if(h===null||typeof h!="object"||Ce.isBuffer(h))return h;if(r.indexOf(h)!==-1)return;h instanceof Vr&&(h=h.toJSON()),r.push(h);let p;if(Ce.isArray(h))p=[],h.forEach((v,s)=>{const f=d(v);Ce.isUndefined(f)||(p[s]=f)});else{if(!Ce.isPlainObject(h)&&s_(h))return r.pop(),h;p=Object.create(null);for(const[v,s]of Object.entries(h)){const f=e.has(v.toLowerCase())?o_:d(s);Ce.isUndefined(f)||(p[v]=f)}}return r.pop(),p};return d(n)}let lt=class Wx extends Error{static from(t,e,r,d,h,p){const v=new Wx(t.message,e||t.code,r,d,h);return v.cause=t,v.name=t.name,t.status!=null&&v.status==null&&(v.status=t.status),p&&Object.assign(v,p),v}constructor(t,e,r,d,h){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),d&&(this.request=d),h&&(this.response=h,this.status=h.status)}toJSON(){const t=this.config,e=t&&Ce.hasOwnProp(t,"redact")?t.redact:void 0,r=Ce.isArray(e)&&e.length>0?a_(t,e):Ce.toJSONObject(t);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:r,code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",lt.ERR_BAD_OPTION="ERR_BAD_OPTION",lt.ECONNABORTED="ECONNABORTED",lt.ETIMEDOUT="ETIMEDOUT",lt.ECONNREFUSED="ECONNREFUSED",lt.ERR_NETWORK="ERR_NETWORK",lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",lt.ERR_DEPRECATED="ERR_DEPRECATED",lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",lt.ERR_CANCELED="ERR_CANCELED",lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",lt.ERR_INVALID_URL="ERR_INVALID_URL",lt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const l_=null;function Fu(n){return Ce.isPlainObject(n)||Ce.isArray(n)}function Tg(n){return Ce.endsWith(n,"[]")?n.slice(0,-2):n}function zu(n,t,e){return n?n.concat(t).map(function(r,d){return r=Tg(r),!e&&d?"["+r+"]":r}).join(e?".":""):t}function c_(n){return Ce.isArray(n)&&!n.some(Fu)}const u_=Ce.toFlatObject(Ce,{},null,function(n){return/^is[A-Z]/.test(n)});function Gl(n,t,e){if(!Ce.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Ce.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,m){return!Ce.isUndefined(m[c])});const r=e.metaTokens,d=e.visitor||a,h=e.dots,p=e.indexes,v=e.Blob||typeof Blob<"u"&&Blob,s=e.maxDepth===void 0?100:e.maxDepth,f=v&&Ce.isSpecCompliantForm(t);if(!Ce.isFunction(d))throw new TypeError("visitor must be a function");function i(c){if(c===null)return"";if(Ce.isDate(c))return c.toISOString();if(Ce.isBoolean(c))return c.toString();if(!f&&Ce.isBlob(c))throw new lt("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(c)||Ce.isTypedArray(c)?f&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function a(c,m,w){let x=c;if(Ce.isReactNative(t)&&Ce.isReactNativeBlob(c))return t.append(zu(w,m,h),i(c)),!1;if(c&&!w&&typeof c=="object"){if(Ce.endsWith(m,"{}"))m=r?m:m.slice(0,-2),c=JSON.stringify(c);else if(Ce.isArray(c)&&c_(c)||(Ce.isFileList(c)||Ce.endsWith(m,"[]"))&&(x=Ce.toArray(c)))return m=Tg(m),x.forEach(function(R,$){!(Ce.isUndefined(R)||R===null)&&t.append(p===!0?zu([m],$,h):p===null?m:m+"[]",i(R))}),!1}return Fu(c)?!0:(t.append(zu(w,m,h),i(c)),!1)}const u=[],g=Object.assign(u_,{defaultVisitor:a,convertValue:i,isVisitable:Fu});function o(c,m,w=0){if(!Ce.isUndefined(c)){if(w>s)throw new lt("Object is too deeply nested ("+w+" levels). Max depth: "+s,lt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(u.indexOf(c)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(c),Ce.forEach(c,function(x,R){(!(Ce.isUndefined(x)||x===null)&&d.call(t,x,Ce.isString(R)?R.trim():R,m,g))===!0&&o(x,m?m.concat(R):[R],w+1)}),u.pop()}}if(!Ce.isObject(n))throw new TypeError("data must be an object");return o(n),t}function Mg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Bu(n,t){this._pairs=[],n&&Gl(n,this,t)}const Lg=Bu.prototype;Lg.append=function(n,t){this._pairs.push([n,t])},Lg.toString=function(n){const t=n?function(e){return n.call(this,e,Mg)}:Mg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function h_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ig(n,t,e){if(!t)return n;const r=e&&e.encode||h_,d=Ce.isFunction(e)?{serialize:e}:e,h=d&&d.serialize;let p;if(h?p=h(t,d):p=Ce.isURLSearchParams(t)?t.toString():new Bu(t,d).toString(r),p){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}let Og=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ce.forEach(this.handlers,function(e){e!==null&&t(e)})}};const Wu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},d_=typeof URLSearchParams<"u"?URLSearchParams:Bu,f_=typeof FormData<"u"?FormData:null,p_=typeof Blob<"u"?Blob:null,g_={isBrowser:!0,classes:{URLSearchParams:d_,FormData:f_,Blob:p_},protocols:["http","https","file","blob","url","data"]},ju=typeof window<"u"&&typeof document<"u",Hu=typeof navigator=="object"&&navigator||void 0,m_=ju&&(!Hu||["ReactNative","NativeScript","NS"].indexOf(Hu.product)<0),v_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",y_=ju&&window.location.href||"http://localhost",b_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ju,hasStandardBrowserEnv:m_,hasStandardBrowserWebWorkerEnv:v_,navigator:Hu,origin:y_},Symbol.toStringTag,{value:"Module"})),Lr={...b_,...g_};function w_(n,t){return Gl(n,new Lr.classes.URLSearchParams,{visitor:function(e,r,d,h){return Lr.isNode&&Ce.isBuffer(e)?(this.append(r,e.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...t})}function x_(n){return Ce.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function C_(n){const t={},e=Object.keys(n);let r;const d=e.length;let h;for(r=0;r<d;r++)h=e[r],t[h]=n[h];return t}function Ng(n){function t(e,r,d,h){let p=e[h++];if(p==="__proto__")return!0;const v=Number.isFinite(+p),s=h>=e.length;return p=!p&&Ce.isArray(d)?d.length:p,s?(Ce.hasOwnProp(d,p)?d[p]=Ce.isArray(d[p])?d[p].concat(r):[d[p],r]:d[p]=r,!v):((!d[p]||!Ce.isObject(d[p]))&&(d[p]=[]),t(e,r,d[p],h)&&Ce.isArray(d[p])&&(d[p]=C_(d[p])),!v)}if(Ce.isFormData(n)&&Ce.isFunction(n.entries)){const e={};return Ce.forEachEntry(n,(r,d)=>{t(x_(r),d,e,0)}),e}return null}const na=(n,t)=>n!=null&&Ce.hasOwnProp(n,t)?n[t]:void 0;function __(n,t,e){if(Ce.isString(n))try{return(t||JSON.parse)(n),Ce.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const qa={transitional:Wu,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,d=Ce.isObject(n);if(d&&Ce.isHTMLForm(n)&&(n=new FormData(n)),Ce.isFormData(n))return r?JSON.stringify(Ng(n)):n;if(Ce.isArrayBuffer(n)||Ce.isBuffer(n)||Ce.isStream(n)||Ce.isFile(n)||Ce.isBlob(n)||Ce.isReadableStream(n))return n;if(Ce.isArrayBufferView(n))return n.buffer;if(Ce.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let h;if(d){const p=na(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return w_(n,p).toString();if((h=Ce.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=na(this,"env"),s=v&&v.FormData;return Gl(h?{"files[]":n}:n,s&&new s,p)}}return d||r?(t.setContentType("application/json",!1),__(n)):n}],transformResponse:[function(n){const t=na(this,"transitional")||qa.transitional,e=t&&t.forcedJSONParsing,r=na(this,"responseType"),d=r==="json";if(Ce.isResponse(n)||Ce.isReadableStream(n))return n;if(n&&Ce.isString(n)&&(e&&!r||d)){const h=!(t&&t.silentJSONParsing)&&d;try{return JSON.parse(n,na(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?lt.from(p,lt.ERR_BAD_RESPONSE,this,null,na(this,"response")):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lr.classes.FormData,Blob:Lr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch","query"],n=>{qa.headers[n]={}});function Uu(n,t){const e=this||qa,r=t||e,d=Vr.from(r.headers);let h=r.data;return Ce.forEach(n,function(p){h=p.call(e,h,d.normalize(),t?t.status:void 0)}),d.normalize(),h}function Dg(n){return!!(n&&n.__CANCEL__)}let Ka=class extends lt{constructor(t,e,r){super(t??"canceled",lt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Pg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new lt("Request failed with status code "+e.status,e.status>=400&&e.status<500?lt.ERR_BAD_REQUEST:lt.ERR_BAD_RESPONSE,e.config,e.request,e))}function k_(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function A_(n,t){n=n||10;const e=new Array(n),r=new Array(n);let d=0,h=0,p;return t=t!==void 0?t:1e3,function(v){const s=Date.now(),f=r[h];p||(p=s),e[d]=v,r[d]=s;let i=h,a=0;for(;i!==d;)a+=e[i++],i=i%n;if(d=(d+1)%n,d===h&&(h=(h+1)%n),s-p<t)return;const u=f&&s-f;return u?Math.round(a*1e3/u):void 0}}function S_(n,t){let e=0,r=1e3/t,d,h;const p=(v,s=Date.now())=>{e=s,d=null,h&&(clearTimeout(h),h=null),n(...v)};return[(...v)=>{const s=Date.now(),f=s-e;f>=r?p(v,s):(d=v,h||(h=setTimeout(()=>{h=null,p(d)},r-f)))},()=>d&&p(d)]}const ql=(n,t,e=3)=>{let r=0;const d=A_(50,250);return S_(h=>{const p=h.loaded,v=h.lengthComputable?h.total:void 0,s=v!=null?Math.min(p,v):p,f=Math.max(0,s-r),i=d(f);r=Math.max(r,s);const a={loaded:s,total:v,progress:v?s/v:void 0,bytes:f,rate:i||void 0,estimated:i&&v?(v-s)/i:void 0,event:h,lengthComputable:v!=null,[t?"download":"upload"]:!0};n(a)},e)},Fg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},zg=n=>(...t)=>Ce.asap(()=>n(...t)),$_=Lr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Lr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Lr.origin),Lr.navigator&&/(msie|trident)/i.test(Lr.navigator.userAgent)):()=>!0,E_=Lr.hasStandardBrowserEnv?{write(n,t,e,r,d,h,p){if(typeof document>"u")return;const v=[`${n}=${encodeURIComponent(t)}`];Ce.isNumber(e)&&v.push(`expires=${new Date(e).toUTCString()}`),Ce.isString(r)&&v.push(`path=${r}`),Ce.isString(d)&&v.push(`domain=${d}`),h===!0&&v.push("secure"),Ce.isString(p)&&v.push(`SameSite=${p}`),document.cookie=v.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const r=t[e].replace(/^\s+/,""),d=r.indexOf("=");if(d!==-1&&r.slice(0,d)===n)return decodeURIComponent(r.slice(d+1))}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function R_(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function T_(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Bg(n,t,e){let r=!R_(t);return n&&(r||e===!1)?T_(n,t):t}const Wg=n=>n instanceof Vr?{...n}:n;function ds(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,i,a,u){return Ce.isPlainObject(f)&&Ce.isPlainObject(i)?Ce.merge.call({caseless:u},f,i):Ce.isPlainObject(i)?Ce.merge({},i):Ce.isArray(i)?i.slice():i}function d(f,i,a,u){if(Ce.isUndefined(i)){if(!Ce.isUndefined(f))return r(void 0,f,a,u)}else return r(f,i,a,u)}function h(f,i){if(!Ce.isUndefined(i))return r(void 0,i)}function p(f,i){if(Ce.isUndefined(i)){if(!Ce.isUndefined(f))return r(void 0,f)}else return r(void 0,i)}function v(f,i,a){if(Ce.hasOwnProp(t,a))return r(f,i);if(Ce.hasOwnProp(n,a))return r(void 0,f)}const s={url:h,method:h,data:h,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:v,headers:(f,i,a)=>d(Wg(f),Wg(i),a,!0)};return Ce.forEach(Object.keys({...n,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const i=Ce.hasOwnProp(s,f)?s[f]:d,a=Ce.hasOwnProp(n,f)?n[f]:void 0,u=Ce.hasOwnProp(t,f)?t[f]:void 0,g=i(a,u,f);Ce.isUndefined(g)&&i!==v||(e[f]=g)}),e}const M_=["content-type","content-length"];function L_(n,t,e){if(e!=="content-only"){n.set(t);return}Object.entries(t).forEach(([r,d])=>{M_.includes(r.toLowerCase())&&n.set(r,d)})}const I_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),jg=n=>{const t=ds({},n),e=u=>Ce.hasOwnProp(t,u)?t[u]:void 0,r=e("data");let d=e("withXSRFToken");const h=e("xsrfHeaderName"),p=e("xsrfCookieName");let v=e("headers");const s=e("auth"),f=e("baseURL"),i=e("allowAbsoluteUrls"),a=e("url");if(t.headers=v=Vr.from(v),t.url=Ig(Bg(f,a,i),n.params,n.paramsSerializer),s&&v.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?I_(s.password):""))),Ce.isFormData(r)&&(Lr.hasStandardBrowserEnv||Lr.hasStandardBrowserWebWorkerEnv?v.setContentType(void 0):Ce.isFunction(r.getHeaders)&&L_(v,r.getHeaders(),e("formDataHeaderPolicy"))),Lr.hasStandardBrowserEnv&&(Ce.isFunction(d)&&(d=d(t)),d===!0||d==null&&$_(t.url))){const u=h&&p&&E_.read(p);u&&v.set(h,u)}return t},O_=typeof XMLHttpRequest<"u",N_=O_&&function(n){return new Promise(function(t,e){const r=jg(n);let d=r.data;const h=Vr.from(r.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:s}=r,f,i,a,u,g;function o(){u&&u(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=Vr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),R={data:!p||p==="text"||p==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:n,request:c};Pg(function($){t($),o()},function($){e($),o()},R),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(m)},c.onabort=function(){c&&(e(new lt("Request aborted",lt.ECONNABORTED,n,c)),o(),c=null)},c.onerror=function(x){const R=x&&x.message?x.message:"Network Error",$=new lt(R,lt.ERR_NETWORK,n,c);$.event=x||null,e($),o(),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||Wu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new lt(x,R.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,n,c)),o(),c=null},d===void 0&&h.setContentType(null),"setRequestHeader"in c&&Ce.forEach(h.toJSON(),function(x,R){c.setRequestHeader(R,x)}),Ce.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),p&&p!=="json"&&(c.responseType=r.responseType),s&&([a,g]=ql(s,!0),c.addEventListener("progress",a)),v&&c.upload&&([i,u]=ql(v),c.upload.addEventListener("progress",i),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{c&&(e(!x||x.type?new Ka(null,n,c):x),c.abort(),o(),c=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=k_(r.url);if(w&&!Lr.protocols.includes(w)){e(new lt("Unsupported protocol "+w+":",lt.ERR_BAD_REQUEST,n));return}c.send(d||null)})},D_=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,d;const h=function(f){if(!d){d=!0,v();const i=f instanceof Error?f:this.reason;r.abort(i instanceof lt?i:new Ka(i instanceof Error?i.message:i))}};let p=t&&setTimeout(()=>{p=null,h(new lt(`timeout of ${t}ms exceeded`,lt.ETIMEDOUT))},t);const v=()=>{n&&(p&&clearTimeout(p),p=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(h):f.removeEventListener("abort",h)}),n=null)};n.forEach(f=>f.addEventListener("abort",h));const{signal:s}=r;return s.unsubscribe=()=>Ce.asap(v),s}},P_=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,d;for(;r<e;)d=r+t,yield n.slice(r,d),r=d},F_=async function*(n,t){for await(const e of z_(n))yield*P_(e,t)},z_=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Hg=(n,t,e,r)=>{const d=F_(n,t);let h=0,p,v=s=>{p||(p=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:f,value:i}=await d.next();if(f){v(),s.close();return}let a=i.byteLength;if(e){let u=h+=a;e(u)}s.enqueue(new Uint8Array(i))}catch(f){throw v(f),f}},cancel(s){return v(s),d.return()}},{highWaterMark:2})};function B_(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const e=n.slice(5,t),r=n.slice(t+1);if(/;base64/i.test(e)){let h=r.length;const p=r.length;for(let a=0;a<p;a++)if(r.charCodeAt(a)===37&&a+2<p){const u=r.charCodeAt(a+1),g=r.charCodeAt(a+2);(u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(h-=2,a+=2)}let v=0,s=p-1;const f=a=>a>=2&&r.charCodeAt(a-2)===37&&r.charCodeAt(a-1)===51&&(r.charCodeAt(a)===68||r.charCodeAt(a)===100);s>=0&&(r.charCodeAt(s)===61?(v++,s--):f(s)&&(v++,s-=3)),v===1&&s>=0&&(r.charCodeAt(s)===61||f(s))&&v++;const i=Math.floor(h/4)*3-(v||0);return i>0?i:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let d=0;for(let h=0,p=r.length;h<p;h++){const v=r.charCodeAt(h);if(v<128)d+=1;else if(v<2048)d+=2;else if(v>=55296&&v<=56319&&h+1<p){const s=r.charCodeAt(h+1);s>=56320&&s<=57343?(d+=4,h++):d+=3}else d+=3}return d}const Vu="1.16.0",Ug=64*1024,{isFunction:Kl}=Ce,Vg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},W_=n=>{const t=Ce.global??globalThis,{ReadableStream:e,TextEncoder:r}=t;n=Ce.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:d,Request:h,Response:p}=n,v=d?Kl(d):typeof fetch=="function",s=Kl(h),f=Kl(p);if(!v)return!1;const i=v&&Kl(e),a=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new h(w).arrayBuffer())),u=s&&i&&Vg(()=>{let w=!1;const x=new h(Lr.origin,{body:new e,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),g=f&&i&&Vg(()=>Ce.isReadableStream(new p("").body)),o={stream:g&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!o[w]&&(o[w]=(x,R)=>{let $=x&&x[w];if($)return $.call(x);throw new lt(`Response type '${w}' is not supported`,lt.ERR_NOT_SUPPORT,R)})});const c=async w=>{if(w==null)return 0;if(Ce.isBlob(w))return w.size;if(Ce.isSpecCompliantForm(w))return(await new h(Lr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(w)||Ce.isArrayBuffer(w))return w.byteLength;if(Ce.isURLSearchParams(w)&&(w=w+""),Ce.isString(w))return(await a(w)).byteLength},m=async(w,x)=>Ce.toFiniteNumber(w.getContentLength())??c(x);return async w=>{let{url:x,method:R,data:$,signal:k,cancelToken:C,timeout:O,onDownloadProgress:N,onUploadProgress:I,responseType:M,headers:W,withCredentials:F="same-origin",fetchOptions:D,maxContentLength:A,maxBodyLength:_}=jg(w);const L=Ce.isNumber(A)&&A>-1,B=Ce.isNumber(_)&&_>-1;let U=d||fetch;M=M?(M+"").toLowerCase():"text";let V=D_([k,C&&C.toAbortSignal()],O),K=null;const ee=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ae;try{if(L&&typeof x=="string"&&x.startsWith("data:")&&B_(x)>A)throw new lt("maxContentLength size of "+A+" exceeded",lt.ERR_BAD_RESPONSE,w,K);if(B&&R!=="get"&&R!=="head"){const ve=await m(W,$);if(typeof ve=="number"&&isFinite(ve)&&ve>_)throw new lt("Request body larger than maxBodyLength limit",lt.ERR_BAD_REQUEST,w,K)}if(I&&u&&R!=="get"&&R!=="head"&&(ae=await m(W,$))!==0){let ve=new h(x,{method:"POST",body:$,duplex:"half"}),$e;if(Ce.isFormData($)&&($e=ve.headers.get("content-type"))&&W.setContentType($e),ve.body){const[Re,Ye]=Fg(ae,ql(zg(I)));$=Hg(ve.body,Ug,Re,Ye)}}Ce.isString(F)||(F=F?"include":"omit");const Q=s&&"credentials"in h.prototype;if(Ce.isFormData($)){const ve=W.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&W.delete("content-type")}W.set("User-Agent","axios/"+Vu,!1);const oe={...D,signal:V,method:R.toUpperCase(),headers:W.normalize().toJSON(),body:$,duplex:"half",credentials:Q?F:void 0};K=s&&new h(x,oe);let se=await(s?U(K,D):U(x,oe));if(L){const ve=Ce.toFiniteNumber(se.headers.get("content-length"));if(ve!=null&&ve>A)throw new lt("maxContentLength size of "+A+" exceeded",lt.ERR_BAD_RESPONSE,w,K)}const ue=g&&(M==="stream"||M==="response");if(g&&se.body&&(N||L||ue&&ee)){const ve={};["status","statusText","headers"].forEach(it=>{ve[it]=se[it]});const $e=Ce.toFiniteNumber(se.headers.get("content-length")),[Re,Ye]=N&&Fg($e,ql(zg(N),!0))||[];let Ge=0;const at=it=>{if(L&&(Ge=it,Ge>A))throw new lt("maxContentLength size of "+A+" exceeded",lt.ERR_BAD_RESPONSE,w,K);Re&&Re(it)};se=new p(Hg(se.body,Ug,at,()=>{Ye&&Ye(),ee&&ee()}),ve)}M=M||"text";let pe=await o[Ce.findKey(o,M)||"text"](se,w);if(L&&!g&&!ue){let ve;if(pe!=null&&(typeof pe.byteLength=="number"?ve=pe.byteLength:typeof pe.size=="number"?ve=pe.size:typeof pe=="string"&&(ve=typeof r=="function"?new r().encode(pe).byteLength:pe.length)),typeof ve=="number"&&ve>A)throw new lt("maxContentLength size of "+A+" exceeded",lt.ERR_BAD_RESPONSE,w,K)}return!ue&&ee&&ee(),await new Promise((ve,$e)=>{Pg(ve,$e,{data:pe,headers:Vr.from(se.headers),status:se.status,statusText:se.statusText,config:w,request:K})})}catch(Q){if(ee&&ee(),V&&V.aborted&&V.reason instanceof lt){const oe=V.reason;throw oe.config=w,K&&(oe.request=K),Q!==oe&&(oe.cause=Q),oe}throw Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,w,K,Q&&Q.response),{cause:Q.cause||Q}):lt.from(Q,Q&&Q.code,w,K,Q&&Q.response)}}},j_=new Map,Gg=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:d}=t,h=[r,d,e];let p=h.length,v=p,s,f,i=j_;for(;v--;)s=h[v],f=i.get(s),f===void 0&&i.set(s,f=v?new Map:W_(t)),i=f;return f};Gg();const Gu={http:l_,xhr:N_,fetch:{get:Gg}};Ce.forEach(Gu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const qg=n=>`- ${n}`,H_=n=>Ce.isFunction(n)||n===null||n===!1;function U_(n,t){n=Ce.isArray(n)?n:[n];const{length:e}=n;let r,d;const h={};for(let p=0;p<e;p++){r=n[p];let v;if(d=r,!H_(r)&&(d=Gu[(v=String(r)).toLowerCase()],d===void 0))throw new lt(`Unknown adapter '${v}'`);if(d&&(Ce.isFunction(d)||(d=d.get(t))))break;h[v||"#"+p]=d}if(!d){const p=Object.entries(h).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=e?p.length>1?`since :
4
- `+p.map(qg).join(`
5
- `):" "+qg(p[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return d}const Kg={getAdapter:U_,adapters:Gu};function qu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ka(null,n)}function Yg(n){return qu(n),n.headers=Vr.from(n.headers),n.data=Uu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Kg.getAdapter(n.adapter||qa.adapter,n)(n).then(function(t){qu(n),n.response=t;try{t.data=Uu.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Vr.from(t.headers),t},function(t){if(!Dg(t)&&(qu(n),t&&t.response)){n.response=t.response;try{t.response.data=Uu.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Vr.from(t.response.headers)}return Promise.reject(t)})}const Yl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Yl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Xg={};Yl.transitional=function(n,t,e){function r(d,h){return"[Axios v"+Vu+"] Transitional option '"+d+"'"+h+(e?". "+e:"")}return(d,h,p)=>{if(n===!1)throw new lt(r(h," has been removed"+(t?" in "+t:"")),lt.ERR_DEPRECATED);return t&&!Xg[h]&&(Xg[h]=!0,console.warn(r(h," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(d,h,p):!0}},Yl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function V_(n,t,e){if(typeof n!="object")throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const h=r[d],p=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0;if(p){const v=n[h],s=v===void 0||p(v,h,n);if(s!==!0)throw new lt("option "+h+" must be "+s,lt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new lt("Unknown option "+h,lt.ERR_BAD_OPTION)}}const Xl={assertOptions:V_,validators:Yl},Li=Xl.validators;let fs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Og,response:new Og}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const h=(()=>{if(!d.stack)return"";const p=d.stack.indexOf(`
6
- `);return p===-1?"":d.stack.slice(p+1)})();try{if(!r.stack)r.stack=h;else if(h){const p=h.indexOf(`
7
- `),v=p===-1?-1:h.indexOf(`
8
- `,p+1),s=v===-1?"":h.slice(v+1);String(r.stack).endsWith(s)||(r.stack+=`
9
- `+h)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ds(this.defaults,e);const{transitional:r,paramsSerializer:d,headers:h}=e;r!==void 0&&Xl.assertOptions(r,{silentJSONParsing:Li.transitional(Li.boolean),forcedJSONParsing:Li.transitional(Li.boolean),clarifyTimeoutError:Li.transitional(Li.boolean),legacyInterceptorReqResOrdering:Li.transitional(Li.boolean)},!1),d!=null&&(Ce.isFunction(d)?e.paramsSerializer={serialize:d}:Xl.assertOptions(d,{encode:Li.function,serialize:Li.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Xl.assertOptions(e,{baseUrl:Li.spelling("baseURL"),withXsrfToken:Li.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=h&&Ce.merge(h.common,h[e.method]);h&&Ce.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete h[o]}),e.headers=Vr.concat(p,h);const v=[];let s=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;s=s&&o.synchronous;const c=e.transitional||Wu;c&&c.legacyInterceptorReqResOrdering?v.unshift(o.fulfilled,o.rejected):v.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let i,a=0,u;if(!s){const o=[Yg.bind(this),void 0];for(o.unshift(...v),o.push(...f),u=o.length,i=Promise.resolve(e);a<u;)i=i.then(o[a++],o[a++]);return i}u=v.length;let g=e;for(;a<u;){const o=v[a++],c=v[a++];try{g=o(g)}catch(m){c.call(this,m);break}}try{i=Yg.call(this,g)}catch(o){return Promise.reject(o)}for(a=0,u=f.length;a<u;)i=i.then(f[a++],f[a++]);return i}getUri(t){t=ds(this.defaults,t);const e=Bg(t.baseURL,t.url,t.allowAbsoluteUrls);return Ig(e,t.params,t.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(n){fs.prototype[n]=function(t,e){return this.request(ds(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ce.forEach(["post","put","patch","query"],function(n){function t(e){return function(r,d,h){return this.request(ds(h||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}fs.prototype[n]=t(),n!=="query"&&(fs.prototype[n+"Form"]=t(!0))});let G_=class jx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(d){e=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](d);r._listeners=null}),this.promise.then=d=>{let h;const p=new Promise(v=>{r.subscribe(v),h=v}).then(d);return p.cancel=function(){r.unsubscribe(h)},p},t(function(d,h,p){r.reason||(r.reason=new Ka(d,h,p),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new jx(function(e){t=e}),cancel:t}}};function q_(n){return function(t){return n.apply(null,t)}}function K_(n){return Ce.isObject(n)&&n.isAxiosError===!0}const Ku={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(Ku).forEach(([n,t])=>{Ku[t]=n});function Jg(n){const t=new fs(n),e=bg(fs.prototype.request,t);return Ce.extend(e,fs.prototype,t,{allOwnKeys:!0}),Ce.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Jg(ds(n,r))},e}const Kn=Jg(qa);Kn.Axios=fs,Kn.CanceledError=Ka,Kn.CancelToken=G_,Kn.isCancel=Dg,Kn.VERSION=Vu,Kn.toFormData=Gl,Kn.AxiosError=lt,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=q_,Kn.isAxiosError=K_,Kn.mergeConfig=ds,Kn.AxiosHeaders=Vr,Kn.formToJSON=n=>Ng(Ce.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=Kg.getAdapter,Kn.HttpStatusCode=Ku,Kn.default=Kn;const{Axios:Mz,AxiosError:Lz,CanceledError:Iz,isCancel:Oz,CancelToken:Nz,VERSION:Dz,all:Pz,Cancel:Fz,isAxiosError:zz,spread:Bz,toFormData:Wz,AxiosHeaders:jz,HttpStatusCode:Hz,formToJSON:Uz,getAdapter:Vz,mergeConfig:Gz,create:qz}=Kn,Yu=Kn.create({baseURL:location.origin,timeout:6e4,params:{}});Yu.interceptors.response.use(n=>n,n=>{if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let t=`HTTP ${n.response.status} - `;n.response?.statusText&&(t+=`${n.response.statusText} `),n.response?.config?.data&&(t+=`${n.response.config.data} `),n.response?.data?.message?t+=`${n.response.data.message}`:n.response?.data?.exception?t+=`${n.response.data.exception}`:n.response?.data?.error?.message?(n.response.data.error.class&&(t+=`${n.response.data.error.class} `),t+=`${n.response.data.error.message}`):t+=`${n.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:t}),n}else throw n});const Jl=async function(n,t,{data:e,params:r={},headers:d,noAuth:h=!1,noScope:p=!1,onUploadProgress:v=!1}={}){if(!h){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}d.Authorization=localStorage.openc3Token}return d.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),Yu({method:n,url:t,data:e,params:r,headers:d,onUploadProgress:v})},Xu={Accept:"application/json"},Zg={...Xu,"Content-Type":"application/json"},Ju=Tn("a",{get:function(n,{params:t,headers:e=Xu,noScope:r,noAuth:d,onUploadProgress:h}={}){return Jl("get",n,{params:t,headers:e,noScope:r,noAuth:d,onUploadProgress:h})},put:function(n,{data:t,params:e,headers:r=Zg,noScope:d,noAuth:h,onUploadProgress:p}={}){return Jl("put",n,{data:t,params:e,headers:r,noScope:d,noAuth:h,onUploadProgress:p})},post:function(n,{data:t,params:e,headers:r=Zg,noScope:d,noAuth:h,onUploadProgress:p}={}){return Jl("post",n,{data:t,params:e,headers:r,noScope:d,noAuth:h,onUploadProgress:p})},delete:function(n,{params:t,headers:e=Xu,noScope:r,noAuth:d,onUploadProgress:h}={}){return Jl("delete",n,{params:t,headers:e,noScope:r,noAuth:d,onUploadProgress:h})}});let Zl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,d=e.length;r<d;r++)e[r](...t)},events:{},on(n,t){return(this.events[n]||=[]).push(t),()=>{this.events[n]=this.events[n]?.filter(e=>t!==e)}}}),Ya=class extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}},Zu=class extends Ya{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}};class Y_ extends Ya{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}let Yi=class extends Ya{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}};class X_ extends Yi{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Qg(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}let J_=class{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:String(t),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:d})=>(e[r]=d,e),{})}};const ps=Symbol("state");let em=class{constructor(t={}){this.emitter=Zl(),this.params=Object.freeze(t),this.presence=new J_(this),this.initialConnect=!0,this[ps]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Qg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ps]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[ps]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ps]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[ps]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[ps]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[ps]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(d=>d()),t()})),r.push(this.on("close",d=>{r.forEach(h=>h()),e(d||new Ya("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class Z_{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(h=>{e=h}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},d=this._pendingTop;return this._pendings.push(r),d&&await d.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}let Q_=class{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}};class ek{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new Q_),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let d=this._subscriptions[t]=new Z_(t);return d.remoteId=this._localToRemote[t],d.subscriber=e,d.unsubscriber=r,d.gvl=this.glv,d}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class tk{constructor(t={}){this.subscriptions=new ek(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let d=this._remoteToLocal[t];if(!d){this._pendingMessages.push([t,e,r]);return}let h=this.subscriptions.get(d);h&&h.channels.forEach(p=>{p.receive(e,r)})}notify(t,e,r){let d=this._remoteToLocal[t];if(!d)return;let h=this.subscriptions.get(d);h&&h.channels.forEach(p=>p.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const tm={debug:0,info:1,warn:2,error:3};let nm=class{constructor(t){this.level=t||"warn"}log(t,e,r){tm[t]<tm[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}},Xa=class extends nm{writeLogEntry(){}},nk=class{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}},rk=0,rm=class{constructor(t={}){let{logger:e}=t;this.logger=e||new Xa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let d=Qg(r);if(this.pendingUnsubscriptions[d]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,d),new Promise(v=>{setTimeout(()=>{v(this.subscribe(t,e))},p)})}if(this.pendingSubscriptions[d])return this.logger.warn("subscription is already pending, skipping",d),Promise.reject(Error("Already subscribing"));let h=this.subscribeRetryInterval;return new Promise((p,v)=>{let s=++rk;this.pendingSubscriptions[d]={resolve:p,reject:v,id:s},this.cable.send(this.buildSubscribeRequest(d)),this.maybeRetrySubscribe(s,d,h)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let d=this.pendingSubscriptions[e];d&&d.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let d=this.pendingSubscriptions[e];d&&d.id===t&&(delete this.pendingSubscriptions[e],d.reject(new Y_(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:d,reason:h,reconnect:p}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let v=t.sid;return v&&this.cable.setSessionId(v),this.cable.connected()}if(e==="disconnect"){let v=new Yi(h);this.reset(v),p===!1?this.cable.closed(v):this.cable.disconnected(v);return}if(e==="confirm_subscription"){let v=this.pendingSubscriptions[r];if(!v){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],v.resolve(r)}if(e==="reject_subscription"){let v=this.pendingSubscriptions[r];return v?(delete this.pendingSubscriptions[r],v.reject(new Zu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(d)return{identifier:r,message:d};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const im=()=>Date.now()/1e3|0;class ik extends rm{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=im()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:d}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=im()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let h=t.restored_ids||Object.keys(this.subscriptionStreams);for(let p of h)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(h)}return this.cable.connected(this.sessionId)}if(e==="presence"){let h=d.type;if(h==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(d))}else if(h==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:d}}if(d){let h=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:d,meta:h}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let d=this.presenceInfo[t];return d&&(e.presence=d),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let d of this.subscriptionStreams[t]){let h=this.streamsPositions[d];h&&(r=!0,e[d]=h)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,d){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:d},{stream:e,epoch:r,offset:d}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,d)=>{this.pendingPresence[t]={resolve:r,reject:d},this.cable.send({command:"presence",identifier:t,data:e})})}}class ok extends Ya{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}let om=class extends em{static identifier="__ghost__";constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}};const sk="$pubsub";let sm=class extends em{static identifier=sk;async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}};const gs=Symbol("state");let ak=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:d,hubOptions:h,performFailures:p,transportConfigurator:v}){this.emitter=Zl(),this.transport=n,this.encoder=e,this.logger=r||new Xa,this.protocol=t,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new tk(h||{}),this[gs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=v,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,d===!1&&this.connect().catch(()=>{})}get state(){return this[gs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[gs]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[gs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Yi("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[gs]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Yi("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Yi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[gs]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Yi?n:new Yi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[gs]="closed";let e=t||new Yi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:d,message:h,meta:p}=e;r?this.hub.notify(d,r,h):this.hub.transmit(d,h,p)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new sm({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new sm({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=om),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let d=await n.acquire("subscribed");if(d.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),d.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),d.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),d.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),d.release();return}let h={identifier:t,params:e};this.logger.debug("subscribing",h);try{let p=await this.protocol.subscribe(t,e);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...h,remoteId:p}),n.notify("connected")}catch(p){if(p){if(p instanceof Zu&&this.logger.warn("rejected",h),p instanceof Yi){this.logger.debug("disconnected during subscription; will retry on connect",h),d.release();return}this.logger.error("failed to subscribe",{error:p,...h})}n.close(p),this.hub.unsubscribe(r)}d.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(d){d&&(d instanceof Yi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:d}):this.logger.error("unsubscribe failed",{id:t,error:d}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new ok;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let d=r.remoteId,h={id:d,action:t,payload:e};this.logger.debug("perform",h);try{let p=await this.protocol.perform(d,t,e);return p&&this.logger.debug("perform result",{message:p,request:h}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:h}),p}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(d=>d()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(d=>d()),t(r)}))}),this._pendingConnect)}};const lk={maxMissingPings:2,maxReconnectAttempts:1/0},ra=()=>Date.now(),am=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:d}=t;return e=e||2,r===void 0&&(r=.5),h=>{let p=n*e**h,v=p*e,s=p+(v-p)*Math.random(),f=2*(Math.random()-.5)*r;return s=s*(1+f),d&&d<s&&(s=d),s}};let lm=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},lk,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Xa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ra()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ra(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ra(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ra(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ra()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=ra()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new X_))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}},ck=class{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Zl(),this.unbind=[],this.logger=e.logger||new Xa}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}};class uk{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Zl();let{format:d,subprotocol:h,authStrategy:p}=e;this.format=d||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=p||"param",this.authProtocol="",this.subprotocol=h}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let d=[];d.push(this.once("open",()=>{d.forEach(h=>h()),e()})),d.push(this.once("close",()=>{d.forEach(h=>h()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let d=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(d)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(d=>d.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class hk{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}whisper(t){return this.channel.whisper(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}let dk=class extends om{constructor(t,e,r){super(t,e),this.subscription=new hk(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:d})=>this.subscription.notify("connected",{reconnected:d})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",d=>this.subscription.notify("received",d)),this.on("close",d=>{d&&d instanceof Zu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}};class fk{constructor(t){this.cable=t}create(t,e){let r,d;typeof t=="object"?(r=t.channel,delete t.channel,d=t):(r=t,d={});let h=new dk(r,d,e);return h.subscription.notify("initialized"),this.cable.subscribe(h),h.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class pk{constructor(t){this.cable=t,this.subscriptions=new fk(t)}send(t){return this.cable.send(t)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const cm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function gk(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},cm,t);let{protocol:e,websocketImplementation:r,websocketFormat:d,websocketOptions:h,websocketAuthStrategy:p,fallbacks:v,logLevel:s,logger:f,transport:i,encoder:a,lazy:u,monitor:g,pingInterval:o,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:R,historyTimestamp:$,protocolOptions:k,concurrentSubscribes:C,performFailures:O,transportConfigurator:N,auth:I}=t;if(f=f||new Xa(s),typeof e=="string"){x=x||e;let F=e.substring(0,e.lastIndexOf("-")),D=e.substring(e.lastIndexOf("-")+1);if(k=k||{},F==="actioncable-v1")e=new rm({logger:f,...k});else if(F==="actioncable-v1-ext")e=new ik({logger:f,historyTimestamp:$,...k});else throw Error(`Protocol is not supported yet: ${e}`);if(D==="json")a=a||new nk,d=d||"text";else if(D==="msgpack"){if(d="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(d=d||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");i=i||new uk(n,{websocketImplementation:r,websocketOptions:h,subprotocol:x,authStrategy:p,format:d}),v&&(i=new ck([i,...v],{logger:f})),I&&I.token&&i.setToken(I.token,I.param||"jid"),c=c||am(o),g!==!1&&(g=g||new lm({pingInterval:o,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:w,logger:f}));let M={concurrentSubscribes:C},W=new ak({protocol:e,transport:i,encoder:a,logger:f,lazy:u,hubOptions:M,performFailures:O,transportConfigurator:N});return g&&(g.watch(W),W.monitor=g),R&&mk(W,async()=>{try{await R(i)}catch(F){return f.error("Failed to refresh authentication token: "+F),!1}return W.connect().catch(()=>{}),!0}),W}function mk(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class vk extends nm{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class yk extends lm{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=d=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:d})},r=()=>this.disconnect(new Yi("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const bk=["cable","action-cable"],wk="/cable",Ql=(n,t)=>{for(let e of bk){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},um=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,xk=()=>{if(typeof document<"u"&&document.head){let n=Ql(document,"url");if(n)return um(n)}return um(wk)},Ck=()=>{if(typeof document<"u"&&document.head){let n=Ql(document,"history-timestamp");if(n)return n|0}},_k=()=>{if(typeof document<"u"&&document.head)return Ql(document,"token")},kk=()=>{if(typeof document<"u"&&document.head)return Ql(document,"token-param")};function Ak(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||xk(),t=t||{},t.historyTimestamp||=Ck();let e=_k();if(e){let f=kk();t.auth=Object.assign({token:e,param:f},t.auth||{})}t=Object.assign({},cm,t);let{logLevel:r,logger:d,pingInterval:h,reconnectStrategy:p,maxMissingPings:v,maxReconnectAttempts:s}=t;return d=t.logger=t.logger||new vk(r),p=t.reconnectStrategy=t.reconnectStrategy||am(h),t.monitor!==!1&&(t.monitor=t.monitor||new yk({pingInterval:h,reconnectStrategy:p,maxMissingPings:v,maxReconnectAttempts:s,logger:d})),gk(n,t)}function Sk(n,t){let e=Ak(n,t);return new pk(e)}class $k{constructor(t="/openc3-api/cable",e="/openc3-api/auth/otp"){this._cable=null,this._url=t,this._otpUrl=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},d={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(h=>(h&&OpenC3Auth.setTokens(),Ju.get(this._otpUrl,{params:{scope:e}}))).then(({data:h})=>{if(this._cable==null){const p=new URL(this._url,document.baseURI);p.searchParams.set("scope",e),p.searchParams.set("authorization",h),this._cable=Sk(p.href)}return this._cable.subscriptions.create({channel:t,...d},r)})}recordPing(){}}Tn("f",$k),Tn("U",class{constructor(t,e,r="",d=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=d}});function Ja(n){return Ek.test(n)}const Ek=/^-?[0-9]+$/;function hm(n){return Rk.test(n)}const Rk=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function dm(n,t){if(Ja(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const d=fm(n),h=fm(r);return!!(d===h||t?.approx===!0&&!Ja(n)&&h.length>=14&&d.startsWith(h.substring(0,14)))}let Za=(function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n})({});function Tk(n){if(dm(n,{approx:!1}))return;if(Ja(n))return Za.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?Za.underflow:Za.truncate_float:Za.overflow}function fm(n){const{start:t,end:e}=Mk(n),r=n.substring(t,e),d=r.indexOf(".");return d===-1?r:r.substring(0,d)+r.substring(d+1)}function Mk(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}let Lk=class{isLosslessNumber=!0;constructor(t){if(!hm(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=Tk(this.value);if(t===void 0||t===Za.truncate_float)return Number.parseFloat(this.value);if(Ja(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}};function Ik(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function Ok(n){return new Lk(n)}function Nk(n,t){return Qu({"":n},"",n,t)}function Qu(n,t,e,r){return Array.isArray(e)?r.call(n,t,Pk(e,r)):e&&typeof e=="object"&&!Ik(e)?r.call(n,t,Dk(e,r)):r.call(n,t,e)}function Dk(n,t){for(const e of Object.keys(n)){const r=Qu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function Pk(n,t){for(let e=0;e<n.length;e++)n[e]=Qu(n,String(e),n[e],t);return n}function Fk(n,t,e){const r=typeof e=="function"?{parseNumber:e}:e,d=r?.parseNumber??Ok,h=r?.onDuplicateKey??O;let p=0;const v=i();return w(v),R(),t?Nk(v,t):v;function s(){if(n.charCodeAt(p)===Uk){p++,u();const B={};let U=!0;for(;p<n.length&&n.charCodeAt(p)!==gm;){U?U=!1:(c(),u());const V=p,K=g();if(K===void 0){C();return}u(),m();const ee=i();if(ee===void 0){F();return}if(Object.prototype.hasOwnProperty.call(B,K)&&!eh(ee,B[K])){const ae=h({key:K,position:V+1,oldValue:B[K],newValue:ee});ae!==void 0&&(B[K]=ae)}else B[K]=ee}return n.charCodeAt(p)!==gm&&N(),p++,B}}function f(){if(n.charCodeAt(p)===Vk){p++,u();const B=[];let U=!0;for(;p<n.length&&n.charCodeAt(p)!==mm;){U?U=!1:c();const V=i();x(V),B.push(V)}return n.charCodeAt(p)!==mm&&I(),p++,B}}function i(){u();const B=g()??o()??s()??f()??a("true",!0)??a("false",!1)??a("null",null);return u(),B}function a(B,U){if(n.slice(p,p+B.length)===B)return p+=B.length,U}function u(){for(;zk(n.charCodeAt(p));)p++}function g(){if(n.charCodeAt(p)===th){p++;let B="";for(;p<n.length&&n.charCodeAt(p)!==th;){if(n.charCodeAt(p)===Hk){const U=n[p+1],V=jk[U];V!==void 0?(B+=V,p++):U==="u"?ec(n.charCodeAt(p+2))&&ec(n.charCodeAt(p+3))&&ec(n.charCodeAt(p+4))&&ec(n.charCodeAt(p+5))?(B+=String.fromCharCode(Number.parseInt(n.slice(p+2,p+6),16)),p+=5):D(p):W(p)}else Wk(n.charCodeAt(p))?B+=n[p]:M(n[p]);p++}return k(),p++,B}}function o(){const B=p;if(n.charCodeAt(p)===vm&&(p++,$(B)),n.charCodeAt(p)===nh)p++;else if(Bk(n.charCodeAt(p)))for(p++;tc(n.charCodeAt(p));)p++;if(n.charCodeAt(p)===Qk)for(p++,$(B);tc(n.charCodeAt(p));)p++;if(n.charCodeAt(p)===iA||n.charCodeAt(p)===rA)for(p++,(n.charCodeAt(p)===vm||n.charCodeAt(p)===Xk)&&p++,$(B);tc(n.charCodeAt(p));)p++;if(p>B)return d(n.slice(B,p))}function c(){if(n.charCodeAt(p)!==Zk)throw new SyntaxError(`Comma ',' expected after value ${L()}`);p++}function m(){if(n.charCodeAt(p)!==eA)throw new SyntaxError(`Colon ':' expected after property name ${L()}`);p++}function w(B){if(B===void 0)throw new SyntaxError(`JSON value expected ${L()}`)}function x(B){if(B===void 0)throw new SyntaxError(`Array item expected ${L()}`)}function R(){if(p<n.length)throw new SyntaxError(`Expected end of input ${L()}`)}function $(B){if(!tc(n.charCodeAt(p))){const U=n.slice(B,p);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${L()}`)}}function k(){if(n.charCodeAt(p)!==th)throw new SyntaxError(`End of string '"' expected ${L()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${L()}`)}function O(B){let{key:U,position:V}=B;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${V}`)}function N(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${L()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${L()}`)}function M(B){throw new SyntaxError(`Invalid character '${B}' ${A()}`)}function W(B){const U=n.slice(B,B+2);throw new SyntaxError(`Invalid escape character '${U}' ${A()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function D(B){const U=n.slice(B,B+6);throw new SyntaxError(`Invalid unicode character '${U}' ${A()}`)}function A(){return`at position ${p}`}function _(){return p<n.length?`but got '${n[p]}'`:"but reached end of input"}function L(){return`${_()} ${A()}`}}function zk(n){return n===Gk||n===qk||n===Kk||n===Yk}function ec(n){return n>=nh&&n<=rh||n>=tA&&n<=oA||n>=nA&&n<=sA}function tc(n){return n>=nh&&n<=rh}function Bk(n){return n>=Jk&&n<=rh}function Wk(n){return n>=32&&n<=1114111}function eh(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>eh(e,t[r])):pm(n)&&pm(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>eh(n[e],t[e])):!1}function pm(n){return typeof n=="object"&&n!==null}const jk={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
- `,r:"\r",t:" "},Hk=92,Uk=123,gm=125,Vk=91,mm=93,Gk=32,qk=10,Kk=9,Yk=13,th=34,Xk=43,vm=45,nh=48,Jk=49,rh=57,Zk=44,Qk=46,eA=58,tA=65,nA=97,rA=69,iA=101,oA=70,sA=102;function ym(n,t,e,r){return d(n);function d(s,f){if(Array.isArray(r)){const i=r.find(a=>a.test(s));if(i){const a=i.stringify(s);if(typeof a!="string"||!hm(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof 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 h(s);if(s&&typeof s=="object")return p(s)}function h(s,f){if(s.length===0)return"[]";let i="[";for(let a=0;a<s.length;a++){const u=s[a];typeof u<"u"&&typeof u!="function"?i+=d(u):i+="null",a<s.length-1&&(i+=",")}return i+="]",i}function p(s,f){if(typeof s.toJSON=="function")return ym(s.toJSON(),t,e,void 0);const i=Array.isArray(t)?t.map(String):Object.keys(s);if(i.length===0)return"{}";let a=!0,u="{";for(const g of i){const o=s[g];if(v(g,o)){a?a=!1:u+=",";const c=JSON.stringify(g);u+=`${c}:`,u+=d(o)}}return u+="}",u}function v(s,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function aA(n){return Ja(n)&&!dm(n)?BigInt(n):parseFloat(n)}class lA{id=1;constructor(){}async exec(t,e,r={},d={},h=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,d.manual=!0,(await Yu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...d},timeout:h,transformRequest:[(p,v)=>ym(p)],transformResponse:[p=>{try{return Fk(p,void 0,aA)}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(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(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(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e,r,d,h){return this.exec("map_target_to_interface",[t,e],{cmd_only:r,tlm_only:d,unmap_old:h})}unmap_target_from_interface(t,e,r,d){return this.exec("unmap_target_from_interface",[t,e],{cmd_only:r,tlm_only:d})}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}interface_target_enable(t,e,r=!1,d=!1){return this.exec("interface_target_enable",[t,e],{cmd_only:r,tlm_only:d})}interface_target_disable(t,e,r=!1,d=!1){return this.exec("interface_target_disable",[t,e],{cmd_only:r,tlm_only:d})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,e,r,d,h){return this.exec("map_target_to_router",[t,e],{cmd_only:r,tlm_only:d,unmap_old:h})}unmap_target_from_router(t,e,r,d){return this.exec("unmap_target_from_router",[t,e],{cmd_only:r,tlm_only:d})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,e,r=!1,d=!1){return this.exec("router_target_enable",[t,e],{cmd_only:r,tlm_only:d})}router_target_disable(t,e,r=!1,d=!1){return this.exec("router_target_disable",[t,e],{cmd_only:r,tlm_only:d})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,d=30){const h=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:d});if(h!=null){let p=h.length,v=null;for(let s=0;s<p;s++)v=this.decode_openc3_type(h[s][1]),v!==null&&(h[s][1]=v)}return h}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,d=null,h=null){let p={stale_time:e};r!==null&&(p.cache_timeout=r),d!==null&&(p.start_time=d.toISOString()),h!==null&&(p.end_time=h.toISOString());const v=await this.exec("get_tlm_values",[t],p,{},1e4);if(v&&v.length>0){let s=v.length,f=null;for(let i=0;i<s;i++)f=this.decode_openc3_type(v[i][0]),f!==null&&(v[i][0]=f)}return v}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,d="CONVERTED"){let h=null;if(e===void 0)h=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))h=await this.exec("tlm",[t],{type:e});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else h=await this.exec("tlm",[t,e,r],{type:d});let p=this.decode_openc3_type(h);return p!==null&&(h=p),h}async inject_tlm(t,e,r=null,d="CONVERTED",h=!1){await this.exec("inject_tlm",[t,e,r],{type:d,stored:h})}set_tlm(t,e,r,d){return this.exec("set_tlm",[t,e,r],{type:d})}override_tlm(t,e,r,d){return this.exec("override_tlm",[t,e,r],{type:d})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,d){return this.exec("normalize_tlm",[t,e,r],{type:d})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,d="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,d])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,d,h,p={}){let v=null;for(let s in d)Object.prototype.hasOwnProperty.call(d,s)&&(v=this.encode_openc3_type(d[s]),v!==null&&(d[s]=v));return this.exec(t,[e,r,d],p,h)}get_cmd_hazardous(t,e,r,d={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},d):this._cmd("get_cmd_hazardous",t,e,r,d)}cmd(t,e,r,d={},h={}){return e===void 0?this.exec("cmd",t,h,d):this._cmd("cmd",t,e,r,d,h)}cmd_no_range_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_no_range_check",t,h,d):this._cmd("cmd_no_range_check",t,e,r,d,h)}cmd_raw(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw",t,h,d):this._cmd("cmd_raw",t,e,r,d,h)}cmd_raw_no_range_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,h,d):this._cmd("cmd_raw_no_range_check",t,e,r,d,h)}cmd_no_hazardous_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,h,d):this._cmd("cmd_no_hazardous_check",t,e,r,d,h)}cmd_no_checks(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_no_checks",t,h,d):this._cmd("cmd_no_checks",t,e,r,d,h)}cmd_raw_no_hazardous_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,h,d):this._cmd("cmd_raw_no_hazardous_check",t,e,r,d,h)}cmd_raw_no_checks(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw_no_checks",t,h,d):this._cmd("cmd_raw_no_checks",t,e,r,d,h)}build_cmd(t,e,r,d={},h={}){return e===void 0?this.exec("build_cmd",t,h,d):this._cmd("build_cmd",t,e,r,d,h)}build_command(t,e,r,d={},h={}){return e===void 0?this.exec("build_cmd",t,h,d):this._cmd("build_cmd",t,e,r,d,h)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(t){window.open(t,"_blank")}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),d=new Uint8Array(r);return Array.from(d).map(h=>h.toString(16).padStart(2,"0")).join("")}}}Tn("c",lA);const bm=6048e5,cA=864e5,nc=6e4,ih=36e5,uA=1e3,wm=Symbol.for("constructDateFrom");Tn({u:nc,l:ih,p:uA});function fo(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&wm in n?n[wm](t):n instanceof Date?new n.constructor(t):new Date(t)}function Gr(n,t){return fo(t||n,n)}let hA={};function ia(){return hA}function oa(n,t){const e=ia(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,d=Gr(n,t?.in),h=d.getDay(),p=(h<r?7:0)+h-r;return d.setDate(d.getDate()-p),d.setHours(0,0,0,0),d}function Qa(n,t){return oa(n,{...t,weekStartsOn:1})}function xm(n,t){const e=Gr(n,t?.in),r=e.getFullYear(),d=fo(e,0);d.setFullYear(r+1,0,4),d.setHours(0,0,0,0);const h=Qa(d),p=fo(e,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const v=Qa(p);return e.getTime()>=h.getTime()?r+1:e.getTime()>=v.getTime()?r:r-1}function oh(n){const t=Gr(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function dA(n,...t){const e=fo.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function Cm(n,t){const e=Gr(n,t?.in);return e.setHours(0,0,0,0),e}function fA(n,t,e){const[r,d]=dA(e?.in,n,t),h=Cm(r),p=Cm(d),v=+h-oh(h),s=+p-oh(p);return Math.round((v-s)/cA)}function pA(n,t){const e=xm(n,t),r=fo(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Qa(r)}function gA(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function _m(n){return!(!gA(n)&&typeof n!="number"||isNaN(+Gr(n)))}function mA(n,t){const e=Gr(n,t?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const vA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yA=(n,t,e)=>{let r;const d=vA[n];return typeof d=="string"?r=d:t===1?r=d.one:r=d.other.replace("{{count}}",t.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function sh(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const bA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CA={date:sh({formats:bA,defaultWidth:"full"}),time:sh({formats:wA,defaultWidth:"full"}),dateTime:sh({formats:xA,defaultWidth:"full"})},_A={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kA=(n,t,e,r)=>_A[n];function el(n){return(t,e)=>{const r=e?.context?String(e.context):"standalone";let d;if(r==="formatting"&&n.formattingValues){const p=n.defaultFormattingWidth||n.defaultWidth,v=e?.width?String(e.width):p;d=n.formattingValues[v]||n.formattingValues[p]}else{const p=n.defaultWidth,v=e?.width?String(e.width):n.defaultWidth;d=n.values[v]||n.values[p]}const h=n.argumentCallback?n.argumentCallback(t):t;return d[h]}}const AA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},SA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$A={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},EA={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},RA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},TA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},MA=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},LA={ordinalNumber:MA,era:el({values:AA,defaultWidth:"wide"}),quarter:el({values:SA,defaultWidth:"wide",argumentCallback:n=>n-1}),month:el({values:$A,defaultWidth:"wide"}),day:el({values:EA,defaultWidth:"wide"}),dayPeriod:el({values:RA,defaultWidth:"wide",formattingValues:TA,defaultFormattingWidth:"wide"})};function tl(n){return(t,e={})=>{const r=e.width,d=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],h=t.match(d);if(!h)return null;const p=h[0],v=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],s=Array.isArray(v)?OA(v,a=>a.test(p)):IA(v,a=>a.test(p));let f;f=n.valueCallback?n.valueCallback(s):s,f=e.valueCallback?e.valueCallback(f):f;const i=t.slice(p.length);return{value:f,rest:i}}}function IA(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function OA(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function NA(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const d=r[0],h=t.match(n.parsePattern);if(!h)return null;let p=n.valueCallback?n.valueCallback(h[0]):h[0];p=e.valueCallback?e.valueCallback(p):p;const v=t.slice(d.length);return{value:p,rest:v}}}const DA=/^(\d+)(th|st|nd|rd)?/i,PA=/\d+/i,FA={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zA={any:[/^b/i,/^(a|c)/i]},BA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WA={any:[/1/i,/2/i,/3/i,/4/i]},jA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},HA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},UA={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},VA={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},GA={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qA={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},KA={ordinalNumber:NA({matchPattern:DA,parsePattern:PA,valueCallback:n=>parseInt(n,10)}),era:tl({matchPatterns:FA,defaultMatchWidth:"wide",parsePatterns:zA,defaultParseWidth:"any"}),quarter:tl({matchPatterns:BA,defaultMatchWidth:"wide",parsePatterns:WA,defaultParseWidth:"any",valueCallback:n=>n+1}),month:tl({matchPatterns:jA,defaultMatchWidth:"wide",parsePatterns:HA,defaultParseWidth:"any"}),day:tl({matchPatterns:UA,defaultMatchWidth:"wide",parsePatterns:VA,defaultParseWidth:"any"}),dayPeriod:tl({matchPatterns:GA,defaultMatchWidth:"any",parsePatterns:qA,defaultParseWidth:"any"})},YA=Tn("h",{code:"en-US",formatDistance:yA,formatLong:CA,formatRelative:kA,localize:LA,match:KA,options:{weekStartsOn:0,firstWeekContainsDate:1}});function XA(n,t){const e=Gr(n,t?.in);return fA(e,mA(e))+1}function km(n,t){const e=Gr(n,t?.in),r=+Qa(e)-+pA(e);return Math.round(r/bm)+1}function ah(n,t){const e=Gr(n,t?.in),r=e.getFullYear(),d=ia(),h=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??d.firstWeekContainsDate??d.locale?.options?.firstWeekContainsDate??1,p=fo(t?.in||n,0);p.setFullYear(r+1,0,h),p.setHours(0,0,0,0);const v=oa(p,t),s=fo(t?.in||n,0);s.setFullYear(r,0,h),s.setHours(0,0,0,0);const f=oa(s,t);return+e>=+v?r+1:+e>=+f?r:r-1}function JA(n,t){const e=ia(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,d=ah(n,t),h=fo(t?.in||n,0);return h.setFullYear(d,0,r),h.setHours(0,0,0,0),oa(h,t)}function Am(n,t){const e=Gr(n,t?.in),r=+oa(e,t)-+JA(e,t);return Math.round(r/bm)+1}function dn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Vo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return dn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):dn(e+1,2)},d(n,t){return dn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(n,t){return dn(n.getHours()%12||12,t.length)},H(n,t){return dn(n.getHours(),t.length)},m(n,t){return dn(n.getMinutes(),t.length)},s(n,t){return dn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),d=Math.trunc(r*Math.pow(10,e-3));return dn(d,t.length)}},sa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Sm={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),d=r>0?r:1-r;return e.ordinalNumber(d,{unit:"year"})}return Vo.y(n,t)},Y:function(n,t,e,r){const d=ah(n,r),h=d>0?d:1-d;if(t==="YY"){const p=h%100;return dn(p,2)}return t==="Yo"?e.ordinalNumber(h,{unit:"year"}):dn(h,t.length)},R:function(n,t){const e=xm(n);return dn(e,t.length)},u:function(n,t){const e=n.getFullYear();return dn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dn(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dn(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Vo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return dn(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const d=Am(n,r);return t==="wo"?e.ordinalNumber(d,{unit:"week"}):dn(d,t.length)},I:function(n,t,e){const r=km(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):dn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Vo.d(n,t)},D:function(n,t,e){const r=XA(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):dn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const d=n.getDay(),h=(d-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(h);case"ee":return dn(h,2);case"eo":return e.ordinalNumber(h,{unit:"day"});case"eee":return e.day(d,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(d,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(d,{width:"short",context:"formatting"});default:return e.day(d,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const d=n.getDay(),h=(d-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(h);case"cc":return dn(h,t.length);case"co":return e.ordinalNumber(h,{unit:"day"});case"ccc":return e.day(d,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(d,{width:"narrow",context:"standalone"});case"cccccc":return e.day(d,{width:"short",context:"standalone"});default:return e.day(d,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),d=r===0?7:r;switch(t){case"i":return String(d);case"ii":return dn(d,t.length);case"io":return e.ordinalNumber(d,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let d;switch(r===12?d=sa.noon:r===0?d=sa.midnight:d=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(d,{width:"narrow",context:"formatting"});default:return e.dayPeriod(d,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let d;switch(r>=17?d=sa.evening:r>=12?d=sa.afternoon:r>=4?d=sa.morning:d=sa.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(d,{width:"narrow",context:"formatting"});default:return e.dayPeriod(d,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Vo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Vo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):dn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):dn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Vo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Vo.s(n,t)},S:function(n,t){return Vo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Em(r);case"XXXX":case"XX":return ms(r);default:return ms(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Em(r);case"xxxx":case"xx":return ms(r);default:return ms(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$m(r,":");default:return"GMT"+ms(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$m(r,":");default:return"GMT"+ms(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return dn(r,t.length)},T:function(n,t,e){return dn(+n,t.length)}};function $m(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Math.trunc(r/60),h=r%60;return h===0?e+String(d):e+String(d)+t+dn(h,2)}function Em(n,t){return n%60===0?(n>0?"-":"+")+dn(Math.abs(n)/60,2):ms(n,t)}function ms(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=dn(Math.trunc(r/60),2),h=dn(r%60,2);return e+d+t+h}const Rm=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Tm=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ZA=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],d=e[2];if(!d)return Rm(n,t);let h;switch(r){case"P":h=t.dateTime({width:"short"});break;case"PP":h=t.dateTime({width:"medium"});break;case"PPP":h=t.dateTime({width:"long"});break;default:h=t.dateTime({width:"full"});break}return h.replace("{{date}}",Rm(r,t)).replace("{{time}}",Tm(d,t))},QA=Tn("k",{p:Tm,P:ZA}),eS=/^D+$/,tS=/^Y+$/,nS=["D","DD","YY","YYYY"];function Mm(n){return eS.test(n)}function Lm(n){return tS.test(n)}function Im(n,t,e){const r=rS(n,t,e);if(console.warn(r),nS.includes(n))throw new RangeError(r)}function rS(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const iS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sS=/^'([^]*?)'?$/,aS=/''/g,lS=/[a-zA-Z]/;function vs(n,t,e){const r=ia(),d=e?.locale??r.locale??YA,h=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,p=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,v=Gr(n,e?.in);if(!_m(v))throw new RangeError("Invalid time value");let s=t.match(oS).map(i=>{const a=i[0];if(a==="p"||a==="P"){const u=QA[a];return u(i,d.formatLong)}return i}).join("").match(iS).map(i=>{if(i==="''")return{isToken:!1,value:"'"};const a=i[0];if(a==="'")return{isToken:!1,value:cS(i)};if(Sm[a])return{isToken:!0,value:i};if(a.match(lS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return{isToken:!1,value:i}});d.localize.preprocessor&&(s=d.localize.preprocessor(v,s));const f={firstWeekContainsDate:h,weekStartsOn:p,locale:d};return s.map(i=>{if(!i.isToken)return i.value;const a=i.value;(!e?.useAdditionalWeekYearTokens&&Lm(a)||!e?.useAdditionalDayOfYearTokens&&Mm(a))&&Im(a,t,String(n));const u=Sm[a[0]];return u(v,a,d.localize,f)}).join("")}function cS(n){const t=n.match(sS);return t?t[1].replace(aS,"'"):n}var Go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Om={exports:{}},Nm;function uS(){return Nm||(Nm=1,(function(n,t){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var d=function(i,a,u){if(typeof i!="string"){d.original?d.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),d.modules[i]||(d.payloads[i]=u,d.modules[i]=null)};d.modules={},d.payloads={};var h=function(i,a,u){if(typeof a=="string"){var g=s(i,a);if(g!=null)return u&&u(),g}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],c=0,m=a.length;c<m;++c){var w=s(i,a[c]);if(w==null&&p.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},p=function(i,a){var u=h("",i,a);return u==null&&p.original?p.original.apply(this,arguments):u},v=function(i,a){if(a.indexOf("!")!==-1){var u=a.split("!");return v(i,u[0])+"!"+v(i,u[1])}if(a.charAt(0)=="."){var g=i.split("/").slice(0,-1).join("/");for(a=g+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},s=function(i,a){a=v(i,a);var u=d.modules[a];if(!u){if(u=d.payloads[a],typeof u=="function"){var g={},o={id:a,uri:"",exports:g,packaged:!0},c=function(w,x){return h(a,w,x)},m=u(c,g,o);g=m||o.exports,d.modules[a]=g,delete d.payloads[a]}u=d.modules[a]=g||u}return u};function f(i){var a=r;r[i]||(r[i]={}),a=r[i],(!a.define||!a.define.packaged)&&(d.original=a.define,a.define=d,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}f(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,d){function h(p,v,s){Object.defineProperty(p,v,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||h(String.prototype,"startsWith",function(p,v){return v=v||0,this.lastIndexOf(p,v)===v}),String.prototype.endsWith||h(String.prototype,"endsWith",function(p,v){var s=this;(v===void 0||v>s.length)&&(v=s.length),v-=p.length;var f=s.indexOf(p,v);return f!==-1&&f===v}),String.prototype.repeat||h(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||h(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 f=arguments[s];f!=null&&Object.keys(f).forEach(function(i){v[i]=f[i]})}return v}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(v){return p[v]})}),Array.prototype.find||h(Array.prototype,"find",function(p){for(var v=this.length,s=arguments[1],f=0;f<v;f++){var i=this[f];if(p.call(s,i,f,this))return i}}),Array.prototype.findIndex||h(Array.prototype,"findIndex",function(p){for(var v=this.length,s=arguments[1],f=0;f<v;f++){var i=this[f];if(p.call(s,i,f,this))return f}}),Array.prototype.includes||h(Array.prototype,"includes",function(p,v){return this.indexOf(p,v)!=-1}),Array.prototype.fill||h(Array.prototype,"fill",function(p){for(var v=this,s=v.length>>>0,f=arguments[1],i=f>>0,a=i<0?Math.max(s+i,0):Math.min(i,s),u=arguments[2],g=u===void 0?s:u>>0,o=g<0?Math.max(s+g,0):Math.min(g,s);a<o;)v[a]=p,a++;return v}),Array.of||h(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,d){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,d){r.deepCopy=function h(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]=h(p[s]);return v}if(Object.prototype.toString.call(p)!=="[object Object]")return p;v={};for(var s in p)v[s]=h(p[s]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,d){r.last=function(v){return v[v.length-1]},r.stringReverse=function(v){return v.split("").reverse().join("")},r.stringRepeat=function(v,s){for(var f="";s>0;)s&1&&(f+=v),(s>>=1)&&(v+=v);return f};var h=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(v){return v.replace(h,"")},r.stringTrimRight=function(v){return v.replace(p,"")},r.copyObject=function(v){var s={};for(var f in v)s[f]=v[f];return s},r.copyArray=function(v){for(var s=[],f=0,i=v.length;f<i;f++)v[f]&&typeof v[f]=="object"?s[f]=this.copyObject(v[f]):s[f]=v[f];return s},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(v){for(var s={},f=0;f<v.length;f++)s[v[f]]=1;return s},r.createMap=function(v){var s=Object.create(null);for(var f in v)s[f]=v[f];return s},r.arrayRemove=function(v,s){for(var f=0;f<=v.length;f++)s===v[f]&&v.splice(f,1)},r.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(v){return(""+v).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(v,s){var f=[];return v.replace(s,function(i){f.push({offset:arguments[arguments.length-2],length:i.length})}),f},r.deferredCall=function(v){var s=null,f=function(){s=null,v()},i=function(a){return i.cancel(),s=setTimeout(f,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),v(),i},i.cancel=function(){return clearTimeout(s),s=null,i},i.isPending=function(){return s},i},r.delayedCall=function(v,s){var f=null,i=function(){f=null,v()},a=function(u){f==null&&(f=setTimeout(i,u||s))};return a.delay=function(u){f&&clearTimeout(f),f=setTimeout(i,u||s)},a.schedule=a,a.call=function(){this.cancel(),v()},a.cancel=function(){f&&clearTimeout(f),f=null},a.isPending=function(){return f},a},r.sleep=function(v){return new Promise(function(s){setTimeout(s,v)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(v,s,f){return f&&v.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,d){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var h=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),v=h.userAgent||"",s=h.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.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]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=v.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(v.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,r.isAIR=v.indexOf("AdobeAIR")>=0,r.isAndroid=v.indexOf("Android")>=0,r.isChromeOS=v.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(v)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,d){var h=e("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function u(g,o,c){if(typeof g=="string"&&g){var m=document.createTextNode(g);return o&&o.appendChild(m),m}if(!Array.isArray(g))return g&&g.appendChild&&o&&o.appendChild(g),g;if(typeof g[0]!="string"||!g[0]){for(var w=[],x=0;x<g.length;x++){var R=u(g[x],o,c);R&&w.push(R)}return w}var $=document.createElement(g[0]),k=g[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<g.length;x++)u(g[x],$,c);return C==2&&Object.keys(k).forEach(function(O){var N=k[O];O==="class"?$.className=Array.isArray(N)?N.join(" "):N:typeof N=="function"||O=="value"||O[0]=="$"?$[O]=N:O==="ref"?c&&(c[N]=$):O==="style"?typeof N=="string"&&($.style.cssText=N):N!=null&&$.setAttribute(O,N)}),o&&o.appendChild($),$},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,g){return document.createElementNS?document.createElementNS(g||p,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,g){var o=g?g.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var g=u?u.ownerDocument:document;return g.createDocumentFragment()},r.hasCssClass=function(u,g){var o=(u.className+"").split(/\s+/g);return o.indexOf(g)!==-1},r.addCssClass=function(u,g){r.hasCssClass(u,g)||(u.className+=" "+g)},r.removeCssClass=function(u,g){for(var o=u.className.split(/\s+/g);;){var c=o.indexOf(g);if(c==-1)break;o.splice(c,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,g){for(var o=u.className.split(/\s+/g),c=!0;;){var m=o.indexOf(g);if(m==-1)break;c=!1,o.splice(m,1)}return c&&o.push(g),u.className=o.join(" "),c},r.setCssClass=function(u,g,o){o?r.addCssClass(u,g):r.removeCssClass(u,g)},r.hasCssString=function(u,g){var o=0,c;if(g=g||document,c=g.querySelectorAll("style")){for(;o<c.length;)if(c[o++].id===u)return!0}},r.removeElementById=function(u,g){g=g||document,g.getElementById(u)&&g.getElementById(u).remove()};var v,s=[];r.useStrictCSP=function(u){v=u,u==!1?f():s||(s=[])};function f(){var u=s;s=null,u&&u.forEach(function(g){i(g[0],g[1])})}function i(u,g,o){if(!(typeof document>"u")){if(s){if(o)f();else if(o===!1)return s.push([u,g])}if(!v){var c=o;!o||!o.getRootNode?c=document:(c=o.getRootNode(),(!c||c==o)&&(c=document));var m=c.ownerDocument||c;if(g&&r.hasCssString(g,c))return null;g&&(u+=`
11
- /*# sourceURL=ace/css/`+g+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(u)),g&&(w.id=g),c==m&&(c=r.getDocumentHead(m)),c.insertBefore(w,c.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(u,g){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(g))},r.$fixPositionBug=function(u){var g=u.getBoundingClientRect();if(u.style.left){var o=parseFloat(u.style.left),c=+g.left;Math.abs(o-c)>1&&(u.style.left=2*o-c+"px")}if(u.style.right){var o=parseFloat(u.style.right),c=window.innerWidth-g.right;Math.abs(o-c)>1&&(u.style.right=2*o-c+"px")}if(u.style.top){var o=parseFloat(u.style.top),c=+g.top;Math.abs(o-c)>1&&(u.style.top=2*o-c+"px")}if(u.style.bottom){var o=parseFloat(u.style.bottom),c=window.innerHeight-g.bottom;Math.abs(o-c)>1&&(u.style.bottom=2*o-c+"px")}},r.scrollbarWidth=function(u){var g=r.createElement("ace_inner");g.style.width="100%",g.style.minWidth="0px",g.style.height="200px",g.style.display="block";var o=r.createElement("ace_outer"),c=o.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",o.appendChild(g);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=g.offsetWidth;c.overflow="scroll";var x=g.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(u,g){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,g,o){u[g]!==o&&(u[g]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=h.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,h.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!h.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,g,o){u.style.transform="translate("+Math.round(g)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,g,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(g)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("./dom");r.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)},r.loadScript=function(p,v){var s=h.getDocumentHead(),f=document.createElement("script");f.src=p,s.appendChild(f),f.onload=f.onreadystatechange=function(i,a){(a||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,a||v())}},r.qualifyURL=function(p){var v=document.createElement("a");return v.href=p,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,d){r.inherits=function(h,p){h.super_=p,h.prototype=Object.create(p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(h,p){for(var v in p)h[v]=p[v];return h},r.implement=function(h,p){r.mixin(h,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,d){var h={},p=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};h._emit=h._dispatchEvent=function(s,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[s]||[],a=this._defaultHandlers[s];if(!(!i.length&&!a)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=s),f.stopPropagation||(f.stopPropagation=p),f.preventDefault||(f.preventDefault=v),i=i.slice();for(var u=0;u<i.length&&(i[u](f,this),!f.propagationStopped);u++);if(a&&!f.defaultPrevented)return a(f,this)}},h._signal=function(s,f){var i=(this._eventRegistry||{})[s];if(i){i=i.slice();for(var a=0;a<i.length;a++)i[a](f,this)}},h.once=function(s,f){var i=this;if(this.on(s,function a(){i.off(s,a),f.apply(null,arguments)}),!f)return new Promise(function(a){f=a})},h.setDefaultHandler=function(s,f){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[s]){var a=i[s],u=i._disabled_[s];u||(i._disabled_[s]=u=[]),u.push(a);var g=u.indexOf(f);g!=-1&&u.splice(g,1)}i[s]=f},h.removeDefaultHandler=function(s,f){var i=this._defaultHandlers;if(i){var a=i._disabled_[s];if(i[s]==f)a&&this.setDefaultHandler(s,a.pop());else if(a){var u=a.indexOf(f);u!=-1&&a.splice(u,1)}}},h.on=h.addEventListener=function(s,f,i){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[s];return a||(a=this._eventRegistry[s]=[]),a.indexOf(f)==-1&&a[i?"unshift":"push"](f),f},h.off=h.removeListener=h.removeEventListener=function(s,f){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[s];if(i){var a=i.indexOf(f);a!==-1&&i.splice(a,1)}},h.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},r.EventEmitter=h}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,d){r.reportError=function(h,p){var v=new Error(h);v.data=p,typeof console=="object"&&console.error&&console.error(v),setTimeout(function(){throw v})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,d){var h={"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"};r.defaultEnglishMessages=h}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,r,d){"no use strict";var h=e("./oop"),p=e("./event_emitter").EventEmitter,v=e("./report_error").reportError,s=e("./default_english_messages").defaultEnglishMessages,f={setOptions:function(o){Object.keys(o).forEach(function(c){this.setOption(c,o[c])},this)},getOptions:function(o){var c={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){c[w]=this.getOption(w)},this),c},setOption:function(o,c){if(this["$"+o]!==c){var m=this.$options[o];if(!m)return i('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,c);m.handlesSet||(this["$"+o]=c),m&&m.set&&m.set.call(this,c)}},getOption:function(o){var c=this.$options[o];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(o):c&&c.get?c.get.call(this):this["$"+o]:i('misspelled option "'+o+'"')}};function i(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,g=(function(){function o(){this.$defaultOptions={},a=s,u="dollarSigns"}return o.prototype.defineOptions=function(c,m,w){return c.$options||(this.$defaultOptions[m]=c.$options={}),Object.keys(w).forEach(function(x){var R=w[x];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=x),c.$options[R.name]=R,"initialValue"in R&&(c["$"+R.name]=R.initialValue)}),h.implement(c,f),this},o.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(m){var w=c.$options[m];"value"in w&&c.setOption(m,w.value)})},o.prototype.setDefaultValue=function(c,m,w){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][m])break;if(!this.$defaultOptions[c][m])return!1}var x=this.$defaultOptions[c]||(this.$defaultOptions[c]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},o.prototype.setDefaultValues=function(c,m){Object.keys(m).forEach(function(w){this.setDefaultValue(c,w,m[w])},this)},o.prototype.setMessages=function(c,m){a=c,m&&m.placeholders&&(u=m.placeholders)},o.prototype.nls=function(c,m,w){a[c]||(i("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||i("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=a[c]||a[m]||m;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(R,$){return $=="$"?"$":w[$]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(R,$){return w[$]}))),x},o})();g.prototype.warn=i,g.prototype.reportError=v,h.implement(g.prototype,p),r.AppConfig=g}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,d){d.exports=`.ace-tm .ace_gutter {
12
- background: #f0f0f0;
13
- color: #333;
14
- }
15
-
16
- .ace-tm .ace_print-margin {
17
- width: 1px;
18
- background: #e8e8e8;
19
- }
20
-
21
- .ace-tm .ace_fold {
22
- background-color: #6B72E6;
23
- }
24
-
25
- .ace-tm {
26
- background-color: #FFFFFF;
27
- color: black;
28
- }
29
-
30
- .ace-tm .ace_cursor {
31
- color: black;
32
- }
33
-
34
- .ace-tm .ace_invisible {
35
- color: rgb(191, 191, 191);
36
- }
37
-
38
- .ace-tm .ace_storage,
39
- .ace-tm .ace_keyword {
40
- color: blue;
41
- }
42
-
43
- .ace-tm .ace_constant {
44
- color: rgb(197, 6, 11);
45
- }
46
-
47
- .ace-tm .ace_constant.ace_buildin {
48
- color: rgb(88, 72, 246);
49
- }
50
-
51
- .ace-tm .ace_constant.ace_language {
52
- color: rgb(88, 92, 246);
53
- }
54
-
55
- .ace-tm .ace_constant.ace_library {
56
- color: rgb(6, 150, 14);
57
- }
58
-
59
- .ace-tm .ace_invalid {
60
- background-color: rgba(255, 0, 0, 0.1);
61
- color: red;
62
- }
63
-
64
- .ace-tm .ace_support.ace_function {
65
- color: rgb(60, 76, 114);
66
- }
67
-
68
- .ace-tm .ace_support.ace_constant {
69
- color: rgb(6, 150, 14);
70
- }
71
-
72
- .ace-tm .ace_support.ace_type,
73
- .ace-tm .ace_support.ace_class {
74
- color: rgb(109, 121, 222);
75
- }
76
-
77
- .ace-tm .ace_keyword.ace_operator {
78
- color: rgb(104, 118, 135);
79
- }
80
-
81
- .ace-tm .ace_string {
82
- color: rgb(3, 106, 7);
83
- }
84
-
85
- .ace-tm .ace_comment {
86
- color: rgb(76, 136, 107);
87
- }
88
-
89
- .ace-tm .ace_comment.ace_doc {
90
- color: rgb(0, 102, 255);
91
- }
92
-
93
- .ace-tm .ace_comment.ace_doc.ace_tag {
94
- color: rgb(128, 159, 191);
95
- }
96
-
97
- .ace-tm .ace_constant.ace_numeric {
98
- color: rgb(0, 0, 205);
99
- }
100
-
101
- .ace-tm .ace_variable {
102
- color: rgb(49, 132, 149);
103
- }
104
-
105
- .ace-tm .ace_xml-pe {
106
- color: rgb(104, 104, 91);
107
- }
108
-
109
- .ace-tm .ace_entity.ace_name.ace_function {
110
- color: #0000A2;
111
- }
112
-
113
-
114
- .ace-tm .ace_heading {
115
- color: rgb(12, 7, 255);
116
- }
117
-
118
- .ace-tm .ace_list {
119
- color:rgb(185, 6, 144);
120
- }
121
-
122
- .ace-tm .ace_meta.ace_tag {
123
- color:rgb(0, 22, 142);
124
- }
125
-
126
- .ace-tm .ace_string.ace_regex {
127
- color: rgb(255, 0, 0)
128
- }
129
-
130
- .ace-tm .ace_marker-layer .ace_selection {
131
- background: rgb(181, 213, 255);
132
- }
133
- .ace-tm.ace_multiselect .ace_selection.ace_start {
134
- box-shadow: 0 0 3px 0px white;
135
- }
136
- .ace-tm .ace_marker-layer .ace_step {
137
- background: rgb(252, 255, 0);
138
- }
139
-
140
- .ace-tm .ace_marker-layer .ace_stack {
141
- background: rgb(164, 229, 101);
142
- }
143
-
144
- .ace-tm .ace_marker-layer .ace_bracket {
145
- margin: -1px 0 0 -1px;
146
- border: 1px solid rgb(192, 192, 192);
147
- }
148
-
149
- .ace-tm .ace_marker-layer .ace_active-line {
150
- background: rgba(0, 0, 0, 0.07);
151
- }
152
-
153
- .ace-tm .ace_gutter-active-line {
154
- background-color : #dcdcdc;
155
- }
156
-
157
- .ace-tm .ace_marker-layer .ace_selected-word {
158
- background: rgb(250, 250, 255);
159
- border: 1px solid rgb(200, 200, 250);
160
- }
161
-
162
- .ace-tm .ace_indent-guide {
163
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
- }
165
-
166
- .ace-tm .ace_indent-guide-active {
167
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
- }
169
- `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,d){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var h=e("../lib/dom");h.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,r,d){"no use strict";var h=e("./lib/lang"),p=e("./lib/net"),v=e("./lib/dom"),s=e("./lib/app_config").AppConfig;d.exports=r=new s;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(g){if(!f.hasOwnProperty(g))throw new Error("Unknown config key: "+g);return f[g]},r.set=function(g,o){if(f.hasOwnProperty(g))f[g]=o;else if(this.setDefaultValue("",g,o)==!1)throw new Error("Unknown config key: "+g);g=="useStrictCSP"&&v.useStrictCSP(o)},r.all=function(){return h.copyObject(f)},r.$modes={},r.moduleUrl=function(g,o){if(f.$moduleUrls[g])return f.$moduleUrls[g];var c=g.split("/");o=o||c[c.length-2]||"";var m=o=="snippets"?"/":"-",w=c[c.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&c.length>1&&(w=c[c.length-2]);var R=f[o+"Path"];return R==null?R=f.basePath:m=="/"&&(o=m=""),R&&R.slice(-1)!="/"&&(R+="/"),R+o+m+w+this.get("suffix")},r.setModuleUrl=function(g,o){return f.$moduleUrls[g]=o};var i=function(g,o){if(g==="ace/theme/textmate"||g==="./theme/textmate")return o(null,e("./theme/textmate"));if(a)return a(g,o);console.error("loader is not configured")},a;r.setLoader=function(g){a=g},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(g,o){var c;if(Array.isArray(g))var m=g[0],w=g[1];else if(typeof g=="string")var w=g;var x=function(R){if(R&&!r.$loading[w])return o&&o(R);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var $=function(){i(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var O=r.$loading[w];r.$loading[w]=null,O.forEach(function(N){N&&N(C)})})};if(!r.get("packaged"))return $();p.loadScript(r.moduleUrl(w,m),$),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(R){R.default?x(R.default):x(R)});else{try{c=this.$require(w)}catch{}x(c||r.$loaded[w])}},r.$require=function(g){if(typeof d.require=="function"){var o="require";return d[o](g)}},r.setModuleLoader=function(g,o){r.dynamicModules[g]=o};var u=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,d){e("./lib/fixoldbrowsers");var h=e("./config");h.setLoader(function(f,i){e([f],function(a){i(null,a)})});var p=(function(){return this||typeof window<"u"&&window})();d.exports=function(f){h.init=v,h.$require=e,f.require=e},v(!0);function v(f){if(!(!p||!p.document)){h.set("packaged",f||e.packaged||d.packaged||p.define&&(void 0).packaged);var i={},a="",u=document.currentScript||document._currentScript,g=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=g.getElementsByTagName("script"),c=0;c<o.length;c++){var m=o[c],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,R=0,$=x.length;R<$;R++){var k=x[R];k.name.indexOf("data-ace-")===0&&(i[s(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(i.base=i.base||a,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var O in i)typeof i[O]<"u"&&h.set(O,i[O])}}function s(f){return f.replace(/-(.)/g,function(i,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,d){var h=(function(){function p(v,s,f,i){this.start={row:v,column:s},this.end={row:f,column:i}}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,f=v.end,i=v.start;return s=this.compare(f.row,f.column),s==1?(s=this.compare(i.row,i.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(i.row,i.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 f={row:s+1,column:0};else if(this.end.row<v)var f={row:v,column:0};if(this.start.row>s)var i={row:s+1,column:0};else if(this.start.row<v)var i={row:v,column:0};return p.fromPoints(i||this.start,f||this.end)},p.prototype.extend=function(v,s){var f=this.compare(v,s);if(f==0)return this;if(f==-1)var i={row:v,column:s};else var a={row:v,column:s};return p.fromPoints(i||this.start,a||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),f=v.documentToScreenPosition(this.end);return new p(s.row,s.column,f.row,f.column)},p.prototype.moveBy=function(v,s){this.start.row+=v,this.start.column+=s,this.end.row+=v,this.end.column+=s},p})();h.fromPoints=function(p,v){return new h(p.row,p.column,v.row,v.column)},h.comparePoints=function(p,v){return p.row-v.row||p.column-v.column},r.Range=h}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,d){for(var h=e("./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 f=String.fromCharCode(s+32);v["Key"+f.toUpperCase()]=s,p.PRINTABLE_KEYS[s]=f}for(var s=1;s<13;s++)v["F"+s]=111+s,p.FUNCTION_KEYS[111+s]="F"+s;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var a in i)v[a]=v[a+"Left"]=v[a+"Right"]=i[a];r.$codeToKeyCode=v,p.PRINTABLE_KEYS[173]="-";for(var u in p.FUNCTION_KEYS){var g=p.FUNCTION_KEYS[u].toLowerCase();p[g]=parseInt(u,10)}for(var u in p.PRINTABLE_KEYS){var g=p.PRINTABLE_KEYS[u].toLowerCase();p[g]=parseInt(u,10)}h.mixin(p,p.MODIFIER_KEYS),h.mixin(p,p.PRINTABLE_KEYS),h.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],c=Math.pow(2,o.length);c--;)p.KEY_MODS[c]=o.filter(function(m){return c&p.KEY_MODS[m]}).join("-")+"-"})(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",h.mixin(r,p),r.default=r,r.keyCodeToString=function(o){var c=p[o];return typeof c!="string"&&(c=String.fromCharCode(o)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,d){var h=e("./keys"),p=e("./useragent"),v=null,s=0,f;function i(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function a(){return f==null&&i(),f}function u(R,$,k){this.elem=R,this.type=$,this.callback=k}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var g=r.addListener=function(R,$,k,C){R.addEventListener($,k,a()),C&&C.$toDestroy.push(new u(R,$,k))},o=r.removeListener=function(R,$,k){R.removeEventListener($,k,a())};r.stopEvent=function(R){return r.stopPropagation(R),r.preventDefault(R),!1},r.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},r.preventDefault=function(R){R.preventDefault&&R.preventDefault()},r.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||p.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,$,k){var C=R&&R.ownerDocument||document;function O(N){$&&$(N),k&&k(N),o(C,"mousemove",$),o(C,"mouseup",O),o(C,"dragstart",O)}return g(C,"mousemove",$),g(C,"mouseup",O),g(C,"dragstart",O),O},r.addMouseWheelListener=function(R,$,k){g(R,"wheel",function(C){var O=.15,N=C.deltaX||0,I=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=N*O,C.wheelY=I*O;break;case C.DOM_DELTA_LINE:var M=15;C.wheelX=N*M,C.wheelY=I*M;break;case C.DOM_DELTA_PAGE:var W=150;C.wheelX=N*W,C.wheelY=I*W;break}$(C)},k)},r.addMultiMouseDownListener=function(R,$,k,C,O){var N=0,I,M,W,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function D(A){if(r.getButton(A)!==0?N=0:A.detail>1?(N++,N>4&&(N=1)):N=1,p.isIE){var _=Math.abs(A.clientX-I)>5||Math.abs(A.clientY-M)>5;(!W||_)&&(N=1),W&&clearTimeout(W),W=setTimeout(function(){W=null},$[N-1]||600),N==1&&(I=A.clientX,M=A.clientY)}if(A._clicks=N,k[C]("mousedown",A),N>4)N=0;else if(N>1)return k[C](F[N],A)}Array.isArray(R)||(R=[R]),R.forEach(function(A){g(A,"mousedown",D,O)})};function c(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return h.KEY_MODS[c(R)]};function m(R,$,k){var C=c($);if(!k&&$.code&&(k=h.$codeToKeyCode[$.code]||k),!p.isMac&&v){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),v.altGr)if((3&C)!=3)v.altGr=0;else return;if(k===18||k===17){var O=$.location;if(k===17&&O===1)v[k]==1&&(s=$.timeStamp);else if(k===18&&C===3&&O===2){var N=$.timeStamp-s;N<50&&(v.altGr=!0)}}}if(k in h.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&$.location===3&&(R($,C,-k),$.defaultPrevented))){if(p.isChromeOS&&C&8){if(R($,C,k),$.defaultPrevented)return;C&=-9}return!C&&!(k in h.FUNCTION_KEYS)&&!(k in h.PRINTABLE_KEYS)?!1:R($,C,k)}}r.addCommandKeyListener=function(R,$,k){var C=null;g(R,"keydown",function(O){v[O.keyCode]=(v[O.keyCode]||0)+1;var N=m($,O,O.keyCode);return C=O.defaultPrevented,N},k),g(R,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(r.stopEvent(O),C=null)},k),g(R,"keyup",function(O){v[O.keyCode]=null},k),v||(w(),g(window,"focus",w))};function w(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var x=1;r.nextTick=function(R,$){$=$||window;var k="zero-timeout-message-"+x++,C=function(O){O.data==k&&(r.stopPropagation(O),o($,"message",C),R())};g($,"message",C),$.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,$){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):R()},$)},r.$idleBlockId=null,r.blockIdle=function(R){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},R||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,d){var h;d.exports={lineMode:!1,pasteCancelled:function(){return h&&h>Date.now()-50?!0:h=!1},cancel:function(){h=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,d){var h=e("../lib/event"),p=e("../config").nls,v=e("../lib/useragent"),s=e("../lib/dom"),f=e("../lib/lang"),i=e("../clipboard"),a=v.isChrome<18,u=v.isIE,g=v.isChrome>63,o=400,c=e("../lib/keys"),m=c.KEY_MODS,w=v.isIOS,x=w?/\s/:/\n/,R=v.isMobile,$=(function(){function k(C,O){var N=this;this.host=O,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",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",R||(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"}),h.addListener(this.text,"blur",function(I){N.ignoreFocusEvents||(O.onBlur(I),N.$isFocused=!1)},O),h.addListener(this.text,"focus",function(I){if(!N.ignoreFocusEvents){if(N.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(I),v.isEdge?setTimeout(N.resetSelection.bind(N)):N.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var I=O.curOp,M=I&&I.command&&I.command.name;if(M!="insertstring"){var W=M&&(I.docChanged||I.selectionChanged);N.inComposition&&W&&(N.lastValue=N.text.value="",N.onCompositionEnd()),N.resetSelection()}}),O.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&O.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,h.addCommandKeyListener(this.text,function(I,M,W){if(!N.inComposition)return O.onCommandKey(I,M,W)},O),h.addListener(this.text,"select",this.onSelect.bind(this),O),h.addListener(this.text,"input",this.onInput.bind(this),O),h.addListener(this.text,"cut",this.onCut.bind(this),O),h.addListener(this.text,"copy",this.onCopy.bind(this),O),h.addListener(this.text,"paste",this.onPaste.bind(this),O),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&h.addListener(C,"keydown",function(I){if(!(v.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:N.onCopy(I);break;case 86:N.onPaste(I);break;case 88:N.onCut(I);break}},O),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),h.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),O),h.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),O),h.addListener(this.text,"keyup",this.onKeyup.bind(this),O),h.addListener(this.text,"keydown",this.syncComposition.bind(this),O),h.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),O),this.closeTimeout,h.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),O),h.addListener(this.text,"mousedown",function(I){I.preventDefault(),N.onContextMenuClose()},O),h.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),h.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),w&&this.addIosSelectionHandler(C,O,this.text)}return k.prototype.addIosSelectionHandler=function(C,O,N){var I=this,M=null,W=!1;N.addEventListener("keydown",function(D){M&&clearTimeout(M),W=!0},!0),N.addEventListener("keyup",function(D){M=setTimeout(function(){W=!1},100)},!0);var F=function(D){if(document.activeElement===N&&!(W||I.inComposition||O.$mouseHandler.isMousePressed)&&!I.copied){var A=N.selectionStart,_=N.selectionEnd,L=null,B=0;if(A==0?L=c.up:A==1?L=c.home:_>I.lastSelectionEnd&&I.lastValue[_]==`
170
- `?L=c.end:A<I.lastSelectionStart&&I.lastValue[A-1]==" "?(L=c.left,B=m.option):A<I.lastSelectionStart||A==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&A==_?L=c.left:_>I.lastSelectionEnd&&I.lastValue.slice(0,_).split(`
171
- `).length>2?L=c.down:_>I.lastSelectionEnd&&I.lastValue[_-1]==" "?(L=c.right,B=m.option):(_>I.lastSelectionEnd||_==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&A==_)&&(L=c.right),A!==_&&(B|=m.shift),L){var U=O.onCommandKey({},B,L);if(!U&&O.commands){L=c.keyCodeToString(L);var V=O.commands.findKeyCommand(B,L);V&&O.execCommand(V)}I.lastSelectionStart=A,I.lastSelectionEnd=_,I.resetSelection("")}}};document.addEventListener("selectionchange",F),O.on("destroy",function(){document.removeEventListener("selectionchange",F)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var O=this.host.getSelectionRange();O.end.row=O.start.row,O.end.column=O.start.column,this.inComposition.markerRange=O,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var O=this.handleClipboardData(C);i.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),v.isIE&&setTimeout(this.resetSelection),h.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,O){var N=this,I=this.host.getCopyText();if(!I)return h.preventDefault(C);this.handleClipboardData(C,I)?(w&&(this.resetSelection(I),this.copied=I,setTimeout(function(){N.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),h.preventDefault(C)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){N.copied=!1,N.resetSelection(),O?N.host.onCut():N.host.onCopy()}))},k.prototype.handleClipboardData=function(C,O,N){var I=C.clipboardData||window.clipboardData;if(!(!I||a)){var M=u||N?"Text":"text/plain";try{return O?I.setData(M,O)!==!1:I.getData(M)}catch(W){if(!N)return this.handleClipboardData(W,O,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var O=this.text.value,N=this.sendText(O,!0);(O.length>o+100||x.test(N)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(C,O){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var N=this.text.selectionStart,I=this.text.selectionEnd,M=this.lastSelectionStart,W=this.lastValue.length-this.lastSelectionEnd,F=C,D=C.length-N,A=C.length-I,_=0;M>0&&this.lastValue[_]==C[_];)_++,M--;for(F=F.slice(_),_=1;W>0&&this.lastValue.length-_>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-_]==C[C.length-_];)_++,W--;D-=_-1,A-=_-1;var L=F.length-_+1;if(L<0&&(M=-L,L=0),F=F.slice(0,L),!O&&!F&&!D&&!M&&!W&&!A)return"";this.sendingText=!0;var B=!1;return v.isAndroid&&F==". "&&(F=" ",B=!0),F&&!M&&!W&&!D&&!A||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:M,extendRight:W,restoreStart:D,restoreEnd:A}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=N,this.lastSelectionEnd=I,this.lastRestoreEnd=A,B?`
172
- `:F},k.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var N=function(I){return I.selectionStart===0&&I.selectionEnd>=O.lastValue.length&&I.value===O.lastValue&&O.lastValue&&I.selectionEnd!==O.lastSelectionEnd};this.copied?this.copied=!1:N(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var O=`
173
- ab`+C+`cde fg
174
- `;O!=this.text.value&&(this.text.value=this.lastValue=O);var N=4,I=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=N||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(N,I),this.lastSelectionStart=N,this.lastSelectionEnd=I}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,N=0,I="",M=function(V,K){for(var ee=K,ae=1;ae<=V-C.rowStart&&ae<2*C.numberOfExtraLines+1;ae++)ee+=C.host.session.getLine(V-ae).length+1;return ee};if(this.host.session){var W=this.host.selection,F=W.getRange(),D=W.cursor.row;D===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):D===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(D<this.rowStart-1||D>this.rowEnd+1)&&(this.rowStart=D>this.numberOfExtraLines?D-this.numberOfExtraLines:0,this.rowEnd=D>this.numberOfExtraLines?D+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var A=[],_=this.rowStart;_<=this.rowEnd;_++)A.push(this.host.session.getLine(_));if(I=A.join(`
175
- `),O=M(F.start.row,F.start.column),N=M(F.end.row,F.end.column),F.start.row<this.rowStart){var L=this.host.session.getLine(this.rowStart-1);O=F.start.row<this.rowStart-1?0:O,N+=L.length+1,I=L+`
176
- `+I}else if(F.end.row>this.rowEnd){var B=this.host.session.getLine(this.rowEnd+1);N=F.end.row>this.rowEnd+1?B.length:F.end.column,N+=I.length+1,I=I+`
177
- `+B}else R&&D>0&&(I=`
178
- `+I,N+=1,O+=1);I.length>o&&(O<o&&N<o?I=I.slice(0,o):(I=`
179
- `,O==N?O=N=0:(O=0,N=1)));var U=I+`
180
-
181
- `;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=N||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,N),this.lastSelectionStart=O,this.lastSelectionEnd=N}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var O=this.host.session.selection.cursor.row;C+=p("text-input.aria-label","Cursor at row $0",[O+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||g||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var O=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var N=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(N)for(var M=this.text.parentElement;M&&M.nodeType==1;)I.push(M),M.setAttribute("ace_nocontext","true"),!M.parentElement&&M.getRootNode?M=M.getRootNode().host:M=M.parentElement;this.text.focus({preventScroll:!0}),N&&I.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,O){var N=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),M=s.computedStyle(this.host.container),W=I.top+(parseInt(M.borderTopWidth)||0),F=I.left+(parseInt(M.borderLeftWidth)||0),D=I.bottom-W-this.text.clientHeight-2,A=function(_){s.translate(N.text,_.clientX-F-2,Math.min(_.clientY-W-2,D))};A(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&h.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();r.TextInput=$,r.$setUserAgentForTests=function(k,C){R=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,d){var h=e("../lib/useragent"),p=0,v=550,s=(function(){function a(u){u.$clickSelection=null;var g=u.editor;g.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),g.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),g.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),g.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),g.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var g=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,m=u.getButton();if(m!==0){var w=c.getSelectionRange(),x=w.isEmpty();(x||m==1)&&c.selection.moveToPosition(o),m==2&&(c.textInput.onContextMenu(u.domEvent),h.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),g&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,g){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):g||o.selection.moveToPosition(u),g||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,g=this.editor,o=g.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(o);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var m=i(this.$clickSelection,o,g.session);o=m.cursor,u=m.anchor}g.selection.setSelectionAnchor(u.row,u.column)}g.selection.selectToPosition(o),g.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var g,o=this.editor,c=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)g=this.$clickSelection.end,(m.end.row!=c.row||m.end.column!=c.column)&&(c=m.start);else if(x==1&&w>=0)g=this.$clickSelection.start,(m.start.row!=c.row||m.start.column!=c.column)&&(c=m.end);else if(w==-1&&x==1)c=m.end,g=m.start;else{var R=i(this.$clickSelection,c,o.session);c=R.cursor,g=R.anchor}o.selection.setSelectionAnchor(g.row,g.column)}o.selection.selectToPosition(c),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),g=Date.now();(u>p||g-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var g=u.getDocumentPosition(),o=this.editor,c=o.session,m=c.getBracketRange(g);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(g.row,g.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(u){var g=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var c=o.getSelectionRange();c.isMultiLine()&&c.contains(g.row,g.column)?(this.$clickSelection=o.selection.getLineRange(c.start.row),this.$clickSelection.end=o.selection.getLineRange(c.end.row).end):this.$clickSelection=o.selection.getLineRange(g.row),this.select()},a.prototype.onQuadClick=function(u){var g=this.editor;g.selectAll(),this.$clickSelection=g.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var g=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,c=u.domEvent.timeStamp,m=c-o.t,w=m?u.wheelX/m:o.vx,x=m?u.wheelY/m:o.vy;m<v&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var R=Math.abs(w/x),$=!1;if(R>=1&&g.renderer.isScrollableBy(u.wheelX*u.speed,0)&&($=!0),R<=1&&g.renderer.isScrollableBy(0,u.wheelY*u.speed)&&($=!0),$)o.allowed=c;else if(c-o.allowed<v){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);k?($=!0,o.allowed=c):o.allowed=0}if(o.t=c,o.vx=w,o.vy=x,$)return g.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,r.DefaultHandlers=s;function f(a,u,g,o){return Math.sqrt(Math.pow(g-a,2)+Math.pow(o-u,2))}function i(a,u,g){if(a.start.row==a.end.row)var o=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var o=3*u.column-2*g.getLine(a.start.row).length;else var o=2*u.row-a.start.row-a.end.row;return o<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,d){var h=e("../lib/event"),p=e("../lib/useragent"),v=(function(){function s(f,i){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=i,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return s.prototype.stopPropagation=function(){h.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){h.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 f=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(f,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-a},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,i=f.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=i.contains(a.row,a.column)}return this.$inSelection},s.prototype.getButton=function(){return h.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})();r.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,d){r.preventParentScroll=function(h){h.stopPropagation();var p=h.currentTarget,v=p.scrollHeight>p.clientHeight;v||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,d){var h=this&&this.__extends||(function(){var c=function(m,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var $ in R)Object.prototype.hasOwnProperty.call(R,$)&&(x[$]=R[$])},c(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),p=this&&this.__values||function(c){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&c[m],x=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/dom");e("./lib/event");var s=e("./range").Range,f=e("./lib/scroll").preventParentScroll,i="ace_tooltip",a=(function(){function c(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return c.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(m){this.getElement().textContent=m},c.prototype.setHtml=function(m){this.getElement().innerHTML=m},c.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},c.prototype.setClassName=function(m){v.addCssClass(this.getElement(),m)},c.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&v.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&v.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},c.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c})(),u=(function(){function c(){this.popups=[]}return c.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},c.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var m,w,x,R;this.popups.sort(function(F,D){return D.priority-F.priority});var $=[];try{for(var k=p(this.popups),C=k.next();!C.done;C=k.next()){var O=C.value,N=!0;try{for(var I=(x=void 0,p($)),M=I.next();!M.done;M=I.next()){var W=M.value;if(this.doPopupsOverlap(W,O)){N=!1;break}}}catch(F){x={error:F}}finally{try{M&&!M.done&&(R=I.return)&&R.call(I)}finally{if(x)throw x.error}}N?$.push(O):O.hide()}}catch(F){m={error:F}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},c.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),R=w.getElement().getBoundingClientRect();return x.left<R.right&&x.right>R.left&&x.top<R.bottom&&x.bottom>R.top},c})(),g=new u;r.popupManager=g,r.Tooltip=a;var o=(function(c){h(m,c);function m(w){w===void 0&&(w=document.body);var x=c.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var R=x.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",x.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(x)),R.addEventListener("wheel",f),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var R=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,R=w.getDocumentPosition(),$=x.session.getLine(R.row);if(R.column==$.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(R.row,R.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,R,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=w.renderer;this.isOpen||(g.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=s.fromPoints(x.start,x.end);var C=k.textToScreenCoordinates(x.start.row,x.start.column),O=k.scroller.getBoundingClientRect();C.pageX<O.left&&(C.pageX=O.left);var N=this.getElement();N.innerHTML="",N.appendChild(R),N.style.maxHeight="",N.style.display="block",this.$setPosition(w,C,!0,x),v.$fixPositionBug(N)}},m.prototype.$setPosition=function(w,x,R,$){var k=10;R&&this.addMarker($,w.session);var C=w.renderer,O=this.getElement(),N=O.offsetHeight,I=O.offsetWidth,M=x.pageY,W=x.pageX,F=window.innerHeight-M-C.lineHeight,D=this.$shouldPlaceAbove(N,M,F-k);O.style.maxHeight=(D?M:F)-k+"px",O.style.top=D?"":M+C.lineHeight+"px",O.style.bottom=D?window.innerHeight-M+"px":"",O.style.left=Math.min(W,window.innerWidth-I-k)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,R){return!(x-w<0&&x<R)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.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,g.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m})(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,d){var h=this&&this.__extends||(function(){var o=function(c,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(c,m);function w(){this.constructor=c}c.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),p=this&&this.__values||function(o){var c=typeof Symbol=="function"&&Symbol.iterator,m=c&&o[c],w=0;if(m)return m.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&w>=o.length&&(o=void 0),{value:o&&o[w++],done:!o}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("../lib/dom"),s=e("./mouse_event").MouseEvent,f=e("../tooltip").HoverTooltip,i=e("../config").nls,a=e("../range").Range;function u(o){var c=o.editor,m=c.renderer.$gutterLayer;o.$tooltip=new g(c),o.$tooltip.addToEditor(c),o.$tooltip.setDataProvider(function(w,x){var R=w.getDocumentPosition().row;o.$tooltip.showTooltip(R)}),o.editor.setDefaultHandler("guttermousedown",function(w){if(!(!c.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var R=w.getDocumentPosition().row,$=c.session.selection;if(w.getShiftKey())$.selectTo(R,0);else{if(w.domEvent.detail==2)return c.selectAll(),w.preventDefault();o.$clickSelection=c.selection.getLineRange(R)}return o.setState("selectByLines"),o.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=u;var g=(function(o){h(c,o);function c(m){var w=o.call(this,m.container)||this;w.id="gt"+ ++c.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return c.prototype.onDomMouseMove=function(m){var w=new s(m,this.editor);this.onMouseMove(w,this.editor)},c.prototype.onDomMouseOut=function(m){var w=new s(m,this.editor);this.onMouseOut(w)},c.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,m)},c.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,m)},c.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(c,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),c.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,R=x.$annotations[m],$;R?$={displayText:Array.from(R.displayText),type:Array.from(R.type)}:$={displayText:[],type:[]};var k=x.session.getFoldLine(m);if(k&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},N,I=m+1;I<=k.end.row;I++)if(x.$annotations[I])for(var M=0;M<x.$annotations[I].text.length;M++){var W=x.$annotations[I].type[M];C[W].push(x.$annotations[I].text[M]),(!N||O[W]<O[N])&&(N=W)}if(["error","security","warning"].includes(N)){var F="".concat(c.annotationsToSummaryString(C)," in folded code.");$.displayText.push(F),$.type.push(N+"_fold")}}if($.displayText.length===0)return this.hide();for(var D={error:[],security:[],warning:[],info:[],hint:[]},A=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<$.displayText.length;I++){var _=v.createElement("span"),L=v.createElement("span");(w=L.classList).add.apply(w,["ace_".concat($.type[I]),A]),L.setAttribute("aria-label","".concat(c.annotationLabels[$.type[I].replace("_fold","")].singular)),L.setAttribute("role","img"),L.appendChild(v.createTextNode(" ")),_.appendChild(L),_.appendChild(v.createTextNode($.displayText[I])),_.appendChild(v.createElement("br")),D[$.type[I].replace("_fold","")].push(_)}var B=v.createElement("span");D.error.forEach(function(K){return B.appendChild(K)}),D.security.forEach(function(K){return B.appendChild(K)}),D.warning.forEach(function(K){return B.appendChild(K)}),D.info.forEach(function(K){return B.appendChild(K)}),D.hint.forEach(function(K){return B.appendChild(K)}),B.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var V=a.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,V,B),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},c.prototype.$setPosition=function(m,w,x,R){var $=this.$findCellByRow(R.start.row);if($){var k=$&&$.element,C=k&&k.querySelector(".ace_gutter_annotation");if(C){var O=C.getBoundingClientRect();if(O){var N={pageX:O.right,pageY:O.top};return o.prototype.$setPosition.call(this,m,N,!1,R)}}}},c.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},c.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},c.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},c.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,m)}},c.annotationsToSummaryString=function(m){var w,x,R=[],$=["error","security","warning","info","hint"];try{for(var k=p($),C=k.next();!C.done;C=k.next()){var O=C.value;if(m[O].length){var N=m[O].length===1?c.annotationLabels[O].singular:c.annotationLabels[O].plural;R.push("".concat(m[O].length," ").concat(N))}}}catch(I){w={error:I}}finally{try{C&&!C.done&&(x=k.return)&&x.call(k)}finally{if(w)throw w.error}}return R.join(", ")},c.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},c})(f);g.$uid=0,r.GutterTooltip=g}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,d){var h=e("../lib/dom"),p=e("../lib/event"),v=e("../lib/useragent"),s=200,f=200,i=5;function a(g){var o=g.editor,c=h.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(Q){g[Q]=this[Q]},this),o.on("mousedown",this.onMouseDown.bind(g));var w=o.container,x,R,$,k,C,O,N=0,I,M,W,F,D;this.onDragStart=function(Q){if(this.cancelDrag||!w.draggable){var oe=this;return setTimeout(function(){oe.startSelect(),oe.captureMouse(Q)},0),Q.preventDefault()}C=o.getSelectionRange();var se=Q.dataTransfer;se.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(c),se.setDragImage&&se.setDragImage(c,0,0),setTimeout(function(){o.container.removeChild(c)}),se.clearData(),se.setData("Text",o.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(Q){if(w.draggable=!1,M=!1,this.setState(null),!o.getReadOnly()){var oe=Q.dataTransfer.dropEffect;!I&&oe=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Q){if(!(o.getReadOnly()||!ee(Q.dataTransfer)))return R=Q.clientX,$=Q.clientY,x||B(),N++,Q.dataTransfer.dropEffect=I=ae(Q),p.preventDefault(Q)},this.onDragOver=function(Q){if(!(o.getReadOnly()||!ee(Q.dataTransfer)))return R=Q.clientX,$=Q.clientY,x||(B(),N++),V!==null&&(V=null),Q.dataTransfer.dropEffect=I=ae(Q),p.preventDefault(Q)},this.onDragLeave=function(Q){if(N--,N<=0&&x)return U(),I=null,p.preventDefault(Q)},this.onDrop=function(Q){if(O){var oe=Q.dataTransfer;if(M)switch(I){case"move":C.contains(O.row,O.column)?C={start:O,end:O}:C=o.moveText(C,O);break;case"copy":C=o.moveText(C,O,!0);break}else{var se=oe.getData("Text");C={start:O,end:o.session.insert(O,se)},o.focus(),I=null}return U(),p.preventDefault(Q)}},p.addListener(w,"dragstart",this.onDragStart.bind(g),o),p.addListener(w,"dragend",this.onDragEnd.bind(g),o),p.addListener(w,"dragenter",this.onDragEnter.bind(g),o),p.addListener(w,"dragover",this.onDragOver.bind(g),o),p.addListener(w,"dragleave",this.onDragLeave.bind(g),o),p.addListener(w,"drop",this.onDrop.bind(g),o);function A(Q,oe){var se=Date.now(),ue=!oe||Q.row!=oe.row,pe=!oe||Q.column!=oe.column;if(!F||ue||pe)o.moveCursorToPosition(Q),F=se,D={x:R,y:$};else{var ve=u(D.x,D.y,R,$);ve>i?F=null:se-F>=f&&(o.renderer.scrollCursorIntoView(),F=null)}}function _(Q,oe){var se=Date.now(),ue=o.renderer.layerConfig.lineHeight,pe=o.renderer.layerConfig.characterWidth,ve=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:R-ve.left,right:ve.right-R},y:{top:$-ve.top,bottom:ve.bottom-$}},Re=Math.min($e.x.left,$e.x.right),Ye=Math.min($e.y.top,$e.y.bottom),Ge={row:Q.row,column:Q.column};Re/pe<=2&&(Ge.column+=$e.x.left<$e.x.right?-3:2),Ye/ue<=1&&(Ge.row+=$e.y.top<$e.y.bottom?-1:1);var at=Q.row!=Ge.row,it=Q.column!=Ge.column,ut=!oe||Q.row!=oe.row;at||it&&!ut?W?se-W>=s&&o.renderer.scrollCursorIntoView(Ge):W=se:W=null}function L(){var Q=O;O=o.renderer.screenToTextCoordinates(R,$),A(O,Q),_(O,Q)}function B(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),L(),k=setInterval(L,20),N=0,p.addListener(document,"mousemove",K)}function U(){clearInterval(k),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!M&&o.$resetCursorStyle(),C=null,O=null,N=0,W=null,F=null,p.removeListener(document,"mousemove",K)}var V=null;function K(){V==null&&(V=setTimeout(function(){V!=null&&x&&U()},20))}function ee(Q){var oe=Q.types;return!oe||Array.prototype.some.call(oe,function(se){return se=="text/plain"||se=="Text"})}function ae(Q){var oe=["copy","copymove","all","uninitialized"],se=["move","copymove","linkmove","all","uninitialized"],ue=v.isMac?Q.altKey:Q.ctrlKey,pe="uninitialized";try{pe=Q.dataTransfer.effectAllowed.toLowerCase()}catch{}var ve="none";return ue&&oe.indexOf(pe)>=0?ve="copy":se.indexOf(pe)>=0?ve="move":oe.indexOf(pe)>=0&&(ve="copy"),ve}}(function(){this.dragWait=function(){var g=Date.now()-this.mousedownEvent.time;g>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var g=this.editor.container;g.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(g){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var g=this.editor,o=g.container;o.draggable=!0,g.renderer.$cursorLayer.setBlinking(!1),g.setStyle("ace_dragging");var c=v.isWin?"default":"move";g.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(g){var o=this.editor.container;if(v.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&o.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(g){if(this.$dragEnabled){this.mousedownEvent=g;var o=this.editor,c=g.inSelection(),m=g.getButton(),w=g.domEvent.detail||1;if(w===1&&m===0&&c){if(g.editor.inMultiSelectMode&&(g.getAccelKey()||g.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=g.domEvent.target||g.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var R=o.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(g,this.onMouseDrag.bind(this)),g.defaultPrevented=!0}}}}).call(a.prototype);function u(g,o,c,m){return Math.sqrt(Math.pow(c-g,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,d){var h=e("./mouse_event").MouseEvent,p=e("../lib/event"),v=e("../lib/dom");r.addTouchListeners=function(s,f){var i="scroll",a,u,g,o,c,m,w=0,x,R=0,$=0,k=0,C,O;function N(){var A=window.navigator&&window.navigator.clipboard,_=!1,L=function(){var V=f.getCopyText(),K=f.session.getUndoManager().hasUndo();O.replaceChild(v.buildDom(_?["span",!V&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],V&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],V&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],K&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),O.firstChild)},B=function(V){return f.commands.canExecute(V,f)},U=function(V){var K=V.target.getAttribute("action");if(K=="more"||!_)return _=!_,L();K=="paste"?A.readText().then(function(ee){f.execCommand(K,ee)}):K&&((K=="cut"||K=="copy")&&(A?A.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(K)),O.firstChild.style.display="none",_=!1,K!="openCommandPalette"&&f.focus()};O=v.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container),O.addEventListener("touchstart",function(V){i="menu",V.stopPropagation(),V.preventDefault(),f.textInput.focus()}),O.addEventListener("touchend",function(V){V.stopPropagation(),V.preventDefault(),U(V)})}function I(){if(!f.getOption("enableMobileMenu")){O&&M();return}O||N();var A=f.selection.cursor,_=f.renderer.textToScreenCoordinates(A.row,A.column),L=f.renderer.textToScreenCoordinates(0,0).pageX,B=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();O.style.top=_.pageY-U.top-3+"px",_.pageX-U.left<U.width-70?(O.style.left="",O.style.right="10px"):(O.style.right="",O.style.left=L+B-U.left+"px"),O.style.display="",O.firstChild.style.display="none",f.on("input",M)}function M(A){O&&(O.style.display="none"),f.off("input",M)}function W(){c=null,clearTimeout(c);var A=f.selection.getRange(),_=A.contains(x.row,x.column);(A.isEmpty()||!_)&&(f.selection.moveToPosition(x),f.selection.selectWord()),i="wait",I()}function F(){c=null,clearTimeout(c),f.selection.moveToPosition(x);var A=R>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);A&&!A.isEmpty()?f.selection.setRange(A):f.selection.selectWord(),i="wait"}p.addListener(s,"contextmenu",function(A){if(C){var _=f.textInput.getElement();_.focus()}},f),p.addListener(s,"touchstart",function(A){var _=A.touches;if(c||_.length>1){clearTimeout(c),c=null,g=-1,i="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var L=f.renderer.layerConfig.lineHeight,B=f.renderer.layerConfig.lineHeight,U=A.timeStamp;o=U;var V=_[0],K=V.clientX,ee=V.clientY;Math.abs(a-K)+Math.abs(u-ee)>L&&(g=-1),a=A.clientX=K,u=A.clientY=ee,$=k=0;var ae=new h(A,f);if(x=ae.getDocumentPosition(),U-g<500&&_.length==1&&!w)R++,A.preventDefault(),A.button=0,F();else{R=0;var Q=f.selection.cursor,oe=f.selection.isEmpty()?Q:f.selection.anchor,se=f.renderer.$cursorLayer.getPixelPosition(Q,!0),ue=f.renderer.$cursorLayer.getPixelPosition(oe,!0),pe=f.renderer.scroller.getBoundingClientRect(),ve=f.renderer.layerConfig.offset,$e=f.renderer.scrollLeft,Re=function(at,it){return at=at/B,it=it/L-.75,at*at+it*it};if(A.clientX<pe.left){i="zoom";return}var Ye=Re(A.clientX-pe.left-se.left+$e,A.clientY-pe.top-se.top+ve),Ge=Re(A.clientX-pe.left-ue.left+$e,A.clientY-pe.top-ue.top+ve);Ye<3.5&&Ge<3.5&&(i=Ye>Ge?"cursor":"anchor"),Ge<3.5?i="anchor":Ye<3.5?i="cursor":i="scroll",c=setTimeout(W,450)}g=U},f),p.addListener(s,"touchend",function(A){C=f.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",w=0):c?(f.selection.moveToPosition(x),w=0,I()):i=="scroll"?(D(),M()):I(),clearTimeout(c),c=null},f),p.addListener(s,"touchmove",function(A){c&&(clearTimeout(c),c=null);var _=A.touches;if(!(_.length>1||i=="zoom")){var L=_[0],B=a-L.clientX,U=u-L.clientY;if(i=="wait")if(B*B+U*U>4)i="cursor";else return A.preventDefault();a=L.clientX,u=L.clientY,A.clientX=L.clientX,A.clientY=L.clientY;var V=A.timeStamp,K=V-o;if(o=V,i=="scroll"){var ee=new h(A,f);ee.speed=1,ee.wheelX=B,ee.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),K!=0&&($=B/K,k=U/K),f._emit("mousewheel",ee),ee.propagationStopped||($=k=0)}else{var ae=new h(A,f),Q=ae.getDocumentPosition();i=="cursor"?f.selection.moveCursorToPosition(Q):i=="anchor"&&f.selection.setSelectionAnchor(Q.row,Q.column),f.renderer.scrollCursorIntoView(Q),A.preventDefault()}}},f);function D(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(k)<.01&&(k=0),w<20&&($=.9*$),w<20&&(k=.9*k);var A=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*k),A==f.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,d){var h=e("../lib/event"),p=e("../lib/useragent"),v=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,f=e("./mouse_event").MouseEvent,i=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),g=(function(){function o(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=c,new v(this),new s(this),new i(this);var w=function($){var k=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());k&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},x=c.renderer.getMouseEventTarget();h.addListener(x,"click",this.onMouseEvent.bind(this,"click"),c),h.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),h.addMultiMouseDownListener([x,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),h.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var R=c.renderer.$gutter;h.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),h.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),c),h.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),h.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),h.addListener(x,"mousedown",w,c),h.addListener(R,"mousedown",w,c),p.isIE&&c.renderer.scrollBarV&&(h.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),h.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=c.renderer.screenToTextCoordinates($.x,$.y),C=c.session.selection.getRange(),O=c.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},c)}return o.prototype.onMouseEvent=function(c,m){this.editor.session&&this.editor._emit(c,new f(m,this.editor))},o.prototype.onMouseMove=function(c,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new f(m,this.editor))},o.prototype.onMouseWheel=function(c,m){var w=new f(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(c,w)},o.prototype.setState=function(c){this.state=c},o.prototype.captureMouse=function(c,m){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var R=this,$=!0,k=function(M){if(M){if(p.isWebKit&&!M.which&&R.releaseMouse)return R.releaseMouse();R.x=M.clientX,R.y=M.clientY,m&&m(M),R.mouseEvent=new f(M,R.editor),R.$mouseMoved=!0}},C=function(M){w.off("beforeEndOperation",I),$=!1,w.session&&O(),R[R.state+"End"]&&R[R.state+"End"](M),R.state="",R.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,M&&R.onMouseEvent("mouseup",M),w.endOperation()},O=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},N=function(){$&&(O(),h.nextFrame(N))};if(p.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){C(c)});var I=function(M){R.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};w.on("beforeEndOperation",I),w.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=k,R.releaseMouse=h.capture(this.editor.container,k,C),N()},o.prototype.cancelContextMenu=function(){var c=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),m&&m.domEvent&&h.stopEvent(m.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();g.prototype.releaseMouse=null,u.defineOptions(g.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=g}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("../lib/dom"),p=(function(){function v(s){s.on("click",function(f){var i=f.getDocumentPosition(),a=s.session,u=a.getFoldAt(i.row,i.column,1);u&&(f.getAccelKey()?a.removeFold(u):a.expandFold(u),f.stop());var g=f.domEvent&&f.domEvent.target;g&&h.hasCssClass(g,"ace_inline_button")&&h.hasCssClass(g,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(f){var i=s.renderer.$gutterLayer.getRegion(f);if(i=="foldWidgets"){var a=f.getDocumentPosition().row,u=s.session;u.foldWidgets&&u.foldWidgets[a]&&s.session.onFoldWidgetClick(a,f),s.isFocused()||s.focus(),f.stop()}}),s.on("gutterdblclick",function(f){var i=s.renderer.$gutterLayer.getRegion(f);if(i=="foldWidgets"){var a=f.getDocumentPosition().row,u=s.session,g=u.getParentFoldRangeData(a,!0),o=g.range||g.firstRange;if(o){a=o.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",o),s.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}f.stop()}})}return v})();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,d){var h=e("../lib/keys"),p=e("../lib/event"),v=(function(){function s(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return s.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},s.prototype.setKeyboardHandler=function(f){var i=this.$handlers;if(i[i.length-1]!=f){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(f,1)}},s.prototype.addKeyboardHandler=function(f,i){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var a=this.$handlers.indexOf(f);a!=-1&&this.$handlers.splice(a,1),i==null?this.$handlers.push(f):this.$handlers.splice(i,0,f),a==-1&&f.attach&&f.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(f){var i=this.$handlers.indexOf(f);return i==-1?!1:(this.$handlers.splice(i,1),f.detach&&f.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var f=this.$data,i=f.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(i,f)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(f,i,a,u){for(var g,o=!1,c=this.$editor.commands,m=this.$handlers.length;m--&&(g=this.$handlers[m].handleKeyboard(this.$data,f,i,a,u),!(!(!g||!g.command)&&(g.command=="null"?o=!0:o=c.exec(g.command,this.$editor,g.args,u),o&&u&&f!=-1&&g.passEvent!=!0&&g.command.passEvent!=!0&&p.stopEvent(u),o))););return!o&&f==-1&&(g={command:"insertstring"},o=c.exec("insertstring",this.$editor,i)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",g),o},s.prototype.onCommandKey=function(f,i,a){var u=h.keyCodeToString(a);return this.$callKeyboardHandlers(i,u,a,f)},s.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},s})();r.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,d){var h=0,p=0,v=!1,s=!1,f=!1,i=[[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]],a=[[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]],u=0,g=1,o=0,c=1,m=2,w=3,x=4,R=5,$=6,k=7,C=8,O=9,N=10,I=11,M=12,W=13,F=14,D=15,A=16,_=17,L=18,B=[L,L,L,L,L,L,L,L,L,$,R,$,C,R,L,L,L,L,L,L,L,L,L,L,L,L,L,L,R,R,R,$,C,x,x,I,I,I,x,x,x,x,x,N,O,N,O,O,m,m,m,m,m,m,m,m,m,m,O,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,L,L,L,L,L,L,R,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,O,x,I,I,I,I,x,x,x,x,o,x,x,L,x,x,I,I,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,L,L,L,o,c,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,R,W,F,D,A,_,O,I,I,I,I,I,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,O,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function V(Q,oe,se,ue){var pe=h?a:i,ve=null,$e=null,Re=null,Ye=0,Ge=null,at=null,it=-1,ut=null,Ht=null,_r=[];if(!ue)for(ut=0,ue=[];ut<se;ut++)ue[ut]=ae(Q[ut]);for(p=h,v=!1,s=!1,f=!1,Ht=0;Ht<se;Ht++){if(ve=Ye,_r[Ht]=$e=ee(Q,ue,_r,Ht),Ye=pe[ve][$e],Ge=Ye&240,Ye&=15,oe[Ht]=Re=pe[Ye][5],Ge>0)if(Ge==16){for(ut=it;ut<Ht;ut++)oe[ut]=1;it=-1}else it=-1;if(at=pe[Ye][6],at)it==-1&&(it=Ht);else if(it>-1){for(ut=it;ut<Ht;ut++)oe[ut]=Re;it=-1}ue[Ht]==R&&(oe[Ht]=0),p|=Re}if(f){for(ut=0;ut<se;ut++)if(ue[ut]==$){oe[ut]=h;for(var Rt=ut-1;Rt>=0&&ue[Rt]==C;Rt--)oe[Rt]=h}}}function K(Q,oe,se){if(!(p<Q)){if(Q==1&&h==g&&!s){se.reverse();return}for(var ue=se.length,pe=0,ve,$e,Re,Ye;pe<ue;){if(oe[pe]>=Q){for(ve=pe+1;ve<ue&&oe[ve]>=Q;)ve++;for($e=pe,Re=ve-1;$e<Re;$e++,Re--)Ye=se[$e],se[$e]=se[Re],se[Re]=Ye;pe=ve}pe++}}}function ee(Q,oe,se,ue){var pe=oe[ue],ve,$e,Re,Ye;switch(pe){case o:case c:v=!1;case x:case w:return pe;case m:return v?w:m;case k:return v=!0,c;case C:return x;case O:return ue<1||ue+1>=oe.length||(ve=se[ue-1])!=m&&ve!=w||($e=oe[ue+1])!=m&&$e!=w?x:(v&&($e=w),$e==ve?$e:x);case N:return ve=ue>0?se[ue-1]:R,ve==m&&ue+1<oe.length&&oe[ue+1]==m?m:x;case I:if(ue>0&&se[ue-1]==m)return m;if(v)return x;for(Ye=ue+1,Re=oe.length;Ye<Re&&oe[Ye]==I;)Ye++;return Ye<Re&&oe[Ye]==m?m:x;case M:for(Re=oe.length,Ye=ue+1;Ye<Re&&oe[Ye]==M;)Ye++;if(Ye<Re){var Ge=Q[ue],at=Ge>=1425&&Ge<=2303||Ge==64286;if(ve=oe[Ye],at&&(ve==c||ve==k))return c}return ue<1||(ve=oe[ue-1])==R?x:se[ue-1];case R:return v=!1,s=!0,h;case $:return f=!0,x;case W:case F:case A:case _:case D:v=!1;case L:return x}}function ae(Q){var oe=Q.charCodeAt(0),se=oe>>8;return se==0?oe>191?o:B[oe]:se==5?/[\u0591-\u05f4]/.test(Q)?c:o:se==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(Q)?M:/[\u0660-\u0669\u066b-\u066c]/.test(Q)?w:oe==1642?I:/[\u06f0-\u06f9]/.test(Q)?m:k:se==32&&oe<=8287?U[oe&255]:se==254&&oe>=65136?k:x}r.L=o,r.R=c,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(Q,oe,se){if(Q.length<2)return{};var ue=Q.split(""),pe=new Array(ue.length),ve=new Array(ue.length),$e=[];h=se?g:u,V(ue,$e,ue.length,oe);for(var Re=0;Re<pe.length;pe[Re]=Re,Re++);K(2,$e,pe),K(1,$e,pe);for(var Re=0;Re<pe.length-1;Re++)oe[Re]===w?$e[Re]=r.AN:$e[Re]===c&&(oe[Re]>k&&oe[Re]<W||oe[Re]===x||oe[Re]===L)?$e[Re]=r.ON_R:Re>0&&ue[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ue[Re])&&($e[Re-1]=$e[Re]=r.R_H,Re++);ue[ue.length-1]===r.DOT&&($e[ue.length-1]=r.B),ue[0]==="‫"&&($e[0]=r.RLE);for(var Re=0;Re<pe.length;Re++)ve[Re]=$e[pe[Re]];return{logicalFromVisual:pe,bidiLevels:ve}},r.hasBidiCharacters=function(Q,oe){for(var se=!1,ue=0;ue<Q.length;ue++)oe[ue]=ae(Q.charAt(ue)),!se&&(oe[ue]==c||oe[ue]==k||oe[ue]==w)&&(se=!0);return se},r.getVisualFromLogicalIdx=function(Q,oe){for(var se=0;se<oe.logicalFromVisual.length;se++)if(oe.logicalFromVisual[se]==Q)return se;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,d){var h=e("./lib/bidiutil"),p=e("./lib/lang"),v=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=(function(){function f(i){this.session=i,this.bidiMap={},this.currentRow=null,this.bidiUtil=h,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(i.getValue())}return f.prototype.isBidiRow=function(i,a,u){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&v.test(i.lines.join(`
182
- `))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var i=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(i=this.session.$docRowCache[u])}return i},f.prototype.getSplitIndex=function(){var i=0,a=this.session.$screenRowCache;if(a.length)for(var u,g=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-i>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-i-1),u===g);)g=u,i++;else i=this.currentRow;return i},f.prototype.updateRowLine=function(i,a){i===void 0&&(i=this.getDocumentRow());var u=i===this.session.getLength()-1,g=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[i];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[h.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?g:h.DOT))}else this.line+=this.showInvisibles?g:h.DOT;var c=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,R){return x===" "||c.isFullWidth(x.charCodeAt(0))?(w=x===" "?c.getScreenTabSize(R+m):2,m+=w-1,p.stringRepeat(h.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==h.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},f.prototype.updateBidiMap=function(){var i=[];h.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=h.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var a=this.characterWidth=i.$characterSize.width,u=i.$measureCharWidth("ה");this.charWidths[h.L]=this.charWidths[h.EN]=this.charWidths[h.ON_R]=a,this.charWidths[h.R]=this.charWidths[h.AN]=u,this.charWidths[h.R_H]=u*.45,this.charWidths[h.B]=this.charWidths[h.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},f.prototype.setEolChar=function(i){this.EOL=i},f.prototype.setContentWidth=function(i){this.contentWidth=i},f.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(i,a){for(var u=i.getCursorPosition(),g=i.selection.getSelectionAnchor().row;g<=u.row;g++)!a&&i.session.getLine(g).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(g,0,1):a&&i.session.getLine(g).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:g},i.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(i){i-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=i>a?this.session.getOverwrite()?i:i-1:a,g=h.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&i<=a&&o[g]%2!==0&&g++;for(var m=0;m<g;m++)c+=this.charWidths[o[m]];return!this.session.getOverwrite()&&i>a&&o[g]%2===0&&(c+=this.charWidths[o[g]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},f.prototype.getSelections=function(i,a){var u=this.bidiMap,g=u.bidiLevels,o,c=[],m=0,w=Math.min(i,a)-this.wrapIndent,x=Math.max(i,a)-this.wrapIndent,R=!1,$=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<g.length;O++)C=u.logicalFromVisual[O],o=g[O],R=C>=w&&C<x,R&&!$?k=m:!R&&$&&c.push({left:k,width:m-k}),m+=this.charWidths[o],$=R;if(R&&O===g.length&&c.push({left:k,width:m-k}),this.isRtlDir)for(var N=0;N<c.length;N++)c[N].left+=this.rtlLineOffset;return c},f.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),g=0,o=0,c=this.bidiMap.bidiLevels,m=this.charWidths[c[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>g+m/2;){if(g+=m,o===c.length-1){m=0;break}m=this.charWidths[c[++o]]}return o>0&&c[o-1]%2!==0&&c[o]%2===0?(u<g&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&c[o-1]%2===0&&c[o]%2!==0?a=1+(u>g?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===c.length-1&&m===0&&c[o-1]%2===0||!this.isRtlDir&&o===0&&c[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&c[o-1]%2!==0&&m!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},f})();r.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,d){var h=e("./lib/oop"),p=e("./lib/lang"),v=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,f=(function(){function i(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(g){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&g.old.column!=g.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},i.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?s.fromPoints(u,u):this.isBackwards()?s.fromPoints(u,a):s.fromPoints(a,u)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(a,u){var g=u?a.end:a.start,o=u?a.start:a.end;this.$setSelection(g.row,g.column,o.row,o.column)},i.prototype.$setSelection=function(a,u,g,o){if(!this.$silent){var c=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(g,o),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||m)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},i.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},i.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},i.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},i.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(a,u){if(typeof u>"u"){var g=a||this.lead;a=g.row,u=g.column}return this.session.getWordRange(a,u)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},i.prototype.getLineRange=function(a,u){var g=typeof a=="number"?a:this.lead.row,o,c=this.session.getFoldLine(g);return c?(g=c.start.row,o=c.end.row):o=g,u===!0?new s(g,0,o,this.session.getLine(o).length):new s(g,0,o+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(a,u,g){var o=a.column,c=a.column+u;return g<0&&(o=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,c).split(" ").length-1==u},i.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var g=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,g,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-g):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.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 g=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,g,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,g):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,g=this.session.documentToScreenRow(a,u),o=this.session.screenToDocumentPosition(g,0),c=this.session.getDisplayLine(a,null,o.row,o.column),m=c.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},i.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var g=this.session.getLine(u.row);if(u.column==g.length){var o=g.search(/\s+$/);o>0&&(u.column=o)}}this.moveCursorTo(u.row,u.column)},i.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,g=this.doc.getLine(a),o=g.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=g.substring(u)),u>=g.length){this.moveCursorTo(a,g.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},i.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,g;if(g=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(g.start.row,g.start.column);return}var o=this.session.getFoldStringAt(a,u,-1);o==null&&(o=this.doc.getLine(a).substring(0,u));var c=p.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},i.prototype.$shortWordEndIndex=function(a){var u=0,g,o=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(g=a[u])&&o.test(g);)u++;if(u<1){for(c.lastIndex=0;(g=a[u])&&!c.test(g);)if(c.lastIndex=0,u++,o.test(g))if(u>2){u--;break}else{for(;(g=a[u])&&o.test(g);)u++;if(u>2)break}}}return c.lastIndex=0,u},i.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,g=this.doc.getLine(a),o=g.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==g.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,u+w)},i.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,g;if(g=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(g.start.row,g.start.column);var o=this.session.getLine(a).substring(0,u);if(u===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var c=p.stringReverse(o),m=this.$shortWordEndIndex(c);return this.moveCursorTo(a,u-m)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(a,u){var g=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(g.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(g.column),g.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=g.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?g.column=this.$desiredColumn:this.$desiredColumn=g.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var m=this.session.screenToDocumentPosition(g.row+a,g.column,o);a!==0&&u===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+u,u===0)},i.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},i.prototype.moveCursorTo=function(a,u,g){var o=this.session.getFoldAt(a,u,1);o&&(a=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,g||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(a,u,g){var o=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(o.row,o.column,g)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},i.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var g=this.getCursor();return s.fromPoints(u,g)}catch{return s.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},i.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var g=u.clone();return g.isBackwards=u.cursor==u.start,g});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},i.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var g=s.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(g.cursor=g.start),this.addRange(g,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},i.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},i})();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,h.implement(f.prototype,v),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,d){var h=e("./lib/report_error").reportError,p=2e3,v=(function(){function s(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var i in this.states){for(var a=this.states[i],u=[],g=0,o=this.matchMappings[i]={defaultToken:"text"},c="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),x.unicode&&c.indexOf("u")===-1&&(c+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var R=x.regex,$=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?R=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+g+1)}):($=1,R=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[g]=w,g+=$,u.push(R),x.onMatch||(x.onMatch=null)}}u.length||(o[0]=0,u.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,c)},this),this.regExps[i]=new RegExp("("+u.join(")|(")+")|($)",c)}}return s.prototype.$setMaxTokenCount=function(f){p=f|0},s.prototype.$applyToken=function(f){var i=this.splitRegex.exec(f).slice(1),a=this.token.apply(this,i);if(typeof a=="string")return[{type:a,value:f}];for(var u=[],g=0,o=a.length;g<o;g++)i[g]&&(u[u.length]={type:a[g],value:i[g]});return u},s.prototype.$arrayTokens=function(f){if(!f)return[];var i=this.splitRegex.exec(f);if(!i)return"text";for(var a=[],u=this.tokenArray,g=0,o=u.length;g<o;g++)i[g+1]&&(a[a.length]={type:u[g],value:i[g+1]});return a},s.prototype.removeCapturingGroups=function(f){var i=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return i},s.prototype.createSplitterRegexp=function(f,i){if(f.indexOf("(?=")!=-1){var a=0,u=!1,g={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,c,m,w,x,R){return u?u=x!="]":x?u=!0:w?(a==g.stack&&(g.end=R+1,g.stack=-1),a--):m&&(a++,m.length!=1&&(g.stack=a,g.start=R)),o}),g.end!=null&&/^\)*$/.test(f.substr(g.end))&&(f=f.substring(0,g.start)+f.substr(g.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(i||"").replace("g",""))},s.prototype.getLineTokens=function(f,i){if(i&&typeof i!="string"){var a=i.slice(0);i=a[0],i==="#tmp"&&(a.shift(),i=a.shift())}else var a=[];var u=i||"start",g=this.states[u];g||(u="start",g=this.states[u]);var o=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var m,w=[],x=0,R=0,$={type:null,value:""};m=c.exec(f);){var k=o.defaultToken,C=null,O=m[0],N=c.lastIndex;if(N-O.length>x){var I=f.substring(x,N-O.length);$.type==k?$.value+=I:($.type&&w.push($),$={type:k,value:I})}for(var M=0;M<m.length-2;M++)if(m[M+1]!==void 0){C=g[o[M]],C.onMatch?k=C.onMatch(O,u,a,f):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),g=this.states[u],g||(this.reportError("state doesn't exist",u),u="start",g=this.states[u]),o=this.matchMappings[u],x=N,c=this.regExps[u],c.lastIndex=N),C.consumeLineEnd&&(x=N);break}if(O){if(typeof k=="string")(!C||C.merge!==!1)&&$.type===k?$.value+=O:($.type&&w.push($),$={type:k,value:O});else if(k){$.type&&w.push($),$={type:null,value:""};for(var M=0;M<k.length;M++)w.push(k[M])}}if(x==f.length)break;if(x=N,R++>p){for(R>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:f});x<f.length;)$.type&&w.push($),$={value:f.substring(x,x+=500),type:"overflow"};u="start",a=[];break}}return $.type&&w.push($),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},s})();v.prototype.reportError=h,r.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,d){var h=e("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,i){if(!i){for(var a in f)this.$rules[a]=f[a];return}for(var a in f){for(var u=f[a],g=0;g<u.length;g++){var o=u[g];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(i)!==0&&(o.next=i+o.next),o.nextState&&o.nextState.indexOf(i)!==0&&(o.nextState=i+o.nextState))}this.$rules[i+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(f,i,a,u,g){var o=typeof f=="function"?new f().getRules():f;if(u)for(var c=0;c<u.length;c++)u[c]=i+u[c];else{u=[];for(var m in o)u.push(i+m)}if(this.addRules(o,i),a)for(var w=Array.prototype[g?"push":"unshift"],c=0;c<u.length;c++)w.apply(this.$rules[u[c]],h(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var v=function(f,i){return(f!="start"||i.length)&&i.unshift(this.nextState,f),this.nextState},s=function(f,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var f=0,i=this.$rules;function a(u){var g=i[u];g.processed=!0;for(var o=0;o<g.length;o++){var c=g[o],m=null;Array.isArray(c)&&(m=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var x=c.stateName;x||(x=c.token,typeof x!="string"&&(x=x[0]||""),i[x]&&(x+=f++)),i[x]=w,c.next=x,a(x)}else w=="pop"&&(c.next=s);if(c.push&&(c.nextState=c.next||c.push,c.next=v,delete c.push),c.rules)for(var R in c.rules)i[R]?i[R].push&&i[R].push.apply(i[R],c.rules[R]):i[R]=c.rules[R];var $=typeof c=="string"?c:c.include;if($&&($==="$self"&&($="start"),Array.isArray($)?m=$.map(function(C){return i[C]}):m=i[$]),m){var k=[o,1].concat(m);c.noEscape&&(k=k.filter(function(C){return!C.next})),g.splice.apply(g,k),o--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(i).forEach(a,this)},this.createKeywordMapper=function(f,i,a,u){var g=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(o){for(var c=f[o],m=c.split(u||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),g[x]=o}},this),f=null,a?function(o){return g[o.toLowerCase()]||i}:function(o){return g[o]||i}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,d){var h;h=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(h.prototype),r.Behaviour=h}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,d){var h=e("./range").Range,p=(function(){function v(s,f,i){this.$session=s,this.$row=f,this.$rowTokens=s.getTokens(f);var a=s.getTokenAt(f,i);this.$tokenIndex=a?a.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,f=this.$tokenIndex,i=s[f].start;if(i!==void 0)return i;for(i=0;f>0;)f-=1,i+=s[f].value.length;return i},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new h(this.$row,f,this.$row,f+s.value.length)},v})();r.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,d){var h=e("../../lib/oop"),p=e("../behaviour").Behaviour,v=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},g={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[x])return a=u[x];a=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(w,x,R,$){var k=w.end.row-w.start.row;return{text:R+x+$,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,R,$,k,C){var O=$.getCursorPosition(),N=k.doc.getLine(O.row);if(C=="{"){o($);var I=$.getSelectionRange(),M=k.doc.getTextRange(I),W=k.getTokenAt(O.row,O.column);if(M!==""&&M!=="{"&&$.getWrapBehavioursEnabled())return c(I,M,"{","}");if(W&&/(?:string)\.quasi|\.xml/.test(W.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(V){return V.test(W.type)})||/(string)\.quasi/.test(W.type)&&W.value[O.column-W.start-1]!=="$"?void 0:(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion($,k))return/[\]\}\)]/.test(N[O.column])||$.inMultiSelectMode||w.braces?(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert($,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o($);var D=N.substring(O.column,O.column+1);if(D=="}"){var A=k.$findOpeningBracket("}",{column:O.column+1,row:O.row});if(A!==null&&m.isAutoInsertedClosing(O,N,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
- `||C==`\r
184
- `){o($);var _="";m.isMaybeInsertedClosing(O,N)&&(_=s.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var D=N.substring(O.column,O.column+1);if(D==="}"){var L=k.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!L)return null;var B=this.$getIndent(k.getLine(L.row))}else if(_)var B=this.$getIndent(N);else{m.clearMaybeInsertedClosing();return}var U=B+k.getTabString();return{text:`
185
- `+U+`
186
- `+B+_,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,R,$,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){o($);var N=k.doc.getLine(C.start.row),I=N.substring(C.end.column,C.end.column+1);if(I=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,R,$,k,C){if(C=="("){o($);var O=$.getSelectionRange(),N=k.doc.getTextRange(O);if(N!==""&&$.getWrapBehavioursEnabled())return c(O,N,"(",")");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){o($);var I=$.getCursorPosition(),M=k.doc.getLine(I.row),W=M.substring(I.column,I.column+1);if(W==")"){var F=k.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(F!==null&&m.isAutoInsertedClosing(I,M,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,R,$,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){o($);var N=k.doc.getLine(C.start.row),I=N.substring(C.start.column+1,C.start.column+2);if(I==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,R,$,k,C){if(C=="["){o($);var O=$.getSelectionRange(),N=k.doc.getTextRange(O);if(N!==""&&$.getWrapBehavioursEnabled())return c(O,N,"[","]");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o($);var I=$.getCursorPosition(),M=k.doc.getLine(I.row),W=M.substring(I.column,I.column+1);if(W=="]"){var F=k.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(F!==null&&m.isAutoInsertedClosing(I,M,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,R,$,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){o($);var N=k.doc.getLine(C.start.row),I=N.substring(C.start.column+1,C.start.column+2);if(I=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,R,$,k,C){var O=k.$mode.$quotes||g;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o($);var N=C,I=$.getSelectionRange(),M=k.doc.getTextRange(I);if(M!==""&&(M.length!=1||!O[M])&&$.getWrapBehavioursEnabled())return c(I,M,N,N);if(!M){var W=$.getCursorPosition(),F=k.doc.getLine(W.row),D=F.substring(W.column-1,W.column),A=F.substring(W.column,W.column+1),_=k.getTokenAt(W.row,W.column),L=k.getTokenAt(W.row,W.column+1);if(D=="\\"&&_&&/escape/.test(_.type))return null;var B=_&&/string|escape/.test(_.type),U=!L||/string|escape/.test(L.type),V;if(A==N)V=B!==U,V&&/string\.end/.test(L.type)&&(V=!1);else{if(B&&!U||B&&U)return null;var K=k.$mode.tokenRe;K.lastIndex=0;var ee=K.test(D);K.lastIndex=0;var ae=K.test(A),Q=k.$mode.$pairQuotesAfter,oe=Q&&Q[N]&&Q[N].test(D);if(!oe&&ee||ae||A&&!/[\s;,.})\]\\]/.test(A))return null;var se=F[W.column-2];if(D==N&&(se==N||K.test(se)))return null;V=!0}return{text:V?N+N:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,R,$,k,C){var O=k.$mode.$quotes||g,N=k.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(N)){o($);var I=k.doc.getLine(C.start.row),M=I.substring(C.start.column+1,C.start.column+2);if(M==N)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,R,$,k,C){if(x==="doc-start"&&(C===`
187
- `||C===`\r
188
- `)&&$.selection.isEmpty()){var O=$.getCursorPosition();if(O.column===0)return;for(var N=k.doc.getLine(O.row),I=k.doc.getLine(O.row+1),M=k.getTokens(O.row),W=0,F=0;F<M.length;F++){W+=M[F].value.length;var D=M[F];if(W>=O.column){if(W===O.column){if(!/\.doc/.test(D.type))return;if(/\*\//.test(D.value)){var A=M[F+1];if(!A||!/\.doc/.test(A.type))return}}var _=O.column-(W-D.value.length),L=D.value.indexOf("*/"),B=D.value.indexOf("/**",L>-1?L+2:0);if(B!==-1&&_>B&&_<B+3||L!==-1&&B!==-1&&_>=L&&_<=B||!/\.doc/.test(D.type))return;break}}var U=this.$getIndent(N);if(/\s*\*/.test(I))return/^\s*\*/.test(N)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(N.substring(0,O.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var R=w.getCursorPosition(),$=new v(x,R.row,R.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(w.session.getLine(R.row)[R.column]))return!0;var k=new v(x,R.row,R.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==R.row||this.$matchTokenType($.getCurrentToken()||"text",i)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,R){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isAutoInsertedClosing($,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=$.row,a.autoInsertedLineEnd=R+k.substr($.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,R){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isMaybeInsertedClosing($,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=$.row,a.maybeInsertedLineStart=k.substr(0,$.column)+R,a.maybeInsertedLineEnd=k.substr($.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,R){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&R===a.autoInsertedLineEnd[0]&&x.substr(w.column)===a.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(w,x){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&x.substr(w.column)===a.maybeInsertedLineEnd&&x.substr(0,w.column)==a.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},h.inherits(m,p),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,r,d){for(var h=[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<h.length;s+=2)v.push(p+=h[s]),h[s+1]&&v.push(45,p+=h[s+1]);r.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(e,r,d){var h=e("../config"),p=e("../tokenizer").Tokenizer,v=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,f=e("../unicode"),i=e("../lib/lang"),a=e("../token_iterator").TokenIterator,u=e("../range").Range,g;g=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+f.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.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(o,c,m,w){var x=c.doc,R=!0,$=!0,k=1/0,C=c.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var N=this.lineCommentStart.map(i.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var N=i.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;N=new RegExp("^(\\s*)(?:"+N+") ?"),O=c.getUseSoftTabs();var M=function(V,K){var ee=V.match(N);if(ee){var ae=ee[1].length,Q=ee[0].length;!A(V,ae,Q)&&ee[0][Q-1]==" "&&Q--,x.removeInLine(K,ae,Q)}},W=I+" ",F=function(V,K){(!R||/\S/.test(V))&&(A(V,k,k)?x.insertInLine({row:K,column:k},W):x.insertInLine({row:K,column:k},I))},D=function(V,K){return N.test(V)},A=function(V,K,ee){for(var ae=0;K--&&V.charAt(K)==" ";)ae++;if(ae%C!=0)return!1;for(var ae=0;V.charAt(ee++)==" ";)ae++;return C>2?ae%C!=C-1:ae%C==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,_=this.blockComment.end,N=new RegExp("^(\\s*)(?:"+i.escapeRegExp(I)+")"),L=new RegExp("(?:"+i.escapeRegExp(_)+")\\s*$"),F=function(oe,se){D(oe,se)||(!R||/\S/.test(oe))&&(x.insertInLine({row:se,column:oe.length},_),x.insertInLine({row:se,column:k},I))},M=function(oe,se){var ue;(ue=oe.match(L))&&x.removeInLine(se,oe.length-ue[0].length,oe.length),(ue=oe.match(N))&&x.removeInLine(se,ue[1].length,ue[0].length)},D=function(oe,se){if(N.test(oe))return!0;for(var ue=c.getTokens(se),pe=0;pe<ue.length;pe++)if(ue[pe].type==="comment")return!0}}function B(V){for(var K=m;K<=w;K++)V(x.getLine(K),K)}var U=1/0;B(function(V,K){var ee=V.search(/\S/);ee!==-1?(ee<k&&(k=ee),$&&!D(V,K)&&($=!1)):U>V.length&&(U=V.length)}),k==1/0&&(k=U,R=!1,$=!1),O&&k%C!=0&&(k=Math.floor(k/C)*C),B($?M:F)},this.toggleBlockComment=function(o,c,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var R=new a(c,w.row,w.column),$=R.getCurrentToken();c.selection;var k=c.selection.toOrientedRange(),C,O;if($&&/comment/.test($.type)){for(var N,I;$&&/comment/.test($.type);){var M=$.value.indexOf(x.start);if(M!=-1){var W=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+M;N=new u(W,F,W,F+x.start.length);break}$=R.stepBackward()}for(var R=new a(c,w.row,w.column),$=R.getCurrentToken();$&&/comment/.test($.type);){var M=$.value.indexOf(x.end);if(M!=-1){var W=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+M;I=new u(W,F,W,F+x.end.length);break}$=R.stepForward()}I&&c.remove(I),N&&(c.remove(N),C=N.start.row,O=-x.start.length)}else O=x.start.length,C=m.start.row,c.insert(m.end,x.end),c.insert(m.start,x.start);k.start.row==C&&(k.start.column+=O),k.end.row==C&&(k.end.column+=O),c.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(o,c,m){return this.$getIndent(c)},this.checkOutdent=function(o,c,m){return!1},this.autoOutdent=function(o,c,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var c in o)if(o[c]){var m=o[c],w=m.prototype.$id,x=h.$modes[w];x||(h.$modes[w]=x=new m),h.$modes[c]||(h.$modes[c]=x),this.$embeds.push(c),this.$modes[c]=x}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(O){(function(N){var I=R[O],M=N[I];N[R[O]]=function(){return this.$delegator(I,arguments,M)}})(k)},k=this,c=0;c<R.length;c++)$(c)},this.$delegator=function(o,c,m){var w=c[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],R=this.$modes[x];if(R)return R[o].apply(R,[w[1]].concat([].slice.call(c,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var k=w.split(this.$embeds[$]);if(!k[0]&&k[1]){c[0]=k[1];var R=this.$modes[this.$embeds[$]];return R[o].apply(R,c)}}var C=m.apply(this,c);return m?C:void 0},this.transformAction=function(o,c,m,w,x){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var $ in R)if(R[$][c]){var k=R[$][c].apply(this,arguments);if(k)return k}}},this.getKeywords=function(o){if(!this.completionKeywords){var c=this.$tokenizer.rules,m=[];for(var w in c)for(var x=c[w],R=0,$=x.length;R<$;R++)if(typeof x[R].token=="string")/keyword|support|storage/.test(x[R].token)&&m.push(x[R].regex);else if(typeof x[R].token=="object"){for(var k=0,C=x[R].token.length;k<C;k++)if(/keyword|support|storage/.test(x[R].token[k])){var w=x[R].regex.match(/\(.+?\)/g)[k];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,c,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(g.prototype),r.Mode=g}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("./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 f;return this.lineWidgets?f=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[s]?1+f:this.$wrapData[s].length+1+f},v.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(s+=f.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 f=this.editor;if(f){this.editor=null,f.widgetManager=null,f.renderer.off("beforeRender",this.measureWidgets),f.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},v.prototype.updateOnFold=function(s,f){var i=f.lineWidgets;if(!(!i||!s.action)){for(var a=s.data,u=a.start.row,g=a.end.row,o=s.action=="add",c=u+1;c<g;c++)i[c]&&(i[c].hidden=o);i[g]&&(o?i[u]?i[g].hidden=o:i[u]=i[g]:(i[u]==i[g]&&(i[u]=void 0),i[g].hidden=o))}},v.prototype.updateOnChange=function(s){var f=this.session.lineWidgets;if(f){var i=s.start.row,a=s.end.row-i;if(a!==0)if(s.action=="remove"){var u=f.splice(i+1,a);!f[i]&&u[u.length-1]&&(f[i]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var g=new Array(a);f[i]&&f[i].column!=null&&s.start.column>f[i].column&&i++,g.unshift(i,0),f.splice.apply(f,g),this.$updateRows()}}},v.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var f=!0;s.forEach(function(i,a){if(i)for(f=!1,i.row=a;i.$oldWidget;)i.$oldWidget.row=a,i=i.$oldWidget}),f&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[s.row];return f&&(s.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._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 f=this.editor.renderer;s.html&&!s.el&&(s.el=h.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=h.createElement("div"),s.el.textContent=s.text),s.el&&(h.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&h.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",f.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/f.layerConfig.lineHeight);var i=this.session.getFoldAt(s.row,0);if(s.$fold=i,i){var a=this.session.lineWidgets;s.row==i.end.row&&!a[i.start.row]?a[i.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,f),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 f=this.session.lineWidgets[s.row];if(f==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;f;){if(f.$oldWidget==s){f.$oldWidget=s.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(s){for(var f=this.session.lineWidgets,i=f&&f[s],a=[];i;)a.push(i),i=i.$oldWidget;return a},v.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(s,f){var i=this.session._changedWidgets,a=f.layerConfig;if(!(!i||!i.length)){for(var u=1/0,g=0;g<i.length;g++){var o=i[g];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,f.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var c=o.h/a.lineHeight;o.coverLine&&(c-=this.session.getRowLineCount(o.row),c<0&&(c=0)),o.rowCount!=c&&(o.rowCount=c,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(s,f){var i=f.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,i.firstRow),g=Math.max(this.lastRow,i.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,f.$cursorLayer.config=i;for(var o=u;o<=g;o++){var c=a[o];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,f.container.appendChild(c.el));var m=f.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;c.coverLine||(m+=i.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=m-i.offset+"px";var w=c.coverGutter?0:f.gutterWidth;c.fixedWidth||(w-=f.scrollLeft),c.el.style.left=w+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=i.width+2*i.padding+"px"),c.fixedWidth?c.el.style.right=f.scrollBar.getWidth()+"px":c.el.style.right=""}}}},v})();r.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,d){r.applyDelta=function(h,p,v){var s=p.start.row,f=p.start.column,i=h[s]||"";switch(p.action){case"insert":var a=p.lines;if(a.length===1)h[s]=i.substring(0,f)+p.lines[0]+i.substring(f);else{var u=[s,1].concat(p.lines);h.splice.apply(h,u),h[s]=i.substring(0,f)+h[s],h[s+p.lines.length-1]+=i.substring(f)}break;case"remove":var g=p.end.column,o=p.end.row;s===o?h[s]=i.substring(0,f)+i.substring(g):h.splice(s,o-s+1,i.substring(0,f)+h[o].substring(g));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var h=e("./lib/oop"),p=e("./lib/event_emitter").EventEmitter,v=(function(){function i(a,u,g){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,g)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=f(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},i.prototype.setPosition=function(a,u,g){var o;if(g?o={row:a,column:u}:o=this.$clipPositionToDocument(a,u),!(this.row==o.row&&this.column==o.column)){var c={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:c,value:o})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(a,u){var g={};return a>=this.document.getLength()?(g.row=Math.max(0,this.document.getLength()-1),g.column=this.document.getLine(g.row).length):a<0?(g.row=0,g.column=0):(g.row=a,g.column=Math.min(this.document.getLine(g.row).length,Math.max(0,u))),u<0&&(g.column=0),g},i})();v.prototype.$insertRight=!1,h.implement(v.prototype,p);function s(i,a,u){var g=u?i.column<=a.column:i.column<a.column;return i.row<a.row||i.row==a.row&&g}function f(i,a,u){var g=i.action=="insert",o=(g?1:-1)*(i.end.row-i.start.row),c=(g?1:-1)*(i.end.column-i.start.column),m=i.start,w=g?m:i.end;return s(a,m,u)?{row:a.row,column:a.column}:s(w,a,!u)?{row:a.row+o,column:a.column+(a.row==w.row?c:0)}:{row:m.row,column:m.column}}r.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,d){var h=e("./lib/oop"),p=e("./apply_delta").applyDelta,v=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,f=e("./anchor").Anchor,i=(function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var g=this.getLength()-1;this.remove(new s(0,0,g,this.getLine(g).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,g){return new f(this,u,g)},a.prototype.$detectNewLine=function(u){var g=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=g?g[1]:`
189
- `,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
- `;case"unix":return`
191
- `;default:return this.$autoNewLine||`
192
- `}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
193
- `||u=="\r"||u==`
194
- `},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,g){return this.$lines.slice(u,g+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var g;if(u.start.row===u.end.row)g=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{g=this.getLines(u.start.row,u.end.row),g[0]=(g[0]||"").substring(u.start.column);var o=g.length-1;u.end.row-u.start.row==o&&(g[o]=g[o].substring(0,u.end.column))}return g},a.prototype.insertLines=function(u,g){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,g)},a.prototype.removeLines=function(u,g){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,g)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,g){return this.getLength()<=1&&this.$detectNewLine(g),this.insertMergedLines(u,this.$split(g))},a.prototype.insertInLine=function(u,g){var o=this.clippedPos(u.row,u.column),c=this.pos(u.row,u.column+g.length);return this.applyDelta({start:o,end:c,action:"insert",lines:[g]},!0),this.clonePos(c)},a.prototype.clippedPos=function(u,g){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,g=void 0);var c=this.getLine(u);return g==null&&(g=c.length),g=Math.min(Math.max(g,0),c.length),{row:u,column:g}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,g){return{row:u,column:g}},a.prototype.$clipPosition=function(u){var g=this.getLength();return u.row>=g?(u.row=Math.max(0,g-1),u.column=this.getLine(g-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,g){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(g=g.concat([""]),o=0):(g=[""].concat(g),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},g)},a.prototype.insertMergedLines=function(u,g){var o=this.clippedPos(u.row,u.column),c={row:o.row+g.length-1,column:(g.length==1?o.column:0)+g[g.length-1].length};return this.applyDelta({start:o,end:c,action:"insert",lines:g}),this.clonePos(c)},a.prototype.remove=function(u){var g=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:g,end:o,action:"remove",lines:this.getLinesForRange({start:g,end:o})}),this.clonePos(g)},a.prototype.removeInLine=function(u,g,o){var c=this.clippedPos(u,g),m=this.clippedPos(u,o);return this.applyDelta({start:c,end:m,action:"remove",lines:this.getLinesForRange({start:c,end:m})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(u,g){u=Math.min(Math.max(0,u),this.getLength()-1),g=Math.min(Math.max(0,g),this.getLength()-1);var o=g==this.getLength()-1&&u>0,c=g<this.getLength()-1,m=o?u-1:u,w=o?this.getLine(m).length:0,x=c?g+1:g,R=c?0:this.getLine(x).length,$=new s(m,w,x,R),k=this.$lines.slice(u,g+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),k},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,g){if(u instanceof s||(u=s.fromPoints(u.start,u.end)),g.length===0&&u.isEmpty())return u.start;if(g==this.getTextRange(u))return u.end;this.remove(u);var o;return g?o=this.insert(u.start,g):o=u.start,o},a.prototype.applyDeltas=function(u){for(var g=0;g<u.length;g++)this.applyDelta(u[g])},a.prototype.revertDeltas=function(u){for(var g=u.length-1;g>=0;g--)this.revertDelta(u[g])},a.prototype.applyDelta=function(u,g){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!s.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(p(this.$lines,u,g),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var g=this.$lines.length;(u.action=="remove"&&u.start.row<g&&u.end.row<g||u.action=="insert"&&u.start.row<=g)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,g){for(var o=u.lines,c=o.length-g+1,m=u.start.row,w=u.start.column,x=0,R=0;x<c;x=R){R+=g-1;var $=o.slice(x,R);$.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+R,w=0),action:u.action,lines:$},!0)}u.lines=o.slice(x),u.start.row=m+x,u.start.column=w,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,g){for(var o=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=g||0,w=o.length;m<w;m++)if(u-=o[m].length+c,u<0)return{row:m,column:u+o[m].length+c};return{row:w-1,column:u+o[w-1].length+c}},a.prototype.positionToIndex=function(u,g){for(var o=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=0,w=Math.min(u.row,o.length),x=g||0;x<w;++x)m+=o[x].length+c;return m+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",h.implement(i.prototype,v),r.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var h=e("./lib/oop"),p=e("./lib/event_emitter").EventEmitter,v=(function(){function s(f,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,g=a.currentLine,o=-1,c=a.doc,m=g;a.lines[g];)g++;var w=c.getLength(),x=0;for(a.running=!1;g<w;){a.$tokenizeRow(g),o=g;do g++;while(a.lines[g]);if(x++,x%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=g,o==-1&&(o=g),m<=o&&a.fireUpdateEvent(m,o)}}}return s.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(f,i){var a={first:f,last:i};this._signal("update",{data:a})},s.prototype.start=function(f){this.currentLine=Math.min(f||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(f){var i=f.start.row,a=f.end.row-i;if(a===0)this.lines[i]=null;else if(f.action=="remove")this.lines.splice(i,a+1,null),this.states.splice(i,a+1,null);else{var u=Array(a+1);u.unshift(i,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},s.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},s.prototype.$tokenizeRow=function(f){var i=this.doc.getLine(f),a=this.states[f-1],u=this.tokenizer.getLineTokens(i,a,f);return this.states[f]+""!=u.state+""?(this.states[f]=u.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=u.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s})();h.implement(v.prototype,p),r.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,d){var h=e("./lib/lang"),p=e("./range").Range,v=(function(){function s(f,i,a){a===void 0&&(a="text"),this.setRegexp(f),this.clazz=i,this.type=a,this.docLen=0}return s.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},s.prototype.update=function(f,i,a,u){if(this.regExp){for(var g=u.firstRow,o=u.lastRow,c={},m=a.$editor&&a.$editor.$search,w=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=g;x<=o;x++){var R=this.cache[x];if(R==null||a.getValue().length!=this.docLen){if(w){R=[];var $=m.$multiLineForward(a,this.regExp,x,o);if($){var k=$.endRow<=o?$.endRow-1:o;k>x&&(x=k),R.push(new p($.startRow,$.startCol,$.endRow,$.endCol))}R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES))}else R=h.getMatchOffsets(a.getLine(x),this.regExp),R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES)),R=R.map(function(I){return new p(x,I.offset,x,I.offset+I.length)});this.cache[x]=R.length?R:""}if(R.length!==0)for(var C=R.length;C--;){var O=R[C].toScreenRange(a),N=O.toString();c[N]||(c[N]=!0,i.drawSingleLineMarker(f,O,this.clazz,u))}}this.docLen=a.getValue().length}},s})();v.prototype.MAX_RANGES=500,r.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,d){var h=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,O,N){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),O===!1||!this.lastDeltas){this.lastDeltas=[];var I=this.$undoStack.length;I>this.$undoDepth-1&&this.$undoStack.splice(0,I-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var N=this.$undoStack,I=N.length;I--;){var M=N[I][0];if(M.id<=C)break;M.id<O&&(M.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,O){for(var N=this.selections,I=N.length;I--;){var M=N[I];if(M.rev<C)return O&&(M=N[I+1]),M}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var N=this.$undoStack,I=null,M=0,W=N.length;W--;){var F=N[W][0];if(F.id<O&&!I&&(I=W+1),F.id<=C){M=W+1;break}}return N.slice(M,I)},k.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},k.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},k.prototype.undo=function(C,O){this.lastDeltas=null;var N=this.$undoStack;if(p(N,N.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var I=N.pop(),M=null;return I&&(M=C.undoChanges(I,O),this.$redoStack.push(I),this.$syncRev()),this.$fromUndo=!1,M}},k.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var N=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,N),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(W){W[0].id=++this.$maxRev},this)}var I=this.$redoStack.pop(),M=null;return I&&(M=C.redoChanges(I,O),this.$undoStack.push(I),this.$syncRev()),this.$fromUndo=!1,M},k.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],N=O&&O[0].id||0;this.$redoStackBaseRev=N,this.$rev=N},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
195
- ---
196
- `+a(this.$redoStack)},k})();h.prototype.hasUndo=h.prototype.canUndo,h.prototype.hasRedo=h.prototype.canRedo,h.prototype.isClean=h.prototype.isAtBookmark,h.prototype.markClean=h.prototype.bookmark;function p(k,C){for(var O=C;O--;){var N=k[O];if(N&&!N[0].ignore){for(;O<C-1;){var I=o(k[O],k[O+1]);k[O]=I[0],k[O+1]=I[1],O++}return!0}}}var v=e("./range").Range,s=v.comparePoints;v.comparePoints;function f(k){return{row:k.row,column:k.column}}function i(k){return{start:f(k.start),end:f(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
197
- `);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(u).join(`
198
- `):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function g(k,C){var O=k.action=="insert",N=C.action=="insert";if(O&&N)if(s(C.start,k.end)>=0)m(C,k,-1);else if(s(C.start,k.start)<=0)m(k,C,1);else return null;else if(O&&!N)if(s(C.start,k.end)>=0)m(C,k,-1);else if(s(C.end,k.start)<=0)m(k,C,-1);else return null;else if(!O&&N)if(s(C.start,k.start)>=0)m(C,k,1);else if(s(C.start,k.start)<=0)m(k,C,1);else return null;else if(!O&&!N)if(s(C.start,k.start)>=0)m(C,k,1);else if(s(C.end,k.start)<=0)m(k,C,-1);else return null;return[C,k]}function o(k,C){for(var O=k.length;O--;)for(var N=0;N<C.length;N++)if(!g(k[O],C[N])){for(;O<k.length;){for(;N--;)g(C[N],k[O]);N=C.length,O++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function c(k,C){var O=k.action=="insert",N=C.action=="insert";if(O&&N)s(k.start,C.start)<0?m(C,k,1):m(k,C,1);else if(O&&!N)s(k.start,C.end)>=0?m(k,C,-1):(s(k.start,C.start)<=0||m(k,v.fromPoints(C.start,k.start),-1),m(C,k,1));else if(!O&&N)s(C.start,k.end)>=0?m(C,k,-1):(s(C.start,k.start)<=0||m(C,v.fromPoints(k.start,C.start),-1),m(k,C,1));else if(!O&&!N)if(s(C.start,k.end)>=0)m(C,k,-1);else if(s(C.end,k.start)<=0)m(k,C,-1);else{var I,M;return s(k.start,C.start)<0&&(I=k,k=x(k,C.start)),s(k.end,C.end)>0&&(M=x(k,C.end)),w(C.end,k.start,k.end,-1),M&&!I&&(k.lines=M.lines,k.start=M.start,k.end=M.end,M=k),[C,I,M].filter(Boolean)}return[C,k]}function m(k,C,O){w(k.start,C.start,C.end,O),w(k.end,C.start,C.end,O)}function w(k,C,O,N){k.row==(N==1?C:O).row&&(k.column+=N*(O.column-C.column)),k.row+=N*(O.row-C.row)}function x(k,C){var O=k.lines,N=k.end;k.end=f(C);var I=k.end.row-k.start.row,M=O.splice(I,O.length),W=I?C.column:C.column-k.start.column;O.push(M[0].substring(0,W)),M[0]=M[0].substr(W);var F={start:f(C),end:N,lines:M,action:k.action};return F}function R(k,C){C=i(C);for(var O=k.length;O--;){for(var N=k[O],I=0;I<N.length;I++){var M=N[I],W=c(M,C);C=W[0],W.length!=2&&(W[2]?(N.splice(I+1,1,W[1],W[2]),I++):W[1]||(N.splice(I,1),I--))}N.length||k.splice(O,1)}return k}function $(k,C){for(var O=0;O<C.length;O++)for(var N=C[O],I=0;I<N.length;I++)R(k,N[I])}r.UndoManager=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,p=(function(){function v(s,f){this.foldData=s,Array.isArray(f)?this.folds=f:f=this.folds=[f];var i=f[f.length-1];this.range=new h(f[0].start.row,f[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return v.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(f){f.start.row+=s,f.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(f,i){return-f.range.compareEnd(i.start.row,i.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,f,i){var a=0,u=this.folds,g,o,c,m=!0;f==null&&(f=this.end.row,i=this.end.column);for(var w=0;w<u.length;w++){if(g=u[w],o=g.range.compareStart(f,i),o==-1){s(null,f,i,a,m);return}if(c=s(null,g.start.row,g.start.column,a,m),c=!c&&s(g.placeholder,g.start.row,g.start.column,a),c||o===0)return;m=!g.sameRow,a=g.end.column}s(null,f,i,a,m)},v.prototype.getNextFoldTo=function(s,f){for(var i,a,u=0;u<this.folds.length;u++){if(i=this.folds[u],a=i.range.compareEnd(s,f),a==-1)return{fold:i,kind:"after"};if(a===0)return{fold:i,kind:"inside"}}return null},v.prototype.addRemoveChars=function(s,f,i){var a=this.getNextFoldTo(s,f),u,g;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=f&&u.start.row!=s)window.console&&window.console.log(s,f,u);else if(u.start.row==s){g=this.folds;var o=g.indexOf(u);for(o===0&&(this.start.column+=i),o;o<g.length;o++){if(u=g[o],u.start.column+=i,!u.sameRow)return;u.end.column+=i}this.end.column+=i}}},v.prototype.split=function(s,f){var i=this.getNextFoldTo(s,f);if(!i||i.kind=="inside")return null;var a=i.fold,u=this.folds,g=this.foldData,o=u.indexOf(a),c=u[o-1];this.end.row=c.end.row,this.end.column=c.end.column,u=u.splice(o,u.length-o);var m=new v(g,u);return g.splice(g.indexOf(this)+1,0,m),m},v.prototype.merge=function(s){for(var f=s.folds,i=0;i<f.length;i++)this.addFold(f[i]);var a=this.foldData;a.splice(a.indexOf(s),1)},v.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(f){s.push(" "+f.toString())}),s.push("]"),s.join(`
199
- `)},v.prototype.idxToPosition=function(s){for(var f=0,i=0;i<this.folds.length;i++){var a=this.folds[i];if(s-=a.start.column-f,s<0)return{row:a.start.row,column:a.start.column+s};if(s-=a.placeholder.length,s<0)return a.start;f=a.end.column}return{row:this.end.row,column:this.end.column+s}},v})();r.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,d){var h=e("./range").Range,p=h.comparePoints,v=(function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(f,i,a){for(var u=this.ranges,g=a||0;g<u.length;g++){var o=u[g],c=p(f,o.end);if(!(c>0)){var m=p(f,o.start);return c===0?i&&m!==0?-g-2:g:m>0||m===0&&!i?g:-g-1}}return-g-1},s.prototype.add=function(f){var i=!f.isEmpty(),a=this.pointIndex(f.start,i);a<0&&(a=-a-1);var u=this.pointIndex(f.end,i,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,f)},s.prototype.addList=function(f){for(var i=[],a=f.length;a--;)i.push.apply(i,this.add(f[a]));return i},s.prototype.substractPoint=function(f){var i=this.pointIndex(f);if(i>=0)return this.ranges.splice(i,1)},s.prototype.merge=function(){var f=[],i=this.ranges;i=i.sort(function(c,m){return p(c.start,m.start)});for(var a=i[0],u,g=1;g<i.length;g++){u=a,a=i[g];var o=p(u.end,a.start);o<0||o==0&&!u.isEmpty()&&!a.isEmpty()||(p(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),i.splice(g,1),f.push(a),a=u,g--)}return this.ranges=i,f},s.prototype.contains=function(f,i){return this.pointIndex({row:f,column:i})>=0},s.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},s.prototype.rangeAtPoint=function(f){var i=this.pointIndex(f);if(i>=0)return this.ranges[i]},s.prototype.clipRows=function(f,i){var a=this.ranges;if(a[0].start.row>i||a[a.length-1].start.row<f)return[];var u=this.pointIndex({row:f,column:0});u<0&&(u=-u-1);var g=this.pointIndex({row:i,column:0},u);g<0&&(g=-g-1);for(var o=[],c=u;c<g;c++)o.push(a[c]);return o},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(f){this.session&&this.detach(),this.session=f,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(f){for(var i=f.start,a=f.end,u=i.row,g=a.row,o=this.ranges,c=0,m=o.length;c<m;c++){var w=o[c];if(w.end.row>=u)break}if(f.action=="insert")for(var x=g-u,R=-i.column+a.column;c<m;c++){var w=o[c];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=i.column&&(w.start.column==i.column&&this.$bias<=0||(w.start.column+=R,w.start.row+=x)),w.end.row==u&&w.end.column>=i.column){if(w.end.column==i.column&&this.$bias<0)continue;w.end.column==i.column&&R>0&&c<m-1&&w.end.column>w.start.column&&w.end.column==o[c+1].start.column&&(w.end.column-=R),w.end.column+=R,w.end.row+=x}}else for(var x=u-g,R=i.column-a.column;c<m;c++){var w=o[c];if(w.start.row>g)break;w.end.row<g&&(u<w.end.row||u==w.end.row&&i.column<w.end.column)?(w.end.row=u,w.end.column=i.column):w.end.row==g?w.end.column<=a.column?(x||w.end.column>i.column)&&(w.end.column=i.column,w.end.row=i.row):(w.end.column+=R,w.end.row+=x):w.end.row>g&&(w.end.row+=x),w.start.row<g&&(u<w.start.row||u==w.start.row&&i.column<w.start.column)?(w.start.row=u,w.start.column=i.column):w.start.row==g?w.start.column<=a.column?(x||w.start.column>i.column)&&(w.start.column=i.column,w.start.row=i.row):(w.start.column+=R,w.start.row+=x):w.start.row>g&&(w.start.row+=x)}if(x!=0&&c<m)for(;c<m;c++){var w=o[c];w.start.row+=x,w.end.row+=x}},s})();v.prototype.comparePoints=p,r.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,d){var h=this&&this.__extends||(function(){var u=function(g,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(c[w]=m[w])},u(g,o)};return function(g,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(g,o);function c(){this.constructor=g}g.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})(),p=e("../range_list").RangeList,v=(function(u){h(g,u);function g(o,c){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=c,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return g.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},g.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(c){c.setFoldLine(o)})},g.prototype.clone=function(){var o=this.range.clone(),c=new g(o,this.placeholder);return this.subFolds.forEach(function(m){c.subFolds.push(m.clone())}),c.collapseChildren=this.collapseChildren,c},g.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){f(o,this.start);for(var c=o.start.row,m=o.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(c,m),x==1);w++);var R=this.subFolds[w],$=0;if(x==0){if(R.range.containsRange(o))return R.addSubFold(o);$=1}for(var c=o.range.end.row,m=o.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(c,m),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,o),O=x==0?C.length-1:C.length,N=$;N<O;N++)o.addSubFold(C[N]);return o.setFoldLine(this.foldLine),o}},g.prototype.restoreRange=function(o){return a(o,this.start)},g})(p);function s(u,g){u.row-=g.row,u.row==0&&(u.column-=g.column)}function f(u,g){s(u.start,g),s(u.end,g)}function i(u,g){u.row==0&&(u.column+=g.column),u.row+=g.row}function a(u,g){i(u.start,g),i(u.end,g)}r.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(e,r,d){var h=e("../range").Range,p=e("./fold_line").FoldLine,v=e("./fold").Fold,s=e("../token_iterator").TokenIterator,f=e("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(a,u,g){var o=this.getFoldLine(a);if(!o)return null;for(var c=o.folds,m=0;m<c.length;m++){var w=c[m].range;if(w.contains(a,u)){if(g==1&&w.isEnd(a,u)&&!w.isEmpty()||g==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return c[m]}}},this.getFoldsInRange=function(a){var u=a.start,g=a.end,o=this.$foldData,c=[];u.column+=1,g.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=o[m].folds,R=0;R<x.length;R++){var $=x[R];if(w=$.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;c.push($)}}}}return u.column-=1,g.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,g=0;g<u.length;g++)for(var o=0;o<u[g].folds.length;o++)a.push(u[g].folds[o]);return a},this.getFoldStringAt=function(a,u,g,o){if(o=o||this.getFoldLine(a),!o)return null;for(var c={end:{column:0}},m,w,x=0;x<o.folds.length;x++){w=o.folds[x];var R=w.range.compareEnd(a,u);if(R==-1){m=this.getLine(w.start.row).substring(c.end.column,w.start.column);break}else if(R===0)return null;c=w}return m||(m=this.getLine(w.start.row).substring(c.end.column)),g==-1?m.substring(0,u-c.end.column):g==1?m.substring(u-c.end.column):m},this.getFoldLine=function(a,u){var g=this.$foldData,o=0;for(u&&(o=g.indexOf(u)),o==-1&&(o=0),o;o<g.length;o++){var c=g[o];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var g=this.$foldData,o=0;for(u&&(o=g.indexOf(u)),o==-1&&(o=0),o;o<g.length;o++){var c=g[o];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,u){for(var g=this.$foldData,o=u-a+1,c=0;c<g.length;c++){var m=g[c],w=m.end.row,x=m.start.row;if(w>=u){x<u&&(x>=a?o-=u-x:o=0);break}else w>=a&&(x>=a?o-=w-x:o-=w-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,g){return u.start.row-g.start.row}),a},this.addFold=function(a,u){var g=this.$foldData,o=!1,c;a instanceof v?c=a:(c=new v(u,a),c.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(c.range);var m=c.start.row,w=c.start.column,x=c.end.row,R=c.end.column,$=this.getFoldAt(m,w,1),k=this.getFoldAt(x,R,-1);if($&&k==$)return $.addSubFold(c);$&&!$.range.isStart(m,w)&&this.removeFold($),k&&!k.range.isEnd(x,R)&&this.removeFold(k);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(M){c.addSubFold(M)}));for(var O=0;O<g.length;O++){var N=g[O];if(x==N.start.row){N.addFold(c),o=!0;break}else if(m==N.end.row){if(N.addFold(c),o=!0,!c.sameRow){var I=g[O+1];if(I&&I.start.row==x){N.merge(I);break}}break}else if(x<=N.start.row)break}return o||(N=this.$addFoldLine(new p(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(N.start.row,N.start.row):this.$updateRowLengthCache(N.start.row,N.start.row),this.$modified=!0,this._signal("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,g=u.start.row,o=u.end.row,c=this.$foldData,m=u.folds;if(m.length==1)c.splice(c.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=u.split(a.start.row,a.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(g,o):this.$updateRowLengthCache(g,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],g=0;g<a.length;g++)u.push(a[g]);u.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var g,o;if(a==null)g=new h(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")g=new h(a,0,a,this.getLine(a).length);else if("row"in a)g=h.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(m){o=o.concat(this.unfold(m))},this),o;g=a}o=this.getFoldsInRangeList(g);for(var c=o;o.length==1&&h.comparePoints(o[0].start,g.start)<0&&h.comparePoints(o[0].end,g.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(g);if(u!=!1?this.removeFolds(o):this.expandFolds(o),c.length)return c},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var g=this.getFoldLine(a,u);return g?g.end.row:a},this.getRowFoldStart=function(a,u){var g=this.getFoldLine(a,u);return g?g.start.row:a},this.getFoldDisplayLine=function(a,u,g,o,c){o==null&&(o=a.start.row),c==null&&(c=0),u==null&&(u=a.end.row),g==null&&(g=this.getLine(u).length);var m=this.doc,w="";return a.walk(function(x,R,$,k){if(!(R<o)){if(R==o){if($<c)return;k=Math.max(c,k)}x!=null?w+=x:w+=m.getLine(R).substring(k,$)}},u,g),w},this.getDisplayLine=function(a,u,g,o){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,u,g,o);var m;return m=this.doc.getLine(a),m.substring(o||0,u||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var g=u.folds.map(function(o){return o.clone()});return new p(a,g)}),a},this.toggleFold=function(a){var u=this.selection,g=u.getRange(),o,c;if(g.isEmpty()){var m=g.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(c=this.findMatchingBracket(m))?g.comparePoint(c)==1?g.end=c:(g.start=c,g.start.column++,g.end.column--):(c=this.findMatchingBracket({row:m.row,column:m.column+1}))?(g.comparePoint(c)==1?g.end=c:g.start=c,g.start.column++):g=this.getCommentFoldRange(m.row,m.column)||g}else{var x=this.getFoldsInRange(g);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(g.start.row,g.start.column)),o&&o.range.toString()==g.toString()){this.expandFold(o);return}var R="...";if(!g.isMultiLine()){if(R=this.getTextRange(g),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,g)},this.getCommentFoldRange=function(a,u,g){var o=new s(this,a,u),c=o.getCurrentToken(),m=c&&c.type;if(c&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new h;if(g!=1){do c=o.stepBackward();while(c&&w.test(c.type));c=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+c.value.length,o=new s(this,a,u);var R=this.getState(o.$row);if(g!=-1){var $=-1;do if(c=o.stepForward(),$==-1){var k=this.getState(o.$row);R.toString()!==k.toString()&&($=o.$row)}else if(o.$row>$)break;while(c&&w.test(c.type));c=o.stepBackward()}else c=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,u,g,o){g==null&&(g=1e5);var c=this.foldWidgets;if(c){u=u||this.getLength(),a=a||0;for(var m=a;m<u;m++)if(c[m]==null&&(c[m]=this.getFoldWidget(m)),c[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=g,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var g=a.getTokens(u),o=0;o<g.length;o++){var c=g[o];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,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(a,u){var g=this.foldWidgets;if(!g||u&&g[a])return{};for(var o=a-1,c;o>=0;){var m=g[o];if(m==null&&(m=g[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(c||(c=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:c}},this.onFoldWidgetClick=function(a,u){u instanceof f&&(u=u.domEvent);var g={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(a,g);if(!o){var c=u.target||u.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var g=this.getFoldWidget(a),o=this.getLine(a),c=g==="end"?-1:1,m=this.getFoldAt(a,c===-1?0:o.length,c);if(m)return u.children||u.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(u.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var R=x.range.start.row+1,$=x.range.end.row;this.foldAll(R,$,u.all?1e4:0)}else u.children?($=w?w.end.row:this.getLength(),this.foldAll(a+1,$,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var g=this.$toggleFoldWidget(u,{});if(!g){var o=this.getParentFoldRangeData(u,!0);if(g=o.range||o.firstRange,g){u=g.start.row;var c=this.getFoldAt(u,this.getLine(u).length,1);c?this.removeFold(c):this.addFold("...",g)}}},this.updateFoldWidgets=function(a){var u=a.start.row,g=a.end.row-u;if(g===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,g+1,null);else{var o=Array(g+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,d){var h=e("../token_iterator").TokenIterator,p=e("../range").Range;function v(){this.findMatchingBracket=function(s,f){if(s.column==0)return null;var i=f||this.getLine(s.row).charAt(s.column-1);if(i=="")return null;var a=i.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],s):this.$findOpeningBracket(a[2],s):null},this.getBracketRange=function(s){var f=this.getLine(s.row),i=!0,a,u=f.charAt(s.column-1),g=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(g||(u=f.charAt(s.column),s={row:s.row,column:s.column+1},g=u&&u.match(/([\(\[\{])|([\)\]\}])/),i=!1),!g)return null;if(g[1]){var o=this.$findClosingBracket(g[1],s);if(!o)return null;a=p.fromPoints(s,o),i||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(g[2],s);if(!o)return null;a=p.fromPoints(o,s),i||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(s,f){var i=this.getLine(s.row),a=/([\(\[\{])|([\)\]\}])/,u=!f&&i.charAt(s.column-1),g=u&&u.match(a);if(g||(u=(f===void 0||f)&&i.charAt(s.column),s={row:s.row,column:s.column+1},g=u&&u.match(a)),!g)return null;var o=new p(s.row,s.column-1,s.row,s.column),c=g[1]?this.$findClosingBracket(g[1],s):this.$findOpeningBracket(g[2],s);if(!c)return[o];var m=new p(c.row,c.column,c.row,c.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,f,i){var a=this.$brackets[s],u=1,g=new h(this,f.row,f.column),o=g.getCurrentToken();if(o||(o=g.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=f.column-g.getCurrentTokenColumn()-2,m=o.value;;){for(;c>=0;){var w=m.charAt(c);if(w==a){if(u-=1,u==0)return{row:g.getCurrentTokenRow(),column:c+g.getCurrentTokenColumn()}}else w==s&&(u+=1);c-=1}do o=g.stepBackward();while(o&&!i.test(o.type));if(o==null)break;m=o.value,c=m.length-1}return null}},this.$findClosingBracket=function(s,f,i){var a=this.$brackets[s],u=1,g=new h(this,f.row,f.column),o=g.getCurrentToken();if(o||(o=g.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=f.column-g.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;c<w;){var x=m.charAt(c);if(x==a){if(u-=1,u==0)return{row:g.getCurrentTokenRow(),column:c+g.getCurrentTokenColumn()}}else x==s&&(u+=1);c+=1}do o=g.stepForward();while(o&&!i.test(o.type));if(o==null)break;c=0}return null}},this.getMatchingTags=function(s){var f=new h(this,s.row,s.column),i=this.$findTagName(f);if(i){var a=f.stepBackward();return a.value==="<"?this.$findClosingTag(f,i):this.$findOpeningTag(f,i)}},this.$findTagName=function(s){var f=s.getCurrentToken(),i=!1,a=!1;if(f&&f.type.indexOf("tag-name")===-1)do a?f=s.stepBackward():f=s.stepForward(),f&&(f.value==="/>"?a=!0:f.type.indexOf("tag-name")!==-1&&(i=!0));while(f&&!i);return f},this.$findClosingTag=function(s,f){var i,a=f.value,u=f.value,g=0,o=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);f=s.stepForward();var c=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+f.value.length),m=!1;do{if(i=f,i.type.indexOf("tag-close")!==-1&&!m){var w=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(f=s.stepForward(),f){if(f.value===">"&&!m){var w=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(f.type.indexOf("tag-name")!==-1){if(a=f.value,u===a){if(i.value==="<")g++;else if(i.value==="</"&&(g--,g<0)){s.stepBackward();var x=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);f=s.stepForward();var R=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=s.stepForward()),f&&f.value===">")var $=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(u===a&&f.value==="/>"&&(g--,g<0))var x=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),R=x,$=R,w=new p(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(f&&g>=0);if(o&&w&&x&&$&&c&&R)return{openTag:new p(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new p(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:c,closeTagName:R}},this.$findOpeningTag=function(s,f){var i=s.getCurrentToken(),a=f.value,u=0,g=s.getCurrentTokenRow(),o=s.getCurrentTokenColumn(),c=o+2,m=new p(g,o,g,c);s.stepForward();var w=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=s.stepForward()),!(!f||f.value!==">")){var x=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(f=i,g=s.getCurrentTokenRow(),o=s.getCurrentTokenColumn(),c=o+f.value.length,i=s.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(a===f.value)if(i.value==="<"){if(u++,u>0){var R=new p(g,o,g,c),$=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do f=s.stepForward();while(f&&f.value!==">");var k=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else i.value==="</"&&u--}else if(f.value==="/>"){for(var C=0,O=i;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===a){u--;break}else if(O.value==="<")break;O=s.stepBackward(),C++}for(var N=0;N<C;N++)s.stepForward()}}while(i&&u<=0);if($&&k&&m&&x&&R&&w)return{openTag:new p($.start.row,$.start.column,k.end.row,k.end.column),closeTag:new p(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:R,closeTagName:w}}}}r.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(e,r,d){var h=e("./lib/oop"),p=e("./lib/lang"),v=e("./bidihandler").BidiHandler,s=e("./config"),f=e("./lib/event_emitter").EventEmitter,i=e("./selection").Selection,a=e("./mode/text").Mode,u=e("./range").Range,g=e("./line_widgets").LineWidgets,o=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,x=(function(){function F(D,A){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
200
- `)},this.$gutterCustomWidgets={},this.bgTokenizer=new c(new a().getTokenizer(),this);var _=this;this.bgTokenizer.on("update",function(L){_._signal("tokenizerUpdate",L)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof D!="object"||!D.getLine)&&(D=new o(D)),this.setDocument(D),this.selection=new i(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(A),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var D=this;this.curOp=null,this.on("change",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.docChanged=!0},!0),this.on("changeSelection",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.selectionChanged=!0},!0),this.$operationResetTimer=p.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(D){if(this.curOp){if(!D||this.curOp.command)return;this.prevOp=this.curOp}D||(D={}),this.$operationResetTimer.schedule(),this.curOp={command:D.command||{},args:D.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",D)},F.prototype.endOperation=function(D){if(this.curOp){if(D&&D.returnValue===!1){this.curOp=null,this._signal("endOperation",D);return}if(D==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",D)}},F.prototype.setDocument=function(D){this.doc&&this.doc.off("change",this.$onChange),this.doc=D,D.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var D=new g(this);return this.widgetManager=D,this.$editor&&D.attach(this.$editor),D},set:function(D){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:D})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(D){if(!D){this.$docRowCache=[],this.$screenRowCache=[];return}var A=this.$docRowCache.length,_=this.$getRowCacheIndex(this.$docRowCache,D)+1;A>_&&(this.$docRowCache.splice(_,A),this.$screenRowCache.splice(_,A))},F.prototype.$getRowCacheIndex=function(D,A){for(var _=0,L=D.length-1;_<=L;){var B=_+L>>1,U=D[B];if(A>U)_=B+1;else if(A<U)L=B-1;else return B}return _-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(D){var A=D.data;this.$resetRowCache(A.start.row)},F.prototype.onChange=function(D){this.$modified=!0,this.$bidiHandler.onChange(D),this.$resetRowCache(D.start.row);var A=this.$updateInternalDataOnChange(D);!this.$fromUndo&&this.$undoManager&&(A&&A.length&&(this.$undoManager.add({action:"removeFolds",folds:A},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(D,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(D),this._signal("change",D)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(D){this.doc.setValue(D),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(D){typeof D=="string"&&(D=JSON.parse(D));var A=new w;A.$undoStack=D.history.$undoStack,A.$redoStack=D.history.$redoStack,A.mark=D.history.mark,A.$rev=D.history.rev;var _=new F(D.value);return D.folds.forEach(function(L){_.addFold("...",u.fromPoints(L.start,L.end))}),_.setAnnotations(D.annotations),_.setBreakpoints(D.breakpoints),_.setMode(D.mode),_.setScrollLeft(D.scrollLeft),_.setScrollTop(D.scrollTop),_.setUndoManager(A),_.selection.fromJSON(D.selection),_},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(D){return D.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(D){return this.bgTokenizer.getState(D)},F.prototype.getTokens=function(D){return this.bgTokenizer.getTokens(D)},F.prototype.getTokenAt=function(D,A){var _=this.bgTokenizer.getTokens(D),L,B=0;if(A==null){var U=_.length-1;B=this.getLine(D).length}else for(var U=0;U<_.length&&(B+=_[U].value.length,!(B>=A));U++);return L=_[U],L?(L.index=U,L.start=B-L.value.length,L):null},F.prototype.setUndoManager=function(D){if(this.$undoManager=D,this.$informUndoManager&&this.$informUndoManager.cancel(),D){var A=this;D.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=p.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?p.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(D){this.setOption("useSoftTabs",D)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(D){this.setOption("tabSize",D)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(D){return this.$useSoftTabs&&D.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(D){this.setOption("navigateWithinSoftTabs",D)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(D){this.setOption("overwrite",D)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(D,A){this.$decorations[D]||(this.$decorations[D]=""),this.$decorations[D]+=" "+A,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(D){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(D)},F.prototype.addGutterCustomWidget=function(D,A){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(D,A)},F.prototype.removeGutterDecoration=function(D,A){this.$decorations[D]=(this.$decorations[D]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(D){this.$breakpoints=[];for(var A=0;A<D.length;A++)this.$breakpoints[D[A]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(D,A){A===void 0&&(A="ace_breakpoint"),A?this.$breakpoints[D]=A:delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(D){delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(D,A,_,L){var B=this.$markerId++,U={range:D,type:_||"line",renderer:typeof _=="function"?_:null,clazz:A,inFront:!!L,id:B};return L?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},F.prototype.addDynamicMarker=function(D,A){if(D.update){var _=this.$markerId++;return D.id=_,D.inFront=!!A,A?(this.$frontMarkers[_]=D,this._signal("changeFrontMarker")):(this.$backMarkers[_]=D,this._signal("changeBackMarker")),D}},F.prototype.removeMarker=function(D){var A=this.$frontMarkers[D]||this.$backMarkers[D];if(A){var _=A.inFront?this.$frontMarkers:this.$backMarkers;delete _[D],this._signal(A.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(D){return D?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(D){if(!this.$searchHighlight){var A=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(A)}this.$searchHighlight.setRegexp(D)},F.prototype.highlightLines=function(D,A,_,L){typeof A!="number"&&(_=A,A=D),_||(_="ace_step");var B=new u(D,0,A,1/0);return B.id=this.addMarker(B,_,"fullLine",L),B},F.prototype.setAnnotations=function(D){this.$annotations=D,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(D){var A=D.match(/^.*?(\r?\n)/m);A?this.$autoNewLine=A[1]:this.$autoNewLine=`
201
- `},F.prototype.getWordRange=function(D,A){var _=this.getLine(D),L=!1;if(A>0&&(L=!!_.charAt(A-1).match(this.tokenRe)),L||(L=!!_.charAt(A).match(this.tokenRe)),L)var B=this.tokenRe;else if(/^\s+$/.test(_.slice(A-1,A+1)))var B=/\s/;else var B=this.nonTokenRe;var U=A;if(U>0){do U--;while(U>=0&&_.charAt(U).match(B));U++}for(var V=A;V<_.length&&_.charAt(V).match(B);)V++;return new u(D,U,D,V)},F.prototype.getAWordRange=function(D,A){for(var _=this.getWordRange(D,A),L=this.getLine(_.end.row);L.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},F.prototype.setNewLineMode=function(D){this.doc.setNewLineMode(D)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(D){this.setOption("useWorker",D)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(D){var A=D.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",D)},F.prototype.setMode=function(D,A){if(D&&typeof D=="object"){if(D.getTokenizer)return this.$onChangeMode(D);var _=D,L=_.path}else L=D||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[L]&&!_){this.$onChangeMode(this.$modes[L]),A&&A();return}this.$modeId=L,s.loadModule(["mode",L],(function(B){if(!this.destroyed){if(this.$modeId!==L)return A&&A();this.$modes[L]&&!_?this.$onChangeMode(this.$modes[L]):B&&B.Mode&&(B=new B.Mode(_),_||(this.$modes[L]=B,B.$id=L),this.$onChangeMode(B)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(D,A){if(A||(this.$modeId=D.$id),this.$mode!==D){var _=this.$mode;this.$mode=D,this.$stopWorker(),this.$useWorker&&this.$startWorker();var L=D.getTokenizer();if(L.on!==void 0){var B=this.onReloadTokenizer.bind(this);L.on("update",B)}this.bgTokenizer.setTokenizer(L),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=D.tokenRe,this.nonTokenRe=D.nonTokenRe,A||(D.attachToSession&&D.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(D.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:D}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(D){s.warn("Could not load worker",D),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(D){this.$scrollTop===D||isNaN(D)||(this.$scrollTop=D,this._signal("changeScrollTop",D))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(D){this.$scrollLeft===D||isNaN(D)||(this.$scrollLeft=D,this._signal("changeScrollLeft",D))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var D=0;return this.lineWidgets.forEach(function(A){A&&A.screenWidth>D&&(D=A.screenWidth)}),this.lineWidgetWidth=D},F.prototype.$computeWidth=function(D){if(this.$modified||D){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),_=this.$rowLengthCache,L=0,B=0,U=this.$foldData[B],V=U?U.start.row:1/0,K=A.length,ee=0;ee<K;ee++){if(ee>V){if(ee=U.end.row+1,ee>=K)break;U=this.$foldData[B++],V=U?U.start.row:1/0}_[ee]==null&&(_[ee]=this.$getStringScreenWidth(A[ee])[0]),_[ee]>L&&(L=_[ee])}this.screenWidth=L}},F.prototype.getLine=function(D){return this.doc.getLine(D)},F.prototype.getLines=function(D,A){return this.doc.getLines(D,A)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(D){return this.doc.getTextRange(D||this.selection.getRange())},F.prototype.insert=function(D,A){return this.doc.insert(D,A)},F.prototype.remove=function(D){return this.doc.remove(D)},F.prototype.removeFullLines=function(D,A){return this.doc.removeFullLines(D,A)},F.prototype.undoChanges=function(D,A){if(D.length){this.$fromUndo=!0;for(var _=D.length-1;_!=-1;_--){var L=D[_];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!A&&this.$undoSelect&&(D.selectionBefore?this.selection.fromJSON(D.selectionBefore):this.selection.setRange(this.$getUndoSelection(D,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(D,A){if(D.length){this.$fromUndo=!0;for(var _=0;_<D.length;_++){var L=D[_];(L.action=="insert"||L.action=="remove")&&this.doc.$safeApplyDelta(L)}!A&&this.$undoSelect&&(D.selectionAfter?this.selection.fromJSON(D.selectionAfter):this.selection.setRange(this.$getUndoSelection(D,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(D){this.$undoSelect=D},F.prototype.$getUndoSelection=function(D,A){function _(K){return A?K.action!=="insert":K.action==="insert"}for(var L,B,U=0;U<D.length;U++){var V=D[U];if(V.start){if(!L){_(V)?L=u.fromPoints(V.start,V.end):L=u.fromPoints(V.start,V.start);continue}_(V)?(B=V.start,L.compare(B.row,B.column)==-1&&L.setStart(B),B=V.end,L.compare(B.row,B.column)==1&&L.setEnd(B)):(B=V.start,L.compare(B.row,B.column)==-1&&(L=u.fromPoints(V.start,V.start)))}}return L},F.prototype.replace=function(D,A){return this.doc.replace(D,A)},F.prototype.moveText=function(D,A,_){var L=this.getTextRange(D),B=this.getFoldsInRange(D),U=u.fromPoints(A,A);if(!_){this.remove(D);var V=D.start.row-D.end.row,K=V?-D.end.column:D.start.column-D.end.column;K&&(U.start.row==D.end.row&&U.start.column>D.end.column&&(U.start.column+=K),U.end.row==D.end.row&&U.end.column>D.end.column&&(U.end.column+=K)),V&&U.start.row>=D.end.row&&(U.start.row+=V,U.end.row+=V)}if(U.end=this.insert(U.start,L),B.length){var ee=D.start,ae=U.start,V=ae.row-ee.row,K=ae.column-ee.column;this.addFolds(B.map(function(se){return se=se.clone(),se.start.row==ee.row&&(se.start.column+=K),se.end.row==ee.row&&(se.end.column+=K),se.start.row+=V,se.end.row+=V,se}))}return U},F.prototype.indentRows=function(D,A,_){_=_.replace(/\t/g,this.getTabString());for(var L=D;L<=A;L++)this.doc.insertInLine({row:L,column:0},_)},F.prototype.outdentRows=function(D){for(var A=D.collapseRows(),_=new u(0,0,0,0),L=this.getTabSize(),B=A.start.row;B<=A.end.row;++B){var U=this.getLine(B);_.start.row=B,_.end.row=B;for(var V=0;V<L&&U.charAt(V)==" ";++V);V<L&&U.charAt(V)==" "?(_.start.column=V,_.end.column=V+1):(_.start.column=0,_.end.column=V),this.remove(_)}},F.prototype.$moveLines=function(D,A,_){if(D=this.getRowFoldStart(D),A=this.getRowFoldEnd(A),_<0){var L=this.getRowFoldStart(D+_);if(L<0)return 0;var B=L-D}else if(_>0){var L=this.getRowFoldEnd(A+_);if(L>this.doc.getLength()-1)return 0;var B=L-A}else{D=this.$clipRowToDocument(D),A=this.$clipRowToDocument(A);var B=A-D+1}var U=new u(D,0,A,Number.MAX_VALUE),V=this.getFoldsInRange(U).map(function(ee){return ee=ee.clone(),ee.start.row+=B,ee.end.row+=B,ee}),K=_==0?this.doc.getLines(D,A):this.doc.removeFullLines(D,A);return this.doc.insertFullLines(D+B,K),V.length&&this.addFolds(V),B},F.prototype.moveLinesUp=function(D,A){return this.$moveLines(D,A,-1)},F.prototype.moveLinesDown=function(D,A){return this.$moveLines(D,A,1)},F.prototype.duplicateLines=function(D,A){return this.$moveLines(D,A,0)},F.prototype.$clipRowToDocument=function(D){return Math.max(0,Math.min(D,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(D,A){return A<0?0:Math.min(this.doc.getLine(D).length,A)},F.prototype.$clipPositionToDocument=function(D,A){if(A=Math.max(0,A),D<0)D=0,A=0;else{var _=this.doc.getLength();D>=_?(D=_-1,A=this.doc.getLine(_-1).length):A=Math.min(this.doc.getLine(D).length,A)}return{row:D,column:A}},F.prototype.$clipRangeToDocument=function(D){D.start.row<0?(D.start.row=0,D.start.column=0):D.start.column=this.$clipColumnToRow(D.start.row,D.start.column);var A=this.doc.getLength()-1;return D.end.row>A?(D.end.row=A,D.end.column=this.doc.getLine(A).length):D.end.column=this.$clipColumnToRow(D.end.row,D.end.column),D},F.prototype.setUseWrapMode=function(D){if(D!=this.$useWrapMode){if(this.$useWrapMode=D,this.$modified=!0,this.$resetRowCache(0),D){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(D,A){(this.$wrapLimitRange.min!==D||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:D,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(D,A){var _=this.$wrapLimitRange;_.max<0&&(_={min:A,max:A});var L=this.$constrainWrapLimit(D,_.min,_.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(D,A,_){return A&&(D=Math.max(A,D)),_&&(D=Math.min(_,D)),D},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(D){this.setWrapLimitRange(D,D)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(D){var A=this.$useWrapMode,_=D.action,L=D.start,B=D.end,U=L.row,V=B.row,K=V-U,ee=null;if(this.$updating=!0,K!=0)if(_==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(U,K);var ae=this.$foldData;ee=this.getFoldsInRange(D),this.removeFolds(ee);var Q=this.getFoldLine(B.row),oe=0;if(Q){Q.addRemoveChars(B.row,B.column,L.column-B.column),Q.shiftRow(-K);var se=this.getFoldLine(U);se&&se!==Q&&(se.merge(Q),Q=se),oe=ae.indexOf(Q)+1}for(oe;oe<ae.length;oe++){var Q=ae[oe];Q.start.row>=B.row&&Q.shiftRow(-K)}V=U}else{var ue=Array(K);ue.unshift(U,0);var pe=A?this.$wrapData:this.$rowLengthCache;pe.splice.apply(pe,ue);var ae=this.$foldData,Q=this.getFoldLine(U),oe=0;if(Q){var ve=Q.range.compareInside(L.row,L.column);ve==0?(Q=Q.split(L.row,L.column),Q&&(Q.shiftRow(K),Q.addRemoveChars(V,0,B.column-L.column))):ve==-1&&(Q.addRemoveChars(U,0,B.column-L.column),Q.shiftRow(K)),oe=ae.indexOf(Q)+1}for(oe;oe<ae.length;oe++){var Q=ae[oe];Q.start.row>=U&&Q.shiftRow(K)}}else{K=Math.abs(D.start.column-D.end.column),_==="remove"&&(ee=this.getFoldsInRange(D),this.removeFolds(ee),K=-K);var Q=this.getFoldLine(U);Q&&Q.addRemoveChars(U,L.column,K)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(U,V):this.$updateRowLengthCache(U,V),ee},F.prototype.$updateRowLengthCache=function(D,A){this.$rowLengthCache[D]=null,this.$rowLengthCache[A]=null},F.prototype.$updateWrapData=function(D,A){var _=this.doc.getAllLines(),L=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,V,K,ee=D;for(A=Math.min(A,_.length-1);ee<=A;)K=this.getFoldLine(ee,K),K?(V=[],K.walk((function(ae,Q,oe,se){var ue;if(ae!=null){ue=this.$getDisplayTokens(ae,V.length),ue[0]=k;for(var pe=1;pe<ue.length;pe++)ue[pe]=C}else ue=this.$getDisplayTokens(_[Q].substring(se,oe),V.length);V=V.concat(ue)}).bind(this),K.end.row,_[K.end.row].length+1),B[K.start.row]=this.$computeWrapSplits(V,U,L),ee=K.end.row+1):(V=this.$getDisplayTokens(_[ee]),B[ee]=this.$computeWrapSplits(V,U,L),ee++)},F.prototype.$computeWrapSplits=function(D,A,_){if(D.length==0)return[];var L=[],B=D.length,U=0,V=0,K=this.$wrapAsCode,ee=this.$indentedSoftWrap,ae=A<=Math.max(2*_,8)||ee===!1?0:Math.floor(A/2);function Q(){var ve=0;if(ae===0)return ve;if(ee)for(var $e=0;$e<D.length;$e++){var Re=D[$e];if(Re==N)ve+=1;else if(Re==I)ve+=_;else{if(Re==M)continue;break}}return K&&ee!==!1&&(ve+=_),Math.min(ve,ae)}function oe(ve){for(var $e=ve-U,Re=U;Re<ve;Re++){var Ye=D[Re];(Ye===12||Ye===2)&&($e-=1)}L.length||(se=Q(),L.indent=se),V+=$e,L.push(V),U=ve}for(var se=0;B-U>A-se;){var ue=U+A-se;if(D[ue-1]>=N&&D[ue]>=N){oe(ue);continue}if(D[ue]==k||D[ue]==C){for(ue;ue!=U-1&&D[ue]!=k;ue--);if(ue>U){oe(ue);continue}for(ue=U+A,ue;ue<D.length&&D[ue]==C;ue++);if(ue==D.length)break;oe(ue);continue}for(var pe=Math.max(ue-(A-(A>>2)),U-1);ue>pe&&D[ue]<k;)ue--;if(K){for(;ue>pe&&D[ue]<k;)ue--;for(;ue>pe&&D[ue]==O;)ue--}else for(;ue>pe&&D[ue]<N;)ue--;if(ue>pe){oe(++ue);continue}ue=U+A,D[ue]==$&&ue--,oe(ue-se)}return L},F.prototype.$getDisplayTokens=function(D,A){var _=[],L;A=A||0;for(var B=0;B<D.length;B++){var U=D.charCodeAt(B);if(U==9){L=this.getScreenTabSize(_.length+A),_.push(I);for(var V=1;V<L;V++)_.push(M)}else U==32?_.push(N):U>39&&U<48||U>57&&U<64?_.push(O):U>=4352&&W(U)?_.push(R,$):_.push(R)}return _},F.prototype.$getStringScreenWidth=function(D,A,_){if(A==0)return[0,0];A==null&&(A=1/0),_=_||0;var L,B;for(B=0;B<D.length&&(L=D.charCodeAt(B),L==9?_+=this.getScreenTabSize(_):L>=4352&&W(L)?_+=2:_+=1,!(_>A));B++);return[_,B]},F.prototype.getRowLength=function(D){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[D]&&this.lineWidgets[D].rowCount||0),!this.$useWrapMode||!this.$wrapData[D]?A:this.$wrapData[D].length+A},F.prototype.getRowLineCount=function(D){return!this.$useWrapMode||!this.$wrapData[D]?1:this.$wrapData[D].length+1},F.prototype.getRowWrapIndent=function(D){if(this.$useWrapMode){var A=this.screenToDocumentPosition(D,Number.MAX_VALUE),_=this.$wrapData[A.row];return _.length&&_[0]<A.column?_.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(D){var A=this.screenToDocumentPosition(D,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},F.prototype.getDocumentLastRowColumn=function(D,A){var _=this.documentToScreenRow(D,A);return this.getScreenLastRowColumn(_)},F.prototype.getDocumentLastRowColumnPosition=function(D,A){var _=this.documentToScreenRow(D,A);return this.screenToDocumentPosition(_,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(D){if(this.$useWrapMode)return this.$wrapData[D]},F.prototype.getScreenTabSize=function(D){return this.$tabSize-(D%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(D,A){return this.screenToDocumentPosition(D,A).row},F.prototype.screenToDocumentColumn=function(D,A){return this.screenToDocumentPosition(D,A).column},F.prototype.screenToDocumentPosition=function(D,A,_){if(D<0)return{row:0,column:0};var L,oe=0,B=0,U,Q=0,V=0,K=this.$screenRowCache,ee=this.$getRowCacheIndex(K,D),ae=K.length;if(ae&&ee>=0)var Q=K[ee],oe=this.$docRowCache[ee],se=D>K[ae-1];else var se=!ae;for(var ue=this.getLength()-1,pe=this.getNextFoldLine(oe),ve=pe?pe.start.row:1/0;Q<=D&&(V=this.getRowLength(oe),!(Q+V>D||oe>=ue));)Q+=V,oe++,oe>ve&&(oe=pe.end.row+1,pe=this.getNextFoldLine(oe,pe),ve=pe?pe.start.row:1/0),se&&(this.$docRowCache.push(oe),this.$screenRowCache.push(Q));if(pe&&pe.start.row<=oe)L=this.getFoldDisplayLine(pe),oe=pe.start.row;else{if(Q+V<=D||oe>ue)return{row:ue,column:this.getLine(ue).length};L=this.getLine(oe),pe=null}var $e=0,Re=Math.floor(D-Q);if(this.$useWrapMode){var Ye=this.$wrapData[oe];Ye&&(U=Ye[Re],Re>0&&Ye.length&&($e=Ye.indent,B=Ye[Re-1]||Ye[Ye.length-1],L=L.substring(B)))}return _!==void 0&&this.$bidiHandler.isBidiRow(Q+Re,oe,Re)&&(A=this.$bidiHandler.offsetToCol(_)),B+=this.$getStringScreenWidth(L,A-$e)[1],this.$useWrapMode&&B>=U&&(B=U-1),pe?pe.idxToPosition(B):{row:oe,column:B}},F.prototype.documentToScreenPosition=function(D,A){if(typeof A>"u")var _=this.$clipPositionToDocument(D.row,D.column);else _=this.$clipPositionToDocument(D,A);D=_.row,A=_.column;var Q=0,L=null,B=null;B=this.getFoldAt(D,A,1),B&&(D=B.start.row,A=B.start.column);var U,ae=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,D),ee=V.length;if(ee&&K>=0)var ae=V[K],Q=this.$screenRowCache[K],oe=D>V[ee-1];else var oe=!ee;for(var se=this.getNextFoldLine(ae),ue=se?se.start.row:1/0;ae<D;){if(ae>=ue){if(U=se.end.row+1,U>D)break;se=this.getNextFoldLine(U,se),ue=se?se.start.row:1/0}else U=ae+1;Q+=this.getRowLength(ae),ae=U,oe&&(this.$docRowCache.push(ae),this.$screenRowCache.push(Q))}var pe="";se&&ae>=ue?(pe=this.getFoldDisplayLine(se,D,A),L=se.start.row):(pe=this.getLine(D).substring(0,A),L=D);var ve=0;if(this.$useWrapMode){var $e=this.$wrapData[L];if($e){for(var Re=0;pe.length>=$e[Re];)Q++,Re++;pe=pe.substring($e[Re-1]||0,pe.length),ve=Re>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[ae]&&this.lineWidgets[ae].rowsAbove&&(Q+=this.lineWidgets[ae].rowsAbove),{row:Q,column:ve+this.$getStringScreenWidth(pe)[0]}},F.prototype.documentToScreenColumn=function(D,A){return this.documentToScreenPosition(D,A).column},F.prototype.documentToScreenRow=function(D,A){return this.documentToScreenPosition(D,A).row},F.prototype.getScreenLength=function(){var D=0,A=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,L=0,B=0,A=this.$foldData[B++],U=A?A.start.row:1/0;L<_;){var V=this.$wrapData[L];D+=V?V.length+1:1,L++,L>U&&(L=A.end.row+1,A=this.$foldData[B++],U=A?A.start.row:1/0)}else{D=this.getLength();for(var K=this.$foldData,B=0;B<K.length;B++)A=K[B],D-=A.end.row-A.start.row}return this.lineWidgets&&(D+=this.$getWidgetScreenLength()),D},F.prototype.$setFontMetrics=function(D){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,_,L){if(_===0)return[0,0];_||(_=1/0),L=L||0;var B,U;for(U=0;U<A.length&&(B=A.charAt(U),B===" "?L+=this.getScreenTabSize(L):L+=D.getCharacterWidth(B),!(L>_));U++);return[L,U]})},F.prototype.getPrecedingCharacter=function(){var D=this.selection.getCursor();if(D.column===0)return D.row===0?"":this.doc.getNewLineCharacter();var A=this.getLine(D.row);return A[D.column-1]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},F})();x.$uid=0,x.prototype.$modes=s.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=W,h.implement(x.prototype,f);var R=1,$=2,k=3,C=4,O=9,N=10,I=11,M=12;function W(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),s.defineOptions(x.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var D=typeof F=="number"?F:null;this.setWrapLimitRange(D,D),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,d){var h=e("./lib/lang"),p=e("./lib/oop"),v=e("./range").Range,s=(function(){function u(){this.$options={}}return u.prototype.set=function(g){return p.mixin(this.$options,g),this},u.prototype.getOptions=function(){return h.copyObject(this.$options)},u.prototype.setOptions=function(g){this.$options=g},u.prototype.find=function(g){var o=this.$options,c=this.$matchIterator(g,o);if(!c)return!1;var m=null;return c.forEach(function(w,x,R,$){return m=new v(w,x,R,$),x==$&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(g){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var c=o.range,m=c?g.getLines(c.start.row,c.end.row):g.doc.getAllLines(),w=[],x=o.re;if(o.$isMultiLine){var R=x.length,$=m.length-R,k;e:for(var C=x.offset||0;C<=$;C++){for(var O=0;O<R;O++)if(m[C+O].search(x[O])==-1)continue e;var N=m[C],I=m[C+R-1],M=N.length-N.match(x[0])[0].length,W=I.match(x[R-1])[0].length;k&&k.end.row===C&&k.end.column>M||(w.push(k=new v(C,M,C+R-1,W)),R>2&&(C=C+R-2))}}else for(var F,D=0;D<m.length;D++)if(this.$isMultilineSearch(o)){var A=m.length-1;if(F=this.$multiLineForward(g,x,D,A),F){var _=F.endRow<=A?F.endRow-1:A;_>D&&(D=_),w.push(new v(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=h.getMatchOffsets(m[D],x);for(var O=0;O<F.length;O++){var L=F[O];w.push(new v(D,L.offset,D,L.offset+L.length))}}if(c){for(var B=c.start.column,U=c.end.column,D=0,O=w.length-1;D<O&&w[D].start.column<B&&w[D].start.row==0;)D++;for(var V=c.end.row-c.start.row;D<O&&w[O].end.column>U&&w[O].end.row==V;)O--;for(w=w.slice(D,O+1),D=0,O=w.length;D<O;D++)w[D].start.row+=c.start.row,w[D].end.row+=c.start.row}return w},u.prototype.parseReplaceString=function(g){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",m=0,w=g.length;m<w;m++){var x=g.charCodeAt(m);if(x===o.Backslash){if(m++,m>=w){c+="\\";break}var R=g.charCodeAt(m);switch(R){case o.Backslash:c+="\\";break;case o.n:c+=`
202
- `;break;case o.t:c+=" ";break}continue}if(x===o.DollarSign){if(m++,m>=w){c+="$";break}var $=g.charCodeAt(m);if($===o.DollarSign){c+="$$";continue}if($===o.Digit0||$===o.Ampersand){c+="$&";continue}if(o.Digit1<=$&&$<=o.Digit9){c+="$"+g[m];continue}}c+=g[m]}return c||g},u.prototype.replace=function(g,o){var c=this.$options,m=this.$assembleRegExp(c);if(c.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(c);w&&(g=g.replace(/\r\n|\r|\n/g,`
203
- `));var x=m.exec(g);if(!x||!w&&x[0].length!=g.length)return null;if(o=c.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=g.replace(m,o),c.preserveCase){o=o.split("");for(var R=Math.min(g.length,g.length);R--;){var $=g[R];$&&$.toLowerCase()!=$?o[R]=o[R].toUpperCase():o[R]=o[R].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(g,o){if(g.needle instanceof RegExp)return g.re=g.needle;var c=g.needle;if(!g.needle)return g.re=!1;g.regExp||(c=h.escapeRegExp(c));var m=g.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),g.$supportsUnicodeFlag=!0,m+="u"}catch{g.$supportsUnicodeFlag=!1}if(g.wholeWord&&(c=f(c,g)),g.$isMultiLine=!o&&/[\n\r]/.test(c),g.$isMultiLine)return g.re=this.$assembleMultilineRegExp(c,m);try{var w=new RegExp(c,m)}catch{w=!1}return g.re=w},u.prototype.$assembleMultilineRegExp=function(g,o){for(var c=g.replace(/\r\n|\r|\n/g,`$
204
- ^`).split(`
205
- `),m=[],w=0;w<c.length;w++)try{m.push(new RegExp(c[w],o))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(g){return g.re&&/\\r\\n|\\r|\\n/.test(g.re.source)&&g.regExp&&!g.$isMultiLine},u.prototype.$multiLineForward=function(g,o,c,m){for(var w,x=a(g,c),R=c;R<=m;){for(var $=0;$<x&&!(R>m);$++){var k=g.getLine(R++);w=w==null?k:w+`
206
- `+k}var C=o.exec(w);if(o.lastIndex=0,C){var O=w.slice(0,C.index).split(`
207
- `),N=C[0].split(`
208
- `),I=c+O.length-1,M=O[O.length-1].length,W=I+N.length-1,F=N.length==1?M+N[0].length:N[N.length-1].length;return{startRow:I,startCol:M,endRow:W,endCol:F}}}return null},u.prototype.$multiLineBackward=function(g,o,c,m,w){for(var x,R=a(g,m),$=g.getLine(m).length-c,k=m;k>=w;){for(var C=0;C<R&&k>=w;C++){var O=g.getLine(k--);x=x==null?O:O+`
209
- `+x}var N=i(x,o,$);if(N){var I=x.slice(0,N.index).split(`
210
- `),M=N[0].split(`
211
- `),W=k+I.length,F=I[I.length-1].length,D=W+M.length-1,A=M.length==1?F+M[0].length:M[M.length-1].length;return{startRow:W,startCol:F,endRow:D,endCol:A}}}return null},u.prototype.$matchIterator=function(g,o){var c=this.$assembleRegExp(o);if(!c)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,x=this.$multiLineBackward,R=o.backwards==!0,$=o.skipCurrent!=!1,k=c.unicode,C=o.range,O=o.start;O||(O=C?C[R?"end":"start"]:g.selection.getRange()),O.start&&(O=O[$!=R?"end":"start"]);var N=C?C.start.row:0,I=C?C.end.row:g.getLength()-1;if(R)var M=function(D){var A=O.row;if(!F(A,O.column,D)){for(A--;A>=N;A--)if(F(A,Number.MAX_VALUE,D))return;if(o.wrap!=!1){for(A=I,N=O.row;A>=N;A--)if(F(A,Number.MAX_VALUE,D))return}}};else var M=function(D){var A=O.row;if(!F(A,O.column,D)){for(A=A+1;A<=I;A++)if(F(A,0,D))return;if(o.wrap!=!1){for(A=N,I=O.row;A<=I;A++)if(F(A,0,D))return}}};if(o.$isMultiLine)var W=c.length,F=function(D,A,_){var L=R?D-W+1:D;if(!(L<0||L+W>g.getLength())){var B=g.getLine(L),U=B.search(c[0]);if(!(!R&&U<A||U===-1)){for(var V=1;V<W;V++)if(B=g.getLine(L+V),B.search(c[V])==-1)return;var K=B.match(c[W-1])[0].length;if(!(R&&K>A)&&_(L,U,L+W-1,K))return!0}}};else if(R)var F=function(D,A,_){if(m){var L=x(g,c,A,D,N);if(!L)return!1;if(_(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var B=g.getLine(D),U=[],V,K=0;for(c.lastIndex=0;V=c.exec(B);){var ee=V[0].length;if(K=V.index,!ee){if(K>=B.length)break;c.lastIndex=K+=h.skipEmptyMatch(B,K,k)}if(V.index+ee>A)break;U.push(V.index,ee)}for(var ae=U.length-1;ae>=0;ae-=2){var Q=U[ae-1],ee=U[ae];if(_(D,Q,D,Q+ee))return!0}}};else var F=function(D,A,_){if(c.lastIndex=A,m){var L=w(g,c,D,I);if(L){var B=L.endRow<=I?L.endRow-1:I;B>D&&(D=B)}if(!L)return!1;if(_(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var U=g.getLine(D),V,K;K=c.exec(U);){var ee=K[0].length;if(V=K.index,_(D,V,D,V+ee))return!0;if(!ee&&(c.lastIndex=V+=h.skipEmptyMatch(U,V,k),V>=U.length))return!1}};return{forEach:M}},u})();function f(u,g){var o=h.supportsLookbehind();function c(R,$){$===void 0&&($=!0);var k=o&&g.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(R)||g.regExp?o&&g.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),w=m[0],x=m[m.length-1];return c(w)+u+c(x,!1)}function i(u,g,o){for(var c=null,m=0;m<=u.length;){g.lastIndex=m;var w=g.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-o)break;(!c||x>c.index+c[0].length)&&(c=w),m=w.index+1}return c}function a(u,g){var o=5e3,c={row:g,column:0},m=u.doc.positionToIndex(c),w=m+o,x=u.doc.indexToPosition(w),R=x.row;return R+1}r.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,d){var h=this&&this.__extends||(function(){var u=function(g,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(c[w]=m[w])},u(g,o)};return function(g,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(g,o);function c(){this.constructor=g}g.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})(),p=e("../lib/keys"),v=e("../lib/useragent"),s=p.KEY_MODS,f=(function(){function u(g,o){this.$init(g,o,!1)}return u.prototype.$init=function(g,o,c){this.platform=o||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(g),this.$singleCommand=c},u.prototype.addCommand=function(g){this.commands[g.name]&&this.removeCommand(g),this.commands[g.name]=g,g.bindKey&&this._buildKeyHash(g)},u.prototype.removeCommand=function(g,o){var c=g&&(typeof g=="string"?g:g.name);g=this.commands[c],o||delete this.commands[c];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==g)delete m[w];else if(Array.isArray(x)){var R=x.indexOf(g);R!=-1&&(x.splice(R,1),x.length==1&&(m[w]=x[0]))}}},u.prototype.bindKey=function(g,o,c){if(typeof g=="object"&&g&&(c==null&&(c=g.position),g=g[this.platform]),!!g){if(typeof o=="function")return this.addCommand({exec:o,bindKey:g,name:o.name||g});g.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(k){var C=this.parseKeys(k),O=s[C.hashId]+C.key;w+=(w?" ":"")+O,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var R=this.parseKeys(m),$=s[R.hashId]+R.key;this._addCommandToBinding(w+$,o,c)},this)}},u.prototype._addCommandToBinding=function(g,o,c){var m=this.commandKeyBinding,w;if(!o)delete m[g];else if(!m[g]||this.$singleCommand)m[g]=o;else{Array.isArray(m[g])?(w=m[g].indexOf(o))!=-1&&m[g].splice(w,1):m[g]=[m[g]],typeof c!="number"&&(c=i(o));var x=m[g];for(w=0;w<x.length;w++){var R=x[w],$=i(R);if($>c)break}x.splice(w,0,o)}},u.prototype.addCommands=function(g){g&&Object.keys(g).forEach(function(o){var c=g[o];if(c){if(typeof c=="string")return this.bindKey(c,o);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=o),this.addCommand(c))}},this)},u.prototype.removeCommands=function(g){Object.keys(g).forEach(function(o){this.removeCommand(g[o])},this)},u.prototype.bindKeys=function(g){Object.keys(g).forEach(function(o){this.bindKey(o,g[o])},this)},u.prototype._buildKeyHash=function(g){this.bindKey(g.bindKey,g)},u.prototype.parseKeys=function(g){var o=g.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),c=o.pop(),m=p[c];if(p.FUNCTION_KEYS[m])c=p.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var w=0,x=o.length;x--;){var R=p.KEY_MODS[o[x]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+g),!1;w|=R}return{key:c,hashId:w}},u.prototype.findKeyCommand=function(g,o){var c=s[g]+o;return this.commandKeyBinding[c]},u.prototype.handleKeyboard=function(g,o,c,m){if(!(m<0)){var w=s[o]+c,x=this.commandKeyBinding[w];return g.$keyChain&&(g.$keyChain+=" "+w,x=this.commandKeyBinding[g.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(g.$keyChain=g.$keyChain||w,{command:"null"}):(g.$keyChain&&((!o||o==4)&&c.length==1?g.$keyChain=g.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(g.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(g,o){return o.$keyChain||""},u})();function i(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){h(g,u);function g(o,c){var m=u.call(this,o,c)||this;return m.$singleCommand=!0,m}return g})(f);a.call=function(u,g,o){f.prototype.$init.call(u,g,o,!0)},f.call=function(u,g,o){f.prototype.$init.call(u,g,o,!1)},r.HashHandler=a,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,d){var h=this&&this.__extends||(function(){var i=function(a,u){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,o){g.__proto__=o}||function(g,o){for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(g[c]=o[c])},i(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");i(a,u);function g(){this.constructor=a}a.prototype=u===null?Object.create(u):(g.prototype=u.prototype,new g)}})(),p=e("../lib/oop"),v=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,f=(function(i){h(a,i);function a(u,g){var o=i.call(this,g,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),o}return a.prototype.exec=function(u,g,o){if(Array.isArray(u)){for(var c=u.length;c--;)if(this.exec(u[c],g,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:g,command:u,args:o};return this.canExecute(u,g)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(u,g){return typeof u=="string"&&(u=this.commands[u]),!(!u||g&&g.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(g))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._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(g){this.macro.push([g.command,g.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(g){typeof g=="string"?this.exec(g,u):this.exec(g[0],u,g[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(g){return typeof g[0]!="string"&&(g[0]=g[0].name),g[1]||(g=g[0]),g})},a})(v);p.implement(f.prototype,s),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,d){var h=e("../lib/lang"),p=e("../config"),v=e("../range").Range;function s(i,a){return{win:i,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(i){p.loadModule("ace/ext/settings_menu",function(a){a.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(i){p.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(i){p.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(i,a){typeof a=="number"&&!isNaN(a)&&i.gotoLine(a),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.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(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(i){p.loadModule("ace/ext/searchbox",function(a){a.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.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(i){i.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(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(i,a){i.navigateUp(a.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(i){i.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(i){i.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(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(i,a){i.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(i){i.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(i){i.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(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(i,a){i.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(i){i.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(i){i.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(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(i,a){i.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.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(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var a=i.$copyWithEmptySelection&&i.selection.isEmpty(),u=a?i.selection.getLineRange():i.selection.getRange();i._emit("cut",u),u.isEmpty()||i.session.remove(u),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,a){i.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(i){p.loadModule("ace/ext/searchbox",function(a){a.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(i){var a=i.selection.getRange();a.start.column=0,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(i){var a=i.selection.getRange();a.end.column=Number.MAX_VALUE,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,a){i.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,a){i.insert(h.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var a=i.selection.getRange();a.start.column=a.end.column=0,a.end.row++,i.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(i){for(var a=i.selection.isBackwards(),u=a?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),g=a?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),o=i.session.doc.getLine(u.row).length,c=i.session.doc.getTextRange(i.selection.getRange()),m=c.replace(/\n\s*/," ").length,w=i.session.doc.getLine(u.row),x=u.row+1;x<=g.row+1;x++){var R=h.stringTrimLeft(h.stringTrimRight(i.session.doc.getLine(x)));R.length!==0&&(R=" "+R),w+=R}g.row+1<i.session.doc.getLength()-1&&(w+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new v(u.row,0,g.row+2,0),w),m>0?(i.selection.moveCursorTo(u.row,u.column),i.selection.selectTo(u.row,u.column+m)):(o=i.session.doc.getLine(u.row).length>o?o+1:o,i.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(i){var a=i.session.doc.getLength()-1,u=i.session.doc.getLine(a).length,g=i.selection.rangeList.ranges,o=[];g.length<1&&(g=[i.selection.getRange()]);for(var c=0;c<g.length;c++)c==g.length-1&&(g[c].end.row===a&&g[c].end.column===u||o.push(new v(g[c].end.row,g[c].end.column,a,u))),c===0?g[c].start.row===0&&g[c].start.column===0||o.push(new v(0,0,g[c].start.row,g[c].start.column)):o.push(new v(g[c-1].end.row,g[c-1].end.column,g[c].start.row,g[c].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var c=0;c<o.length;c++)i.selection.addRange(o[c],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
212
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var a=i.getCursorPosition();i.selection.moveTo(a.row-1,Number.MAX_VALUE),i.insert(`
213
- `),a.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,d){var h=e("../lib/keys"),p=(function(){function s(f){this.editor=f,this.gutterLayer=f.renderer.$gutterLayer,this.element=f.renderer.$gutter,this.lines=f.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(f){if(this.annotationTooltip.isOpen){f.preventDefault(),f.keyCode===h.escape&&this.annotationTooltip.hide();return}if(f.target===this.element){if(f.keyCode!=h.enter)return;f.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(a),g=this.$findNearestAnnotation(a);if(!(u===null&&g===null)){var o=this.$findClosestNumber(u,g,a);if(o===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=g,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(f),setTimeout((function(){this.editor._signal("gutterkeydown",new v(f,this))}).bind(this),10)},s.prototype.$handleGutterKeyboardInteraction=function(f){if(f.keyCode===h.tab){f.preventDefault();return}if(f.keyCode===h.escape){f.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(f.keyCode===h.up){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(f.keyCode===h.down){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(f.keyCode===h.left){f.preventDefault(),this.$switchLane("annotation");return}if(f.keyCode===h.right){f.preventDefault(),this.$switchLane("fold");return}if(f.keyCode===h.enter||f.keyCode===h.space){switch(f.preventDefault(),this.activeLane){case"fold":var i=this.$rowIndexToRow(this.activeRowIndex),a=this.editor.session.$gutterCustomWidgets[i];if(a)a.callbacks&&a.callbacks.onClick&&a.callbacks.onClick(f,i);else if(this.gutterLayer.session.foldWidgets[i]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),f),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),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(f){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=this.$getFoldWidget(f).style.display!=="none";return i&&a},s.prototype.$isCustomWidgetVisible=function(f){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=!!this.$getCustomWidget(f);return i&&a},s.prototype.$isAnnotationVisible=function(f){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=this.$getAnnotation(f).style.display!=="none";return i&&a},s.prototype.$getFoldWidget=function(f){var i=this.lines.get(f),a=i.element;return a.childNodes[1]},s.prototype.$getCustomWidget=function(f){var i=this.lines.get(f),a=i.element;return a.childNodes[3]},s.prototype.$getAnnotation=function(f){var i=this.lines.get(f),a=i.element;return a.childNodes[2]},s.prototype.$findNearestFoldLaneWidget=function(f){if(this.$isCustomWidgetVisible(f)||this.$isFoldWidgetVisible(f))return f;for(var i=0;f-i>0||f+i<this.lines.getLength()-1;){if(i++,f-i>=0&&this.$isCustomWidgetVisible(f-i))return f-i;if(f+i<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(f+i))return f+i;if(f-i>=0&&this.$isFoldWidgetVisible(f-i))return f-i;if(f+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(f+i))return f+i}return null},s.prototype.$findNearestAnnotation=function(f){if(this.$isAnnotationVisible(f))return f;for(var i=0;f-i>0||f+i<this.lines.getLength()-1;){if(i++,f-i>=0&&this.$isAnnotationVisible(f-i))return f-i;if(f+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(f+i))return f+i}return null},s.prototype.$focusFoldWidget=function(f){if(f!=null){var i=this.$getFoldWidget(f);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},s.prototype.$focusCustomWidget=function(f){if(f!=null){var i=this.$getCustomWidget(f);i&&(i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus())}},s.prototype.$focusAnnotation=function(f){if(f!=null){var i=this.$getAnnotation(f);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},s.prototype.$blurFoldWidget=function(f){var i=this.$getFoldWidget(f);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},s.prototype.$blurCustomWidget=function(f){var i=this.$getCustomWidget(f);i&&(i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur())},s.prototype.$blurAnnotation=function(f){var i=this.$getAnnotation(f);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},s.prototype.$moveFoldWidgetUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveFoldWidgetDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveAnnotationUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$moveAnnotationDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$findClosestNumber=function(f,i,a){return f===null?i:i===null||Math.abs(a-f)<=Math.abs(a-i)?f:i},s.prototype.$switchLane=function(f){switch(f){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(a===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$isCustomWidgetVisible(a)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},s.prototype.$rowIndexToRow=function(f){var i=this.lines.get(f);return i?i.row:null},s.prototype.$rowToRowIndex=function(f){for(var i=0;i<this.lines.getLength();i++){var a=this.lines.get(i);if(a.row==f)return i}return null},s})();r.GutterKeyboardHandler=p;var v=(function(){function s(f,i){this.gutterKeyboardHandler=i,this.domEvent=f}return s.prototype.getKey=function(){return h.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})();r.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(e,r,d){var h=this&&this.__values||function(A){var _=typeof Symbol=="function"&&Symbol.iterator,L=_&&A[_],B=0;if(L)return L.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&B>=A.length&&(A=void 0),{value:A&&A[B++],done:!A}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},p=e("./lib/oop"),v=e("./lib/dom"),s=e("./lib/lang"),f=e("./lib/useragent"),i=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,g=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,c=e("./search").Search,m=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,$=e("./config"),k=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,O=e("./config").nls,N=e("./clipboard"),I=e("./lib/keys"),M=e("./lib/event"),W=e("./tooltip").HoverTooltip,F=(function(){function A(_,L,B){this.id="editor"+ ++A.$uid,this.session,this.$toDestroy=[];var U=_.getContainerElement();this.container=U,this.renderer=_,this.commands=new x(f.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new i(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new g(this),this.$search=new c().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(V,K){K._$emitInputEvent.schedule(31)}),this.setSession(L||B&&B.session||new o("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(_){this.session.startOperation(_)},A.prototype.endOperation=function(_){this.session.endOperation(_)},A.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},A.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,B=L&&L.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),V=this.renderer.layerConfig;(U.start.row>=V.lastRow||U.end.row<=V.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var L=this.prevOp,B=this.$mergeableCommands,U=L.command&&_.command.name==L.command.name;if(_.command.name=="insertstring"){var V=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(V)||/\s/.test(L.args)),this.mergeNextCommand=!0}else U=U&&B.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(_,L){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var B=this;$.loadModule(["keybinding",_],function(U){B.$keybindingId==_&&B.keyBinding.setKeyboardHandler(U&&U.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),L&&L()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){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 B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.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=_.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(_)),this._signal("changeSession",{session:_,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),_&&_._signal("changeEditor",{editor:this}),_&&(_.$editor=this),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(_,L){return this.session.doc.setValue(_),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),_},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(_){this.renderer.onResize(_)},A.prototype.setTheme=function(_,L){this.renderer.setTheme(_,L)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(_,L){this.renderer.setStyle(_,L)},A.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||v.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(_){this.setOption("fontSize",_)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var L=_.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(se){L.removeMarker(se)}),L.$bracketHighlight=null);var B=_.getCursorPosition(),U=_.getKeyboardHandler(),V=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(_),K=L.getMatchingBracketRanges(B,V);if(!K){var ee=new k(L,B.row,B.column),ae=ee.getCurrentToken();if(ae&&/\b(?:tag-open|tag-name)/.test(ae.type)){var Q=L.getMatchingTags(B);Q&&(K=[Q.openTagName.isEmpty()?Q.openTag:Q.openTagName,Q.closeTagName.isEmpty()?Q.closeTag:Q.closeTagName])}}if(!K&&L.$mode.getMatching&&(K=L.$mode.getMatching(_.session)),!K){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var oe="ace_bracket";Array.isArray(K)?K.length==1&&(oe="ace_error_bracket"):K=[K],K.length==2&&(m.comparePoints(K[0].end,K[1].start)==0?K=[m.fromPoints(K[0].start,K[1].end)]:m.comparePoints(K[0].start,K[1].end)==0&&(K=[m.fromPoints(K[1].start,K[0].end)])),L.$bracketHighlight={ranges:K,markerIds:K.map(function(se){return L.addMarker(se,oe,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},A.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(_){var L=this.session.$useWrapMode,B=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,B,L),this._signal("change",_),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(_){var L=_.data;this.renderer.updateLines(L.first,L.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),_.$highlightLineMarker&&!L)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&L){var B=new m(L.row,L.column,L.row,1/0);B.id=_.addMarker(B,"ace_active-line","screenLine"),_.$highlightLineMarker=B}else L&&(_.$highlightLineMarker.start.row=L.row,_.$highlightLineMarker.end.row=L.row,_.$highlightLineMarker.start.column=L.column,_._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(_){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();L.$selectionMarker=L.addMarker(B,"ace_selection",U)}var V=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(V),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var B=L.start.column,U=L.end.column,V=_.getLine(L.start.row),K=V.substring(B,U);if(!(K.length>5e3||!/[\w\d]/.test(K))){var ee=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:K}),ae=V.substring(B-1,U+1);if(ee.test(ae))return ee}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var _=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),B=!1;if(!_&&this.$copyWithEmptySelection){B=!0;for(var U=this.selection.getAllRanges(),V=0;V<U.length;V++){var K=U[V];V&&U[V-1].start.row==K.start.row||(_+=this.session.getLine(K.start.row)+L)}}var ee={text:_};return this._signal("copy",ee),N.lineMode=B?ee.text:!1,ee.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(_,L){var B={text:_,event:L};this.commands.exec("paste",this,B)},A.prototype.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var L=_.text,B=L===N.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(B)this.selection.rangeList.ranges.forEach(function(oe){U.insert({row:oe.start.row,column:0},L)});else{var V=L.split(/\r\n|\r|\n/),K=this.selection.rangeList.ranges,ee=V.length==2&&(!V[0]||!V[1]);if(V.length!=K.length||ee)return this.commands.exec("insertstring",this,L);for(var ae=K.length;ae--;){var Q=K[ae];Q.isEmpty()||U.remove(Q),U.insert(Q.start,V[ae])}}},A.prototype.execCommand=function(_,L){return this.commands.exec(_,this,L)},A.prototype.insert=function(_,L){var B=this.session,U=B.getMode(),V=this.getCursorPosition();if(this.getBehavioursEnabled()&&!L){var K=U.transformAction(B.getState(V.row),"insertion",this,B,_);K&&(_!==K.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),_=K.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
214
- `)==-1){var ee=m.fromPoints(V,V);ee.end.column+=_.length,this.session.remove(ee)}}else{var ee=this.getSelectionRange();V=this.session.remove(ee),this.clearSelection()}if(_==`
215
- `||_==`\r
216
- `){var se=B.getLine(V.row);if(V.column>se.search(/\S|$/)){var ae=se.substr(V.column).search(/\S|$/);B.doc.removeInLine(V.row,V.column,V.column+ae)}}this.clearSelection();var Q=V.column,oe=B.getState(V.row),se=B.getLine(V.row),ue=U.checkOutdent(oe,se,_);if(B.insert(V,_),K&&K.selection&&(K.selection.length==2?this.selection.setSelectionRange(new m(V.row,Q+K.selection[0],V.row,Q+K.selection[1])):this.selection.setSelectionRange(new m(V.row+K.selection[0],K.selection[1],V.row+K.selection[2],K.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(_)){var pe=U.getNextLineIndent(oe,se.slice(0,V.column),B.getTabString());B.insert({row:V.row+1,column:0},pe)}ue&&U.autoOutdent(oe,B,V.row)}},A.prototype.autoIndent=function(){for(var _=this.session,L=_.getMode(),B=this.selection.isEmpty()?[new m(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",V="",K="",ee=_.getTabString(),ae=0;ae<B.length;ae++)for(var Q=B[ae].start.row,oe=B[ae].end.row,se=Q;se<=oe;se++){se>0&&(U=_.getState(se-1),V=_.getLine(se-1),K=L.getNextLineIndent(U,V,ee));var ue=_.getLine(se),pe=L.$getIndent(ue);if(K!==pe){if(pe.length>0){var ve=new m(se,0,se,pe.length);_.remove(ve)}K.length>0&&_.insert({row:se,column:0},K)}L.autoOutdent(U,_,se)}},A.prototype.onTextInput=function(_,L){if(!L)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,_,L);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},A.prototype.applyComposition=function(_,L){if(L.extendLeft||L.extendRight){var B=this.selection.getRange();B.start.column-=L.extendLeft,B.end.column+=L.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!_&&!B.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),L.restoreStart||L.restoreEnd){var B=this.selection.getRange();B.start.column-=L.restoreStart,B.end.column-=L.restoreEnd,this.selection.setRange(B)}},A.prototype.onCommandKey=function(_,L,B){return this.keyBinding.onCommandKey(_,L,B)},A.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(L.start.row),V=B.getMode().transformAction(U,"deletion",this,B,L);if(L.end.column===0){var K=B.getTextRange(L);if(K[K.length-1]==`
217
- `){var ee=B.getLine(L.end.row);/^\s+$/.test(ee)&&(L.end.column=ee.length)}}V&&(L=V)}this.session.remove(L),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
218
- `),this.moveCursorToPosition(_)},A.prototype.setGhostText=function(_,L){this.renderer.setGhostText(_,L)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),L=_.column;if(L!==0){var B=this.session.getLine(_.row),U,V;L<B.length?(U=B.charAt(L)+B.charAt(L-1),V=new m(_.row,L-1,_.row,L+1)):(U=B.charAt(L-1)+B.charAt(L-2),V=new m(_.row,L-2,_.row,L)),this.session.replace(V,U),this.session.selection.moveToPosition(V.end)}}},A.prototype.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),B=this.session.getTextRange(L);this.session.replace(L,B.toLowerCase()),this.selection.setSelectionRange(_)},A.prototype.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),B=this.session.getTextRange(L);this.session.replace(L,B.toUpperCase()),this.selection.setSelectionRange(_)},A.prototype.indent=function(){var _=this.session,L=this.getSelectionRange();if(L.start.row<L.end.row){var B=this.$getSelectedRows();_.indentRows(B.first,B.last," ");return}else if(L.start.column<L.end.column){var U=_.getTextRange(L);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();_.indentRows(B.first,B.last," ");return}}var V=_.getLine(L.start.row),K=L.start,ee=_.getTabSize(),ae=_.documentToScreenColumn(K.row,K.column);if(this.session.getUseSoftTabs())var Q=ee-ae%ee,oe=s.stringRepeat(" ",Q);else{for(var Q=ae%ee;V[L.start.column-1]==" "&&Q;)L.start.column--,Q--;this.selection.setSelectionRange(L),oe=" "}return this.insert(oe)},A.prototype.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},A.prototype.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},A.prototype.sortLines=function(){for(var _=this.$getSelectedRows(),L=this.session,B=[],U=_.first;U<=_.last;U++)B.push(L.getLine(U));B.sort(function(ee,ae){return ee.toLowerCase()<ae.toLowerCase()?-1:ee.toLowerCase()>ae.toLowerCase()?1:0});for(var V=new m(0,0,0,0),U=_.first;U<=_.last;U++){var K=L.getLine(U);V.start.row=U,V.end.row=U,V.end.column=K.length,L.replace(V,B[U-_.first])}},A.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,L.first,L.last)},A.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),L=this.session.getState(_.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,B,_)},A.prototype.getNumberAt=function(_,L){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(_);B.lastIndex<L;){var V=B.exec(U);if(V.index<=L&&V.index+V[0].length>=L){var K={value:V[0],start:V.index,end:V.index+V[0].length};return K}}return null},A.prototype.modifyNumber=function(_){var L=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new m(L,B-1,L,B),V=this.session.getTextRange(U);if(!isNaN(parseFloat(V))&&isFinite(V)){var K=this.getNumberAt(L,B);if(K){var ee=K.value.indexOf(".")>=0?K.start+K.value.indexOf(".")+1:K.end,ae=K.start+K.value.length-ee,Q=parseFloat(K.value);Q*=Math.pow(10,ae),ee!==K.end&&B<ee?_*=Math.pow(10,K.end-B-1):_*=Math.pow(10,K.end-B),Q+=_,Q/=Math.pow(10,ae);var oe=Q.toFixed(ae),se=new m(L,K.start,L,K.end);this.session.replace(se,oe),this.moveCursorTo(L,Math.max(K.start+1,B+oe.length-K.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var _=this.selection.getCursor().row,L=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),U=this.selection.getWordRange().start.column,V=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),K=L-U-1;K<0&&(K=0);var ee=0,ae=0,Q=this;B.match(/[A-Za-z0-9_]+/)&&V.forEach(function(Ge,at){ae=ee+Ge.length,K>=ee&&K<=ae&&(B=Ge,Q.selection.clearSelection(),Q.moveCursorTo(_,ee+U),Q.selection.selectTo(_,ae+U)),ee=ae});for(var oe=this.$toggleWordPairs,se,ue=0;ue<oe.length;ue++)for(var pe=oe[ue],ve=0;ve<=1;ve++){var $e=+!ve,Re=B.match(new RegExp("^\\s?_?("+s.escapeRegExp(pe[ve])+")\\s?$","i"));if(Re){var Ye=B.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Re[1])+")($|\\s)","g"));Ye&&(se=B.replace(new RegExp(s.escapeRegExp(pe[ve]),"i"),function(Ge){var at=pe[$e];return Ge.toUpperCase()==Ge?at=at.toUpperCase():Ge.charAt(0).toUpperCase()==Ge.charAt(0)&&(at=at.substr(0,0)+pe[$e].charAt(0).toUpperCase()+at.substr(1)),at}),this.insert(se),se="")}}},A.prototype.findLinkAt=function(_,L){var B,U,V=this.session.getLine(_),K=V.split(/((?:https?|ftp):\/\/[\S]+)/),ee=L;ee<0&&(ee=0);var ae=0,Q=0,oe;try{for(var se=h(K),ue=se.next();!ue.done;ue=se.next()){var pe=ue.value;if(Q=ae+pe.length,ee>=ae&&ee<=Q&&pe.match(/((?:https?|ftp):\/\/[\S]+)/)){oe=pe.replace(/[\s:.,'";}\]]+$/,"");break}ae=Q}}catch(ve){B={error:ve}}finally{try{ue&&!ue.done&&(U=se.return)&&U.call(se)}finally{if(B)throw B.error}}return oe},A.prototype.openLink=function(){var _=this.selection.getCursor(),L=this.findLinkAt(_.row,_.column);return L&&window.open(L,"_blank"),L!=null},A.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var _=this.selection,L=this.session,B=_.getRange(),U=_.isBackwards();if(B.isEmpty()){var V=B.start.row;L.duplicateLines(V,V)}else{var K=U?B.start:B.end,ee=L.insert(K,L.getTextRange(B));B.start=K,B.end=ee,_.setSelectionRange(B,U)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(_,L,B){return this.session.moveText(_,L,B)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(_,L){var B,U,V=this.selection;if(!V.inMultiSelectMode||this.inVirtualSelectionMode){var K=V.toOrientedRange();B=this.$getSelectedRows(K),U=this.session.$moveLines(B.first,B.last,L?0:_),L&&_==-1&&(U=0),K.moveBy(U,0),V.fromOrientedRange(K)}else{var ee=V.rangeList.ranges;V.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var ae=0,Q=0,oe=ee.length,se=0;se<oe;se++){var ue=se;ee[se].moveBy(ae,0),B=this.$getSelectedRows(ee[se]);for(var pe=B.first,ve=B.last;++se<oe;){Q&&ee[se].moveBy(Q,0);var $e=this.$getSelectedRows(ee[se]);if(L&&$e.first!=ve||!L&&$e.first>ve+1)break;ve=$e.last}for(se--,ae=this.session.$moveLines(pe,ve,L?0:_),L&&_==-1&&(ue=se+1);ue<=se;)ee[ue].moveBy(ae,0),ue++;L||(ae=0),Q+=ae}V.fromOrientedRange(V.ranges[0]),V.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},A.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},A.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(_,L){var B=this.renderer,U=this.renderer.layerConfig,V=_*Math.floor(U.height/U.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(V,0)}):L===!1&&(this.selection.moveCursorBy(V,0),this.selection.clearSelection());var K=B.scrollTop;B.scrollBy(0,V*U.lineHeight),L!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(K)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},A.prototype.scrollToLine=function(_,L,B,U){this.renderer.scrollToLine(_,L,B,U)},A.prototype.centerSelection=function(){var _=this.getSelectionRange(),L={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(L,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(_,L){this.selection.moveCursorTo(_,L)},A.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},A.prototype.jumpToMatching=function(_,L){var B=this.getCursorPosition(),U=new k(this.session,B.row,B.column),V=U.getCurrentToken(),K=0;V&&V.type.indexOf("tag-name")!==-1&&(V=U.stepBackward());var ee=V||U.stepForward();if(ee){var ae,Q=!1,oe={},se=B.column-ee.start,ue,pe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(ee.value.match(/[{}()\[\]]/g)){for(;se<ee.value.length&&!Q;se++)if(pe[ee.value[se]])switch(ue=pe[ee.value[se]]+"."+ee.type.replace("rparen","lparen"),isNaN(oe[ue])&&(oe[ue]=0),ee.value[se]){case"(":case"[":case"{":oe[ue]++;break;case")":case"]":case"}":oe[ue]--,oe[ue]===-1&&(ae="bracket",Q=!0);break}}else ee.type.indexOf("tag-name")!==-1&&(isNaN(oe[ee.value])&&(oe[ee.value]=0),V.value==="<"&&K>1?oe[ee.value]++:V.value==="</"&&oe[ee.value]--,oe[ee.value]===-1&&(ae="tag",Q=!0));Q||(V=ee,K++,ee=U.stepForward(),se=0)}while(ee&&!Q);if(ae){var ve,$e;if(ae==="bracket")ve=this.session.getBracketRange(B),ve||(ve=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1),$e=ve.start,(L||$e.row===B.row&&Math.abs($e.column-B.column)<2)&&(ve=this.session.getBracketRange($e)));else if(ae==="tag"){if(!ee||ee.type.indexOf("tag-name")===-1)return;if(ve=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),ve.compare(B.row,B.column)===0){var Re=this.session.getMatchingTags(B);Re&&(Re.openTag.contains(B.row,B.column)?(ve=Re.closeTag,$e=ve.start):(ve=Re.openTag,Re.closeTag.start.row===B.row&&Re.closeTag.start.column===B.column?$e=ve.end:$e=ve.start))}$e=$e||ve.start}$e=ve&&ve.cursor||$e,$e&&(_?ve&&L?this.selection.setRange(ve):ve&&ve.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},A.prototype.gotoLine=function(_,L,B){this.selection.clearSelection(),this.session.unfold({row:_-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,L||0),this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,B)},A.prototype.navigateTo=function(_,L){this.selection.moveTo(_,L)},A.prototype.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},A.prototype.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},A.prototype.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},A.prototype.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(_,L){L&&this.$search.set(L);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,_)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},A.prototype.replaceAll=function(_,L){L&&this.$search.set(L);var B=this.$search.findAll(this.session),U=0;if(!B.length)return U;var V=this.getSelectionRange();this.selection.moveTo(0,0);for(var K=B.length-1;K>=0;--K)this.$tryReplace(B[K],_)&&U++;return this.selection.setSelectionRange(V),U},A.prototype.$tryReplace=function(_,L){var B=this.session.getTextRange(_);return L=this.$search.replace(B,L),L!==null?(_.end=this.session.replace(_,L),_):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(_,L,B){L||(L={}),typeof _=="string"||_ instanceof RegExp?L.needle=_:typeof _=="object"&&p.mixin(L,_);var U=this.selection.getRange();L.needle==null&&(_=this.session.getTextRange(U)||this.$search.$options.needle,_||(U=this.session.getWordRange(U.start.row,U.start.column),_=this.session.getTextRange(U)),this.$search.set({needle:_})),this.$search.set(L),L.start||this.$search.set({start:U});var V=this.$search.find(this.session);if(L.preventScroll)return V;if(V)return this.revealRange(V,B),V;L.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},A.prototype.findNext=function(_,L){this.find({skipCurrent:!0,backwards:!1},_,L)},A.prototype.findPrevious=function(_,L){this.find(_,{skipCurrent:!0,backwards:!0},L)},A.prototype.revealRange=function(_,L){this.session.unfold(_),this.selection.setSelectionRange(_);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),L!==!1&&this.renderer.animateScrolling(B)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.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()},A.prototype.setAutoScrollEditorIntoView=function(_){if(_){var L,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var V=this.$scrollAnchor;V.style.cssText="position:absolute",this.container.insertBefore(V,this.container.firstChild);var K=this.on("changeSelection",function(){U=!0}),ee=this.renderer.on("beforeRender",function(){U&&(L=B.renderer.container.getBoundingClientRect())}),ae=this.renderer.on("afterRender",function(){if(U&&L&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var Q=B.renderer,oe=Q.$cursorLayer.$pixelPos,se=Q.layerConfig,ue=oe.top-se.offset;oe.top>=0&&ue+L.top<0?U=!0:oe.top<se.height&&oe.top+L.top+se.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(V.style.top=ue+"px",V.style.left=oe.left+"px",V.style.height=se.lineHeight+"px",V.scrollIntoView(U)),U=L=null}});this.setAutoScrollEditorIntoView=function(Q){Q||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",K),this.renderer.off("afterRender",ae),this.renderer.off("beforeRender",ee))}}},A.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(_)),L.isBlinking=!this.$readOnly&&_!="wide",v.setCssClass(L.element,"ace_slim-cursors",/slim/.test(_)))},A.prototype.prompt=function(_,L,B){var U=this;$.loadModule("ace/ext/prompt",function(V){V.prompt(U,_,L,B)})},Object.defineProperty(A.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new W(this.container))},set:function(_){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=_},enumerable:!1,configurable:!0}),A})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],p.implement(F.prototype,w),$.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var _=this;if(this.textInput.setReadOnly(A),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),U=B.key.length==1),!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){var V=v.createElement("div");V.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),_.hoverTooltip.isOpen||_.hoverTooltip.showForRange(_,_.getSelectionRange(),V)}else _.hoverTooltip&&_.hoverTooltip.isOpen&&_.hoverTooltip.hide()});var L=this.textInput.getElement();A?(M.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(L,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){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(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?D.attach(this):D.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var _=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(_&&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(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),v.addCssClass(this.container,"ace_hasPlaceholder");var L=v.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var _={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},L=function(U){if(U.target==this.renderer.scroller&&U.keyCode===I.enter){U.preventDefault();var V=this.getCursorPosition().row;this.isRowVisible(V)||this.scrollToLine(V,!0,!0),this.focus()}},B;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",O("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(_),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",O("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",O("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),B||(B=new C(this)),B.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",L.bind(this)),this.commands.removeCommand(_),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),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var D={getText:function(A,_){return(Math.abs(A.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function(A,_,L){return Math.max(_.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(A,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("../lib/dom"),p=(function(){function v(s,f){this.element=s,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(s){h.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(s,f){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(s,f,i){var a=f.firstRowScreen*f.lineHeight,u=Math.floor(a/this.canvasHeight),g=i.documentToScreenRow(s,0)*f.lineHeight;return g-u*this.canvasHeight},v.prototype.computeLineHeight=function(s,f,i){return f.lineHeight*i.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 f=h.createFragment(this.element),i=0;i<s.length;i++)f.appendChild(s[i].element);this.element.appendChild(f)}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 f=h.createFragment(this.element),i=0;i<s.length;i++)f.appendChild(s[i].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}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,f,i,a){var u=this.cellCache.pop();if(!u){var g=h.createElement("div");a&&a(g),this.element.appendChild(g),u={element:g,text:"",row:s}}return u.row=s,u},v})();r.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(e,r,d){var h=e("../lib/dom"),p=e("../lib/oop"),v=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,f=e("./lines").Lines,i=e("../config").nls,a=(function(){function g(o){this.$showCursorMarker=null,this.element=h.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return g.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},g.prototype.addGutterDecoration=function(o,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,c)},g.prototype.removeGutterDecoration=function(o,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,c)},g.prototype.setAnnotations=function(o){this.$annotations=[];for(var c=0;c<o.length;c++){var m=o[c],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var R=m.text,$=m.text,k=m.type;R=R?v.escapeHTML(R):m.html||"",$=$||m.html||"",x.text.indexOf(R)===-1&&(x.text.push(R),x.type.push(k),x.displayText.push($));var C=m.className;C?x.className=C:k==="error"?x.className=" ace_error":k==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":k==="info"&&!x.className?x.className=" ace_info":k==="hint"&&!x.className&&(x.className=" ace_hint")}},g.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var c=o.start.row,m=o.end.row-c;if(m!==0)if(o.action=="remove")this.$annotations.splice(c,m+1,null);else{var w=new Array(m+1);w.unshift(c,1),this.$annotations.splice.apply(this.$annotations,w)}}},g.prototype.update=function(o){this.config=o;var c=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,c.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=c.getNextFoldLine(m),R=x?x.start.row:1/0,$=null,k=-1,C=m;;){if(C>R&&(C=x.end.row+1,x=c.getNextFoldLine(C,x),R=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}$=this.$lines.get(++k),$?$.row=C:($=this.$lines.createCell(C,o,this.session,u),this.$lines.push($)),this.$renderCell($,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},g.prototype.$updateGutterWidth=function(o){var c=this.session,m=c.gutterRenderer||this.$renderer,w=c.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(x=c.getLength()+w-1);var R=m?m.getWidth(c,x,o):x.toString().length*o.characterWidth,$=this.$padding||this.$computePadding();R+=$.left+$.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},g.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},g.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<c.length;m++){var w=c[m];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==c[m-1].row)w=c[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},g.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=h.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var c=o.selection.cursor,m=this.config,w=this.$lines,x=m.firstRowScreen*m.lineHeight,R=Math.floor(x/w.canvasHeight),$=o.documentToScreenRow(c)*m.lineHeight,k=$-R*w.canvasHeight;h.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),h.setStyle(this.$highlightElement.style,"top",k+"px")}},g.prototype.scrollLines=function(o){var c=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(c,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!c||w<o.firstRow)return this.update(o);if(m<c.firstRow)return this.update(o);if(c.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();o.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,c.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},g.prototype.$renderLines=function(o,c,m){for(var w=[],x=c,R=this.session.getNextFoldLine(x),$=R?R.start.row:1/0;x>$&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),$=R?R.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,o,this.session,u);this.$renderCell(k,o,R,x),w.push(k),x++}return w},g.prototype.$renderCell=function(o,c,m,w){var x=o.element,R=this.session,$=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],N=C.firstChild,I=R.$firstLineNumber,M=R.$breakpoints,W=R.$decorations,F=R.gutterRenderer||this.$renderer,D=this.$showFoldWidgets&&R.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,_=c.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(F?F.getText(R,w):w+I).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=A&&this.$cursorRow<=m.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),M[w]&&(L+=M[w]),W[w]&&(L+=W[w]),this.$annotations[w]&&w!==A&&(L+=this.$annotations[w].className),D){var V=D[w];V==null&&(V=D[w]=R.getFoldWidget(w))}if(V){var K="ace_fold-widget ace_"+V,ee=V=="start"&&w==A&&w<m.end.row;if(ee){K+=" ace_closed";for(var ae="",Q=!1,oe=w+1;oe<=m.end.row;oe++)if(this.$annotations[oe]){if(this.$annotations[oe].className===" ace_error"){Q=!0,ae=" ace_error_fold";break}this.$annotations[oe].className===" ace_security"?(Q=!0,ae=" ace_security_fold"):this.$annotations[oe].className===" ace_warning"&&ae!==" ace_security_fold"&&(Q=!0,ae=" ace_warning_fold")}L+=ae}else K+=" ace_open";k.className!=K&&(k.className=K),h.setStyle(k.style,"height",_),h.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var se=R.getFoldWidgetRange(w);se?k.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[se.start.row+1,se.end.row+1])):m?k.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):k.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),ee?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else k&&(h.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ue=this.session.$gutterCustomWidgets[w];if(ue?this.$addCustomWidget(w,ue,o):O&&this.$removeCustomWidget(w,o),Q&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",N.className=B,N.className+=ae,h.setStyle(N.style,"height",_),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",_);var pe;switch(ae){case" ace_error_fold":pe=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":pe=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":pe=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",pe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",N.className=B,this.$useSvgGutterIcons?N.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),h.setStyle(N.style,"height",_),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",_);var pe;switch(this.$annotations[w].className){case" ace_error":pe=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":pe=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":pe=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":pe=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":pe=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",pe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else h.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=L&&(x.className=L),h.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,c,R)+"px"),h.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,c,R)+"px"),o.text=U,C.style.display==="none"&&k.style.display==="none"&&!ue?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},g.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},g.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},g.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},g.prototype.setShowFoldWidgets=function(o){o?h.addCssClass(this.element,"ace_folding-enabled"):h.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},g.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},g.prototype.$hideFoldWidget=function(o,c){var m=c||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&h.setStyle(w.style,"display","none")}},g.prototype.$showFoldWidget=function(o,c){var m=c||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&h.setStyle(w.style,"display","inline-block")}},g.prototype.$getGutterCell=function(o){var c=this.$lines.cells,m=0,w=c.length-1;if(!(o<c[0].row||o>c[w].row)){for(;m<=w;){var x=Math.floor((m+w)/2),R=c[x];if(R.row>o)w=x-1;else if(R.row<o)m=x+1;else return R}return R}},g.prototype.$addCustomWidget=function(o,c,m){var w=c.className,x=c.label,R=c.title,$=c.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:x,title:R,callbacks:$},this.$hideFoldWidget(o,m);var k=m||this.$getGutterCell(o);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=h.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",R),h.setStyle(C.style,"display","inline-block"),h.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(O){$.onClick(O,o),O.stopPropagation()}),k.element.appendChild(C)}},g.prototype.$removeCustomWidget=function(o,c){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,c);var m=c||this.$getGutterCell(o);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},g.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=h.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},g.prototype.getRegion=function(o){var c=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<c.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-c.right)return"foldWidgets"},g})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,p.implement(a.prototype,s);function u(g){var o=document.createTextNode("");g.appendChild(o);var c=h.createElement("span");g.appendChild(c);var m=h.createElement("span");g.appendChild(m);var w=h.createElement("span");return m.appendChild(w),g}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,d){var h=e("../range").Range,p=e("../lib/dom"),v=(function(){function f(i){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return f.prototype.setPadding=function(i){this.$padding=i},f.prototype.setSession=function(i){this.session=i},f.prototype.setMarkers=function(i){this.markers=i},f.prototype.elt=function(i,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=i},f.prototype.update=function(i){if(i){this.config=i,this.i=0;var a;for(var u in this.markers){var g=this.markers[u];if(!g.range){g.update(a,this,this.session,i);continue}var o=g.range.clipRows(i.firstRow,i.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),g.renderer){var c=this.$getTop(o.start.row,i),m=this.$padding+o.start.column*i.characterWidth;g.renderer(a,o,m,c,i)}else g.type=="fullLine"?this.drawFullLineMarker(a,o,g.clazz,i):g.type=="screenLine"?this.drawScreenLineMarker(a,o,g.clazz,i):o.isMultiLine()?g.type=="text"?this.drawTextMarker(a,o,g.clazz,i):this.drawMultiLineMarker(a,o,g.clazz,i):this.drawSingleLineMarker(a,o,g.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(i,a){return(i-a.firstRowScreen)*a.lineHeight},f.prototype.drawTextMarker=function(i,a,u,g,o){for(var c=this.session,m=a.start.row,w=a.end.row,x=m,R=0,$=0,k=c.getScreenLastRowColumn(x),C=new h(x,a.start.column,x,$);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:c.getRowWrapIndent(x),C.end.column=k,R=$,$=k,k=x+1<w?c.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(i,C,u+(x==m?" ace_start":"")+" ace_br"+s(x==m||x==m+1&&a.start.column,R<$,$>k,x==w),g,x==w?0:1,o)},f.prototype.drawMultiLineMarker=function(i,a,u,g,o){var c=this.$padding,m=g.lineHeight,w=this.$getTop(a.start.row,g),x=c+a.start.column*g.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var R=a.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(i,R,u+" ace_br1 ace_start",g,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+c+"px;top:"+w+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var R=a.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(i,R,u+" ace_br12",g,null,o)}else{w=this.$getTop(a.end.row,g);var $=a.end.column*g.characterWidth;this.elt(u+" ace_br12","height:"+m+"px;width:"+$+"px;top:"+w+"px;left:"+c+"px;"+(o||""))}if(m=(a.end.row-a.start.row-1)*g.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,g);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+m+"px;right:"+c+"px;top:"+w+"px;left:"+c+"px;"+(o||""))}},f.prototype.drawSingleLineMarker=function(i,a,u,g,o,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(i,a,u,g,o,c);var m=g.lineHeight,w=(a.end.column+(o||0)-a.start.column)*g.characterWidth,x=this.$getTop(a.start.row,g),R=this.$padding+a.start.column*g.characterWidth;this.elt(u,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+R+"px;"+(c||""))},f.prototype.drawBidiSingleLineMarker=function(i,a,u,g,o,c){var m=g.lineHeight,w=this.$getTop(a.start.row,g),x=this.$padding,R=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);R.forEach(function($){this.elt(u,"height:"+m+"px;width:"+($.width+(o||0))+"px;top:"+w+"px;left:"+(x+$.left)+"px;"+(c||""))},this)},f.prototype.drawFullLineMarker=function(i,a,u,g,o){var c=this.$getTop(a.start.row,g),m=g.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,g)-c),this.elt(u,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(o||""))},f.prototype.drawScreenLineMarker=function(i,a,u,g,o){var c=this.$getTop(a.start.row,g),m=g.lineHeight;this.elt(u,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(o||""))},f})();v.prototype.$padding=0;function s(f,i,a,u){return(f?1:0)|(i?2:0)|(a?4:0)|(u?8:0)}r.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,d){var h=new Set(["text","rparen","lparen"]);r.isTextToken=function(p){return h.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(e,r,d){var h=e("../lib/oop"),p=e("../lib/dom"),v=e("../lib/lang"),s=e("./lines").Lines,f=e("../lib/event_emitter").EventEmitter,i=e("../config").nls,a=e("./text_util").isTextToken,u=(function(){function g(o){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return g.prototype.$updateEolChar=function(){var o=this.session.doc,c=o.getNewLineCharacter()==`
219
- `&&o.getNewLineMode()!="windows",m=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},g.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},g.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},g.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},g.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},g.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},g.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},g.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},g.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},g.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},g.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},g.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var c=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=v.stringRepeat(this.TAB_CHAR,m),c.push(w)}else c.push(this.dom.createTextNode(v.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):$,w=this.dom.createElement("span");w.className=x+R,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+k,w.textContent=C,this.$tabStrings[" "]=w}},g.prototype.updateLines=function(o,c,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(c,o.firstRow),x=Math.min(m,o.lastRow),R=this.element.childNodes,$=0,k=o.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;$++}for(var O=!1,k=w,C=this.session.getNextFoldLine(k),N=C?C.start.row:1/0;k>N&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),N=C?C.start.row:1/0),!(k>x);){var I=R[$++];if(I){this.dom.removeChildren(I),this.$renderLine(I,k,k==N?C:!1),O&&(I.style.top=this.$lines.computeLineTop(k,o,this.session)+"px");var M=o.lineHeight*this.session.getRowLength(k)+"px";I.style.height!=M&&(O=!0,I.style.height=M)}k++}if(O)for(;$<this.$lines.cells.length;){var W=this.$lines.cells[$++];W.element.style.top=this.$lines.computeLineTop(W.row,o,this.session)+"px"}},g.prototype.scrollLines=function(o){var c=this.config;if(this.config=o,this.$lines.pageChanged(c,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=c?c.lastRow:-1;if(!c||w<o.firstRow)return this.update(o);if(m<c.firstRow)return this.update(o);if(!c||c.lastRow<o.firstRow)return this.update(o);if(o.lastRow<c.firstRow)return this.update(o);if(c.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(c.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,c.lastRow);x>0;x--)this.$lines.pop();o.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,c.firstRow-1)),o.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(o,c.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},g.prototype.$renderLinesFragment=function(o,c,m){for(var w=[],x=c,R=this.session.getNextFoldLine(x),$=R?R.start.row:1/0;x>$&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),$=R?R.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,o,this.session),C=k.element;this.dom.removeChildren(C),p.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),p.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==$?R:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),x++}return w},g.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var c=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,c,m))},g.prototype.$renderToken=function(o,c,m,w){for(var x=this,R=/(\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),k,C=0;k=R.exec(w);){var O=k[1],N=k[2],I=k[3],M=k[4],W=k[5];if(!(!x.showSpaces&&N)){var F=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,F&&$.appendChild(this.dom.createTextNode(F,this.element)),O){var D=x.session.getScreenTabSize(c+k.index),A=x.$tabStrings[D].cloneNode(!0);A.charCount=1,$.appendChild(A),c+=D-1}else if(N)if(x.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=v.stringRepeat(x.SPACE_CHAR,N.length),$.appendChild(_)}else $.appendChild(this.dom.createTextNode(N,this.element));else if(I){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=v.stringRepeat(x.SPACE_CHAR,I.length),$.appendChild(_)}else if(M){c+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",_.textContent=x.showSpaces?x.SPACE_CHAR:M,$.appendChild(_)}else if(W){c+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=W,$.appendChild(_)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(m.type))o.appendChild($);else{var L="ace_"+m.type.replace(/\./g," ace_"),_=this.dom.createElement("span");m.type=="fold"&&(_.style.width=m.value.length*this.config.characterWidth+"px",_.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),_.className=L,_.appendChild($),o.appendChild(_)}return c+w.length},g.prototype.renderIndentGuide=function(o,c,m){var w=c.search(this.$indentGuideRe);if(w<=0||w>=m)return c;if(c[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,R=0;R<x;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}else if(c[0]==" "){for(var R=0;R<w;R++){var $=this.$tabStrings[" "].cloneNode(!0);$.charCount=1,o.appendChild($)}return this.$highlightIndentGuide(),c.substr(w)}return this.$highlightIndentGuide(),c},g.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var c=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:c.row};var x=this.session.$bracketHighlight;if(x){for(var R=this.session.$bracketHighlight.ranges,$=0;$<R.length;$++)if(c.row!==R[$].start.row){this.$highlightIndentGuideMarker.end=R[$].start.row+1,c.row>R[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[c.row]!==""&&c.column===o[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=c.row+1;$<o.length;$++){var k=o[$],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=$,C<=m))break}}this.$renderHighlightIndentGuide()}}},g.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<o.length;c++)o[c].classList.remove("ace_indent-guide-active")},g.prototype.$setIndentGuideActive=function(o,c){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var x=w.childNodes;if(x){var R=x[c-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},g.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}else for(var m=o.length-1;m>=0;m--){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}}},g.prototype.$createLineElement=function(o){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},g.prototype.$renderWrappedLine=function(o,c,m){var w=0,x=0,R=m[0],$=0,k=this.$createLineElement();o.appendChild(k);for(var C=0;C<c.length;C++){var O=c[C],N=O.value;if(C==0&&this.displayIndentGuides){if(w=N.length,N=this.renderIndentGuide(k,N,R),!N)continue;w-=N.length}if(w+N.length<R)$=this.$renderToken(k,$,O,N),w+=N.length;else{for(;w+N.length>=R;){$=this.$renderToken(k,$,O,N.substring(0,R-w)),N=N.substring(R-w),w=R,k=this.$createLineElement(),o.appendChild(k);var I=this.dom.createTextNode(v.stringRepeat(" ",m.indent),this.element);I.charCount=0,k.appendChild(I),x++,$=0,R=m[x]||Number.MAX_VALUE}N.length!=0&&(w+=N.length,$=this.$renderToken(k,$,O,N))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,$,null,"",!0)},g.prototype.$renderSimpleLine=function(o,c){for(var m=0,w=0;w<c.length;w++){var x=c[w],R=x.value;if(!(w==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(o,R),!R))){if(m+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,x,R);m=this.$renderToken(o,m,x,R)}}},g.prototype.$renderOverflowMessage=function(o,c,m,w,x){m&&this.$renderToken(o,c,m,w.slice(0,this.MAX_LINE_LENGTH-c));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=x?"<hide>":"<click to see more...>",o.appendChild(R)},g.prototype.$renderLine=function(o,c,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(c)),m)var w=this.$getFoldLineTokens(c,m);else var w=this.session.getTokens(c);var x=o;if(w.length){var R=this.session.getRowSplitData(c);if(R&&R.length){this.$renderWrappedLine(o,w,R);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){m&&(c=m.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},g.prototype.$getFoldLineTokens=function(o,c){var m=this.session,w=[];function x($,k,C){for(var O=0,N=0;N+$[O].value.length<k;)if(N+=$[O].value.length,O++,O==$.length)return;if(N!=k){var I=$[O].value.substring(k-N);I.length>C-k&&(I=I.substring(0,C-k)),w.push({type:$[O].type,value:I}),N=k+I.length,O+=1}for(;N<C&&O<$.length;){var I=$[O].value;I.length+N>C?w.push({type:$[O].type,value:I.substring(0,C-N)}):w.push($[O]),N+=I.length,O+=1}}var R=m.getTokens(o);return c.walk(function($,k,C,O,N){$!=null?w.push({type:"fold",value:$}):(N&&(R=m.getTokens(k)),R.length&&x(R,O,C))},c.end.row,this.session.getLine(c.end.row).length),w},g.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},g})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,h.implement(u.prototype,f),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("../lib/dom"),p=(function(){function v(s){this.element=h.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(),h.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return v.prototype.$updateOpacity=function(s){for(var f=this.cursors,i=f.length;i--;)h.setStyle(f[i].style,"opacity",s?"":"0")},v.prototype.$startCssAnimation=function(){for(var s=this.cursors,f=s.length;f--;)s[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&h.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,h.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,h.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var s=h.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,h.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,h.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,h.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&&h.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),h.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),f()},this.blinkInterval),f()}},v.prototype.getPixelPosition=function(s,f){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(s),a=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,s.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),u=(i.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},v.prototype.isCursorInView=function(s,f){return s.top>=0&&s.top<f.maxHeight},v.prototype.update=function(s){this.config=s;var f=this.session.$selectionMarkers,i=0,a=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var i=0,u=f.length;i<u;i++){var g=this.getPixelPosition(f[i].cursor,!0);if(!((g.top>s.height+s.offset||g.top<0)&&i>1)){var o=this.cursors[a++]||this.addCursor(),c=o.style;this.drawCursor?this.drawCursor(o,g,s,f[i],this.session):this.isCursorInView(g,s)?(h.setStyle(c,"display","block"),h.translate(o,g.left,g.top),h.setStyle(c,"width",Math.round(s.characterWidth)+"px"),h.setStyle(c,"height",s.lineHeight+"px")):h.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=g,this.restartTimer()},v.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?h.addCssClass(this.element,"ace_overwrite-cursors"):h.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,r.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,d){var h=this&&this.__extends||(function(){var o=function(c,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(c,m);function w(){this.constructor=c}c.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),p=e("./lib/oop"),v=e("./lib/dom"),s=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter,i=32768,a=(function(){function o(c,m){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.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 o.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},o})();p.implement(a.prototype,f);var u=(function(o){h(c,o);function c(m,w){var x=o.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=v.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(m){this.element.style.height=m+"px"},c.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>i?(this.coeff=i/m,m=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},c.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},c})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var g=(function(o){h(c,o);function c(m,w){var x=o.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(m){this.element.style.width=m+"px"},c.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},c})(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=g,r.VScrollBar=u,r.HScrollBar=g}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,d){var h=this&&this.__extends||(function(){var g=function(o,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(m[x]=w[x])},g(o,c)};return function(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");g(o,c);function m(){this.constructor=o}o.prototype=c===null?Object.create(c):(m.prototype=c.prototype,new m)}})(),p=e("./lib/oop"),v=e("./lib/dom"),s=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter;v.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
- position: absolute;
221
- background: rgba(128, 128, 128, 0.6);
222
- -moz-box-sizing: border-box;
223
- box-sizing: border-box;
224
- border: 1px solid #bbb;
225
- border-radius: 2px;
226
- z-index: 8;
227
- }
228
- .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
- position: absolute;
230
- z-index: 6;
231
- background: none;
232
- overflow: hidden!important;
233
- }
234
- .ace_editor>.ace_sb-v {
235
- z-index: 6;
236
- right: 0;
237
- top: 0;
238
- width: 12px;
239
- }
240
- .ace_editor>.ace_sb-v div {
241
- z-index: 8;
242
- right: 0;
243
- width: 100%;
244
- }
245
- .ace_editor>.ace_sb-h {
246
- bottom: 0;
247
- left: 0;
248
- height: 12px;
249
- }
250
- .ace_editor>.ace_sb-h div {
251
- bottom: 0;
252
- height: 100%;
253
- }
254
- .ace_editor>.ace_sb_grabbed {
255
- z-index: 8;
256
- background: #000;
257
- }`,"ace_scrollbar.css",!1);var i=(function(){function g(o,c){this.element=v.createElement("div"),this.element.className="ace_sb"+c,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return g.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},g})();p.implement(i.prototype,f);var a=(function(g){h(o,g);function o(c,m){var w=g.call(this,c,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=c,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,R=function(M){x=M.clientY},$=function(){clearInterval(N)},k=m.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var M=w.scrollTopFromThumbTop(C+x-k);M!==w.scrollTop&&w._emit("scroll",{data:M})}};s.capture(this.inner,R,$);var N=setInterval(O,20);return s.preventDefault(m)}var I=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),s.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(c){var m=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(c,m){this.pageHeight===c&&!m||(this.pageHeight=c,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})))},o.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(i);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(g){h(o,g);function o(c,m){var w=g.call(this,c,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return o.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,R=function(M){x=M.clientX},$=function(){clearInterval(N)},k=m.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var M=w.scrollLeftFromThumbLeft(C+x-k);M!==w.scrollLeft&&w._emit("scroll",{data:M})}};s.capture(this.inner,R,$);var N=setInterval(O,20);return s.preventDefault(m)}var I=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),s.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(c){var m=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},o.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(c,m){this.pageWidth===c&&!m||(this.pageWidth=c,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})))},o.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(i);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,d){var h=e("./lib/event"),p=(function(){function v(s,f){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var i=this;this._flush=function(a){i.pending=!1;var u=i.changes;if(u&&(h.blockIdle(100),i.changes=0,i.onRender(u)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return v.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(h.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(s){var f=this.changes;return this.changes=0,f},v})();r.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(e,r,d){var h=e("../lib/oop"),p=e("../lib/dom"),v=e("../lib/lang"),s=e("../lib/event"),f=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",g=200,o=(function(){function c(m){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),m.appendChild(this.el),this.$measureNode.textContent=v.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",f.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},c.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===m.width&&w.height===m.height,this._emit("changeCharacterSize",{data:m})}},c.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=s.onIdle(function w(){m.checkForSizeChanges(),s.onIdle(w,500)},500)},c.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(m){var w={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},c.prototype.$measureCharWidth=function(m){this.$main.textContent=v.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},c.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=p.buildDom([m(0,0),m(g,0),m(0,g),m(g,g)],this.el)},c.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function R(K,ee,ae){var Q=K[1]*ee[0]-K[0]*ee[1];return[(-ee[1]*ae[0]+ee[0]*ae[1])/Q,(+K[1]*ae[0]-K[0]*ae[1])/Q]}function $(K,ee){return[K[0]-ee[0],K[1]-ee[1]]}function k(K,ee){return[K[0]+ee[0],K[1]+ee[1]]}function C(K,ee){return[K*ee[0],K*ee[1]]}this.els||this.$initTransformMeasureNodes();function O(K){var ee=K.getBoundingClientRect();return[ee.left,ee.top]}var N=O(this.els[0]),I=O(this.els[1]),M=O(this.els[2]),W=O(this.els[3]),F=R($(W,I),$(W,M),$(k(I,M),k(W,N))),D=C(1+F[0],$(I,N)),A=C(1+F[1],$(M,N));if(w){var _=w,L=F[0]*_[0]/g+F[1]*_[1]/g+1,B=k(C(_[0],D),C(_[1],A));return k(C(1/L/g,B),N)}var U=$(m,N),V=R($(D,C(F[0],U)),$(A,C(F[1],U)),U);return C(g,V)},c})();o.prototype.$characterSize={width:0,height:0},h.implement(o.prototype,i),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,d){d.exports=`
258
- .ace_br1 {border-top-left-radius : 3px;}
259
- .ace_br2 {border-top-right-radius : 3px;}
260
- .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
- .ace_br4 {border-bottom-right-radius: 3px;}
262
- .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
- .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
- .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
- .ace_br8 {border-bottom-left-radius : 3px;}
266
- .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
- .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
- .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
- .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
- .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
- .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
- .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
-
274
-
275
- .ace_editor {
276
- position: relative;
277
- overflow: hidden;
278
- padding: 0;
279
- font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
- direction: ltr;
281
- text-align: left;
282
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
- forced-color-adjust: none;
284
- }
285
-
286
- .ace_scroller {
287
- position: absolute;
288
- overflow: hidden;
289
- top: 0;
290
- bottom: 0;
291
- background-color: inherit;
292
- -ms-user-select: none;
293
- -moz-user-select: none;
294
- -webkit-user-select: none;
295
- user-select: none;
296
- cursor: text;
297
- }
298
-
299
- .ace_content {
300
- position: absolute;
301
- box-sizing: border-box;
302
- min-width: 100%;
303
- contain: style size layout;
304
- font-variant-ligatures: no-common-ligatures;
305
- }
306
- .ace_invisible {
307
- font-variant-ligatures: none;
308
- }
309
-
310
- .ace_keyboard-focus:focus {
311
- box-shadow: inset 0 0 0 2px #5E9ED6;
312
- outline: none;
313
- }
314
-
315
- .ace_dragging .ace_scroller:before{
316
- position: absolute;
317
- top: 0;
318
- left: 0;
319
- right: 0;
320
- bottom: 0;
321
- content: '';
322
- background: rgba(250, 250, 250, 0.01);
323
- z-index: 1000;
324
- }
325
- .ace_dragging.ace_dark .ace_scroller:before{
326
- background: rgba(0, 0, 0, 0.01);
327
- }
328
-
329
- .ace_gutter {
330
- position: absolute;
331
- overflow : hidden;
332
- width: auto;
333
- top: 0;
334
- bottom: 0;
335
- left: 0;
336
- cursor: default;
337
- z-index: 4;
338
- -ms-user-select: none;
339
- -moz-user-select: none;
340
- -webkit-user-select: none;
341
- user-select: none;
342
- contain: style size layout;
343
- }
344
-
345
- .ace_gutter-active-line {
346
- position: absolute;
347
- left: 0;
348
- right: 0;
349
- }
350
-
351
- .ace_scroller.ace_scroll-left:after {
352
- content: "";
353
- position: absolute;
354
- top: 0;
355
- right: 0;
356
- bottom: 0;
357
- left: 0;
358
- box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
- pointer-events: none;
360
- }
361
-
362
- .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
- position: absolute;
364
- top: 0;
365
- left: 0;
366
- right: 0;
367
- padding-left: 19px;
368
- padding-right: 6px;
369
- background-repeat: no-repeat;
370
- }
371
-
372
- .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
- margin-left: -14px;
374
- float: left;
375
- }
376
-
377
- .ace_gutter-cell .ace_gutter_annotation {
378
- margin-left: -19px;
379
- float: left;
380
- }
381
-
382
- .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 {
383
- 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==");
384
- background-repeat: no-repeat;
385
- background-position: 2px center;
386
- }
387
-
388
- .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
- 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==");
390
- background-repeat: no-repeat;
391
- background-position: 2px center;
392
- }
393
-
394
- .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
- background-repeat: no-repeat;
397
- background-position: 2px center;
398
- }
399
-
400
- .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 {
401
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
- }
403
-
404
- .ace_icon_svg.ace_error {
405
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
- background-color: crimson;
407
- }
408
- .ace_icon_svg.ace_security {
409
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
- background-color: crimson;
411
- }
412
- .ace_icon_svg.ace_warning {
413
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
- background-color: darkorange;
415
- }
416
- .ace_icon_svg.ace_info {
417
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
- background-color: royalblue;
419
- }
420
- .ace_icon_svg.ace_hint {
421
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
- background-color: silver;
423
- }
424
-
425
- .ace_icon_svg.ace_error_fold {
426
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
- background-color: crimson;
428
- }
429
- .ace_icon_svg.ace_security_fold {
430
- -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
- background-color: crimson;
432
- }
433
- .ace_icon_svg.ace_warning_fold {
434
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
- background-color: darkorange;
436
- }
437
-
438
- .ace_scrollbar {
439
- contain: strict;
440
- position: absolute;
441
- right: 0;
442
- bottom: 0;
443
- z-index: 6;
444
- }
445
-
446
- .ace_scrollbar-inner {
447
- position: absolute;
448
- cursor: text;
449
- left: 0;
450
- top: 0;
451
- }
452
-
453
- .ace_scrollbar-v{
454
- overflow-x: hidden;
455
- overflow-y: scroll;
456
- top: 0;
457
- }
458
-
459
- .ace_scrollbar-h {
460
- overflow-x: scroll;
461
- overflow-y: hidden;
462
- left: 0;
463
- }
464
-
465
- .ace_print-margin {
466
- position: absolute;
467
- height: 100%;
468
- }
469
-
470
- .ace_text-input {
471
- position: absolute;
472
- z-index: 0;
473
- width: 0.5em;
474
- height: 1em;
475
- opacity: 0;
476
- background: transparent;
477
- -moz-appearance: none;
478
- appearance: none;
479
- border: none;
480
- resize: none;
481
- outline: none;
482
- overflow: hidden;
483
- font: inherit;
484
- padding: 0 1px;
485
- margin: 0 -1px;
486
- contain: strict;
487
- -ms-user-select: text;
488
- -moz-user-select: text;
489
- -webkit-user-select: text;
490
- user-select: text;
491
- /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
- white-space: pre!important;
493
- }
494
- .ace_text-input.ace_composition {
495
- background: transparent;
496
- color: inherit;
497
- z-index: 1000;
498
- opacity: 1;
499
- }
500
- .ace_composition_placeholder { color: transparent }
501
- .ace_composition_marker {
502
- border-bottom: 1px solid;
503
- position: absolute;
504
- border-radius: 0;
505
- margin-top: 1px;
506
- }
507
-
508
- [ace_nocontext=true] {
509
- transform: none!important;
510
- filter: none!important;
511
- clip-path: none!important;
512
- mask : none!important;
513
- contain: none!important;
514
- perspective: none!important;
515
- mix-blend-mode: initial!important;
516
- z-index: auto;
517
- }
518
-
519
- .ace_layer {
520
- z-index: 1;
521
- position: absolute;
522
- overflow: hidden;
523
- /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
- word-wrap: normal;
525
- white-space: pre;
526
- height: 100%;
527
- width: 100%;
528
- box-sizing: border-box;
529
- /* setting pointer-events: auto; on node under the mouse, which changes
530
- during scroll, will break mouse wheel scrolling in Safari */
531
- pointer-events: none;
532
- }
533
-
534
- .ace_gutter-layer {
535
- position: relative;
536
- width: auto;
537
- text-align: right;
538
- pointer-events: auto;
539
- height: 1000000px;
540
- contain: style size layout;
541
- }
542
-
543
- .ace_text-layer {
544
- font: inherit !important;
545
- position: absolute;
546
- height: 1000000px;
547
- width: 1000000px;
548
- contain: style size layout;
549
- }
550
-
551
- .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
- contain: style size layout;
553
- position: absolute;
554
- top: 0;
555
- left: 0;
556
- right: 0;
557
- }
558
-
559
- .ace_hidpi .ace_text-layer,
560
- .ace_hidpi .ace_gutter-layer,
561
- .ace_hidpi .ace_content,
562
- .ace_hidpi .ace_gutter {
563
- contain: strict;
564
- }
565
- .ace_hidpi .ace_text-layer > .ace_line,
566
- .ace_hidpi .ace_text-layer > .ace_line_group {
567
- contain: strict;
568
- }
569
-
570
- .ace_cjk {
571
- display: inline-block;
572
- text-align: center;
573
- }
574
-
575
- .ace_cursor-layer {
576
- z-index: 4;
577
- }
578
-
579
- .ace_cursor {
580
- z-index: 4;
581
- position: absolute;
582
- box-sizing: border-box;
583
- border-left: 2px solid;
584
- /* workaround for smooth cursor repaintng whole screen in chrome */
585
- transform: translatez(0);
586
- }
587
-
588
- .ace_multiselect .ace_cursor {
589
- border-left-width: 1px;
590
- }
591
-
592
- .ace_slim-cursors .ace_cursor {
593
- border-left-width: 1px;
594
- }
595
-
596
- .ace_overwrite-cursors .ace_cursor {
597
- border-left-width: 0;
598
- border-bottom: 1px solid;
599
- }
600
-
601
- .ace_hidden-cursors .ace_cursor {
602
- opacity: 0.2;
603
- }
604
-
605
- .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
- opacity: 0;
607
- }
608
-
609
- .ace_smooth-blinking .ace_cursor {
610
- transition: opacity 0.18s;
611
- }
612
-
613
- .ace_animate-blinking .ace_cursor {
614
- animation-duration: 1000ms;
615
- animation-timing-function: step-end;
616
- animation-name: blink-ace-animate;
617
- animation-iteration-count: infinite;
618
- }
619
-
620
- .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
- animation-duration: 1000ms;
622
- animation-timing-function: ease-in-out;
623
- animation-name: blink-ace-animate-smooth;
624
- }
625
-
626
- @keyframes blink-ace-animate {
627
- from, to { opacity: 1; }
628
- 60% { opacity: 0; }
629
- }
630
-
631
- @keyframes blink-ace-animate-smooth {
632
- from, to { opacity: 1; }
633
- 45% { opacity: 1; }
634
- 60% { opacity: 0; }
635
- 85% { opacity: 0; }
636
- }
637
-
638
- .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
- position: absolute;
640
- z-index: 3;
641
- }
642
-
643
- .ace_marker-layer .ace_selection {
644
- position: absolute;
645
- z-index: 5;
646
- }
647
-
648
- .ace_marker-layer .ace_bracket {
649
- position: absolute;
650
- z-index: 6;
651
- }
652
-
653
- .ace_marker-layer .ace_error_bracket {
654
- position: absolute;
655
- border-bottom: 1px solid #DE5555;
656
- border-radius: 0;
657
- }
658
-
659
- .ace_marker-layer .ace_active-line {
660
- position: absolute;
661
- z-index: 2;
662
- }
663
-
664
- .ace_marker-layer .ace_selected-word {
665
- position: absolute;
666
- z-index: 4;
667
- box-sizing: border-box;
668
- }
669
-
670
- .ace_line .ace_fold {
671
- box-sizing: border-box;
672
-
673
- display: inline-block;
674
- height: 11px;
675
- margin-top: -2px;
676
- vertical-align: middle;
677
-
678
- background-image:
679
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
- background-repeat: no-repeat, repeat-x;
682
- background-position: center center, top left;
683
- color: transparent;
684
-
685
- border: 1px solid black;
686
- border-radius: 2px;
687
-
688
- cursor: pointer;
689
- pointer-events: auto;
690
- }
691
-
692
- .ace_dark .ace_fold {
693
- }
694
-
695
- .ace_fold:hover{
696
- background-image:
697
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
- }
700
-
701
- .ace_tooltip {
702
- background-color: #f5f5f5;
703
- border: 1px solid gray;
704
- border-radius: 1px;
705
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
- color: black;
707
- padding: 3px 4px;
708
- position: fixed;
709
- z-index: 999999;
710
- box-sizing: border-box;
711
- cursor: default;
712
- white-space: pre-wrap;
713
- word-wrap: break-word;
714
- line-height: normal;
715
- font-style: normal;
716
- font-weight: normal;
717
- letter-spacing: normal;
718
- pointer-events: none;
719
- overflow: auto;
720
- max-width: min(33em, 66vw);
721
- overscroll-behavior: contain;
722
- }
723
- .ace_tooltip pre {
724
- white-space: pre-wrap;
725
- }
726
-
727
- .ace_tooltip.ace_dark {
728
- background-color: #636363;
729
- color: #fff;
730
- }
731
-
732
- .ace_tooltip:focus {
733
- outline: 1px solid #5E9ED6;
734
- }
735
-
736
- .ace_icon {
737
- display: inline-block;
738
- width: 18px;
739
- vertical-align: top;
740
- }
741
-
742
- .ace_icon_svg {
743
- display: inline-block;
744
- width: 12px;
745
- vertical-align: top;
746
- -webkit-mask-repeat: no-repeat;
747
- -webkit-mask-size: 12px;
748
- -webkit-mask-position: center;
749
- }
750
-
751
- .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
- padding-right: 13px;
753
- }
754
-
755
- .ace_fold-widget, .ace_custom-widget {
756
- box-sizing: border-box;
757
-
758
- margin: 0 -12px 0 1px;
759
- display: none;
760
- width: 11px;
761
- vertical-align: top;
762
-
763
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
- background-repeat: no-repeat;
765
- background-position: center;
766
-
767
- border-radius: 3px;
768
-
769
- border: 1px solid transparent;
770
- cursor: pointer;
771
- pointer-events: auto;
772
- }
773
-
774
- .ace_custom-widget {
775
- background: none;
776
- }
777
-
778
- .ace_folding-enabled .ace_fold-widget {
779
- display: inline-block;
780
- }
781
-
782
- .ace_fold-widget.ace_end {
783
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
- }
785
-
786
- .ace_fold-widget.ace_closed {
787
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
- }
789
-
790
- .ace_fold-widget:hover {
791
- border: 1px solid rgba(0, 0, 0, 0.3);
792
- background-color: rgba(255, 255, 255, 0.2);
793
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
- }
795
-
796
- .ace_fold-widget:active {
797
- border: 1px solid rgba(0, 0, 0, 0.4);
798
- background-color: rgba(0, 0, 0, 0.05);
799
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
- }
801
- /**
802
- * Dark version for fold widgets
803
- */
804
- .ace_dark .ace_fold-widget {
805
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
- }
807
- .ace_dark .ace_fold-widget.ace_end {
808
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
- }
810
- .ace_dark .ace_fold-widget.ace_closed {
811
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
- }
813
- .ace_dark .ace_fold-widget:hover {
814
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
- background-color: rgba(255, 255, 255, 0.1);
816
- }
817
- .ace_dark .ace_fold-widget:active {
818
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
- }
820
-
821
- .ace_inline_button {
822
- border: 1px solid lightgray;
823
- display: inline-block;
824
- margin: -1px 8px;
825
- padding: 0 5px;
826
- pointer-events: auto;
827
- cursor: pointer;
828
- }
829
- .ace_inline_button:hover {
830
- border-color: gray;
831
- background: rgba(200,200,200,0.2);
832
- display: inline-block;
833
- pointer-events: auto;
834
- }
835
-
836
- .ace_fold-widget.ace_invalid {
837
- background-color: #FFB4B4;
838
- border-color: #DE5555;
839
- }
840
-
841
- .ace_fade-fold-widgets .ace_fold-widget {
842
- transition: opacity 0.4s ease 0.05s;
843
- opacity: 0;
844
- }
845
-
846
- .ace_fade-fold-widgets:hover .ace_fold-widget {
847
- transition: opacity 0.05s ease 0.05s;
848
- opacity:1;
849
- }
850
-
851
- .ace_underline {
852
- text-decoration: underline;
853
- }
854
-
855
- .ace_bold {
856
- font-weight: bold;
857
- }
858
-
859
- .ace_nobold .ace_bold {
860
- font-weight: normal;
861
- }
862
-
863
- .ace_italic {
864
- font-style: italic;
865
- }
866
-
867
-
868
- .ace_error-marker {
869
- background-color: rgba(255, 0, 0,0.2);
870
- position: absolute;
871
- z-index: 9;
872
- }
873
-
874
- .ace_highlight-marker {
875
- background-color: rgba(255, 255, 0,0.2);
876
- position: absolute;
877
- z-index: 8;
878
- }
879
-
880
- .ace_mobile-menu {
881
- position: absolute;
882
- line-height: 1.5;
883
- border-radius: 4px;
884
- -ms-user-select: none;
885
- -moz-user-select: none;
886
- -webkit-user-select: none;
887
- user-select: none;
888
- background: white;
889
- box-shadow: 1px 3px 2px grey;
890
- border: 1px solid #dcdcdc;
891
- color: black;
892
- }
893
- .ace_dark > .ace_mobile-menu {
894
- background: #333;
895
- color: #ccc;
896
- box-shadow: 1px 3px 2px grey;
897
- border: 1px solid #444;
898
-
899
- }
900
- .ace_mobile-button {
901
- padding: 2px;
902
- cursor: pointer;
903
- overflow: hidden;
904
- }
905
- .ace_mobile-button:hover {
906
- background-color: #eee;
907
- opacity:1;
908
- }
909
- .ace_mobile-button:active {
910
- background-color: #ddd;
911
- }
912
-
913
- .ace_placeholder {
914
- position: relative;
915
- font-family: arial;
916
- transform: scale(0.9);
917
- transform-origin: left;
918
- white-space: pre;
919
- opacity: 0.7;
920
- margin: 0 10px;
921
- z-index: 1;
922
- }
923
-
924
- .ace_ghost_text {
925
- opacity: 0.5;
926
- font-style: italic;
927
- }
928
-
929
- .ace_ghost_text_container > div {
930
- white-space: pre;
931
- }
932
-
933
- .ghost_text_line_wrapped::after {
934
- content: "↩";
935
- position: absolute;
936
- }
937
-
938
- .ace_lineWidgetContainer.ace_ghost_text {
939
- margin: 0px 4px
940
- }
941
-
942
- .ace_screenreader-only {
943
- position:absolute;
944
- left:-10000px;
945
- top:auto;
946
- width:1px;
947
- height:1px;
948
- overflow:hidden;
949
- }
950
-
951
- .ace_hidden_token {
952
- display: none;
953
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var h=e("../lib/dom"),p=e("../lib/oop"),v=e("../lib/event_emitter").EventEmitter,s=(function(){function f(i,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.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(i)}return f.prototype.$createCanvas=function(){this.canvas=h.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(i){this.$createCanvas(),this.scrollbarV=i,i.element.appendChild(this.canvas),this.setDimensions()},f.prototype.$updateDecorators=function(i){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(i);var u=this.canvas.getContext("2d");function g(D,A){return D.priority<A.priority?-1:D.priority>A.priority?1:0}var o=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),o){var c={info:1,warning:2,error:3};o.forEach(function(D){D.priority=c[D.type]||null}),o=o.sort(g);for(var m=0;m<o.length;m++){var w=o[m].row,x=this.getVerticalOffsetForRow(w),R=x+this.lineHeight,$=Math.round(this.heightRatio*x),k=Math.round(this.heightRatio*R),C=Math.round(($+k)/2),O=k-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var N=C-O,I=C+O,M=I-N;u.fillStyle=a[o[m].type]||null,u.fillRect(0,N,Math.round(this.oneZoneWidth-1),M)}}var W=this.renderer.session.selection.getCursor();if(W){var F=Math.round(this.getVerticalOffsetForRow(W.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,F,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(i){i=i|0;var a=this.renderer.session.documentToScreenRow(i,0)*this.lineHeight;return a},f.prototype.setDimensions=function(i){i=i||this.renderer.layerConfig,this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.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},f.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},f.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},f})();p.implement(s.prototype,v),r.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(e,r,d){var h=e("./lib/oop"),p=e("./lib/dom"),v=e("./lib/lang"),s=e("./config"),f=e("./layer/gutter").Gutter,i=e("./layer/marker").Marker,a=e("./layer/text").Text,u=e("./layer/cursor").Cursor,g=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,c=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),k=e("./layer/decorators").Decorator,C=e("./lib/useragent"),O=e("./layer/text_util").isTextToken;p.importCssString($,"ace_editor.css",!1);var N=(function(){function I(M,W){var F=this;this.container=M||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(W),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 f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var D=this.$textLayer=new a(this.content);this.canvas=D.element,this.$markerFront=new i(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollTop(A.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollLeft(A.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",A)}),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=!C.isIOS,this.$loop=new w(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 I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(M){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=M,M&&this.scrollMargin.top&&M.getScrollTop()<=0&&M.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(M),this.$markerBack.setSession(M),this.$markerFront.setSession(M),this.$gutterLayer.setSession(M),this.$textLayer.setSession(M),M&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},I.prototype.updateLines=function(M,W,F){if(W===void 0&&(W=1/0),this.$changedLines?(this.$changedLines.firstRow>M&&(this.$changedLines.firstRow=M),this.$changedLines.lastRow<W&&(this.$changedLines.lastRow=W)):this.$changedLines={firstRow:M,lastRow:W},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(M,W,F,D){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var A=this.container;D||(D=A.clientHeight||A.scrollHeight),!D&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",D=A.clientHeight||A.scrollHeight),F||(F=A.clientWidth||A.scrollWidth);var _=this.$updateCachedSize(M,W,F,D);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!D)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?this.$renderChanges(_|this.$changes,!0):this.$loop.schedule(_|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(M,W,F,D){D-=this.$extraHeight||0;var A=0,_=this.$size,L={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};if(D&&(M||_.height!=D)&&(_.height=D,A|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(_.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),F&&(M||_.width!=F)){A|=this.CHANGE_SIZE,_.width=F,W==null&&(W=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=W,p.setStyle(this.scrollBarH.element.style,"left",W+"px"),p.setStyle(this.scroller.style,"left",W+this.margin.left+"px"),_.scrollerWidth=Math.max(0,F-W-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",B),p.setStyle(this.scroller.style,"right",B),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(_.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(A|=this.CHANGE_FULL)}return _.$dirty=!F||!D,A&&this._signal("resize",L),A},I.prototype.onGutterResize=function(M){var W=this.$showGutter?M:0;W!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,W,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},I.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,W=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(W,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},I.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},I.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=p.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var W=this.$printMarginEl.style;W.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",W.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,W=this.$composition;if(!this.$keepTextAreaAtCursor&&!W){p.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){W&&W.markerRange&&(F=this.$cursorLayer.getPixelPosition(W.markerRange.start,!0));var D=this.layerConfig,A=F.top,_=F.left;A-=D.offset;var L=W&&W.useTextareaForIME||C.isMobile?this.lineHeight:1;if(A<0||A>D.height-L){p.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-L;if(!W)A+=this.lineHeight;else if(W.useTextareaForIME){var V=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(V)[0]}else A+=this.lineHeight+2;_-=this.scrollLeft,_>this.$size.scrollerWidth-B&&(_=this.$size.scrollerWidth-B),_+=this.gutterWidth+this.margin.left,p.setStyle(M,"height",L+"px"),p.setStyle(M,"width",B+"px"),p.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-B),Math.min(A,U))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,W=M.lastRow,F=this.session.documentToScreenRow(W,0)*M.lineHeight;return F-this.session.getScrollTop()>M.height-M.lineHeight?W-1:W},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(M,W,F,D){var A=this.scrollMargin;A.top=M|0,A.bottom=W|0,A.right=D|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},I.prototype.setMargin=function(M,W,F,D){var A=this.margin;A.top=M|0,A.bottom=W|0,A.right=D|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},I.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,W=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(W-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-W&&(M=this.scrollTop+W,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(M,W){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!W){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var D=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;D>0&&(this.scrollTop=D,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-F.offset);var A=F.width+2*this.$padding+"px",_=F.minHeight+"px";p.setStyle(this.content.style,"width",A),p.setStyle(this.content.style,"height",_)}if(M&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",M)},I.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,W=this.$maxLines*this.lineHeight,F=Math.min(W,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var D=F<=2*this.lineHeight,A=!D&&M>W;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var _=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,_,F),this.desiredHeight=F,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var M=this.session,W=this.$size,F=W.height<=2*this.lineHeight,D=this.session.getScreenLength(),A=D*this.lineHeight,_=this.$getLongestLine(),L=!F&&(this.$hScrollBarAlwaysVisible||W.scrollerWidth-_-2*this.$padding<0),B=this.$horizScroll!==L;B&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=W.height<=2*this.lineHeight);var V=W.scrollerHeight+this.lineHeight,K=!this.$maxLines&&this.$scrollPastEnd?(W.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=K;var ee=this.scrollMargin;this.session.setScrollTop(Math.max(-ee.top,Math.min(this.scrollTop,A-W.scrollerHeight+ee.bottom))),this.session.setScrollLeft(Math.max(-ee.left,Math.min(this.scrollLeft,_+2*this.$padding-W.scrollerWidth+ee.right)));var ae=!F&&(this.$vScrollBarAlwaysVisible||W.scrollerHeight-A+K<0||this.scrollTop>ee.top),Q=U!==ae;Q&&(this.$vScroll=ae,this.scrollBarV.setVisible(ae));var oe=this.scrollTop%this.lineHeight,se=Math.ceil(V/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-oe)/this.lineHeight)),pe=ue+se,ve,$e,Re=this.lineHeight;ue=M.screenToDocumentRow(ue,0);var Ye=M.getFoldLine(ue);Ye&&(ue=Ye.start.row),ve=M.documentToScreenRow(ue,0),$e=M.getRowLength(ue)*Re,pe=Math.min(M.screenToDocumentRow(pe,0),M.getLength()-1),V=W.scrollerHeight+M.getRowLength(pe)*Re+$e,oe=this.scrollTop-ve*Re,oe<0&&ve>0&&(ve=Math.max(0,ve+Math.floor(oe/Re)),oe=this.scrollTop-ve*Re);var Ge=0;return(this.layerConfig.width!=_||B)&&(Ge=this.CHANGE_H_SCROLL),(B||Q)&&(Ge|=this.$updateCachedSize(!0,this.gutterWidth,W.width,W.height),this._signal("scrollbarVisibilityChanged"),Q&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:ue,firstRowScreen:ve,lastRow:pe,lineHeight:Re,characterWidth:this.characterWidth,minHeight:V,maxHeight:A,offset:oe,gutterOffset:Re?Math.max(0,Math.ceil((oe+W.height-W.scrollerHeight)/Re)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(_-this.$padding),Ge},I.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,W=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(M>F.lastRow+1)&&!(W<F.firstRow)){if(W===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,M,W),!0}}},I.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(M,W){this.$gutterLayer.addGutterDecoration(M,W)},I.prototype.removeGutterDecoration=function(M,W){this.$gutterLayer.removeGutterDecoration(M,W)},I.prototype.updateBreakpoints=function(M){this._rows=M,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(M,W,F){this.scrollCursorIntoView(M,F),this.scrollCursorIntoView(W,F)},I.prototype.scrollCursorIntoView=function(M,W,F){if(this.$size.scrollerHeight!==0){var D=this.$cursorLayer.getPixelPosition(M),A=D.left,_=D.top,L=F&&F.top||0,B=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+L>_?(W&&U+L>_+this.lineHeight&&(_-=W*this.$size.scrollerHeight),_===0&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):U+this.$size.scrollerHeight-B<_+this.lineHeight&&(W&&U+this.$size.scrollerHeight-B<_-this.lineHeight&&(_+=W*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight+B-this.$size.scrollerHeight));var V=this.scrollLeft,K=2*this.layerConfig.characterWidth;A-K<V?(A-=K,A<this.$padding+K&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=K,V+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):V<=this.$padding&&A-V<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(M){this.session.setScrollTop(M*this.lineHeight)},I.prototype.alignCursor=function(M,W){typeof M=="number"&&(M={row:M,column:0});var F=this.$cursorLayer.getPixelPosition(M),D=this.$size.scrollerHeight-this.lineHeight,A=F.top-D*(W||0);return this.session.setScrollTop(A),A},I.prototype.$calcSteps=function(M,W){var F=0,D=this.STEPS,A=[],_=function(L,B,U){return U*(Math.pow(L-1,3)+1)+B};for(F=0;F<D;++F)A.push(_(F/this.STEPS,M,W-M));return A},I.prototype.scrollToLine=function(M,W,F,D){var A=this.$cursorLayer.getPixelPosition({row:M,column:0}),_=A.top;W&&(_-=this.$size.scrollerHeight/2);var L=this.scrollTop;this.session.setScrollTop(_),F!==!1&&this.animateScrolling(L,D)},I.prototype.animateScrolling=function(M,W){var F=this.scrollTop;if(!this.$animatedScroll)return;var D=this;if(M==F)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(M=A[0],M==F))return}var _=D.$calcSteps(M,F);this.$scrollAnimation={from:M,to:F,steps:_},clearInterval(this.$timer),D.session.setScrollTop(_.shift()),D.session.$scrollTop=F;function L(){D.$timer=clearInterval(D.$timer),D.$scrollAnimation=null,D.$stopAnimation=!1,W&&W()}this.$timer=setInterval(function(){if(D.$stopAnimation){L();return}if(!D.session)return clearInterval(D.$timer);_.length?(D.session.setScrollTop(_.shift()),D.session.$scrollTop=F):F!=null?(D.session.$scrollTop=-1,D.session.setScrollTop(F),F=null):L()},10)},I.prototype.scrollToY=function(M){this.scrollTop!==M&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=M)},I.prototype.scrollToX=function(M){this.scrollLeft!==M&&(this.scrollLeft=M),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(M,W){this.session.setScrollTop(W),this.session.setScrollLeft(M)},I.prototype.scrollBy=function(M,W){W&&this.session.setScrollTop(this.session.getScrollTop()+W),M&&this.session.setScrollLeft(this.session.getScrollLeft()+M)},I.prototype.isScrollableBy=function(M,W){if(W<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||W>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(M,W){var F;if(this.$hasCssTransforms){F={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([M,W]);M=D[1]-this.gutterWidth-this.margin.left,W=D[0]}else F=this.scroller.getBoundingClientRect();var A=M+this.scrollLeft-F.left-this.$padding,_=A/this.characterWidth,L=Math.floor((W+this.scrollTop-F.top)/this.lineHeight),B=this.$blockCursor?Math.floor(_):Math.round(_);return{row:L,column:B,side:_-B>0?1:-1,offsetX:A}},I.prototype.screenToTextCoordinates=function(M,W){var F;if(this.$hasCssTransforms){F={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([M,W]);M=D[1]-this.gutterWidth-this.margin.left,W=D[0]}else F=this.scroller.getBoundingClientRect();var A=M+this.scrollLeft-F.left-this.$padding,_=A/this.characterWidth,L=this.$blockCursor?Math.floor(_):Math.round(_),B=(W+this.scrollTop-F.top)/this.lineHeight;return this.session.screenToDocumentPosition(B,Math.max(L,0),A)},I.prototype.textToScreenCoordinates=function(M,W){var F=this.scroller.getBoundingClientRect(),D=this.session.documentToScreenPosition(M,W),A=this.$padding+(this.session.$bidiHandler.isBidiRow(D.row,M)?this.session.$bidiHandler.getPosLeft(D.column):Math.round(D.column*this.characterWidth)),_=D.row*this.lineHeight;return{pageX:F.left+A-this.scrollLeft,pageY:F.top+_-this.scrollTop}},I.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(M){var W=this.session.selection.cursor;this.addToken(M,"composition_placeholder",W.row,W.column),this.$moveTextAreaToCursor()},I.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 M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(M,W){var F=this.session.selection.cursor,D=W||{row:F.row,column:F.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(M,D);this.addToken(A[0].text,"ghost_text",D.row,D.column),this.$ghostText={text:M,position:{row:D.row,column:D.column}};var _=p.createElement("div");if(A.length>1){var L=this.hideTokensAfterPosition(D.row,D.column),B;A.slice(1).forEach(function(Q){var oe=p.createElement("div"),se=p.createElement("span");se.className="ace_ghost_text",Q.wrapped&&(oe.className="ghost_text_line_wrapped"),Q.text.length===0&&(Q.text=" "),se.appendChild(p.createTextNode(Q.text)),oe.appendChild(se),_.appendChild(oe),B=oe}),L.forEach(function(Q){var oe=p.createElement("span");O(Q.type)||(oe.className="ace_"+Q.type.replace(/\./g," ace_")),oe.appendChild(p.createTextNode(Q.value)),B.appendChild(oe)}),this.$ghostTextWidget={el:_,row:D.row,column:D.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(D,!0),V=this.container,K=V.getBoundingClientRect().height,ee=A.length*this.lineHeight,ae=ee<K-U.top;if(ae)return;ee<K?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(D.row)}},I.prototype.$calculateWrappedTextChunks=function(M,W){var F=this.$size.scrollerWidth-this.$padding*2,D=Math.floor(F/this.characterWidth)-2;D=D<=0?60:D;for(var A=M.split(/\r?\n/),_=[],L=0;L<A.length;L++){var B=this.session.$getDisplayTokens(A[L],W.column),U=this.session.$computeWrapSplits(B,D,this.session.$tabSize);if(U.length>0){var V=0;U.push(A[L].length);for(var K=0;K<U.length;K++){var ee=A[L].slice(V,U[K]);_.push({text:ee,wrapped:!0}),V=U[K]}}else _.push({text:A[L],wrapped:!1})}return _},I.prototype.removeGhostText=function(){if(this.$ghostText){var M=this.$ghostText.position;this.removeExtraToken(M.row,M.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(M,W,F,D){var A=this.session;A.bgTokenizer.lines[F]=null;var _={type:W,value:M},L=A.getTokens(F);if(D==null||!L.length)L.push(_);else for(var B=0,U=0;U<L.length;U++){var V=L[U];if(B+=V.value.length,D<=B){var K=V.value.length-(B-D),ee=V.value.slice(0,K),ae=V.value.slice(K);L.splice(U,1,{type:V.type,value:ee},_,{type:V.type,value:ae});break}}this.updateLines(F,F)},I.prototype.hideTokensAfterPosition=function(M,W){for(var F=this.session.getTokens(M),D=0,A=!1,_=[],L=0;L<F.length;L++){var B=F[L];if(D+=B.value.length,B.type!=="ghost_text"){if(A){_.push({type:B.type,value:B.value}),B.type="hidden_token";continue}D===W&&(A=!0)}}return this.updateLines(M,M),_},I.prototype.removeExtraToken=function(M,W){this.session.bgTokenizer.lines[M]=null,this.updateLines(M,M)},I.prototype.setTheme=function(M,W){var F=this;if(this.$themeId=M,F._dispatchEvent("themeChange",{theme:M}),!M||typeof M=="string"){var D=M||this.$options.theme.initialValue;s.loadModule(["theme",D],A)}else A(M);function A(_){if(F.$themeId!=M)return W&&W();if(!_||!_.cssClass)throw new Error("couldn't load module "+M+" or it didn't call define");_.$id&&(F.$themeId=_.$id),p.importCssString(_.cssText,_.cssClass,F.container),F.theme&&p.removeCssClass(F.container,F.theme.cssClass);var L="padding"in _?_.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&L!=F.$padding&&F.setPadding(L),F.$gutterLayer){var B=_.$showGutterCursorMarker;B&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!B&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=_.cssClass,F.theme=_,p.addCssClass(F.container,_.cssClass),p.setCssClass(F.container,"ace_dark",_.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:_}),W&&W(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(M,W){p.setCssClass(this.container,M,W!==!1)},I.prototype.unsetStyle=function(M){p.removeCssClass(this.container,M)},I.prototype.setCursorStyle=function(M){p.setStyle(this.scroller.style,"cursor",M)},I.prototype.setMouseCursor=function(M){p.setStyle(this.scroller.style,"cursor",M)},I.prototype.attachToShadowRoot=function(){p.importCssString($,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(M){var W=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),M===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollTop(F.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollLeft(F.data-W.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollTop(F.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollLeft(F.data-W.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var M=this;this.$resizeTimer=v.delayedCall(function(){M.destroyed||M.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(W){var F=W[0].contentRect.width,D=W[0].contentRect.height;Math.abs(M.$size.width-F)>1||Math.abs(M.$size.height-D)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I})();N.prototype.CHANGE_CURSOR=1,N.prototype.CHANGE_MARKER=2,N.prototype.CHANGE_GUTTER=4,N.prototype.CHANGE_SCROLL=8,N.prototype.CHANGE_LINES=16,N.prototype.CHANGE_TEXT=32,N.prototype.CHANGE_SIZE=64,N.prototype.CHANGE_MARKER_BACK=128,N.prototype.CHANGE_MARKER_FRONT=256,N.prototype.CHANGE_FULL=512,N.prototype.CHANGE_H_SCROLL=1024,N.prototype.$changes=0,N.prototype.$padding=null,N.prototype.$frozen=!1,N.prototype.STEPS=8,h.implement(N.prototype,R),s.defineOptions(N.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=N}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,d){var h=e("../lib/oop"),p=e("../lib/net"),v=e("../lib/event_emitter").EventEmitter,s=e("../config");function f(g){var o="importScripts('"+p.qualifyURL(g)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new c;return m.append(o),m.getBlob("application/javascript")}}function i(g){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var o=f(g),c=window.URL||window.webkitURL,m=c.createObjectURL(o);return new Worker(m)}return new Worker(g)}var a=function(g){g.postMessage||(g=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=g,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(){h.implement(this,v),this.$createWorkerFromOldConfig=function(g,o,c,m,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)m=m||s.moduleUrl(o,"worker");else{var x=this.$normalizePath;m=m||x(e.toUrl("ace/worker/worker.js",null,"_"));var R={};g.forEach(function($){R[$]=x(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:R,module:o,classname:c}),this.$worker},this.onMessage=function(g){var o=g.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var c=this.callbacks[o.id];c&&(c(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(g){window.console&&console.error&&console.error(g)},this.$normalizePath=function(g){return p.qualifyURL(g)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(g){g.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(g,o){this.$worker.postMessage({command:g,args:o})},this.call=function(g,o,c){if(c){var m=this.callbackId++;this.callbacks[m]=c,o.push(m)}this.send(g,o)},this.emit=function(g,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:g,data:{data:o.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(g){this.$doc&&this.terminate(),this.$doc=g,this.call("setValue",[g.getValue()]),g.on("change",this.changeListener,!0)},this.changeListener=function(g){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),g.action=="insert"?this.deltaQueue.push(g.start,g.lines):this.deltaQueue.push(g.start,g.end)},this.$sendDeltaQueue=function(){var g=this.deltaQueue;g&&(this.deltaQueue=null,g.length>50&&g.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:g}))}}).call(a.prototype);var u=function(g,o,c){var m=null,w=!1,x=Object.create(v),R=[],$=new a({messageBuffer:R,terminate:function(){},postMessage:function(C){R.push(C),m&&(w?setTimeout(k):k())}});$.setEmitSync=function(C){w=C};var k=function(){var C=R.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,O){this.postMessage({type:"call",id:O,data:C})},x.emit=function(C,O){this.postMessage({type:"event",name:C,data:O})},s.loadModule(["worker",o],function(C){for(m=new C[c](x);R.length;)k()}),$};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,d){var h=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,v=e("./lib/oop"),s=(function(){function f(i,a,u,g,o,c){var m=this;this.length=a,this.session=i,this.doc=i.getDocument(),this.mainClass=o,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=g,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var w=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var i=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var g=this.pos;g.$insertRight=!0,g.detach(),g.markerId=u.addMarker(new h(g.row,g.column,g.row,g.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var c=a.createAnchor(o.row,o.column);c.$insertRight=!0,c.detach(),i.others.push(c)}),u.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=i.addMarker(new h(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},f.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var a=i;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=i.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,g=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(i),g&&(this.length+=u),g&&!this.session.$fromUndo){if(i.action==="insert")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,i.lines)}else if(i.action==="remove")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],w={row:m.row,column:m.column+o};this.doc.remove(new h(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var a=this.others.length;a--;)this.others[a].onChange(i);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var i=this,a=this.session,u=function(o,c){a.removeMarker(o.markerId),o.markerId=a.addMarker(new h(o.row,o.column,o.row,o.column+i.length),c,null,!1)};u(this.pos,this.mainClass);for(var g=this.others.length;g--;)u(this.others[g],this.othersClass)}},f.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},f.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},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),a=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f})();v.implement(s.prototype,p),r.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,d){var h=e("../lib/event"),p=e("../lib/useragent");function v(f,i){return f.row==i.row&&f.column==i.column}function s(f){var i=f.domEvent,a=i.altKey,u=i.shiftKey,g=i.ctrlKey,o=f.getAccelKey(),c=f.getButton();if(g&&p.isMac&&(c=i.button),f.editor.inMultiSelectMode&&c==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!g&&!a&&!o){c===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(c===0){var m=f.editor,w=m.selection,x=m.inMultiSelectMode,R=f.getDocumentPosition(),$=w.getCursor(),k=f.inSelection()||w.isEmpty()&&v(R,$),C=f.x,O=f.y,N=function(ee){C=ee.clientX,O=ee.clientY},I=m.session,M=m.renderer.pixelToScreenCoordinates(C,O),W=M,F;if(m.$mouseHandler.$enableJumpToDef)g&&a||o&&a?F=u?"block":"add":a&&m.$blockSelectEnabled&&(F="block");else if(o&&!a){if(F="add",!x&&u)return}else a&&m.$blockSelectEnabled&&(F="block");if(F&&p.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&k)return;if(!x){var D=w.toOrientedRange();m.addSelectionMarker(D)}var A=w.rangeList.rangeAtPoint(R);m.inVirtualSelectionMode=!0,u&&(A=null,D=w.ranges[0]||D,m.removeSelectionMarker(D)),m.once("mouseup",function(){var ee=w.toOrientedRange();A&&ee.isEmpty()&&v(A.cursor,ee.cursor)?w.substractPoint(ee.cursor):(u?w.substractPoint(D.cursor):D&&(m.removeSelectionMarker(D),w.addRange(D)),w.addRange(ee)),m.inVirtualSelectionMode=!1})}else if(F=="block"){f.stop(),m.inVirtualSelectionMode=!0;var _,L=[],B=function(){var ee=m.renderer.pixelToScreenCoordinates(C,O),ae=I.screenToDocumentPosition(ee.row,ee.column,ee.offsetX);v(W,ee)&&v(ae,w.lead)||(W=ee,m.selection.moveToPosition(ae),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(L),L=w.rectangularRangeBlock(W,M),m.$mouseHandler.$clickSelection&&L.length==1&&L[0].isEmpty()&&(L[0]=m.$mouseHandler.$clickSelection.clone()),L.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!o?w.toSingleRange():!x&&o&&(_=w.toOrientedRange(),m.addSelectionMarker(_)),u?M=I.documentToScreenPosition(w.lead):w.moveToPosition(R),W={row:-1,column:-1};var U=function(ee){B(),clearInterval(K),m.removeSelectionMarkers(L),L.length||(L=[w.toOrientedRange()]),_&&(m.removeSelectionMarker(_),w.toSingleRange(_));for(var ae=0;ae<L.length;ae++)w.addRange(L[ae]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},V=B;h.capture(m.container,N,U);var K=setInterval(function(){V()},20);return f.preventDefault()}}}r.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,d){r.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}],r.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 h=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new h(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,d){var h=e("./range_list").RangeList,p=e("./range").Range,v=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,f=e("./lib/event"),i=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=e("./search").Search,g=new u;function o($,k,C){return g.$options.wrap=!0,g.$options.needle=k,g.$options.backwards=C==-1,g.find($)}var c=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,k){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var O=this.rangeList.add($);return this.$onAddRange($),O.length&&this.$onRemoveRange(O),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),$&&this.fromOrientedRange($)},this.substractPoint=function($){var k=this.rangeList.substractPoint($);if(k)return this.$onRemoveRange(k),k[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 k=this.rangeList.ranges.pop();$.push(k),this.rangeCount=0}for(var C=$.length;C--;){var O=this.ranges.indexOf($[C]);this.ranges.splice(O,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)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new h,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()],k=[],C=0;C<$.length;C++){var O=$[C],N=O.start.row,I=O.end.row;if(N===I)k.push(O.clone());else{for(k.push(new p(N,O.start.column,N,this.session.getLine(N).length));++N<I;)k.push(this.getLineRange(N,!0));k.push(new p(I,0,I,O.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var $=this.rangeList.ranges,k=$[$.length-1],C=p.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,k=$[$.length-1],C=p.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var O=this.session.documentToScreenPosition(this.cursor),N=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(O,N);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,k,C){var O=[],N=$.column<k.column;if(N)var I=$.column,M=k.column,W=$.offsetX,F=k.offsetX;else var I=k.column,M=$.column,W=k.offsetX,F=$.offsetX;var D=$.row<k.row;if(D)var A=$.row,_=k.row;else var A=k.row,_=$.row;I<0&&(I=0),A<0&&(A=0),A==_&&(C=!0);for(var L,B=A;B<=_;B++){var U=p.fromPoints(this.session.screenToDocumentPosition(B,I,W),this.session.screenToDocumentPosition(B,M,F));if(U.isEmpty()){if(L&&w(U.end,L))break;L=U.end}U.cursor=N?U.start:U.end,O.push(U)}if(D&&O.reverse(),!C){for(var V=O.length-1;O[V].isEmpty()&&V>0;)V--;if(V>0)for(var K=0;O[K].isEmpty();)K++;for(var ee=V;ee>=K;ee--)O[ee].isEmpty()&&O.splice(ee,1)}return O}}).call(v.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var k=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",k),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var k=this.session.$selectionMarkers.indexOf($);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var k=this.session.$selectionMarkers,C=$.length;C--;){var O=$[C];if(O.marker){this.session.removeMarker(O.marker);var N=k.indexOf(O);N!=-1&&k.splice(N,1)}}this.session.selectionMarkerCount=k.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(a.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(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var k=$.command,C=$.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?O=C.forEachSelection(k,$.args):k.multiSelectAction=="forEachLine"?O=C.forEachSelection(k,$.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=k.exec(C,$.args||{})):O=k.multiSelectAction(C,$.args||{});else{var O=k.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function($,k,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,N=C==!0||C&&C.$byLines,I=this.session,M=this.selection,W=M.rangeList,F=(O?M:W).ranges,D;if(!F.length)return $.exec?$.exec(this,k||{}):$(this,k||{});var A=M._eventRegistry;M._eventRegistry={};var _=new v(I);this.inVirtualSelectionMode=!0;for(var L=F.length;L--;){if(N)for(;L>0&&F[L].start.row==F[L-1].end.row;)L--;_.fromOrientedRange(F[L]),_.index=L,this.selection=I.selection=_;var B=$.exec?$.exec(this,k||{}):$(this,k||{});!D&&B!==void 0&&(D=B),_.toOrientedRange(F[L])}_.detach(),this.selection=I.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=A,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),D}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],O=0;O<k.length;O++)C.push(this.session.getTextRange(k[O]));var N=this.session.getDocument().getNewLineCharacter();$=C.join(N),$.length==(C.length-1)*N.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var O=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=k.row||this.session.$clipPositionToDocument(O.row,O.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,k,C){if(k=k||{},k.needle=$||k.needle,k.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(O)}this.$search.set(k);var N=this.$search.findAll(this.session);if(!N.length)return 0;var I=this.multiSelect;C||I.toSingleRange(N[0]);for(var M=N.length;M--;)I.addRange(N[M],!0);return O&&I.rangeList.rangeAtPoint(O.start)&&I.addRange(O,!0),N.length},this.selectMoreLines=function($,k){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,N=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(N.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(N.row+$,N.column);if(C.isEmpty())var W=I;else var M=this.session.documentToScreenPosition(O?C.end:C.start),W=this.session.screenToDocumentPosition(M.row+$,M.column);if(O){var F=p.fromPoints(I,W);F.cursor=F.start}else{var F=p.fromPoints(W,I);F.cursor=F.end}if(F.desiredColumn=N.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var D=C.cursor;this.selection.addRange(F),D&&this.selection.substractPoint(D)},this.transposeSelections=function($){for(var k=this.session,C=k.multiSelect,O=C.ranges,N=O.length;N--;){var I=O[N];if(I.isEmpty()){var M=k.getWordRange(I.start.row,I.start.column);I.start.row=M.start.row,I.start.column=M.start.column,I.end.row=M.end.row,I.end.column=M.end.column}}C.mergeOverlappingRanges();for(var W=[],N=O.length;N--;){var I=O[N];W.unshift(k.getTextRange(I))}$<0?W.unshift(W.pop()):W.push(W.shift());for(var N=O.length;N--;){var I=O[N],F=I.clone();k.replace(I,W[N]),I.start.row=F.start.row,I.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,k,C){var O=this.session,N=O.multiSelect,I=N.toOrientedRange();if(!(I.isEmpty()&&(I=O.getWordRange(I.start.row,I.start.column),I.cursor=$==-1?I.start:I.end,this.multiSelect.addRange(I),C))){var M=O.getTextRange(I),W=o(O,M,$);W&&(W.cursor=$==-1?W.start:W.end,this.session.unfold(W),this.multiSelect.addRange(W),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var $=this.session,k=$.multiSelect,C=k.ranges,O=-1,N=C.filter(function(V){if(V.cursor.row==O)return!0;O=V.cursor.row});if(!C.length||N.length==C.length-1){var I=this.selection.getRange(),M=I.start.row,W=I.end.row,F=M==W;if(F){var D=this.session.getLength(),A;do A=this.session.getLine(W);while(/[=:]/.test(A)&&++W<D);do A=this.session.getLine(M);while(/[=:]/.test(A)&&--M>0);M<0&&(M=0),W>=D&&(W=D-1)}var _=this.session.removeFullLines(M,W);_=this.$reAlignText(_,F),this.session.insert({row:M,column:0},_.join(`
954
- `)+`
955
- `),F||(I.start.column=0,I.end.column=_[_.length-1].length),this.selection.setRange(I)}else{N.forEach(function(V){k.substractPoint(V.cursor)});var L=0,B=1/0,U=C.map(function(V){var K=V.cursor,ee=$.getLine(K.row),ae=ee.substr(K.column).search(/\S/g);return ae==-1&&(ae=0),K.column>L&&(L=K.column),ae<B&&(B=ae),ae});C.forEach(function(V,K){var ee=V.cursor,ae=L-ee.column,Q=U[K]-B;ae>Q?$.insert(ee,i.stringRepeat(" ",ae-Q)):$.remove(new p(ee.row,ee.column,ee.row,ee.column-ae+Q)),V.start.column=V.end.column=L,V.start.row=V.end.row=ee.row,V.cursor=V.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,k){var C=!0,O=!0,N,I,M;return $.map(function(_){var L=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?N==null?(N=L[1].length,I=L[2].length,M=L[3].length,L):(N+I+M!=L[1].length+L[2].length+L[3].length&&(O=!1),N!=L[1].length&&(C=!1),N>L[1].length&&(N=L[1].length),I<L[2].length&&(I=L[2].length),M>L[3].length&&(M=L[3].length),L):[_]}).map(k?F:C?O?D:F:A);function W(_){return i.stringRepeat(" ",_)}function F(_){return _[2]?W(N)+_[2]+W(I-_[2].length+M)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function D(_){return _[2]?W(N+I-_[2].length)+_[2]+W(M)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function A(_){return _[2]?W(N)+_[2]+W(M)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(m.prototype);function w($,k){return $.row==k.row&&$.column==k.column}r.onSessionChange=function($){var k=$.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",s),$.commands.addCommands(a.defaultCommands),R($))}function R($){if(!$.textInput)return;var k=$.textInput.getElement(),C=!1;f.addListener(k,"keydown",function(N){var I=N.keyCode==18&&!(N.ctrlKey||N.shiftKey||N.metaKey);$.$blockSelectEnabled&&I?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},$),f.addListener(k,"keyup",O,$),f.addListener(k,"blur",O,$);function O(N){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function($){x(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(e,r,d){var h=e("../../range").Range,p=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,s,f){var i=v.getLine(f);return this.foldingStartMarker.test(i)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(v,s,f){return null},this.indentationBlock=function(v,s,f){var i=/\S/,a=v.getLine(s),u=a.search(i);if(u!=-1){for(var g=f||a.length,o=v.getLength(),c=s,m=s;++s<o;){var w=v.getLine(s).search(i);if(w!=-1){if(w<=u){var x=v.getTokenAt(s,0);if(!x||x.type!=="string")break}m=s}}if(m>c){var R=v.getLine(m).length;return new h(c,g,m,R)}}},this.openingBracketBlock=function(v,s,f,i,a){var u={row:f,column:i+1},g=v.$findClosingBracket(s,u,a);if(g){var o=v.foldWidgets[g.row];return o==null&&(o=v.getFoldWidget(g.row)),o=="start"&&g.row>u.row&&(g.row--,g.column=v.getLine(g.row).length),h.fromPoints(u,g)}},this.closingBracketBlock=function(v,s,f,i,a){var u={row:f,column:i},g=v.$findOpeningBracket(s,u);if(g)return g.column++,u.column--,h.fromPoints(g,u)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,d){var h=e("../lib/dom"),p=e("../range").Range,v=e("../config").nls;function s(i,a,u){for(var g=0,o=i.length-1;g<=o;){var c=g+o>>1,m=u(a,i[c]);if(m>0)g=c+1;else if(m<0)o=c-1;else return c}return-(g+1)}function f(i,a,u){var g=i.getAnnotations().sort(p.comparePoints);if(g.length){var o=s(g,{row:a,column:-1},p.comparePoints);o<0&&(o=-o-1),o>=g.length?o=u>0?0:g.length-1:o===0&&u<0&&(o=g.length-1);var c=g[o];if(!(!c||!u)){if(c.row===a){do c=g[o+=u];while(c&&c.row===a);if(!c)return g.slice()}var m=[];a=c.row;do m[u<0?"unshift":"push"](c),c=g[o+=u];while(c&&c.row==a);return m.length&&m}}}r.showErrorMarker=function(i,a){var u=i.session,g=i.getCursorPosition(),o=g.row,c=u.widgetManager.getWidgetsAtRow(o).filter(function(N){return N.type=="errorMarker"})[0];c?c.destroy():o-=a;var m=f(u,o,a),w;if(m){var x=m[0];g.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,g.row=x.row,w=i.renderer.$gutterLayer.$annotations[g.row]}else{if(c)return;w={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(g.row),i.selection.moveToPosition(g);var R={row:g.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},$=R.el.appendChild(h.createElement("div")),k=R.el.appendChild(h.createElement("div"));k.className="error_widget_arrow "+w.className;var C=i.renderer.$cursorLayer.getPixelPosition(g).left;k.style.left=C+i.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(N,I){$.appendChild(h.createTextNode(N)),I<w.displayText.length-1&&$.appendChild(h.createElement("br"))}),$.appendChild(h.createElement("div"));var O=function(N,I,M){if(I===0&&(M==="esc"||M==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(O),u.widgetManager.removeLineWidget(R),i.off("changeSelection",R.destroy),i.off("changeSession",R.destroy),i.off("mouseup",R.destroy),i.off("change",R.destroy))},i.keyBinding.addKeyboardHandler(O),i.on("changeSelection",R.destroy),i.on("changeSession",R.destroy),i.on("mouseup",R.destroy),i.on("change",R.destroy),i.session.widgetManager.addLineWidget(R),R.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},h.importCssString(`
956
- .error_widget_wrapper {
957
- background: inherit;
958
- color: inherit;
959
- border:none
960
- }
961
- .error_widget {
962
- border-top: solid 2px;
963
- border-bottom: solid 2px;
964
- margin: 5px 0;
965
- padding: 10px 40px;
966
- white-space: pre-wrap;
967
- }
968
- .error_widget.ace_error, .error_widget_arrow.ace_error{
969
- border-color: #ff5a5a
970
- }
971
- .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
- border-color: #F1D817
973
- }
974
- .error_widget.ace_info, .error_widget_arrow.ace_info{
975
- border-color: #5a5a5a
976
- }
977
- .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
- border-color: #5aaa5a
979
- }
980
- .error_widget_arrow {
981
- position: absolute;
982
- border: solid 5px;
983
- border-top-color: transparent!important;
984
- border-right-color: transparent!important;
985
- border-left-color: transparent!important;
986
- top: -5px;
987
- }
988
- `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,d){e("./loader_build")(r);var h=e("./lib/dom"),p=e("./range").Range,v=e("./editor").Editor,s=e("./edit_session").EditSession,f=e("./undomanager").UndoManager,i=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(u,g){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof v)return u.env.editor;var c="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;c=m.value,u=h.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(c=u.textContent,u.innerHTML="");var w=r.createEditSession(c),x=new v(new i(u),w,g),R={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(R.textarea=m),x.on("destroy",function(){R.editor.container.env=null}),x.container.env=x.env=R,x},r.createEditSession=function(u,g){var o=new s(u,g);return o.setUndoManager(new f),o},r.Range=p,r.Editor=v,r.EditSession=s,r.UndoManager=f,r.VirtualRenderer=i;var a=r.config.version;r.version=a}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var d in e)e.hasOwnProperty(d)&&(r.ace[d]=e[d]);r.ace.default=r.ace,n&&(n.exports=r.ace)})})()})(Om)),Om.exports}var ys=Tn("m",uS()),Dm={exports:{}},Pm;function hS(){return Pm||(Pm=1,(function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,v=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var s=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},g=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},c=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="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",x="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",R="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",k=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":R,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?: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})*})`,O={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{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(N,I,M){M.length&&(M=[]);var W=N[N.length-1];return M.unshift(W,I),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,I,M){M.length&&(M=[]);var W=N[N.length-1];return M.unshift(W,I),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,I,M){M.length&&(M=[]);var W=N[N.length-1];return M.unshift(W,I),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,I,M){M.length&&(M=[]);var W=N[N.length-1];return M.unshift(W,I),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,I,M){M.length&&(M=[]);var W=N[N.length-1];return M.unshift(W,I),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{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\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,g,v,s,o,f,i,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,I,M){var W=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",F=N.split(this.splitRegex);return M.push(W,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(N,I,M){return N===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,I,M){return N===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,I){return I[0]==="heredoc"||I[0]==="indentedHeredoc"?I[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,I,M){return this.next="",N=="}"&&M.length>1&&M[1]!="start"&&(M.shift(),this.next=M.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(N,I,M){return M.length&&N===M[0]?(M.unshift(N,I),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,I,M){return M.length&&N===O[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,I,M){return M.length&&N===M[0]?(M.unshift(N,I),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,I,M){return M.length&&N===O[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,I,M){return M.length&&N===M[0]?(M.unshift(N,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,I,M){return M.length&&N===O[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,I,M){return M.length&&N===M[0]?(M.unshift(N,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,I,M){return M.length&&N===O[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,I,M){return M.length&&N===M[0]?(M.unshift(N,I),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,I,M){return M.length&&N[0]===O[M[0]]?(M.shift(),this.next=M.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()};h.inherits(m,p),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,p=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var f=v.getLine(s),i=f.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=v.findMatchingBracket({row:s,column:a});if(!u||u.row==s)return 0;var g=this.$getIndent(v.getLine(u.row));v.replace(new h(s,0,s,a-1),g)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(p.prototype),r.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(e,r,d){var h=e("../../lib/oop"),p=e("./fold_mode").FoldMode,v=e("../../range").Range,s=e("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};h.inherits(f,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(i,a,u){var g=i.getLine(u),o=this.foldingStartMarker.test(g),c=this.foldingStopMarker.test(g);if(o&&!c){var m=g.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(g)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(g)===!1)||m[1]=="when"&&/\sthen\s/.test(g)===!0)return;if(i.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!c||o&&c)return"";var m=g.match(this.foldingStopMarker);if(m[3]==="end"){if(i.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,a,u){var g=i.doc.getLine(u),o=this.foldingStartMarker.exec(g);if(o)return o[1]||o[3]?this.rubyBlock(i,u,o.index+2):this.openingBracketBlock(i,"{",u,o.index);var o=this.foldingStopMarker.exec(g);if(o)return o[3]==="end"&&i.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(i,u,o.index+1):o[1]==="=end"&&i.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(i,u,o.index+1):this.closingBracketBlock(i,"}",u,o.index+o[0].length)},this.rubyBlock=function(i,a,u,g){var o=new s(i,a,u),c=o.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var m=c.value,w=i.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);if(!x.test(w))return;var R=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");if(!x.test(w))return;var R=1;break;default:var R=this.indentKeywords[m]}var $=[m];if(R){var k=R===-1?i.getLine(a-1).length:i.getLine(a).length,C=a,O=[];if(O.push(o.getCurrentTokenRange()),o.step=R===-1?o.stepBackward:o.stepForward,c.type=="comment.multiline"){for(;c=o.step();)if(c.type==="comment.multiline"){if(R==1){if(k=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=o.step();){var N=!1;if(c.type==="keyword"){var I=R*this.indentKeywords[c.value];switch(w=i.getLine(o.getCurrentTokenRow()),c.value){case"do":for(var M=o.$tokenIndex-1;M>=0;M--){var W=o.$rowTokens[M];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){I=0;break}}break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");(!x.test(w)||m=="case")&&(I=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);x.test(w)||(I=0,N=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(I=0,N=!0)}if(I>0)$.unshift(c.value);else if(I<=0&&N===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&c.value!="do"||c.value=="do"&&R==-1&&I!=0||c.value!="do"))break;I===0&&$.unshift(c.value)}}}if(!c)return null;if(g)return O.push(o.getCurrentTokenRange()),O;var a=o.getCurrentTokenRow();if(R===-1){if(c.type==="comment.multiline")var F=6;else var F=i.getLine(a).length;return new v(a,F,C-1,k)}return new v(C,k,a-1,i.getLine(a-1).length)}}}}).call(f.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,r,d){var h=e("../lib/oop"),p=e("./text").Mode,v=e("./ruby_highlight_rules").RubyHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../range").Range,i=e("./folding/ruby").FoldMode,a=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};h.inherits(a,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,g,o){var c=this.$getIndent(g),m=this.getTokenizer().getLineTokens(g,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=g.match(/^.*[\{\(\[]\s*$/),R=g.match(/^\s*(class|def|module)\s.*$/),$=g.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=g.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||R||$||k)&&(c+=o)}return c},this.checkOutdent=function(u,g,o){return/^\s+(end|else|rescue|ensure)$/.test(g+o)||this.$outdent.checkOutdent(g,o)},this.autoOutdent=function(u,g,o){var c=g.getLine(o);if(/}/.test(c))return this.$outdent.autoOutdent(g,o);var m=this.$getIndent(c),w=g.getLine(o-1),x=this.$getIndent(w),R=g.getTabString();x.length<=m.length&&m.slice(-R.length)==R&&g.remove(new f(o,m.length-R.length,o,m.length))},this.getMatching=function(u,g,o){if(g==null){var c=u.selection.lead;o=c.column,g=c.row}var m=u.getTokenAt(g,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,g,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})})()})(Dm)),Dm.exports}hS();var Fm={exports:{}},zm;function dS(){return zm||(zm=1,(function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,v=function(){var s="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",f="True|False|None|NotImplemented|Ellipsis|__debug__",i="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"variable.language":"self|cls","constant.language":f,keyword:s},"identifier"),u="[uU]?",g="[rR]",o="[fF]",c="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",$="(?:"+m+"|"+w+"|"+x+"|"+R+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",N="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",I="(?:(?:"+N+"|"+O+")"+k+")",M="(?:"+I+"|"+N+")",W=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:g+'"{3}',next:"rawqqstring3"},{token:"string",regex:g+'"(?=.)',next:"rawqqstring"},{token:"string",regex:g+"'{3}",next:"rawqstring3"},{token:"string",regex:g+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+M+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:M},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};h.inherits(v,p),r.PythonHighlightRules=v}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),p=e("./fold_mode").FoldMode,v=r.FoldMode=function(s){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+s+")(?:\\s*)(?:#.*)?$")};h.inherits(v,p),(function(){this.getFoldWidgetRange=function(s,f,i){var a=s.getLine(i),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(s,u[1],i,u.index):u[2]?this.indentationBlock(s,i,u.index+u[2].length):this.indentationBlock(s,i)}}).call(v.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,r,d){var h=e("../lib/oop"),p=e("./text").Mode,v=e("./python_highlight_rules").PythonHighlightRules,s=e("./folding/pythonic").FoldMode,f=e("../range").Range,i=function(){this.HighlightRules=v,this.foldingRules=new s("\\:"),this.$behaviour=this.$defaultBehaviour};h.inherits(i,p),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,g,o){var c=this.$getIndent(g),m=this.getTokenizer().getLineTokens(g,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=g.match(/^.*[\{\(\[:]\s*$/);x&&(c+=o)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,g,o){if(o!==`\r
989
- `&&o!=="\r"&&o!==`
990
- `)return!1;var c=this.getTokenizer().getLineTokens(g.trim(),u).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,g,o){o+=1;var c=this.$getIndent(g.getLine(o)),m=g.getTabString();c.slice(-m.length)==m&&g.remove(new f(o,c.length-m.length,o,c.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})})()})(Fm)),Fm.exports}dS();var Bm={exports:{}},Wm;function fS(){return Wm||(Wm=1,(function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,v=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};h.inherits(v,p),r.JsonHighlightRules=v}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,p=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var f=v.getLine(s),i=f.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=v.findMatchingBracket({row:s,column:a});if(!u||u.row==s)return 0;var g=this.$getIndent(v.getLine(u.row));v.replace(new h(s,0,s,a-1),g)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),p=e("../../range").Range,v=e("./fold_mode").FoldMode,s=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};h.inherits(s,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,i,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var g=this._getFoldWidgetBase(f,i,a);return!g&&this.startRegionRe.test(u)?"start":g},this.getFoldWidgetRange=function(f,i,a,u){var g=f.getLine(a);if(this.startRegionRe.test(g))return this.getCommentRegionBlock(f,g,a);var o=g.match(this.foldingStartMarker);if(o){var c=o.index;if(o[1])return this.openingBracketBlock(f,o[1],a,c);var m=f.getCommentFoldRange(a,c+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=g.match(this.foldingStopMarker);if(o){var c=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],a,c):f.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(f,i){var a=f.getLine(i),u=a.search(/\S/),g=i,o=a.length;i+=1;for(var c=i,m=f.getLength();++i<m;){a=f.getLine(i);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",i);if(x){if(x.start.row<=g)break;if(x.isMultiLine())i=x.end.row;else if(u==w)break}c=i}}return new p(g,o,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,i,a){for(var u=i.search(/\s*$/),g=f.getLength(),o=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<g;){i=f.getLine(a);var w=c.exec(i);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>o)return new p(o,u,x,i.length)}}).call(s.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,d){var h=e("../lib/oop"),p=e("./text").Mode,v=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("./folding/cstyle").FoldMode,i=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};h.inherits(a,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,g,o){var c=this.$getIndent(g);if(u=="start"){var m=g.match(/^.*[\{\(\[]\s*$/);m&&(c+=o)}return c},this.checkOutdent=function(u,g,o){return this.$outdent.checkOutdent(g,o)},this.autoOutdent=function(u,g,o){this.$outdent.autoOutdent(g,o)},this.createWorker=function(u){var g=new i(["ace"],"ace/mode/json_worker","JsonWorker");return g.attachToDocument(u.getDocument()),g.on("annotate",function(o){u.setAnnotations(o.data)}),g.on("terminate",function(){u.clearAnnotations()}),g},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})})()})(Bm)),Bm.exports}fS();var jm={exports:{}},Hm;function pS(){return Hm||(Hm=1,(function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop");e("../lib/lang");var p=e("./text_highlight_rules").TextHighlightRules,v=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",s=r.supportFunction="rgb|rgba|url|attr|counter|counters",f=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",i=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",g=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var m=this.createKeywordMapper({"support.function":s,"support.constant":f,"support.type":v,"support.constant.color":i,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};h.inherits(c,p),r.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,v=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},v.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};h.inherits(v,p),v.getTagRule=function(s){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},v.getStartRule=function(s){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:s}},v.getEndRule=function(s){return{token:"comment.doc",regex:"\\*\\/",next:s}},r.JsDocCommentHighlightRules=v}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,r,d){function h(){var u=i.replace("\\d","\\d\\-"),g={onMatch:function(c,m,w){var x=c.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:c.slice(0,x)},{type:"meta.tag.tag-name.xml",value:c.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(g);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,g,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,m,w){return m==w[0]&&w.shift(),c.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:c}]},nextState:"jsx"},o,p("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},g],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function p(u){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var v=e("../lib/oop"),s=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=e("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(u){var g={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(g,"identifier"),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(g).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[s.getStartRule("doc-start"),p("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+i+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+c+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:i},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:i},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),p("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[p("function_arguments"),{token:"variable.parameter",regex:i},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,$,k){if(this.next=R=="{"?this.nextState:"",R=="{"&&k.length)k.unshift("start",$);else if(R=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+i+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&h.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(a,f),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,v=function(s){var f="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+f+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:f},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+f+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+f+":)?"+f+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===v&&this.normalizeRules()};(function(){this.embedTagRules=function(s,f,i){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(<)("+i+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[i+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,g){return g.splice(0),this.token}}],this.embedRules(s,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(</)("+i+"(?=\\s|>|$))",next:i+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(p.prototype),h.inherits(v,p),r.XmlHighlightRules=v}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("../lib/lang"),v=e("./css_highlight_rules").CssHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=e("./xml_highlight_rules").XmlHighlightRules,i=p.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),a=function(){f.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,g){var o=i[g];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(v,"css-","style"),this.embedTagRules(new s({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};h.inherits(a,f),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,d){var h=e("../config").$modes,p=e("../lib/oop"),v=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,f=e("./html_highlight_rules").HtmlHighlightRules,i=function(u){return"(?:[^"+v.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){f.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,c,m,w){var x=o.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(x[3])[0];return h[R]||(R=""),m.unshift("githubblock",[],[x[1],x[2],R],c),this.token},next:"githubblock"},g=[{token:"support.function",regex:".*",onMatch:function(o,c,m,w){var x=m[1],R=m[2][0],$=m[2][1],k=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<R.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&h[k]){var O=h[k].getTokenizer().getLineTokens(o,x.slice(0));return m[1]=O.state,O.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+i("]")+")(\\]\\s*\\[)("+i("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+i("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+i('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:g}),this.normalizeRules()};p.inherits(a,s),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,d){var h=e("../../lib/oop"),p=e("./fold_mode").FoldMode,v=e("../../range").Range,s=r.FoldMode=function(){};h.inherits(s,p),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,i,a){var u=f.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&f.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,i,a){function u(N){return R=f.getTokens(N)[0],R&&R.type.lastIndexOf($,0)===0}function g(){var N=R.value[0];return N=="="?6:N=="-"?5:7-R.value.search(/[^#]|$/)}var o=f.getLine(a),c=o.length,m=f.getLength(),w=a,x=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(f.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(o=f.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new v(w,c,a,0)}for(;a-- >0&&(o=f.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new v(a,o.length,w,0)}var R,$="markup.heading";if(u(a)){for(var k=g();++a<m;)if(u(a)){var C=g();if(C>=k)break}if(x=a-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(f.getLine(x));)x--;if(x>w){var O=f.getLine(x).length;return new v(w,c,x,O)}}}}}).call(s.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,p=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var f=v.getLine(s),i=f.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=v.findMatchingBracket({row:s,column:a});if(!u||u.row==s)return 0;var g=this.$getIndent(v.getLine(u.row));v.replace(new h(s,0,s,a-1),g)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,d){function h(i,a){return i&&i.type.lastIndexOf(a+".xml")>-1}var p=e("../../lib/oop"),v=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(i,a,u,g,o){if(o=='"'||o=="'"){var c=o,m=g.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:c+m+c,selection:!1};var w=u.getCursorPosition(),x=g.doc.getLine(w.row),R=x.substring(w.column,w.column+1),$=new s(g,w.row,w.column),k=$.getCurrentToken();if(R==c&&(h(k,"attribute-value")||h(k,"string")))return{text:"",selection:[1,1]};if(k||(k=$.stepBackward()),!k)return;for(;h(k,"tag-whitespace")||h(k,"whitespace");)k=$.stepBackward();var C=!R||R.match(/\s/);if(h(k,"attribute-equals")&&(C||R==">")||h(k,"decl-attribute-equals")&&(C||R=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,a,u,g,o){var c=g.doc.getTextRange(o);if(!o.isMultiLine()&&(c=='"'||c=="'")){var m=g.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==c)return o.end.column++,o}}),this.add("autoclosing","insertion",function(i,a,u,g,o){if(o==">"){var c=u.getSelectionRange().start,m=new s(g,c.row,c.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(h(w,"tag-name")||h(w,"tag-whitespace")||h(w,"attribute-name")||h(w,"attribute-equals")||h(w,"attribute-value"))||h(w,"reference.attribute-value"))return;if(h(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(c.column<x)return;if(c.column==x){var R=m.stepForward();if(R&&h(R,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(g.getLine(c.row).slice(c.column)))return;for(;!h(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var $=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(h(m.stepBackward(),"end-tag-open"))return;var C=w.value;return $==c.row&&(C=C.substring(0,c.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,a,u,g,o){if(o==`
991
- `){var c=u.getCursorPosition(),m=g.getLine(c.row),w=new s(g,c.row,c.column),x=w.getCurrentToken();if(h(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var R=x.value,$=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var k=g.getTokenAt(c.row,c.column+1),m=g.getLine($),C=this.$getIndent(m),O=C+g.getTabString();return k&&k.value==="</"?{text:`
992
- `+O+`
993
- `+C,selection:[1,O.length,1,O.length]}:{text:`
994
- `+O}}}}})};p.inherits(f,v),r.XmlBehaviour=f}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,d){var h=e("../../lib/oop"),p=e("../../token_iterator").TokenIterator,v=e("../behaviour/cstyle").CstyleBehaviour,s=e("../behaviour/xml").XmlBehaviour,f=function(){var i=new s({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(v),this.add("autoclosing-fragment","insertion",function(a,u,g,o,c){if(c==">"){var m=g.getSelectionRange().start,w=new p(o,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};h.inherits(f,v),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){function h(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var p=e("../../lib/oop"),v=e("../../range").Range,s=e("./fold_mode").FoldMode,f=r.FoldMode=function(a,u){s.call(this),this.voidElements=a||{},this.optionalEndTags=p.mixin({},this.voidElements),u&&p.mixin(this.optionalEndTags,u)};p.inherits(f,s);var i=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,g){var o=this._getFirstTagInLine(a,g);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,g,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,g)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var g=a.getTokens(u),o=new i,c=0;c<g.length;c++){var m=g[c];if(h(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=h(m,"end-tag-open"),m=g[++c],!m)return null;if(o.tagName=m.value,m.value===""){if(m=g[++c],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,c++;c<g.length;c++)if(m=g[c],o.end.column+=m.value.length,h(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(h(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,u,g,o){for(var c=a.getTokens(u),m=0,w=0;w<c.length;w++){var x=c[w];if(m+=x.value.length,!(m<o-1)&&h(x,"end-tag-open")&&(x=c[w+1],h(x,"tag-name")&&x.value===""&&(x=c[w+2]),x&&x.value==g))return!0}return!1},this.getFoldWidgetRange=function(a,u,g){var o=this._getFirstTagInLine(a,g);if(!o)return this.getCommentFoldWidget(a,g)&&a.getCommentFoldRange(g,a.getLine(g).length);var c=a.getMatchingTags({row:g,column:0});if(c)return new v(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.closeTag.start.column)}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),p=e("../../range").Range,v=e("./fold_mode").FoldMode,s=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};h.inherits(s,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,i,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var g=this._getFoldWidgetBase(f,i,a);return!g&&this.startRegionRe.test(u)?"start":g},this.getFoldWidgetRange=function(f,i,a,u){var g=f.getLine(a);if(this.startRegionRe.test(g))return this.getCommentRegionBlock(f,g,a);var o=g.match(this.foldingStartMarker);if(o){var c=o.index;if(o[1])return this.openingBracketBlock(f,o[1],a,c);var m=f.getCommentFoldRange(a,c+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=g.match(this.foldingStopMarker);if(o){var c=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],a,c):f.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(f,i){var a=f.getLine(i),u=a.search(/\S/),g=i,o=a.length;i+=1;for(var c=i,m=f.getLength();++i<m;){a=f.getLine(i);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",i);if(x){if(x.start.row<=g)break;if(x.isMultiLine())i=x.end.row;else if(u==w)break}c=i}}return new p(g,o,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,i,a){for(var u=i.search(/\s*$/),g=f.getLength(),o=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<g;){i=f.getLine(a);var w=c.exec(i);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>o)return new p(o,u,x,i.length)}}).call(s.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,d){var h=e("../../lib/oop"),p=e("./xml").FoldMode,v=e("./cstyle").FoldMode,s=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new p};h.inherits(s,v),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,i,a){var u=this.getFoldWidgetBase(f,i,a);return u||this.xmlFoldMode.getFoldWidget(f,i,a)},this.getFoldWidgetRange=function(f,i,a,u){var g=this.getFoldWidgetRangeBase(f,i,a,u);return g||this.xmlFoldMode.getFoldWidgetRange(f,i,a)}}).call(s.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,d){var h=e("../lib/oop"),p=e("./text").Mode,v=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,i=e("./behaviour/javascript").JavaScriptBehaviour,a=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=new i,this.foldingRules=new a};h.inherits(u,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(g,o,c){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,g),x=w.tokens,R=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(g=="start"||g=="no_regex"){var $=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(m+=c)}else if(g=="doc-start"&&(R=="start"||R=="no_regex"))return"";return m},this.checkOutdent=function(g,o,c){return this.$outdent.checkOutdent(o,c)},this.autoOutdent=function(g,o,c){this.$outdent.autoOutdent(o,c)},this.createWorker=function(g){var o=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(g.getDocument()),o.on("annotate",function(c){g.setAnnotations(c.data)}),o.on("terminate",function(){g.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,d){var h={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},p=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var v=document.createElement("c").style;for(var s in v)if(typeof v[s]=="string"){var f=s.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});h.hasOwnProperty(f)||(h[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(v,s,f,i){if(this.completionsDefined||this.defineCompletions(),v==="ruleset"||s.$mode.$id=="ace/mode/scss"){var a=s.getLine(f.row).substr(0,f.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(v,s,f,i):this.getPropertyCompletions(v,s,f,i,u)}return[]},this.getPropertyCompletions=function(v,s,f,i,a){a=a||!1;var u=Object.keys(h);return u.map(function(g){return{caption:g,snippet:g+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(v,s,f,i){var a=s.getLine(f.row).substr(0,f.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var g=[];return u in h&&typeof h[u]=="object"&&(g=Object.keys(h[u])),g.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(p.prototype),r.CssCompletions=p}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,d){var h=e("../../lib/oop");e("../behaviour").Behaviour;var p=e("./cstyle").CstyleBehaviour,v=e("../../token_iterator").TokenIterator,s=function(){this.inherit(p),this.add("colon","insertion",function(f,i,a,u,g){if(g===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=new v(u,o.row,o.column),m=c.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=c.stepBackward()),m&&m.type==="support.type"){var w=u.doc.getLine(o.row),x=w.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,i,a,u,g){var o=u.doc.getTextRange(g);if(!g.isMultiLine()&&o===":"){var c=a.getCursorPosition(),m=new v(u,c.row,c.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(g.start.row),R=x.substring(g.end.column,g.end.column+1);if(R===";")return g.end.column++,g}}}),this.add("semicolon","insertion",function(f,i,a,u,g){if(g===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=u.doc.getLine(o.row),m=c.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,i,a,u,g){if(g==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(c.substring(o.column)))return{text:"!important",selection:[10,10]}}})};h.inherits(s,p),r.CssBehaviour=s}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,d){var h=e("../lib/oop"),p=e("./text").Mode,v=e("./css_highlight_rules").CssHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,i=e("./css_completions").CssCompletions,a=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=new a,this.$completer=new i,this.foldingRules=new u};h.inherits(g,p),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,c,m){var w=this.$getIndent(c),x=this.getTokenizer().getLineTokens(c,o).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var R=c.match(/^.*\{\s*$/);return R&&(w+=m),w},this.checkOutdent=function(o,c,m){return this.$outdent.checkOutdent(c,m)},this.autoOutdent=function(o,c,m){this.$outdent.autoOutdent(c,m)},this.getCompletions=function(o,c,m,w){return this.$completer.getCompletions(o,c,m,w)},this.createWorker=function(o){var c=new f(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(o.getDocument()),c.on("annotate",function(m){o.setAnnotations(m.data)}),c.on("terminate",function(){o.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(g.prototype),r.Mode=g}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),p=e("./fold_mode").FoldMode,v=r.FoldMode=function(s,f){this.defaultMode=s,this.subModes=f};h.inherits(v,p),(function(){this.$getMode=function(s){typeof s!="string"&&(s=s[0]);for(var f in this.subModes)if(s.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(s,f,i,a){var u=this.$getMode(s);return u?u.getFoldWidget(f,i,a):""},this.getFoldWidget=function(s,f,i){return this.$tryMode(s.getState(i-1),s,f,i)||this.$tryMode(s.getState(i),s,f,i)||this.defaultMode.getFoldWidget(s,f,i)},this.getFoldWidgetRange=function(s,f,i){var a=this.$getMode(s.getState(i-1));return(!a||!a.getFoldWidget(s,f,i))&&(a=this.$getMode(s.getState(i))),(!a||!a.getFoldWidget(s,f,i))&&(a=this.defaultMode),a.getFoldWidgetRange(s,f,i)}}).call(v.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,d){var h=e("../../lib/oop"),p=e("./mixed").FoldMode,v=e("./xml").FoldMode,s=e("./cstyle").FoldMode,f=r.FoldMode=function(i,a){p.call(this,new v(i,a),{"js-":new s,"css-":new s})};h.inherits(f,p)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,d){function h(c,m){return c.type.lastIndexOf(m+".xml")>-1}function p(c,m){for(var w=new s(c,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function v(c,m){for(var w=new s(c,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var s=e("../token_iterator").TokenIterator,f=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],i=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=f.concat(i),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},g=Object.keys(u),o=function(){};(function(){this.getCompletions=function(c,m,w,x){var R=m.getTokenAt(w.row,w.column);if(!R)return[];if(h(R,"tag-name")||h(R,"tag-open")||h(R,"end-tag-open"))return this.getTagCompletions(c,m,w,x);if(h(R,"tag-whitespace")||h(R,"attribute-name"))return this.getAttributeCompletions(c,m,w,x);if(h(R,"attribute-value"))return this.getAttributeValueCompletions(c,m,w,x);var $=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(c,m,w,x):[]},this.getTagCompletions=function(c,m,w,x){return g.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,m,w,x){var R=p(m,w);if(!R)return[];var $=a;return R in u&&($=$.concat(Object.keys(u[R]))),$.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,m,w,x){var R=p(m,w),$=v(m,w);if(!R)return[];var k=[];return R in u&&$ in u[R]&&typeof u[R][$]=="object"&&(k=Object.keys(u[R][$])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,m,w,x){var R=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return R.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,d){var h=e("../lib/oop"),p=e("../lib/lang"),v=e("./text").Mode,s=e("./javascript").Mode,f=e("./css").Mode,i=e("./html_highlight_rules").HtmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,c=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=i,this.$behaviour=new a,this.$completer=new g,this.createModeDelegates({"js-":s,"css-":f}),this.foldingRules=new u(this.voidElements,p.arrayToMap(m))};h.inherits(w,v),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=p.arrayToMap(c),this.getNextLineIndent=function(x,R,$){return this.$getIndent(R)},this.checkOutdent=function(x,R,$){return!1},this.getCompletions=function(x,R,$,k){return this.$completer.getCompletions(x,R,$,k)},this.createWorker=function(x){if(this.constructor==w){var R=new o(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(x.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function($){x.setAnnotations($.data)}),R.on("terminate",function(){x.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,v=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",s=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",f=function(){var i=this.createKeywordMapper({keyword:v,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",g="(?:\\d+)",o="(?:(?:"+g+"?"+u+")|(?:"+g+"\\.))",c="(?:(?:"+o+"|"+g+"))",m="(?:"+c+"|"+o+")",w="(?:&"+g+")",x="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,O,N){var I=C[2]=="-"?"indentedHeredoc":"heredoc",M=C.split(this.splitRegex);return N.push(I,M[4]),[{type:"constant",value:M[1]},{type:"text",value:M[2]},{type:"string",value:M[3]},{type:"support.class",value:M[4]},{type:"string",value:M[5]}]},rules:{heredoc:[{onMatch:function(C,O,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,O){return O[0]==="heredoc"||O[0]==="indentedHeredoc"?O[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:a+"\\b"},{token:i,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};h.inherits(f,p),r.ShHighlightRules=f}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,d){var h=e("../lib/oop"),p=e("./text").Mode,v=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,f=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=v,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};h.inherits(i,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,g,o){var c=this.$getIndent(g),m=this.getTokenizer().getLineTokens(g,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=g.match(/^.*[\{\(\[:]\s*$/);x&&(c+=o)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,g,o){if(o!==`\r
995
- `&&o!=="\r"&&o!==`
996
- `)return!1;var c=this.getTokenizer().getLineTokens(g.trim(),u).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,g,o){o+=1;var c=this.$getIndent(g.getLine(o)),m=g.getTabString();c.slice(-m.length)==m&&g.remove(new s(o,c.length-m.length,o,c.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(i.prototype),r.Mode=i}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,r,d){var h=e("../lib/oop"),p=e("../lib/lang"),v=e("./text").Mode,s=e("./xml_highlight_rules").XmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,i=e("./folding/xml").FoldMode,a=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=s,this.$behaviour=new f,this.foldingRules=new i};h.inherits(u,v),(function(){this.voidElements=p.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(g){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(g.getDocument()),o.on("error",function(c){g.setAnnotations(c.data)}),o.on("terminate",function(){g.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,d){var h=e("../lib/oop"),p=e("./behaviour/cstyle").CstyleBehaviour,v=e("./text").Mode,s=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./folding/markdown").FoldMode,i=function(){this.HighlightRules=s,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new f,this.$behaviour=new p({braces:!0})};h.inherits(i,v),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,g){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var c=o[2];return c||(c=parseInt(o[3],10)+1+"."),o[1]+c+o[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})})()})(jm)),jm.exports}pS();var Um={exports:{}},Vm;function gS(){return Vm||(Vm=1,(function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,d){d.exports=`.ace-twilight .ace_gutter {
997
- background: #232323;
998
- color: #E2E2E2
999
- }
1000
-
1001
- .ace-twilight .ace_print-margin {
1002
- width: 1px;
1003
- background: #232323
1004
- }
1005
-
1006
- .ace-twilight {
1007
- background-color: #141414;
1008
- color: #F8F8F8
1009
- }
1010
-
1011
- .ace-twilight .ace_cursor {
1012
- color: #A7A7A7
1013
- }
1014
-
1015
- .ace-twilight .ace_marker-layer .ace_selection {
1016
- background: rgba(221, 240, 255, 0.20)
1017
- }
1018
-
1019
- .ace-twilight.ace_multiselect .ace_selection.ace_start {
1020
- box-shadow: 0 0 3px 0px #141414;
1021
- }
1022
-
1023
- .ace-twilight .ace_marker-layer .ace_step {
1024
- background: rgb(102, 82, 0)
1025
- }
1026
-
1027
- .ace-twilight .ace_marker-layer .ace_bracket {
1028
- margin: -1px 0 0 -1px;
1029
- border: 1px solid rgba(255, 255, 255, 0.25)
1030
- }
1031
-
1032
- .ace-twilight .ace_marker-layer .ace_active-line {
1033
- background: rgba(255, 255, 255, 0.031)
1034
- }
1035
-
1036
- .ace-twilight .ace_gutter-active-line {
1037
- background-color: rgba(255, 255, 255, 0.031)
1038
- }
1039
-
1040
- .ace-twilight .ace_marker-layer .ace_selected-word {
1041
- border: 1px solid rgba(221, 240, 255, 0.20)
1042
- }
1043
-
1044
- .ace-twilight .ace_invisible {
1045
- color: rgba(255, 255, 255, 0.25)
1046
- }
1047
-
1048
- .ace-twilight .ace_keyword,
1049
- .ace-twilight .ace_meta {
1050
- color: #CDA869
1051
- }
1052
-
1053
- .ace-twilight .ace_constant,
1054
- .ace-twilight .ace_constant.ace_character,
1055
- .ace-twilight .ace_constant.ace_character.ace_escape,
1056
- .ace-twilight .ace_constant.ace_other,
1057
- .ace-twilight .ace_heading,
1058
- .ace-twilight .ace_markup.ace_heading,
1059
- .ace-twilight .ace_support.ace_constant {
1060
- color: #CF6A4C
1061
- }
1062
-
1063
- .ace-twilight .ace_invalid.ace_illegal {
1064
- color: #F8F8F8;
1065
- background-color: rgba(86, 45, 86, 0.75)
1066
- }
1067
-
1068
- .ace-twilight .ace_invalid.ace_deprecated {
1069
- text-decoration: underline;
1070
- font-style: italic;
1071
- color: #D2A8A1
1072
- }
1073
-
1074
- .ace-twilight .ace_support {
1075
- color: #9B859D
1076
- }
1077
-
1078
- .ace-twilight .ace_fold {
1079
- background-color: #AC885B;
1080
- border-color: #F8F8F8
1081
- }
1082
-
1083
- .ace-twilight .ace_support.ace_function {
1084
- color: #DAD085
1085
- }
1086
-
1087
- .ace-twilight .ace_list,
1088
- .ace-twilight .ace_markup.ace_list,
1089
- .ace-twilight .ace_storage {
1090
- color: #F9EE98
1091
- }
1092
-
1093
- .ace-twilight .ace_entity.ace_name.ace_function,
1094
- .ace-twilight .ace_meta.ace_tag {
1095
- color: #AC885B
1096
- }
1097
-
1098
- .ace-twilight .ace_string {
1099
- color: #8F9D6A
1100
- }
1101
-
1102
- .ace-twilight .ace_string.ace_regexp {
1103
- color: #E9C062
1104
- }
1105
-
1106
- .ace-twilight .ace_comment {
1107
- font-style: italic;
1108
- color: #5F5A60
1109
- }
1110
-
1111
- .ace-twilight .ace_variable {
1112
- color: #7587A6
1113
- }
1114
-
1115
- .ace-twilight .ace_xml-pe {
1116
- color: #494949
1117
- }
1118
-
1119
- .ace-twilight .ace_indent-guide {
1120
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1121
- }
1122
-
1123
- .ace-twilight .ace_indent-guide-active {
1124
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1125
- }
1126
- `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,d){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var h=e("../lib/dom");h.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})})()})(Um)),Um.exports}gS();var Gm={exports:{}},qm;function mS(){return qm||(qm=1,(function(n,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,d){function h(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var p=e("./lib/dom"),v=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,f=e("./lib/lang"),i=e("./range").Range,a=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,g=e("./tokenizer").Tokenizer,o=e("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,N){var I=C.session.getTextRange();return N?I.replace(/\n\r?([ \t]*\S)/g,`
1127
- `+N+"$1"):I},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.start||""},BLOCK_COMMENT_END:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.end||""},LINE_COMMENT:function(C){var O=C.session.$mode||{};return O.lineCommentStart||""},CURRENT_YEAR:h.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:h.bind(null,{year:"2-digit"}),CURRENT_MONTH:h.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:h.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:h.bind(null,{month:"short"}),CURRENT_DATE:h.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:h.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:h.bind(null,{weekday:"short"}),CURRENT_HOUR:h.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:h.bind(null,{minute:"2-digit"}),CURRENT_SECOND:h.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function N(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var I={regex:"/("+N("/")+"+)/",onMatch:function(M,W,F){var D=F[0];return D.fmtString=!0,D.guard=M.slice(1,-1),D.flag="",""},next:"formatString"};return C.$tokenizer=new g({start:[{regex:/\\./,onMatch:function(M,W,F){var D=M[1];return(D=="}"&&F.length||"`$\\".indexOf(D)!=-1)&&(M=D),[M]}},{regex:/}/,onMatch:function(M,W,F){return[F.length?F.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,W,F){var D=O(M.substr(1));return F.unshift(D[0]),D},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+N("\\|")+"*\\|",onMatch:function(M,W,F){var D=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}});return F[0].choices=D,[D[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,W,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,W,F){var D=M[1];return D=="}"&&F.length||"`$\\".indexOf(D)!=-1?M=D:D=="n"?M=`
1128
- `:D=="t"?M=" ":"ulULE".indexOf(D)!=-1&&(M={changeCase:D,local:D>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,W,F){var D=F.shift();return D&&(D.flag=M.slice(1,-1)),this.next=D&&D.tabstopId?"start":"",[D||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,W,F){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,W,F){var D={text:M.slice(2)};return F.unshift(D),[D]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,W,F){var D=F.shift();return this.next=D&&D.tabstopId?"start":"",[D||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,W,F){var D=F[0];return D.formatFunction=M.slice(2,-1),[F.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(M,W,F){M[1]=="+"&&(F[0].ifEnd=F[0]),M[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,N){return this.getTokenizer().getLineTokens(O,N).tokens.map(function(I){return I.value||I})},C.prototype.getVariableValue=function(O,N,I){if(/^\d+$/.test(N))return(this.variables.__||{})[N]||"";if(/^[A-Z]\d+$/.test(N))return(this.variables[N[0]+"__"]||{})[N.substr(1)]||"";if(N=N.replace(/^TM_/,""),!this.variables.hasOwnProperty(N))return"";var M=this.variables[N];return typeof M=="function"&&(M=this.variables[N](O,N,I)),M??""},C.prototype.tmStrFormat=function(O,N,I){if(!N.fmt)return O;var M=N.flag||"",W=N.guard;W=new RegExp(W,M.replace(/[^gim]/g,""));var F=typeof N.fmt=="string"?this.tokenizeTmSnippet(N.fmt,"formatString"):N.fmt,D=this,A=O.replace(W,function(){var _=D.variables.__;D.variables.__=[].slice.call(arguments);for(var L=D.resolveVariables(F,I),B="E",U=0;U<L.length;U++){var V=L[U];if(typeof V=="object")if(L[U]="",V.changeCase&&V.local){var K=L[U+1];K&&typeof K=="string"&&(V.changeCase=="u"?L[U]=K[0].toUpperCase():L[U]=K[0].toLowerCase(),L[U+1]=K.substr(1))}else V.changeCase&&(B=V.changeCase);else B=="U"?L[U]=V.toUpperCase():B=="L"&&(L[U]=V.toLowerCase())}return D.variables.__=_,L.join("")});return A},C.prototype.tmFormatFunction=function(O,N,I){return N.formatFunction=="upcase"?O.toUpperCase():N.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,N){function I(B){var U=O.indexOf(B,D+1);U!=-1&&(D=U)}for(var M=[],W="",F=!0,D=0;D<O.length;D++){var A=O[D];if(typeof A=="string"){M.push(A),A==`
1129
- `?(F=!0,W=""):F&&(W=/^\t*/.exec(A)[0],F=/\S/.test(A));continue}if(A){if(F=!1,A.fmtString){var _=O.indexOf(A,D+1);_==-1&&(_=O.length),A.fmt=O.slice(D+1,_),D=_}if(A.text){var L=this.getVariableValue(N,A.text,W)+"";A.fmtString&&(L=this.tmStrFormat(L,A,N)),A.formatFunction&&(L=this.tmFormatFunction(L,A,N)),L&&!A.ifEnd?(M.push(L),I(A)):!L&&A.ifEnd&&I(A.ifEnd)}else A.elseEnd?I(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&M.push(A)}}return M},C.prototype.getDisplayTextForSnippet=function(O,N){var I=w.call(this,O,N);return I.text},C.prototype.insertSnippetForSelection=function(O,N,I){I===void 0&&(I={});var M=w.call(this,O,N,I),W=O.getSelectionRange(),F=O.session.replace(W,M.text),D=new x(O),A=O.inVirtualSelectionMode&&O.selection.index;D.addTabstops(M.tabstops,W.start,F,A)},C.prototype.insertSnippet=function(O,N,I){I===void 0&&(I={});var M=this;if(O.inVirtualSelectionMode)return M.insertSnippetForSelection(O,N,I);O.forEachSelection(function(){M.insertSnippetForSelection(O,N,I)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var N=O.session.$mode.$id||"";if(N=N.split("/").pop(),N==="html"||N==="php"){N==="php"&&!O.session.$mode.inlinePhp&&(N="html");var I=O.getCursorPosition(),M=O.session.getState(I.row);typeof M=="object"&&(M=M[0]),M.substring&&(M.substring(0,3)=="js-"?N="javascript":M.substring(0,4)=="css-"?N="css":M.substring(0,4)=="php-"&&(N="php"))}return N},C.prototype.getActiveScopes=function(O){var N=this.$getScope(O),I=[N],M=this.snippetMap;return M[N]&&M[N].includeScopes&&I.push.apply(I,M[N].includeScopes),I.push("_"),I},C.prototype.expandWithTab=function(O,N){var I=this,M=O.forEachSelection(function(){return I.expandSnippetForSelection(O,N)},null,{keepOrder:!0});return M&&O.tabstopManager&&O.tabstopManager.tabNext(),M},C.prototype.expandSnippetForSelection=function(O,N){var I=O.getCursorPosition(),M=O.session.getLine(I.row),W=M.substring(0,I.column),F=M.substr(I.column),D=this.snippetMap,A;return this.getActiveScopes(O).some(function(_){var L=D[_];return L&&(A=this.findMatchingSnippet(L,W,F)),!!A},this),A?(N&&N.dryRun||(O.session.doc.removeInLine(I.row,I.column-A.replaceBefore.length,I.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(O,A.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,N,I){for(var M=O.length;M--;){var W=O[M];if(!(W.startRe&&!W.startRe.test(N))&&!(W.endRe&&!W.endRe.test(I))&&!(!W.startRe&&!W.endRe))return W.matchBefore=W.startRe?W.startRe.exec(N):[""],W.matchAfter=W.endRe?W.endRe.exec(I):[""],W.replaceBefore=W.triggerRe?W.triggerRe.exec(N)[0]:"",W.replaceAfter=W.endTriggerRe?W.endTriggerRe.exec(I)[0]:"",W}},C.prototype.register=function(O,N){function I(_){return _&&!/^\^?\(.*\)\$?$|^\\b$/.test(_)&&(_="(?:"+_+")"),_||""}function M(_,L,B){return _=I(_),L=I(L),_=L+_,_&&_[_.length-1]!="$"&&(_+="$"),new RegExp(_)}function W(_){_.scope||(_.scope=N||"_"),N=_.scope,F[N]||(F[N]=[],D[N]={});var L=D[N];if(_.name){var B=L[_.name];B&&A.unregister(B),L[_.name]=_}F[N].push(_),_.prefix&&(_.tabTrigger=_.prefix),!_.content&&_.body&&(_.content=Array.isArray(_.body)?_.body.join(`
1130
- `):_.body),_.tabTrigger&&!_.trigger&&(!_.guard&&/^\w/.test(_.tabTrigger)&&(_.guard="\\b"),_.trigger=f.escapeRegExp(_.tabTrigger)),!(!_.trigger&&!_.guard&&!_.endTrigger&&!_.endGuard)&&(_.startRe=M(_.trigger,_.guard),_.triggerRe=new RegExp(_.trigger),_.endRe=M(_.endTrigger,_.endGuard),_.endTriggerRe=new RegExp(_.endTrigger))}var F=this.snippetMap,D=this.snippetNameMap,A=this;O||(O=[]),Array.isArray(O)?O.forEach(W):Object.keys(O).forEach(function(_){W(O[_])}),this._signal("registerSnippets",{scope:N})},C.prototype.unregister=function(O,N){function I(F){var D=W[F.scope||N];if(D&&D[F.name]){delete D[F.name];var A=M[F.scope||N],_=A&&A.indexOf(F);_>=0&&A.splice(_,1)}}var M=this.snippetMap,W=this.snippetNameMap;O.content?I(O):Array.isArray(O)&&O.forEach(I)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var N=[],I={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,W;W=M.exec(O);){if(W[1])try{I=JSON.parse(W[1]),N.push(I)}catch{}if(W[4])I.content=W[4].replace(/^\t/gm,""),N.push(I),I={};else{var F=W[2],D=W[3];if(F=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=A.exec(D)[1],I.trigger=A.exec(D)[1],I.endTrigger=A.exec(D)[1],I.endGuard=A.exec(D)[1]}else F=="snippet"?(I.tabTrigger=D.match(/^\S*/)[0],I.name||(I.name=D)):F&&(I[F]=D)}}return N},C.prototype.getSnippetByName=function(O,N){var I=this.snippetNameMap,M;return this.getActiveScopes(N).some(function(W){var F=I[W];return F&&(M=F[O]),!!M},this),M},C})();v.implement(m.prototype,s);var w=function(C,O,N){function I(ue){for(var pe=[],ve=0;ve<ue.length;ve++){var $e=ue[ve];if(typeof $e=="object"){if(L[$e.tabstopId])continue;var Re=ue.lastIndexOf($e,ve-1);$e=pe[Re]||{tabstopId:$e.tabstopId}}pe[ve]=$e}return pe}N===void 0&&(N={});var M=C.getCursorPosition(),W=C.session.getLine(M.row),F=C.session.getTabString(),D=W.match(/^\s*/)[0];M.column<D.length&&(D=D.slice(0,M.column)),O=O.replace(/\r/g,"");var A=this.tokenizeTmSnippet(O);A=this.resolveVariables(A,C),A=A.map(function(ue){return ue==`
1131
- `&&!N.excludeExtraIndent?ue+D:typeof ue=="string"?ue.replace(/\t/g,F):ue});var _=[];A.forEach(function(ue,pe){if(typeof ue=="object"){var ve=ue.tabstopId,$e=_[ve];if($e||($e=_[ve]=[],$e.index=ve,$e.value="",$e.parents={}),$e.indexOf(ue)===-1){ue.choices&&!$e.choices&&($e.choices=ue.choices),$e.push(ue);var Re=A.indexOf(ue,pe+1);if(Re!==-1){var Ye=A.slice(pe+1,Re),Ge=Ye.some(function(at){return typeof at=="object"});Ge&&!$e.value?$e.value=Ye:Ye.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ye.join(""))}}}}),_.forEach(function(ue){ue.length=0});for(var L={},B=0;B<A.length;B++){var U=A[B];if(typeof U=="object"){var V=U.tabstopId,K=_[V],ee=A.indexOf(U,B+1);if(L[V]){L[V]===U&&(delete L[V],Object.keys(L).forEach(function(ue){K.parents[ue]=!0}));continue}L[V]=U;var ae=K.value;typeof ae!="string"?ae=I(ae):U.fmt&&(ae=this.tmStrFormat(ae,U,C)),A.splice.apply(A,[B+1,Math.max(0,ee-B)].concat(ae,U)),K.indexOf(U)===-1&&K.push(U)}}var Q=0,oe=0,se="";return A.forEach(function(ue){if(typeof ue=="string"){var pe=ue.split(`
1132
- `);pe.length>1?(oe=pe[pe.length-1].length,Q+=pe.length-1):oe+=ue.length,se+=ue}else ue&&(ue.start?ue.end={row:Q,column:oe}:ue.start={row:Q,column:oe})}),{text:se,tabstops:_,tokens:A}},x=(function(){function C(O){if(this.index=0,this.ranges=[],this.tabstops=[],O.tabstopManager)return O.tabstopManager;O.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(O)}return C.prototype.attach=function(O){this.$openTabstops=null,this.selectedTabstop=null,this.editor=O,this.session=O.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(O){for(var N=O.action[0]=="r",I=this.selectedTabstop||{},M=I.parents||{},W=this.tabstops.slice(),F=0;F<W.length;F++){var D=W[F],A=D==I||M[D.index];if(D.rangeList.$bias=A?0:1,O.action=="remove"&&D!==I){var _=D.parents&&D.parents[I.index],L=D.rangeList.pointIndex(O.start,_);L=L<0?-L-1:L+1;var B=D.rangeList.pointIndex(O.end,_);B=B<0?-B-1:B-1;for(var U=D.rangeList.ranges.slice(L,B),V=0;V<U.length;V++)this.removeRange(U[V])}D.rangeList.$onChange(O)}var K=this.session;!this.$inChange&&N&&K.getLength()==1&&!K.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var O=this.selectedTabstop;if(!(!O||!O.hasLinkedRanges||!O.firstNonLinked)){this.$inChange=!0;for(var N=this.session,I=N.getTextRange(O.firstNonLinked),M=0;M<O.length;M++){var W=O[M];if(W.linked){var F=W.original,D=r.snippetManager.tmStrFormat(I,F,this.editor);N.replace(W,D)}}this.$inChange=!1}},C.prototype.onAfterExec=function(O){O.command&&!O.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var O=this.editor.selection.lead,N=this.editor.selection.anchor,I=this.editor.selection.isEmpty(),M=0;M<this.ranges.length;M++)if(!this.ranges[M].linked){var W=this.ranges[M].contains(O.row,O.column),F=I||this.ranges[M].contains(N.row,N.column);if(W&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var N=this.tabstops.length,I=this.index+(O||1);I=Math.min(Math.max(I,1),N),I==N&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var N=this.tabstops[this.index];if(N&&this.addTabstopMarkers(N),this.index=O,N=this.tabstops[this.index],!(!N||!N.length)){this.selectedTabstop=N;var I=N.firstNonLinked||N;if(N.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var M=this.editor.multiSelect;M.toSingleRange(I);for(var W=0;W<N.length;W++)N.hasLinkedRanges&&N[W].linked||M.addRange(N[W].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(O,N,I){var M=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var W=i.fromPoints(I,I);$(W.start,N),$(W.end,N),O[0]=[W],O[0].index=0}var F=this.index,D=[F+1,0],A=this.ranges,_=this.snippetId=(this.snippetId||0)+1;O.forEach(function(L,B){var U=this.$openTabstops[B]||L;U.snippetId=_;for(var V=0;V<L.length;V++){var K=L[V],ee=i.fromPoints(K.start,K.end||K.start);R(ee.start,N),R(ee.end,N),ee.original=K,ee.tabstop=U,A.push(ee),U!=L?U.unshift(ee):U[V]=ee,K.fmtString||U.firstNonLinked&&M?(ee.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=ee)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===L&&(D.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),D.length>2&&(this.tabstops.length&&D.push(D.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,D))},C.prototype.addTabstopMarkers=function(O){var N=this.session;O.forEach(function(I){I.markerId||(I.markerId=N.addMarker(I,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var N=this.session;O.forEach(function(I){N.removeMarker(I.markerId),I.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var O=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&O--,this.tabstops.forEach(function(N){N.snippetId===O?this.addTabstopMarkers(N):this.removeTabstopMarkers(N)},this)}},C.prototype.removeRange=function(O){var N=O.tabstop.indexOf(O);N!=-1&&O.tabstop.splice(N,1),N=this.ranges.indexOf(O),N!=-1&&this.ranges.splice(N,1),N=O.tabstop.rangeList.ranges.indexOf(O),N!=-1&&O.tabstop.splice(N,1),this.session.removeMarker(O.markerId),O.tabstop.length||(N=this.tabstops.indexOf(O.tabstop),N!=-1&&this.tabstops.splice(N,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new u,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var R=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},$=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};p.importCssString(`
1133
- .ace_snippet-marker {
1134
- -moz-box-sizing: border-box;
1135
- box-sizing: border-box;
1136
- background: rgba(194, 193, 208, 0.09);
1137
- border: 1px dotted rgba(211, 208, 235, 0.62);
1138
- position: absolute;
1139
- }`,"snippets.css",!1),r.snippetManager=new m;var k=e("./editor").Editor;(function(){this.insertSnippet=function(C,O){return r.snippetManager.insertSnippet(this,C,O)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,d){var h=e("../virtual_renderer").VirtualRenderer,p=e("../editor").Editor,v=e("../range").Range,s=e("../lib/event"),f=e("../lib/lang"),i=e("../lib/dom"),a=e("../config").nls,u=e("./../lib/useragent"),g=function(R){return"suggest-aria-id:".concat(R)},o=u.isSafari?"menu":"listbox",c=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",w=function(R){var $=new h(R);$.$maxLines=4;var k=new p($);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},x=(function(){function R($){var k=i.createElement("div"),C=w(k);$&&$.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var O=function(){};C.focus=O,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=O,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(A){var _=A.getDocumentPosition();C.selection.moveToPosition(_),M.start.row=M.end.row=_.row,A.stop()});var N,I=new v(-1,0,-1,1/0),M=new v(-1,0,-1,1/0);M.id=C.session.addMarker(M,"ace_active-line","fullLine"),C.setSelectOnHover=function(A){A?I.id&&(C.session.removeMarker(I.id),I.id=null):I.id=C.session.addMarker(I,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(A){if(!N){N=A;return}if(!(N.x==A.x&&N.y==A.y)){N=A,N.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var _=N.getDocumentPosition().row;I.start.row!=_&&(I.id||C.setRow(_),F(_))}}),C.renderer.on("beforeRender",function(){if(N&&I.start.row!=-1){N.$pos=null;var A=N.getDocumentPosition().row;I.id||C.setRow(A),F(A,!0)}}),C.renderer.on("afterRender",function(){for(var A=C.renderer.$textLayer,_=A.config.firstRow,L=A.config.lastRow;_<=L;_++){var B=A.element.childNodes[_-A.config.firstRow];B.setAttribute("role",c),B.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",_+1);var U=C.getData(_);if(U){var V="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",V)}var K=B.querySelectorAll(".ace_completion-highlight");K.forEach(function(ee){ee.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var A=C.getRow(),_=C.renderer.$textLayer,L=_.element.childNodes[A-_.config.firstRow],B=document.activeElement;if(L!==C.selectedNode&&C.selectedNode&&(i.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=L,L){var U=g(A);i.addCssClass(L,"ace_selected"),L.id=U,_.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),L.setAttribute(m,"true")}});var W=function(){F(-1)},F=function(A,_){A!==I.start.row&&(I.start.row=I.end.row=A,_||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return I.start.row},s.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,W()}),C.on("hide",W),C.on("changeSelection",W),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(A){var _=C.data[A];return typeof _=="string"?_:_&&_.value||""};var D=C.session.bgTokenizer;return D.$tokenizeRow=function(A){function _(ue,pe){ue&&B.push({type:(L.className||"")+(pe||""),value:ue})}var L=C.data[A],B=[];if(!L)return B;typeof L=="string"&&(L={value:L});for(var U=L.caption||L.value||L.name,V=U.toLowerCase(),K=(C.filterText||"").toLowerCase(),ee=0,ae=0,Q=0;Q<=K.length;Q++)if(Q!=ae&&(L.matchMask&1<<Q||Q==K.length)){var oe=K.slice(ae,Q);ae=Q;var se=V.indexOf(oe,ee);if(se==-1)continue;_(U.slice(ee,se),""),ee=se+oe.length,_(U.slice(se,ee),"completion-highlight")}return _(U.slice(ee,U.length),""),B.push({type:"completion-spacer",value:" "}),L.meta&&B.push({type:"completion-meta",value:L.meta}),L.message&&B.push({type:"completion-message",value:L.message}),B},D.$updateOnChange=O,D.start=O,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(A,_){C.filterText=_||"",C.setValue(f.stringRepeat(`
1140
- `,A.length),-1),C.data=A||[],C.setRow(0)},C.getData=function(A){return C.data[A]},C.getRow=function(){return M.start.row},C.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),M.start.row!=A&&(C.selection.clearSelection(),M.start.row=M.end.row=A||0,C.session._emit("changeBackMarker"),C.moveCursorTo(A||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(A,_,L,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===A.top&&C.anchorPos.left===A.left&&C.anchor===L)return!0;var U=this.container,V=this.renderer.scrollBar.width||10,K=window.innerHeight-V,ee=window.innerWidth-V,ae=this.renderer,Q=ae.$maxLines*_*1.4,oe={top:0,bottom:0},se=K-A.top-3*this.$borderSize-_,ue=A.top-3*this.$borderSize;L||(ue<=se||se>=Q?L="bottom":L="top"),L==="top"?(oe.bottom=A.top-this.$borderSize,oe.top=oe.bottom-Q):L==="bottom"&&(oe.top=A.top+_+this.$borderSize,oe.bottom=oe.top+Q);var pe=oe.top>=0&&oe.bottom<=K;if(!B&&!pe)return!1;pe?ae.$maxPixelHeight=null:L==="top"?ae.$maxPixelHeight=ue:ae.$maxPixelHeight=se,L==="top"?(U.style.top="",U.style.bottom=K+V-oe.bottom+"px",C.isTopdown=!1):(U.style.top=oe.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var ve=A.left;return ve+U.offsetWidth>ee&&(ve=ee-U.offsetWidth),U.style.left=ve+"px",U.style.right="",i.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),N=null),C.anchorPos=A,C.anchor=L,!0},C.show=function(A,_,L){this.tryShow(A,_,L?"bottom":void 0,!0)},C.goTo=function(A){var _=this.getRow(),L=this.session.getLength()-1;switch(A){case"up":_=_<=0?L:_-1;break;case"down":_=_>=L?-1:_+1;break;case"start":_=0;break;case"end":_=L}this.setRow(_)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return R})();i.importCssString(`
1141
- .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1142
- background-color: #CAD6FA;
1143
- z-index: 1;
1144
- }
1145
- .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1146
- background-color: #3a674e;
1147
- }
1148
- .ace_editor.ace_autocomplete .ace_line-hover {
1149
- border: 1px solid #abbffe;
1150
- margin-top: -1px;
1151
- background: rgba(233,233,253,0.4);
1152
- position: absolute;
1153
- z-index: 2;
1154
- }
1155
- .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1156
- border: 1px solid rgba(109, 150, 13, 0.8);
1157
- background: rgba(58, 103, 78, 0.62);
1158
- }
1159
- .ace_completion-meta {
1160
- opacity: 0.5;
1161
- margin-left: 0.9em;
1162
- }
1163
- .ace_completion-message {
1164
- margin-left: 0.9em;
1165
- color: blue;
1166
- }
1167
- .ace_editor.ace_autocomplete .ace_completion-highlight{
1168
- color: #2d69c7;
1169
- }
1170
- .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1171
- color: #93ca12;
1172
- }
1173
- .ace_editor.ace_autocomplete {
1174
- width: 300px;
1175
- z-index: 200000;
1176
- border: 1px lightgray solid;
1177
- position: fixed;
1178
- box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1179
- line-height: 1.4;
1180
- background: #fefefe;
1181
- color: #111;
1182
- }
1183
- .ace_dark.ace_editor.ace_autocomplete {
1184
- border: 1px #484747 solid;
1185
- box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1186
- line-height: 1.4;
1187
- background: #25282c;
1188
- color: #c1c1c1;
1189
- }
1190
- .ace_autocomplete .ace_text-layer {
1191
- width: calc(100% - 8px);
1192
- }
1193
- .ace_autocomplete .ace_line {
1194
- display: flex;
1195
- align-items: center;
1196
- }
1197
- .ace_autocomplete .ace_line > * {
1198
- min-width: 0;
1199
- flex: 0 0 auto;
1200
- }
1201
- .ace_autocomplete .ace_line .ace_ {
1202
- flex: 0 1 auto;
1203
- overflow: hidden;
1204
- text-overflow: ellipsis;
1205
- }
1206
- .ace_autocomplete .ace_completion-spacer {
1207
- flex: 1;
1208
- }
1209
- .ace_autocomplete.ace_loading:after {
1210
- content: "";
1211
- position: absolute;
1212
- top: 0px;
1213
- height: 2px;
1214
- width: 8%;
1215
- background: blue;
1216
- z-index: 100;
1217
- animation: ace_progress 3s infinite linear;
1218
- animation-delay: 300ms;
1219
- transform: translateX(-100%) scaleX(1);
1220
- }
1221
- @keyframes ace_progress {
1222
- 0% { transform: translateX(-100%) scaleX(1) }
1223
- 50% { transform: translateX(625%) scaleX(2) }
1224
- 100% { transform: translateX(1500%) scaleX(3) }
1225
- }
1226
- @media (prefers-reduced-motion) {
1227
- .ace_autocomplete.ace_loading:after {
1228
- transform: translateX(625%) scaleX(2);
1229
- animation: none;
1230
- }
1231
- }
1232
- `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=g}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,d){var h=(function(){function p(v){this.editor=v,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return p.prototype.setScreenReaderContent=function(v){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var f=this.popup.getRow(),i=this.popup.renderer.$textLayer,a=i.element.childNodes[f-i.config.firstRow];if(a){for(var u="doc-tooltip ",g=0;g<this._lines.length;g++)u+="ace-inline-screenreader-line-".concat(g," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=v.split(/\r\n|\r|\n/);var s=this.createCodeBlock();this.screenReaderDiv.appendChild(s)},p.prototype.destroy=function(){this.screenReaderDiv.remove()},p.prototype.createCodeBlock=function(){var v=document.createElement("pre");v.setAttribute("id","ace-inline-screenreader");for(var s=0;s<this._lines.length;s++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(s));var i=document.createTextNode(this._lines[s]);f.appendChild(i),v.appendChild(f)}return v},p})();r.AceInlineScreenReader=h}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,d){var h=e("../snippets").snippetManager,p=e("./inline_screenreader").AceInlineScreenReader,v=(function(){function s(){this.editor=null}return s.prototype.show=function(f,i,a){if(a=a||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!i)return!1;this.inlineScreenReader||(this.inlineScreenReader=new p(f));var u=i.snippet?h.getDisplayTextForSnippet(f,i.snippet):i.value;return i.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?f.removeGhostText():f.setGhostText(u),!0)},s.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},s.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},s.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},s})();r.AceInline=v}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,d){r.parForEach=function(p,v,s){var f=0,i=p.length;i===0&&s();for(var a=0;a<i;a++)v(p[a],function(u,g){f++,f===i&&s(u,g)})};var h=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(p,v,s){s=s||h;for(var f=[],i=v-1;i>=0&&s.test(p[i]);i--)f.push(p[i]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(p,v,s){s=s||h;for(var f=[],i=v;i<p.length&&s.test(p[i]);i++)f.push(p[i]);return f},r.getCompletionPrefix=function(p){var v=p.getCursorPosition(),s=p.session.getLine(v.row),f;return p.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(a){!f&&a&&(f=this.retrievePrecedingIdentifier(s,v.column,a))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(s,v.column)},r.triggerAutocomplete=function(p,s){var s=s??p.session.getPrecedingCharacter();return p.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(s)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,r,d){var h=e("./keyboard/hash_handler").HashHandler,p=e("./autocomplete/popup").AcePopup,v=e("./autocomplete/inline").AceInline,s=e("./autocomplete/popup").getAriaId,f=e("./autocomplete/util"),i=e("./lib/lang"),a=e("./lib/dom"),u=e("./snippets").snippetManager,g=e("./config"),o=e("./lib/event"),c=e("./lib/scroll").preventParentScroll,m=function($,k){k.completer&&k.completer.destroy()},w=(function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new h,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=i.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=i.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=i.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=i.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=i.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new R($.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:g.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new p(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new v,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},$.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(k){var C=this.base.row,O=this.base.column,N=this.editor.getCursorPosition().column,I=this.editor.session.getLine(C).slice(O,N);this.inlineRenderer.show(this.editor,k,I)?this.$seen(k):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var O=this.popup.getData(C);O&&(!k||O.hideInlinePreview)&&this.$seen(O)}},$.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,O=C.layerConfig.lineHeight,N=C.$cursorLayer.getPixelPosition(this.base,!0);N.left-=this.popup.getTextLeftOffset();var I=k.container.getBoundingClientRect();N.top+=I.top-C.layerConfig.offset,N.left+=I.left-k.renderer.scrollLeft,N.left+=C.gutterWidth;var M={top:N.top,left:N.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(M.top+=C.$ghostTextWidget.el.offsetHeight);var W=k.container.getBoundingClientRect().bottom-O,F=W<M.top?{top:W,left:M.left}:M;this.popup.tryShow(F,O,"bottom")||this.popup.tryShow(N,O,"top")||this.popup.show(N,O)},$.prototype.openPopup=function(k,C,O){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var N=this.popup.getRow(),I=this.popup.data[N];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var M;this.stickySelection&&(M=this.popup.data.indexOf(I)),(!M||M===-1)&&(M=0),this.popup.setRow(this.autoSelect?M:-1),M===N&&I!==this.completions.filtered[M]&&this.$onPopupChange();var W=this.inlineRenderer&&this.inlineEnabled;if(M===N&&W){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}O||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(k){var C=document.activeElement,O=this.editor.textInput.getElement(),N=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),I=this.popup&&this.popup.container;C!=O&&C.parentNode!=I&&!N&&C!=this.tooltipNode&&k.relatedTarget!=O&&this.detach()},$.prototype.mousedownListener=function(k){this.detach()},$.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(k){this.popup.goTo(k)},$.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var O=this.completions,N=this.getCompletionProvider().insertMatch(this.editor,k,O.filterText,C);return this.completions==O&&this.detach(),N},$.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},$.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},$.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var N=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:N});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,k);return}if(C&&C.matches){var N=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(N.row,N.column),this.base.$insertRight=!0,this.completions=new R(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var O=this.editor.getSession(),N=this.editor.getCursorPosition(),I=f.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(N.row,N.column-I.length),this.base.$insertRight=!0;var M={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:N}).provideCompletions(this.editor,M,(function(W,F,D){var A=F.filtered,_=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),D){if(!A.length){var L=!this.autoShown&&this.emptyMessage;if(typeof L=="function"&&(L=this.emptyMessage(_)),L){var B=[{caption:L,value:""}];this.completions=new R(B),this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==_&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!D&&this.showLoadingState?new R($.completionsForLoading.concat(A),F.filterText):F,this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!D)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[k.getHoveredRow()]||C[k.getRow()]),N=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,M=0;M<I;M++){var W=this.editor.completers[M];if(W.getDocTooltip&&O.completerId===W.id){N=W.getDocTooltip(O);break}}if(!N&&typeof O!="string"&&(N=O),typeof N=="string"&&(N={docText:N}),!N||!N.docHTML&&!N.docText)return this.hideDocTooltip();this.showDocTooltip(N)},$.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;k.docHTML?O.innerHTML=k.docHTML:k.docText&&(O.textContent=k.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var N=this.popup,I=N.container.getBoundingClientRect(),M=400,W=300,F=N.renderer.scrollBar.width||10,D=I.left,A=window.innerWidth-I.right-F,_=N.isTopdown?window.innerHeight-F-I.bottom:I.top,L=[Math.min(A/M,1),Math.min(D/M,1),Math.min(_/W,1)*.9],B=Math.max.apply(Math,L),U=O.style;U.display="block",B==L[0]||L[0]>=1?(U.left=I.right+1+"px",U.right="",U.maxWidth=M*B+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-I.top,W)+"px"):B==L[1]||L[1]>=1?(U.right=window.innerWidth-I.left+"px",U.left="",U.maxWidth=M*B+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-I.top,W)+"px"):B==L[2]&&(U.left=I.left+"px",U.right="",U.maxWidth=Math.min(M,window.innerWidth-I.left)+"px",N.isTopdown?(U.top=I.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-I.bottom,W)+"px"):(U.top="",U.bottom=window.innerHeight-I.top+"px",U.maxHeight=Math.min(I.top,W)+"px")),a.$fixPositionBug(O)},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},$.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(k){return k.completer instanceof $||(k.completer&&(k.completer.destroy(),k.completer=null),g.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),k.completer=$.$sharedInstance):(k.completer=new $,k.once("destroy",m))),k.completer},$})();w.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var k=$.completer.insertMatch();if(k||$.tabstopManager)return k;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var k=f.getCompletionPrefix($);!k&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,k){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function $(k){this.initialPosition=k,this.active=!0}return $.prototype.insertByIndex=function(k,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],O)},$.prototype.insertMatch=function(k,C,O){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var N=this.completions.filterText.length,I=0;if(C.range&&C.range.start.row===C.range.end.row&&(N-=this.initialPosition.prefix.length,N+=this.initialPosition.pos.column-C.range.start.column,I+=C.range.end.column-this.initialPosition.pos.column),N||I){var M;k.selection.getAllRanges?M=k.selection.getAllRanges():M=[k.getSelectionRange()];for(var W=0,F;F=M[W];W++)F.start.column-=N,F.end.column+=I,k.session.remove(F)}C.snippet?u.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},$.prototype.$insertString=function(k,C){var O=C.value||C;k.execCommand("insertstring",O)},$.prototype.gatherCompletions=function(k,C){var O=k.getSession(),N=k.getCursorPosition(),I=f.getCompletionPrefix(k),M=[];this.completers=k.completers;var W=k.completers.length;return k.completers.forEach(function(F,D){F.getCompletions(k,O,N,I,function(A,_){F.hideInlinePreview&&(_=_.map(function(L){return Object.assign(L,{hideInlinePreview:F.hideInlinePreview})})),!A&&_&&(M=M.concat(_)),C(null,{prefix:f.getCompletionPrefix(k),matches:M,finished:--W===0})})}),!0},$.prototype.provideCompletions=function(k,C,O){var N=(function(F){var D=F.prefix,A=F.matches;this.completions=new R(A),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(D),(F.finished||this.completions.filtered.length)&&O(null,this.completions,F.finished)}).bind(this),I=!0,M=null;if(this.gatherCompletions(k,(function(F,D){if(this.active){F&&(O(F,[],!0),this.detach());var A=D.prefix;if(A.indexOf(D.prefix)===0){if(I){M=D;return}N(D)}}}).bind(this)),I=!1,M){var W=M;M=null,N(W)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},$})(),R=(function(){function $(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(N,I){return I.exactMatch-N.exactMatch||I.$score-N.$score||(N.caption||N.value).localeCompare(I.caption||I.value)});var O=null;C=C.filter(function(N){var I=N.snippet||N.caption||N.value;return I===O?!1:(O=I,!0)}),this.filtered=C},$.prototype.filterCompletions=function(k,C){var O=[],N=C.toUpperCase(),I=C.toLowerCase();e:for(var M=0,W;W=k[M];M++){if(W.skipFilter){W.$score=W.score,O.push(W);continue}var F=!this.ignoreCaption&&W.caption||W.value||W.snippet;if(F){var D=-1,A=0,_=0,L,B;if(this.exactMatch){if(C!==F.substr(0,C.length))continue e}else{var U=F.toLowerCase().indexOf(I);if(U>-1)_=U;else for(var V=0;V<C.length;V++){var K=F.indexOf(I[V],D+1),ee=F.indexOf(N[V],D+1);if(L=K>=0&&(ee<0||K<ee)?K:ee,L<0)continue e;B=L-D-1,B>0&&(D===-1&&(_+=10),_+=B,A|=1<<V),D=L}}W.matchMask=A,W.exactMatch=_?0:1,W.$score=(W.score||0)-_,O.push(W)}}return O},$})();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,d){var h=(function(){function p(v,s){s&&(this.markerType=s.markerType),this.markers=[],this.session=v,v.addDynamicMarker(this)}return p.prototype.getMarkerAtPosition=function(v){return this.markers.find(function(s){return s.range.contains(v.row,v.column)})},p.prototype.markersComparator=function(v,s){return v.range.start.row-s.range.start.row},p.prototype.setMarkers=function(v){this.markers=v.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},p.prototype.update=function(v,s,f,i){if(!(!this.markers||!this.markers.length))for(var a=i.firstRow,u=i.lastRow,g,o=0,c=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===c?o++:(c=w.range.start.row,o=0),!(o>200))){var x=w.range.clipRows(a,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var R=x.toScreenRange(f);if(R.isEmpty()){g=f.getNextFoldLine(x.end.row,g),g&&g.end.row>x.end.row&&(a=g.end.row);continue}this.markerType==="fullLine"?s.drawFullLineMarker(v,R,w.className,i):R.isMultiLine()?this.markerType==="line"?s.drawMultiLineMarker(v,R,w.className,i):s.drawTextMarker(v,R,w.className,i):s.drawSingleLineMarker(v,R,w.className+" ace_br15",i)}}}},p})();h.prototype.MAX_MARKERS=1e4,r.MarkerGroup=h}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,d){function h(f,i){var a=f.getTextRange(v.fromPoints({row:0,column:0},i));return a.split(s).length-1}function p(f,i){var a=h(f,i),u=f.getValue().split(s),g=Object.create(null),o=u[a];return u.forEach(function(c,m){if(!(!c||c===o)){var w=Math.abs(a-m),x=u.length-w;g[c]?g[c]=Math.max(x,g[c]):g[c]=x}}),g}var v=e("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(f,i,a,u,g){var o=p(i,a),c=Object.keys(o);g(null,c.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,d){var h=e("../snippets").snippetManager,p=e("../autocomplete").Autocomplete,v=e("../config"),s=e("../lib/lang"),f=e("../autocomplete/util"),i=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),u={getCompletions:function(I,M,W,F,D){if(M.$mode.completer)return M.$mode.completer.getCompletions(I,M,W,F,D);var A=I.session.getState(W.row),_=M.$mode.getCompletions(A,M,W,F);_=_.map(function(L){return L.completerId=u.id,L}),D(null,_)},id:"keywordCompleter"},g=function(I){var M={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(W,F,D,A){return M[F]=A||""}).replace(/\$(\d+?)/g,function(W,F){return M[F]})},o={getCompletions:function(I,M,W,F,D){var A=[],_=M.getTokenAt(W.row,W.column);_&&_.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?A.push("html-tag"):A=h.getActiveScopes(I);var L=h.snippetMap,B=[];A.forEach(function(U){for(var V=L[U]||[],K=V.length;K--;){var ee=V[K],ae=ee.name||ee.tabTrigger;ae&&B.push({caption:ae,snippet:ee.content,meta:ee.tabTrigger&&!ee.name?ee.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),D(null,B)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",s.escapeHTML(I.caption),"</b>","<hr></hr>",s.escapeHTML(g(I.snippet))].join(""))},id:"snippetCompleter"},c=[o,a,u];r.setCompleters=function(I){c.length=0,I&&c.push.apply(c,I)},r.addCompleter=function(I){c.push(I)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=o;var m={name:"expandSnippet",exec:function(I){return h.expandWithTab(I)},bindKey:"Tab"},w=function(I,M){x(M.session.$mode)},x=function(I){typeof I=="string"&&(I=v.$modes[I]),I&&(h.files||(h.files={}),R(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(x))},R=function(I,M){!M||!I||h.files[I]||(h.files[I]={},v.loadModule(M,function(W){W&&(h.files[I]=W,!W.snippets&&W.snippetText&&(W.snippets=h.parseSnippetFile(W.snippetText)),h.register(W.snippets||[],W.scope),W.includeScopes&&(h.snippetMap[W.scope].includeScopes=W.includeScopes,W.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},$=function(I){var M=I.editor,W=M.completer&&M.completer.activated;if(I.command.name==="backspace")W&&!f.getCompletionPrefix(M)&&M.completer.detach();else if(I.command.name==="insertstring"&&!W){k=I;var F=I.editor.$liveAutocompletionDelay;F?C.delay(F):O(I)}},k,C=s.delayedCall(function(){O(k)},0),O=function(I){var M=I.editor,W=f.getCompletionPrefix(M),F=I.args,D=f.triggerAutocomplete(M,F);if(W&&W.length>=M.$liveAutocompletionThreshold||D){var A=p.for(M);A.autoShown=!0,A.showPopup(M)}},N=e("../editor").Editor;e("../config").defineOptions(N.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(p.for(this),this.completers||(this.completers=Array.isArray(I)?I:c),this.commands.addCommand(p.startCommand)):this.commands.removeCommand(p.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:c),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=i}),(function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})})()})(Gm)),Gm.exports}mS();var Km={exports:{}},Ym;function vS(){return Ym||(Ym=1,(function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,d){d.exports=`
1233
-
1234
- /* ------------------------------------------------------------------------------------------
1235
- * Editor Search Form
1236
- * --------------------------------------------------------------------------------------- */
1237
- .ace_search {
1238
- background-color: #ddd;
1239
- color: #666;
1240
- border: 1px solid #cbcbcb;
1241
- border-top: 0 none;
1242
- overflow: hidden;
1243
- margin: 0;
1244
- padding: 4px 6px 0 4px;
1245
- position: absolute;
1246
- top: 0;
1247
- z-index: 99;
1248
- white-space: normal;
1249
- }
1250
- .ace_search.left {
1251
- border-left: 0 none;
1252
- border-radius: 0px 0px 5px 0px;
1253
- left: 0;
1254
- }
1255
- .ace_search.right {
1256
- border-radius: 0px 0px 0px 5px;
1257
- border-right: 0 none;
1258
- right: 0;
1259
- }
1260
-
1261
- .ace_search_form, .ace_replace_form {
1262
- margin: 0 20px 4px 0;
1263
- overflow: hidden;
1264
- line-height: 1.9;
1265
- }
1266
- .ace_replace_form {
1267
- margin-right: 0;
1268
- }
1269
- .ace_search_form.ace_nomatch {
1270
- outline: 1px solid red;
1271
- }
1272
-
1273
- .ace_search_field {
1274
- border-radius: 3px 0 0 3px;
1275
- background-color: white;
1276
- color: black;
1277
- border: 1px solid #cbcbcb;
1278
- border-right: 0 none;
1279
- outline: 0;
1280
- padding: 0;
1281
- font-size: inherit;
1282
- margin: 0;
1283
- line-height: inherit;
1284
- padding: 0 6px;
1285
- min-width: 17em;
1286
- vertical-align: top;
1287
- min-height: 1.8em;
1288
- box-sizing: content-box;
1289
- }
1290
- .ace_searchbtn {
1291
- border: 1px solid #cbcbcb;
1292
- line-height: inherit;
1293
- display: inline-block;
1294
- padding: 0 6px;
1295
- background: #fff;
1296
- border-right: 0 none;
1297
- border-left: 1px solid #dcdcdc;
1298
- cursor: pointer;
1299
- margin: 0;
1300
- position: relative;
1301
- color: #666;
1302
- }
1303
- .ace_searchbtn:last-child {
1304
- border-radius: 0 3px 3px 0;
1305
- border-right: 1px solid #cbcbcb;
1306
- }
1307
- .ace_searchbtn:disabled {
1308
- background: none;
1309
- cursor: default;
1310
- }
1311
- .ace_searchbtn:hover {
1312
- background-color: #eef1f6;
1313
- }
1314
- .ace_searchbtn.prev, .ace_searchbtn.next {
1315
- padding: 0px 0.7em
1316
- }
1317
- .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1318
- content: "";
1319
- border: solid 2px #888;
1320
- width: 0.5em;
1321
- height: 0.5em;
1322
- border-width: 2px 0 0 2px;
1323
- display:inline-block;
1324
- transform: rotate(-45deg);
1325
- }
1326
- .ace_searchbtn.next:after {
1327
- border-width: 0 2px 2px 0 ;
1328
- }
1329
- .ace_searchbtn_close {
1330
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1331
- border-radius: 50%;
1332
- border: 0 none;
1333
- color: #656565;
1334
- cursor: pointer;
1335
- font: 16px/16px Arial;
1336
- padding: 0;
1337
- height: 14px;
1338
- width: 14px;
1339
- top: 9px;
1340
- right: 7px;
1341
- position: absolute;
1342
- }
1343
- .ace_searchbtn_close:hover {
1344
- background-color: #656565;
1345
- background-position: 50% 100%;
1346
- color: white;
1347
- }
1348
-
1349
- .ace_button {
1350
- margin-left: 2px;
1351
- cursor: pointer;
1352
- -webkit-user-select: none;
1353
- -moz-user-select: none;
1354
- -o-user-select: none;
1355
- -ms-user-select: none;
1356
- user-select: none;
1357
- overflow: hidden;
1358
- opacity: 0.7;
1359
- border: 1px solid rgba(100,100,100,0.23);
1360
- padding: 1px;
1361
- box-sizing: border-box!important;
1362
- color: black;
1363
- }
1364
-
1365
- .ace_button:hover {
1366
- background-color: #eee;
1367
- opacity:1;
1368
- }
1369
- .ace_button:active {
1370
- background-color: #ddd;
1371
- }
1372
-
1373
- .ace_button.checked {
1374
- border-color: #3399ff;
1375
- opacity:1;
1376
- }
1377
-
1378
- .ace_search_options{
1379
- margin-bottom: 3px;
1380
- text-align: right;
1381
- -webkit-user-select: none;
1382
- -moz-user-select: none;
1383
- -o-user-select: none;
1384
- -ms-user-select: none;
1385
- user-select: none;
1386
- clear: both;
1387
- }
1388
-
1389
- .ace_search_counter {
1390
- float: left;
1391
- font-family: arial;
1392
- padding: 0 8px;
1393
- }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,d){var h=e("../lib/dom"),p=e("../lib/lang"),v=e("../lib/event"),s=e("./searchbox-css"),f=e("../keyboard/hash_handler").HashHandler,i=e("../lib/keys"),a=e("../config").nls,u=999;h.importCssString(s,"ace_searchbox",!1);var g=(function(){function m(w,x,R){this.activeInput,this.element=h.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),h.importCssString(s,"ace_searchbox",w.container),v.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;v.addListener(w,"mousedown",function(R){setTimeout(function(){x.activeInput.focus()},0),v.stopPropagation(R)}),v.addListener(w,"click",function(R){var $=R.target||R.srcElement,k=$.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),v.stopPropagation(R)}),v.addCommandKeyListener(w,function(R,$,k){var C=i.keyCodeToString(k),O=x.$searchBarKb.findKeyCommand($,C);O&&O.exec&&(O.exec(x),v.stopEvent(R))}),this.$onChange=p.delayedCall(function(){x.find(!1,!1)}),v.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),v.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),v.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){h.setCssClass(this.replaceOption,"checked",this.searchRange),h.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",h.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),h.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),h.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,R){if(this.editor.session){var $=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),k=!$&&this.searchInput.value;h.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,R=x.unicode,$=0,k=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1394
- `),w.session.doc.$autoNewLine=`
1395
- `);var O=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(O-=w.session.doc.positionToIndex(this.searchRange.start));for(var N=x.lastIndex=0,I;(I=x.exec(C))&&($++,N=I.index,N<=O&&k++,!($>u||!I[0]&&(x.lastIndex=N+=p.skipEmptyMatch(C,N,R),N>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,$>u?u+"+":$])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;h.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(w,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(w=p.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m})(),o=new f;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},"Tab|Shift-Tab":function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var c=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);g.prototype.$searchBarKb=o,g.prototype.$closeSearchBarKb=c,r.SearchBox=g,r.Search=function(m,w){var x=m.searchBox||new g(m),R=m.session.selection.getRange(),$=R.isMultiLine()?"":m.session.getTextRange(R);x.show($,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})})()})(Km)),Km.exports}vS();var Xm={exports:{}},Jm;function yS(){return Jm||(Jm=1,(function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,d){function h(f,i){function a(I,M,W){if(!(I.length<M)){var F=I.slice(0,M),D=I.slice(M),A=/^(?:(\s+)|(\S+)(\s+))/.exec(D),_=/(?:(\s+)|(\s+)(\S+))$/.exec(F),L=0,B=0;if(_&&!_[2]&&(L=M-_[1].length,B=M),A&&!A[2]&&(L||(L=M),B=M+A[1].length),L)return{start:L,end:B};if(_&&_[2]&&_.index>W)return{start:_.index,end:_.index+_[2].length};if(A&&A[2])return L=M+A[2].length,{start:L,end:L+A[3].length}}}for(var u=i.column||f.getOption("printMarginColumn"),g=i.allowMerge!=0,o=Math.min(i.startRow,i.endRow),c=Math.max(i.startRow,i.endRow),m=f.session;o<=c;){var w=m.getLine(o);if(w.length>u){var x=a(w,u,5);if(x){var R=/^\s*/.exec(w)[0];m.replace(new v(o,x.start,o,x.end),`
1396
- `+R)}c++}else if(g&&/\S/.test(w)&&o!=c){var $=m.getLine(o+1);if($&&/\S/.test($)){var k=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),O=k+" "+C,x=a(O,u,5);if(x&&x.start>k.length||O.length<u){var N=new v(o,k.length,o+1,$.length-C.length);m.replace(N," "),o--,c--}else k.length<w.length&&m.remove(new v(o,k.length,o,w.length))}}o++}}function p(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var i=f.editor,a=i.selection.cursor;if(a.column<=i.renderer.$printMarginColumn)return;var u=i.session.$undoManager.$lastDelta;h(i,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var v=e("../range").Range,s=e("../editor").Editor;e("../config").defineOptions(s.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=h}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,d){function h(b){return{row:b.line,column:b.ch}}function p(b){return new De(b.row,b.column)}function v(b,E,S){if(E.line===S.line&&E.ch>=S.ch-1){var P=b.getLine(E.line),z=P.charCodeAt(E.ch);55296<=z&&z<=55551&&(S.ch+=1)}return{start:E,end:S}}function s(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),Be.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",yo),O(b),Be.on(b.getInputField(),"paste",i(b))}function f(b){b.setOption("disableInput",!1),b.off("cursorActivity",yo),Be.off(b.getInputField(),"paste",i(b)),b.state.vim=null,ln&&clearTimeout(ln)}function i(b){var E=b.state.vim;return E.onPasteFn||(E.onPasteFn=function(){E.insertMode||(b.setCursor(pe(b.getCursor(),0,1)),Vn.enterInsertMode(b,{},E))}),E.onPasteFn}function a(b,E){return E>=b.firstLine()&&E<=b.lastLine()}function u(b){return/^[a-z]$/.test(b)}function g(b){return"()[]{}".indexOf(b)!=-1}function o(b){return La.test(b)}function c(b){return ft.test(b)}function m(b){return/^\s*$/.test(b)}function w(b){return".?!".indexOf(b)!=-1}function x(b,E){for(var S=0;S<E.length;S++)if(E[S]==b)return!0;return!1}function R(b,E,S,P,z){if(E===void 0&&!z)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),Gt[b]={type:S,defaultValue:E,callback:z},P)for(var j=0;j<P.length;j++)Gt[P[j]]=Gt[b];E&&$(b,E)}function $(b,E,S,P){var z=Gt[b];P=P||{};var j=P.scope;if(!z)return new Error("Unknown option: "+b);if(z.type=="boolean"){if(E&&E!==!0)return new Error("Invalid argument: "+b+"="+E);E!==!1&&(E=!0)}z.callback?(j!=="local"&&z.callback(E,void 0),j!=="global"&&S&&z.callback(E,S)):(j!=="local"&&(z.value=z.type=="boolean"?!!E:E),j!=="global"&&S&&(S.state.vim.options[b]={value:E}))}function k(b,E,S){var P=Gt[b];S=S||{};var z=S.scope;if(!P)return new Error("Unknown option: "+b);if(P.callback){var j=E&&P.callback(void 0,E);return z!=="global"&&j!==void 0?j:z!=="local"?P.callback():void 0}var j=z!=="global"&&E&&E.state.vim.options[b];return(j||z!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Un()}function O(b){return b.state.vim||(b.state.vim={inputState:new A,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),b.state.vim}function N(){Ve={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Fi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new K,exCommandHistoryController:new K};for(var b in Gt){var E=Gt[b];E.value=E.defaultValue}}function I(b){function E(X){typeof X=="string"?zt.value=X:zt=null}if(b[0]=="<"){var S=b.toLowerCase().slice(1,-1),P=S.split("-");if(S=P.pop()||"",S=="lt")b="<";else if(S=="space")b=" ";else if(S=="cr")b=`
1397
- `;else if(so[S]){var z=zt.value,j={key:so[S],target:{value:z,selectionEnd:z.length,selectionStart:z.length}};zt.onKeyDown&&zt.onKeyDown(j,zt.value,E),zt&&zt.onKeyUp&&zt.onKeyUp(j,zt.value,E);return}}if(b==`
1398
- `){var q=zt;zt=null,q.onClose&&q.onClose(q.value)}else zt.value=(zt.value||"")+b}function M(b,E,S){var P=zi;if(S){if(zr.indexOf(S)!=-1)return;zr.push(S),zi=S.noremap!=0}try{for(var z=O(b),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec(E);){var X=q[0],Z=z.insertMode;if(zt){I(X);continue}var re=kt.handleKey(b,X,"mapping");if(!re&&Z&&z.insertMode){if(X[0]=="<"){var he=X.toLowerCase().slice(1,-1),be=he.split("-");if(he=be.pop()||"",he=="lt")X="<";else if(he=="space")X=" ";else if(he=="cr")X=`
1399
- `;else{if(so.hasOwnProperty(he)){X=so[he],zs(b,X);continue}X=X[0],j.lastIndex=q.index+1}}b.replaceSelection(X)}}}finally{if(zr.pop(),zi=zr.length?P:!1,!zr.length&&zt){var Ae=zt;zt=null,dr(b,Ae)}}}function W(b,E){var S=b.key;if(!rr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=Br[S]||S;var P="";if(b.ctrlKey&&(P+="C-"),b.altKey&&(P+="A-"),b.metaKey&&(P+="M-"),Be.isMac&&b.altKey&&!b.metaKey&&!b.ctrlKey&&(P=P.slice(2)),(P||S.length>1)&&b.shiftKey&&(P+="S-"),E&&!E.expectLiteralNext&&S.length==1){if(Bn.keymap&&S in Bn.keymap)(Bn.remapCtrl!=0||!P)&&(S=Bn.keymap[S]);else if(S.charCodeAt(0)>255){var z=b.code&&b.code.slice(-1)||"";b.shiftKey||(z=z.toLowerCase()),z&&(S=z)}}return P+=S,P.length>1&&(P="<"+P+">"),P}}function F(b,E){Bn.string!==b&&(Bn=D(b)),Bn.remapCtrl=E}function D(b){function E(P){return P.split(/\\?(.)/).filter(Boolean)}var S={};return b?(b.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var z=P.split(/((?:[^\\;]|\\.)+);/);if(z.length==3){var j=E(z[1]),q=E(z[2]);if(j.length!==q.length)return;for(var X=0;X<j.length;++X)S[j[X]]=q[X]}else if(z.length==1){var Z=E(P);if(Z.length%2!==0)return;for(var X=0;X<Z.length;X+=2)S[Z[X]]=Z[X+1]}}}),{keymap:S,string:b}):{keymap:S,string:""}}function A(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(b,E){b.state.vim.inputState=new A,b.state.vim.expectLiteralNext=!1,Be.signal(b,"vim-command-done",E)}function L(){this.removed=[],this.inserted=""}function B(b,E,S){this.clear(),this.keyBuffer=[b||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!E,this.blockwise=!!S}function U(b,E){var S=Ve.registerController.registers;if(!b||b.length!=1)throw Error("Register name must be 1 character");S[b]=E,js.push(b)}function V(b){this.registers=b,this.unnamedRegister=b['"']=new B,b["."]=new B,b[":"]=new B,b["/"]=new B,b["+"]=new B}function K(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function ee(b,E){In[b]=E}function ae(b,E){for(var S=[],P=0;P<E;P++)S.push(b);return S}function Q(b,E){ts[b]=E}function oe(b,E){Vn[b]=E}function se(b,E,S){var P=b.state.vim,z=P.insertMode||P.visualMode,j=Math.min(Math.max(b.firstLine(),E.line),b.lastLine()),q=b.getLine(j),X=q.length-1+ +!!z,Z=Math.min(Math.max(0,E.ch),X),re=q.charCodeAt(Z);if(56320<=re&&re<=57343){var he=1;S&&S.line==j&&S.ch>Z&&(he=-1),Z+=he,Z>X&&(Z-=2)}return new De(j,Z)}function ue(b){var E={};for(var S in b)b.hasOwnProperty(S)&&(E[S]=b[S]);return E}function pe(b,E,S){return typeof E=="object"&&(S=E.ch,E=E.line),new De(b.line+E,b.ch+S)}function ve(b,E,S,P){P.operator&&(S="operatorPending");for(var z,j=[],q=[],X=zi?E.length-Oo:0,Z=X;Z<E.length;Z++){var re=E[Z];S=="insert"&&re.context!="insert"||re.context&&re.context!=S||P.operator&&re.type=="action"||!(z=$e(b,re.keys))||(z=="partial"&&j.push(re),z=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function $e(b,E){var S=E.slice(-11)=="<character>",P=E.slice(-10)=="<register>";if(S||P){var z=E.length-(S?11:10),j=b.slice(0,z),q=E.slice(0,z);return j==q&&b.length>z?"full":q.indexOf(j)==0?"partial":!1}return b==E?"full":E.indexOf(b)==0?"partial":!1}function Re(b){var E=/^.*(<[^>]+>)$/.exec(b),S=E?E[1]:b.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
1400
- `;break;case"<Space>":S=" ";break;default:S=""}return S}function Ye(b,E,S){return function(){for(var P=0;P<S;P++)E(b)}}function Ge(b){return new De(b.line,b.ch)}function at(b,E){return b.ch==E.ch&&b.line==E.line}function it(b,E){return b.line<E.line?!0:b.line==E.line&&b.ch<E.ch}function ut(b,E){return arguments.length>2&&(E=ut.apply(void 0,Array.prototype.slice.call(arguments,1))),it(b,E)?b:E}function Ht(b,E){return arguments.length>2&&(E=Ht.apply(void 0,Array.prototype.slice.call(arguments,1))),it(b,E)?E:b}function _r(b,E,S){var P=it(b,E),z=it(E,S);return P&&z}function Rt(b,E){return b.getLine(E).length}function cr(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")}function Mn(b){return b.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function kr(b,E,S){var P=Rt(b,E),z=new Array(S-P+1).join(" ");b.setCursor(new De(E,P)),b.replaceRange(z,b.getCursor())}function yn(b,E){var S=[],P=b.listSelections(),z=Ge(b.clipPos(E)),j=!at(E,z),q=b.getCursor("head"),X=mt(P,q),Z=at(P[X].head,P[X].anchor),re=P.length-1,he=re-X>X?re:0,be=P[he].anchor,Ae=Math.min(be.line,z.line),ye=Math.max(be.line,z.line),xe=be.ch,Oe=z.ch,Le=P[he].head.ch-xe,Xe=Oe-xe;Le>0&&Xe<=0?(xe++,j||Oe--):Le<0&&Xe>=0?(xe--,Z||Oe++):Le<0&&Xe==-1&&(xe--,Oe++);for(var pt=Ae;pt<=ye;pt++){var nt={anchor:new De(pt,xe),head:new De(pt,Oe)};S.push(nt)}return b.setSelections(S),E.ch=Oe,be.ch=xe,be}function ur(b,E,S){for(var P=[],z=0;z<S;z++){var j=pe(E,z,0);P.push({anchor:j,head:j})}b.setSelections(P,0)}function mt(b,E,S){for(var P=0;P<b.length;P++){var z=at(b[P].anchor,E),j=at(b[P].head,E);if(z||j)return P}return-1}function Je(b,E){var S=E.lastSelection,P=function(){var j=b.listSelections(),q=j[0],X=j[j.length-1],Z=it(q.anchor,q.head)?q.anchor:q.head,re=it(X.anchor,X.head)?X.head:X.anchor;return[Z,re]},z=function(){var j=b.getCursor(),q=b.getCursor(),X=S.visualBlock;if(X){var Z=X.width,re=X.height;q=new De(j.line+re,j.ch+Z);for(var he=[],be=j.line;be<q.line;be++){var Ae=new De(be,j.ch),ye=new De(be,q.ch),xe={anchor:Ae,head:ye};he.push(xe)}b.setSelections(he)}else{var Oe=S.anchorMark.find(),Le=S.headMark.find(),Xe=Le.line-Oe.line,pt=Le.ch-Oe.ch;q={line:q.line+Xe,ch:Xe?q.ch:pt+q.ch},S.visualLine&&(j=new De(j.line,0),q=new De(q.line,Rt(b,q.line))),b.setSelection(j,q)}return[j,q]};return E.visualMode?P():z()}function Tt(b,E){var S=E.sel.anchor,P=E.sel.head;E.lastPastedText&&(P=b.posFromIndex(b.indexFromPos(S)+E.lastPastedText.length),E.lastPastedText=null),E.lastSelection={anchorMark:b.setBookmark(S),headMark:b.setBookmark(P),anchor:Ge(S),head:Ge(P),visualMode:E.visualMode,visualLine:E.visualLine,visualBlock:E.visualBlock}}function en(b,E,S,P){var z=b.state.vim.sel,j=P?E:z.head,q=P?E:z.anchor,X;return it(S,E)&&(X=S,S=E,E=X),it(j,q)?(j=ut(E,j),q=Ht(q,S)):(q=ut(E,q),j=Ht(j,S),j=pe(j,0,-1),j.ch==-1&&j.line!=b.firstLine()&&(j=new De(j.line-1,Rt(b,j.line-1)))),[q,j]}function Dn(b,E,z){var P=b.state.vim;E=E||P.sel;var z=z||P.visualLine?"line":P.visualBlock?"block":"char",j=Xn(b,E,z);b.setSelections(j.ranges,j.primary)}function Xn(b,E,S,P){var z=Ge(E.head),j=Ge(E.anchor);if(S=="char"){var q=!P&&!it(E.head,E.anchor)?1:0,X=it(E.head,E.anchor)?1:0;return z=pe(E.head,0,q),j=pe(E.anchor,0,X),{ranges:[{anchor:j,head:z}],primary:0}}if(S=="line"){if(it(E.head,E.anchor))z.ch=0,j.ch=Rt(b,j.line);else{j.ch=0;var Z=b.lastLine();z.line>Z&&(z.line=Z),z.ch=Rt(b,z.line)}return{ranges:[{anchor:j,head:z}],primary:0}}if(S=="block"){var re=Math.min(j.line,z.line),he=j.ch,be=Math.max(j.line,z.line),Ae=z.ch;he<Ae?Ae+=1:he+=1;for(var ye=be-re+1,xe=z.line==re?0:ye-1,Oe=[],Le=0;Le<ye;Le++)Oe.push({anchor:new De(re+Le,he),head:new De(re+Le,Ae)});return{ranges:Oe,primary:xe}}}function hr(b){var E=b.getCursor("head");return b.getSelection().length==1&&(E=ut(E,b.getCursor("anchor"))),E}function bn(b,E){var S=b.state.vim;E!==!1&&b.setCursor(se(b,S.sel.head)),Tt(b,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Be.signal(b,"vim-mode-change",{mode:"normal"})}function Hn(b,E,S){var P=b.getRange(E,S);if(/\n\s*$/.test(P)){var z=P.split(`
1401
- `);z.pop();for(var j,j=z.pop();z.length>0&&j&&m(j);j=z.pop())S.line--,S.ch=0;j?(S.line--,S.ch=Rt(b,S.line)):S.ch=0}}function Pn(b,E,S){E.ch=0,S.ch=0,S.line++}function Xt(b){if(!b)return 0;var E=b.search(/\S/);return E==-1?b.length:E}function an(b,E,S){var P=E.inclusive,z=E.innerWord,j=E.bigWord,q=E.noSymbol,X=E.multiline,Z=S||hr(b),re=b.getLine(Z.line),he=re,be=Z.line,Ae=be,ye=Z.ch,xe,Oe=q?No[0]:Pi[0];if(z&&/\s/.test(re.charAt(ye)))Oe=function(Rn){return/\s/.test(Rn)};else{for(;!Oe(re.charAt(ye));)if(ye++,ye>=re.length){if(!X)return null;ye--,xe=_i(b,Z,!0,j,!0);break}j?Oe=Pi[0]:(Oe=No[0],Oe(re.charAt(ye))||(Oe=No[1]))}for(var Le=ye,Xe=ye;Oe(re.charAt(Xe))&&Xe>=0;)Xe--;if(Xe++,xe)Le=xe.to,Ae=xe.line,he=b.getLine(Ae),!he&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(P){var pt=Le,nt=Z.ch<=Xe&&/\s/.test(re.charAt(Z.ch));if(!nt)for(;/\s/.test(he.charAt(Le))&&Le<he.length;)Le++;if(pt==Le||nt){for(var st=Xe;/\s/.test(re.charAt(Xe-1))&&Xe>0;)Xe--;!Xe&&!nt&&(Xe=st)}}return{start:new De(be,Xe),end:new De(Ae,Le)}}function Dr(b,E,S){var P=E;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:P,end:P};var z=Be.findMatchingTag(b,E)||Be.findEnclosingTag(b,E);return!z||!z.open||!z.close?{start:P,end:P}:S?{start:z.open.from,end:z.close.to}:{start:z.open.to,end:z.close.from}}function Zr(b,E,S){at(E,S)||Ve.jumpList.add(b,E,S)}function Ar(b,E){Ve.lastCharacterSearch.increment=b,Ve.lastCharacterSearch.forward=E.forward,Ve.lastCharacterSearch.selectedCharacter=E.selectedCharacter}function Ci(b,E,S,P){var z=Ge(b.getCursor()),j=S?1:-1,q=S?b.lineCount():-1,X=z.ch,Z=z.line,re=b.getLine(Z),he={lineText:re,nextCh:re.charAt(X),lastCh:null,index:X,symb:P,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:S,depth:0,curMoveThrough:!1},be=Si[P];if(!be)return z;var Ae=$i[be].init,ye=$i[be].isComplete;for(Ae&&Ae(he);Z!==q&&E;){if(he.index+=j,he.nextCh=he.lineText.charAt(he.index),!he.nextCh){if(Z+=j,he.lineText=b.getLine(Z)||"",j>0)he.index=0;else{var xe=he.lineText.length;he.index=xe>0?xe-1:0}he.nextCh=he.lineText.charAt(he.index)}ye(he)&&(z.line=Z,z.ch=he.index,E--)}return he.nextCh||he.curMoveThrough?new De(Z,he.index):z}function _i(b,E,S,P,z){var j=E.line,q=E.ch,X=b.getLine(j),Z=S?1:-1,re=P?Pi:No;if(z&&X==""){if(j+=Z,X=b.getLine(j),!a(b,j))return null;q=S?0:X.length}for(;;){if(z&&X=="")return{from:0,to:0,line:j};for(var he=Z>0?X.length:-1,be=he,Ae=he;q!=he;){for(var ye=!1,xe=0;xe<re.length&&!ye;++xe)if(re[xe](X.charAt(q))){for(be=q;q!=he&&re[xe](X.charAt(q));)q+=Z;if(Ae=q,ye=be!=Ae,be==E.ch&&j==E.line&&Ae==be+Z)continue;return{from:Math.min(be,Ae+1),to:Math.max(be,Ae),line:j}}ye||(q+=Z)}if(j+=Z,!a(b,j))return null;X=b.getLine(j),q=Z>0?0:X.length}}function nr(b,E,S,P,z,j){var q=Ge(E),X=[];(P&&!z||!P&&z)&&S++;for(var Z=!P||!z,re=0;re<S;re++){var he=_i(b,E,P,j,Z);if(!he){var be=Rt(b,b.lastLine());X.push(P?{line:b.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}X.push(he),E=new De(he.line,P?he.to-1:he.from)}var Ae=X.length!=S,ye=X[0],xe=X.pop();return P&&!z?(!Ae&&(ye.from!=q.ch||ye.line!=q.line)&&(xe=X.pop()),new De(xe.line,xe.from)):P&&z?new De(xe.line,xe.to-1):!P&&z?(!Ae&&(ye.to!=q.ch||ye.line!=q.line)&&(xe=X.pop()),new De(xe.line,xe.to)):new De(xe.line,xe.from)}function no(b,E,S,P,z){var j=E,q=new De(j.line+S.repeat-1,1/0),X=b.clipPos(q);return X.ch--,z||(P.lastHPos=1/0,P.lastHSPos=b.charCoords(X,"div").left),q}function Qr(b,E,S,P,z){for(var j=z||b.getCursor(),q=j.ch,X,Z=0;Z<E;Z++){var re=b.getLine(j.line);if(X=$n(q,re,P,S),X==-1)return null;q=X}return new De(b.getCursor().line,X)}function Ls(b,E){var S=b.getCursor().line;return se(b,new De(S,E-1))}function ei(b,E,S,P){!x(S,Co)&&!on.test(S)||(E.marks[S]&&E.marks[S].clear(),E.marks[S]=b.setBookmark(P))}function $n(b,E,S,P,z){var j;return P?(j=E.indexOf(S,b+1),j!=-1):(j=E.lastIndexOf(S,b-1),j!=-1),j}function ki(b,E,S,P,z){function j(Xe){return!/\S/.test(b.getLine(Xe))}function q(Xe,pt,nt){return nt?j(Xe)!=j(Xe+pt):!j(Xe)&&j(Xe+pt)}function X(Xe){P=P>0?1:-1;var pt=b.ace.session.getFoldLine(Xe);pt&&Xe+P>pt.start.row&&Xe+P<pt.end.row&&(P=(P>0?pt.end.row:pt.start.row)-Xe)}var Z=E.line,re=b.firstLine(),he=b.lastLine(),be,Ae,ye=Z;if(P){for(;re<=ye&&ye<=he&&S>0;)X(ye),q(ye,P)&&S--,ye+=P;return new De(ye,0)}var xe=b.state.vim;if(xe.visualLine&&q(Z,1,!0)){var Oe=xe.sel.anchor;q(Oe.line,-1,!0)&&(!z||Oe.line!=Z)&&(Z+=1)}var Le=j(Z);for(ye=Z;ye<=he&&S;ye++)q(ye,1,!0)&&(!z||j(ye)!=Le)&&S--;for(Ae=new De(ye,0),ye>he&&!Le?Le=!0:z=!1,ye=Z;ye>re&&!((!z||j(ye)==Le||ye==Z)&&q(ye,-1,!0));ye--);return be=new De(ye,0),{start:be,end:Ae}}function Ro(b,E,S,P,z){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,he,be,Ae){var ye=re.getLine(he),xe={line:ye,ln:he,pos:be,dir:Ae};if(xe.line==="")return{ln:xe.ln,pos:xe.pos};var Oe=xe.pos;for(j(xe);xe.line!==null;){if(Oe=xe.pos,w(xe.line[xe.pos])){if(!z)return{ln:xe.ln,pos:xe.pos+1};for(j(xe);xe.line!==null&&m(xe.line[xe.pos]);)Oe=xe.pos,j(xe);return{ln:xe.ln,pos:Oe+1}}j(xe)}return{ln:xe.ln,pos:Oe+1}}function X(re,he,be,Ae){var ye=re.getLine(he),xe={line:ye,ln:he,pos:be,dir:Ae};if(xe.line==="")return{ln:xe.ln,pos:xe.pos};var Oe=xe.pos;for(j(xe);xe.line!==null;){if(!m(xe.line[xe.pos])&&!w(xe.line[xe.pos]))Oe=xe.pos;else if(w(xe.line[xe.pos]))return z?m(xe.line[xe.pos+1])?{ln:xe.ln,pos:xe.pos+1}:{ln:xe.ln,pos:Oe}:{ln:xe.ln,pos:Oe};j(xe)}return xe.line=ye,z&&m(xe.line[xe.pos])?{ln:xe.ln,pos:xe.pos}:{ln:xe.ln,pos:Oe}}for(var Z={ln:E.line,pos:E.ch};S>0;)P<0?Z=X(b,Z.ln,Z.pos,P):Z=q(b,Z.ln,Z.pos,P),S--;return new De(Z.ln,Z.pos)}function ui(b,E,S,P){function z(Z,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Z,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Z.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function j(Z,re,he,be){var Le=Z.getLine(re),Ae=Le==="",ye={line:Le,ln:re,pos:he,dir:be},xe={ln:ye.ln,pos:ye.pos},Oe=ye.line==="";for(z(Z,ye);ye.line!==null;){if(xe.ln=ye.ln,xe.pos=ye.pos,ye.line===""&&!Oe)return{ln:ye.ln,pos:ye.pos};if(Ae&&ye.line!==""&&!m(ye.line[ye.pos]))return{ln:ye.ln,pos:ye.pos};w(ye.line[ye.pos])&&!Ae&&(ye.pos===ye.line.length-1||m(ye.line[ye.pos+1]))&&(Ae=!0),z(Z,ye)}var Le=Z.getLine(xe.ln);xe.pos=0;for(var Xe=Le.length-1;Xe>=0;--Xe)if(!m(Le[Xe])){xe.pos=Xe;break}return xe}function q(Z,re,he,be){var Oe=Z.getLine(re),Ae={line:Oe,ln:re,pos:he,dir:be},ye={ln:Ae.ln,pos:null},xe=Ae.line==="";for(z(Z,Ae);Ae.line!==null;){if(Ae.line===""&&!xe)return ye.pos!==null?ye:{ln:Ae.ln,pos:Ae.pos};if(!(!w(Ae.line[Ae.pos])||ye.pos===null||Ae.ln===ye.ln&&Ae.pos+1===ye.pos))return ye;Ae.line!==""&&!m(Ae.line[Ae.pos])&&(xe=!1,ye={ln:Ae.ln,pos:Ae.pos}),z(Z,Ae)}var Oe=Z.getLine(ye.ln);ye.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!m(Oe[Le])){ye.pos=Le;break}return ye}for(var X={ln:E.line,pos:E.ch};S>0;)P<0?X=q(b,X.ln,X.pos,P):X=j(b,X.ln,X.pos,P),S--;return new De(X.ln,X.pos)}function En(b,E,S,P){var z=E,j,q,X={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Z={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],re=b.getLine(z.line).charAt(z.ch),he=re===Z?1:0;if(j=b.scanForBracket(new De(z.line,z.ch+he),-1,void 0,{bracketRegex:X}),q=b.scanForBracket(new De(z.line,z.ch+he),1,void 0,{bracketRegex:X}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var be=j;j=q,q=be}return P?q.ch+=1:j.ch+=1,{start:j,end:q}}function Sr(b,E,S,P){var z=Ge(E),j=b.getLine(z.line),q=j.split(""),X,Z,re,he,be=q.indexOf(S);if(z.ch<be)z.ch=be;else if(be<z.ch&&q[z.ch]==S){var Ae=/string/.test(b.getTokenTypeAt(pe(E,0,1))),ye=/string/.test(b.getTokenTypeAt(E)),xe=Ae&&!ye;xe||(Z=z.ch,--z.ch)}if(q[z.ch]==S&&!Z)X=z.ch+1;else for(re=z.ch;re>-1&&!X;re--)q[re]==S&&(X=re+1);if(X&&!Z)for(re=X,he=q.length;re<he&&!Z;re++)q[re]==S&&(Z=re);return!X||!Z?{start:z,end:z}:(P&&(--X,++Z),{start:new De(z.line,X),end:new De(z.line,Z)})}function Pr(){}function Fn(b){var E=b.state.vim;return E.searchState_||(E.searchState_=new Pr)}function _n(b){return hi(b,"/")}function yr(b){return go(b,"/")}function hi(b,E){var S=go(b,E)||[];if(!S.length)return[];var P=[];if(S[0]===0){for(var z=0;z<S.length;z++)typeof S[z]=="number"&&P.push(b.substring(S[z]+1,S[z+1]));return P}}function go(b,E){E||(E="/");for(var S=!1,P=[],z=0;z<b.length;z++){var j=b.charAt(z);!S&&j==E&&P.push(z),S=!S&&j=="\\"}return P}function mo(b){for(var E="|(){",S="}",P=!1,z=[],j=-1;j<b.length;j++){var q=b.charAt(j)||"",X=b.charAt(j+1)||"",Z=X&&E.indexOf(X)!=-1;P?((q!=="\\"||!Z)&&z.push(q),P=!1):q==="\\"?(P=!0,X&&S.indexOf(X)!=-1&&(Z=!0),(!Z||X==="\\")&&z.push(q)):(z.push(q),Z&&X!=="\\"&&z.push("\\"))}return z.join("")}function To(b){for(var E=!1,S=[],P=-1;P<b.length;P++){var z=b.charAt(P)||"",j=b.charAt(P+1)||"";Bi[z+j]?(S.push(Bi[z+j]),P++):E?(S.push(z),E=!1):z==="\\"?(E=!0,o(j)||j==="$"?S.push("$"):j!=="/"&&j!=="\\"&&S.push("\\")):(z==="$"&&S.push("$"),S.push(z),j==="/"&&S.push("\\"))}return S.join("")}function Fr(b){for(var E=new Be.StringStream(b),S=[];!E.eol();){for(;E.peek()&&E.peek()!="\\";)S.push(E.next());var P=!1;for(var z in Hs)if(E.match(z,!0)){P=!0,S.push(Hs[z]);break}P||S.push(E.next())}return S.join("")}function di(b,E,S){var P=Ve.registerController.getRegister("/");if(P.setText(b),b instanceof RegExp)return b;var z=yr(b),j,q;if(!z.length)j=b;else{j=b.substring(0,z[0]);var X=b.substring(z[0]);q=X.indexOf("i")!=-1}if(!j)return null;k("pcre")||(j=mo(j)),S&&(E=/^[^A-Z]*$/.test(j));var Z=new RegExp(j,E||q?"im":"m");return Z}function ti(b){typeof b=="string"&&(b=document.createElement(b));for(var E,S=1;S<arguments.length;S++)if(E=arguments[S])if(typeof E!="object"&&(E=document.createTextNode(E)),E.nodeType)b.appendChild(E);else for(var P in E)Object.prototype.hasOwnProperty.call(E,P)&&(P[0]==="$"?b.style[P.slice(1)]=E[P]:b.setAttribute(P,E[P]));return b}function Ft(b,E){var S=ti("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},E);b.openNotification?b.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function Mo(b,E){return ti("div",{$display:"flex"},ti("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},b,ti("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),E&&ti("span",{$color:"#888"},E))}function dr(b,E){if(zr.length){E.value||(E.value=""),zt=E;return}var S=Mo(E.prefix,E.desc);if(b.openDialog)b.openDialog(S,E.onClose,{onKeyDown:E.onKeyDown,onKeyUp:E.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:E.value});else{var P="";typeof E.prefix!="string"&&E.prefix&&(P+=E.prefix.textContent),E.desc&&(P+=" "+E.desc),E.onClose(prompt(P,""))}}function Ln(b,E){if(b instanceof RegExp&&E instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],P=0;P<S.length;P++){var z=S[P];if(b[z]!==E[z])return!1}return!0}return!1}function le(b,E,S,P){if(E){var z=Fn(b),j=di(E,!!S,!!P);if(j)return He(b,j),Ln(j,z.getQuery())||z.setQuery(j),j}}function Ne(b){if(b.source.charAt(0)=="^")var E=!0;return{token:function(S){if(E&&!S.sol()){S.skipToEnd();return}var P=S.match(b,!1);if(P)return P[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!b.exec(S.next()+P[0]))?(S.next(),null):(S.match(b),"searching");for(;!S.eol()&&(S.next(),!S.match(b,!1)););},query:b}}function He(b,E){clearTimeout(ln);var S=Fn(b);S.highlightTimeout=ln,ln=setTimeout(function(){if(b.state.vim){var P=Fn(b);P.highlightTimeout=null;var z=P.getOverlay();(!z||E!=z.query)&&(z&&b.removeOverlay(z),z=Ne(E),b.addOverlay(z),b.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(b.showMatchesOnScrollbar(E))),P.setOverlay(z))}},50)}function xt(b,E,S,P){return P===void 0&&(P=1),b.operation(function(){for(var z=b.getCursor(),j=b.getSearchCursor(S,z),q=0;q<P;q++){var X=j.find(E);if(q==0&&X&&at(j.from(),z)){var Z=E?j.from():j.to();X=j.find(E),X&&!X[0]&&at(j.from(),Z)&&b.getLine(Z.line).length==Z.ch&&(X=j.find(E))}if(!X&&(j=b.getSearchCursor(S,E?new De(b.lastLine()):new De(b.firstLine(),0)),!j.find(E)))return}return j.from()})}function wn(b,E,S,P,z){return P===void 0&&(P=1),b.operation(function(){var j=b.getCursor(),q=b.getSearchCursor(S,j),X=q.find(!E);!z.visualMode&&X&&at(q.from(),j)&&q.find(!E);for(var Z=0;Z<P;Z++)if(X=q.find(E),!X&&(q=b.getSearchCursor(S,E?new De(b.lastLine()):new De(b.firstLine(),0)),!q.find(E)))return;return[q.from(),q.to()]})}function Kt(b){var E=Fn(b);E.highlightTimeout&&(clearTimeout(E.highlightTimeout),E.highlightTimeout=null),b.removeOverlay(Fn(b).getOverlay()),E.setOverlay(null),E.getScrollbarAnnotate()&&(E.getScrollbarAnnotate().clear(),E.setScrollbarAnnotate(null))}function $r(b,E,S){return typeof b!="number"&&(b=b.line),E instanceof Array?x(b,E):typeof S=="number"?b>=E&&b<=S:b==E}function Jn(b){var E=b.ace.renderer;return{top:E.getFirstFullyVisibleRow(),bottom:E.getLastFullyVisibleRow()}}function fn(b,E,S){if(S=="'"||S=="`")return Ve.jumpList.find(b,-1)||new De(0,0);if(S==".")return br(b);var P=E.marks[S];return P&&P.find()}function br(b){if(b.getLastEditEnd)return b.getLastEditEnd();for(var E=b.doc.history.done,S=E.length;S--;)if(E[S].changes)return Ge(E[S].changes[0].to)}function xn(b,E,S,P,z,j,q,X,Z){function re(){b.operation(function(){for(;!Oe;)he(),Ae();ye()})}function he(){var nt=b.getRange(j.from(),j.to()),st=nt.replace(q,X),Rn=j.to().line;j.replace(st),Xe=j.to().line,z+=Xe-Rn,pt=Xe<Rn}function be(){var nt=Le&&Ge(j.to()),st=j.findNext();return st&&!st[0]&&nt&&at(j.from(),nt)&&(st=j.findNext()),st}function Ae(){for(;be()&&$r(j.from(),P,z);)if(!(!S&&j.from().line==Xe&&!pt)){b.scrollIntoView(j.from(),30),b.setSelection(j.from(),j.to()),Le=j.from(),Oe=!1;return}Oe=!0}function ye(nt){if(nt&&nt(),b.focus(),Le){b.setCursor(Le);var st=b.state.vim;st.exMode=!1,st.lastHPos=st.lastHSPos=Le.ch}Z&&Z()}function xe(nt,st,Rn){Be.e_stop(nt);var St=W(nt);switch(St){case"y":he(),Ae();break;case"n":Ae();break;case"a":var Jt=Z;Z=void 0,b.operation(re),Z=Jt;break;case"l":he();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ye(Rn)}return Oe&&ye(Rn),!0}b.state.vim.exMode=!0;var Oe=!1,Le,Xe,pt;if(Ae(),Oe){Ft(b,"No matches for "+q.source);return}if(!E){re(),Z&&Z();return}dr(b,{prefix:ti("span","replace with ",ti("strong",X)," (y/n/a/q/l)"),onKeyDown:xe})}function wr(b,E){var S=b.state.vim,P=Ve.macroModeState,z=Ve.registerController.getRegister("."),j=P.isPlaying,q=P.lastInsertModeChanges;j||(b.off("change",Yo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Be.off(b.getInputField(),"keydown",Lo)),!j&&S.insertModeRepeat>1&&(Fs(b,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,E||b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),z.setText(q.changes.join("")),Be.signal(b,"vim-mode-change",{mode:"normal"}),P.isRecording&&fr(P)}function vo(b){zn.unshift(b)}function Is(b,E,S,P,z){var j={keys:b,type:E};j[E]=S,j[E+"Args"]=P;for(var q in z)j[q]=z[q];vo(j)}function Os(b,E,S,P){var z=Ve.registerController.getRegister(P);if(P==":"){z.keyBuffer[0]&&Wr.processCommand(b,z.keyBuffer[0]),S.isPlaying=!1;return}var j=z.keyBuffer,q=0;S.isPlaying=!0,S.replaySearchQueries=z.searchQueries.slice(0);for(var X=0;X<j.length;X++)for(var Z=j[X],re,he;Z;)if(re=/<\w+-.+?>|<\w+>|./.exec(Z),he=re[0],Z=Z.substring(re.index+he.length),kt.handleKey(b,he,"macro"),E.insertMode){var be=z.insertModeChanges[q++].changes;Ve.macroModeState.lastInsertModeChanges.changes=be,Jo(b,be,1),wr(b)}S.isPlaying=!1}function Ns(b,E){if(!b.isPlaying){var S=b.latestRegister,P=Ve.registerController.getRegister(S);P&&P.pushText(E)}}function fr(b){if(!b.isPlaying){var E=b.latestRegister,S=Ve.registerController.getRegister(E);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(b.lastInsertModeChanges)}}function Ds(b,E){if(!b.isPlaying){var S=b.latestRegister,P=Ve.registerController.getRegister(S);P&&P.pushSearchQuery&&P.pushSearchQuery(E)}}function Yo(b,E){var S=Ve.macroModeState,P=S.lastInsertModeChanges;if(!S.isPlaying)for(var z=b.state.vim;E;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(E.origin=="+input"||E.origin=="paste"||E.origin===void 0){var j=b.listSelections().length;j>1&&(P.ignoreCount=j);var q=E.text.join(`
1402
- `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(b.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var X=z&&z.insertEnd&&z.insertEnd.find(),Z=b.getCursor();if(X&&X.line==Z.line){var re=X.ch-Z.ch;re>0&&re<q.length&&(P.changes.push([q,re]),q="")}}q&&P.changes.push(q)}}E=E.next}}function yo(b){var E=b.state.vim;if(E.insertMode){var S=Ve.macroModeState;if(S.isPlaying)return;var P=S.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,E.insertEnd&&E.insertEnd.clear(),E.insertEnd=b.setBookmark(b.getCursor(),{insertLeft:!0}))}else b.curOp.isVimOp||Ps(b,E)}function Ps(b,E,S){var P=b.getCursor("anchor"),z=b.getCursor("head");if(E.visualMode&&!b.somethingSelected()?bn(b,!1):!E.visualMode&&!E.insertMode&&b.somethingSelected()&&(E.visualMode=!0,E.visualLine=!1,Be.signal(b,"vim-mode-change",{mode:"visual"})),E.visualMode){var j=it(z,P)?0:-1,q=it(z,P)?-1:0;z=pe(z,0,j),P=pe(P,0,q),E.sel={anchor:P,head:z},ei(b,E,"<",ut(z,P)),ei(b,E,">",Ht(z,P))}else!E.insertMode&&!S&&(E.lastHPos=b.getCursor().ch)}function Xo(b,E){this.keyName=b,this.key=E.key,this.ctrlKey=E.ctrlKey,this.altKey=E.altKey,this.metaKey=E.metaKey,this.shiftKey=E.shiftKey}function Lo(b){var E=Ve.macroModeState,S=E.lastInsertModeChanges,P=Be.keyName?Be.keyName(b):b.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new Xo(P,b)))}function Fs(b,E,S,P){function z(){X?Ai.processAction(b,E,E.lastEditActionCommand):Ai.evalInput(b,E)}function j(he){if(q.lastInsertModeChanges.changes.length>0){he=E.lastEditActionCommand?he:1;var be=q.lastInsertModeChanges;Jo(b,be.changes,he)}}var q=Ve.macroModeState;q.isPlaying=!0;var X=!!E.lastEditActionCommand,Z=E.inputState;if(E.inputState=E.lastEditInputState,X&&E.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<S;re++)z(),j(1);else P||z(),j(S);E.inputState=Z,E.insertMode&&!P&&wr(b),q.isPlaying=!1}function zs(b,E){Be.lookupKey(E,"vim-insert",function(S){return typeof S=="string"?Be.commands[S](b):S(b),!0})}function Jo(b,E,S){var P=b.getCursor("head"),z=Ve.macroModeState.lastInsertModeChanges.visualBlock;z&&(ur(b,P,z+1),S=b.listSelections().length,b.setCursor(P));for(var j=0;j<S;j++){z&&b.setCursor(pe(P,j,0));for(var q=0;q<E.length;q++){var X=E[q];if(X instanceof Xo)zs(b,X.keyName);else if(typeof X=="string")b.replaceSelection(X);else{var Z=b.getCursor(),re=pe(Z,0,X[0].length-(X[1]||0));b.replaceRange(X[0],Z,X[1]?Z:re),b.setCursor(re)}}}z&&b.setCursor(pe(P,0,1))}function Ea(b,E,S,P){E.length>1&&E[0]=="n"&&(E=E.replace("numpad","")),E=_o[E]||E;var z="";if(S.ctrlKey&&(z+="C-"),S.altKey&&(z+="A-"),(z||E.length>1)&&S.shiftKey&&(z+="S-"),P&&!P.expectLiteralNext&&E.length==1){if(Bn.keymap&&E in Bn.keymap)(Bn.remapCtrl!==!1||!z)&&(E=Bn.keymap[E]);else if(E.charCodeAt(0)>255){var j=S.code&&S.code.slice(-1)||"";S.shiftKey||(j=j.toLowerCase()),j&&(E=j)}}return z+=E,z.length>1&&(z="<"+z+">"),z}function bo(b){var E=new b.constructor;return Object.keys(b).forEach(function(S){if(S!="insertEnd"){var P=b[S];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=bo(P)),E[S]=P}}),b.sel&&(E.sel={head:b.sel.head&&Ge(b.sel.head),anchor:b.sel.anchor&&Ge(b.sel.anchor)}),E}function Zo(b,E,S){var P=!1,z=kt.maybeInitVimState_(b),j=z.visualBlock||z.wasInVisualBlock,q=b.ace.inMultiSelectMode;if(z.wasInVisualBlock&&!q?z.wasInVisualBlock=!1:q&&z.visualBlock&&(z.wasInVisualBlock=!0),E=="<Esc>"&&!z.insertMode&&!z.visualMode&&q)b.ace.exitMultiSelectMode();else if(j||!q||b.ace.inVirtualSelectionMode)P=kt.handleKey(b,E,S);else{var X=bo(z),Z=z.inputState.changeQueueList||[];b.operation(function(){b.curOp.isVimOp=!0;var re=0;b.ace.forEachSelection(function(){var he=b.ace.selection;b.state.vim.lastHPos=he.$desiredColumn==null?he.lead.column:he.$desiredColumn,b.state.vim.inputState.changeQueue=Z[re];var be=b.getCursor("head"),Ae=b.getCursor("anchor"),ye=it(be,Ae)?0:-1,xe=it(be,Ae)?-1:0;be=pe(be,0,ye),Ae=pe(Ae,0,xe),b.state.vim.sel.head=be,b.state.vim.sel.anchor=Ae,P=Er(b,E,S),he.$desiredColumn=b.state.vim.lastHPos==-1?null:b.state.vim.lastHPos,b.ace.inVirtualSelectionMode&&(Z[re]=b.state.vim.inputState.changeQueue),b.virtualSelectionMode()&&(b.state.vim=bo(X)),re++}),b.curOp.cursorActivity&&!P&&(b.curOp.cursorActivity=!1),z.status=b.state.vim.status,b.state.vim=z,z.inputState.changeQueueList=Z,z.inputState.changeQueue=null},!0)}return P&&!z.visualMode&&!z.insert&&z.visualMode!=b.somethingSelected()&&Ps(b,z,!0),P}function ro(b,E){E.off("beforeEndOperation",ro);var S=E.state.cm.vimCmd;S&&E.execCommand(S.exec?S:S.name,S.args),E.curOp=E.prevOp}var pr=e("../range").Range,Bs=e("../lib/event_emitter").EventEmitter,ni=e("../lib/dom"),Ra=e("../lib/oop"),Ta=e("../lib/keys"),Qo=e("../lib/event"),io=e("../search").Search,Io=e("../lib/useragent"),es=e("../search_highlight").SearchHighlight,wo=e("../commands/multi_select_commands"),Ma=e("../mode/text").Mode.prototype.tokenRe,xo=e("../ext/hardwrap").hardWrap;e("../multi_select");var Be=function(b){this.ace=b,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(b,E){if(!(this instanceof De))return new De(b,E);this.line=b,this.ch=E},Be.defineOption=function(b,E,S){},Be.commands={redo:function(b){b.ace.redo()},undo:function(b){b.ace.undo()},newlineAndIndent:function(b){b.ace.insert(`
1403
- `)},goLineLeft:function(b){b.ace.selection.moveCursorLineStart()},goLineRight:function(b){b.ace.selection.moveCursorLineEnd()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=Qo.stopEvent,Be.keyName=function(b){var E=Ta[b.keyCode]||b.key||"";return E.length==1&&(E=E.toUpperCase()),E=Qo.getModifierString(b).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+E,E},Be.keyMap.default=function(b){return function(E){var S=E.ace.commands.commandKeyBinding[b.toLowerCase()];return S&&E.ace.execCommand(S)!==!1}},Be.lookupKey=function b(E,S,P){S||(S="default"),typeof S=="string"&&(S=Be.keyMap[S]||Be.keyMap.default);var z=typeof S=="function"?S(E):S[E];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&P(z))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return b(E,S.fallthrough,P);for(var j=0;j<S.fallthrough.length;j++){var q=b(E,S.fallthrough[j],P);if(q)return q}}},Be.findMatchingTag=function(b,E){return b.findMatchingTag(E)},Be.findEnclosingTag=function(b,E){},Be.signal=function(b,E,S){return b._signal(E,S)},Be.on=Qo.addListener,Be.off=Qo.removeListener,Be.isWordChar=function(b){return b<""?/^\w$/.test(b):(Ma.lastIndex=0,Ma.test(b))},(function(){Ra.implement(Be.prototype,Bs),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(S){this.$lineHandleChanges&&this.$lineHandleChanges.push(S);var P={text:S.action[0]=="i"?S.lines:[]},z=this.curOp=this.curOp||{};z.changeHandlers||(z.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),z.lastChange?z.lastChange.next=z.lastChange=P:z.lastChange=z.change=P,this.$updateMarkers(S)},this.onSelectionChange=function(){var S=this.curOp=this.curOp||{};S.cursorActivityHandlers||(S.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(wo.keyboardHandler)},this.operation=function(S,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return S();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var z=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=P;var q=S();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&z&&(this.ace.prevOp=z)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var S=this.curOp;S&&(S.change&&this.signal("change",S.change,S),S&&S.cursorActivity&&this.signal("cursorActivity",null,S),this.curOp=null)},this.signal=function(S,P,z){var j=z?z[S+"Handlers"]:(this._eventRegistry||{})[S];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(S,P){typeof S=="object"&&(P=S.ch,S=S.line);var z=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:P}),this.ace.selection.moveTo(S,P),z&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var P=this.ace.selection,z=S=="anchor"?P.isEmpty()?P.lead:P.anchor:S=="head"||!S?P.lead:P.getRange()[S];return p(z)},this.listSelections=function(S){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(z){return{anchor:this.clipPos(p(z.cursor==z.end?z.start:z.end)),head:this.clipPos(p(z.cursor))}},this)},this.setSelections=function(S,P){var z=this.ace.multiSelect,j=S.map(function(re){var he=h(re.anchor),be=h(re.head),Ae=pr.comparePoints(he,be)<0?new pr.fromPoints(he,be):new pr.fromPoints(be,he);return Ae.cursor=pr.comparePoints(Ae.start,be)?Ae.end:Ae.start,Ae});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}P?j[P]&&j.push(j.splice(P,1)[0]):j=j.reverse(),z.toSingleRange(j[0].clone());for(var q=this.ace.session,X=0;X<j.length;X++){var Z=q.$clipRangeToDocument(j[X]);z.addRange(Z)}},this.setSelection=function(S,P,z){var j=this.ace.selection;j.moveTo(S.line,S.ch),j.selectTo(P.line,P.ch),z&&z.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var P=this.ace.session.$clipPositionToDocument(S.line,S.ch);return p(P)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var P=S.action=="insert",z=S.start,j=S.end,q=(j.row-z.row)*(P?1:-1),X=(j.column-z.column)*(P?1:-1);P&&(j=z);for(var Z in this.marks){var re=this.marks[Z],he=pr.comparePoints(re,z);if(!(he<0)){if(he===0&&P)if(!re.$insertRight)he=1;else{if(re.bias!=1){re.bias=-1;continue}he=1}var be=P?he:pr.comparePoints(re,j);if(be>0){re.row+=q,re.column+=re.row==j.row?X:0;continue}!P&&be<=0&&(re.row=z.row,re.column=z.column,be===0&&(re.bias=1))}}};var b=function(S,P,z,j){this.cm=S,this.id=P,this.row=z,this.column=j,S.marks[this.id]=this};b.prototype.clear=function(){delete this.cm.marks[this.id]},b.prototype.find=function(){return p(this)},this.setBookmark=function(S,P){var z=new b(this,this.$uid++,S.line,S.ch);return(!P||!P.insertLeft)&&(z.$insertRight=!0),this.marks[z.id]=z,z},this.moveH=function(S,P){if(P=="char"){var z=this.ace.selection;z.clearSelection(),z.moveCursorBy(0,S)}},this.findPosV=function(S,P,z,j){if(z=="page"){var q=this.ace.renderer,X=q.layerConfig;P*=Math.floor(X.height/X.lineHeight),z="line"}if(z=="line"){var Z=this.ace.session.documentToScreenPosition(S.line,S.ch);j!=null&&(Z.column=j),Z.row+=P,Z.row=Math.min(Math.max(0,Z.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Z.row,Z.column);return p(re)}debugger},this.charCoords=function(S,P){if(P=="div"||!P){var z=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:z.column,top:z.row}}if(P=="local"){var j=this.ace.renderer,z=this.ace.session.documentToScreenPosition(S.line,S.ch),q=j.layerConfig.lineHeight,X=j.layerConfig.characterWidth,Z=q*z.row;return{left:z.column*X,top:Z,bottom:Z+q}}},this.coordsChar=function(S,P){var z=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(S.top/z.lineHeight)),q=Math.max(0,Math.floor(S.left/z.characterWidth)),X=z.session.screenToDocumentPosition(j,q);return p(X)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(S,P,z){var j=!1,q=!1;S instanceof RegExp&&!S.global&&(j=!S.ignoreCase,S=S.source,q=!0),S=="\\n"&&(S=`
1404
- `,q=!1);var X=new io;P.ch==null&&(P.ch=Number.MAX_VALUE);var Z={row:P.line,column:P.ch},re=this,he=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){X.setOptions({needle:S,caseSensitive:j,wrap:!1,backwards:be,regExp:q,start:he||Z});var Ae=X.find(re.ace.session);return he=Ae,he&&[!he.isEmpty()]},from:function(){return he&&p(he.start)},to:function(){return he&&p(he.end)},replace:function(be){he&&(he.end=re.ace.session.doc.replace(he,be))}}},this.scrollTo=function(S,P){var z=this.ace.renderer,j=z.layerConfig,q=j.maxHeight;q-=(z.$size.scrollerHeight-z.lineHeight)*z.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,q))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,P){if(S){var z=this.ace.renderer,j={top:0,bottom:P};z.scrollCursorIntoView(h(S),z.lineHeight*2/z.$size.scrollerHeight,j)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,P){return this.ace.session.getTextRange(new pr(S.line,S.ch,P.line,P.ch))},this.replaceRange=function(S,P,z){z||(z=P);var j=new pr(P.line,P.ch,z.line,z.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,S)},this.replaceSelection=this.replaceSelections=function(S){var P=Array.isArray(S)&&S,z=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(z.getRange(),P?S[0]||"":S);return}z.inVirtualSelectionMode=!0;var j=z.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],P?S[q]||"":S);z.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(S){return this.getRange(S.anchor,S.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var E={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(S,P){switch(this.state[S]=P,S){case"indentWithTabs":S=E[S],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:S=E[S]}S&&this.ace.setOption(S,P)},this.getOption=function(S){var P,z=E[S];switch(z&&(P=this.ace.getOption(z)),S){case"indentWithTabs":return S=E[S],!P;case"keyMap":return this.state.$keyMap||"vim"}return z?P:this.state[S]},this.toggleOverwrite=function(S){return this.state.overwrite=S,this.ace.setOverwrite(S)},this.addOverlay=function(S){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new es(null,"ace_highlight-marker","text"),z=this.ace.session.addDynamicMarker(P);P.id=z.id,P.session=this.ace.session,P.destroy=function(q){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(q){var X=q.start.row;X==q.end.row?P.cache[X]=void 0:P.cache.splice(X,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,P=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var P=this.ace.session.getTokenAt(S.line,S.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(S){var P=this.ace.session.findMatchingBracket(h(S));return{to:P&&p(P)}},this.findMatchingTag=function(S){var P=this.ace.session.getMatchingTags(h(S));if(P)return{open:{from:p(P.openTag.start),to:p(P.openTag.end)},close:{from:p(P.closeTag.start),to:p(P.closeTag.end)}}},this.indentLine=function(S,P){P===!0?this.ace.session.indentRows(S,S," "):P===!1&&this.ace.session.outdentRows(new pr(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(h(S))},this.posFromIndex=function(S){return p(this.ace.session.doc.indexToPosition(S))},this.focus=function(S){return this.ace.textInput.focus()},this.blur=function(S){return this.ace.blur()},this.defaultTextHeight=function(S){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(S,P,z,j){var q=j.bracketRegex.source,X=/paren|text|operator|tag/;if(P==1)var Z=this.ace.session.$findClosingBracket(q.slice(1,2),h(S),X);else{var Z=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:S.line,column:S.ch+1},X);!Z&&j.bracketRegex&&j.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Z={row:S.line,column:S.ch-1})}return Z&&{pos:p(Z)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(Be.commands.hasOwnProperty(S))return Be.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var P=this.$lineHandleChanges;if(!P)return null;for(var z=S.row,j=0;j<P.length;j++){var q=P[j];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<z&&(z+=q.end.row-q.start.row);else if(q.start.row<z){if(z<q.end.row||z==q.end.row&&q.start.column>0)return null;z-=q.end.row-q.start.row}}}return z},this.getLineHandle=function(S){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(S),row:S}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var S=this.ace.session.$undoManager;if(S&&S.$lastDelta)return p(S.$lastDelta.end)}}).call(Be.prototype);var Ws=Be.StringStream=function(b,E){this.pos=this.start=0,this.string=b,this.tabSize=E||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ws.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(b){var E=this.string.charAt(this.pos);if(typeof b=="string")var S=E==b;else var S=E&&(b.test?b.test(E):b(E));if(S)return++this.pos,E},eatWhile:function(b){for(var E=this.pos;this.eat(b););return this.pos>E},eatSpace:function(){for(var b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>b},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){var E=this.string.indexOf(b,this.pos);if(E>-1)return this.pos=E,!0},backUp:function(b){this.pos-=b},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(b,E,S){if(typeof b!="string"){var P=this.string.slice(this.pos).match(b);return P&&P.index>0?null:(P&&E!==!1&&(this.pos+=P[0].length),P)}var z=function(q){return S?q.toLowerCase():q},j=this.string.substr(this.pos,b.length);if(z(j)==z(b))return E!==!1&&(this.pos+=b.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(b,E){this.lineStart+=b;try{return E()}finally{this.lineStart-=b}}},Be.defineExtension=function(b,E){Be.prototype[b]=E},ni.importCssString(`.normal-mode .ace_cursor{
1405
- border: none;
1406
- background-color: rgba(255,0,0,0.5);
1407
- }
1408
- .normal-mode .ace_hidden-cursors .ace_cursor{
1409
- background-color: transparent;
1410
- border: 1px solid red;
1411
- opacity: 0.7
1412
- }
1413
- .ace_dialog {
1414
- position: absolute;
1415
- left: 0; right: 0;
1416
- background: inherit;
1417
- z-index: 15;
1418
- padding: .1em .8em;
1419
- overflow: hidden;
1420
- color: inherit;
1421
- }
1422
- .ace_dialog-top {
1423
- border-bottom: 1px solid #444;
1424
- top: 0;
1425
- }
1426
- .ace_dialog-bottom {
1427
- border-top: 1px solid #444;
1428
- bottom: 0;
1429
- }
1430
- .ace_dialog input {
1431
- border: none;
1432
- outline: none;
1433
- background: transparent;
1434
- width: 20em;
1435
- color: inherit;
1436
- font-family: monospace;
1437
- }`,"vimMode",!1),(function(){function b(S,P,z){var j=S.ace.container,q;return q=j.appendChild(document.createElement("div")),z?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof P=="string"?q.innerHTML=P:q.appendChild(P),q}function E(S,P){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=P}Be.defineExtension("openDialog",function(S,P,z){function j(be){if(typeof be=="string")re.value=be;else{if(X||be&&be.type=="blur"&&document.activeElement===re)return;Z.state.dialog==q&&(Z.state.dialog=null,Z.focus()),X=!0,q.remove(),z.onClose&&z.onClose(q);var Ae=Z;Ae.state.vim&&(Ae.state.vim.status=null,Ae.ace._signal("changeStatus"),Ae.ace.renderer.$loop.schedule(Ae.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){z||(z={}),E(this,null);var q=b(this,S,z.bottom),X=!1,Z=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],he;return re?(z.value&&(re.value=z.value,z.selectValueOnOpen!==!1&&re.select()),z.onInput&&Be.on(re,"input",function(be){z.onInput(be,re.value,j)}),z.onKeyUp&&Be.on(re,"keyup",function(be){z.onKeyUp(be,re.value,j)}),Be.on(re,"keydown",function(be){z&&z.onKeyDown&&z.onKeyDown(be,re.value,j)||(be.keyCode==13&&P(re.value),(be.keyCode==27||z.closeOnEnter!==!1&&be.keyCode==13)&&(Be.e_stop(be),j()))}),z.closeOnBlur!==!1&&Be.on(re,"blur",j),re.focus()):(he=q.getElementsByTagName("button")[0])&&(Be.on(he,"click",function(){j(),Z.focus()}),z.closeOnBlur!==!1&&Be.on(he,"blur",j),he.focus()),j}}),Be.defineExtension("openNotification",function(S,P){function z(){q||(q=!0,clearTimeout(X),j.remove())}if(!this.virtualSelectionMode()){E(this,z);var j=b(this,S,P&&P.bottom),q=!1,X,Z=P&&typeof P.duration<"u"?P.duration:5e3;return Be.on(j,"click",function(re){Be.e_preventDefault(re),z()}),Z&&(X=setTimeout(z,Z)),z}})})();var De=Be.Pos,zn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Oo=zn.length,oo=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Bn=D(""),La=/[\d]/,No=[Be.isWordChar,function(b){return b&&!Be.isWordChar(b)&&!/\s/.test(b)}],Pi=[function(b){return/\S/.test(b)}],Co=["<",">"],js=["-",'"',".",":","_","/","+"],on=/^\w$/,ft;try{ft=new RegExp("^[\\p{Lu}]$","u")}catch{ft=/^[A-Z]$/}var Gt={};R("filetype",void 0,"string",["ft"],function(b,E){if(E!==void 0){if(b===void 0){var S=E.getOption("mode");return S=="null"?"":S}var S=b==""?"null":b;E.setOption("mode",S)}}),R("textwidth",80,"number",["tw"],function(b,E){if(E!==void 0){if(b===void 0){var S=E.getOption("textwidth");return S}var P=Math.round(b);P>1&&E.setOption("textwidth",P)}});var Fi=function(){function b(Z,re,he){function be(Oe){var Le=++z%P,Xe=X[Le];Xe&&Xe.clear(),X[Le]=Z.setBookmark(Oe)}var Ae=z%P,ye=X[Ae];if(ye){var xe=ye.find();xe&&!at(xe,re)&&be(re)}else be(re);be(he),j=z,q=z-P+1,q<0&&(q=0)}function E(Z,re){z+=re,z>j?z=j:z<q&&(z=q);var he=X[(P+z)%P];if(he&&!he.find()){var be=re>0?1:-1,Ae,ye=Z.getCursor();do if(z+=be,he=X[(P+z)%P],he&&(Ae=he.find())&&!at(ye,Ae))break;while(z<j&&z>q)}return he}function S(Z,re){var he=z,be=E(Z,re);return z=he,be&&be.find()}var P=100,z=-1,j=0,q=0,X=new Array(P);return{cachedCursor:void 0,add:b,find:S,move:E}},Un=function(b){return b?{changes:b.changes,expectCursorActivityForChange:b.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var b=Ve.macroModeState;b.onRecordingDone&&b.onRecordingDone(),b.onRecordingDone=void 0,b.isRecording=!1},enterMacroRecordMode:function(b,E){var S=Ve.registerController.getRegister(E);if(S){if(S.clear(),this.latestRegister=E,b.openDialog){var P=ti("span",{class:"cm-vim-message"},"recording @"+E);this.onRecordingDone=b.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Ve,kn,kt={enterVimMode:s,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return Ve.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return Ve},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:Xo,map:function(b,E,S){Wr.map(b,E,S)},unmap:function(b,E){return Wr.unmap(b,E)},noremap:function(b,E,S){Wr.map(b,E,S,!0)},mapclear:function(b){var E=zn.length,S=Oo,P=zn.slice(0,E-S);if(zn=zn.slice(E-S),b)for(var z=P.length-1;z>=0;z--){var j=P[z];if(b!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var X in q)if(q[X]!==b){var Z={};for(var re in j)Z[re]=j[re];Z.context=q[X],this._mapCommand(Z)}}}},langmap:F,vimKeyFromEvent:W,setOption:$,getOption:k,defineOption:R,defineEx:function(b,E,S){if(!E)E=b;else if(b.indexOf(E)!==0)throw new Error('(Vim.defineEx) "'+E+'" is not a prefix of "'+b+'", command not registered');gr[b]=S,Wr.commandMap_[E]={name:b,shortName:E,type:"api"}},handleKey:function(b,E,S){var P=this.findKey(b,E,S);if(typeof P=="function")return P()},multiSelectHandleKey:Zo,findKey:function(b,E,S){function P(){var re=Ve.macroModeState;if(re.isRecording){if(E=="q")return re.exitMacroRecordMode(),_(b),!0;S!="mapping"&&Ns(re,E)}}function z(){if(E=="<Esc>"){if(X.visualMode)bn(b);else{if(!X.insertMode)return;wr(b)}return _(b),!0}}function j(){if(z())return!0;X.inputState.keyBuffer.push(E);var re=X.inputState.keyBuffer.join(""),he=E.length==1,be=Ai.matchCommand(re,zn,X.inputState,"insert"),Ae=X.inputState.changeQueue;if(be.type=="none")return _(b),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(X.expectLiteralNext=!0),kn&&window.clearTimeout(kn),kn=he&&window.setTimeout(function(){X.insertMode&&X.inputState.keyBuffer.length&&_(b)},k("insertModeEscKeysTimeout")),he){var ye=b.listSelections();(!Ae||Ae.removed.length!=ye.length)&&(Ae=X.inputState.changeQueue=new L),Ae.inserted+=E;for(var xe=0;xe<ye.length;xe++){var Oe=ut(ye[xe].anchor,ye[xe].head),Le=Ht(ye[xe].anchor,ye[xe].head),Xe=b.getRange(Oe,b.state.overwrite?pe(Le,0,1):Le);Ae.removed[xe]=(Ae.removed[xe]||"")+Xe}}return!he}if(X.expectLiteralNext=!1,kn&&window.clearTimeout(kn),be.command&&Ae){for(var ye=b.listSelections(),xe=0;xe<ye.length;xe++){var pt=ye[xe].head;b.replaceRange(Ae.removed[xe]||"",pe(pt,0,-Ae.inserted.length),pt,"+input")}Ve.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||_(b),be.command}function q(){if(P()||z())return!0;X.inputState.keyBuffer.push(E);var re=X.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var he=/^(\d*)(.*)$/.exec(re);if(!he)return _(b),!1;var be=X.visualMode?"visual":"normal",Ae=he[2]||he[1];X.inputState.operatorShortcut&&X.inputState.operatorShortcut.slice(-1)==Ae&&(Ae=X.inputState.operatorShortcut);var ye=Ai.matchCommand(Ae,zn,X.inputState,be);return ye.type=="none"?(_(b),!1):ye.type=="partial"?(ye.expectLiteralNext&&(X.expectLiteralNext=!0),!0):ye.type=="clear"?(_(b),!0):(X.expectLiteralNext=!1,X.inputState.keyBuffer.length=0,he=/^(\d*)(.*)$/.exec(re),he[1]&&he[1]!="0"&&X.inputState.pushRepeatDigit(he[1]),ye.command)}var X=O(b),Z;return X.insertMode?Z=j():Z=q(),Z===!1?!X.insertMode&&E.length===1?function(){return!0}:void 0:Z===!0?function(){return!0}:function(){if(!((Z.operator||Z.isEdit)&&b.getOption("readOnly")))return b.operation(function(){b.curOp.isVimOp=!0;try{Z.type=="keyToKey"?M(b,Z.toKeys,Z):Ai.processCommand(b,X,Z)}catch(re){throw b.state.vim=void 0,O(b),kt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(b,E){Wr.processCommand(b,E)},defineMotion:ee,defineAction:oe,defineOperator:Q,mapCommand:Is,_mapCommand:vo,defineRegister:U,exitVisualMode:bn,exitInsertMode:wr},zr=[],zi=!1,zt,Br={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},rr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},so={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Br)).forEach(function(b){so[(Br[b]||"").toLowerCase()]=so[b.toLowerCase()]=b}),R("langmap",void 0,"string",["lmap"],function(b,E){if(b===void 0)return Bn.string;F(b)}),A.prototype.pushRepeatDigit=function(b){this.operator?this.motionRepeat=this.motionRepeat.concat(b):this.prefixRepeat=this.prefixRepeat.concat(b)},A.prototype.getRepeat=function(){var b=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(b=1,this.prefixRepeat.length>0&&(b*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(b*=parseInt(this.motionRepeat.join(""),10))),b},B.prototype={setText:function(b,E,S){this.keyBuffer=[b||""],this.linewise=!!E,this.blockwise=!!S},pushText:function(b,E){E&&(this.linewise||this.keyBuffer.push(`
1438
- `),this.linewise=!0),this.keyBuffer.push(b)},pushInsertModeChanges:function(b){this.insertModeChanges.push(Un(b))},pushSearchQuery:function(b){this.searchQueries.push(b)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},V.prototype={pushText:function(b,E,S,P,z){if(b!=="_"){P&&S.charAt(S.length-1)!==`
1439
- `&&(S+=`
1440
- `);var j=this.isValidRegister(b)?this.getRegister(b):null;if(!j){switch(E){case"yank":this.registers[0]=new B(S,P,z);break;case"delete":case"change":S.indexOf(`
1441
- `)==-1?this.registers["-"]=new B(S,P):(this.shiftNumericRegisters_(),this.registers[1]=new B(S,P))}this.unnamedRegister.setText(S,P,z);return}var q=c(b);q?j.pushText(S,P):j.setText(S,P,z),b==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(j.toString(),P)}},getRegister:function(b){return this.isValidRegister(b)?(b=b.toLowerCase(),this.registers[b]||(this.registers[b]=new B),this.registers[b]):this.unnamedRegister},isValidRegister:function(b){return b&&(x(b,js)||on.test(b))},shiftNumericRegisters_:function(){for(var b=9;b>=2;b--)this.registers[b]=this.getRegister(""+(b-1))}},K.prototype={nextMatch:function(b,E){var S=this.historyBuffer,P=E?-1:1;this.initialPrefix===null&&(this.initialPrefix=b);for(var z=this.iterator+P;E?z>=0:z<S.length;z+=P)for(var j=S[z],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=z,j;if(z>=S.length)return this.iterator=S.length,this.initialPrefix;if(z<0)return b},pushInput:function(b){var E=this.historyBuffer.indexOf(b);E>-1&&this.historyBuffer.splice(E,1),b.length&&this.historyBuffer.push(b)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ai={matchCommand:function(b,E,S,P){var z=ve(b,E,P,S);if(!z.full&&!z.partial)return{type:"none"};if(!z.full&&z.partial)return{type:"partial",expectLiteralNext:z.partial.length==1&&z.partial[0].keys.slice(-11)=="<character>"};for(var j,q=0;q<z.full.length;q++){var X=z.full[q];j||(j=X)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var Z=Re(b);if(!Z||Z.length>1)return{type:"clear"};S.selectedCharacter=Z}return{type:"full",command:j}},processCommand:function(b,E,S){switch(E.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(b,E,S);break;case"operator":this.processOperator(b,E,S);break;case"operatorMotion":this.processOperatorMotion(b,E,S);break;case"action":this.processAction(b,E,S);break;case"search":this.processSearch(b,E,S);break;case"ex":case"keyToEx":this.processEx(b,E,S);break}},processMotion:function(b,E,S){E.inputState.motion=S.motion,E.inputState.motionArgs=ue(S.motionArgs),this.evalInput(b,E)},processOperator:function(b,E,S){var P=E.inputState;if(P.operator){if(P.operator==S.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(b,E);return}_(b)}P.operator=S.operator,P.operatorArgs=ue(S.operatorArgs),S.keys.length>1&&(P.operatorShortcut=S.keys),S.exitVisualBlock&&(E.visualBlock=!1,Dn(b)),E.visualMode&&this.evalInput(b,E)},processOperatorMotion:function(b,E,S){var P=E.visualMode,z=ue(S.operatorMotionArgs);z&&P&&z.visualLine&&(E.visualLine=!0),this.processOperator(b,E,S),P||this.processMotion(b,E,S)},processAction:function(b,E,S){var P=E.inputState,z=P.getRepeat(),j=!!z,q=ue(S.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),S.operator&&this.processOperator(b,E,S),S.motion&&this.processMotion(b,E,S),(S.motion||S.operator)&&this.evalInput(b,E),q.repeat=z||1,q.repeatIsExplicit=j,q.registerName=P.registerName,_(b),E.lastMotion=null,S.isEdit&&this.recordLastEdit(E,P,S),Vn[S.action](b,q,E)},processSearch:function(b,E,S){function P(Le,Xe,pt){Ve.searchHistoryController.pushInput(Le),Ve.searchHistoryController.reset();try{le(b,Le,Xe,pt)}catch{Ft(b,"Invalid regex: "+Le),_(b);return}Ai.processMotion(b,E,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function z(Le){P(Le,!0,!0);var Xe=Ve.macroModeState;Xe.isRecording&&Ds(Xe,Le)}function j(Le,Xe,pt){var nt=W(Le),st,Rn;nt=="<Up>"||nt=="<Down>"?(st=nt=="<Up>",Rn=Le.target?Le.target.selectionEnd:0,Xe=Ve.searchHistoryController.nextMatch(Xe,st)||"",pt(Xe),Rn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(Rn,Le.target.value.length))):nt&&nt!="<Left>"&&nt!="<Right>"&&Ve.searchHistoryController.reset();var St;try{St=le(b,Xe,!0,!0)}catch{}St?b.scrollIntoView(xt(b,!X,St),30):(Kt(b),b.scrollTo(be.left,be.top))}function q(Le,Xe,pt){var nt=W(Le);nt=="<Esc>"||nt=="<C-c>"||nt=="<C-[>"||nt=="<BS>"&&Xe==""?(Ve.searchHistoryController.pushInput(Xe),Ve.searchHistoryController.reset(),le(b,he),Kt(b),b.scrollTo(be.left,be.top),Be.e_stop(Le),_(b),pt(),b.focus()):nt=="<Up>"||nt=="<Down>"?Be.e_stop(Le):nt=="<C-u>"&&(Be.e_stop(Le),pt(""))}if(b.getSearchCursor){var X=S.searchArgs.forward,Z=S.searchArgs.wholeWordOnly;Fn(b).setReversed(!X);var re=X?"/":"?",he=Fn(b).getQuery(),be=b.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var Ae=Ve.macroModeState;if(Ae.isPlaying){var Oe=Ae.replaySearchQueries.shift();P(Oe,!0,!1)}else dr(b,{onClose:z,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var ye=an(b,{noSymbol:!0}),xe=!0;if(ye||(ye=an(b,{noSymbol:!1}),xe=!1),!ye){Ft(b,"No word under cursor"),_(b);return}var Oe=b.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);xe&&Z?Oe="\\b"+Oe+"\\b":Oe=Mn(Oe),Ve.jumpList.cachedCursor=b.getCursor(),b.setCursor(ye.start),P(Oe,!0,!1)}}},processEx:function(b,E,S){function P(j){Ve.exCommandHistoryController.pushInput(j),Ve.exCommandHistoryController.reset(),Wr.processCommand(b,j),b.state.vim&&_(b)}function z(j,q,X){var Z=W(j),re,he;(Z=="<Esc>"||Z=="<C-c>"||Z=="<C-[>"||Z=="<BS>"&&q=="")&&(Ve.exCommandHistoryController.pushInput(q),Ve.exCommandHistoryController.reset(),Be.e_stop(j),_(b),X(),b.focus()),Z=="<Up>"||Z=="<Down>"?(Be.e_stop(j),re=Z=="<Up>",he=j.target?j.target.selectionEnd:0,q=Ve.exCommandHistoryController.nextMatch(q,re)||"",X(q),he&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(he,j.target.value.length))):Z=="<C-u>"?(Be.e_stop(j),X("")):Z&&Z!="<Left>"&&Z!="<Right>"&&Ve.exCommandHistoryController.reset()}S.type=="keyToEx"?Wr.processCommand(b,S.exArgs.input):E.visualMode?dr(b,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:z,selectValueOnOpen:!1}):dr(b,{onClose:P,prefix:":",onKeyDown:z})},evalInput:function(b,E){var S=E.inputState,P=S.motion,z=S.motionArgs||{},j=S.operator,q=S.operatorArgs||{},X=S.registerName,Z=E.sel,re=Ge(E.visualMode?se(b,Z.head):b.getCursor("head")),he=Ge(E.visualMode?se(b,Z.anchor):b.getCursor("anchor")),be=Ge(re),Ae=Ge(he),ye,xe,Oe;if(j&&this.recordLastEdit(E,S),S.repeatOverride!==void 0?Oe=S.repeatOverride:Oe=S.getRepeat(),Oe>0&&z.explicitRepeat?z.repeatIsExplicit=!0:(z.noRepeat||!z.explicitRepeat&&Oe===0)&&(Oe=1,z.repeatIsExplicit=!1),S.selectedCharacter&&(z.selectedCharacter=q.selectedCharacter=S.selectedCharacter),z.repeat=Oe,_(b),P){var Le=In[P](b,re,z,E,S);if(E.lastMotion=In[P],!Le)return;if(z.toJumplist){!j&&b.ace.curOp!=null&&(b.ace.curOp.command.scrollIntoView="center-animate");var Xe=Ve.jumpList,pt=Xe.cachedCursor;pt?(Zr(b,pt,Le),delete Xe.cachedCursor):Zr(b,re,Le)}Le instanceof Array?(xe=Le[0],ye=Le[1]):ye=Le,ye||(ye=Ge(re)),E.visualMode?((!E.visualBlock||ye.ch!==1/0)&&(ye=se(b,ye,be)),xe&&(xe=se(b,xe)),xe=xe||Ae,Z.anchor=xe,Z.head=ye,Dn(b),ei(b,E,"<",it(xe,ye)?xe:ye),ei(b,E,">",it(xe,ye)?ye:xe)):j||(b.ace.curOp&&(b.ace.curOp.vimDialogScroll="center-animate"),ye=se(b,ye,be),b.setCursor(ye.line,ye.ch))}if(j){if(q.lastSel){xe=Ae;var nt=q.lastSel,st=Math.abs(nt.head.line-nt.anchor.line),Rn=Math.abs(nt.head.ch-nt.anchor.ch);nt.visualLine?ye=new De(Ae.line+st,Ae.ch):nt.visualBlock?ye=new De(Ae.line+st,Ae.ch+Rn):nt.head.line==nt.anchor.line?ye=new De(Ae.line,Ae.ch+Rn):ye=new De(Ae.line+st,Ae.ch),E.visualMode=!0,E.visualLine=nt.visualLine,E.visualBlock=nt.visualBlock,Z=E.sel={anchor:xe,head:ye},Dn(b)}else E.visualMode&&(q.lastSel={anchor:Ge(Z.anchor),head:Ge(Z.head),visualBlock:E.visualBlock,visualLine:E.visualLine});var St,Jt,Lt,$t,ir;if(E.visualMode){St=ut(Z.head,Z.anchor),Jt=Ht(Z.head,Z.anchor),Lt=E.visualLine||q.linewise,$t=E.visualBlock?"block":Lt?"line":"char";var mr=v(b,St,Jt);if(ir=Xn(b,{anchor:mr.start,head:mr.end},$t),Lt){var On=ir.ranges;if($t=="block")for(var G=0;G<On.length;G++)On[G].head.ch=Rt(b,On[G].head.line);else $t=="line"&&(On[0].head=new De(On[0].head.line+1,0))}}else{if(St=Ge(xe||Ae),Jt=Ge(ye||be),it(Jt,St)){var J=St;St=Jt,Jt=J}Lt=z.linewise||q.linewise,Lt?Pn(b,St,Jt):z.forward&&Hn(b,St,Jt),$t="char";var ie=!z.inclusive||Lt,mr=v(b,St,Jt);ir=Xn(b,{anchor:mr.start,head:mr.end},$t,ie)}b.setSelections(ir.ranges,ir.primary),E.lastMotion=null,q.repeat=Oe,q.registerName=X,q.linewise=Lt;var ce=ts[j](b,q,ir.ranges,Ae,ye);E.visualMode&&bn(b,ce!=null),ce&&b.setCursor(ce)}},recordLastEdit:function(b,E,S){var P=Ve.macroModeState;P.isPlaying||(b.lastEditInputState=E,b.lastEditActionCommand=S,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=b.visualBlock?b.sel.head.line-b.sel.anchor.line:0)}},In={moveToTopLine:function(b,E,S){var P=Jn(b).top+S.repeat-1;return new De(P,Xt(b.getLine(P)))},moveToMiddleLine:function(b){var E=Jn(b),S=Math.floor((E.top+E.bottom)*.5);return new De(S,Xt(b.getLine(S)))},moveToBottomLine:function(b,E,S){var P=Jn(b).bottom-S.repeat+1;return new De(P,Xt(b.getLine(P)))},expandToLine:function(b,E,S){var P=E;return new De(P.line+S.repeat-1,1/0)},findNext:function(b,E,S){var P=Fn(b),z=P.getQuery();if(z){var j=!S.forward;return j=P.isReversed()?!j:j,He(b,z),xt(b,j,z,S.repeat)}},findAndSelectNextInclusive:function(b,E,S,P,z){var j=Fn(b),q=j.getQuery();if(q){var X=!S.forward;X=j.isReversed()?!X:X;var Z=wn(b,X,q,S.repeat,P);if(Z){if(z.operator)return Z;var re=Z[0],he=new De(Z[1].line,Z[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,Be.signal(b,"vim-mode-change",{mode:"visual",subMode:""}));var be=P.sel.anchor;if(be)return j.isReversed()?S.forward?[be,re]:[be,he]:S.forward?[be,he]:[be,re]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,Be.signal(b,"vim-mode-change",{mode:"visual",subMode:""});return X?[he,re]:[re,he]}}},goToMark:function(b,E,S,P){var z=fn(b,P,S.selectedCharacter);return z?S.linewise?{line:z.line,ch:Xt(b.getLine(z.line))}:z:null},moveToOtherHighlightedEnd:function(b,E,S,P){if(P.visualBlock&&S.sameLine){var z=P.sel;return[se(b,new De(z.anchor.line,z.head.ch)),se(b,new De(z.head.line,z.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(b,E,S,P){for(var z=E,j=0;j<S.repeat;j++){var q=z;for(var X in P.marks)if(u(X)){var Z=P.marks[X].find(),re=S.forward?it(Z,q):it(q,Z);if(!re&&!(S.linewise&&Z.line==q.line)){var he=at(q,z),be=S.forward?_r(q,Z,z):_r(z,Z,q);(he||be)&&(z=Z)}}}return S.linewise&&(z=new De(z.line,Xt(b.getLine(z.line)))),z},moveByCharacters:function(b,E,S){var P=E,z=S.repeat,j=S.forward?P.ch+z:P.ch-z;return new De(P.line,j)},moveByLines:function(b,E,S,P){var z=E,j=z.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=P.lastHPos;break;default:P.lastHPos=j}var q=S.repeat+(S.repeatOffset||0),X=S.forward?z.line+q:z.line-q,Z=b.firstLine(),re=b.lastLine();if(X<Z&&z.line==Z)return this.moveToStartOfLine(b,E,S,P);if(X>re&&z.line==re)return no(b,E,S,P,!0);var he=b.ace.session.getFoldLine(X);return he&&(S.forward?X>he.start.row&&(X=he.end.row+1):X=he.start.row),S.toFirstChar&&(j=Xt(b.getLine(X)),P.lastHPos=j),P.lastHSPos=b.charCoords(new De(X,j),"div").left,new De(X,j)},moveByDisplayLines:function(b,E,S,P){var z=E;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=b.charCoords(z,"div").left}var j=S.repeat,Z=b.findPosV(z,S.forward?j:-j,"line",P.lastHSPos);if(Z.hitSide)if(S.forward)var q=b.charCoords(Z,"div"),X={top:q.top+8,left:P.lastHSPos},Z=b.coordsChar(X,"div");else{var re=b.charCoords(new De(b.firstLine(),0),"div");re.left=P.lastHSPos,Z=b.coordsChar(re,"div")}return P.lastHPos=Z.ch,Z},moveByPage:function(b,E,S){var P=E,z=S.repeat;return b.findPosV(P,S.forward?z:-z,"page")},moveByParagraph:function(b,E,S){var P=S.forward?1:-1;return ki(b,E,S.repeat,P)},moveBySentence:function(b,E,S){var P=S.forward?1:-1;return ui(b,E,S.repeat,P)},moveByScroll:function(b,E,S,P){var z=b.getScrollInfo(),j=null,q=S.repeat;q||(q=z.clientHeight/(2*b.defaultTextHeight()));var X=b.charCoords(E,"local");if(S.repeat=q,j=In.moveByDisplayLines(b,E,S,P),!j)return null;var Z=b.charCoords(j,"local");return b.scrollTo(null,z.top+Z.top-X.top),j},moveByWords:function(b,E,S){return nr(b,E,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(b,E,S){var P=S.repeat,z=Qr(b,P,S.forward,S.selectedCharacter,E),j=S.forward?-1:1;return Ar(j,S),z?(z.ch+=j,z):null},moveToCharacter:function(b,E,S){var P=S.repeat;return Ar(0,S),Qr(b,P,S.forward,S.selectedCharacter,E)||E},moveToSymbol:function(b,E,S){var P=S.repeat;return Ci(b,P,S.forward,S.selectedCharacter)||E},moveToColumn:function(b,E,S,P){var z=S.repeat;return P.lastHPos=z-1,P.lastHSPos=b.charCoords(E,"div").left,Ls(b,z)},moveToEol:function(b,E,S,P){return no(b,E,S,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(b,E){var S=E;return new De(S.line,Xt(b.getLine(S.line)))},moveToMatchedSymbol:function(b,E){for(var S=E,P=S.line,z=S.ch,j=b.getLine(P),q;z<j.length;z++)if(q=j.charAt(z),q&&g(q)){var X=b.getTokenTypeAt(new De(P,z+1));if(X!=="string"&&X!=="comment")break}if(z<j.length){var Z=/[<>]/.test(j[z])?/[(){}[\]<>]/:/[(){}[\]]/,re=b.findMatchingBracket(new De(P,z+1),{bracketRegex:Z});return re.to}return S},moveToStartOfLine:function(b,E){return new De(E.line,0)},moveToLineOrEdgeOfDocument:function(b,E,S){var P=S.forward?b.lastLine():b.firstLine();return S.repeatIsExplicit&&(P=S.repeat-b.getOption("firstLineNumber")),new De(P,Xt(b.getLine(P)))},moveToStartOfDisplayLine:function(b){return b.execCommand("goLineLeft"),b.getCursor()},moveToEndOfDisplayLine:function(b){b.execCommand("goLineRight");var E=b.getCursor();return E.sticky=="before"&&E.ch--,E},textObjectManipulation:function(b,E,S,P){var z={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=S.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var X=!S.textObjectInner,Z,re;if(z[q]){if(re=!0,Z=En(b,E,q,X),!Z){var he=b.getSearchCursor(new RegExp("\\"+q,"g"),E);he.find()&&(Z=En(b,he.from(),q,X))}}else if(j[q])re=!0,Z=Sr(b,E,q,X);else if(q==="W"||q==="w")for(var be=S.repeat||1;be-- >0;){var Ae=an(b,{inclusive:X,innerWord:!X,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Z&&Z.end);Ae&&(Z||(Z=Ae),Z.end=Ae.end)}else if(q==="p")if(Z=ki(b,E,S.repeat,0,X),S.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var ye=P.inputState.operatorArgs;ye&&(ye.linewise=!0),Z.end.line--}else if(q==="t")Z=Dr(b,E,X);else if(q==="s"){var xe=b.getLine(E.line);E.ch>0&&w(xe[E.ch])&&(E.ch-=1);var Oe=Ro(b,E,S.repeat,1,X),Le=Ro(b,E,S.repeat,-1,X);m(b.getLine(Le.line)[Le.ch])&&m(b.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Z={start:Le,end:Oe}}return Z?b.state.vim.visualMode?en(b,Z.start,Z.end,re):[Z.start,Z.end]:null},repeatLastCharacterSearch:function(b,E,S){var P=Ve.lastCharacterSearch,z=S.repeat,j=S.forward===P.forward,q=(P.increment?1:0)*(j?-1:1);b.moveH(-q,"char"),S.inclusive=!!j;var X=Qr(b,z,j,P.selectedCharacter);return X?(X.ch+=q,X):(b.moveH(q,"char"),E)}},ts={change:function(b,E,S){var P,z,j=b.state.vim,q=S[0].anchor,X=S[0].head;if(j.visualMode)if(E.fullLine)X.ch=Number.MAX_VALUE,X.line--,b.setSelection(q,X),z=b.getSelection(),b.replaceSelection(""),P=q;else{z=b.getSelection();var Z=ae("",S.length);b.replaceSelections(Z),P=ut(S[0].head,S[0].anchor)}else{z=b.getRange(q,X);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(z)){var he=/\s+$/.exec(z);he&&re.motionArgs&&re.motionArgs.forward&&(X=pe(X,0,-he[0].length),z=z.slice(0,-he[0].length))}E.linewise&&(q=new De(q.line,Xt(b.getLine(q.line))),X.line>q.line&&(X=new De(X.line-1,Number.MAX_VALUE))),b.replaceRange("",q,X),P=q}Ve.registerController.pushText(E.registerName,"change",z,E.linewise,S.length>1),Vn.enterInsertMode(b,{head:P},b.state.vim)},delete:function(b,E,S){var P,z,j=b.state.vim;if(j.visualBlock){z=b.getSelection();var q=ae("",S.length);b.replaceSelections(q),P=ut(S[0].head,S[0].anchor)}else{var X=S[0].anchor,Z=S[0].head;E.linewise&&Z.line!=b.firstLine()&&X.line==b.lastLine()&&X.line==Z.line-1&&(X.line==b.firstLine()?X.ch=0:X=new De(X.line-1,Rt(b,X.line-1))),z=b.getRange(X,Z),b.replaceRange("",X,Z),P=X,E.linewise&&(P=In.moveToFirstNonWhiteSpaceCharacter(b,X))}return Ve.registerController.pushText(E.registerName,"delete",z,E.linewise,j.visualBlock),se(b,P)},indent:function(b,E,S){var P=b.state.vim,z=P.visualMode?E.repeat:1;if(P.visualBlock){for(var j=b.getOption("tabSize"),q=b.getOption("indentWithTabs")?" ":" ".repeat(j),X,Z=S.length-1;Z>=0;Z--)if(X=ut(S[Z].anchor,S[Z].head),E.indentRight)b.replaceRange(q.repeat(z),X,X);else{for(var re=b.getLine(X.line),he=0,be=0;be<z;be++){var Ae=re[X.ch+he];if(Ae==" ")he++;else{if(Ae!=" ")break;he++;for(var ye=1;ye<q.length&&(Ae=re[X.ch+he],Ae===" ");ye++)he++}}b.replaceRange("",X,pe(X,0,he))}return X}if(b.indentMore)for(var be=0;be<z;be++)E.indentRight?b.indentMore():b.indentLess();else{var xe=S[0].anchor.line,Oe=P.visualBlock?S[S.length-1].anchor.line:S[0].head.line;E.linewise&&Oe--;for(var Z=xe;Z<=Oe;Z++)for(var be=0;be<z;be++)b.indentLine(Z,E.indentRight)}return In.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},indentAuto:function(b,E,S){return b.execCommand("indentAuto"),In.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},hardWrap:function(b,E,S,P,z){if(b.hardWrap){var j=S[0].anchor.line,q=S[0].head.line;E.linewise&&q--;var X=b.hardWrap({from:j,to:q});return X>j&&E.linewise&&X--,E.keepCursor?P:new De(X,0)}},changeCase:function(b,E,S,P,z){for(var j=b.getSelections(),q=[],X=E.toLower,Z=0;Z<j.length;Z++){var re=j[Z],he="";if(X===!0)he=re.toLowerCase();else if(X===!1)he=re.toUpperCase();else for(var be=0;be<re.length;be++){var Ae=re.charAt(be);he+=c(Ae)?Ae.toLowerCase():Ae.toUpperCase()}q.push(he)}return b.replaceSelections(q),E.shouldMoveCursor?z:!b.state.vim.visualMode&&E.linewise&&S[0].anchor.line+1==S[0].head.line?In.moveToFirstNonWhiteSpaceCharacter(b,P):E.linewise?P:ut(S[0].anchor,S[0].head)},yank:function(b,E,S,P){var z=b.state.vim,j=b.getSelection(),q=z.visualMode?ut(z.sel.anchor,z.sel.head,S[0].head,S[0].anchor):P;return Ve.registerController.pushText(E.registerName,"yank",j,E.linewise,z.visualBlock),q}},Vn={jumpListWalk:function(b,E,S){if(!S.visualMode){var P=E.repeat,z=E.forward,j=Ve.jumpList,q=j.move(b,z?P:-P),X=q?q.find():void 0;X=X||b.getCursor(),b.setCursor(X),b.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(b,E,S){if(!S.visualMode){var P=E.repeat||1,z=b.defaultTextHeight(),j=b.getScrollInfo().top,q=z*P,X=E.forward?j+q:j-q,Z=Ge(b.getCursor()),re=b.charCoords(Z,"local");if(E.forward)X>re.top?(Z.line+=(X-re.top)/z,Z.line=Math.ceil(Z.line),b.setCursor(Z),re=b.charCoords(Z,"local"),b.scrollTo(null,re.top)):b.scrollTo(null,X);else{var he=X+b.getScrollInfo().clientHeight;he<re.bottom?(Z.line-=(re.bottom-he)/z,Z.line=Math.floor(Z.line),b.setCursor(Z),re=b.charCoords(Z,"local"),b.scrollTo(null,re.bottom-b.getScrollInfo().clientHeight)):b.scrollTo(null,X)}}},scrollToCursor:function(b,E){var S=b.getCursor().line,P=b.charCoords(new De(S,0),"local"),z=b.getScrollInfo().clientHeight,j=P.top;switch(E.position){case"center":j=P.bottom-z/2;break;case"bottom":var q=new De(S,b.getLine(S).length-1),X=b.charCoords(q,"local"),Z=X.bottom-j;j=j-z+Z}b.scrollTo(null,j)},replayMacro:function(b,E,S){var P=E.selectedCharacter,z=E.repeat,j=Ve.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;z--;)Os(b,S,j,P)},enterMacroRecordMode:function(b,E){var S=Ve.macroModeState,P=E.selectedCharacter;Ve.registerController.isValidRegister(P)&&S.enterMacroRecordMode(b,P)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Be.signal(b,"vim-mode-change",{mode:"insert"})):(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Be.signal(b,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(b,E,S){if(!b.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=E&&E.repeat||1;var P=E?E.insertAt:null,z=S.sel,j=E.head||b.getCursor("head"),q=b.listSelections().length;if(P=="eol")j=new De(j.line,Rt(b,j.line));else if(P=="bol")j=new De(j.line,0);else if(P=="charAfter"){var X=v(b,j,pe(j,0,1));j=X.end}else if(P=="firstNonBlank"){var X=v(b,j,In.moveToFirstNonWhiteSpaceCharacter(b,j));j=X.end}else if(P=="startOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(j=new De(Math.min(z.head.line,z.anchor.line),Math.min(z.head.ch,z.anchor.ch)),q=Math.abs(z.head.line-z.anchor.line)+1):z.head.line<z.anchor.line?j=z.head:j=new De(z.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(j=new De(Math.min(z.head.line,z.anchor.line),Math.max(z.head.ch,z.anchor.ch)+1),q=Math.abs(z.head.line-z.anchor.line)+1):z.head.line>=z.anchor.line?j=pe(z.head,0,1):j=new De(z.anchor.line,0)}else if(P=="inplace"){if(S.visualMode)return}else P=="lastEdit"&&(j=br(b)||j);b.setOption("disableInput",!1),E&&E.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Be.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Be.signal(b,"vim-mode-change",{mode:"insert"})),Ve.macroModeState.isPlaying||(b.on("change",Yo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=b.setBookmark(j,{insertLeft:!0}),Be.on(b.getInputField(),"keydown",Lo)),S.visualMode&&bn(b),ur(b,j,q)}},toggleVisualMode:function(b,E,S){var P=E.repeat,z=b.getCursor(),j;if(S.visualMode)S.visualLine^E.linewise||S.visualBlock^E.blockwise?(S.visualLine=!!E.linewise,S.visualBlock=!!E.blockwise,Be.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Dn(b)):bn(b);else{S.visualMode=!0,S.visualLine=!!E.linewise,S.visualBlock=!!E.blockwise,j=se(b,new De(z.line,z.ch+P-1));var q=v(b,z,j);S.sel={anchor:q.start,head:q.end},Be.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Dn(b),ei(b,S,"<",ut(z,j)),ei(b,S,">",Ht(z,j))}},reselectLastSelection:function(b,E,S){var P=S.lastSelection;if(S.visualMode&&Tt(b,S),P){var z=P.anchorMark.find(),j=P.headMark.find();if(!z||!j)return;S.sel={anchor:z,head:j},S.visualMode=!0,S.visualLine=P.visualLine,S.visualBlock=P.visualBlock,Dn(b),ei(b,S,"<",ut(z,j)),ei(b,S,">",Ht(z,j)),Be.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(b,E,S){var P,z;if(S.visualMode){if(P=b.getCursor("anchor"),z=b.getCursor("head"),it(z,P)){var j=z;z=P,P=j}z.ch=Rt(b,z.line)-1}else{var q=Math.max(E.repeat,2);P=b.getCursor(),z=se(b,new De(P.line+q-1,1/0))}for(var X=0,Z=P.line;Z<z.line;Z++){X=Rt(b,P.line);var re="",he=0;if(!E.keepSpaces){var be=b.getLine(P.line+1);he=be.search(/\S/),he==-1?he=be.length:re=" "}b.replaceRange(re,new De(P.line,X),new De(P.line+1,he))}var Ae=se(b,new De(P.line,X));S.visualMode&&bn(b,!1),b.setCursor(Ae)},newLineAndEnterInsertMode:function(b,E,S){S.insertMode=!0;var P=Ge(b.getCursor());if(P.line===b.firstLine()&&!E.after)b.replaceRange(`
1442
- `,new De(b.firstLine(),0)),b.setCursor(b.firstLine(),0);else{P.line=E.after?P.line:P.line-1,P.ch=Rt(b,P.line),b.setCursor(P);var z=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;z(b)}this.enterInsertMode(b,{repeat:E.repeat},S)},paste:function(b,E,S){var P=this,z=Ve.registerController.getRegister(E.registerName),j=function(){var q=z.toString();P.continuePaste(b,E,S,q,z)};E.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(b,E,S,q,z)},function(){j()}):j()},continuePaste:function(b,E,S,P,z){var j=Ge(b.getCursor());if(P){if(E.matchIndent){var q=b.getOption("tabSize"),X=function(On){var G=On.split(" ").length-1,J=On.split(" ").length-1;return G*q+J*1},Z=b.getLine(b.getCursor().line),re=X(Z.match(/^\s*/)[0]),he=P.replace(/\n$/,""),be=P!==he,Ae=X(P.match(/^\s*/)[0]),P=he.replace(/^\s*/gm,function(On){var G=re+(X(On)-Ae);if(G<0)return"";if(b.getOption("indentWithTabs")){var J=Math.floor(G/q);return Array(J+1).join(" ")}return Array(G+1).join(" ")});P+=be?`
1443
- `:""}if(E.repeat>1)var P=Array(E.repeat+1).join(P);var ye=z.linewise,xe=z.blockwise;if(xe){P=P.split(`
1444
- `),ye&&P.pop();for(var Oe=0;Oe<P.length;Oe++)P[Oe]=P[Oe]==""?" ":P[Oe];j.ch+=E.after?1:0,j.ch=Math.min(Rt(b,j.line),j.ch)}else ye?S.visualMode?P=S.visualLine?P.slice(0,-1):`
1445
- `+P.slice(0,P.length-1)+`
1446
- `:E.after?(P=`
1447
- `+P.slice(0,P.length-1),j.ch=Rt(b,j.line)):j.ch=0:j.ch+=E.after?1:0;var Le;if(S.visualMode){S.lastPastedText=P;var Xe,pt=Je(b,S),nt=pt[0],st=pt[1],Rn=b.getSelection(),St=b.listSelections(),Jt=new Array(St.length).join("1").split("1");S.lastSelection&&(Xe=S.lastSelection.headMark.find()),Ve.registerController.unnamedRegister.setText(Rn),xe?(b.replaceSelections(Jt),st=new De(nt.line+P.length-1,nt.ch),b.setCursor(nt),yn(b,st),b.replaceSelections(P),Le=nt):S.visualBlock?(b.replaceSelections(Jt),b.setCursor(nt),b.replaceRange(P,nt,nt),Le=nt):(b.replaceRange(P,nt,st),Le=b.posFromIndex(b.indexFromPos(nt)+P.length-1)),Xe&&(S.lastSelection.headMark=b.setBookmark(Xe)),ye&&(Le.ch=0)}else if(xe){b.setCursor(j);for(var Oe=0;Oe<P.length;Oe++){var Lt=j.line+Oe;Lt>b.lastLine()&&b.replaceRange(`
1448
- `,new De(Lt,0));var $t=Rt(b,Lt);$t<j.ch&&kr(b,Lt,j.ch)}b.setCursor(j),yn(b,new De(j.line+P.length-1,j.ch)),b.replaceSelections(P),Le=j}else if(b.replaceRange(P,j),ye){var Lt=E.after?j.line+1:j.line;Le=new De(Lt,Xt(b.getLine(Lt)))}else Le=Ge(j),/\n/.test(P)||(Le.ch+=P.length-(E.after?1:0));S.visualMode&&bn(b,!1),b.setCursor(Le)}},undo:function(b,E){b.operation(function(){Ye(b,Be.commands.undo,E.repeat)(),b.setCursor(se(b,b.getCursor("start")))})},redo:function(b,E){Ye(b,Be.commands.redo,E.repeat)()},setRegister:function(b,E,S){S.inputState.registerName=E.selectedCharacter},insertRegister:function(b,E,S){var P=E.selectedCharacter,z=Ve.registerController.getRegister(P),j=z&&z.toString();j&&b.replaceSelection(j)},oneNormalCommand:function(b,E,S){wr(b,!0),S.insertModeReturn=!0,Be.on(b,"vim-command-done",function P(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||Vn.enterInsertMode(b,{},S)),Be.off(b,"vim-command-done",P))})},setMark:function(b,E,S){var P=E.selectedCharacter;ei(b,S,P,b.getCursor())},replace:function(b,E,S){var P=E.selectedCharacter,z=b.getCursor(),j,q,X=b.listSelections();if(S.visualMode)z=b.getCursor("start"),q=b.getCursor("end");else{var Z=b.getLine(z.line);j=z.ch+E.repeat,j>Z.length&&(j=Z.length),q=new De(z.line,j)}var re=v(b,z,q);if(z=re.start,q=re.end,P==`
1449
- `)S.visualMode||b.replaceRange("",z,q),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(b);else{var he=b.getRange(z,q);if(he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),he=he.replace(/[^\n]/g,P),S.visualBlock){var be=new Array(b.getOption("tabSize")+1).join(" ");he=b.getSelection(),he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),he=he.replace(/\t/g,be).replace(/[^\n]/g,P).split(`
1450
- `),b.replaceSelections(he)}else b.replaceRange(he,z,q);S.visualMode?(z=it(X[0].anchor,X[0].head)?X[0].anchor:X[0].head,b.setCursor(z),bn(b,!1)):b.setCursor(pe(q,0,-1))}},incrementNumberToken:function(b,E){for(var S=b.getCursor(),P=b.getLine(S.line),z=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,X,Z;(j=z.exec(P))!==null&&(q=j.index,X=q+j[0].length,!(S.ch<X)););if(!(!E.backtrack&&X<=S.ch)&&j){var re=j[2]||j[4],he=j[3]||j[5],be=E.increase?1:-1,Ae={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ye=parseInt(j[1]+he,Ae)+be*E.repeat;Z=ye.toString(Ae);var xe=re?new Array(he.length-Z.length+1+j[1].length).join("0"):"";Z.charAt(0)==="-"?Z="-"+re+xe+Z.substr(1):Z=re+xe+Z;var Oe=new De(S.line,q),Le=new De(S.line,X);b.replaceRange(Z,Oe,Le),b.setCursor(new De(S.line,q+Z.length-1))}},repeatLastEdit:function(b,E,S){var P=S.lastEditInputState;if(P){var z=E.repeat;z&&E.repeatIsExplicit?S.lastEditInputState.repeatOverride=z:z=S.lastEditInputState.repeatOverride||z,Fs(b,S,z,!1)}},indent:function(b,E){b.indentLine(b.getCursor().line,E.indentRight)},exitInsertMode:wr},Si={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},$i={bracket:{isComplete:function(b){if(b.nextCh===b.symb){if(b.depth++,b.depth>=1)return!0}else b.nextCh===b.reverseSymb&&b.depth--;return!1}},section:{init:function(b){b.curMoveThrough=!0,b.symb=(b.forward?"]":"[")===b.symb?"{":"}"},isComplete:function(b){return b.index===0&&b.nextCh===b.symb}},comment:{isComplete:function(b){var E=b.lastCh==="*"&&b.nextCh==="/";return b.lastCh=b.nextCh,E}},method:{init:function(b){b.symb=b.symb==="m"?"{":"}",b.reverseSymb=b.symb==="{"?"}":"{"},isComplete:function(b){return b.nextCh===b.symb}},preprocess:{init:function(b){b.index=0},isComplete:function(b){if(b.nextCh==="#"){var E=b.lineText.match(/^#(\w+)/)[1];if(E==="endif"){if(b.forward&&b.depth===0)return!0;b.depth++}else if(E==="if"){if(!b.forward&&b.depth===0)return!0;b.depth--}if(E==="else"&&b.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),Pr.prototype={getQuery:function(){return Ve.query},setQuery:function(b){Ve.query=b},getOverlay:function(){return this.searchOverlay},setOverlay:function(b){this.searchOverlay=b},isReversed:function(){return Ve.isReversed},setReversed:function(b){Ve.isReversed=b},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(b){this.annotate=b}};var Bi={"\\n":`
1451
- `,"\\r":"\r","\\t":" "},Hs={"\\/":"/","\\\\":"\\","\\n":`
1452
- `,"\\r":"\r","\\t":" ","\\&":"&"},ln=0,Ia=function(){this.buildCommandMap_()};Ia.prototype={processCommand:function(b,E,S){var P=this;b.operation(function(){b.curOp.isVimOp=!0,P._processCommand(b,E,S)})},_processCommand:function(b,E,S){var P=b.state.vim,z=Ve.registerController.getRegister(":"),j=z.toString(),q=new Be.StringStream(E);z.setText(E);var X=S||{};X.input=E;try{this.parseInput_(b,q,X)}catch(he){throw Ft(b,he.toString()),he}P.visualMode&&bn(b);var Z,re;if(!X.commandName)X.line!==void 0&&(re="move");else if(Z=this.matchCommand_(X.commandName),Z){if(re=Z.name,Z.excludeFromCommandHistory&&z.setText(j),this.parseCommandArgs_(q,X,Z),Z.type=="exToKey"){M(b,Z.toKeys,Z);return}if(Z.type=="exToEx"){this.processCommand(b,Z.toInput);return}}if(!re){Ft(b,'Not an editor command ":'+E+'"');return}try{gr[re](b,X),(!Z||!Z.possiblyAsync)&&X.callback&&X.callback()}catch(he){throw Ft(b,he.toString()),he}},parseInput_:function(b,E,S){if(E.eatWhile(":"),E.eat("%")?(S.line=b.firstLine(),S.lineEnd=b.lastLine()):(S.line=this.parseLineSpec_(b,E),S.line!==void 0&&E.eat(",")&&(S.lineEnd=this.parseLineSpec_(b,E))),S.line==null)if(b.state.vim.visualMode){var P=fn(b,b.state.vim,"<");S.selectionLine=P&&P.line,P=fn(b,b.state.vim,">"),S.selectionLineEnd=P&&P.line}else S.selectionLine=b.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var z=E.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return z?S.commandName=z[1]:S.commandName=E.match(/.*/)[0],S},parseLineSpec_:function(b,E){var S=E.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(E.next()){case".":return this.parseLineSpecOffset_(E,b.getCursor().line);case"$":return this.parseLineSpecOffset_(E,b.lastLine());case"'":var P=E.next(),z=fn(b,b.state.vim,P);if(!z)throw new Error("Mark not set");return this.parseLineSpecOffset_(E,z.line);case"-":case"+":return E.backUp(1),this.parseLineSpecOffset_(E,b.getCursor().line);default:return E.backUp(1),void 0}},parseLineSpecOffset_:function(b,E){var S=b.match(/^([+-])?(\d+)/);if(S){var P=parseInt(S[2],10);S[1]=="-"?E-=P:E+=P}return E},parseCommandArgs_:function(b,E,S){if(!b.eol()){E.argString=b.match(/.*/)[0];var P=S.argDelimiter||/\s+/,z=cr(E.argString).split(P);z.length&&z[0]&&(E.args=z)}},matchCommand_:function(b){for(var E=b.length;E>0;E--){var S=b.substring(0,E);if(this.commandMap_[S]){var P=this.commandMap_[S];if(P.name.indexOf(b)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var b=0;b<oo.length;b++){var E=oo[b],S=E.shortName||E.name;this.commandMap_[S]=E}},map:function(b,E,S,P){if(b!=":"&&b.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var z=b.substring(1);E!=":"&&E.charAt(0)==":"?this.commandMap_[z]={name:z,type:"exToEx",toInput:E.substring(1),user:!0}:this.commandMap_[z]={name:z,type:"exToKey",toKeys:E,user:!0}}else{var j={keys:b,type:"keyToKey",toKeys:E,noremap:!!P};S&&(j.context=S),zn.unshift(j)}},unmap:function(b,E){if(b!=":"&&b.charAt(0)==":"){if(E)throw Error("Mode not supported for ex mappings");var S=b.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var P=b,z=0;z<zn.length;z++)if(P==zn[z].keys&&zn[z].context===E)return zn.splice(z,1),!0}};var gr={colorscheme:function(b,E){if(!E.args||E.args.length<1){Ft(b,b.getOption("theme"));return}b.setOption("theme",E.args[0])},map:function(b,E,S,P){var z=E.args;if(!z||z.length<2){b&&Ft(b,"Invalid mapping: "+E.input);return}Wr.map(z[0],z[1],S,P)},imap:function(b,E){this.map(b,E,"insert")},nmap:function(b,E){this.map(b,E,"normal")},vmap:function(b,E){this.map(b,E,"visual")},omap:function(b,E){this.map(b,E,"operatorPending")},noremap:function(b,E){this.map(b,E,void 0,!0)},inoremap:function(b,E){this.map(b,E,"insert",!0)},nnoremap:function(b,E){this.map(b,E,"normal",!0)},vnoremap:function(b,E){this.map(b,E,"visual",!0)},onoremap:function(b,E){this.map(b,E,"operatorPending",!0)},unmap:function(b,E,S){var P=E.args;(!P||P.length<1||!Wr.unmap(P[0],S))&&b&&Ft(b,"No such mapping: "+E.input)},mapclear:function(b,E){kt.mapclear()},imapclear:function(b,E){kt.mapclear("insert")},nmapclear:function(b,E){kt.mapclear("normal")},vmapclear:function(b,E){kt.mapclear("visual")},omapclear:function(b,E){kt.mapclear("operatorPending")},move:function(b,E){Ai.processCommand(b,b.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:E.line+1})},set:function(b,E){var S=E.args,P=E.setCfg||{};if(!S||S.length<1){b&&Ft(b,"Invalid mapping: "+E.input);return}var z=S[0].split("="),j=z[0],q=z[1],X=!1,Z=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+E.argString);j=j.substring(0,j.length-1),X=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),Z=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Gt[j]&&Gt[j].type=="boolean";if(re&&(Z?q=!k(j,b,P):q==null&&(q=!0)),!re&&q===void 0||X){var he=k(j,b,P);he instanceof Error?Ft(b,he.message):he===!0||he===!1?Ft(b," "+(he?"":"no")+j):Ft(b," "+j+"="+he)}else{var be=$(j,q,b,P);be instanceof Error&&Ft(b,be.message)}},setlocal:function(b,E){E.setCfg={scope:"local"},this.set(b,E)},setglobal:function(b,E){E.setCfg={scope:"global"},this.set(b,E)},registers:function(b,E){var S=E.args,P=Ve.registerController.registers,z=`----------Registers----------
1453
-
1454
- `;if(S){var j;S=S.join("");for(var q=0;q<S.length;q++)if(j=S.charAt(q),!!Ve.registerController.isValidRegister(j)){var X=P[j]||new B;z+='"'+j+" "+X.toString()+`
1455
- `}}else for(var j in P){var Z=P[j].toString();Z.length&&(z+='"'+j+" "+Z+`
1456
- `)}Ft(b,z)},sort:function(b,E){function S(){if(E.argString){var Lt=new Be.StringStream(E.argString);if(Lt.eat("!")&&(j=!0),Lt.eol())return;if(!Lt.eatSpace())return"Invalid arguments";var $t=Lt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!Lt.eol())return"Invalid arguments";if($t[1]){q=$t[1].indexOf("i")!=-1,X=$t[1].indexOf("u")!=-1;var ir=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,mr=$t[1].indexOf("x")!=-1&&1,On=$t[1].indexOf("o")!=-1&&1;if(ir+mr+On>1)return"Invalid arguments";Z=ir&&"decimal"||mr&&"hex"||On&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),q?"i":""))}}function P(Lt,$t){if(j){var ir;ir=Lt,Lt=$t,$t=ir}q&&(Lt=Lt.toLowerCase(),$t=$t.toLowerCase());var mr=Z&&Le.exec(Lt),On=Z&&Le.exec($t);return mr?(mr=parseInt((mr[1]+mr[2]).toLowerCase(),Xe),On=parseInt((On[1]+On[2]).toLowerCase(),Xe),mr-On):Lt<$t?-1:1}function z(Lt,$t){if(j){var ir;ir=Lt,Lt=$t,$t=ir}return q&&(Lt[0]=Lt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),Lt[0]<$t[0]?-1:1}var j,q,X,Z,re,he=S();if(he){Ft(b,he+": "+E.argString);return}var be=E.line||b.firstLine(),Ae=E.lineEnd||E.line||b.lastLine();if(be!=Ae){var ye=new De(be,0),xe=new De(Ae,Rt(b,Ae)),Oe=b.getRange(ye,xe).split(`
1457
- `),Le=re||(Z=="decimal"?/(-?)([\d]+)/:Z=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Z=="octal"?/([0-7]+)/:null),Xe=Z=="decimal"?10:Z=="hex"?16:Z=="octal"?8:null,pt=[],nt=[];if(Z||re)for(var st=0;st<Oe.length;st++){var Rn=re?Oe[st].match(re):null;Rn&&Rn[0]!=""?pt.push(Rn):!re&&Le.exec(Oe[st])?pt.push(Oe[st]):nt.push(Oe[st])}else nt=Oe;if(pt.sort(re?z:P),re)for(var st=0;st<pt.length;st++)pt[st]=pt[st].input;else Z||nt.sort(P);if(Oe=j?pt.concat(nt):nt.concat(pt),X){var St=Oe,Jt;Oe=[];for(var st=0;st<St.length;st++)St[st]!=Jt&&Oe.push(St[st]),Jt=St[st]}b.replaceRange(Oe.join(`
1458
- `),ye,xe)}},vglobal:function(b,E){this.global(b,E)},normal:function(b,E){var S=E.argString;if(S&&S[0]=="!"&&(S=S.slice(1),zi=!0),S=S.trimStart(),!S){Ft(b,"Argument is required.");return}var P=E.line;if(typeof P=="number")for(var z=isNaN(E.lineEnd)?P:E.lineEnd,j=P;j<=z;j++)b.setCursor(j,0),M(b,E.argString.trimStart()),b.state.vim.insertMode&&wr(b,!0);else M(b,E.argString.trimStart()),b.state.vim.insertMode&&wr(b,!0)},global:function(b,E){var S=E.argString;if(!S){Ft(b,"Regular Expression missing from global");return}var P=E.commandName[0]==="v";S[0]==="!"&&E.commandName[0]==="g"&&(P=!0,S=S.slice(1));var z=E.line!==void 0?E.line:b.firstLine(),j=E.lineEnd||E.line||b.lastLine(),q=_n(S),X=S,Z;if(q.length&&(X=q[0],Z=q.slice(1,q.length).join("/")),X)try{le(b,X,!0,!0)}catch{Ft(b,"Invalid regex: "+X);return}for(var re=Fn(b).getQuery(),he=[],be=z;be<=j;be++){var Ae=b.getLine(be),ye=re.test(Ae);ye!==P&&he.push(Z?b.getLineHandle(be):Ae)}if(!Z){Ft(b,he.join(`
1459
- `));return}var xe=0,Oe=function(){if(xe<he.length){var Le=he[xe++],Xe=b.getLineNumber(Le);if(Xe==null){Oe();return}var pt=Xe+1+Z;Wr.processCommand(b,pt,{callback:Oe})}else b.releaseLineHandles&&b.releaseLineHandles()};Oe()},substitute:function(b,E){if(!b.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=E.argString,P=S?hi(S,S[0]):[],z,j="",q,X,Z,re=!1,he=!1;if(P.length)z=P[0],k("pcre")&&z!==""&&(z=new RegExp(z).source),j=P[1],j!==void 0&&(k("pcre")?j=Fr(j.replace(/([^\\])&/g,"$1$$&")):j=To(j),Ve.lastSubstituteReplacePart=j),q=P[2]?P[2].split(" "):[];else if(S&&S.length){Ft(b,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(X=q[0],Z=parseInt(q[1]),X&&(X.indexOf("c")!=-1&&(re=!0),X.indexOf("g")!=-1&&(he=!0),k("pcre")?z=z+"/"+X:z=z.replace(/\//g,"\\/")+"/"+X)),z)try{le(b,z,!0,!0)}catch{Ft(b,"Invalid regex: "+z);return}if(j=j||Ve.lastSubstituteReplacePart,j===void 0){Ft(b,"No previous substitute regular expression");return}var be=Fn(b),Ae=be.getQuery(),ye=E.line!==void 0?E.line:b.getCursor().line,xe=E.lineEnd||ye;ye==b.firstLine()&&xe==b.lastLine()&&(xe=1/0),Z&&(ye=xe,xe=ye+Z-1);var Oe=se(b,new De(ye,0)),Le=b.getSearchCursor(Ae,Oe);xn(b,re,he,ye,xe,Le,Ae,j,E.callback)},startinsert:function(b,E){M(b,E.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(b){Be.commands.save?Be.commands.save(b):b.save&&b.save()},nohlsearch:function(b){Kt(b)},yank:function(b){var E=Ge(b.getCursor()),S=E.line,P=b.getLine(S);Ve.registerController.pushText("0","yank",P,!0,!0)},delete:function(b,E){var S=E.selectionLine,P=isNaN(E.selectionLineEnd)?S:E.selectionLineEnd;ts.delete(b,{linewise:!0},[{anchor:new De(S,0),head:new De(P+1,0)}])},join:function(b,E){var S=E.selectionLine,P=isNaN(E.selectionLineEnd)?S:E.selectionLineEnd;b.setCursor(new De(S,0)),Vn.joinLines(b,{repeat:P-S},b.state.vim)},delmarks:function(b,E){if(!E.argString||!cr(E.argString)){Ft(b,"Argument required");return}for(var S=b.state.vim,P=new Be.StringStream(cr(E.argString));!P.eol();){P.eatSpace();var z=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Ft(b,"Invalid argument: "+E.argString.substring(z));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Ft(b,"Invalid argument: "+E.argString.substring(z));return}var q=j,X=P.next();if(!(u(q)&&u(X)||c(q)&&c(X))){Ft(b,"Invalid argument: "+q+"-");return}var Z=q.charCodeAt(0),re=X.charCodeAt(0);if(Z>=re){Ft(b,"Invalid argument: "+E.argString.substring(z));return}for(var he=0;he<=re-Z;he++){var be=String.fromCharCode(Z+he);delete S.marks[be]}}else delete S.marks[j]}}},Wr=new Ia;R("insertModeEscKeysTimeout",200,"number"),Be.Vim=kt;var _o={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Er=kt.handleKey.bind(kt);kt.handleKey=function(b,E,S){return b.operation(function(){return Er(b,E,S)},!0)},N(),r.CodeMirror=Be;var fi=kt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(b,E,S,P,z){var j=this.state.vim||{},q=S.characterWidth,X=S.lineHeight,Z=E.top,re=E.left;if(!j.insertMode){var he=P.cursor?pr.comparePoints(P.cursor,P.start)<=0:z.selection.isBackwards()||z.selection.isEmpty();!he&&re>q&&(re-=q)}!j.insertMode&&j.status&&(X/=2,Z+=X),ni.translate(b,re,Z),ni.setStyle(b.style,"width",q+"px"),ni.setStyle(b.style,"height",X+"px")},$getDirectionForHighlight:function(b){var E=b.state.cm,S=fi(E);if(!S.insertMode)return b.session.selection.isBackwards()||b.session.selection.isEmpty()},handleKeyboard:function(b,E,S,P,z){var j=b.editor,q=j.state.cm,X=fi(q);if(P!=-1){if(X.insertMode||(E==-1?(S.charCodeAt(0)>255&&b.inputKey&&(S=b.inputKey,S&&b.inputHash==4&&(S=S.toUpperCase())),b.inputChar=S):E==4||E==0?b.inputKey==S&&b.inputHash==E&&b.inputChar?(S=b.inputChar,E=-1):(b.inputChar=null,b.inputKey=S,b.inputHash=E):b.inputChar=b.inputKey=null),q.state.overwrite&&X.insertMode&&S=="backspace"&&E==0)return{command:"gotoleft"};if(S=="c"&&E==1&&!Io.isMac&&j.getCopyText())return j.once("copy",function(){X.insertMode?j.selection.clearSelection():q.operation(function(){bn(q)})}),{command:"null",passEvent:!0};if(S=="esc"&&!X.insertMode&&!X.visualMode&&!q.ace.inMultiSelectMode){var Z=Fn(q),re=Z.getOverlay();re&&q.removeOverlay(re)}if(E==-1||E&1||E===0&&S.length>1){var he=X.insertMode,be=Ea(E,S,z||{},X);X.status==null&&(X.status="");var Ae=Zo(q,be,"user");return X=fi(q),Ae&&X.status!=null?X.status+=be:X.status==null&&(X.status=""),q._signal("changeStatus"),!Ae&&(E!=-1||he)?void 0:{command:"null",passEvent:!Ae}}}},attach:function(b){function E(){var P=fi(S).insertMode;S.ace.renderer.setStyle("normal-mode",!P),b.textInput.setCommandMode(!P),b.renderer.$keepTextAreaAtCursor=P,b.renderer.$blockCursor=!P}b.state||(b.state={});var S=new Be(b);b.state.cm=S,b.$vimModeHandler=this,s(S),fi(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(fi(S).status=null,S.ace._signal("changeStatus"),S.ace.session.markUndoGroup())}),S.on("changeStatus",function(){S.ace.renderer.updateCursor(),S.ace._signal("changeStatus")}),S.on("vim-mode-change",function(){S.virtualSelectionMode()||(E(),S._signal("changeStatus"))}),E(),b.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(b){var E=b.state.cm;f(E),E.destroy(),b.state.cm=null,b.$vimModeHandler=null,b.renderer.$cursorLayer.drawCursor=null,b.renderer.setStyle("normal-mode",!1),b.textInput.setCommandMode(!1),b.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(b){var E=b.state.cm,S=fi(E);if(S.insertMode)return"INSERT";var P="";return S.visualMode&&(P+="VISUAL",S.visualLine&&(P+=" LINE"),S.visualBlock&&(P+=" BLOCK")),S.status&&(P+=(P?" ":"")+S.status),P}},kt.defineOption({name:"wrap",set:function(b,E){E&&E.ace.setOption("wrap",b)},type:"boolean"},!1),kt.defineEx("write","w",function(){console.log(":write is not implemented")}),zn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),zn.push({keys:"gq",type:"operator",operator:"hardWrap"}),kt.defineOperator("hardWrap",function(b,E,S,P,z){var j=S[0].anchor.line,q=S[0].head.line;return E.linewise&&q--,xo(b.ace,{startRow:j,endRow:q}),De(q,0)}),R("textwidth",void 0,"number",["tw"],function(b,E){if(E!==void 0){if(b===void 0){var S=E.ace.getOption("printMarginColumn");return S}var P=Math.round(b);P>1&&E.ace.setOption("printMarginColumn",P)}}),Vn.aceCommand=function(b,E,S){b.vimCmd=E,b.ace.inVirtualSelectionMode?b.ace.on("beforeEndOperation",ro):ro(null,b.ace)},Vn.fold=function(b,E,S){b.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(E.all?2:0)+(E.open?1:0)])},Oo=zn.length,r.handler.defaultKeymap=zn,r.handler.actions=Vn,r.Vim=kt}),(function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})})()})(Xm)),Xm.exports}yS();var Zm={},Qm;function bS(){return Qm||(Qm=1,(function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(v){return d(p(v),arguments)}function r(v,s){return e.apply(null,[v].concat(s||[]))}function d(v,s){var f=1,i=v.length,a,u="",g,o,c,m,w,x,R,$;for(g=0;g<i;g++)if(typeof v[g]=="string")u+=v[g];else if(typeof v[g]=="object"){if(c=v[g],c.keys)for(a=s[f],o=0;o<c.keys.length;o++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[o],c.keys[o-1]));a=a[c.keys[o]]}else c.param_no?a=s[c.param_no]:a=s[f++];if(t.not_type.test(c.type)&&t.not_primitive.test(c.type)&&a instanceof Function&&(a=a()),t.numeric_arg.test(c.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(t.number.test(c.type)&&(R=a>=0),c.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,c.width?parseInt(c.width):0);break;case"e":a=c.precision?parseFloat(a).toExponential(c.precision):parseFloat(a).toExponential();break;case"f":a=c.precision?parseFloat(a).toFixed(c.precision):parseFloat(a);break;case"g":a=c.precision?String(Number(a.toPrecision(c.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=c.precision?a.substring(0,c.precision):a;break;case"t":a=String(!!a),a=c.precision?a.substring(0,c.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=c.precision?a.substring(0,c.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=c.precision?a.substring(0,c.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}t.json.test(c.type)?u+=a:(t.number.test(c.type)&&(!R||c.sign)?($=R?"+":"-",a=a.toString().replace(t.sign,"")):$="",w=c.pad_char?c.pad_char==="0"?"0":c.pad_char.charAt(1):" ",x=c.width-($+a).length,m=c.width&&x>0?w.repeat(x):"",u+=c.align?$+a+m:w==="0"?$+m+a:m+$+a)}return u}var h=Object.create(null);function p(v){if(h[v])return h[v];for(var s=v,f,i=[],a=0;s;){if((f=t.text.exec(s))!==null)i.push(f[0]);else if((f=t.modulo.exec(s))!==null)i.push("%");else if((f=t.placeholder.exec(s))!==null){if(f[2]){a|=1;var u=[],g=f[2],o=[];if((o=t.key.exec(g))!==null)for(u.push(o[1]);(g=g.substring(o[0].length))!=="";)if((o=t.key_access.exec(g))!==null)u.push(o[1]);else if((o=t.index_access.exec(g))!==null)u.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");s=s.substring(f[0].length)}return h[v]=i}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(Zm)),Zm}bS();var ic={exports:{}},wS=ic.exports,ev;function xS(){return ev||(ev=1,(function(n,t){(function(){var e,r="4.18.1",d=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",v="Invalid `variable` option passed into `_.template`",s="Invalid `imports` option passed into `_.template`",f="__lodash_hash_undefined__",i=500,a="__lodash_placeholder__",u=1,g=2,o=4,c=1,m=2,w=1,x=2,R=4,$=8,k=16,C=32,O=64,N=128,I=256,M=512,W=30,F="...",D=800,A=16,_=1,L=2,B=3,U=1/0,V=9007199254740991,K=17976931348623157e292,ee=NaN,ae=4294967295,Q=ae-1,oe=ae>>>1,se=[["ary",N],["bind",w],["bindKey",x],["curry",$],["curryRight",k],["flip",M],["partial",C],["partialRight",O],["rearg",I]],ue="[object Arguments]",pe="[object Array]",ve="[object AsyncFunction]",$e="[object Boolean]",Re="[object Date]",Ye="[object DOMException]",Ge="[object Error]",at="[object Function]",it="[object GeneratorFunction]",ut="[object Map]",Ht="[object Number]",_r="[object Null]",Rt="[object Object]",cr="[object Promise]",Mn="[object Proxy]",kr="[object RegExp]",yn="[object Set]",ur="[object String]",mt="[object Symbol]",Je="[object Undefined]",Tt="[object WeakMap]",en="[object WeakSet]",Dn="[object ArrayBuffer]",Xn="[object DataView]",hr="[object Float32Array]",bn="[object Float64Array]",Hn="[object Int8Array]",Pn="[object Int16Array]",Xt="[object Int32Array]",an="[object Uint8Array]",Dr="[object Uint8ClampedArray]",Zr="[object Uint16Array]",Ar="[object Uint32Array]",Ci=/\b__p \+= '';/g,_i=/\b(__p \+=) '' \+/g,nr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,no=/&(?:amp|lt|gt|quot|#39);/g,Qr=/[&<>"']/g,Ls=RegExp(no.source),ei=RegExp(Qr.source),$n=/<%-([\s\S]+?)%>/g,ki=/<%([\s\S]+?)%>/g,Ro=/<%=([\s\S]+?)%>/g,ui=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,En=/^\w*$/,Sr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pr=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(Pr.source),_n=/^\s+/,yr=/\s/,hi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,go=/\{\n\/\* \[wrapped with (.+)\] \*/,mo=/,? & /,To=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fr=/[()=,{}\[\]\/\s]/,di=/\\(\\)?/g,ti=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ft=/\w*$/,Mo=/^[-+]0x[0-9a-f]+$/i,dr=/^0b[01]+$/i,Ln=/^\[object .+?Constructor\]$/,le=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,He=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,Kt="\\ud800-\\udfff",$r="\\u0300-\\u036f",Jn="\\ufe20-\\ufe2f",fn="\\u20d0-\\u20ff",br=$r+Jn+fn,xn="\\u2700-\\u27bf",wr="a-z\\xdf-\\xf6\\xf8-\\xff",vo="\\xac\\xb1\\xd7\\xf7",Is="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Os="\\u2000-\\u206f",Ns=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fr="A-Z\\xc0-\\xd6\\xd8-\\xde",Ds="\\ufe0e\\ufe0f",Yo=vo+Is+Os+Ns,yo="['’]",Ps="["+Kt+"]",Xo="["+Yo+"]",Lo="["+br+"]",Fs="\\d+",zs="["+xn+"]",Jo="["+wr+"]",Ea="[^"+Kt+Yo+Fs+xn+wr+fr+"]",bo="\\ud83c[\\udffb-\\udfff]",Zo="(?:"+Lo+"|"+bo+")",ro="[^"+Kt+"]",pr="(?:\\ud83c[\\udde6-\\uddff]){2}",Bs="[\\ud800-\\udbff][\\udc00-\\udfff]",ni="["+fr+"]",Ra="\\u200d",Ta="(?:"+Jo+"|"+Ea+")",Qo="(?:"+ni+"|"+Ea+")",io="(?:"+yo+"(?:d|ll|m|re|s|t|ve))?",Io="(?:"+yo+"(?:D|LL|M|RE|S|T|VE))?",es=Zo+"?",wo="["+Ds+"]?",Ma="(?:"+Ra+"(?:"+[ro,pr,Bs].join("|")+")"+wo+es+")*",xo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Be="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ws=wo+es+Ma,De="(?:"+[zs,pr,Bs].join("|")+")"+Ws,zn="(?:"+[ro+Lo+"?",Lo,pr,Bs,Ps].join("|")+")",Oo=RegExp(yo,"g"),oo=RegExp(Lo,"g"),Bn=RegExp(bo+"(?="+bo+")|"+zn+Ws,"g"),La=RegExp([ni+"?"+Jo+"+"+io+"(?="+[Xo,ni,"$"].join("|")+")",Qo+"+"+Io+"(?="+[Xo,ni+Ta,"$"].join("|")+")",ni+"?"+Ta+"+"+io,ni+"+"+Io,Be,xo,Fs,De].join("|"),"g"),No=RegExp("["+Ra+Kt+br+Ds+"]"),Pi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Co=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],js=-1,on={};on[hr]=on[bn]=on[Hn]=on[Pn]=on[Xt]=on[an]=on[Dr]=on[Zr]=on[Ar]=!0,on[ue]=on[pe]=on[Dn]=on[$e]=on[Xn]=on[Re]=on[Ge]=on[at]=on[ut]=on[Ht]=on[Rt]=on[kr]=on[yn]=on[ur]=on[Tt]=!1;var ft={};ft[ue]=ft[pe]=ft[Dn]=ft[Xn]=ft[$e]=ft[Re]=ft[hr]=ft[bn]=ft[Hn]=ft[Pn]=ft[Xt]=ft[ut]=ft[Ht]=ft[Rt]=ft[kr]=ft[yn]=ft[ur]=ft[mt]=ft[an]=ft[Dr]=ft[Zr]=ft[Ar]=!0,ft[Ge]=ft[at]=ft[Tt]=!1;var Gt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Fi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Un={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kn=parseFloat,kt=parseInt,zr=typeof Go=="object"&&Go&&Go.Object===Object&&Go,zi=typeof self=="object"&&self&&self.Object===Object&&self,zt=zr||zi||Function("return this")(),Br=t&&!t.nodeType&&t,rr=Br&&!0&&n&&!n.nodeType&&n,so=rr&&rr.exports===Br,Ai=so&&zr.process,In=(function(){try{var me=rr&&rr.require&&rr.require("util").types;return me||Ai&&Ai.binding&&Ai.binding("util")}catch{}})(),ts=In&&In.isArrayBuffer,Vn=In&&In.isDate,Si=In&&In.isMap,$i=In&&In.isRegExp,Bi=In&&In.isSet,Hs=In&&In.isTypedArray;function ln(me,Ee,Se){switch(Se.length){case 0:return me.call(Ee);case 1:return me.call(Ee,Se[0]);case 2:return me.call(Ee,Se[0],Se[1]);case 3:return me.call(Ee,Se[0],Se[1],Se[2])}return me.apply(Ee,Se)}function Ia(me,Ee,Se,Ke){for(var gt=-1,Et=me==null?0:me.length;++gt<Et;){var tn=me[gt];Ee(Ke,tn,Se(tn),me)}return Ke}function gr(me,Ee){for(var Se=-1,Ke=me==null?0:me.length;++Se<Ke&&Ee(me[Se],Se,me)!==!1;);return me}function Wr(me,Ee){for(var Se=me==null?0:me.length;Se--&&Ee(me[Se],Se,me)!==!1;);return me}function _o(me,Ee){for(var Se=-1,Ke=me==null?0:me.length;++Se<Ke;)if(!Ee(me[Se],Se,me))return!1;return!0}function Er(me,Ee){for(var Se=-1,Ke=me==null?0:me.length,gt=0,Et=[];++Se<Ke;){var tn=me[Se];Ee(tn,Se,me)&&(Et[gt++]=tn)}return Et}function fi(me,Ee){var Se=me==null?0:me.length;return!!Se&&be(me,Ee,0)>-1}function b(me,Ee,Se){for(var Ke=-1,gt=me==null?0:me.length;++Ke<gt;)if(Se(Ee,me[Ke]))return!0;return!1}function E(me,Ee){for(var Se=-1,Ke=me==null?0:me.length,gt=Array(Ke);++Se<Ke;)gt[Se]=Ee(me[Se],Se,me);return gt}function S(me,Ee){for(var Se=-1,Ke=Ee.length,gt=me.length;++Se<Ke;)me[gt+Se]=Ee[Se];return me}function P(me,Ee,Se,Ke){var gt=-1,Et=me==null?0:me.length;for(Ke&&Et&&(Se=me[++gt]);++gt<Et;)Se=Ee(Se,me[gt],gt,me);return Se}function z(me,Ee,Se,Ke){var gt=me==null?0:me.length;for(Ke&&gt&&(Se=me[--gt]);gt--;)Se=Ee(Se,me[gt],gt,me);return Se}function j(me,Ee){for(var Se=-1,Ke=me==null?0:me.length;++Se<Ke;)if(Ee(me[Se],Se,me))return!0;return!1}var q=Oe("length");function X(me){return me.split("")}function Z(me){return me.match(To)||[]}function re(me,Ee,Se){var Ke;return Se(me,function(gt,Et,tn){if(Ee(gt,Et,tn))return Ke=Et,!1}),Ke}function he(me,Ee,Se,Ke){for(var gt=me.length,Et=Se+(Ke?1:-1);Ke?Et--:++Et<gt;)if(Ee(me[Et],Et,me))return Et;return-1}function be(me,Ee,Se){return Ee===Ee?At(me,Ee,Se):he(me,ye,Se)}function Ae(me,Ee,Se,Ke){for(var gt=Se-1,Et=me.length;++gt<Et;)if(Ke(me[gt],Ee))return gt;return-1}function ye(me){return me!==me}function xe(me,Ee){var Se=me==null?0:me.length;return Se?nt(me,Ee)/Se:ee}function Oe(me){return function(Ee){return Ee==null?e:Ee[me]}}function Le(me){return function(Ee){return me==null?e:me[Ee]}}function Xe(me,Ee,Se,Ke,gt){return gt(me,function(Et,tn,Wt){Se=Ke?(Ke=!1,Et):Ee(Se,Et,tn,Wt)}),Se}function pt(me,Ee){var Se=me.length;for(me.sort(Ee);Se--;)me[Se]=me[Se].value;return me}function nt(me,Ee){for(var Se,Ke=-1,gt=me.length;++Ke<gt;){var Et=Ee(me[Ke]);Et!==e&&(Se=Se===e?Et:Se+Et)}return Se}function st(me,Ee){for(var Se=-1,Ke=Array(me);++Se<me;)Ke[Se]=Ee(Se);return Ke}function Rn(me,Ee){return E(Ee,function(Se){return[Se,me[Se]]})}function St(me){return me&&me.slice(0,vt(me)+1).replace(_n,"")}function Jt(me){return function(Ee){return me(Ee)}}function Lt(me,Ee){return E(Ee,function(Se){return me[Se]})}function $t(me,Ee){return me.has(Ee)}function ir(me,Ee){for(var Se=-1,Ke=me.length;++Se<Ke&&be(Ee,me[Se],0)>-1;);return Se}function mr(me,Ee){for(var Se=me.length;Se--&&be(Ee,me[Se],0)>-1;);return Se}function On(me,Ee){for(var Se=me.length,Ke=0;Se--;)me[Se]===Ee&&++Ke;return Ke}var G=Le(Gt),J=Le(Fi);function ie(me){return"\\"+Ve[me]}function ce(me,Ee){return me==null?e:me[Ee]}function ge(me){return No.test(me)}function ke(me){return Pi.test(me)}function Te(me){for(var Ee,Se=[];!(Ee=me.next()).done;)Se.push(Ee.value);return Se}function Fe(me){var Ee=-1,Se=Array(me.size);return me.forEach(function(Ke,gt){Se[++Ee]=[gt,Ke]}),Se}function je(me,Ee){return function(Se){return me(Ee(Se))}}function qe(me,Ee){for(var Se=-1,Ke=me.length,gt=0,Et=[];++Se<Ke;){var tn=me[Se];(tn===Ee||tn===a)&&(me[Se]=a,Et[gt++]=Se)}return Et}function Ze(me){var Ee=-1,Se=Array(me.size);return me.forEach(function(Ke){Se[++Ee]=Ke}),Se}function ot(me){var Ee=-1,Se=Array(me.size);return me.forEach(function(Ke){Se[++Ee]=[Ke,Ke]}),Se}function At(me,Ee,Se){for(var Ke=Se-1,gt=me.length;++Ke<gt;)if(me[Ke]===Ee)return Ke;return-1}function Zt(me,Ee,Se){for(var Ke=Se+1;Ke--;)if(me[Ke]===Ee)return Ke;return Ke}function Bt(me){return ge(me)?Cn(me):q(me)}function Ct(me){return ge(me)?Nn(me):X(me)}function vt(me){for(var Ee=me.length;Ee--&&yr.test(me.charAt(Ee)););return Ee}var dt=Le(Un);function Cn(me){for(var Ee=Bn.lastIndex=0;Bn.test(me);)++Ee;return Ee}function Nn(me){return me.match(Bn)||[]}function or(me){return me.match(La)||[]}var cn=(function me(Ee){Ee=Ee==null?zt:pn.defaults(zt.Object(),Ee,pn.pick(zt,Co));var Se=Ee.Array,Ke=Ee.Date,gt=Ee.Error,Et=Ee.Function,tn=Ee.Math,Wt=Ee.Object,pi=Ee.RegExp,Rr=Ee.String,An=Ee.TypeError,Wi=Se.prototype,Tr=Et.prototype,Do=Wt.prototype,Xc=Ee["__core-js_shared__"],Jc=Tr.toString,un=Do.hasOwnProperty,kO=0,Jw=(function(){var l=/[^.]+$/.exec(Xc&&Xc.keys&&Xc.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Zc=Do.toString,AO=Jc.call(Wt),SO=zt._,$O=pi("^"+Jc.call(un).replace(Pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qc=so?Ee.Buffer:e,ns=Ee.Symbol,eu=Ee.Uint8Array,Zw=Qc?Qc.allocUnsafe:e,tu=je(Wt.getPrototypeOf,Wt),Qw=Wt.create,e1=Do.propertyIsEnumerable,nu=Wi.splice,t1=ns?ns.isConcatSpreadable:e,Al=ns?ns.iterator:e,Us=ns?ns.toStringTag:e,ru=(function(){try{var l=Ys(Wt,"defineProperty");return l({},"",{}),l}catch{}})(),EO=Ee.clearTimeout!==zt.clearTimeout&&Ee.clearTimeout,RO=Ke&&Ke.now!==zt.Date.now&&Ke.now,TO=Ee.setTimeout!==zt.setTimeout&&Ee.setTimeout,iu=tn.ceil,ou=tn.floor,tp=Wt.getOwnPropertySymbols,MO=Qc?Qc.isBuffer:e,n1=Ee.isFinite,LO=Wi.join,IO=je(Wt.keys,Wt),vr=tn.max,jr=tn.min,OO=Ke.now,NO=Ee.parseInt,r1=tn.random,DO=Wi.reverse,np=Ys(Ee,"DataView"),Sl=Ys(Ee,"Map"),rp=Ys(Ee,"Promise"),Oa=Ys(Ee,"Set"),$l=Ys(Ee,"WeakMap"),El=Ys(Wt,"create"),su=$l&&new $l,Na={},PO=Xs(np),FO=Xs(Sl),zO=Xs(rp),BO=Xs(Oa),WO=Xs($l),au=ns?ns.prototype:e,Rl=au?au.valueOf:e,i1=au?au.toString:e;function te(l){if(Gn(l)&&!Mt(l)&&!(l instanceof qt)){if(l instanceof ji)return l;if(un.call(l,"__wrapped__"))return ox(l)}return new ji(l)}var Da=(function(){function l(){}return function(y){if(!Wn(y))return{};if(Qw)return Qw(y);l.prototype=y;var T=new l;return l.prototype=e,T}})();function lu(){}function ji(l,y){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=e}te.templateSettings={escape:$n,evaluate:ki,interpolate:Ro,variable:"",imports:{_:te}},te.prototype=lu.prototype,te.prototype.constructor=te,ji.prototype=Da(lu.prototype),ji.prototype.constructor=ji;function qt(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function jO(){var l=new qt(this.__wrapped__);return l.__actions__=gi(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=gi(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=gi(this.__views__),l}function HO(){if(this.__filtered__){var l=new qt(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function UO(){var l=this.__wrapped__.value(),y=this.__dir__,T=Mt(l),H=y<0,Y=T?l.length:0,ne=n2(0,Y,this.__views__),de=ne.start,fe=ne.end,we=fe-de,Me=H?fe:de-1,Ie=this.__iteratees__,Pe=Ie.length,Qe=0,ht=jr(we,this.__takeCount__);if(!T||!H&&Y==we&&ht==we)return E1(l,this.__actions__);var wt=[];e:for(;we--&&Qe<ht;){Me+=y;for(var Dt=-1,yt=l[Me];++Dt<Pe;){var Ut=Ie[Dt],Yt=Ut.iteratee,Ti=Ut.type,oi=Yt(yt);if(Ti==L)yt=oi;else if(!oi){if(Ti==_)continue e;break e}}wt[Qe++]=yt}return wt}qt.prototype=Da(lu.prototype),qt.prototype.constructor=qt;function Vs(l){var y=-1,T=l==null?0:l.length;for(this.clear();++y<T;){var H=l[y];this.set(H[0],H[1])}}function VO(){this.__data__=El?El(null):{},this.size=0}function GO(l){var y=this.has(l)&&delete this.__data__[l];return this.size-=y?1:0,y}function qO(l){var y=this.__data__;if(El){var T=y[l];return T===f?e:T}return un.call(y,l)?y[l]:e}function KO(l){var y=this.__data__;return El?y[l]!==e:un.call(y,l)}function YO(l,y){var T=this.__data__;return this.size+=this.has(l)?0:1,T[l]=El&&y===e?f:y,this}Vs.prototype.clear=VO,Vs.prototype.delete=GO,Vs.prototype.get=qO,Vs.prototype.has=KO,Vs.prototype.set=YO;function Po(l){var y=-1,T=l==null?0:l.length;for(this.clear();++y<T;){var H=l[y];this.set(H[0],H[1])}}function XO(){this.__data__=[],this.size=0}function JO(l){var y=this.__data__,T=cu(y,l);if(T<0)return!1;var H=y.length-1;return T==H?y.pop():nu.call(y,T,1),--this.size,!0}function ZO(l){var y=this.__data__,T=cu(y,l);return T<0?e:y[T][1]}function QO(l){return cu(this.__data__,l)>-1}function eN(l,y){var T=this.__data__,H=cu(T,l);return H<0?(++this.size,T.push([l,y])):T[H][1]=y,this}Po.prototype.clear=XO,Po.prototype.delete=JO,Po.prototype.get=ZO,Po.prototype.has=QO,Po.prototype.set=eN;function Fo(l){var y=-1,T=l==null?0:l.length;for(this.clear();++y<T;){var H=l[y];this.set(H[0],H[1])}}function tN(){this.size=0,this.__data__={hash:new Vs,map:new(Sl||Po),string:new Vs}}function nN(l){var y=xu(this,l).delete(l);return this.size-=y?1:0,y}function rN(l){return xu(this,l).get(l)}function iN(l){return xu(this,l).has(l)}function oN(l,y){var T=xu(this,l),H=T.size;return T.set(l,y),this.size+=T.size==H?0:1,this}Fo.prototype.clear=tN,Fo.prototype.delete=nN,Fo.prototype.get=rN,Fo.prototype.has=iN,Fo.prototype.set=oN;function Gs(l){var y=-1,T=l==null?0:l.length;for(this.__data__=new Fo;++y<T;)this.add(l[y])}function sN(l){return this.__data__.set(l,f),this}function aN(l){return this.__data__.has(l)}Gs.prototype.add=Gs.prototype.push=sN,Gs.prototype.has=aN;function ao(l){var y=this.__data__=new Po(l);this.size=y.size}function lN(){this.__data__=new Po,this.size=0}function cN(l){var y=this.__data__,T=y.delete(l);return this.size=y.size,T}function uN(l){return this.__data__.get(l)}function hN(l){return this.__data__.has(l)}function dN(l,y){var T=this.__data__;if(T instanceof Po){var H=T.__data__;if(!Sl||H.length<d-1)return H.push([l,y]),this.size=++T.size,this;T=this.__data__=new Fo(H)}return T.set(l,y),this.size=T.size,this}ao.prototype.clear=lN,ao.prototype.delete=cN,ao.prototype.get=uN,ao.prototype.has=hN,ao.prototype.set=dN;function o1(l,y){var T=Mt(l),H=!T&&Js(l),Y=!T&&!H&&as(l),ne=!T&&!H&&!Y&&Ba(l),de=T||H||Y||ne,fe=de?st(l.length,Rr):[],we=fe.length;for(var Me in l)(y||un.call(l,Me))&&!(de&&(Me=="length"||Y&&(Me=="offset"||Me=="parent")||ne&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||Wo(Me,we)))&&fe.push(Me);return fe}function s1(l){var y=l.length;return y?l[pp(0,y-1)]:e}function fN(l,y){return Cu(gi(l),qs(y,0,l.length))}function pN(l){return Cu(gi(l))}function ip(l,y,T){(T!==e&&!co(l[y],T)||T===e&&!(y in l))&&ko(l,y,T)}function Tl(l,y,T){var H=l[y];(!(un.call(l,y)&&co(H,T))||T===e&&!(y in l))&&ko(l,y,T)}function cu(l,y){for(var T=l.length;T--;)if(co(l[T][0],y))return T;return-1}function gN(l,y,T,H){return rs(l,function(Y,ne,de){y(H,Y,T(Y),de)}),H}function a1(l,y){return l&&So(y,xr(y),l)}function mN(l,y){return l&&So(y,vi(y),l)}function ko(l,y,T){y=="__proto__"&&ru?ru(l,y,{configurable:!0,enumerable:!0,value:T,writable:!0}):l[y]=T}function op(l,y){for(var T=-1,H=y.length,Y=Se(H),ne=l==null;++T<H;)Y[T]=ne?e:Bp(l,y[T]);return Y}function qs(l,y,T){return l===l&&(T!==e&&(l=l<=T?l:T),y!==e&&(l=l>=y?l:y)),l}function Hi(l,y,T,H,Y,ne){var de,fe=y&u,we=y&g,Me=y&o;if(T&&(de=Y?T(l,H,Y,ne):T(l)),de!==e)return de;if(!Wn(l))return l;var Ie=Mt(l);if(Ie){if(de=i2(l),!fe)return gi(l,de)}else{var Pe=Hr(l),Qe=Pe==at||Pe==it;if(as(l))return M1(l,fe);if(Pe==Rt||Pe==ue||Qe&&!Y){if(de=we||Qe?{}:X1(l),!fe)return we?qN(l,mN(de,l)):GN(l,a1(de,l))}else{if(!ft[Pe])return Y?l:{};de=o2(l,Pe,fe)}}ne||(ne=new ao);var ht=ne.get(l);if(ht)return ht;ne.set(l,de),Ax(l)?l.forEach(function(yt){de.add(Hi(yt,y,T,yt,l,ne))}):_x(l)&&l.forEach(function(yt,Ut){de.set(Ut,Hi(yt,y,T,Ut,l,ne))});var wt=Me?we?Ap:kp:we?vi:xr,Dt=Ie?e:wt(l);return gr(Dt||l,function(yt,Ut){Dt&&(Ut=yt,yt=l[Ut]),Tl(de,Ut,Hi(yt,y,T,Ut,l,ne))}),de}function vN(l){var y=xr(l);return function(T){return l1(T,l,y)}}function l1(l,y,T){var H=T.length;if(l==null)return!H;for(l=Wt(l);H--;){var Y=T[H],ne=y[Y],de=l[Y];if(de===e&&!(Y in l)||!ne(de))return!1}return!0}function c1(l,y,T){if(typeof l!="function")throw new An(p);return Pl(function(){l.apply(e,T)},y)}function Ml(l,y,T,H){var Y=-1,ne=fi,de=!0,fe=l.length,we=[],Me=y.length;if(!fe)return we;T&&(y=E(y,Jt(T))),H?(ne=b,de=!1):y.length>=d&&(ne=$t,de=!1,y=new Gs(y));e:for(;++Y<fe;){var Ie=l[Y],Pe=T==null?Ie:T(Ie);if(Ie=H||Ie!==0?Ie:0,de&&Pe===Pe){for(var Qe=Me;Qe--;)if(y[Qe]===Pe)continue e;we.push(Ie)}else ne(y,Pe,H)||we.push(Ie)}return we}var rs=D1(Ao),u1=D1(ap,!0);function yN(l,y){var T=!0;return rs(l,function(H,Y,ne){return T=!!y(H,Y,ne),T}),T}function uu(l,y,T){for(var H=-1,Y=l.length;++H<Y;){var ne=l[H],de=y(ne);if(de!=null&&(fe===e?de===de&&!Ri(de):T(de,fe)))var fe=de,we=ne}return we}function bN(l,y,T,H){var Y=l.length;for(T=Nt(T),T<0&&(T=-T>Y?0:Y+T),H=H===e||H>Y?Y:Nt(H),H<0&&(H+=Y),H=T>H?0:$x(H);T<H;)l[T++]=y;return l}function h1(l,y){var T=[];return rs(l,function(H,Y,ne){y(H,Y,ne)&&T.push(H)}),T}function Mr(l,y,T,H,Y){var ne=-1,de=l.length;for(T||(T=a2),Y||(Y=[]);++ne<de;){var fe=l[ne];y>0&&T(fe)?y>1?Mr(fe,y-1,T,H,Y):S(Y,fe):H||(Y[Y.length]=fe)}return Y}var sp=P1(),d1=P1(!0);function Ao(l,y){return l&&sp(l,y,xr)}function ap(l,y){return l&&d1(l,y,xr)}function hu(l,y){return Er(y,function(T){return jo(l[T])})}function Ks(l,y){y=os(y,l);for(var T=0,H=y.length;l!=null&&T<H;)l=l[lo(y[T++])];return T&&T==H?l:e}function f1(l,y,T){var H=y(l);return Mt(l)?H:S(H,T(l))}function ri(l){return l==null?l===e?Je:_r:Us&&Us in Wt(l)?t2(l):p2(l)}function lp(l,y){return l>y}function wN(l,y){return l!=null&&un.call(l,y)}function xN(l,y){return l!=null&&y in Wt(l)}function CN(l,y,T){return l>=jr(y,T)&&l<vr(y,T)}function cp(l,y,T){for(var H=T?b:fi,Y=l[0].length,ne=l.length,de=ne,fe=Se(ne),we=1/0,Me=[];de--;){var Ie=l[de];de&&y&&(Ie=E(Ie,Jt(y))),we=jr(Ie.length,we),fe[de]=!T&&(y||Y>=120&&Ie.length>=120)?new Gs(de&&Ie):e}Ie=l[0];var Pe=-1,Qe=fe[0];e:for(;++Pe<Y&&Me.length<we;){var ht=Ie[Pe],wt=y?y(ht):ht;if(ht=T||ht!==0?ht:0,!(Qe?$t(Qe,wt):H(Me,wt,T))){for(de=ne;--de;){var Dt=fe[de];if(!(Dt?$t(Dt,wt):H(l[de],wt,T)))continue e}Qe&&Qe.push(wt),Me.push(ht)}}return Me}function _N(l,y,T,H){return Ao(l,function(Y,ne,de){y(H,T(Y),ne,de)}),H}function Ll(l,y,T){y=os(y,l),l=ex(l,y);var H=l==null?l:l[lo(Vi(y))];return H==null?e:ln(H,l,T)}function p1(l){return Gn(l)&&ri(l)==ue}function kN(l){return Gn(l)&&ri(l)==Dn}function AN(l){return Gn(l)&&ri(l)==Re}function Il(l,y,T,H,Y){return l===y?!0:l==null||y==null||!Gn(l)&&!Gn(y)?l!==l&&y!==y:SN(l,y,T,H,Il,Y)}function SN(l,y,T,H,Y,ne){var de=Mt(l),fe=Mt(y),we=de?pe:Hr(l),Me=fe?pe:Hr(y);we=we==ue?Rt:we,Me=Me==ue?Rt:Me;var Ie=we==Rt,Pe=Me==Rt,Qe=we==Me;if(Qe&&as(l)){if(!as(y))return!1;de=!0,Ie=!1}if(Qe&&!Ie)return ne||(ne=new ao),de||Ba(l)?q1(l,y,T,H,Y,ne):QN(l,y,we,T,H,Y,ne);if(!(T&c)){var ht=Ie&&un.call(l,"__wrapped__"),wt=Pe&&un.call(y,"__wrapped__");if(ht||wt){var Dt=ht?l.value():l,yt=wt?y.value():y;return ne||(ne=new ao),Y(Dt,yt,T,H,ne)}}return Qe?(ne||(ne=new ao),e2(l,y,T,H,Y,ne)):!1}function $N(l){return Gn(l)&&Hr(l)==ut}function up(l,y,T,H){var Y=T.length,ne=Y,de=!H;if(l==null)return!ne;for(l=Wt(l);Y--;){var fe=T[Y];if(de&&fe[2]?fe[1]!==l[fe[0]]:!(fe[0]in l))return!1}for(;++Y<ne;){fe=T[Y];var we=fe[0],Me=l[we],Ie=fe[1];if(de&&fe[2]){if(Me===e&&!(we in l))return!1}else{var Pe=new ao;if(H)var Qe=H(Me,Ie,we,l,y,Pe);if(!(Qe===e?Il(Ie,Me,c|m,H,Pe):Qe))return!1}}return!0}function g1(l){if(!Wn(l)||c2(l))return!1;var y=jo(l)?$O:Ln;return y.test(Xs(l))}function EN(l){return Gn(l)&&ri(l)==kr}function RN(l){return Gn(l)&&Hr(l)==yn}function TN(l){return Gn(l)&&Eu(l.length)&&!!on[ri(l)]}function m1(l){return typeof l=="function"?l:l==null?yi:typeof l=="object"?Mt(l)?b1(l[0],l[1]):y1(l):zx(l)}function hp(l){if(!Dl(l))return IO(l);var y=[];for(var T in Wt(l))un.call(l,T)&&T!="constructor"&&y.push(T);return y}function MN(l){if(!Wn(l))return f2(l);var y=Dl(l),T=[];for(var H in l)H=="constructor"&&(y||!un.call(l,H))||T.push(H);return T}function dp(l,y){return l<y}function v1(l,y){var T=-1,H=mi(l)?Se(l.length):[];return rs(l,function(Y,ne,de){H[++T]=y(Y,ne,de)}),H}function y1(l){var y=$p(l);return y.length==1&&y[0][2]?Z1(y[0][0],y[0][1]):function(T){return T===l||up(T,l,y)}}function b1(l,y){return Rp(l)&&J1(y)?Z1(lo(l),y):function(T){var H=Bp(T,l);return H===e&&H===y?Wp(T,l):Il(y,H,c|m)}}function du(l,y,T,H,Y){l!==y&&sp(y,function(ne,de){if(Y||(Y=new ao),Wn(ne))LN(l,y,de,T,du,H,Y);else{var fe=H?H(Mp(l,de),ne,de+"",l,y,Y):e;fe===e&&(fe=ne),ip(l,de,fe)}},vi)}function LN(l,y,T,H,Y,ne,de){var fe=Mp(l,T),we=Mp(y,T),Me=de.get(we);if(Me){ip(l,T,Me);return}var Ie=ne?ne(fe,we,T+"",l,y,de):e,Pe=Ie===e;if(Pe){var Qe=Mt(we),ht=!Qe&&as(we),wt=!Qe&&!ht&&Ba(we);Ie=we,Qe||ht||wt?Mt(fe)?Ie=fe:Zn(fe)?Ie=gi(fe):ht?(Pe=!1,Ie=M1(we,!0)):wt?(Pe=!1,Ie=L1(we,!0)):Ie=[]:Fl(we)||Js(we)?(Ie=fe,Js(fe)?Ie=Ex(fe):(!Wn(fe)||jo(fe))&&(Ie=X1(we))):Pe=!1}Pe&&(de.set(we,Ie),Y(Ie,we,H,ne,de),de.delete(we)),ip(l,T,Ie)}function w1(l,y){var T=l.length;if(T)return y+=y<0?T:0,Wo(y,T)?l[y]:e}function x1(l,y,T){y.length?y=E(y,function(ne){return Mt(ne)?function(de){return Ks(de,ne.length===1?ne[0]:ne)}:ne}):y=[yi];var H=-1;y=E(y,Jt(bt()));var Y=v1(l,function(ne,de,fe){var we=E(y,function(Me){return Me(ne)});return{criteria:we,index:++H,value:ne}});return pt(Y,function(ne,de){return VN(ne,de,T)})}function IN(l,y){return C1(l,y,function(T,H){return Wp(l,H)})}function C1(l,y,T){for(var H=-1,Y=y.length,ne={};++H<Y;){var de=y[H],fe=Ks(l,de);T(fe,de)&&Ol(ne,os(de,l),fe)}return ne}function ON(l){return function(y){return Ks(y,l)}}function fp(l,y,T,H){var Y=H?Ae:be,ne=-1,de=y.length,fe=l;for(l===y&&(y=gi(y)),T&&(fe=E(l,Jt(T)));++ne<de;)for(var we=0,Me=y[ne],Ie=T?T(Me):Me;(we=Y(fe,Ie,we,H))>-1;)fe!==l&&nu.call(fe,we,1),nu.call(l,we,1);return l}function _1(l,y){for(var T=l?y.length:0,H=T-1;T--;){var Y=y[T];if(T==H||Y!==ne){var ne=Y;Wo(Y)?nu.call(l,Y,1):vp(l,Y)}}return l}function pp(l,y){return l+ou(r1()*(y-l+1))}function NN(l,y,T,H){for(var Y=-1,ne=vr(iu((y-l)/(T||1)),0),de=Se(ne);ne--;)de[H?ne:++Y]=l,l+=T;return de}function gp(l,y){var T="";if(!l||y<1||y>V)return T;do y%2&&(T+=l),y=ou(y/2),y&&(l+=l);while(y);return T}function jt(l,y){return Lp(Q1(l,y,yi),l+"")}function DN(l){return s1(Wa(l))}function PN(l,y){var T=Wa(l);return Cu(T,qs(y,0,T.length))}function Ol(l,y,T,H){if(!Wn(l))return l;y=os(y,l);for(var Y=-1,ne=y.length,de=ne-1,fe=l;fe!=null&&++Y<ne;){var we=lo(y[Y]),Me=T;if(we==="__proto__"||we==="constructor"||we==="prototype")return l;if(Y!=de){var Ie=fe[we];Me=H?H(Ie,we,fe):e,Me===e&&(Me=Wn(Ie)?Ie:Wo(y[Y+1])?[]:{})}Tl(fe,we,Me),fe=fe[we]}return l}var k1=su?function(l,y){return su.set(l,y),l}:yi,FN=ru?function(l,y){return ru(l,"toString",{configurable:!0,enumerable:!1,value:Hp(y),writable:!0})}:yi;function zN(l){return Cu(Wa(l))}function Ui(l,y,T){var H=-1,Y=l.length;y<0&&(y=-y>Y?0:Y+y),T=T>Y?Y:T,T<0&&(T+=Y),Y=y>T?0:T-y>>>0,y>>>=0;for(var ne=Se(Y);++H<Y;)ne[H]=l[H+y];return ne}function BN(l,y){var T;return rs(l,function(H,Y,ne){return T=y(H,Y,ne),!T}),!!T}function fu(l,y,T){var H=0,Y=l==null?H:l.length;if(typeof y=="number"&&y===y&&Y<=oe){for(;H<Y;){var ne=H+Y>>>1,de=l[ne];de!==null&&!Ri(de)&&(T?de<=y:de<y)?H=ne+1:Y=ne}return Y}return mp(l,y,yi,T)}function mp(l,y,T,H){var Y=0,ne=l==null?0:l.length;if(ne===0)return 0;y=T(y);for(var de=y!==y,fe=y===null,we=Ri(y),Me=y===e;Y<ne;){var Ie=ou((Y+ne)/2),Pe=T(l[Ie]),Qe=Pe!==e,ht=Pe===null,wt=Pe===Pe,Dt=Ri(Pe);if(de)var yt=H||wt;else Me?yt=wt&&(H||Qe):fe?yt=wt&&Qe&&(H||!ht):we?yt=wt&&Qe&&!ht&&(H||!Dt):ht||Dt?yt=!1:yt=H?Pe<=y:Pe<y;yt?Y=Ie+1:ne=Ie}return jr(ne,Q)}function A1(l,y){for(var T=-1,H=l.length,Y=0,ne=[];++T<H;){var de=l[T],fe=y?y(de):de;if(!T||!co(fe,we)){var we=fe;ne[Y++]=de===0?0:de}}return ne}function S1(l){return typeof l=="number"?l:Ri(l)?ee:+l}function Ei(l){if(typeof l=="string")return l;if(Mt(l))return E(l,Ei)+"";if(Ri(l))return i1?i1.call(l):"";var y=l+"";return y=="0"&&1/l==-U?"-0":y}function is(l,y,T){var H=-1,Y=fi,ne=l.length,de=!0,fe=[],we=fe;if(T)de=!1,Y=b;else if(ne>=d){var Me=y?null:JN(l);if(Me)return Ze(Me);de=!1,Y=$t,we=new Gs}else we=y?[]:fe;e:for(;++H<ne;){var Ie=l[H],Pe=y?y(Ie):Ie;if(Ie=T||Ie!==0?Ie:0,de&&Pe===Pe){for(var Qe=we.length;Qe--;)if(we[Qe]===Pe)continue e;y&&we.push(Pe),fe.push(Ie)}else Y(we,Pe,T)||(we!==fe&&we.push(Pe),fe.push(Ie))}return fe}function vp(l,y){y=os(y,l);var T=-1,H=y.length;if(!H)return!0;for(;++T<H;){var Y=lo(y[T]);if(Y==="__proto__"&&!un.call(l,"__proto__")||(Y==="constructor"||Y==="prototype")&&T<H-1)return!1}var ne=ex(l,y);return ne==null||delete ne[lo(Vi(y))]}function $1(l,y,T,H){return Ol(l,y,T(Ks(l,y)),H)}function pu(l,y,T,H){for(var Y=l.length,ne=H?Y:-1;(H?ne--:++ne<Y)&&y(l[ne],ne,l););return T?Ui(l,H?0:ne,H?ne+1:Y):Ui(l,H?ne+1:0,H?Y:ne)}function E1(l,y){var T=l;return T instanceof qt&&(T=T.value()),P(y,function(H,Y){return Y.func.apply(Y.thisArg,S([H],Y.args))},T)}function yp(l,y,T){var H=l.length;if(H<2)return H?is(l[0]):[];for(var Y=-1,ne=Se(H);++Y<H;)for(var de=l[Y],fe=-1;++fe<H;)fe!=Y&&(ne[Y]=Ml(ne[Y]||de,l[fe],y,T));return is(Mr(ne,1),y,T)}function R1(l,y,T){for(var H=-1,Y=l.length,ne=y.length,de={};++H<Y;){var fe=H<ne?y[H]:e;T(de,l[H],fe)}return de}function bp(l){return Zn(l)?l:[]}function wp(l){return typeof l=="function"?l:yi}function os(l,y){return Mt(l)?l:Rp(l,y)?[l]:ix(hn(l))}var WN=jt;function ss(l,y,T){var H=l.length;return T=T===e?H:T,!y&&T>=H?l:Ui(l,y,T)}var T1=EO||function(l){return zt.clearTimeout(l)};function M1(l,y){if(y)return l.slice();var T=l.length,H=Zw?Zw(T):new l.constructor(T);return l.copy(H),H}function xp(l){var y=new l.constructor(l.byteLength);return new eu(y).set(new eu(l)),y}function jN(l,y){var T=y?xp(l.buffer):l.buffer;return new l.constructor(T,l.byteOffset,l.byteLength)}function HN(l){var y=new l.constructor(l.source,Ft.exec(l));return y.lastIndex=l.lastIndex,y}function UN(l){return Rl?Wt(Rl.call(l)):{}}function L1(l,y){var T=y?xp(l.buffer):l.buffer;return new l.constructor(T,l.byteOffset,l.length)}function I1(l,y){if(l!==y){var T=l!==e,H=l===null,Y=l===l,ne=Ri(l),de=y!==e,fe=y===null,we=y===y,Me=Ri(y);if(!fe&&!Me&&!ne&&l>y||ne&&de&&we&&!fe&&!Me||H&&de&&we||!T&&we||!Y)return 1;if(!H&&!ne&&!Me&&l<y||Me&&T&&Y&&!H&&!ne||fe&&T&&Y||!de&&Y||!we)return-1}return 0}function VN(l,y,T){for(var H=-1,Y=l.criteria,ne=y.criteria,de=Y.length,fe=T.length;++H<de;){var we=I1(Y[H],ne[H]);if(we){if(H>=fe)return we;var Me=T[H];return we*(Me=="desc"?-1:1)}}return l.index-y.index}function O1(l,y,T,H){for(var Y=-1,ne=l.length,de=T.length,fe=-1,we=y.length,Me=vr(ne-de,0),Ie=Se(we+Me),Pe=!H;++fe<we;)Ie[fe]=y[fe];for(;++Y<de;)(Pe||Y<ne)&&(Ie[T[Y]]=l[Y]);for(;Me--;)Ie[fe++]=l[Y++];return Ie}function N1(l,y,T,H){for(var Y=-1,ne=l.length,de=-1,fe=T.length,we=-1,Me=y.length,Ie=vr(ne-fe,0),Pe=Se(Ie+Me),Qe=!H;++Y<Ie;)Pe[Y]=l[Y];for(var ht=Y;++we<Me;)Pe[ht+we]=y[we];for(;++de<fe;)(Qe||Y<ne)&&(Pe[ht+T[de]]=l[Y++]);return Pe}function gi(l,y){var T=-1,H=l.length;for(y||(y=Se(H));++T<H;)y[T]=l[T];return y}function So(l,y,T,H){var Y=!T;T||(T={});for(var ne=-1,de=y.length;++ne<de;){var fe=y[ne],we=H?H(T[fe],l[fe],fe,T,l):e;we===e&&(we=l[fe]),Y?ko(T,fe,we):Tl(T,fe,we)}return T}function GN(l,y){return So(l,Ep(l),y)}function qN(l,y){return So(l,K1(l),y)}function gu(l,y){return function(T,H){var Y=Mt(T)?Ia:gN,ne=y?y():{};return Y(T,l,bt(H,2),ne)}}function Pa(l){return jt(function(y,T){var H=-1,Y=T.length,ne=Y>1?T[Y-1]:e,de=Y>2?T[2]:e;for(ne=l.length>3&&typeof ne=="function"?(Y--,ne):e,de&&ii(T[0],T[1],de)&&(ne=Y<3?e:ne,Y=1),y=Wt(y);++H<Y;){var fe=T[H];fe&&l(y,fe,H,ne)}return y})}function D1(l,y){return function(T,H){if(T==null)return T;if(!mi(T))return l(T,H);for(var Y=T.length,ne=y?Y:-1,de=Wt(T);(y?ne--:++ne<Y)&&H(de[ne],ne,de)!==!1;);return T}}function P1(l){return function(y,T,H){for(var Y=-1,ne=Wt(y),de=H(y),fe=de.length;fe--;){var we=de[l?fe:++Y];if(T(ne[we],we,ne)===!1)break}return y}}function KN(l,y,T){var H=y&w,Y=Nl(l);function ne(){var de=this&&this!==zt&&this instanceof ne?Y:l;return de.apply(H?T:this,arguments)}return ne}function F1(l){return function(y){y=hn(y);var T=ge(y)?Ct(y):e,H=T?T[0]:y.charAt(0),Y=T?ss(T,1).join(""):y.slice(1);return H[l]()+Y}}function Fa(l){return function(y){return P(Px(Dx(y).replace(Oo,"")),l,"")}}function Nl(l){return function(){var y=arguments;switch(y.length){case 0:return new l;case 1:return new l(y[0]);case 2:return new l(y[0],y[1]);case 3:return new l(y[0],y[1],y[2]);case 4:return new l(y[0],y[1],y[2],y[3]);case 5:return new l(y[0],y[1],y[2],y[3],y[4]);case 6:return new l(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new l(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var T=Da(l.prototype),H=l.apply(T,y);return Wn(H)?H:T}}function YN(l,y,T){var H=Nl(l);function Y(){for(var ne=arguments.length,de=Se(ne),fe=ne,we=za(Y);fe--;)de[fe]=arguments[fe];var Me=ne<3&&de[0]!==we&&de[ne-1]!==we?[]:qe(de,we);if(ne-=Me.length,ne<T)return H1(l,y,mu,Y.placeholder,e,de,Me,e,e,T-ne);var Ie=this&&this!==zt&&this instanceof Y?H:l;return ln(Ie,this,de)}return Y}function z1(l){return function(y,T,H){var Y=Wt(y);if(!mi(y)){var ne=bt(T,3);y=xr(y),T=function(fe){return ne(Y[fe],fe,Y)}}var de=l(y,T,H);return de>-1?Y[ne?y[de]:de]:e}}function B1(l){return Bo(function(y){var T=y.length,H=T,Y=ji.prototype.thru;for(l&&y.reverse();H--;){var ne=y[H];if(typeof ne!="function")throw new An(p);if(Y&&!de&&wu(ne)=="wrapper")var de=new ji([],!0)}for(H=de?H:T;++H<T;){ne=y[H];var fe=wu(ne),we=fe=="wrapper"?Sp(ne):e;we&&Tp(we[0])&&we[1]==(N|$|C|I)&&!we[4].length&&we[9]==1?de=de[wu(we[0])].apply(de,we[3]):de=ne.length==1&&Tp(ne)?de[fe]():de.thru(ne)}return function(){var Me=arguments,Ie=Me[0];if(de&&Me.length==1&&Mt(Ie))return de.plant(Ie).value();for(var Pe=0,Qe=T?y[Pe].apply(this,Me):Ie;++Pe<T;)Qe=y[Pe].call(this,Qe);return Qe}})}function mu(l,y,T,H,Y,ne,de,fe,we,Me){var Ie=y&N,Pe=y&w,Qe=y&x,ht=y&($|k),wt=y&M,Dt=Qe?e:Nl(l);function yt(){for(var Ut=arguments.length,Yt=Se(Ut),Ti=Ut;Ti--;)Yt[Ti]=arguments[Ti];if(ht)var oi=za(yt),Mi=On(Yt,oi);if(H&&(Yt=O1(Yt,H,Y,ht)),ne&&(Yt=N1(Yt,ne,de,ht)),Ut-=Mi,ht&&Ut<Me){var Qn=qe(Yt,oi);return H1(l,y,mu,yt.placeholder,T,Yt,Qn,fe,we,Me-Ut)}var uo=Pe?T:this,Uo=Qe?uo[l]:l;return Ut=Yt.length,fe?Yt=g2(Yt,fe):wt&&Ut>1&&Yt.reverse(),Ie&&we<Ut&&(Yt.length=we),this&&this!==zt&&this instanceof yt&&(Uo=Dt||Nl(Uo)),Uo.apply(uo,Yt)}return yt}function W1(l,y){return function(T,H){return _N(T,l,y(H),{})}}function vu(l,y){return function(T,H){var Y;if(T===e&&H===e)return y;if(T!==e&&(Y=T),H!==e){if(Y===e)return H;typeof T=="string"||typeof H=="string"?(T=Ei(T),H=Ei(H)):(T=S1(T),H=S1(H)),Y=l(T,H)}return Y}}function Cp(l){return Bo(function(y){return y=E(y,Jt(bt())),jt(function(T){var H=this;return l(y,function(Y){return ln(Y,H,T)})})})}function yu(l,y){y=y===e?" ":Ei(y);var T=y.length;if(T<2)return T?gp(y,l):y;var H=gp(y,iu(l/Bt(y)));return ge(y)?ss(Ct(H),0,l).join(""):H.slice(0,l)}function XN(l,y,T,H){var Y=y&w,ne=Nl(l);function de(){for(var fe=-1,we=arguments.length,Me=-1,Ie=H.length,Pe=Se(Ie+we),Qe=this&&this!==zt&&this instanceof de?ne:l;++Me<Ie;)Pe[Me]=H[Me];for(;we--;)Pe[Me++]=arguments[++fe];return ln(Qe,Y?T:this,Pe)}return de}function j1(l){return function(y,T,H){return H&&typeof H!="number"&&ii(y,T,H)&&(T=H=e),y=Ho(y),T===e?(T=y,y=0):T=Ho(T),H=H===e?y<T?1:-1:Ho(H),NN(y,T,H,l)}}function bu(l){return function(y,T){return typeof y=="string"&&typeof T=="string"||(y=Gi(y),T=Gi(T)),l(y,T)}}function H1(l,y,T,H,Y,ne,de,fe,we,Me){var Ie=y&$,Pe=Ie?de:e,Qe=Ie?e:de,ht=Ie?ne:e,wt=Ie?e:ne;y|=Ie?C:O,y&=~(Ie?O:C),y&R||(y&=-4);var Dt=[l,y,Y,ht,Pe,wt,Qe,fe,we,Me],yt=T.apply(e,Dt);return Tp(l)&&tx(yt,Dt),yt.placeholder=H,nx(yt,l,y)}function _p(l){var y=tn[l];return function(T,H){if(T=Gi(T),H=H==null?0:jr(Nt(H),292),H&&n1(T)){var Y=(hn(T)+"e").split("e"),ne=y(Y[0]+"e"+(+Y[1]+H));return Y=(hn(ne)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-H))}return y(T)}}var JN=Oa&&1/Ze(new Oa([,-0]))[1]==U?function(l){return new Oa(l)}:Gp;function U1(l){return function(y){var T=Hr(y);return T==ut?Fe(y):T==yn?ot(y):Rn(y,l(y))}}function zo(l,y,T,H,Y,ne,de,fe){var we=y&x;if(!we&&typeof l!="function")throw new An(p);var Me=H?H.length:0;if(Me||(y&=-97,H=Y=e),de=de===e?de:vr(Nt(de),0),fe=fe===e?fe:Nt(fe),Me-=Y?Y.length:0,y&O){var Ie=H,Pe=Y;H=Y=e}var Qe=we?e:Sp(l),ht=[l,y,T,H,Y,Ie,Pe,ne,de,fe];if(Qe&&d2(ht,Qe),l=ht[0],y=ht[1],T=ht[2],H=ht[3],Y=ht[4],fe=ht[9]=ht[9]===e?we?0:l.length:vr(ht[9]-Me,0),!fe&&y&($|k)&&(y&=-25),!y||y==w)var wt=KN(l,y,T);else y==$||y==k?wt=YN(l,y,fe):(y==C||y==(w|C))&&!Y.length?wt=XN(l,y,T,H):wt=mu.apply(e,ht);var Dt=Qe?k1:tx;return nx(Dt(wt,ht),l,y)}function V1(l,y,T,H){return l===e||co(l,Do[T])&&!un.call(H,T)?y:l}function G1(l,y,T,H,Y,ne){return Wn(l)&&Wn(y)&&(ne.set(y,l),du(l,y,e,G1,ne),ne.delete(y)),l}function ZN(l){return Fl(l)?e:l}function q1(l,y,T,H,Y,ne){var de=T&c,fe=l.length,we=y.length;if(fe!=we&&!(de&&we>fe))return!1;var Me=ne.get(l),Ie=ne.get(y);if(Me&&Ie)return Me==y&&Ie==l;var Pe=-1,Qe=!0,ht=T&m?new Gs:e;for(ne.set(l,y),ne.set(y,l);++Pe<fe;){var wt=l[Pe],Dt=y[Pe];if(H)var yt=de?H(Dt,wt,Pe,y,l,ne):H(wt,Dt,Pe,l,y,ne);if(yt!==e){if(yt)continue;Qe=!1;break}if(ht){if(!j(y,function(Ut,Yt){if(!$t(ht,Yt)&&(wt===Ut||Y(wt,Ut,T,H,ne)))return ht.push(Yt)})){Qe=!1;break}}else if(!(wt===Dt||Y(wt,Dt,T,H,ne))){Qe=!1;break}}return ne.delete(l),ne.delete(y),Qe}function QN(l,y,T,H,Y,ne,de){switch(T){case Xn:if(l.byteLength!=y.byteLength||l.byteOffset!=y.byteOffset)return!1;l=l.buffer,y=y.buffer;case Dn:return!(l.byteLength!=y.byteLength||!ne(new eu(l),new eu(y)));case $e:case Re:case Ht:return co(+l,+y);case Ge:return l.name==y.name&&l.message==y.message;case kr:case ur:return l==y+"";case ut:var fe=Fe;case yn:var we=H&c;if(fe||(fe=Ze),l.size!=y.size&&!we)return!1;var Me=de.get(l);if(Me)return Me==y;H|=m,de.set(l,y);var Ie=q1(fe(l),fe(y),H,Y,ne,de);return de.delete(l),Ie;case mt:if(Rl)return Rl.call(l)==Rl.call(y)}return!1}function e2(l,y,T,H,Y,ne){var de=T&c,fe=kp(l),we=fe.length,Me=kp(y),Ie=Me.length;if(we!=Ie&&!de)return!1;for(var Pe=we;Pe--;){var Qe=fe[Pe];if(!(de?Qe in y:un.call(y,Qe)))return!1}var ht=ne.get(l),wt=ne.get(y);if(ht&&wt)return ht==y&&wt==l;var Dt=!0;ne.set(l,y),ne.set(y,l);for(var yt=de;++Pe<we;){Qe=fe[Pe];var Ut=l[Qe],Yt=y[Qe];if(H)var Ti=de?H(Yt,Ut,Qe,y,l,ne):H(Ut,Yt,Qe,l,y,ne);if(!(Ti===e?Ut===Yt||Y(Ut,Yt,T,H,ne):Ti)){Dt=!1;break}yt||(yt=Qe=="constructor")}if(Dt&&!yt){var oi=l.constructor,Mi=y.constructor;oi!=Mi&&"constructor"in l&&"constructor"in y&&!(typeof oi=="function"&&oi instanceof oi&&typeof Mi=="function"&&Mi instanceof Mi)&&(Dt=!1)}return ne.delete(l),ne.delete(y),Dt}function Bo(l){return Lp(Q1(l,e,lx),l+"")}function kp(l){return f1(l,xr,Ep)}function Ap(l){return f1(l,vi,K1)}var Sp=su?function(l){return su.get(l)}:Gp;function wu(l){for(var y=l.name+"",T=Na[y],H=un.call(Na,y)?T.length:0;H--;){var Y=T[H],ne=Y.func;if(ne==null||ne==l)return Y.name}return y}function za(l){var y=un.call(te,"placeholder")?te:l;return y.placeholder}function bt(){var l=te.iteratee||Up;return l=l===Up?m1:l,arguments.length?l(arguments[0],arguments[1]):l}function xu(l,y){var T=l.__data__;return l2(y)?T[typeof y=="string"?"string":"hash"]:T.map}function $p(l){for(var y=xr(l),T=y.length;T--;){var H=y[T],Y=l[H];y[T]=[H,Y,J1(Y)]}return y}function Ys(l,y){var T=ce(l,y);return g1(T)?T:e}function t2(l){var y=un.call(l,Us),T=l[Us];try{l[Us]=e;var H=!0}catch{}var Y=Zc.call(l);return H&&(y?l[Us]=T:delete l[Us]),Y}var Ep=tp?function(l){return l==null?[]:(l=Wt(l),Er(tp(l),function(y){return e1.call(l,y)}))}:qp,K1=tp?function(l){for(var y=[];l;)S(y,Ep(l)),l=tu(l);return y}:qp,Hr=ri;(np&&Hr(new np(new ArrayBuffer(1)))!=Xn||Sl&&Hr(new Sl)!=ut||rp&&Hr(rp.resolve())!=cr||Oa&&Hr(new Oa)!=yn||$l&&Hr(new $l)!=Tt)&&(Hr=function(l){var y=ri(l),T=y==Rt?l.constructor:e,H=T?Xs(T):"";if(H)switch(H){case PO:return Xn;case FO:return ut;case zO:return cr;case BO:return yn;case WO:return Tt}return y});function n2(l,y,T){for(var H=-1,Y=T.length;++H<Y;){var ne=T[H],de=ne.size;switch(ne.type){case"drop":l+=de;break;case"dropRight":y-=de;break;case"take":y=jr(y,l+de);break;case"takeRight":l=vr(l,y-de);break}}return{start:l,end:y}}function r2(l){var y=l.match(go);return y?y[1].split(mo):[]}function Y1(l,y,T){y=os(y,l);for(var H=-1,Y=y.length,ne=!1;++H<Y;){var de=lo(y[H]);if(!(ne=l!=null&&T(l,de)))break;l=l[de]}return ne||++H!=Y?ne:(Y=l==null?0:l.length,!!Y&&Eu(Y)&&Wo(de,Y)&&(Mt(l)||Js(l)))}function i2(l){var y=l.length,T=new l.constructor(y);return y&&typeof l[0]=="string"&&un.call(l,"index")&&(T.index=l.index,T.input=l.input),T}function X1(l){return typeof l.constructor=="function"&&!Dl(l)?Da(tu(l)):{}}function o2(l,y,T){var H=l.constructor;switch(y){case Dn:return xp(l);case $e:case Re:return new H(+l);case Xn:return jN(l,T);case hr:case bn:case Hn:case Pn:case Xt:case an:case Dr:case Zr:case Ar:return L1(l,T);case ut:return new H;case Ht:case ur:return new H(l);case kr:return HN(l);case yn:return new H;case mt:return UN(l)}}function s2(l,y){var T=y.length;if(!T)return l;var H=T-1;return y[H]=(T>1?"& ":"")+y[H],y=y.join(T>2?", ":" "),l.replace(hi,`{
1460
- /* [wrapped with `+y+`] */
1461
- `)}function a2(l){return Mt(l)||Js(l)||!!(t1&&l&&l[t1])}function Wo(l,y){var T=typeof l;return y=y??V,!!y&&(T=="number"||T!="symbol"&&Ne.test(l))&&l>-1&&l%1==0&&l<y}function ii(l,y,T){if(!Wn(T))return!1;var H=typeof y;return(H=="number"?mi(T)&&Wo(y,T.length):H=="string"&&y in T)?co(T[y],l):!1}function Rp(l,y){if(Mt(l))return!1;var T=typeof l;return T=="number"||T=="symbol"||T=="boolean"||l==null||Ri(l)?!0:En.test(l)||!ui.test(l)||y!=null&&l in Wt(y)}function l2(l){var y=typeof l;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?l!=="__proto__":l===null}function Tp(l){var y=wu(l),T=te[y];if(typeof T!="function"||!(y in qt.prototype))return!1;if(l===T)return!0;var H=Sp(T);return!!H&&l===H[0]}function c2(l){return!!Jw&&Jw in l}var u2=Xc?jo:Kp;function Dl(l){var y=l&&l.constructor,T=typeof y=="function"&&y.prototype||Do;return l===T}function J1(l){return l===l&&!Wn(l)}function Z1(l,y){return function(T){return T==null?!1:T[l]===y&&(y!==e||l in Wt(T))}}function h2(l){var y=Su(l,function(H){return T.size===i&&T.clear(),H}),T=y.cache;return y}function d2(l,y){var T=l[1],H=y[1],Y=T|H,ne=Y<(w|x|N),de=H==N&&T==$||H==N&&T==I&&l[7].length<=y[8]||H==(N|I)&&y[7].length<=y[8]&&T==$;if(!(ne||de))return l;H&w&&(l[2]=y[2],Y|=T&w?0:R);var fe=y[3];if(fe){var we=l[3];l[3]=we?O1(we,fe,y[4]):fe,l[4]=we?qe(l[3],a):y[4]}return fe=y[5],fe&&(we=l[5],l[5]=we?N1(we,fe,y[6]):fe,l[6]=we?qe(l[5],a):y[6]),fe=y[7],fe&&(l[7]=fe),H&N&&(l[8]=l[8]==null?y[8]:jr(l[8],y[8])),l[9]==null&&(l[9]=y[9]),l[0]=y[0],l[1]=Y,l}function f2(l){var y=[];if(l!=null)for(var T in Wt(l))y.push(T);return y}function p2(l){return Zc.call(l)}function Q1(l,y,T){return y=vr(y===e?l.length-1:y,0),function(){for(var H=arguments,Y=-1,ne=vr(H.length-y,0),de=Se(ne);++Y<ne;)de[Y]=H[y+Y];Y=-1;for(var fe=Se(y+1);++Y<y;)fe[Y]=H[Y];return fe[y]=T(de),ln(l,this,fe)}}function ex(l,y){return y.length<2?l:Ks(l,Ui(y,0,-1))}function g2(l,y){for(var T=l.length,H=jr(y.length,T),Y=gi(l);H--;){var ne=y[H];l[H]=Wo(ne,T)?Y[ne]:e}return l}function Mp(l,y){if(!(y==="constructor"&&typeof l[y]=="function")&&y!="__proto__")return l[y]}var tx=rx(k1),Pl=TO||function(l,y){return zt.setTimeout(l,y)},Lp=rx(FN);function nx(l,y,T){var H=y+"";return Lp(l,s2(H,m2(r2(H),T)))}function rx(l){var y=0,T=0;return function(){var H=OO(),Y=A-(H-T);if(T=H,Y>0){if(++y>=D)return arguments[0]}else y=0;return l.apply(e,arguments)}}function Cu(l,y){var T=-1,H=l.length,Y=H-1;for(y=y===e?H:y;++T<y;){var ne=pp(T,Y),de=l[ne];l[ne]=l[T],l[T]=de}return l.length=y,l}var ix=h2(function(l){var y=[];return l.charCodeAt(0)===46&&y.push(""),l.replace(Sr,function(T,H,Y,ne){y.push(Y?ne.replace(di,"$1"):H||T)}),y});function lo(l){if(typeof l=="string"||Ri(l))return l;var y=l+"";return y=="0"&&1/l==-U?"-0":y}function Xs(l){if(l!=null){try{return Jc.call(l)}catch{}try{return l+""}catch{}}return""}function m2(l,y){return gr(se,function(T){var H="_."+T[0];y&T[1]&&!fi(l,H)&&l.push(H)}),l.sort()}function ox(l){if(l instanceof qt)return l.clone();var y=new ji(l.__wrapped__,l.__chain__);return y.__actions__=gi(l.__actions__),y.__index__=l.__index__,y.__values__=l.__values__,y}function v2(l,y,T){(T?ii(l,y,T):y===e)?y=1:y=vr(Nt(y),0);var H=l==null?0:l.length;if(!H||y<1)return[];for(var Y=0,ne=0,de=Se(iu(H/y));Y<H;)de[ne++]=Ui(l,Y,Y+=y);return de}function y2(l){for(var y=-1,T=l==null?0:l.length,H=0,Y=[];++y<T;){var ne=l[y];ne&&(Y[H++]=ne)}return Y}function b2(){var l=arguments.length;if(!l)return[];for(var y=Se(l-1),T=arguments[0],H=l;H--;)y[H-1]=arguments[H];return S(Mt(T)?gi(T):[T],Mr(y,1))}var w2=jt(function(l,y){return Zn(l)?Ml(l,Mr(y,1,Zn,!0)):[]}),x2=jt(function(l,y){var T=Vi(y);return Zn(T)&&(T=e),Zn(l)?Ml(l,Mr(y,1,Zn,!0),bt(T,2)):[]}),C2=jt(function(l,y){var T=Vi(y);return Zn(T)&&(T=e),Zn(l)?Ml(l,Mr(y,1,Zn,!0),e,T):[]});function _2(l,y,T){var H=l==null?0:l.length;return H?(y=T||y===e?1:Nt(y),Ui(l,y<0?0:y,H)):[]}function k2(l,y,T){var H=l==null?0:l.length;return H?(y=T||y===e?1:Nt(y),y=H-y,Ui(l,0,y<0?0:y)):[]}function A2(l,y){return l&&l.length?pu(l,bt(y,3),!0,!0):[]}function S2(l,y){return l&&l.length?pu(l,bt(y,3),!0):[]}function $2(l,y,T,H){var Y=l==null?0:l.length;return Y?(T&&typeof T!="number"&&ii(l,y,T)&&(T=0,H=Y),bN(l,y,T,H)):[]}function sx(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=T==null?0:Nt(T);return Y<0&&(Y=vr(H+Y,0)),he(l,bt(y,3),Y)}function ax(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=H-1;return T!==e&&(Y=Nt(T),Y=T<0?vr(H+Y,0):jr(Y,H-1)),he(l,bt(y,3),Y,!0)}function lx(l){var y=l==null?0:l.length;return y?Mr(l,1):[]}function E2(l){var y=l==null?0:l.length;return y?Mr(l,U):[]}function R2(l,y){var T=l==null?0:l.length;return T?(y=y===e?1:Nt(y),Mr(l,y)):[]}function T2(l){for(var y=-1,T=l==null?0:l.length,H={};++y<T;){var Y=l[y];ko(H,Y[0],Y[1])}return H}function cx(l){return l&&l.length?l[0]:e}function M2(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=T==null?0:Nt(T);return Y<0&&(Y=vr(H+Y,0)),be(l,y,Y)}function L2(l){var y=l==null?0:l.length;return y?Ui(l,0,-1):[]}var I2=jt(function(l){var y=E(l,bp);return y.length&&y[0]===l[0]?cp(y):[]}),O2=jt(function(l){var y=Vi(l),T=E(l,bp);return y===Vi(T)?y=e:T.pop(),T.length&&T[0]===l[0]?cp(T,bt(y,2)):[]}),N2=jt(function(l){var y=Vi(l),T=E(l,bp);return y=typeof y=="function"?y:e,y&&T.pop(),T.length&&T[0]===l[0]?cp(T,e,y):[]});function D2(l,y){return l==null?"":LO.call(l,y)}function Vi(l){var y=l==null?0:l.length;return y?l[y-1]:e}function P2(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=H;return T!==e&&(Y=Nt(T),Y=Y<0?vr(H+Y,0):jr(Y,H-1)),y===y?Zt(l,y,Y):he(l,ye,Y,!0)}function F2(l,y){return l&&l.length?w1(l,Nt(y)):e}var z2=jt(ux);function ux(l,y){return l&&l.length&&y&&y.length?fp(l,y):l}function B2(l,y,T){return l&&l.length&&y&&y.length?fp(l,y,bt(T,2)):l}function W2(l,y,T){return l&&l.length&&y&&y.length?fp(l,y,e,T):l}var j2=Bo(function(l,y){var T=l==null?0:l.length,H=op(l,y);return _1(l,E(y,function(Y){return Wo(Y,T)?+Y:Y}).sort(I1)),H});function H2(l,y){var T=[];if(!(l&&l.length))return T;var H=-1,Y=[],ne=l.length;for(y=bt(y,3);++H<ne;){var de=l[H];y(de,H,l)&&(T.push(de),Y.push(H))}return _1(l,Y),T}function Ip(l){return l==null?l:DO.call(l)}function U2(l,y,T){var H=l==null?0:l.length;return H?(T&&typeof T!="number"&&ii(l,y,T)?(y=0,T=H):(y=y==null?0:Nt(y),T=T===e?H:Nt(T)),Ui(l,y,T)):[]}function V2(l,y){return fu(l,y)}function G2(l,y,T){return mp(l,y,bt(T,2))}function q2(l,y){var T=l==null?0:l.length;if(T){var H=fu(l,y);if(H<T&&co(l[H],y))return H}return-1}function K2(l,y){return fu(l,y,!0)}function Y2(l,y,T){return mp(l,y,bt(T,2),!0)}function X2(l,y){var T=l==null?0:l.length;if(T){var H=fu(l,y,!0)-1;if(co(l[H],y))return H}return-1}function J2(l){return l&&l.length?A1(l):[]}function Z2(l,y){return l&&l.length?A1(l,bt(y,2)):[]}function Q2(l){var y=l==null?0:l.length;return y?Ui(l,1,y):[]}function eD(l,y,T){return l&&l.length?(y=T||y===e?1:Nt(y),Ui(l,0,y<0?0:y)):[]}function tD(l,y,T){var H=l==null?0:l.length;return H?(y=T||y===e?1:Nt(y),y=H-y,Ui(l,y<0?0:y,H)):[]}function nD(l,y){return l&&l.length?pu(l,bt(y,3),!1,!0):[]}function rD(l,y){return l&&l.length?pu(l,bt(y,3)):[]}var iD=jt(function(l){return is(Mr(l,1,Zn,!0))}),oD=jt(function(l){var y=Vi(l);return Zn(y)&&(y=e),is(Mr(l,1,Zn,!0),bt(y,2))}),sD=jt(function(l){var y=Vi(l);return y=typeof y=="function"?y:e,is(Mr(l,1,Zn,!0),e,y)});function aD(l){return l&&l.length?is(l):[]}function lD(l,y){return l&&l.length?is(l,bt(y,2)):[]}function cD(l,y){return y=typeof y=="function"?y:e,l&&l.length?is(l,e,y):[]}function Op(l){if(!(l&&l.length))return[];var y=0;return l=Er(l,function(T){if(Zn(T))return y=vr(T.length,y),!0}),st(y,function(T){return E(l,Oe(T))})}function hx(l,y){if(!(l&&l.length))return[];var T=Op(l);return y==null?T:E(T,function(H){return ln(y,e,H)})}var uD=jt(function(l,y){return Zn(l)?Ml(l,y):[]}),hD=jt(function(l){return yp(Er(l,Zn))}),dD=jt(function(l){var y=Vi(l);return Zn(y)&&(y=e),yp(Er(l,Zn),bt(y,2))}),fD=jt(function(l){var y=Vi(l);return y=typeof y=="function"?y:e,yp(Er(l,Zn),e,y)}),pD=jt(Op);function gD(l,y){return R1(l||[],y||[],Tl)}function mD(l,y){return R1(l||[],y||[],Ol)}var vD=jt(function(l){var y=l.length,T=y>1?l[y-1]:e;return T=typeof T=="function"?(l.pop(),T):e,hx(l,T)});function dx(l){var y=te(l);return y.__chain__=!0,y}function yD(l,y){return y(l),l}function _u(l,y){return y(l)}var bD=Bo(function(l){var y=l.length,T=y?l[0]:0,H=this.__wrapped__,Y=function(ne){return op(ne,l)};return y>1||this.__actions__.length||!(H instanceof qt)||!Wo(T)?this.thru(Y):(H=H.slice(T,+T+(y?1:0)),H.__actions__.push({func:_u,args:[Y],thisArg:e}),new ji(H,this.__chain__).thru(function(ne){return y&&!ne.length&&ne.push(e),ne}))});function wD(){return dx(this)}function xD(){return new ji(this.value(),this.__chain__)}function CD(){this.__values__===e&&(this.__values__=Sx(this.value()));var l=this.__index__>=this.__values__.length,y=l?e:this.__values__[this.__index__++];return{done:l,value:y}}function _D(){return this}function kD(l){for(var y,T=this;T instanceof lu;){var H=ox(T);H.__index__=0,H.__values__=e,y?Y.__wrapped__=H:y=H;var Y=H;T=T.__wrapped__}return Y.__wrapped__=l,y}function AD(){var l=this.__wrapped__;if(l instanceof qt){var y=l;return this.__actions__.length&&(y=new qt(this)),y=y.reverse(),y.__actions__.push({func:_u,args:[Ip],thisArg:e}),new ji(y,this.__chain__)}return this.thru(Ip)}function SD(){return E1(this.__wrapped__,this.__actions__)}var $D=gu(function(l,y,T){un.call(l,T)?++l[T]:ko(l,T,1)});function ED(l,y,T){var H=Mt(l)?_o:yN;return T&&ii(l,y,T)&&(y=e),H(l,bt(y,3))}function RD(l,y){var T=Mt(l)?Er:h1;return T(l,bt(y,3))}var TD=z1(sx),MD=z1(ax);function LD(l,y){return Mr(ku(l,y),1)}function ID(l,y){return Mr(ku(l,y),U)}function OD(l,y,T){return T=T===e?1:Nt(T),Mr(ku(l,y),T)}function fx(l,y){var T=Mt(l)?gr:rs;return T(l,bt(y,3))}function px(l,y){var T=Mt(l)?Wr:u1;return T(l,bt(y,3))}var ND=gu(function(l,y,T){un.call(l,T)?l[T].push(y):ko(l,T,[y])});function DD(l,y,T,H){l=mi(l)?l:Wa(l),T=T&&!H?Nt(T):0;var Y=l.length;return T<0&&(T=vr(Y+T,0)),Ru(l)?T<=Y&&l.indexOf(y,T)>-1:!!Y&&be(l,y,T)>-1}var PD=jt(function(l,y,T){var H=-1,Y=typeof y=="function",ne=mi(l)?Se(l.length):[];return rs(l,function(de){ne[++H]=Y?ln(y,de,T):Ll(de,y,T)}),ne}),FD=gu(function(l,y,T){ko(l,T,y)});function ku(l,y){var T=Mt(l)?E:v1;return T(l,bt(y,3))}function zD(l,y,T,H){return l==null?[]:(Mt(y)||(y=y==null?[]:[y]),T=H?e:T,Mt(T)||(T=T==null?[]:[T]),x1(l,y,T))}var BD=gu(function(l,y,T){l[T?0:1].push(y)},function(){return[[],[]]});function WD(l,y,T){var H=Mt(l)?P:Xe,Y=arguments.length<3;return H(l,bt(y,4),T,Y,rs)}function jD(l,y,T){var H=Mt(l)?z:Xe,Y=arguments.length<3;return H(l,bt(y,4),T,Y,u1)}function HD(l,y){var T=Mt(l)?Er:h1;return T(l,$u(bt(y,3)))}function UD(l){var y=Mt(l)?s1:DN;return y(l)}function VD(l,y,T){(T?ii(l,y,T):y===e)?y=1:y=Nt(y);var H=Mt(l)?fN:PN;return H(l,y)}function GD(l){var y=Mt(l)?pN:zN;return y(l)}function qD(l){if(l==null)return 0;if(mi(l))return Ru(l)?Bt(l):l.length;var y=Hr(l);return y==ut||y==yn?l.size:hp(l).length}function KD(l,y,T){var H=Mt(l)?j:BN;return T&&ii(l,y,T)&&(y=e),H(l,bt(y,3))}var YD=jt(function(l,y){if(l==null)return[];var T=y.length;return T>1&&ii(l,y[0],y[1])?y=[]:T>2&&ii(y[0],y[1],y[2])&&(y=[y[0]]),x1(l,Mr(y,1),[])}),Au=RO||function(){return zt.Date.now()};function XD(l,y){if(typeof y!="function")throw new An(p);return l=Nt(l),function(){if(--l<1)return y.apply(this,arguments)}}function gx(l,y,T){return y=T?e:y,y=l&&y==null?l.length:y,zo(l,N,e,e,e,e,y)}function mx(l,y){var T;if(typeof y!="function")throw new An(p);return l=Nt(l),function(){return--l>0&&(T=y.apply(this,arguments)),l<=1&&(y=e),T}}var Np=jt(function(l,y,T){var H=w;if(T.length){var Y=qe(T,za(Np));H|=C}return zo(l,H,y,T,Y)}),vx=jt(function(l,y,T){var H=w|x;if(T.length){var Y=qe(T,za(vx));H|=C}return zo(y,H,l,T,Y)});function yx(l,y,T){y=T?e:y;var H=zo(l,$,e,e,e,e,e,y);return H.placeholder=yx.placeholder,H}function bx(l,y,T){y=T?e:y;var H=zo(l,k,e,e,e,e,e,y);return H.placeholder=bx.placeholder,H}function wx(l,y,T){var H,Y,ne,de,fe,we,Me=0,Ie=!1,Pe=!1,Qe=!0;if(typeof l!="function")throw new An(p);y=Gi(y)||0,Wn(T)&&(Ie=!!T.leading,Pe="maxWait"in T,ne=Pe?vr(Gi(T.maxWait)||0,y):ne,Qe="trailing"in T?!!T.trailing:Qe);function ht(Qn){var uo=H,Uo=Y;return H=Y=e,Me=Qn,de=l.apply(Uo,uo),de}function wt(Qn){return Me=Qn,fe=Pl(Ut,y),Ie?ht(Qn):de}function Dt(Qn){var uo=Qn-we,Uo=Qn-Me,Bx=y-uo;return Pe?jr(Bx,ne-Uo):Bx}function yt(Qn){var uo=Qn-we,Uo=Qn-Me;return we===e||uo>=y||uo<0||Pe&&Uo>=ne}function Ut(){var Qn=Au();if(yt(Qn))return Yt(Qn);fe=Pl(Ut,Dt(Qn))}function Yt(Qn){return fe=e,Qe&&H?ht(Qn):(H=Y=e,de)}function Ti(){fe!==e&&T1(fe),Me=0,H=we=Y=fe=e}function oi(){return fe===e?de:Yt(Au())}function Mi(){var Qn=Au(),uo=yt(Qn);if(H=arguments,Y=this,we=Qn,uo){if(fe===e)return wt(we);if(Pe)return T1(fe),fe=Pl(Ut,y),ht(we)}return fe===e&&(fe=Pl(Ut,y)),de}return Mi.cancel=Ti,Mi.flush=oi,Mi}var JD=jt(function(l,y){return c1(l,1,y)}),ZD=jt(function(l,y,T){return c1(l,Gi(y)||0,T)});function QD(l){return zo(l,M)}function Su(l,y){if(typeof l!="function"||y!=null&&typeof y!="function")throw new An(p);var T=function(){var H=arguments,Y=y?y.apply(this,H):H[0],ne=T.cache;if(ne.has(Y))return ne.get(Y);var de=l.apply(this,H);return T.cache=ne.set(Y,de)||ne,de};return T.cache=new(Su.Cache||Fo),T}Su.Cache=Fo;function $u(l){if(typeof l!="function")throw new An(p);return function(){var y=arguments;switch(y.length){case 0:return!l.call(this);case 1:return!l.call(this,y[0]);case 2:return!l.call(this,y[0],y[1]);case 3:return!l.call(this,y[0],y[1],y[2])}return!l.apply(this,y)}}function eP(l){return mx(2,l)}var tP=WN(function(l,y){y=y.length==1&&Mt(y[0])?E(y[0],Jt(bt())):E(Mr(y,1),Jt(bt()));var T=y.length;return jt(function(H){for(var Y=-1,ne=jr(H.length,T);++Y<ne;)H[Y]=y[Y].call(this,H[Y]);return ln(l,this,H)})}),Dp=jt(function(l,y){var T=qe(y,za(Dp));return zo(l,C,e,y,T)}),xx=jt(function(l,y){var T=qe(y,za(xx));return zo(l,O,e,y,T)}),nP=Bo(function(l,y){return zo(l,I,e,e,e,y)});function rP(l,y){if(typeof l!="function")throw new An(p);return y=y===e?y:Nt(y),jt(l,y)}function iP(l,y){if(typeof l!="function")throw new An(p);return y=y==null?0:vr(Nt(y),0),jt(function(T){var H=T[y],Y=ss(T,0,y);return H&&S(Y,H),ln(l,this,Y)})}function oP(l,y,T){var H=!0,Y=!0;if(typeof l!="function")throw new An(p);return Wn(T)&&(H="leading"in T?!!T.leading:H,Y="trailing"in T?!!T.trailing:Y),wx(l,y,{leading:H,maxWait:y,trailing:Y})}function sP(l){return gx(l,1)}function aP(l,y){return Dp(wp(y),l)}function lP(){if(!arguments.length)return[];var l=arguments[0];return Mt(l)?l:[l]}function cP(l){return Hi(l,o)}function uP(l,y){return y=typeof y=="function"?y:e,Hi(l,o,y)}function hP(l){return Hi(l,u|o)}function dP(l,y){return y=typeof y=="function"?y:e,Hi(l,u|o,y)}function fP(l,y){return y==null||l1(l,y,xr(y))}function co(l,y){return l===y||l!==l&&y!==y}var pP=bu(lp),gP=bu(function(l,y){return l>=y}),Js=p1((function(){return arguments})())?p1:function(l){return Gn(l)&&un.call(l,"callee")&&!e1.call(l,"callee")},Mt=Se.isArray,mP=ts?Jt(ts):kN;function mi(l){return l!=null&&Eu(l.length)&&!jo(l)}function Zn(l){return Gn(l)&&mi(l)}function vP(l){return l===!0||l===!1||Gn(l)&&ri(l)==$e}var as=MO||Kp,yP=Vn?Jt(Vn):AN;function bP(l){return Gn(l)&&l.nodeType===1&&!Fl(l)}function wP(l){if(l==null)return!0;if(mi(l)&&(Mt(l)||typeof l=="string"||typeof l.splice=="function"||as(l)||Ba(l)||Js(l)))return!l.length;var y=Hr(l);if(y==ut||y==yn)return!l.size;if(Dl(l))return!hp(l).length;for(var T in l)if(un.call(l,T))return!1;return!0}function xP(l,y){return Il(l,y)}function CP(l,y,T){T=typeof T=="function"?T:e;var H=T?T(l,y):e;return H===e?Il(l,y,e,T):!!H}function Pp(l){if(!Gn(l))return!1;var y=ri(l);return y==Ge||y==Ye||typeof l.message=="string"&&typeof l.name=="string"&&!Fl(l)}function _P(l){return typeof l=="number"&&n1(l)}function jo(l){if(!Wn(l))return!1;var y=ri(l);return y==at||y==it||y==ve||y==Mn}function Cx(l){return typeof l=="number"&&l==Nt(l)}function Eu(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=V}function Wn(l){var y=typeof l;return l!=null&&(y=="object"||y=="function")}function Gn(l){return l!=null&&typeof l=="object"}var _x=Si?Jt(Si):$N;function kP(l,y){return l===y||up(l,y,$p(y))}function AP(l,y,T){return T=typeof T=="function"?T:e,up(l,y,$p(y),T)}function SP(l){return kx(l)&&l!=+l}function $P(l){if(u2(l))throw new gt(h);return g1(l)}function EP(l){return l===null}function RP(l){return l==null}function kx(l){return typeof l=="number"||Gn(l)&&ri(l)==Ht}function Fl(l){if(!Gn(l)||ri(l)!=Rt)return!1;var y=tu(l);if(y===null)return!0;var T=un.call(y,"constructor")&&y.constructor;return typeof T=="function"&&T instanceof T&&Jc.call(T)==AO}var Fp=$i?Jt($i):EN;function TP(l){return Cx(l)&&l>=-V&&l<=V}var Ax=Bi?Jt(Bi):RN;function Ru(l){return typeof l=="string"||!Mt(l)&&Gn(l)&&ri(l)==ur}function Ri(l){return typeof l=="symbol"||Gn(l)&&ri(l)==mt}var Ba=Hs?Jt(Hs):TN;function MP(l){return l===e}function LP(l){return Gn(l)&&Hr(l)==Tt}function IP(l){return Gn(l)&&ri(l)==en}var OP=bu(dp),NP=bu(function(l,y){return l<=y});function Sx(l){if(!l)return[];if(mi(l))return Ru(l)?Ct(l):gi(l);if(Al&&l[Al])return Te(l[Al]());var y=Hr(l),T=y==ut?Fe:y==yn?Ze:Wa;return T(l)}function Ho(l){if(!l)return l===0?l:0;if(l=Gi(l),l===U||l===-U){var y=l<0?-1:1;return y*K}return l===l?l:0}function Nt(l){var y=Ho(l),T=y%1;return y===y?T?y-T:y:0}function $x(l){return l?qs(Nt(l),0,ae):0}function Gi(l){if(typeof l=="number")return l;if(Ri(l))return ee;if(Wn(l)){var y=typeof l.valueOf=="function"?l.valueOf():l;l=Wn(y)?y+"":y}if(typeof l!="string")return l===0?l:+l;l=St(l);var T=dr.test(l);return T||le.test(l)?kt(l.slice(2),T?2:8):Mo.test(l)?ee:+l}function Ex(l){return So(l,vi(l))}function DP(l){return l?qs(Nt(l),-V,V):l===0?l:0}function hn(l){return l==null?"":Ei(l)}var PP=Pa(function(l,y){if(Dl(y)||mi(y)){So(y,xr(y),l);return}for(var T in y)un.call(y,T)&&Tl(l,T,y[T])}),Rx=Pa(function(l,y){So(y,vi(y),l)}),Tx=Pa(function(l,y,T,H){So(y,vi(y),l,H)}),zp=Pa(function(l,y,T,H){So(y,xr(y),l,H)}),FP=Bo(op);function zP(l,y){var T=Da(l);return y==null?T:a1(T,y)}var BP=jt(function(l,y){l=Wt(l);var T=-1,H=y.length,Y=H>2?y[2]:e;for(Y&&ii(y[0],y[1],Y)&&(H=1);++T<H;)for(var ne=y[T],de=vi(ne),fe=-1,we=de.length;++fe<we;){var Me=de[fe],Ie=l[Me];(Ie===e||co(Ie,Do[Me])&&!un.call(l,Me))&&(l[Me]=ne[Me])}return l}),WP=jt(function(l){return l.push(e,G1),ln(Mx,e,l)});function jP(l,y){return re(l,bt(y,3),Ao)}function HP(l,y){return re(l,bt(y,3),ap)}function UP(l,y){return l==null?l:sp(l,bt(y,3),vi)}function VP(l,y){return l==null?l:d1(l,bt(y,3),vi)}function GP(l,y){return l&&Ao(l,bt(y,3))}function qP(l,y){return l&&ap(l,bt(y,3))}function KP(l){return l==null?[]:hu(l,xr(l))}function YP(l){return l==null?[]:hu(l,vi(l))}function Bp(l,y,T){var H=l==null?e:Ks(l,y);return H===e?T:H}function XP(l,y){return l!=null&&Y1(l,y,wN)}function Wp(l,y){return l!=null&&Y1(l,y,xN)}var JP=W1(function(l,y,T){y!=null&&typeof y.toString!="function"&&(y=Zc.call(y)),l[y]=T},Hp(yi)),ZP=W1(function(l,y,T){y!=null&&typeof y.toString!="function"&&(y=Zc.call(y)),un.call(l,y)?l[y].push(T):l[y]=[T]},bt),QP=jt(Ll);function xr(l){return mi(l)?o1(l):hp(l)}function vi(l){return mi(l)?o1(l,!0):MN(l)}function eF(l,y){var T={};return y=bt(y,3),Ao(l,function(H,Y,ne){ko(T,y(H,Y,ne),H)}),T}function tF(l,y){var T={};return y=bt(y,3),Ao(l,function(H,Y,ne){ko(T,Y,y(H,Y,ne))}),T}var nF=Pa(function(l,y,T){du(l,y,T)}),Mx=Pa(function(l,y,T,H){du(l,y,T,H)}),rF=Bo(function(l,y){var T={};if(l==null)return T;var H=!1;y=E(y,function(ne){return ne=os(ne,l),H||(H=ne.length>1),ne}),So(l,Ap(l),T),H&&(T=Hi(T,u|g|o,ZN));for(var Y=y.length;Y--;)vp(T,y[Y]);return T});function iF(l,y){return Lx(l,$u(bt(y)))}var oF=Bo(function(l,y){return l==null?{}:IN(l,y)});function Lx(l,y){if(l==null)return{};var T=E(Ap(l),function(H){return[H]});return y=bt(y),C1(l,T,function(H,Y){return y(H,Y[0])})}function sF(l,y,T){y=os(y,l);var H=-1,Y=y.length;for(Y||(Y=1,l=e);++H<Y;){var ne=l==null?e:l[lo(y[H])];ne===e&&(H=Y,ne=T),l=jo(ne)?ne.call(l):ne}return l}function aF(l,y,T){return l==null?l:Ol(l,y,T)}function lF(l,y,T,H){return H=typeof H=="function"?H:e,l==null?l:Ol(l,y,T,H)}var Ix=U1(xr),Ox=U1(vi);function cF(l,y,T){var H=Mt(l),Y=H||as(l)||Ba(l);if(y=bt(y,4),T==null){var ne=l&&l.constructor;Y?T=H?new ne:[]:Wn(l)?T=jo(ne)?Da(tu(l)):{}:T={}}return(Y?gr:Ao)(l,function(de,fe,we){return y(T,de,fe,we)}),T}function uF(l,y){return l==null?!0:vp(l,y)}function hF(l,y,T){return l==null?l:$1(l,y,wp(T))}function dF(l,y,T,H){return H=typeof H=="function"?H:e,l==null?l:$1(l,y,wp(T),H)}function Wa(l){return l==null?[]:Lt(l,xr(l))}function fF(l){return l==null?[]:Lt(l,vi(l))}function pF(l,y,T){return T===e&&(T=y,y=e),T!==e&&(T=Gi(T),T=T===T?T:0),y!==e&&(y=Gi(y),y=y===y?y:0),qs(Gi(l),y,T)}function gF(l,y,T){return y=Ho(y),T===e?(T=y,y=0):T=Ho(T),l=Gi(l),CN(l,y,T)}function mF(l,y,T){if(T&&typeof T!="boolean"&&ii(l,y,T)&&(y=T=e),T===e&&(typeof y=="boolean"?(T=y,y=e):typeof l=="boolean"&&(T=l,l=e)),l===e&&y===e?(l=0,y=1):(l=Ho(l),y===e?(y=l,l=0):y=Ho(y)),l>y){var H=l;l=y,y=H}if(T||l%1||y%1){var Y=r1();return jr(l+Y*(y-l+kn("1e-"+((Y+"").length-1))),y)}return pp(l,y)}var vF=Fa(function(l,y,T){return y=y.toLowerCase(),l+(T?Nx(y):y)});function Nx(l){return jp(hn(l).toLowerCase())}function Dx(l){return l=hn(l),l&&l.replace(He,G).replace(oo,"")}function yF(l,y,T){l=hn(l),y=Ei(y);var H=l.length;T=T===e?H:qs(Nt(T),0,H);var Y=T;return T-=y.length,T>=0&&l.slice(T,Y)==y}function bF(l){return l=hn(l),l&&ei.test(l)?l.replace(Qr,J):l}function wF(l){return l=hn(l),l&&Fn.test(l)?l.replace(Pr,"\\$&"):l}var xF=Fa(function(l,y,T){return l+(T?"-":"")+y.toLowerCase()}),CF=Fa(function(l,y,T){return l+(T?" ":"")+y.toLowerCase()}),_F=F1("toLowerCase");function kF(l,y,T){l=hn(l),y=Nt(y);var H=y?Bt(l):0;if(!y||H>=y)return l;var Y=(y-H)/2;return yu(ou(Y),T)+l+yu(iu(Y),T)}function AF(l,y,T){l=hn(l),y=Nt(y);var H=y?Bt(l):0;return y&&H<y?l+yu(y-H,T):l}function SF(l,y,T){l=hn(l),y=Nt(y);var H=y?Bt(l):0;return y&&H<y?yu(y-H,T)+l:l}function $F(l,y,T){return T||y==null?y=0:y&&(y=+y),NO(hn(l).replace(_n,""),y||0)}function EF(l,y,T){return(T?ii(l,y,T):y===e)?y=1:y=Nt(y),gp(hn(l),y)}function RF(){var l=arguments,y=hn(l[0]);return l.length<3?y:y.replace(l[1],l[2])}var TF=Fa(function(l,y,T){return l+(T?"_":"")+y.toLowerCase()});function MF(l,y,T){return T&&typeof T!="number"&&ii(l,y,T)&&(y=T=e),T=T===e?ae:T>>>0,T?(l=hn(l),l&&(typeof y=="string"||y!=null&&!Fp(y))&&(y=Ei(y),!y&&ge(l))?ss(Ct(l),0,T):l.split(y,T)):[]}var LF=Fa(function(l,y,T){return l+(T?" ":"")+jp(y)});function IF(l,y,T){return l=hn(l),T=T==null?0:qs(Nt(T),0,l.length),y=Ei(y),l.slice(T,T+y.length)==y}function OF(l,y,T){var H=te.templateSettings;T&&ii(l,y,T)&&(y=e),l=hn(l),y=zp({},y,H,V1);var Y=zp({},y.imports,H.imports,V1),ne=xr(Y),de=Lt(Y,ne);gr(ne,function(yt){if(Fr.test(yt))throw new gt(s)});var fe,we,Me=0,Ie=y.interpolate||xt,Pe="__p += '",Qe=pi((y.escape||xt).source+"|"+Ie.source+"|"+(Ie===Ro?ti:xt).source+"|"+(y.evaluate||xt).source+"|$","g"),ht="//# sourceURL="+(un.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++js+"]")+`
1462
- `;l.replace(Qe,function(yt,Ut,Yt,Ti,oi,Mi){return Yt||(Yt=Ti),Pe+=l.slice(Me,Mi).replace(wn,ie),Ut&&(fe=!0,Pe+=`' +
1463
- __e(`+Ut+`) +
1464
- '`),oi&&(we=!0,Pe+=`';
1465
- `+oi+`;
1466
- __p += '`),Yt&&(Pe+=`' +
1467
- ((__t = (`+Yt+`)) == null ? '' : __t) +
1468
- '`),Me=Mi+yt.length,yt}),Pe+=`';
1469
- `;var wt=un.call(y,"variable")&&y.variable;if(!wt)Pe=`with (obj) {
1470
- `+Pe+`
1471
- }
1472
- `;else if(Fr.test(wt))throw new gt(v);Pe=(we?Pe.replace(Ci,""):Pe).replace(_i,"$1").replace(nr,"$1;"),Pe="function("+(wt||"obj")+`) {
1473
- `+(wt?"":`obj || (obj = {});
1474
- `)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(we?`, __j = Array.prototype.join;
1475
- function print() { __p += __j.call(arguments, '') }
1476
- `:`;
1477
- `)+Pe+`return __p
1478
- }`;var Dt=Fx(function(){return Et(ne,ht+"return "+Pe).apply(e,de)});if(Dt.source=Pe,Pp(Dt))throw Dt;return Dt}function NF(l){return hn(l).toLowerCase()}function DF(l){return hn(l).toUpperCase()}function PF(l,y,T){if(l=hn(l),l&&(T||y===e))return St(l);if(!l||!(y=Ei(y)))return l;var H=Ct(l),Y=Ct(y),ne=ir(H,Y),de=mr(H,Y)+1;return ss(H,ne,de).join("")}function FF(l,y,T){if(l=hn(l),l&&(T||y===e))return l.slice(0,vt(l)+1);if(!l||!(y=Ei(y)))return l;var H=Ct(l),Y=mr(H,Ct(y))+1;return ss(H,0,Y).join("")}function zF(l,y,T){if(l=hn(l),l&&(T||y===e))return l.replace(_n,"");if(!l||!(y=Ei(y)))return l;var H=Ct(l),Y=ir(H,Ct(y));return ss(H,Y).join("")}function BF(l,y){var T=W,H=F;if(Wn(y)){var Y="separator"in y?y.separator:Y;T="length"in y?Nt(y.length):T,H="omission"in y?Ei(y.omission):H}l=hn(l);var ne=l.length;if(ge(l)){var de=Ct(l);ne=de.length}if(T>=ne)return l;var fe=T-Bt(H);if(fe<1)return H;var we=de?ss(de,0,fe).join(""):l.slice(0,fe);if(Y===e)return we+H;if(de&&(fe+=we.length-fe),Fp(Y)){if(l.slice(fe).search(Y)){var Me,Ie=we;for(Y.global||(Y=pi(Y.source,hn(Ft.exec(Y))+"g")),Y.lastIndex=0;Me=Y.exec(Ie);)var Pe=Me.index;we=we.slice(0,Pe===e?fe:Pe)}}else if(l.indexOf(Ei(Y),fe)!=fe){var Qe=we.lastIndexOf(Y);Qe>-1&&(we=we.slice(0,Qe))}return we+H}function WF(l){return l=hn(l),l&&Ls.test(l)?l.replace(no,dt):l}var jF=Fa(function(l,y,T){return l+(T?" ":"")+y.toUpperCase()}),jp=F1("toUpperCase");function Px(l,y,T){return l=hn(l),y=T?e:y,y===e?ke(l)?or(l):Z(l):l.match(y)||[]}var Fx=jt(function(l,y){try{return ln(l,e,y)}catch(T){return Pp(T)?T:new gt(T)}}),HF=Bo(function(l,y){return gr(y,function(T){T=lo(T),ko(l,T,Np(l[T],l))}),l});function UF(l){var y=l==null?0:l.length,T=bt();return l=y?E(l,function(H){if(typeof H[1]!="function")throw new An(p);return[T(H[0]),H[1]]}):[],jt(function(H){for(var Y=-1;++Y<y;){var ne=l[Y];if(ln(ne[0],this,H))return ln(ne[1],this,H)}})}function VF(l){return vN(Hi(l,u))}function Hp(l){return function(){return l}}function GF(l,y){return l==null||l!==l?y:l}var qF=B1(),KF=B1(!0);function yi(l){return l}function Up(l){return m1(typeof l=="function"?l:Hi(l,u))}function YF(l){return y1(Hi(l,u))}function XF(l,y){return b1(l,Hi(y,u))}var JF=jt(function(l,y){return function(T){return Ll(T,l,y)}}),ZF=jt(function(l,y){return function(T){return Ll(l,T,y)}});function Vp(l,y,T){var H=xr(y),Y=hu(y,H);T==null&&!(Wn(y)&&(Y.length||!H.length))&&(T=y,y=l,l=this,Y=hu(y,xr(y)));var ne=!(Wn(T)&&"chain"in T)||!!T.chain,de=jo(l);return gr(Y,function(fe){var we=y[fe];l[fe]=we,de&&(l.prototype[fe]=function(){var Me=this.__chain__;if(ne||Me){var Ie=l(this.__wrapped__),Pe=Ie.__actions__=gi(this.__actions__);return Pe.push({func:we,args:arguments,thisArg:l}),Ie.__chain__=Me,Ie}return we.apply(l,S([this.value()],arguments))})}),l}function QF(){return zt._===this&&(zt._=SO),this}function Gp(){}function ez(l){return l=Nt(l),jt(function(y){return w1(y,l)})}var tz=Cp(E),nz=Cp(_o),rz=Cp(j);function zx(l){return Rp(l)?Oe(lo(l)):ON(l)}function iz(l){return function(y){return l==null?e:Ks(l,y)}}var oz=j1(),sz=j1(!0);function qp(){return[]}function Kp(){return!1}function az(){return{}}function lz(){return""}function cz(){return!0}function uz(l,y){if(l=Nt(l),l<1||l>V)return[];var T=ae,H=jr(l,ae);y=bt(y),l-=ae;for(var Y=st(H,y);++T<l;)y(T);return Y}function hz(l){return Mt(l)?E(l,lo):Ri(l)?[l]:gi(ix(hn(l)))}function dz(l){var y=++kO;return hn(l)+y}var fz=vu(function(l,y){return l+y},0),pz=_p("ceil"),gz=vu(function(l,y){return l/y},1),mz=_p("floor");function vz(l){return l&&l.length?uu(l,yi,lp):e}function yz(l,y){return l&&l.length?uu(l,bt(y,2),lp):e}function bz(l){return xe(l,yi)}function wz(l,y){return xe(l,bt(y,2))}function xz(l){return l&&l.length?uu(l,yi,dp):e}function Cz(l,y){return l&&l.length?uu(l,bt(y,2),dp):e}var _z=vu(function(l,y){return l*y},1),kz=_p("round"),Az=vu(function(l,y){return l-y},0);function Sz(l){return l&&l.length?nt(l,yi):0}function $z(l,y){return l&&l.length?nt(l,bt(y,2)):0}return te.after=XD,te.ary=gx,te.assign=PP,te.assignIn=Rx,te.assignInWith=Tx,te.assignWith=zp,te.at=FP,te.before=mx,te.bind=Np,te.bindAll=HF,te.bindKey=vx,te.castArray=lP,te.chain=dx,te.chunk=v2,te.compact=y2,te.concat=b2,te.cond=UF,te.conforms=VF,te.constant=Hp,te.countBy=$D,te.create=zP,te.curry=yx,te.curryRight=bx,te.debounce=wx,te.defaults=BP,te.defaultsDeep=WP,te.defer=JD,te.delay=ZD,te.difference=w2,te.differenceBy=x2,te.differenceWith=C2,te.drop=_2,te.dropRight=k2,te.dropRightWhile=A2,te.dropWhile=S2,te.fill=$2,te.filter=RD,te.flatMap=LD,te.flatMapDeep=ID,te.flatMapDepth=OD,te.flatten=lx,te.flattenDeep=E2,te.flattenDepth=R2,te.flip=QD,te.flow=qF,te.flowRight=KF,te.fromPairs=T2,te.functions=KP,te.functionsIn=YP,te.groupBy=ND,te.initial=L2,te.intersection=I2,te.intersectionBy=O2,te.intersectionWith=N2,te.invert=JP,te.invertBy=ZP,te.invokeMap=PD,te.iteratee=Up,te.keyBy=FD,te.keys=xr,te.keysIn=vi,te.map=ku,te.mapKeys=eF,te.mapValues=tF,te.matches=YF,te.matchesProperty=XF,te.memoize=Su,te.merge=nF,te.mergeWith=Mx,te.method=JF,te.methodOf=ZF,te.mixin=Vp,te.negate=$u,te.nthArg=ez,te.omit=rF,te.omitBy=iF,te.once=eP,te.orderBy=zD,te.over=tz,te.overArgs=tP,te.overEvery=nz,te.overSome=rz,te.partial=Dp,te.partialRight=xx,te.partition=BD,te.pick=oF,te.pickBy=Lx,te.property=zx,te.propertyOf=iz,te.pull=z2,te.pullAll=ux,te.pullAllBy=B2,te.pullAllWith=W2,te.pullAt=j2,te.range=oz,te.rangeRight=sz,te.rearg=nP,te.reject=HD,te.remove=H2,te.rest=rP,te.reverse=Ip,te.sampleSize=VD,te.set=aF,te.setWith=lF,te.shuffle=GD,te.slice=U2,te.sortBy=YD,te.sortedUniq=J2,te.sortedUniqBy=Z2,te.split=MF,te.spread=iP,te.tail=Q2,te.take=eD,te.takeRight=tD,te.takeRightWhile=nD,te.takeWhile=rD,te.tap=yD,te.throttle=oP,te.thru=_u,te.toArray=Sx,te.toPairs=Ix,te.toPairsIn=Ox,te.toPath=hz,te.toPlainObject=Ex,te.transform=cF,te.unary=sP,te.union=iD,te.unionBy=oD,te.unionWith=sD,te.uniq=aD,te.uniqBy=lD,te.uniqWith=cD,te.unset=uF,te.unzip=Op,te.unzipWith=hx,te.update=hF,te.updateWith=dF,te.values=Wa,te.valuesIn=fF,te.without=uD,te.words=Px,te.wrap=aP,te.xor=hD,te.xorBy=dD,te.xorWith=fD,te.zip=pD,te.zipObject=gD,te.zipObjectDeep=mD,te.zipWith=vD,te.entries=Ix,te.entriesIn=Ox,te.extend=Rx,te.extendWith=Tx,Vp(te,te),te.add=fz,te.attempt=Fx,te.camelCase=vF,te.capitalize=Nx,te.ceil=pz,te.clamp=pF,te.clone=cP,te.cloneDeep=hP,te.cloneDeepWith=dP,te.cloneWith=uP,te.conformsTo=fP,te.deburr=Dx,te.defaultTo=GF,te.divide=gz,te.endsWith=yF,te.eq=co,te.escape=bF,te.escapeRegExp=wF,te.every=ED,te.find=TD,te.findIndex=sx,te.findKey=jP,te.findLast=MD,te.findLastIndex=ax,te.findLastKey=HP,te.floor=mz,te.forEach=fx,te.forEachRight=px,te.forIn=UP,te.forInRight=VP,te.forOwn=GP,te.forOwnRight=qP,te.get=Bp,te.gt=pP,te.gte=gP,te.has=XP,te.hasIn=Wp,te.head=cx,te.identity=yi,te.includes=DD,te.indexOf=M2,te.inRange=gF,te.invoke=QP,te.isArguments=Js,te.isArray=Mt,te.isArrayBuffer=mP,te.isArrayLike=mi,te.isArrayLikeObject=Zn,te.isBoolean=vP,te.isBuffer=as,te.isDate=yP,te.isElement=bP,te.isEmpty=wP,te.isEqual=xP,te.isEqualWith=CP,te.isError=Pp,te.isFinite=_P,te.isFunction=jo,te.isInteger=Cx,te.isLength=Eu,te.isMap=_x,te.isMatch=kP,te.isMatchWith=AP,te.isNaN=SP,te.isNative=$P,te.isNil=RP,te.isNull=EP,te.isNumber=kx,te.isObject=Wn,te.isObjectLike=Gn,te.isPlainObject=Fl,te.isRegExp=Fp,te.isSafeInteger=TP,te.isSet=Ax,te.isString=Ru,te.isSymbol=Ri,te.isTypedArray=Ba,te.isUndefined=MP,te.isWeakMap=LP,te.isWeakSet=IP,te.join=D2,te.kebabCase=xF,te.last=Vi,te.lastIndexOf=P2,te.lowerCase=CF,te.lowerFirst=_F,te.lt=OP,te.lte=NP,te.max=vz,te.maxBy=yz,te.mean=bz,te.meanBy=wz,te.min=xz,te.minBy=Cz,te.stubArray=qp,te.stubFalse=Kp,te.stubObject=az,te.stubString=lz,te.stubTrue=cz,te.multiply=_z,te.nth=F2,te.noConflict=QF,te.noop=Gp,te.now=Au,te.pad=kF,te.padEnd=AF,te.padStart=SF,te.parseInt=$F,te.random=mF,te.reduce=WD,te.reduceRight=jD,te.repeat=EF,te.replace=RF,te.result=sF,te.round=kz,te.runInContext=me,te.sample=UD,te.size=qD,te.snakeCase=TF,te.some=KD,te.sortedIndex=V2,te.sortedIndexBy=G2,te.sortedIndexOf=q2,te.sortedLastIndex=K2,te.sortedLastIndexBy=Y2,te.sortedLastIndexOf=X2,te.startCase=LF,te.startsWith=IF,te.subtract=Az,te.sum=Sz,te.sumBy=$z,te.template=OF,te.times=uz,te.toFinite=Ho,te.toInteger=Nt,te.toLength=$x,te.toLower=NF,te.toNumber=Gi,te.toSafeInteger=DP,te.toString=hn,te.toUpper=DF,te.trim=PF,te.trimEnd=FF,te.trimStart=zF,te.truncate=BF,te.unescape=WF,te.uniqueId=dz,te.upperCase=jF,te.upperFirst=jp,te.each=fx,te.eachRight=px,te.first=cx,Vp(te,(function(){var l={};return Ao(te,function(y,T){un.call(te.prototype,T)||(l[T]=y)}),l})(),{chain:!1}),te.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){te[l].placeholder=te}),gr(["drop","take"],function(l,y){qt.prototype[l]=function(T){T=T===e?1:vr(Nt(T),0);var H=this.__filtered__&&!y?new qt(this):this.clone();return H.__filtered__?H.__takeCount__=jr(T,H.__takeCount__):H.__views__.push({size:jr(T,ae),type:l+(H.__dir__<0?"Right":"")}),H},qt.prototype[l+"Right"]=function(T){return this.reverse()[l](T).reverse()}}),gr(["filter","map","takeWhile"],function(l,y){var T=y+1,H=T==_||T==B;qt.prototype[l]=function(Y){var ne=this.clone();return ne.__iteratees__.push({iteratee:bt(Y,3),type:T}),ne.__filtered__=ne.__filtered__||H,ne}}),gr(["head","last"],function(l,y){var T="take"+(y?"Right":"");qt.prototype[l]=function(){return this[T](1).value()[0]}}),gr(["initial","tail"],function(l,y){var T="drop"+(y?"":"Right");qt.prototype[l]=function(){return this.__filtered__?new qt(this):this[T](1)}}),qt.prototype.compact=function(){return this.filter(yi)},qt.prototype.find=function(l){return this.filter(l).head()},qt.prototype.findLast=function(l){return this.reverse().find(l)},qt.prototype.invokeMap=jt(function(l,y){return typeof l=="function"?new qt(this):this.map(function(T){return Ll(T,l,y)})}),qt.prototype.reject=function(l){return this.filter($u(bt(l)))},qt.prototype.slice=function(l,y){l=Nt(l);var T=this;return T.__filtered__&&(l>0||y<0)?new qt(T):(l<0?T=T.takeRight(-l):l&&(T=T.drop(l)),y!==e&&(y=Nt(y),T=y<0?T.dropRight(-y):T.take(y-l)),T)},qt.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},qt.prototype.toArray=function(){return this.take(ae)},Ao(qt.prototype,function(l,y){var T=/^(?:filter|find|map|reject)|While$/.test(y),H=/^(?:head|last)$/.test(y),Y=te[H?"take"+(y=="last"?"Right":""):y],ne=H||/^find/.test(y);Y&&(te.prototype[y]=function(){var de=this.__wrapped__,fe=H?[1]:arguments,we=de instanceof qt,Me=fe[0],Ie=we||Mt(de),Pe=function(Ut){var Yt=Y.apply(te,S([Ut],fe));return H&&Qe?Yt[0]:Yt};Ie&&T&&typeof Me=="function"&&Me.length!=1&&(we=Ie=!1);var Qe=this.__chain__,ht=!!this.__actions__.length,wt=ne&&!Qe,Dt=we&&!ht;if(!ne&&Ie){de=Dt?de:new qt(this);var yt=l.apply(de,fe);return yt.__actions__.push({func:_u,args:[Pe],thisArg:e}),new ji(yt,Qe)}return wt&&Dt?l.apply(this,fe):(yt=this.thru(Pe),wt?H?yt.value()[0]:yt.value():yt)})}),gr(["pop","push","shift","sort","splice","unshift"],function(l){var y=Wi[l],T=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",H=/^(?:pop|shift)$/.test(l);te.prototype[l]=function(){var Y=arguments;if(H&&!this.__chain__){var ne=this.value();return y.apply(Mt(ne)?ne:[],Y)}return this[T](function(de){return y.apply(Mt(de)?de:[],Y)})}}),Ao(qt.prototype,function(l,y){var T=te[y];if(T){var H=T.name+"";un.call(Na,H)||(Na[H]=[]),Na[H].push({name:y,func:T})}}),Na[mu(e,x).name]=[{name:"wrapper",func:e}],qt.prototype.clone=jO,qt.prototype.reverse=HO,qt.prototype.value=UO,te.prototype.at=bD,te.prototype.chain=wD,te.prototype.commit=xD,te.prototype.next=CD,te.prototype.plant=kD,te.prototype.reverse=AD,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=SD,te.prototype.first=te.prototype.head,Al&&(te.prototype[Al]=_D),te}),pn=cn();rr?((rr.exports=pn)._=pn,Br._=pn):zt._=pn}).call(wS)})(ic,ic.exports)),ic.exports}var CS=xS();Tn("T",rc(CS)).debounce(function(){this.rebuildDisplayText()},300);var tv={exports:{}},nv;function _S(){return nv||(nv=1,(function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()})(tv)),tv.exports}_S();const kS=!0,sr="u-",AS="uplot",SS=sr+"hz",$S=sr+"vt",ES=sr+"title",RS=sr+"wrap",TS=sr+"under",MS=sr+"over",LS=sr+"axis",bs=sr+"off",IS=sr+"select",OS=sr+"cursor-x",NS=sr+"cursor-y",DS=sr+"cursor-pt",PS=sr+"legend",FS=sr+"live",zS=sr+"inline",BS=sr+"series",WS=sr+"marker",rv=sr+"label",jS=sr+"value",nl="width",rl="height",il="top",iv="bottom",aa="left",lh="right",ch="#000",ov=ch+"0",uh="mousemove",sv="mousedown",hh="mouseup",av="mouseenter",lv="mouseleave",cv="dblclick",HS="resize",US="scroll",uv="change",oc="dppxchange",dh="--",la=typeof window<"u",fh=la?document:null,ca=la?window:null,VS=la?navigator:null;let rn,sc;function ph(){let n=devicePixelRatio;rn!=n&&(rn=n,sc&&vh(uv,sc,ph),sc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),ws(uv,sc,ph),ca.dispatchEvent(new CustomEvent(oc)))}function bi(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function gh(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function Sn(n,t,e){n.style[t]=e+"px"}function Xi(n,t,e,r){let d=fh.createElement(n);return t!=null&&bi(d,t),e?.insertBefore(d,r),d}function Ii(n,t){return Xi("div",n,t)}const hv=new WeakMap;function po(n,t,e,r,d){let h="translate("+t+"px,"+e+"px)",p=hv.get(n);h!=p&&(n.style.transform=h,hv.set(n,h),t<0||e<0||t>r||e>d?bi(n,bs):gh(n,bs))}const dv=new WeakMap;function fv(n,t,e){let r=t+e,d=dv.get(n);r!=d&&(dv.set(n,r),n.style.background=t,n.style.borderColor=e)}const pv=new WeakMap;function gv(n,t,e,r){let d=t+""+e,h=pv.get(n);d!=h&&(pv.set(n,d),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const mh={passive:!0},GS={...mh,capture:!0};function ws(n,t,e,r){t.addEventListener(n,e,r?GS:mh)}function vh(n,t,e,r){t.removeEventListener(n,e,mh)}la&&ph();function Ji(n,t,e,r){let d;e=e||0,r=r||t.length-1;let h=r<=2147483647;for(;r-e>1;)d=h?e+r>>1:xi((e+r)/2),t[d]<n?e=d:r=d;return n-t[e]<=t[r]-n?e:r}function mv(n){return(t,e,r)=>{let d=-1,h=-1;for(let p=e;p<=r;p++)if(n(t[p])){d=p;break}for(let p=r;p>=e;p--)if(n(t[p])){h=p;break}return[d,h]}}const vv=n=>n!=null,yv=n=>n!=null&&n>0,ac=mv(vv),qS=mv(yv);function KS(n,t,e,r=0,d=!1){let h=d?qS:ac,p=d?yv:vv;[t,e]=h(n,t,e);let v=n[t],s=n[t];if(t>-1)if(r==1)v=n[t],s=n[e];else if(r==-1)v=n[e],s=n[t];else for(let f=t;f<=e;f++){let i=n[f];p(i)&&(i<v?v=i:i>s&&(s=i))}return[v??mn,s??-mn]}function lc(n,t,e,r){let d=xv(n),h=xv(t);n==t&&(d==-1?(n*=e,t/=e):(n/=e,t*=e));let p=e==10?$o:Cv,v=d==1?xi:Oi,s=h==1?Oi:xi,f=v(p(ar(n))),i=s(p(ar(t))),a=ua(e,f),u=ua(e,i);return e==10&&(f<0&&(a=vn(a,-f)),i<0&&(u=vn(u,-i))),r||e==2?(n=a*d,t=u*h):(n=Rv(n,a),t=hc(t,u)),[n,t]}function yh(n,t,e,r){let d=lc(n,t,e,r);return n==0&&(d[0]=0),t==0&&(d[1]=0),d}const bh=.1,bv={mode:3,pad:bh},ol={pad:0,soft:null,mode:0},YS={min:ol,max:ol};function cc(n,t,e,r){return dc(e)?wv(n,t,e):(ol.pad=e,ol.soft=r?0:null,ol.mode=r?3:0,wv(n,t,YS))}function Qt(n,t){return n??t}function XS(n,t,e){for(t=Qt(t,0),e=Qt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function wv(n,t,e){let r=e.min,d=e.max,h=Qt(r.pad,0),p=Qt(d.pad,0),v=Qt(r.hard,-mn),s=Qt(d.hard,mn),f=Qt(r.soft,mn),i=Qt(d.soft,-mn),a=Qt(r.mode,0),u=Qt(d.mode,0),g=t-n,o=$o(g),c=qr(ar(n),ar(t)),m=$o(c),w=ar(m-o);(g<1e-24||w>10)&&(g=0,(n==0||t==0)&&(g=1e-24,a==2&&f!=mn&&(h=0),u==2&&i!=-mn&&(p=0)));let x=g||c||1e3,R=$o(x),$=ua(10,xi(R)),k=x*(g==0?n==0?.1:1:h),C=vn(Rv(n-k,$/10),24),O=n>=f&&(a==1||a==3&&C<=f||a==2&&C>=f)?f:mn,N=qr(v,C<O&&n>=O?O:Zi(O,C)),I=x*(g==0?t==0?.1:1:p),M=vn(hc(t+I,$/10),24),W=t<=i&&(u==1||u==3&&M>=i||u==2&&M<=i)?i:-mn,F=Zi(s,M>W&&t<=W?W:qr(W,M));return N==F&&N==0&&(F=100),[N,F]}const JS=new Intl.NumberFormat(la?VS.language:"en-US"),wh=n=>JS.format(n),wi=Math,uc=wi.PI,ar=wi.abs,xi=wi.floor,lr=wi.round,Oi=wi.ceil,Zi=wi.min,qr=wi.max,ua=wi.pow,xv=wi.sign,$o=wi.log10,Cv=wi.log2,ZS=(n,t=1)=>wi.sinh(n)*t,xh=(n,t=1)=>wi.asinh(n/t),mn=1/0;function _v(n){return($o((n^n>>31)-(n>>31))|0)+1}function Ch(n,t,e){return Zi(qr(n,t),e)}function kv(n){return typeof n=="function"}function Vt(n){return kv(n)?n:()=>n}const QS=()=>{},Av=n=>n,Sv=(n,t)=>t,e$=n=>null,$v=n=>!0,Ev=(n,t)=>n==t,t$=/\.\d*?(?=9{6,}|0{6,})/gm,xs=n=>{if(Mv(n)||qo.has(n))return n;const t=`${n}`,e=t.match(t$);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[d,h]=t.split("e");return+`${xs(d)}e${h}`}return vn(n,r)};function Cs(n,t){return xs(vn(xs(n/t))*t)}function hc(n,t){return xs(Oi(xs(n/t))*t)}function Rv(n,t){return xs(xi(xs(n/t))*t)}function vn(n,t=0){if(Mv(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return lr(r)/e}const qo=new Map;function Tv(n){return((""+n).split(".")[1]||"").length}function sl(n,t,e,r){let d=[],h=r.map(Tv);for(let p=t;p<e;p++){let v=ar(p),s=vn(ua(n,p),v);for(let f=0;f<r.length;f++){let i=n==10?+`${r[f]}e${p}`:r[f]*s,a=(p>=0?0:v)+(p>=h[f]?0:h[f]),u=n==10?i:vn(i,a);d.push(u),qo.set(u,a)}}return d}const al={},_h=[],ha=[null,null],Ko=Array.isArray,Mv=Number.isInteger,n$=n=>n===void 0;function Lv(n){return typeof n=="string"}function dc(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function r$(n){return n!=null&&typeof n=="object"}const i$=Object.getPrototypeOf(Uint8Array),Iv="__proto__";function da(n,t=dc){let e;if(Ko(n)){let r=n.find(d=>d!=null);if(Ko(r)||t(r)){e=Array(n.length);for(let d=0;d<n.length;d++)e[d]=da(n[d],t)}else e=n.slice()}else if(n instanceof i$)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Iv&&(e[r]=da(n[r],t))}else e=n;return e}function er(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let d in r)d!=Iv&&(dc(n[d])?er(n[d],da(r[d])):n[d]=da(r[d]))}return n}const o$=0,s$=1,a$=2;function l$(n,t,e){for(let r=0,d,h=-1;r<t.length;r++){let p=t[r];if(p>h){for(d=p-1;d>=0&&n[d]==null;)n[d--]=null;for(d=p+1;d<e&&n[d]==null;)n[h=d++]=null}}}function c$(n,t){if(d$(n)){let p=n[0].slice();for(let v=1;v<n.length;v++)p.push(...n[v].slice(1));return f$(p[0])||(p=h$(p)),p}let e=new Set;for(let p=0;p<n.length;p++){let v=n[p][0],s=v.length;for(let f=0;f<s;f++)e.add(v[f])}let r=[Array.from(e).sort((p,v)=>p-v)],d=r[0].length,h=new Map;for(let p=0;p<d;p++)h.set(r[0][p],p);for(let p=0;p<n.length;p++){let v=n[p],s=v[0];for(let f=1;f<v.length;f++){let i=v[f],a=Array(d).fill(void 0),u=t?t[p][f]:s$,g=[];for(let o=0;o<i.length;o++){let c=i[o],m=h.get(s[o]);c===null?u!=o$&&(a[m]=c,u==a$&&g.push(m)):a[m]=c}l$(a,g,d),r.push(a)}}return r}const u$=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function h$(n){let t=n[0],e=t.length,r=Array(e);for(let h=0;h<r.length;h++)r[h]=h;r.sort((h,p)=>t[h]-t[p]);let d=[];for(let h=0;h<n.length;h++){let p=n[h],v=Array(e);for(let s=0;s<e;s++)v[s]=p[r[s]];d.push(v)}return d}function d$(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let d=n[r][0];if(d.length!=e)return!1;if(d!=t){for(let h=0;h<e;h++)if(d[h]!=t[h])return!1}}return!0}function f$(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,d=e-1;for(;r<=d&&n[r]==null;)r++;for(;d>=r&&n[d]==null;)d--;if(d<=r)return!0;const h=qr(1,xi((d-r+1)/t));for(let p=n[r],v=r+h;v<=d;v+=h){const s=n[v];if(s!=null){if(s<=p)return!1;p=s}}return!0}const Ov=["January","February","March","April","May","June","July","August","September","October","November","December"],Nv=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Dv(n){return n.slice(0,3)}const p$=Nv.map(Dv),g$=Ov.map(Dv),m$={MMMM:Ov,MMM:g$,WWWW:Nv,WWW:p$};function ll(n){return(n<10?"0":"")+n}function v$(n){return(n<10?"00":n<100?"0":"")+n}const y$={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>ll(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>ll(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>ll(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>ll(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>ll(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>v$(n.getMilliseconds())};function kh(n,t){t=t||m$;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,d;for(;d=r.exec(n);)e.push(d[0][0]=="{"?y$[d[1]]:d[0]);return h=>{let p="";for(let v=0;v<e.length;v++)p+=typeof e[v]=="string"?e[v]:e[v](h,t);return p}}const b$=new Intl.DateTimeFormat().resolvedOptions().timeZone;function w$(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==b$?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Pv=n=>n%1==0,fc=[1,2,2.5,5],x$=sl(10,-32,0,fc),Fv=sl(10,0,32,fc),C$=Fv.filter(Pv),_s=x$.concat(Fv),Ah=`
1479
- `,zv="{YYYY}",Bv=Ah+zv,Wv="{M}/{D}",cl=Ah+Wv,pc=cl+"/{YY}",jv="{aa}",_$="{h}:{mm}",fa=_$+jv,Hv=Ah+fa,Uv=":{ss}",sn=null;function Vv(n){let t=n*1e3,e=t*60,r=e*60,d=r*24,h=d*30,p=d*365,v=(n==1?sl(10,0,3,fc).filter(Pv):sl(10,-3,0,fc)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,d,d*2,d*3,d*4,d*5,d*6,d*7,d*8,d*9,d*10,d*15,h,h*2,h*3,h*4,h*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const s=[[p,zv,sn,sn,sn,sn,sn,sn,1],[d*28,"{MMM}",Bv,sn,sn,sn,sn,sn,1],[d,Wv,Bv,sn,sn,sn,sn,sn,1],[r,"{h}"+jv,pc,sn,cl,sn,sn,sn,1],[e,fa,pc,sn,cl,sn,sn,sn,1],[t,Uv,pc+" "+fa,sn,cl+" "+fa,sn,Hv,sn,1],[n,Uv+".{fff}",pc+" "+fa,sn,cl+" "+fa,sn,Hv,sn,1]];function f(i){return(a,u,g,o,c,m)=>{let w=[],x=c>=p,R=c>=h&&c<p,$=i(g),k=vn($*n,3),C=Sh($.getFullYear(),x?0:$.getMonth(),R||x?1:$.getDate()),O=vn(C*n,3);if(R||x){let N=R?c/h:0,I=x?c/p:0,M=k==O?k:vn(Sh(C.getFullYear()+I,C.getMonth()+N,1)*n,3),W=new Date(lr(M/n)),F=W.getFullYear(),D=W.getMonth();for(let A=0;M<=o;A++){let _=Sh(F+I*A,D+N*A,1),L=_-i(vn(_*n,3));M=vn((+_+L)*n,3),M<=o&&w.push(M)}}else{let N=c>=d?d:c,I=xi(g)-xi(k),M=O+I+hc(k-O,N);w.push(M);let W=i(M),F=W.getHours()+W.getMinutes()/e+W.getSeconds()/r,D=c/r,A=a.axes[u]._space,_=m/A;for(;M=vn(M+c,n==1?0:3),!(M>o);)if(D>1){let L=xi(vn(F+D,6))%24,B=i(M).getHours()-L;B>1&&(B=-1),M-=B*r,F=(F+D)%24;let U=w[w.length-1];vn((M-U)/c,3)*_>=.7&&w.push(M)}else w.push(M)}return w}}return[v,s,f]}const[k$,A$,S$]=Vv(1),[$$,E$,R$]=Vv(.001);sl(2,-53,53,[1]);function Gv(n,t){return n.map(e=>e.map((r,d)=>d==0||d==8||r==null?r:t(d==1||e[8]==0?r:e[1]+r)))}function qv(n,t){return(e,r,d,h,p)=>{let v=t.find(o=>p>=o[0])||t[t.length-1],s,f,i,a,u,g;return r.map(o=>{let c=n(o),m=c.getFullYear(),w=c.getMonth(),x=c.getDate(),R=c.getHours(),$=c.getMinutes(),k=c.getSeconds(),C=m!=s&&v[2]||w!=f&&v[3]||x!=i&&v[4]||R!=a&&v[5]||$!=u&&v[6]||k!=g&&v[7]||v[1];return s=m,f=w,i=x,a=R,u=$,g=k,C(c)})}}function T$(n,t){let e=kh(t);return(r,d,h,p,v)=>d.map(s=>e(n(s)))}function Sh(n,t,e){return new Date(n,t,e)}function Kv(n,t){return t(n)}const M$="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Yv(n,t){return(e,r,d,h)=>h==null?dh:t(n(r))}function L$(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function I$(n,t){return n.series[t].fill(n,t)}const O$={show:!0,live:!0,isolate:!1,mount:QS,markers:{show:!0,width:2,stroke:L$,fill:I$,dash:"solid"},idx:null,idxs:null,values:[]};function N$(n,t){let e=n.cursor.points,r=Ii(),d=e.size(n,t);Sn(r,nl,d),Sn(r,rl,d);let h=d/-2;Sn(r,"marginLeft",h),Sn(r,"marginTop",h);let p=e.width(n,t,d);return p&&Sn(r,"borderWidth",p),r}function D$(n,t){let e=n.series[t].points;return e._fill||e._stroke}function P$(n,t){let e=n.series[t].points;return e._stroke||e._fill}function F$(n,t){return n.series[t].points.size}const $h=[0,0];function z$(n,t,e){return $h[0]=t,$h[1]=e,$h}function gc(n,t,e,r=!0){return d=>{d.button==0&&(!r||d.target==t)&&e(d)}}function Eh(n,t,e,r=!0){return d=>{(!r||d.target==t)&&e(d)}}const B$={show:!0,x:!0,y:!0,lock:!1,move:z$,points:{one:!1,show:N$,size:F$,width:0,stroke:P$,fill:D$},bind:{mousedown:gc,mouseup:gc,click:gc,dblclick:gc,mousemove:Eh,mouseleave:Eh,mouseenter:Eh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,d)=>r-d,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Xv={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Rh=er({},Xv,{filter:Sv}),Jv=er({},Rh,{size:10}),Zv=er({},Xv,{show:!1}),Th='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Qv="bold "+Th,ey=1.5,ty={show:!0,scale:"x",stroke:ch,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qv,side:2,grid:Rh,ticks:Jv,border:Zv,font:Th,lineGap:ey,rotate:0},W$="Value",j$="Time",ny={show:!0,scale:"x",auto:!1,sorted:1,min:mn,max:-mn,idxs:[]};function H$(n,t,e,r,d){return t.map(h=>h==null?"":wh(h))}function U$(n,t,e,r,d,h,p){let v=[],s=qo.get(d)||0;e=p?e:vn(hc(e,d),s);for(let f=e;f<=r;f=vn(f+d,s))v.push(Object.is(f,-0)?0:f);return v}function Mh(n,t,e,r,d,h,p){const v=[],s=n.scales[n.axes[t].scale].log,f=s==10?$o:Cv,i=xi(f(e));d=ua(s,i),s==10&&(d=_s[Ji(d,_s)]);let a=e,u=d*s;s==10&&(u=_s[Ji(u,_s)]);do v.push(a),a=a+d,s==10&&!qo.has(a)&&(a=vn(a,qo.get(d))),a>=u&&(d=a,u=d*s,s==10&&(u=_s[Ji(u,_s)]));while(a<=r);return v}function V$(n,t,e,r,d,h,p){let v=n.scales[n.axes[t].scale].asinh,s=r>v?Mh(n,t,qr(v,e),r,d):[v],f=r>=0&&e<=0?[0]:[];return(e<-v?Mh(n,t,qr(v,-r),-e,d):[v]).reverse().map(i=>-i).concat(f,s)}const ry=/./,G$=/[12357]/,q$=/[125]/,iy=/1/,Lh=(n,t,e,r)=>n.map((d,h)=>t==4&&d==0||h%r==0&&e.test(d.toExponential()[d<0?1:0])?d:null);function K$(n,t,e,r,d){let h=n.axes[e],p=h.scale,v=n.scales[p],s=n.valToPos,f=h._space,i=s(10,p),a=s(9,p)-i>=f?ry:s(7,p)-i>=f?G$:s(5,p)-i>=f?q$:iy;if(a==iy){let u=ar(s(1,p)-i);if(u<f)return Lh(t.slice().reverse(),v.distr,a,Oi(f/u)).reverse()}return Lh(t,v.distr,a,1)}function Y$(n,t,e,r,d){let h=n.axes[e],p=h.scale,v=h._space,s=n.valToPos,f=ar(s(1,p)-s(2,p));return f<v?Lh(t.slice().reverse(),3,ry,Oi(v/f)).reverse():t}function X$(n,t,e,r){return r==null?dh:t==null?"":wh(t)}const oy={show:!0,scale:"y",stroke:ch,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qv,side:3,grid:Rh,ticks:Jv,border:Zv,font:Th,lineGap:ey,rotate:0};function J$(n,t){let e=3+(n||1)*2;return vn(e*t,3)}function Z$(n,t){let{scale:e,idxs:r}=n.series[0],d=n._data[0],h=n.valToPos(d[r[0]],e,!0),p=n.valToPos(d[r[1]],e,!0),v=ar(p-h),s=n.series[t],f=v/(s.points.space*rn);return r[1]-r[0]<=f}const sy={scale:null,auto:!0,sorted:0,min:mn,max:-mn},ay=(n,t,e,r,d)=>d,ly={show:!0,auto:!0,sorted:0,gaps:ay,alpha:1,facets:[er({},sy,{scale:"x"}),er({},sy,{scale:"y"})]},cy={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ay,alpha:1,points:{show:Z$,filter:null},values:null,min:mn,max:-mn,idxs:[],path:null,clip:null};function Q$(n,t,e,r,d){return e/10}const uy={time:kS,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},eE=er({},uy,{time:!1,ori:1}),hy={};function dy(n,t){let e=hy[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(d=>d!=r)},pub(r,d,h,p,v,s,f){for(let i=0;i<e.plots.length;i++)e.plots[i]!=d&&e.plots[i].pub(r,d,h,p,v,s,f)}},n!=null&&(hy[n]=e)),e}const pa=1,Ih=2;function ks(n,t,e){const r=n.mode,d=n.series[t],h=r==2?n._data[t]:n._data,p=n.scales,v=n.bbox;let s=h[0],f=r==2?h[1]:h[t],i=r==2?p[d.facets[0].scale]:p[n.series[0].scale],a=r==2?p[d.facets[1].scale]:p[d.scale],u=v.left,g=v.top,o=v.width,c=v.height,m=n.valToPosH,w=n.valToPosV;return i.ori==0?e(d,s,f,i,a,m,w,u,g,o,c,vc,ga,bc,gy,vy):e(d,s,f,i,a,w,m,g,u,c,o,yc,ma,Dh,my,yy)}function Oh(n,t){let e=0,r=0,d=Qt(n.bands,_h);for(let h=0;h<d.length;h++){let p=d[h];p.series[0]==t?e=p.dir:p.series[1]==t&&(p.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function tE(n,t,e,r,d){let h=n.mode,p=n.series[t],v=h==2?p.facets[1].scale:p.scale,s=n.scales[v];return d==-1?s.min:d==1?s.max:s.distr==3?s.dir==1?s.min:s.max:0}function Eo(n,t,e,r,d,h){return ks(n,t,(p,v,s,f,i,a,u,g,o,c,m)=>{let w=p.pxRound;const x=f.dir*(f.ori==0?1:-1),R=f.ori==0?ga:ma;let $,k;x==1?($=e,k=r):($=r,k=e);let C=w(a(v[$],f,c,g)),O=w(u(s[$],i,m,o)),N=w(a(v[k],f,c,g)),I=w(u(h==1?i.max:i.min,i,m,o)),M=new Path2D(d);return R(M,N,I),R(M,C,I),R(M,C,O),M})}function mc(n,t,e,r,d,h){let p=null;if(n.length>0){p=new Path2D;const v=t==0?bc:Dh;let s=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let g=u[0]-s;g>0&&v(p,s,r,g,r+h),s=u[1]}}let f=e+d-s,i=10;f>0&&v(p,s,r-i/2,f,r+h+i)}return p}function nE(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Nh(n,t,e,r,d,h,p){let v=[],s=n.length;for(let f=d==1?e:r;f>=e&&f<=r;f+=d)if(t[f]===null){let i=f,a=f;if(d==1)for(;++f<=r&&t[f]===null;)a=f;else for(;--f>=e&&t[f]===null;)a=f;let u=h(n[i]),g=a==i?u:h(n[a]),o=i-d;u=p<=0&&o>=0&&o<s?h(n[o]):u;let c=a+d;g=p>=0&&c>=0&&c<s?h(n[c]):g,g>=u&&v.push([u,g])}return v}function fy(n){return n==0?Av:n==1?lr:t=>Cs(t,n)}function py(n){let t=n==0?vc:yc,e=n==0?(d,h,p,v,s,f)=>{d.arcTo(h,p,v,s,f)}:(d,h,p,v,s,f)=>{d.arcTo(p,h,s,v,f)},r=n==0?(d,h,p,v,s)=>{d.rect(h,p,v,s)}:(d,h,p,v,s)=>{d.rect(p,h,s,v)};return(d,h,p,v,s,f=0,i=0)=>{f==0&&i==0?r(d,h,p,v,s):(f=Zi(f,v/2,s/2),i=Zi(i,v/2,s/2),t(d,h+f,p),e(d,h+v,p,h+v,p+s,f),e(d,h+v,p+s,h,p+s,i),e(d,h,p+s,h,p,i),e(d,h,p,h+v,p,f),d.closePath())}}const vc=(n,t,e)=>{n.moveTo(t,e)},yc=(n,t,e)=>{n.moveTo(e,t)},ga=(n,t,e)=>{n.lineTo(t,e)},ma=(n,t,e)=>{n.lineTo(e,t)},bc=py(0),Dh=py(1),gy=(n,t,e,r,d,h)=>{n.arc(t,e,r,d,h)},my=(n,t,e,r,d,h)=>{n.arc(e,t,r,d,h)},vy=(n,t,e,r,d,h,p)=>{n.bezierCurveTo(t,e,r,d,h,p)},yy=(n,t,e,r,d,h,p)=>{n.bezierCurveTo(e,t,d,r,p,h)};function by(n){return(t,e,r,d,h)=>ks(t,e,(p,v,s,f,i,a,u,g,o,c,m)=>{let{pxRound:w,points:x}=p,R,$;f.ori==0?(R=vc,$=gy):(R=yc,$=my);const k=vn(x.width*rn,3);let C=(x.size-x.width)/2*rn,O=vn(C*2,3),N=new Path2D,I=new Path2D,{left:M,top:W,width:F,height:D}=t.bbox;bc(I,M-O,W-O,F+O*2,D+O*2);const A=_=>{if(s[_]!=null){let L=w(a(v[_],f,c,g)),B=w(u(s[_],i,m,o));R(N,L+C,B),$(N,L,B,C,0,uc*2)}};if(h)h.forEach(A);else for(let _=r;_<=d;_++)A(_);return{stroke:k>0?N:null,fill:N,clip:I,flags:pa|Ih}})}function wy(n){return(t,e,r,d,h,p)=>{r!=d&&(h!=r&&p!=r&&n(t,e,r),h!=d&&p!=d&&n(t,e,d),n(t,e,p))}}const rE=wy(ga),iE=wy(ma);function xy(n){const t=Qt(n?.alignGaps,0);return(e,r,d,h)=>ks(e,r,(p,v,s,f,i,a,u,g,o,c,m)=>{[d,h]=ac(s,d,h);let w=p.pxRound,x=F=>w(a(F,f,c,g)),R=F=>w(u(F,i,m,o)),$,k;f.ori==0?($=ga,k=rE):($=ma,k=iE);const C=f.dir*(f.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pa},N=O.stroke;let I=!1;if(h-d>=c*4){let F=ae=>e.posToVal(ae,f.key,!0),D=null,A=null,_,L,B,U=x(v[C==1?d:h]),V=x(v[d]),K=x(v[h]),ee=F(C==1?V+1:K-1);for(let ae=C==1?d:h;ae>=d&&ae<=h;ae+=C){let Q=v[ae],oe=(C==1?Q<ee:Q>ee)?U:x(Q),se=s[ae];oe==U?se!=null?(L=se,D==null?($(N,oe,R(L)),_=D=A=L):L<D?D=L:L>A&&(A=L)):se===null&&(I=!0):(D!=null&&k(N,U,R(D),R(A),R(_),R(L)),se!=null?(L=se,$(N,oe,R(L)),D=A=_=L):(D=A=null,se===null&&(I=!0)),U=oe,ee=F(U+C))}D!=null&&D!=A&&B!=U&&k(N,U,R(D),R(A),R(_),R(L))}else for(let F=C==1?d:h;F>=d&&F<=h;F+=C){let D=s[F];D===null?I=!0:D!=null&&$(N,x(v[F]),R(D))}let[M,W]=Oh(e,r);if(p.fill!=null||M!=0){let F=O.fill=new Path2D(N),D=p.fillTo(e,r,p.min,p.max,M),A=R(D),_=x(v[d]),L=x(v[h]);C==-1&&([L,_]=[_,L]),$(F,L,A),$(F,_,A)}if(!p.spanGaps){let F=[];I&&F.push(...Nh(v,s,d,h,C,x,t)),O.gaps=F=p.gaps(e,r,d,h,F),O.clip=mc(F,f.ori,g,o,c,m)}return W!=0&&(O.band=W==2?[Eo(e,r,d,h,N,-1),Eo(e,r,d,h,N,1)]:Eo(e,r,d,h,N,W)),O})}function oE(n){const t=Qt(n.align,1),e=Qt(n.ascDesc,!1),r=Qt(n.alignGaps,0),d=Qt(n.extend,!1);return(h,p,v,s)=>ks(h,p,(f,i,a,u,g,o,c,m,w,x,R)=>{[v,s]=ac(a,v,s);let $=f.pxRound,{left:k,width:C}=h.bbox,O=K=>$(o(K,u,x,m)),N=K=>$(c(K,g,R,w)),I=u.ori==0?ga:ma;const M={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pa},W=M.stroke,F=u.dir*(u.ori==0?1:-1);let D=N(a[F==1?v:s]),A=O(i[F==1?v:s]),_=A,L=A;d&&t==-1&&(L=k,I(W,L,D)),I(W,A,D);for(let K=F==1?v:s;K>=v&&K<=s;K+=F){let ee=a[K];if(ee==null)continue;let ae=O(i[K]),Q=N(ee);t==1?I(W,ae,D):I(W,_,Q),I(W,ae,Q),D=Q,_=ae}let B=_;d&&t==1&&(B=k+C,I(W,B,D));let[U,V]=Oh(h,p);if(f.fill!=null||U!=0){let K=M.fill=new Path2D(W),ee=f.fillTo(h,p,f.min,f.max,U),ae=N(ee);I(K,B,ae),I(K,L,ae)}if(!f.spanGaps){let K=[];K.push(...Nh(i,a,v,s,F,O,r));let ee=f.width*rn/2,ae=e||t==1?ee:-ee,Q=e||t==-1?-ee:ee;K.forEach(oe=>{oe[0]+=ae,oe[1]+=Q}),M.gaps=K=f.gaps(h,p,v,s,K),M.clip=mc(K,u.ori,m,w,x,R)}return V!=0&&(M.band=V==2?[Eo(h,p,v,s,W,-1),Eo(h,p,v,s,W,1)]:Eo(h,p,v,s,W,V)),M})}function Cy(n,t,e,r,d,h,p=mn){if(n.length>1){let v=null;for(let s=0,f=1/0;s<n.length;s++)if(t[s]!==void 0){if(v!=null){let i=ar(n[s]-n[v]);i<f&&(f=i,p=ar(e(n[s],r,d,h)-e(n[v],r,d,h)))}v=s}}return p}function sE(n){n=n||al;const t=Qt(n.size,[.6,mn,1]),e=n.align||0,r=n.gap||0;let d=n.radius;d=d==null?[0,0]:typeof d=="number"?[d,0]:d;const h=Vt(d),p=1-t[0],v=Qt(t[1],mn),s=Qt(t[2],1),f=Qt(n.disp,al),i=Qt(n.each,g=>{}),{fill:a,stroke:u}=f;return(g,o,c,m)=>ks(g,o,(w,x,R,$,k,C,O,N,I,M,W)=>{let F=w.pxRound,D=e,A=r*rn,_=v*rn,L=s*rn,B,U;$.ori==0?[B,U]=h(g,o):[U,B]=h(g,o);const V=$.dir*($.ori==0?1:-1);let K=$.ori==0?bc:Dh,ee=$.ori==0?i:(Je,Tt,en,Dn,Xn,hr,bn)=>{i(Je,Tt,en,Xn,Dn,bn,hr)},ae=Qt(g.bands,_h).find(Je=>Je.series[0]==o),Q=ae!=null?ae.dir:0,oe=w.fillTo(g,o,w.min,w.max,Q),se=F(O(oe,k,W,I)),ue,pe,ve,$e=M,Re=F(w.width*rn),Ye=!1,Ge=null,at=null,it=null,ut=null;a!=null&&(Re==0||u!=null)&&(Ye=!0,Ge=a.values(g,o,c,m),at=new Map,new Set(Ge).forEach(Je=>{Je!=null&&at.set(Je,new Path2D)}),Re>0&&(it=u.values(g,o,c,m),ut=new Map,new Set(it).forEach(Je=>{Je!=null&&ut.set(Je,new Path2D)})));let{x0:Ht,size:_r}=f;if(Ht!=null&&_r!=null){D=1,x=Ht.values(g,o,c,m),Ht.unit==2&&(x=x.map(Tt=>g.posToVal(N+Tt*M,$.key,!0)));let Je=_r.values(g,o,c,m);_r.unit==2?pe=Je[0]*M:pe=C(Je[0],$,M,N)-C(0,$,M,N),$e=Cy(x,R,C,$,M,N,$e),ve=$e-pe+A}else $e=Cy(x,R,C,$,M,N,$e),ve=$e*p+A,pe=$e-ve;ve<1&&(ve=0),Re>=pe/2&&(Re=0),ve<5&&(F=Av);let Rt=ve>0,cr=$e-ve-(Rt?Re:0);pe=F(Ch(cr,L,_)),ue=(D==0?pe/2:D==V?0:pe)-D*V*((D==0?A/2:0)+(Rt?Re/2:0));const Mn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},kr=Ye?null:new Path2D;let yn=null;if(ae!=null)yn=g.data[ae.series[1]];else{let{y0:Je,y1:Tt}=f;Je!=null&&Tt!=null&&(R=Tt.values(g,o,c,m),yn=Je.values(g,o,c,m))}let ur=B*pe,mt=U*pe;for(let Je=V==1?c:m;Je>=c&&Je<=m;Je+=V){let Tt=R[Je];if(Tt==null)continue;if(yn!=null){let Xt=yn[Je]??0;if(Tt-Xt==0)continue;se=O(Xt,k,W,I)}let en=$.distr!=2||f!=null?x[Je]:Je,Dn=C(en,$,M,N),Xn=O(Qt(Tt,oe),k,W,I),hr=F(Dn-ue),bn=F(qr(Xn,se)),Hn=F(Zi(Xn,se)),Pn=bn-Hn;if(Tt!=null){let Xt=Tt<0?mt:ur,an=Tt<0?ur:mt;Ye?(Re>0&&it[Je]!=null&&K(ut.get(it[Je]),hr,Hn+xi(Re/2),pe,qr(0,Pn-Re),Xt,an),Ge[Je]!=null&&K(at.get(Ge[Je]),hr,Hn+xi(Re/2),pe,qr(0,Pn-Re),Xt,an)):K(kr,hr,Hn+xi(Re/2),pe,qr(0,Pn-Re),Xt,an),ee(g,o,Je,hr-Re/2,Hn,pe+Re,Pn)}}return Re>0?Mn.stroke=Ye?ut:kr:Ye||(Mn._fill=w.width==0?w._fill:w._stroke??w._fill,Mn.width=0),Mn.fill=Ye?at:kr,Mn})}function aE(n,t){const e=Qt(t?.alignGaps,0);return(r,d,h,p)=>ks(r,d,(v,s,f,i,a,u,g,o,c,m,w)=>{[h,p]=ac(f,h,p);let x=v.pxRound,R=B=>x(u(B,i,m,o)),$=B=>x(g(B,a,w,c)),k,C,O;i.ori==0?(k=vc,O=ga,C=vy):(k=yc,O=ma,C=yy);const N=i.dir*(i.ori==0?1:-1);let I=R(s[N==1?h:p]),M=I,W=[],F=[];for(let B=N==1?h:p;B>=h&&B<=p;B+=N)if(f[B]!=null){let U=s[B],V=R(U);W.push(M=V),F.push($(f[B]))}const D={stroke:n(W,F,k,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:pa},A=D.stroke;let[_,L]=Oh(r,d);if(v.fill!=null||_!=0){let B=D.fill=new Path2D(A),U=v.fillTo(r,d,v.min,v.max,_),V=$(U);O(B,M,V),O(B,I,V)}if(!v.spanGaps){let B=[];B.push(...Nh(s,f,h,p,N,R,e)),D.gaps=B=v.gaps(r,d,h,p,B),D.clip=mc(B,i.ori,o,c,m,w)}return L!=0&&(D.band=L==2?[Eo(r,d,h,p,A,-1),Eo(r,d,h,p,A,1)]:Eo(r,d,h,p,A,L)),D})}function lE(n){return aE(cE,n)}function cE(n,t,e,r,d,h){const p=n.length;if(p<2)return null;const v=new Path2D;if(e(v,n[0],t[0]),p==2)r(v,n[1],t[1]);else{let s=Array(p),f=Array(p-1),i=Array(p-1),a=Array(p-1);for(let u=0;u<p-1;u++)i[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],f[u]=i[u]/a[u];s[0]=f[0];for(let u=1;u<p-1;u++)f[u]===0||f[u-1]===0||f[u-1]>0!=f[u]>0?s[u]=0:(s[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/f[u-1]+(a[u]+2*a[u-1])/f[u]),isFinite(s[u])||(s[u]=0));s[p-1]=f[p-2];for(let u=0;u<p-1;u++)d(v,n[u]+a[u]/3,t[u]+s[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-s[u+1]*a[u]/3,n[u+1],t[u+1])}return v}const Ph=new Set;function _y(){for(let n of Ph)n.syncRect(!0)}la&&(ws(HS,ca,_y),ws(US,ca,_y,!0),ws(oc,ca,()=>{Ir.pxRatio=rn}));const uE=xy(),hE=by();function ky(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((d,h)=>Fh(d,h,t,e))}function dE(n,t){return n.map((e,r)=>r==0?{}:er({},t,e))}function Fh(n,t,e,r){return er({},t==0?e:r,n)}function Ay(n,t,e){return t==null?ha:[t,e]}const fE=Ay;function pE(n,t,e){return t==null?ha:cc(t,e,bh,!0)}function Sy(n,t,e,r){return t==null?ha:lc(t,e,n.scales[r].log,!1)}const gE=Sy;function $y(n,t,e,r){return t==null?ha:yh(t,e,n.scales[r].log,!1)}const mE=$y;function vE(n,t,e,r,d){let h=qr(_v(n),_v(t)),p=t-n,v=Ji(d/r*p,e);do{let s=e[v],f=r*s/p;if(f>=d&&h+(s<5?qo.get(s):0)<=17)return[s,f]}while(++v<e.length);return[0,0]}function Ey(n){let t,e;return n=n.replace(/(\d+)px/,(r,d)=>(t=lr((e=+d)*rn))+"px"),[n,t,e]}function yE(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=vn(t[2]*rn,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function Ir(n,t,e){const r={mode:Qt(n.mode,1)},d=r.mode;function h(G,J,ie,ce){let ge=J.valToPct(G);return ce+ie*(J.dir==-1?1-ge:ge)}function p(G,J,ie,ce){let ge=J.valToPct(G);return ce+ie*(J.dir==-1?ge:1-ge)}function v(G,J,ie,ce){return J.ori==0?h(G,J,ie,ce):p(G,J,ie,ce)}r.valToPosH=h,r.valToPosV=p;let s=!1;r.status=0;const f=r.root=Ii(AS);if(n.id!=null&&(f.id=n.id),bi(f,n.class),n.title){let G=Ii(ES,f);G.textContent=n.title}const i=Xi("canvas"),a=r.ctx=i.getContext("2d"),u=Ii(RS,f);ws("click",u,G=>{G.target===o&&(ft!=Pi||Gt!=Co)&&Un.click(r,G)},!0);const g=r.under=Ii(TS,u);u.appendChild(i);const o=r.over=Ii(MS,u);n=da(n);const c=+Qt(n.pxAlign,1),m=fy(c);(n.plugins||[]).forEach(G=>{G.opts&&(n=G.opts(r,n)||n)});const w=n.ms||.001,x=r.series=d==1?ky(n.series||[],ny,cy,!1):dE(n.series||[null],ly),R=r.axes=ky(n.axes||[],ty,oy,!0),$=r.scales={},k=r.bands=n.bands||[];k.forEach(G=>{G.fill=Vt(G.fill||null),G.dir=Qt(G.dir,-1)});const C=d==2?x[1].facets[0].scale:x[0].scale,O={axes:Qo,series:Fs},N=(n.drawOrder||["axes","series"]).map(G=>O[G]);function I(G){const J=G.distr==3?ie=>$o(ie>0?ie:G.clamp(r,ie,G.min,G.max,G.key)):G.distr==4?ie=>xh(ie,G.asinh):G.distr==100?ie=>G.fwd(ie):ie=>ie;return ie=>{let ce=J(ie),{_min:ge,_max:ke}=G,Te=ke-ge;return(ce-ge)/Te}}function M(G){let J=$[G];if(J==null){let ie=(n.scales||al)[G]||al;if(ie.from!=null){M(ie.from);let ce=er({},$[ie.from],ie,{key:G});ce.valToPct=I(ce),$[G]=ce}else{J=$[G]=er({},G==C?uy:eE,ie),J.key=G;let ce=J.time,ge=J.range,ke=Ko(ge);if((G!=C||d==2&&!ce)&&(ke&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?bv:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?bv:{mode:1,hard:ge[1],soft:ge[1]}},ke=!1),!ke&&dc(ge))){let Te=ge;ge=(Fe,je,qe)=>je==null?ha:cc(je,qe,Te)}J.range=Vt(ge||(ce?fE:G==C?J.distr==3?gE:J.distr==4?mE:Ay:J.distr==3?Sy:J.distr==4?$y:pE)),J.auto=Vt(ke?!1:J.auto),J.clamp=Vt(J.clamp||Q$),J._min=J._max=null,J.valToPct=I(J)}}}M("x"),M("y"),d==1&&x.forEach(G=>{M(G.scale)}),R.forEach(G=>{M(G.scale)});for(let G in n.scales)M(G);const W=$[C],F=W.distr;let D,A;W.ori==0?(bi(f,SS),D=h,A=p):(bi(f,$S),D=p,A=h);const _={};for(let G in $){let J=$[G];(J.min!=null||J.max!=null)&&(_[G]={min:J.min,max:J.max},J.min=J.max=null)}const L=n.tzDate||(G=>new Date(lr(G/w))),B=n.fmtDate||kh,U=w==1?S$(L):R$(L),V=qv(L,Gv(w==1?A$:E$,B)),K=Yv(L,Kv(M$,B)),ee=[],ae=r.legend=er({},O$,n.legend),Q=r.cursor=er({},B$,{drag:{y:d==2}},n.cursor),oe=ae.show,se=Q.show,ue=ae.markers;ae.idxs=ee,ue.width=Vt(ue.width),ue.dash=Vt(ue.dash),ue.stroke=Vt(ue.stroke),ue.fill=Vt(ue.fill);let pe,ve,$e,Re=[],Ye=[],Ge,at=!1,it={};if(ae.live){const G=x[1]?x[1].values:null;at=G!=null,Ge=at?G(r,1,0):{_:0};for(let J in Ge)it[J]=dh}if(oe)if(pe=Xi("table",PS,f),$e=Xi("tbody",null,pe),ae.mount(r,pe),at){ve=Xi("thead",null,pe,$e);let G=Xi("tr",null,ve);Xi("th",null,G);for(var ut in Ge)Xi("th",rv,G).textContent=ut}else bi(pe,zS),ae.live&&bi(pe,FS);const Ht={show:!0},_r={show:!1};function Rt(G,J){if(J==0&&(at||!ae.live||d==2))return ha;let ie=[],ce=Xi("tr",BS,$e,$e.childNodes[J]);bi(ce,G.class),G.show||bi(ce,bs);let ge=Xi("th",null,ce);if(ue.show){let Fe=Ii(WS,ge);if(J>0){let je=ue.width(r,J);je&&(Fe.style.border=je+"px "+ue.dash(r,J)+" "+ue.stroke(r,J)),Fe.style.background=ue.fill(r,J)}}let ke=Ii(rv,ge);G.label instanceof HTMLElement?ke.appendChild(G.label):ke.textContent=G.label,J>0&&(ue.show||(ke.style.color=G.width>0?ue.stroke(r,J):ue.fill(r,J)),Mn("click",ge,Fe=>{if(Q._lock)return;ui(Fe);let je=x.indexOf(G);if((Fe.ctrlKey||Fe.metaKey)!=ae.isolate){let qe=x.some((Ze,ot)=>ot>0&&ot!=je&&Ze.show);x.forEach((Ze,ot)=>{ot>0&&rr(ot,qe?ot==je?Ht:_r:Ht,!0,St.setSeries)})}else rr(je,{show:!G.show},!0,St.setSeries)},!1),Pr&&Mn(av,ge,Fe=>{Q._lock||(ui(Fe),rr(x.indexOf(G),Bi,!0,St.setSeries))},!1));for(var Te in Ge){let Fe=Xi("td",jS,ce);Fe.textContent="--",ie.push(Fe)}return[ce,ie]}const cr=new Map;function Mn(G,J,ie,ce=!0){const ge=cr.get(J)||{},ke=Q.bind[G](r,J,ie,ce);ke&&(ws(G,J,ge[G]=ke),cr.set(J,ge))}function kr(G,J,ie){const ce=cr.get(J)||{};for(let ge in ce)(G==null||ge==G)&&(vh(ge,J,ce[ge]),delete ce[ge]);G==null&&cr.delete(J)}let yn=0,ur=0,mt=0,Je=0,Tt=0,en=0,Dn=Tt,Xn=en,hr=mt,bn=Je,Hn=0,Pn=0,Xt=0,an=0;r.bbox={};let Dr=!1,Zr=!1,Ar=!1,Ci=!1,_i=!1,nr=!1;function no(G,J,ie){(ie||G!=r.width||J!=r.height)&&Qr(G,J),io(!1),Ar=!0,Zr=!0,xo()}function Qr(G,J){r.width=yn=mt=G,r.height=ur=Je=J,Tt=en=0,ki(),Ro();let ie=r.bbox;Hn=ie.left=Cs(Tt*rn,.5),Pn=ie.top=Cs(en*rn,.5),Xt=ie.width=Cs(mt*rn,.5),an=ie.height=Cs(Je*rn,.5)}const Ls=3;function ei(){let G=!1,J=0;for(;!G;){J++;let ie=Ra(J),ce=Ta(J);G=J==Ls||ie&&ce,G||(Qr(r.width,r.height),Zr=!0)}}function $n({width:G,height:J}){no(G,J)}r.setSize=$n;function ki(){let G=!1,J=!1,ie=!1,ce=!1;R.forEach((ge,ke)=>{if(ge.show&&ge._show){let{side:Te,_size:Fe}=ge,je=Te%2,qe=ge.label!=null?ge.labelSize:0,Ze=Fe+qe;Ze>0&&(je?(mt-=Ze,Te==3?(Tt+=Ze,ce=!0):ie=!0):(Je-=Ze,Te==0?(en+=Ze,G=!0):J=!0))}}),di[0]=G,di[1]=ie,di[2]=J,di[3]=ce,mt-=dr[1]+dr[3],Tt+=dr[3],Je-=dr[2]+dr[0],en+=dr[0]}function Ro(){let G=Tt+mt,J=en+Je,ie=Tt,ce=en;function ge(ke,Te){switch(ke){case 1:return G+=Te,G-Te;case 2:return J+=Te,J-Te;case 3:return ie-=Te,ie+Te;case 0:return ce-=Te,ce+Te}}R.forEach((ke,Te)=>{if(ke.show&&ke._show){let Fe=ke.side;ke._pos=ge(Fe,ke._size),ke.label!=null&&(ke._lpos=ge(Fe,ke.labelSize))}})}if(Q.dataIdx==null){let G=Q.hover,J=G.skip=new Set(G.skip??[]);J.add(void 0);let ie=G.prox=Vt(G.prox),ce=G.bias??=0;Q.dataIdx=(ge,ke,Te,Fe)=>{if(ke==0)return Te;let je=Te,qe=ie(ge,ke,Te,Fe)??mn,Ze=qe>=0&&qe<mn,ot=W.ori==0?mt:Je,At=Q.left,Zt=t[0],Bt=t[ke];if(J.has(Bt[Te])){je=null;let Ct=null,vt=null,dt;if(ce==0||ce==-1)for(dt=Te;Ct==null&&dt-- >0;)J.has(Bt[dt])||(Ct=dt);if(ce==0||ce==1)for(dt=Te;vt==null&&dt++<Bt.length;)J.has(Bt[dt])||(vt=dt);if(Ct!=null||vt!=null)if(Ze){let Cn=Ct==null?-1/0:D(Zt[Ct],W,ot,0),Nn=vt==null?1/0:D(Zt[vt],W,ot,0),or=At-Cn,cn=Nn-At;or<=cn?or<=qe&&(je=Ct):cn<=qe&&(je=vt)}else je=vt==null?Ct:Ct==null?vt:Te-Ct<=vt-Te?Ct:vt}else Ze&&ar(At-D(Zt[Te],W,ot,0))>qe&&(je=null);return je}}const ui=G=>{Q.event=G};Q.idxs=ee,Q._lock=!1;let En=Q.points;En.show=Vt(En.show),En.size=Vt(En.size),En.stroke=Vt(En.stroke),En.width=Vt(En.width),En.fill=Vt(En.fill);const Sr=r.focus=er({},n.focus||{alpha:.3},Q.focus),Pr=Sr.prox>=0,Fn=Pr&&En.one;let _n=[],yr=[],hi=[];function go(G,J){let ie=En.show(r,J);if(ie instanceof HTMLElement)return bi(ie,DS),bi(ie,G.class),po(ie,-10,-10,mt,Je),o.insertBefore(ie,_n[J]),ie}function mo(G,J){if(d==1||J>0){let ie=d==1&&$[G.scale].time,ce=G.value;G.value=ie?Lv(ce)?Yv(L,Kv(ce,B)):ce||K:ce||X$,G.label=G.label||(ie?j$:W$)}if(Fn||J>0){G.width=G.width==null?1:G.width,G.paths=G.paths||uE||e$,G.fillTo=Vt(G.fillTo||tE),G.pxAlign=+Qt(G.pxAlign,c),G.pxRound=fy(G.pxAlign),G.stroke=Vt(G.stroke||null),G.fill=Vt(G.fill||null),G._stroke=G._fill=G._paths=G._focus=null;let ie=J$(qr(1,G.width),1),ce=G.points=er({},{size:ie,width:qr(1,ie*.2),stroke:G.stroke,space:ie*2,paths:hE,_stroke:null,_fill:null},G.points);ce.show=Vt(ce.show),ce.filter=Vt(ce.filter),ce.fill=Vt(ce.fill),ce.stroke=Vt(ce.stroke),ce.paths=Vt(ce.paths),ce.pxAlign=G.pxAlign}if(oe){let ie=Rt(G,J);Re.splice(J,0,ie[0]),Ye.splice(J,0,ie[1]),ae.values.push(null)}if(se){ee.splice(J,0,null);let ie=null;Fn?J==0&&(ie=go(G,J)):J>0&&(ie=go(G,J)),_n.splice(J,0,ie),yr.splice(J,0,0),hi.splice(J,0,0)}st("addSeries",J)}function To(G,J){J=J??x.length,G=d==1?Fh(G,J,ny,cy):Fh(G,J,{},ly),x.splice(J,0,G),mo(x[J],J)}r.addSeries=To;function Fr(G){if(x.splice(G,1),oe){ae.values.splice(G,1),Ye.splice(G,1);let J=Re.splice(G,1)[0];kr(null,J.firstChild),J.remove()}se&&(ee.splice(G,1),_n.splice(G,1)[0].remove(),yr.splice(G,1),hi.splice(G,1)),st("delSeries",G)}r.delSeries=Fr;const di=[!1,!1,!1,!1];function ti(G,J){if(G._show=G.show,G.show){let ie=G.side%2,ce=$[G.scale];ce==null&&(G.scale=ie?x[1].scale:C,ce=$[G.scale]);let ge=ce.time;G.size=Vt(G.size),G.space=Vt(G.space),G.rotate=Vt(G.rotate),Ko(G.incrs)&&G.incrs.forEach(Te=>{!qo.has(Te)&&qo.set(Te,Tv(Te))}),G.incrs=Vt(G.incrs||(ce.distr==2?C$:ge?w==1?k$:$$:_s)),G.splits=Vt(G.splits||(ge&&ce.distr==1?U:ce.distr==3?Mh:ce.distr==4?V$:U$)),G.stroke=Vt(G.stroke),G.grid.stroke=Vt(G.grid.stroke),G.ticks.stroke=Vt(G.ticks.stroke),G.border.stroke=Vt(G.border.stroke);let ke=G.values;G.values=Ko(ke)&&!Ko(ke[0])?Vt(ke):ge?Ko(ke)?qv(L,Gv(ke,B)):Lv(ke)?T$(L,ke):ke||V:ke||H$,G.filter=Vt(G.filter||(ce.distr>=3&&ce.log==10?K$:ce.distr==3&&ce.log==2?Y$:Sv)),G.font=Ey(G.font),G.labelFont=Ey(G.labelFont),G._size=G.size(r,null,J,0),G._space=G._rotate=G._incrs=G._found=G._splits=G._values=null,G._size>0&&(di[J]=!0,G._el=Ii(LS,u))}}function Ft(G,J,ie,ce){let[ge,ke,Te,Fe]=ie,je=J%2,qe=0;return je==0&&(Fe||ke)&&(qe=J==0&&!ge||J==2&&!Te?lr(ty.size/3):0),je==1&&(ge||Te)&&(qe=J==1&&!ke||J==3&&!Fe?lr(oy.size/2):0),qe}const Mo=r.padding=(n.padding||[Ft,Ft,Ft,Ft]).map(G=>Vt(Qt(G,Ft))),dr=r._padding=Mo.map((G,J)=>G(r,J,di,0));let Ln,le=null,Ne=null;const He=d==1?x[0].idxs:null;let xt=null,wn=!1;function Kt(G,J){if(t=G??[],r.data=r._data=t,d==2){Ln=0;for(let ie=1;ie<x.length;ie++)Ln+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),xt=t[0],Ln=xt.length;let ie=t;if(F==2){ie=t.slice();let ce=ie[0]=Array(Ln);for(let ge=0;ge<Ln;ge++)ce[ge]=ge}r._data=t=ie}if(io(!0),st("setData"),F==2&&(Ar=!0),J!==!1){let ie=W;ie.auto(r,wn)?$r():Br(C,ie.min,ie.max),Ci=Ci||Q.left>=0,nr=!0,xo()}}r.setData=Kt;function $r(){wn=!0;let G,J;d==1&&(Ln>0?(le=He[0]=0,Ne=He[1]=Ln-1,G=t[0][le],J=t[0][Ne],F==2?(G=le,J=Ne):G==J&&(F==3?[G,J]=lc(G,G,W.log,!1):F==4?[G,J]=yh(G,G,W.log,!1):W.time?J=G+lr(86400/w):[G,J]=cc(G,J,bh,!0))):(le=He[0]=G=null,Ne=He[1]=J=null)),Br(C,G,J)}let Jn,fn,br,xn,wr,vo,Is,Os,Ns,fr;function Ds(G,J,ie,ce,ge,ke){G??=ov,ie??=_h,ce??="butt",ge??=ov,ke??="round",G!=Jn&&(a.strokeStyle=Jn=G),ge!=fn&&(a.fillStyle=fn=ge),J!=br&&(a.lineWidth=br=J),ke!=wr&&(a.lineJoin=wr=ke),ce!=vo&&(a.lineCap=vo=ce),ie!=xn&&a.setLineDash(xn=ie)}function Yo(G,J,ie,ce){J!=fn&&(a.fillStyle=fn=J),G!=Is&&(a.font=Is=G),ie!=Os&&(a.textAlign=Os=ie),ce!=Ns&&(a.textBaseline=Ns=ce)}function yo(G,J,ie,ce,ge=0){if(ce.length>0&&G.auto(r,wn)&&(J==null||J.min==null)){let ke=Qt(le,0),Te=Qt(Ne,ce.length-1),Fe=ie.min==null?KS(ce,ke,Te,ge,G.distr==3):[ie.min,ie.max];G.min=Zi(G.min,ie.min=Fe[0]),G.max=qr(G.max,ie.max=Fe[1])}}const Ps={min:null,max:null};function Xo(){for(let ce in $){let ge=$[ce];_[ce]==null&&(ge.min==null||_[C]!=null&&ge.auto(r,wn))&&(_[ce]=Ps)}for(let ce in $){let ge=$[ce];_[ce]==null&&ge.from!=null&&_[ge.from]!=null&&(_[ce]=Ps)}_[C]!=null&&io(!0);let G={};for(let ce in _){let ge=_[ce];if(ge!=null){let ke=G[ce]=da($[ce],r$);if(ge.min!=null)er(ke,ge);else if(ce!=C||d==2)if(Ln==0&&ke.from==null){let Te=ke.range(r,null,null,ce);ke.min=Te[0],ke.max=Te[1]}else ke.min=mn,ke.max=-mn}}if(Ln>0){x.forEach((ce,ge)=>{if(d==1){let ke=ce.scale,Te=_[ke];if(Te==null)return;let Fe=G[ke];if(ge==0){let je=Fe.range(r,Fe.min,Fe.max,ke);Fe.min=je[0],Fe.max=je[1],le=Ji(Fe.min,t[0]),Ne=Ji(Fe.max,t[0]),Ne-le>1&&(t[0][le]<Fe.min&&le++,t[0][Ne]>Fe.max&&Ne--),ce.min=xt[le],ce.max=xt[Ne]}else ce.show&&ce.auto&&yo(Fe,Te,ce,t[ge],ce.sorted);ce.idxs[0]=le,ce.idxs[1]=Ne}else if(ge>0&&ce.show&&ce.auto){let[ke,Te]=ce.facets,Fe=ke.scale,je=Te.scale,[qe,Ze]=t[ge],ot=G[Fe],At=G[je];ot!=null&&yo(ot,_[Fe],ke,qe,ke.sorted),At!=null&&yo(At,_[je],Te,Ze,Te.sorted),ce.min=Te.min,ce.max=Te.max}});for(let ce in G){let ge=G[ce],ke=_[ce];if(ge.from==null&&(ke==null||ke.min==null)){let Te=ge.range(r,ge.min==mn?null:ge.min,ge.max==-mn?null:ge.max,ce);ge.min=Te[0],ge.max=Te[1]}}}for(let ce in G){let ge=G[ce];if(ge.from!=null){let ke=G[ge.from];if(ke.min==null)ge.min=ge.max=null;else{let Te=ge.range(r,ke.min,ke.max,ce);ge.min=Te[0],ge.max=Te[1]}}}let J={},ie=!1;for(let ce in G){let ge=G[ce],ke=$[ce];if(ke.min!=ge.min||ke.max!=ge.max){ke.min=ge.min,ke.max=ge.max;let Te=ke.distr;ke._min=Te==3?$o(ke.min):Te==4?xh(ke.min,ke.asinh):Te==100?ke.fwd(ke.min):ke.min,ke._max=Te==3?$o(ke.max):Te==4?xh(ke.max,ke.asinh):Te==100?ke.fwd(ke.max):ke.max,J[ce]=ie=!0}}if(ie){x.forEach((ce,ge)=>{d==2?ge>0&&J.y&&(ce._paths=null):J[ce.scale]&&(ce._paths=null)});for(let ce in J)Ar=!0,st("setScale",ce);se&&Q.left>=0&&(Ci=nr=!0)}for(let ce in _)_[ce]=null}function Lo(G){let J=Ch(le-1,0,Ln-1),ie=Ch(Ne+1,0,Ln-1);for(;G[J]==null&&J>0;)J--;for(;G[ie]==null&&ie<Ln-1;)ie++;return[J,ie]}function Fs(){if(Ln>0){let G=x.some(J=>J._focus)&&fr!=Sr.alpha;G&&(a.globalAlpha=fr=Sr.alpha),x.forEach((J,ie)=>{if(ie>0&&J.show&&(zs(ie,!1),zs(ie,!0),J._paths==null)){let ce=fr;fr!=J.alpha&&(a.globalAlpha=fr=J.alpha);let ge=d==2?[0,t[ie][0].length-1]:Lo(t[ie]);J._paths=J.paths(r,ie,ge[0],ge[1]),fr!=ce&&(a.globalAlpha=fr=ce)}}),x.forEach((J,ie)=>{if(ie>0&&J.show){let ce=fr;fr!=J.alpha&&(a.globalAlpha=fr=J.alpha),J._paths!=null&&Jo(ie,!1);{let ge=J._paths!=null?J._paths.gaps:null,ke=J.points.show(r,ie,le,Ne,ge),Te=J.points.filter(r,ie,ke,ge);(ke||Te)&&(J.points._paths=J.points.paths(r,ie,le,Ne,Te),Jo(ie,!0))}fr!=ce&&(a.globalAlpha=fr=ce),st("drawSeries",ie)}}),G&&(a.globalAlpha=fr=1)}}function zs(G,J){let ie=J?x[G].points:x[G];ie._stroke=ie.stroke(r,G),ie._fill=ie.fill(r,G)}function Jo(G,J){let ie=J?x[G].points:x[G],{stroke:ce,fill:ge,clip:ke,flags:Te,_stroke:Fe=ie._stroke,_fill:je=ie._fill,_width:qe=ie.width}=ie._paths;qe=vn(qe*rn,3);let Ze=null,ot=qe%2/2;J&&je==null&&(je=qe>0?"#fff":Fe);let At=ie.pxAlign==1&&ot>0;if(At&&a.translate(ot,ot),!J){let Zt=Hn-qe/2,Bt=Pn-qe/2,Ct=Xt+qe,vt=an+qe;Ze=new Path2D,Ze.rect(Zt,Bt,Ct,vt)}J?Zo(Fe,qe,ie.dash,ie.cap,je,ce,ge,Te,ke):Ea(G,Fe,qe,ie.dash,ie.cap,je,ce,ge,Te,Ze,ke),At&&a.translate(-ot,-ot)}function Ea(G,J,ie,ce,ge,ke,Te,Fe,je,qe,Ze){let ot=!1;je!=0&&k.forEach((At,Zt)=>{if(At.series[0]==G){let Bt=x[At.series[1]],Ct=t[At.series[1]],vt=(Bt._paths||al).band;Ko(vt)&&(vt=At.dir==1?vt[0]:vt[1]);let dt,Cn=null;Bt.show&&vt&&XS(Ct,le,Ne)?(Cn=At.fill(r,Zt)||ke,dt=Bt._paths.clip):vt=null,Zo(J,ie,ce,ge,Cn,Te,Fe,je,qe,Ze,dt,vt),ot=!0}}),ot||Zo(J,ie,ce,ge,ke,Te,Fe,je,qe,Ze)}const bo=pa|Ih;function Zo(G,J,ie,ce,ge,ke,Te,Fe,je,qe,Ze,ot){Ds(G,J,ie,ce,ge),(je||qe||ot)&&(a.save(),je&&a.clip(je),qe&&a.clip(qe)),ot?(Fe&bo)==bo?(a.clip(ot),Ze&&a.clip(Ze),pr(ge,Te),ro(G,ke,J)):Fe&Ih?(pr(ge,Te),a.clip(ot),ro(G,ke,J)):Fe&pa&&(a.save(),a.clip(ot),Ze&&a.clip(Ze),pr(ge,Te),a.restore(),ro(G,ke,J)):(pr(ge,Te),ro(G,ke,J)),(je||qe||ot)&&a.restore()}function ro(G,J,ie){ie>0&&(J instanceof Map?J.forEach((ce,ge)=>{a.strokeStyle=Jn=ge,a.stroke(ce)}):J!=null&&G&&a.stroke(J))}function pr(G,J){J instanceof Map?J.forEach((ie,ce)=>{a.fillStyle=fn=ce,a.fill(ie)}):J!=null&&G&&a.fill(J)}function Bs(G,J,ie,ce){let ge=R[G],ke;if(ce<=0)ke=[0,0];else{let Te=ge._space=ge.space(r,G,J,ie,ce),Fe=ge._incrs=ge.incrs(r,G,J,ie,ce,Te);ke=vE(J,ie,Fe,ce,Te)}return ge._found=ke}function ni(G,J,ie,ce,ge,ke,Te,Fe,je,qe){let Ze=Te%2/2;c==1&&a.translate(Ze,Ze),Ds(Fe,Te,je,qe,Fe),a.beginPath();let ot,At,Zt,Bt,Ct=ge+(ce==0||ce==3?-ke:ke);ie==0?(At=ge,Bt=Ct):(ot=ge,Zt=Ct);for(let vt=0;vt<G.length;vt++)J[vt]!=null&&(ie==0?ot=Zt=G[vt]:At=Bt=G[vt],a.moveTo(ot,At),a.lineTo(Zt,Bt));a.stroke(),c==1&&a.translate(-Ze,-Ze)}function Ra(G){let J=!0;return R.forEach((ie,ce)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(J=!1,ie._show=!1,io(!1));return}else ie._show||(J=!1,ie._show=!0,io(!1));let ke=ie.side,Te=ke%2,{min:Fe,max:je}=ge,[qe,Ze]=Bs(ce,Fe,je,Te==0?mt:Je);if(Ze==0)return;let ot=ge.distr==2,At=ie._splits=ie.splits(r,ce,Fe,je,qe,Ze,ot),Zt=ge.distr==2?At.map(dt=>xt[dt]):At,Bt=ge.distr==2?xt[At[1]]-xt[At[0]]:qe,Ct=ie._values=ie.values(r,ie.filter(r,Zt,ce,Ze,Bt),ce,Ze,Bt);ie._rotate=ke==2?ie.rotate(r,Ct,ce,Ze):0;let vt=ie._size;ie._size=Oi(ie.size(r,Ct,ce,G)),vt!=null&&ie._size!=vt&&(J=!1)}),J}function Ta(G){let J=!0;return Mo.forEach((ie,ce)=>{let ge=ie(r,ce,di,G);ge!=dr[ce]&&(J=!1),dr[ce]=ge}),J}function Qo(){for(let G=0;G<R.length;G++){let J=R[G];if(!J.show||!J._show)continue;let ie=J.side,ce=ie%2,ge,ke,Te=J.stroke(r,G),Fe=ie==0||ie==3?-1:1,[je,qe]=J._found;if(J.label!=null){let Rr=J.labelGap*Fe,An=lr((J._lpos+Rr)*rn);Yo(J.labelFont[0],Te,"center",ie==2?il:iv),a.save(),ce==1?(ge=ke=0,a.translate(An,lr(Pn+an/2)),a.rotate((ie==3?-uc:uc)/2)):(ge=lr(Hn+Xt/2),ke=An);let Wi=kv(J.label)?J.label(r,G,je,qe):J.label;a.fillText(Wi,ge,ke),a.restore()}if(qe==0)continue;let Ze=$[J.scale],ot=ce==0?Xt:an,At=ce==0?Hn:Pn,Zt=J._splits,Bt=Ze.distr==2?Zt.map(Rr=>xt[Rr]):Zt,Ct=Ze.distr==2?xt[Zt[1]]-xt[Zt[0]]:je,vt=J.ticks,dt=J.border,Cn=vt.show?vt.size:0,Nn=lr(Cn*rn),or=lr((J.alignTo==2?J._size-Cn-J.gap:J.gap)*rn),cn=J._rotate*-uc/180,pn=m(J._pos*rn),me=(Nn+or)*Fe,Ee=pn+me;ke=ce==0?Ee:0,ge=ce==1?Ee:0;let Se=J.font[0],Ke=J.align==1?aa:J.align==2?lh:cn>0?aa:cn<0?lh:ce==0?"center":ie==3?lh:aa,gt=cn||ce==1?"middle":ie==2?il:iv;Yo(Se,Te,Ke,gt);let Et=J.font[1]*J.lineGap,tn=Zt.map(Rr=>m(v(Rr,Ze,ot,At))),Wt=J._values;for(let Rr=0;Rr<Wt.length;Rr++){let An=Wt[Rr];if(An!=null){ce==0?ge=tn[Rr]:ke=tn[Rr],An=""+An;let Wi=An.indexOf(`
1480
- `)==-1?[An]:An.split(/\n/gm);for(let Tr=0;Tr<Wi.length;Tr++){let Do=Wi[Tr];cn?(a.save(),a.translate(ge,ke+Tr*Et),a.rotate(cn),a.fillText(Do,0,0),a.restore()):a.fillText(Do,ge,ke+Tr*Et)}}}vt.show&&ni(tn,vt.filter(r,Bt,G,qe,Ct),ce,ie,pn,Nn,vn(vt.width*rn,3),vt.stroke(r,G),vt.dash,vt.cap);let pi=J.grid;pi.show&&ni(tn,pi.filter(r,Bt,G,qe,Ct),ce,ce==0?2:1,ce==0?Pn:Hn,ce==0?an:Xt,vn(pi.width*rn,3),pi.stroke(r,G),pi.dash,pi.cap),dt.show&&ni([pn],[1],ce==0?1:0,ce==0?1:2,ce==1?Pn:Hn,ce==1?an:Xt,vn(dt.width*rn,3),dt.stroke(r,G),dt.dash,dt.cap)}st("drawAxes")}function io(G){x.forEach((J,ie)=>{ie>0&&(J._paths=null,G&&(d==1?(J.min=null,J.max=null):J.facets.forEach(ce=>{ce.min=null,ce.max=null})))})}let Io=!1,es=!1,wo=[];function Ma(){es=!1;for(let G=0;G<wo.length;G++)st(...wo[G]);wo.length=0}function xo(){Io||(u$(Ws),Io=!0)}function Be(G,J=!1){Io=!0,es=J,G(r),Ws(),J&&wo.length>0&&queueMicrotask(Ma)}r.batch=Be;function Ws(){if(Dr&&(Xo(),Dr=!1),Ar&&(ei(),Ar=!1),Zr){if(Sn(g,aa,Tt),Sn(g,il,en),Sn(g,nl,mt),Sn(g,rl,Je),Sn(o,aa,Tt),Sn(o,il,en),Sn(o,nl,mt),Sn(o,rl,Je),Sn(u,nl,yn),Sn(u,rl,ur),i.width=lr(yn*rn),i.height=lr(ur*rn),R.forEach(({_el:G,_show:J,_size:ie,_pos:ce,side:ge})=>{if(G!=null)if(J){let ke=ge===3||ge===0?ie:0,Te=ge%2==1;Sn(G,Te?"left":"top",ce-ke),Sn(G,Te?"width":"height",ie),Sn(G,Te?"top":"left",Te?en:Tt),Sn(G,Te?"height":"width",Te?Je:mt),gh(G,bs)}else bi(G,bs)}),Jn=fn=br=wr=vo=Is=Os=Ns=xn=null,fr=1,z(!0),Tt!=Dn||en!=Xn||mt!=hr||Je!=bn){io(!1);let G=mt/hr,J=Je/bn;if(se&&!Ci&&Q.left>=0){Q.left*=G,Q.top*=J,oo&&po(oo,lr(Q.left),0,mt,Je),Bn&&po(Bn,0,lr(Q.top),mt,Je);for(let ie=0;ie<_n.length;ie++){let ce=_n[ie];ce!=null&&(yr[ie]*=G,hi[ie]*=J,po(ce,Oi(yr[ie]),Oi(hi[ie]),mt,Je))}}if(kt.show&&!_i&&kt.left>=0&&kt.width>0){kt.left*=G,kt.width*=G,kt.top*=J,kt.height*=J;for(let ie in X)Sn(zr,ie,kt[ie])}Dn=Tt,Xn=en,hr=mt,bn=Je}st("setSize"),Zr=!1}yn>0&&ur>0&&(a.clearRect(0,0,i.width,i.height),st("drawClear"),N.forEach(G=>G()),st("draw")),kt.show&&_i&&(zi(kt),_i=!1),se&&Ci&&(S(null,!0,!1),Ci=!1),ae.show&&ae.live&&nr&&(b(),nr=!1),s||(s=!0,r.status=1,st("ready")),wn=!1,Io=!1}r.redraw=(G,J)=>{Ar=J||!1,G!==!1?Br(C,W.min,W.max):xo()};function De(G,J){let ie=$[G];if(ie.from==null){if(Ln==0){let ce=ie.range(r,J.min,J.max,G);J.min=ce[0],J.max=ce[1]}if(J.min>J.max){let ce=J.min;J.min=J.max,J.max=ce}if(Ln>1&&J.min!=null&&J.max!=null&&J.max-J.min<1e-16)return;G==C&&ie.distr==2&&Ln>0&&(J.min=Ji(J.min,t[0]),J.max=Ji(J.max,t[0]),J.min==J.max&&J.max++),_[G]=J,Dr=!0,xo()}}r.setScale=De;let zn,Oo,oo,Bn,La,No,Pi,Co,js,on,ft,Gt,Fi=!1;const Un=Q.drag;let Ve=Un.x,kn=Un.y;se&&(Q.x&&(zn=Ii(OS,o)),Q.y&&(Oo=Ii(NS,o)),W.ori==0?(oo=zn,Bn=Oo):(oo=Oo,Bn=zn),ft=Q.left,Gt=Q.top);const kt=r.select=er({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),zr=kt.show?Ii(IS,kt.over?o:g):null;function zi(G,J){if(kt.show){for(let ie in G)kt[ie]=G[ie],ie in X&&Sn(zr,ie,G[ie]);J!==!1&&st("setSelect")}}r.setSelect=zi;function zt(G){if(x[G].show)oe&&gh(Re[G],bs);else if(oe&&bi(Re[G],bs),se){let J=Fn?_n[0]:_n[G];J!=null&&po(J,-10,-10,mt,Je)}}function Br(G,J,ie){De(G,{min:J,max:ie})}function rr(G,J,ie,ce){J.focus!=null&&Hs(G),J.show!=null&&x.forEach((ge,ke)=>{ke>0&&(G==ke||G==null)&&(ge.show=J.show,zt(ke),d==2?(Br(ge.facets[0].scale,null,null),Br(ge.facets[1].scale,null,null)):Br(ge.scale,null,null),xo())}),ie!==!1&&st("setSeries",G,J),ce&&$t("setSeries",r,G,J)}r.setSeries=rr;function so(G,J){er(k[G],J)}function Ai(G,J){G.fill=Vt(G.fill||null),G.dir=Qt(G.dir,-1),J=J??k.length,k.splice(J,0,G)}function In(G){G==null?k.length=0:k.splice(G,1)}r.addBand=Ai,r.setBand=so,r.delBand=In;function ts(G,J){x[G].alpha=J,se&&_n[G]!=null&&(_n[G].style.opacity=J),oe&&Re[G]&&(Re[G].style.opacity=J)}let Vn,Si,$i;const Bi={focus:!0};function Hs(G){if(G!=$i){let J=G==null,ie=Sr.alpha!=1;x.forEach((ce,ge)=>{if(d==1||ge>0){let ke=J||ge==0||ge==G;ce._focus=J?null:ke,ie&&ts(ge,ke?1:Sr.alpha)}}),$i=G,ie&&xo()}}oe&&Pr&&Mn(lv,pe,G=>{Q._lock||(ui(G),$i!=null&&rr(null,Bi,!0,St.setSeries))});function ln(G,J,ie){let ce=$[J];ie&&(G=G/rn-(ce.ori==1?en:Tt));let ge=mt;ce.ori==1&&(ge=Je,G=ge-G),ce.dir==-1&&(G=ge-G);let ke=ce._min,Te=ce._max,Fe=G/ge,je=ke+(Te-ke)*Fe,qe=ce.distr;return qe==3?ua(10,je):qe==4?ZS(je,ce.asinh):qe==100?ce.bwd(je):je}function Ia(G,J){let ie=ln(G,C,J);return Ji(ie,t[0],le,Ne)}r.valToIdx=G=>Ji(G,t[0]),r.posToIdx=Ia,r.posToVal=ln,r.valToPos=(G,J,ie)=>$[J].ori==0?h(G,$[J],ie?Xt:mt,ie?Hn:0):p(G,$[J],ie?an:Je,ie?Pn:0),r.setCursor=(G,J,ie)=>{ft=G.left,Gt=G.top,S(null,J,ie)};function gr(G,J){Sn(zr,aa,kt.left=G),Sn(zr,nl,kt.width=J)}function Wr(G,J){Sn(zr,il,kt.top=G),Sn(zr,rl,kt.height=J)}let _o=W.ori==0?gr:Wr,Er=W.ori==1?gr:Wr;function fi(){if(oe&&ae.live)for(let G=d==2?1:0;G<x.length;G++){if(G==0&&at)continue;let J=ae.values[G],ie=0;for(let ce in J)Ye[G][ie++].firstChild.nodeValue=J[ce]}}function b(G,J){if(G!=null&&(G.idxs?G.idxs.forEach((ie,ce)=>{ee[ce]=ie}):n$(G.idx)||ee.fill(G.idx),ae.idx=ee[0]),oe&&ae.live){for(let ie=0;ie<x.length;ie++)(ie>0||d==1&&!at)&&E(ie,ee[ie]);fi()}nr=!1,J!==!1&&st("setLegend")}r.setLegend=b;function E(G,J){let ie=x[G],ce=G==0&&F==2?xt:t[G],ge;at?ge=ie.values(r,G,J)??it:(ge=ie.value(r,J==null?null:ce[J],G,J),ge=ge==null?it:{_:ge}),ae.values[G]=ge}function S(G,J,ie){js=ft,on=Gt,[ft,Gt]=Q.move(r,ft,Gt),Q.left=ft,Q.top=Gt,se&&(oo&&po(oo,lr(ft),0,mt,Je),Bn&&po(Bn,0,lr(Gt),mt,Je));let ce,ge=le>Ne;Vn=mn,Si=null;let ke=W.ori==0?mt:Je,Te=W.ori==1?mt:Je;if(ft<0||Ln==0||ge){ce=Q.idx=null;for(let Fe=0;Fe<x.length;Fe++){let je=_n[Fe];je!=null&&po(je,-10,-10,mt,Je)}Pr&&rr(null,Bi,!0,G==null&&St.setSeries),ae.live&&(ee.fill(ce),nr=!0)}else{let Fe,je,qe;d==1&&(Fe=W.ori==0?ft:Gt,je=ln(Fe,C),ce=Q.idx=Ji(je,t[0],le,Ne),qe=D(t[0][ce],W,ke,0));let Ze=-10,ot=-10,At=0,Zt=0,Bt=!0,Ct="",vt="";for(let dt=d==2?1:0;dt<x.length;dt++){let Cn=x[dt],Nn=ee[dt],or=Nn==null?null:d==1?t[dt][Nn]:t[dt][1][Nn],cn=Q.dataIdx(r,dt,ce,je),pn=cn==null?null:d==1?t[dt][cn]:t[dt][1][cn];if(nr=nr||pn!=or||cn!=Nn,ee[dt]=cn,dt>0&&Cn.show){let me=cn==null?-10:cn==ce?qe:D(d==1?t[0][cn]:t[dt][0][cn],W,ke,0),Ee=pn==null?-10:A(pn,d==1?$[Cn.scale]:$[Cn.facets[1].scale],Te,0);if(Pr&&pn!=null){let Se=W.ori==1?ft:Gt,Ke=ar(Sr.dist(r,dt,cn,Ee,Se));if(Ke<Vn){let gt=Sr.bias;if(gt!=0){let Et=ln(Se,Cn.scale),tn=pn>=0?1:-1,Wt=Et>=0?1:-1;Wt==tn&&(Wt==1?gt==1?pn>=Et:pn<=Et:gt==1?pn<=Et:pn>=Et)&&(Vn=Ke,Si=dt)}else Vn=Ke,Si=dt}}if(nr||Fn){let Se,Ke;W.ori==0?(Se=me,Ke=Ee):(Se=Ee,Ke=me);let gt,Et,tn,Wt,pi,Rr,An=!0,Wi=En.bbox;if(Wi!=null){An=!1;let Tr=Wi(r,dt);tn=Tr.left,Wt=Tr.top,gt=Tr.width,Et=Tr.height}else tn=Se,Wt=Ke,gt=Et=En.size(r,dt);if(Rr=En.fill(r,dt),pi=En.stroke(r,dt),Fn)dt==Si&&Vn<=Sr.prox&&(Ze=tn,ot=Wt,At=gt,Zt=Et,Bt=An,Ct=Rr,vt=pi);else{let Tr=_n[dt];Tr!=null&&(yr[dt]=tn,hi[dt]=Wt,gv(Tr,gt,Et,An),fv(Tr,Rr,pi),po(Tr,Oi(tn),Oi(Wt),mt,Je))}}}}if(Fn){let dt=Sr.prox,Cn=$i==null?Vn<=dt:Vn>dt||Si!=$i;if(nr||Cn){let Nn=_n[0];Nn!=null&&(yr[0]=Ze,hi[0]=ot,gv(Nn,At,Zt,Bt),fv(Nn,Ct,vt),po(Nn,Oi(Ze),Oi(ot),mt,Je))}}}if(kt.show&&Fi)if(G!=null){let[Fe,je]=St.scales,[qe,Ze]=St.match,[ot,At]=G.cursor.sync.scales,Zt=G.cursor.drag;if(Ve=Zt._x,kn=Zt._y,Ve||kn){let{left:Bt,top:Ct,width:vt,height:dt}=G.select,Cn=G.scales[ot].ori,Nn=G.posToVal,or,cn,pn,me,Ee,Se=Fe!=null&&qe(Fe,ot),Ke=je!=null&&Ze(je,At);Se&&Ve?(Cn==0?(or=Bt,cn=vt):(or=Ct,cn=dt),pn=$[Fe],me=D(Nn(or,ot),pn,ke,0),Ee=D(Nn(or+cn,ot),pn,ke,0),_o(Zi(me,Ee),ar(Ee-me))):_o(0,ke),Ke&&kn?(Cn==1?(or=Bt,cn=vt):(or=Ct,cn=dt),pn=$[je],me=A(Nn(or,At),pn,Te,0),Ee=A(Nn(or+cn,At),pn,Te,0),Er(Zi(me,Ee),ar(Ee-me))):Er(0,Te)}else Z()}else{let Fe=ar(js-La),je=ar(on-No);if(W.ori==1){let At=Fe;Fe=je,je=At}Ve=Un.x&&Fe>=Un.dist,kn=Un.y&&je>=Un.dist;let qe=Un.uni;qe!=null?Ve&&kn&&(Ve=Fe>=qe,kn=je>=qe,!Ve&&!kn&&(je>Fe?kn=!0:Ve=!0)):Un.x&&Un.y&&(Ve||kn)&&(Ve=kn=!0);let Ze,ot;Ve&&(W.ori==0?(Ze=Pi,ot=ft):(Ze=Co,ot=Gt),_o(Zi(Ze,ot),ar(ot-Ze)),kn||Er(0,Te)),kn&&(W.ori==1?(Ze=Pi,ot=ft):(Ze=Co,ot=Gt),Er(Zi(Ze,ot),ar(ot-Ze)),Ve||_o(0,ke)),!Ve&&!kn&&(_o(0,0),Er(0,0))}if(Un._x=Ve,Un._y=kn,G==null){if(ie){if(Jt!=null){let[Fe,je]=St.scales;St.values[0]=Fe!=null?ln(W.ori==0?ft:Gt,Fe):null,St.values[1]=je!=null?ln(W.ori==1?ft:Gt,je):null}$t(uh,r,ft,Gt,mt,Je,ce)}if(Pr){let Fe=ie&&St.setSeries,je=Sr.prox;$i==null?Vn<=je&&rr(Si,Bi,!0,Fe):Vn>je?rr(null,Bi,!0,Fe):Si!=$i&&rr(Si,Bi,!0,Fe)}}nr&&(ae.idx=ce,b()),J!==!1&&st("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&z(!1),P}});function z(G=!1){G?P=null:(P=o.getBoundingClientRect(),st("syncRect",P))}function j(G,J,ie,ce,ge,ke,Te){Q._lock||Fi&&G!=null&&G.movementX==0&&G.movementY==0||(q(G,J,ie,ce,ge,ke,Te,!1,G!=null),G!=null?S(null,!0,!0):S(J,!0,!1))}function q(G,J,ie,ce,ge,ke,Te,Fe,je){if(P==null&&z(!1),ui(G),G!=null)ie=G.clientX-P.left,ce=G.clientY-P.top;else{if(ie<0||ce<0){ft=-10,Gt=-10;return}let[qe,Ze]=St.scales,ot=J.cursor.sync,[At,Zt]=ot.values,[Bt,Ct]=ot.scales,[vt,dt]=St.match,Cn=J.axes[0].side%2==1,Nn=W.ori==0?mt:Je,or=W.ori==1?mt:Je,cn=Cn?ke:ge,pn=Cn?ge:ke,me=Cn?ce:ie,Ee=Cn?ie:ce;if(Bt!=null?ie=vt(qe,Bt)?v(At,$[qe],Nn,0):-10:ie=Nn*(me/cn),Ct!=null?ce=dt(Ze,Ct)?v(Zt,$[Ze],or,0):-10:ce=or*(Ee/pn),W.ori==1){let Se=ie;ie=ce,ce=Se}}je&&(J==null||J.cursor.event.type==uh)&&((ie<=1||ie>=mt-1)&&(ie=Cs(ie,mt)),(ce<=1||ce>=Je-1)&&(ce=Cs(ce,Je))),Fe?(La=ie,No=ce,[Pi,Co]=Q.move(r,ie,ce)):(ft=ie,Gt=ce)}const X={width:0,height:0,left:0,top:0};function Z(){zi(X,!1)}let re,he,be,Ae;function ye(G,J,ie,ce,ge,ke,Te){Fi=!0,Ve=kn=Un._x=Un._y=!1,q(G,J,ie,ce,ge,ke,Te,!0,!1),G!=null&&(Mn(hh,fh,xe,!1),$t(sv,r,Pi,Co,mt,Je,null));let{left:Fe,top:je,width:qe,height:Ze}=kt;re=Fe,he=je,be=qe,Ae=Ze}function xe(G,J,ie,ce,ge,ke,Te){Fi=Un._x=Un._y=!1,q(G,J,ie,ce,ge,ke,Te,!1,!0);let{left:Fe,top:je,width:qe,height:Ze}=kt,ot=qe>0||Ze>0,At=re!=Fe||he!=je||be!=qe||Ae!=Ze;if(ot&&At&&zi(kt),Un.setScale&&ot&&At){let Zt=Fe,Bt=qe,Ct=je,vt=Ze;if(W.ori==1&&(Zt=je,Bt=Ze,Ct=Fe,vt=qe),Ve&&Br(C,ln(Zt,C),ln(Zt+Bt,C)),kn)for(let dt in $){let Cn=$[dt];dt!=C&&Cn.from==null&&Cn.min!=mn&&Br(dt,ln(Ct+vt,dt),ln(Ct,dt))}Z()}else Q.lock&&(Q._lock=!Q._lock,S(J,!0,G!=null));G!=null&&(kr(hh,fh),$t(hh,r,ft,Gt,mt,Je,null))}function Oe(G,J,ie,ce,ge,ke,Te){if(Q._lock)return;ui(G);let Fe=Fi;if(Fi){let je=!0,qe=!0,Ze=10,ot,At;W.ori==0?(ot=Ve,At=kn):(ot=kn,At=Ve),ot&&At&&(je=ft<=Ze||ft>=mt-Ze,qe=Gt<=Ze||Gt>=Je-Ze),ot&&je&&(ft=ft<Pi?0:mt),At&&qe&&(Gt=Gt<Co?0:Je),S(null,!0,!0),Fi=!1}ft=-10,Gt=-10,ee.fill(null),S(null,!0,!0),Fe&&(Fi=Fe)}function Le(G,J,ie,ce,ge,ke,Te){Q._lock||(ui(G),$r(),Z(),G!=null&&$t(cv,r,ft,Gt,mt,Je,null))}function Xe(){R.forEach(yE),no(r.width,r.height,!0)}ws(oc,ca,Xe);const pt={};pt.mousedown=ye,pt.mousemove=j,pt.mouseup=xe,pt.dblclick=Le,pt.setSeries=(G,J,ie,ce)=>{let ge=St.match[2];ie=ge(r,J,ie),ie!=-1&&rr(ie,ce,!0,!1)},se&&(Mn(sv,o,ye),Mn(uh,o,j),Mn(av,o,G=>{ui(G),z(!1)}),Mn(lv,o,Oe),Mn(cv,o,Le),Ph.add(r),r.syncRect=z);const nt=r.hooks=n.hooks||{};function st(G,J,ie){es?wo.push([G,J,ie]):G in nt&&nt[G].forEach(ce=>{ce.call(null,r,J,ie)})}(n.plugins||[]).forEach(G=>{for(let J in G.hooks)nt[J]=(nt[J]||[]).concat(G.hooks[J])});const Rn=(G,J,ie)=>ie,St=er({key:null,setSeries:!1,filters:{pub:$v,sub:$v},scales:[C,x[1]?x[1].scale:null],match:[Ev,Ev,Rn],values:[null,null]},Q.sync);St.match.length==2&&St.match.push(Rn),Q.sync=St;const Jt=St.key,Lt=dy(Jt);function $t(G,J,ie,ce,ge,ke,Te){St.filters.pub(G,J,ie,ce,ge,ke,Te)&&Lt.pub(G,J,ie,ce,ge,ke,Te)}Lt.sub(r);function ir(G,J,ie,ce,ge,ke,Te){St.filters.sub(G,J,ie,ce,ge,ke,Te)&&pt[G](null,J,ie,ce,ge,ke,Te)}r.pub=ir;function mr(){Lt.unsub(r),Ph.delete(r),cr.clear(),vh(oc,ca,Xe),f.remove(),pe?.remove(),st("destroy")}r.destroy=mr;function On(){st("init",n,t),Kt(t||n.data,!1),_[C]?De(C,_[C]):$r(),_i=kt.show&&(kt.width>0||kt.height>0),Ci=nr=!0,no(n.width,n.height)}return x.forEach(mo),R.forEach(ti),e?e instanceof HTMLElement?(e.appendChild(f),On()):e(r,On):On(),r}Ir.assign=er,Ir.fmtNum=wh,Ir.rangeNum=cc,Ir.rangeLog=lc,Ir.rangeAsinh=yh,Ir.orient=ks,Ir.pxRatio=rn,Ir.join=c$,Ir.fmtDate=kh,Ir.tzDate=w$,Ir.sync=dy;{Ir.addGap=nE,Ir.clipGaps=mc;let n=Ir.paths={points:by};n.linear=xy,n.stepped=oE,n.bars=sE,n.spline=lE}var Ry,Ty;function bE(){return Ty||(Ty=1,Ry=function(n,t,e,r,d){var h,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(d===void 0)d=n.length-1;else if(d=d|0,d<r||d>=n.length)throw new RangeError("invalid upper bound");for(;r<=d;)if(h=r+(d-r>>>1),p=+e(n[h],t,h,n),p<0)r=h+1;else if(p>0)d=h-1;else return h;return~r}),Ry}var wE=bE();const Xz=Tn("y",rc(wE));var zh,My;function xE(){if(My)return zh;My=1;function n(t,e,r){var d=-1,h=t.length;e<0&&(e=-e>h?0:h+e),r=r>h?h:r,r<0&&(r+=h),h=e>r?0:r-e>>>0,e>>>=0;for(var p=Array(h);++d<h;)p[d]=t[d+e];return p}return zh=n,zh}var Bh,Ly;function CE(){if(Ly)return Bh;Ly=1;var n=xE();function t(e,r,d){var h=e.length;return d=d===void 0?h:d,!r&&d>=h?e:n(e,r,d)}return Bh=t,Bh}var Wh,Iy;function Oy(){if(Iy)return Wh;Iy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,h="\\ufe0e\\ufe0f",p="\\u200d",v=RegExp("["+p+n+d+h+"]");function s(f){return v.test(f)}return Wh=s,Wh}var jh,Ny;function _E(){if(Ny)return jh;Ny=1;function n(t){return t.split("")}return jh=n,jh}var Hh,Dy;function kE(){if(Dy)return Hh;Dy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,h="\\ufe0e\\ufe0f",p="["+n+"]",v="["+d+"]",s="\\ud83c[\\udffb-\\udfff]",f="(?:"+v+"|"+s+")",i="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",o=f+"?",c="["+h+"]?",m="(?:"+g+"(?:"+[i,a,u].join("|")+")"+c+o+")*",w=c+o+m,x="(?:"+[i+v+"?",v,a,u,p].join("|")+")",R=RegExp(s+"(?="+s+")|"+x+w,"g");function $(k){return k.match(R)||[]}return Hh=$,Hh}var Uh,Py;function AE(){if(Py)return Uh;Py=1;var n=_E(),t=Oy(),e=kE();function r(d){return t(d)?e(d):n(d)}return Uh=r,Uh}var Vh,Fy;function SE(){if(Fy)return Vh;Fy=1;var n=typeof Go=="object"&&Go&&Go.Object===Object&&Go;return Vh=n,Vh}var Gh,zy;function $E(){if(zy)return Gh;zy=1;var n=SE(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Gh=e,Gh}var qh,By;function Kh(){if(By)return qh;By=1;var n=$E(),t=n.Symbol;return qh=t,qh}var Yh,Wy;function EE(){if(Wy)return Yh;Wy=1;function n(t,e){for(var r=-1,d=t==null?0:t.length,h=Array(d);++r<d;)h[r]=e(t[r],r,t);return h}return Yh=n,Yh}var Xh,jy;function RE(){if(jy)return Xh;jy=1;var n=Array.isArray;return Xh=n,Xh}var Jh,Hy;function TE(){if(Hy)return Jh;Hy=1;var n=Kh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,d=n?n.toStringTag:void 0;function h(p){var v=e.call(p,d),s=p[d];try{p[d]=void 0;var f=!0}catch{}var i=r.call(p);return f&&(v?p[d]=s:delete p[d]),i}return Jh=h,Jh}var Zh,Uy;function ME(){if(Uy)return Zh;Uy=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return Zh=e,Zh}var Qh,Vy;function LE(){if(Vy)return Qh;Vy=1;var n=Kh(),t=TE(),e=ME(),r="[object Null]",d="[object Undefined]",h=n?n.toStringTag:void 0;function p(v){return v==null?v===void 0?d:r:h&&h in Object(v)?t(v):e(v)}return Qh=p,Qh}var ed,Gy;function IE(){if(Gy)return ed;Gy=1;function n(t){return t!=null&&typeof t=="object"}return ed=n,ed}var td,qy;function OE(){if(qy)return td;qy=1;var n=LE(),t=IE(),e="[object Symbol]";function r(d){return typeof d=="symbol"||t(d)&&n(d)==e}return td=r,td}var nd,Ky;function NE(){if(Ky)return nd;Ky=1;var n=Kh(),t=EE(),e=RE(),r=OE(),d=n?n.prototype:void 0,h=d?d.toString:void 0;function p(v){if(typeof v=="string")return v;if(e(v))return t(v,p)+"";if(r(v))return h?h.call(v):"";var s=v+"";return s=="0"&&1/v==-1/0?"-0":s}return nd=p,nd}var rd,Yy;function wc(){if(Yy)return rd;Yy=1;var n=NE();function t(e){return e==null?"":n(e)}return rd=t,rd}var id,Xy;function DE(){if(Xy)return id;Xy=1;var n=CE(),t=Oy(),e=AE(),r=wc();function d(h){return function(p){p=r(p);var v=t(p)?e(p):void 0,s=v?v[0]:p.charAt(0),f=v?n(v,1).join(""):p.slice(1);return s[h]()+f}}return id=d,id}var od,Jy;function Zy(){if(Jy)return od;Jy=1;var n=DE(),t=n("toUpperCase");return od=t,od}var PE=Zy();const FE=rc(PE);var sd,Qy;function zE(){if(Qy)return sd;Qy=1;var n=wc(),t=Zy();function e(r){return t(n(r).toLowerCase())}return sd=e,sd}var ad,e0;function BE(){if(e0)return ad;e0=1;function n(t,e,r,d){var h=-1,p=t==null?0:t.length;for(d&&p&&(r=t[++h]);++h<p;)r=e(r,t[h],h,t);return r}return ad=n,ad}var ld,t0;function WE(){if(t0)return ld;t0=1;function n(t){return function(e){return t?.[e]}}return ld=n,ld}var cd,n0;function jE(){if(n0)return cd;n0=1;var n=WE(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return cd=e,cd}var ud,r0;function HE(){if(r0)return ud;r0=1;var n=jE(),t=wc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",d="\\ufe20-\\ufe2f",h="\\u20d0-\\u20ff",p=r+d+h,v="["+p+"]",s=RegExp(v,"g");function f(i){return i=t(i),i&&i.replace(e,n).replace(s,"")}return ud=f,ud}var hd,i0;function UE(){if(i0)return hd;i0=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return hd=t,hd}var dd,o0;function VE(){if(o0)return dd;o0=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return dd=t,dd}var fd,s0;function GE(){if(s0)return fd;s0=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,h="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",v="\\xac\\xb1\\xd7\\xf7",s="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",i=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",g=v+s+f+i,o="['’]",c="["+g+"]",m="["+d+"]",w="\\d+",x="["+h+"]",R="["+p+"]",$="[^"+n+g+w+h+p+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",O="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",M="["+a+"]",W="\\u200d",F="(?:"+R+"|"+$+")",D="(?:"+M+"|"+$+")",A="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",L=C+"?",B="["+u+"]?",U="(?:"+W+"(?:"+[O,N,I].join("|")+")"+B+L+")*",V="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",K="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ee=B+L+U,ae="(?:"+[x,N,I].join("|")+")"+ee,Q=RegExp([M+"?"+R+"+"+A+"(?="+[c,M,"$"].join("|")+")",D+"+"+_+"(?="+[c,M+F,"$"].join("|")+")",M+"?"+F+"+"+A,M+"+"+_,K,V,w,ae].join("|"),"g");function oe(se){return se.match(Q)||[]}return fd=oe,fd}var pd,a0;function qE(){if(a0)return pd;a0=1;var n=UE(),t=VE(),e=wc(),r=GE();function d(h,p,v){return h=e(h),p=v?void 0:p,p===void 0?t(h)?r(h):n(h):h.match(p)||[]}return pd=d,pd}var gd,l0;function KE(){if(l0)return gd;l0=1;var n=BE(),t=HE(),e=qE(),r="['’]",d=RegExp(r,"g");function h(p){return function(v){return n(e(t(v).replace(d,"")),p,"")}}return gd=h,gd}var md,c0;function YE(){if(c0)return md;c0=1;var n=zE(),t=KE(),e=t(function(r,d,h){return d=d.toLowerCase(),r+(h?n(d):d)});return md=e,md}var XE=YE();const JE=rc(XE),ZE=Object.assign({"./ArrayWidget.vue":()=>tt(()=>et.import("./ArrayWidget-CmKZQfWB-c2dd94f2c6f8abe8b7ee.js"),void 0),"./ArrayplotWidget.vue":()=>tt(()=>et.import("./ArrayplotWidget-D5McM1rY-ddc534bbeddb80cec6bc.js"),void 0),"./BlockWidget.vue":()=>tt(()=>et.import("./BlockWidget-BKMse4hP-164a326ca46bea8d5f68.js"),void 0),"./ButtonWidget.vue":()=>tt(()=>et.import("./ButtonWidget-BLNVL46w-30bec2fb7ca85627479b.js"),void 0),"./CanvasWidget.vue":()=>tt(()=>et.import("./CanvasWidget-1jy1JskS-d04e89c5942d4e27d8a9.js"),void 0),"./CanvasdotWidget.vue":()=>tt(()=>et.import("./CanvasdotWidget-DxuFGoWt-05d4284fd1e1ba0469bf.js"),void 0),"./CanvasimageWidget.vue":()=>tt(()=>et.import("./CanvasimageWidget-B_JxCI_f-3aba8a9c0ffbf85e4ba8.js"),void 0),"./CanvasimagevalueWidget.vue":()=>tt(()=>et.import("./CanvasimagevalueWidget-DwHIZzWo-e0dfe009cee365df1777.js"),void 0),"./CanvaslabelWidget.vue":()=>tt(()=>et.import("./CanvaslabelWidget-Tt4dmAOI-079e7a005cce5d64dda3.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>tt(()=>et.import("./CanvaslabelvalueWidget-D1-kZsi--2b8271b0530cf7fa746a.js"),void 0),"./CanvaslineWidget.vue":()=>tt(()=>et.import("./CanvaslineWidget-Din8LMyF-15b79b120e48dc68eb02.js"),void 0),"./CanvaslinevalueWidget.vue":()=>tt(()=>et.import("./CanvaslinevalueWidget-DOrasE2j-c868199c9a3a2f7a6773.js"),void 0),"./CheckbuttonWidget.vue":()=>tt(()=>et.import("./CheckbuttonWidget-A07FryqU-0634ed338432ebf5d77c.js"),void 0),"./ComboboxWidget.vue":()=>tt(()=>et.import("./ComboboxWidget-xayce-aY-8dd8816f5d7dad721df4.js"),void 0),"./DateWidget.vue":()=>tt(()=>et.import("./DateWidget-DrYZJta_-d8e297f2ffd787082b4f.js"),void 0),"./DynamicWidget.vue":()=>tt(()=>et.import("./DynamicWidget-BuSbQVhf-6fa02157bd57bdfe5a20.js"),void 0),"./FilechecksumWidget.vue":()=>tt(()=>et.import("./FilechecksumWidget-CTf0XGST-6ed4722d9224c4df6268.js"),void 0),"./FiledisplayWidget.vue":()=>tt(()=>et.import("./FiledisplayWidget-DLJuesmU-b1518c36285da46a9b11.js"),void 0),"./FormatvalueWidget.vue":()=>tt(()=>et.import("./FormatvalueWidget-DODmUWPH-1382c1a42d71c017c1d2.js"),void 0),"./HorizontalWidget.vue":()=>tt(()=>et.import("./HorizontalWidget-CZqN6UYp-4a0ef7500fe5f1b800ee.js"),void 0),"./HorizontalboxWidget.vue":()=>tt(()=>et.import("./HorizontalboxWidget-BV7cyhwN-8d7f0d302b4441d96a28.js"),void 0),"./HorizontallineWidget.vue":()=>tt(()=>et.import("./HorizontallineWidget-ChDLR_8D-708d272ff70ce91dbd57.js"),void 0),"./IframeWidget.vue":()=>tt(()=>et.import("./IframeWidget-BdOS5sm_-1d18e5795b367cb1d5d1.js"),void 0),"./ImageviewerWidget.vue":()=>tt(()=>et.import("./ImageviewerWidget-DoJBe5eZ-eed183a8926d96ba8c90.js"),void 0),"./LabelWidget.vue":()=>tt(()=>et.import("./LabelWidget-DYwcB_S4-38e094d08a4b3b72c53d.js"),void 0),"./LabelledWidget.vue":()=>tt(()=>et.import("./LabelledWidget-D4N2gPxJ-ce836b128a960d3d8b14.js"),void 0),"./LabelprogressbarWidget.vue":()=>tt(()=>et.import("./LabelprogressbarWidget-CRnteLAo-b725b573eb33e7bb4393.js"),void 0),"./LabelsparklineWidget.vue":()=>tt(()=>et.import("./LabelsparklineWidget-Bbjjio1S-def15333338347ba53b1.js"),void 0),"./LabelvalueWidget.vue":()=>tt(()=>et.import("./LabelvalueWidget-Bc6HtTMO-b8a4464c57b19a98d4b3.js"),void 0),"./LabelvaluedescWidget.vue":()=>tt(()=>et.import("./LabelvaluedescWidget-D5aDNr1o-d05b1c9bc4f065fc00f8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>tt(()=>et.import("./LabelvaluelimitsbarWidget-CMnJoNKz-ca94e01d6d1794ed3ebe.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>tt(()=>et.import("./LabelvaluelimitscolumnWidget-R5ofG4q1-56a2a76adac3f95c82e2.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>tt(()=>et.import("./LabelvaluerangebarWidget-Qa3R2_4p-241f8c6ffc9a55e60551.js"),void 0),"./LedWidget.vue":()=>tt(()=>et.import("./LedWidget-CL2dOxb7-ab1b39b52db247c57a22.js"),void 0),"./LimitsbarWidget.vue":()=>tt(()=>et.import("./LimitsbarWidget-C0N2611W-be09215203ef71c51ca8.js"),void 0),"./LimitscolorWidget.vue":()=>tt(()=>et.import("./LimitscolorWidget-GfNCPo3i-055d04908d1764ec7f4c.js"),void 0),"./LimitscolumnWidget.vue":()=>tt(()=>et.import("./LimitscolumnWidget-ut6NX68S-83764251827e9d6da919.js"),void 0),"./LinegraphWidget.vue":()=>tt(()=>et.import("./LinegraphWidget-DaCyvdnI-d6f10e223bb947f1a3b1.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>tt(()=>et.import("./MatrixbycolumnsWidget-Cni63alW-5b6abb266b8468a11951.js"),void 0),"./ProgressbarWidget.vue":()=>tt(()=>et.import("./ProgressbarWidget-BWqCsk87-e2c5a2d279a805d3efd2.js"),void 0),"./RadiobuttonWidget.vue":()=>tt(()=>et.import("./RadiobuttonWidget-Dza2r34f-c6fbd6f9a688c787717a.js"),void 0),"./RadiogroupWidget.vue":()=>tt(()=>et.import("./RadiogroupWidget-DWmZMNmr-0e525d07fbef318dfdc3.js"),void 0),"./RangebarWidget.vue":()=>tt(()=>et.import("./RangebarWidget-DsGCC1x7-3f74f8f0831b6b40a42d.js"),void 0),"./RollupWidget.vue":()=>tt(()=>et.import("./RollupWidget-DGElKXm3-907a5e3ee1b40da8ff9b.js"),void 0),"./ScrollwindowWidget.vue":()=>tt(()=>et.import("./ScrollwindowWidget-BvKT59rV-8b79650ff16295ee4a65.js"),void 0),"./SignalWidget.vue":()=>tt(()=>et.import("./SignalWidget-DRAFunW0-e30484c76f7b3ba91fe1.js"),void 0),"./SpacerWidget.vue":()=>tt(()=>et.import("./SpacerWidget-CUGpXBpA-879386da94febbdd5df4.js"),void 0),"./SparklineWidget.vue":()=>tt(()=>et.import("./SparklineWidget-SBWjRrqq-1ad442e32af7d1bb78fe.js"),void 0),"./TabbookWidget.vue":()=>tt(()=>et.import("./TabbookWidget-7l6fPoRA-1c5b5399c2d730902eef.js"),void 0),"./TextboxWidget.vue":()=>tt(()=>et.import("./TextboxWidget-Qb0TNt4Y-5238a3bf1aa8a0007cc7.js"),void 0),"./TextfieldWidget.vue":()=>tt(()=>et.import("./TextfieldWidget-DcSGRfnF-4230617ca7538e7f4447.js"),void 0),"./TimeWidget.vue":()=>tt(()=>et.import("./TimeWidget-aoMkDgRR-545325e26528dd70b1dc.js"),void 0),"./TitleWidget.vue":()=>tt(()=>et.import("./TitleWidget-C8b9Vp5r-c553e464f08b0cdc3dea.js"),void 0),"./ValueWidget.vue":()=>tt(()=>et.import("./ValueWidget-B1OvCmXK-eb266467c9a31a007e30.js"),void 0),"./ValuelimitsbarWidget.vue":()=>tt(()=>et.import("./ValuelimitsbarWidget-CUd9P_Xg-64f29a5b94c0d8b25711.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>tt(()=>et.import("./ValuelimitscolumnWidget-CbThSMma-594c17c8ddaa58712e1b.js"),void 0),"./ValuerangebarWidget.vue":()=>tt(()=>et.import("./ValuerangebarWidget-DjL4ze3d-81cc1402830d1310230c.js"),void 0),"./VerticalWidget.vue":()=>tt(()=>et.import("./VerticalWidget-V5-vGq7l-e930aaa06160609a20b9.js"),void 0),"./VerticalboxWidget.vue":()=>tt(()=>et.import("./VerticalboxWidget-OigMLjH8-417cdb72cb30aa8bfbff.js"),void 0)}),QE=Object.entries(ZE).reduce((n,[t,e])=>{t=t.split("/").pop();const r=FE(JE(t.replace(/\.\w+$/,"")));return{...n,[r]:Xp(e)}},{}),Jz=Tn("w",{components:QE}),u0="openc3-ace-vim-mode-enabled",vd="ace/keyboard/vim",h0="openc3-ace-default-scripting-language",xc=Tn("Z",{isVimModeEnabled(){return localStorage.getItem(u0)==="true"},setVimMode(n){localStorage.setItem(u0,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(vd),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:t}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(vd),ace.config.loadModule(vd,e=>{e.CodeMirror.Vim.defineEx("write","w",r=>{typeof t=="function"?t():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(h0)||"python"},setDefaultScriptingLanguage(n){(n==="ruby"||n==="python")&&localStorage.setItem(h0,n)}}),eR={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(n,{emit:t}){const e=t,r=Zp(!1);function d(){r.value=!1}function h(p){return p.replaceAll(" ","-").toLowerCase()}return(p,v)=>{const s=Ue("v-icon"),f=Ue("v-btn"),i=Ue("v-divider"),a=Ue("v-list-item-title"),u=Ue("v-list-item"),g=Ue("v-list"),o=Ue("v-menu"),c=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return rt(),Pt(o,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=R=>r.value=R),"close-on-content-click":!1},{activator:ze(({props:R})=>[We(f,ja(R,{variant:"outlined",class:"mx-1 menu-button",text:n.menu.label,"data-test":h(`${n.title} ${n.menu.label}`)}),{append:ze(()=>[We(s,{class:"menu-button-icon"},{default:ze(()=>[...v[1]||(v[1]=[It(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:ze(()=>[We(g,null,{default:ze(()=>[(rt(!0),nn(si,null,ho(n.menu.items,(R,$)=>(rt(),nn(si,null,[R.divider?(rt(),Pt(i,{key:$+"-divider"})):R.subMenu&&R.subMenu.length>0?(rt(),nn("div",{key:$+"-submenu"},[(rt(),Pt(o,{key:$,"open-on-hover":"",location:"right"},{activator:ze(({props:k})=>[(rt(),Pt(u,ja({ref_for:!0},k,{key:$,disabled:R.disabled}),Tu({append:ze(()=>[We(s,null,{default:ze(()=>[...v[2]||(v[2]=[It(" mdi-chevron-right ",-1)])]),_:1})]),default:ze(()=>[!R.radio&&!R.checkbox?(rt(),Pt(a,{key:0,style:ls("cursor: pointer;"+(R.disabled?"opacity: 0.2":""))},{default:ze(()=>[It(gn(R.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[R.icon?{name:"prepend",fn:ze(()=>[We(s,{disabled:R.disabled},{default:ze(()=>[It(gn(R.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:ze(()=>[We(g,null,{default:ze(()=>[(rt(!0),nn(si,null,ho(R.subMenu,(k,C)=>(rt(),Pt(u,{key:C,"prepend-icon":k.icon,onClick:O=>e("submenu-click",k)},{default:ze(()=>[We(a,null,{default:ze(()=>[It(gn(k.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):R.radioGroup?(rt(),Pt(w,{key:$+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":R.value,"onUpdate:modelValue":R.command},{default:ze(()=>[(rt(!0),nn(si,null,ho(R.choices,(k,C)=>(rt(),Pt(u,{key:C+"-choice"},{default:ze(()=>[We(m,{class:"list-action"},{default:ze(()=>[We(c,{color:"secondary",label:k.label,value:k.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(rt(),Pt(u,{key:$+"-list",disabled:R.disabled,"data-test":h(`${n.title} ${n.menu.label} ${R.label}`),onClick:()=>{R.command(R),R.checkbox||d()}},Tu({default:ze(()=>[R.checkbox?(rt(),Pt(m,{key:0,class:"list-action"},{default:ze(()=>[We(x,{modelValue:R.checked,"onUpdate:modelValue":k=>R.checked=k,label:R.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ur("",!0),!R.radio&&!R.checkbox?(rt(),Pt(a,{key:1,style:ls("cursor: pointer;"+(R.disabled?"opacity: 0.2":""))},{default:ze(()=>[It(gn(R.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[R.icon?{name:"prepend",fn:ze(()=>[We(s,{icon:R.icon,disabled:R.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},tR={components:{TopBarMenu:eR},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}}},nR={class:"app-title mr-2"};function rR(n,t,e,r,d,h){const p=Ue("v-col"),v=Ue("v-row"),s=Ue("TopBarMenu");return rt(),Pt(Jp,{to:"#openc3-menu"},[We(v,{"no-gutters":""},{default:ze(()=>[We(p,{"align-self":"end"},{default:ze(()=>[qn("span",nR,gn(e.title),1)]),_:1})]),_:1}),We(v,{dense:"",class:"flex-nowrap"},{default:ze(()=>[(rt(!0),nn(si,null,ho(e.menus,(f,i)=>(rt(),Pt(s,{key:i+"-top-menu",ref_for:!0,ref:"topmenu",menu:f,title:e.title,onSubmenuClick:h.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const iR=qi(tR,[["render",rR],["__scopeId","data-v-f4fb184e"]]);function d0(n,t){return function(){return n.apply(t,arguments)}}const{toString:oR}=Object.prototype,{getPrototypeOf:Cc}=Object,{iterator:_c,toStringTag:f0}=Symbol,kc=(n=>t=>{const e=oR.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Qi=n=>(n=n.toLowerCase(),t=>kc(t)===n),Ac=n=>t=>typeof t===n,{isArray:va}=Array,ya=Ac("undefined");function ul(n){return n!==null&&!ya(n)&&n.constructor!==null&&!ya(n.constructor)&&li(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const p0=Qi("ArrayBuffer");function sR(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&p0(n.buffer),t}const aR=Ac("string"),li=Ac("function"),g0=Ac("number"),hl=n=>n!==null&&typeof n=="object",lR=n=>n===!0||n===!1,Sc=n=>{if(kc(n)!=="object")return!1;const t=Cc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(f0 in n)&&!(_c in n)},cR=n=>{if(!hl(n)||ul(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},uR=Qi("Date"),hR=Qi("File"),dR=n=>!!(n&&typeof n.uri<"u"),fR=n=>n&&typeof n.getParts<"u",pR=Qi("Blob"),gR=Qi("FileList"),mR=n=>hl(n)&&li(n.pipe);function vR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const m0=vR(),v0=typeof m0.FormData<"u"?m0.FormData:void 0,yR=n=>{if(!n)return!1;if(v0&&n instanceof v0)return!0;const t=Cc(n);if(!t||t===Object.prototype||!li(n.append))return!1;const e=kc(n);return e==="formdata"||e==="object"&&li(n.toString)&&n.toString()==="[object FormData]"},bR=Qi("URLSearchParams"),[wR,xR,CR,_R]=["ReadableStream","Request","Response","Headers"].map(Qi),kR=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function dl(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),va(n))for(r=0,d=n.length;r<d;r++)t.call(null,n[r],r,n);else{if(ul(n))return;const h=e?Object.getOwnPropertyNames(n):Object.keys(n),p=h.length;let v;for(r=0;r<p;r++)v=h[r],t.call(null,n[v],v,n)}}function y0(n,t){if(ul(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,d;for(;r-- >0;)if(d=e[r],t===d.toLowerCase())return d;return null}const As=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,b0=n=>!ya(n)&&n!==As;function yd(...n){const{caseless:t,skipUndefined:e}=b0(this)&&this||{},r={},d=(h,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const v=t&&y0(r,p)||p,s=bd(r,v)?r[v]:void 0;Sc(s)&&Sc(h)?r[v]=yd(s,h):Sc(h)?r[v]=yd({},h):va(h)?r[v]=h.slice():(!e||!ya(h))&&(r[v]=h)};for(let h=0,p=n.length;h<p;h++)n[h]&&dl(n[h],d);return r}const AR=(n,t,e,{allOwnKeys:r}={})=>(dl(t,(d,h)=>{e&&li(d)?Object.defineProperty(n,h,{__proto__:null,value:d0(d,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,h,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),SR=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$R=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(n.prototype,e)},ER=(n,t,e,r)=>{let d,h,p;const v={};if(t=t||{},n==null)return t;do{for(d=Object.getOwnPropertyNames(n),h=d.length;h-- >0;)p=d[h],(!r||r(p,n,t))&&!v[p]&&(t[p]=n[p],v[p]=!0);n=e!==!1&&Cc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},RR=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},TR=n=>{if(!n)return null;if(va(n))return n;let t=n.length;if(!g0(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},MR=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Cc(Uint8Array)),LR=(n,t)=>{const e=(n&&n[_c]).call(n);let r;for(;(r=e.next())&&!r.done;){const d=r.value;t.call(n,d[0],d[1])}},IR=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},OR=Qi("HTMLFormElement"),NR=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),bd=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),DR=Qi("RegExp"),w0=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};dl(e,(d,h)=>{let p;(p=t(d,h,n))!==!1&&(r[h]=p||d)}),Object.defineProperties(n,r)},PR=n=>{w0(n,(t,e)=>{if(li(n)&&["arguments","caller","callee"].includes(e))return!1;const r=n[e];if(li(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},FR=(n,t)=>{const e={},r=d=>{d.forEach(h=>{e[h]=!0})};return va(n)?r(n):r(String(n).split(t)),e},zR=()=>{},BR=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function WR(n){return!!(n&&li(n.append)&&n[f0]==="FormData"&&n[_c])}const jR=n=>{const t=new Array(10),e=(r,d)=>{if(hl(r)){if(t.indexOf(r)>=0)return;if(ul(r))return r;if(!("toJSON"in r)){t[d]=r;const h=va(r)?[]:{};return dl(r,(p,v)=>{const s=e(p,d+1);!ya(s)&&(h[v]=s)}),t[d]=void 0,h}}return r};return e(n,0)},HR=Qi("AsyncFunction"),UR=n=>n&&(hl(n)||li(n))&&li(n.then)&&li(n.catch),x0=((n,t)=>n?setImmediate:t?((e,r)=>(As.addEventListener("message",({source:d,data:h})=>{d===As&&h===e&&r.length&&r.shift()()},!1),d=>{r.push(d),As.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",li(As.postMessage)),VR=typeof queueMicrotask<"u"?queueMicrotask.bind(As):typeof process<"u"&&process.nextTick||x0,GR=n=>n!=null&&li(n[_c]),_e={isArray:va,isArrayBuffer:p0,isBuffer:ul,isFormData:yR,isArrayBufferView:sR,isString:aR,isNumber:g0,isBoolean:lR,isObject:hl,isPlainObject:Sc,isEmptyObject:cR,isReadableStream:wR,isRequest:xR,isResponse:CR,isHeaders:_R,isUndefined:ya,isDate:uR,isFile:hR,isReactNativeBlob:dR,isReactNative:fR,isBlob:pR,isRegExp:DR,isFunction:li,isStream:mR,isURLSearchParams:bR,isTypedArray:MR,isFileList:gR,forEach:dl,merge:yd,extend:AR,trim:kR,stripBOM:SR,inherits:$R,toFlatObject:ER,kindOf:kc,kindOfTest:Qi,endsWith:RR,toArray:TR,forEachEntry:LR,matchAll:IR,isHTMLForm:OR,hasOwnProperty:bd,hasOwnProp:bd,reduceDescriptors:w0,freezeMethods:PR,toObjectSet:FR,toCamelCase:NR,noop:zR,toFiniteNumber:BR,findKey:y0,global:As,isContextDefined:b0,isSpecCompliantForm:WR,toJSONObject:jR,isAsyncFn:HR,isThenable:UR,setImmediate:x0,asap:VR,isIterable:GR},qR=_e.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"]),KR=n=>{const t={};let e,r,d;return n&&n.split(`
1481
- `).forEach(function(h){d=h.indexOf(":"),e=h.substring(0,d).trim().toLowerCase(),r=h.substring(d+1).trim(),!(!e||t[e]&&qR[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},C0=Symbol("internals"),YR=/[^\x09\x20-\x7E\x80-\xFF]/g;function XR(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}function fl(n){return n&&String(n).trim().toLowerCase()}function JR(n){return XR(n.replace(YR,""))}function $c(n){return n===!1||n==null?n:_e.isArray(n)?n.map($c):JR(String(n))}function ZR(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const QR=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function wd(n,t,e,r,d){if(_e.isFunction(r))return r.call(this,t,e);if(d&&(t=e),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function eT(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function tT(n,t){const e=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{__proto__:null,value:function(d,h,p){return this[r].call(this,t,d,h,p)},configurable:!0})})}let Kr=class{constructor(t){t&&this.set(t)}set(t,e,r){const d=this;function h(v,s,f){const i=fl(s);if(!i)throw new Error("header name must be a non-empty string");const a=_e.findKey(d,i);(!a||d[a]===void 0||f===!0||f===void 0&&d[a]!==!1)&&(d[a||s]=$c(v))}const p=(v,s)=>_e.forEach(v,(f,i)=>h(f,i,s));if(_e.isPlainObject(t)||t instanceof this.constructor)p(t,e);else if(_e.isString(t)&&(t=t.trim())&&!QR(t))p(KR(t),e);else if(_e.isObject(t)&&_e.isIterable(t)){let v={},s,f;for(const i of t){if(!_e.isArray(i))throw TypeError("Object iterator must return a key-value pair");v[f=i[0]]=(s=v[f])?_e.isArray(s)?[...s,i[1]]:[s,i[1]]:i[1]}p(v,e)}else t!=null&&h(e,t,r);return this}get(t,e){if(t=fl(t),t){const r=_e.findKey(this,t);if(r){const d=this[r];if(!e)return d;if(e===!0)return ZR(d);if(_e.isFunction(e))return e.call(this,d,r);if(_e.isRegExp(e))return e.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=fl(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||wd(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let d=!1;function h(p){if(p=fl(p),p){const v=_e.findKey(r,p);v&&(!e||wd(r,r[v],v,e))&&(delete r[v],d=!0)}}return _e.isArray(t)?t.forEach(h):h(t),d}clear(t){const e=Object.keys(this);let r=e.length,d=!1;for(;r--;){const h=e[r];(!t||wd(this,this[h],h,t,!0))&&(delete this[h],d=!0)}return d}normalize(t){const e=this,r={};return _e.forEach(this,(d,h)=>{const p=_e.findKey(r,h);if(p){e[p]=$c(d),delete e[h];return}const v=t?eT(h):String(h).trim();v!==h&&delete e[h],e[v]=$c(d),r[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return _e.forEach(this,(r,d)=>{r!=null&&r!==!1&&(e[d]=t&&_e.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1482
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(d=>r.set(d)),r}static accessor(t){const e=(this[C0]=this[C0]={accessors:{}}).accessors,r=this.prototype;function d(h){const p=fl(h);e[p]||(tT(r,h),e[p]=!0)}return _e.isArray(t)?t.forEach(d):d(t),this}};Kr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Kr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),_e.freezeMethods(Kr);const nT="[REDACTED ****]";function rT(n){if(_e.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(_e.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function iT(n,t){const e=new Set(t.map(h=>String(h).toLowerCase())),r=[],d=h=>{if(h===null||typeof h!="object"||_e.isBuffer(h))return h;if(r.indexOf(h)!==-1)return;h instanceof Kr&&(h=h.toJSON()),r.push(h);let p;if(_e.isArray(h))p=[],h.forEach((v,s)=>{const f=d(v);_e.isUndefined(f)||(p[s]=f)});else{if(!_e.isPlainObject(h)&&rT(h))return r.pop(),h;p=Object.create(null);for(const[v,s]of Object.entries(h)){const f=e.has(v.toLowerCase())?nT:d(s);_e.isUndefined(f)||(p[v]=f)}}return r.pop(),p};return d(n)}let ct=class Hx extends Error{static from(t,e,r,d,h,p){const v=new Hx(t.message,e||t.code,r,d,h);return v.cause=t,v.name=t.name,t.status!=null&&v.status==null&&(v.status=t.status),p&&Object.assign(v,p),v}constructor(t,e,r,d,h){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),d&&(this.request=d),h&&(this.response=h,this.status=h.status)}toJSON(){const t=this.config,e=t&&_e.hasOwnProp(t,"redact")?t.redact:void 0,r=_e.isArray(e)&&e.length>0?iT(t,e):_e.toJSONObject(t);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:r,code:this.code,status:this.status}}};ct.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ct.ERR_BAD_OPTION="ERR_BAD_OPTION",ct.ECONNABORTED="ECONNABORTED",ct.ETIMEDOUT="ETIMEDOUT",ct.ECONNREFUSED="ECONNREFUSED",ct.ERR_NETWORK="ERR_NETWORK",ct.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ct.ERR_DEPRECATED="ERR_DEPRECATED",ct.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ct.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ct.ERR_CANCELED="ERR_CANCELED",ct.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ct.ERR_INVALID_URL="ERR_INVALID_URL",ct.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const oT=null;function xd(n){return _e.isPlainObject(n)||_e.isArray(n)}function _0(n){return _e.endsWith(n,"[]")?n.slice(0,-2):n}function Cd(n,t,e){return n?n.concat(t).map(function(r,d){return r=_0(r),!e&&d?"["+r+"]":r}).join(e?".":""):t}function sT(n){return _e.isArray(n)&&!n.some(xd)}const aT=_e.toFlatObject(_e,{},null,function(n){return/^is[A-Z]/.test(n)});function Ec(n,t,e){if(!_e.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=_e.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,m){return!_e.isUndefined(m[c])});const r=e.metaTokens,d=e.visitor||a,h=e.dots,p=e.indexes,v=e.Blob||typeof Blob<"u"&&Blob,s=e.maxDepth===void 0?100:e.maxDepth,f=v&&_e.isSpecCompliantForm(t);if(!_e.isFunction(d))throw new TypeError("visitor must be a function");function i(c){if(c===null)return"";if(_e.isDate(c))return c.toISOString();if(_e.isBoolean(c))return c.toString();if(!f&&_e.isBlob(c))throw new ct("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(c)||_e.isTypedArray(c)?f&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function a(c,m,w){let x=c;if(_e.isReactNative(t)&&_e.isReactNativeBlob(c))return t.append(Cd(w,m,h),i(c)),!1;if(c&&!w&&typeof c=="object"){if(_e.endsWith(m,"{}"))m=r?m:m.slice(0,-2),c=JSON.stringify(c);else if(_e.isArray(c)&&sT(c)||(_e.isFileList(c)||_e.endsWith(m,"[]"))&&(x=_e.toArray(c)))return m=_0(m),x.forEach(function(R,$){!(_e.isUndefined(R)||R===null)&&t.append(p===!0?Cd([m],$,h):p===null?m:m+"[]",i(R))}),!1}return xd(c)?!0:(t.append(Cd(w,m,h),i(c)),!1)}const u=[],g=Object.assign(aT,{defaultVisitor:a,convertValue:i,isVisitable:xd});function o(c,m,w=0){if(!_e.isUndefined(c)){if(w>s)throw new ct("Object is too deeply nested ("+w+" levels). Max depth: "+s,ct.ERR_FORM_DATA_DEPTH_EXCEEDED);if(u.indexOf(c)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(c),_e.forEach(c,function(x,R){(!(_e.isUndefined(x)||x===null)&&d.call(t,x,_e.isString(R)?R.trim():R,m,g))===!0&&o(x,m?m.concat(R):[R],w+1)}),u.pop()}}if(!_e.isObject(n))throw new TypeError("data must be an object");return o(n),t}function k0(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function _d(n,t){this._pairs=[],n&&Ec(n,this,t)}const A0=_d.prototype;A0.append=function(n,t){this._pairs.push([n,t])},A0.toString=function(n){const t=n?function(e){return n.call(this,e,k0)}:k0;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function lT(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function S0(n,t,e){if(!t)return n;const r=e&&e.encode||lT,d=_e.isFunction(e)?{serialize:e}:e,h=d&&d.serialize;let p;if(h?p=h(t,d):p=_e.isURLSearchParams(t)?t.toString():new _d(t,d).toString(r),p){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}let $0=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(e){e!==null&&t(e)})}};const kd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},cT=typeof URLSearchParams<"u"?URLSearchParams:_d,uT=typeof FormData<"u"?FormData:null,hT=typeof Blob<"u"?Blob:null,dT={isBrowser:!0,classes:{URLSearchParams:cT,FormData:uT,Blob:hT},protocols:["http","https","file","blob","url","data"]},Ad=typeof window<"u"&&typeof document<"u",Sd=typeof navigator=="object"&&navigator||void 0,fT=Ad&&(!Sd||["ReactNative","NativeScript","NS"].indexOf(Sd.product)<0),pT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gT=Ad&&window.location.href||"http://localhost",mT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ad,hasStandardBrowserEnv:fT,hasStandardBrowserWebWorkerEnv:pT,navigator:Sd,origin:gT},Symbol.toStringTag,{value:"Module"})),Or={...mT,...dT};function vT(n,t){return Ec(n,new Or.classes.URLSearchParams,{visitor:function(e,r,d,h){return Or.isNode&&_e.isBuffer(e)?(this.append(r,e.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...t})}function yT(n){return _e.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bT(n){const t={},e=Object.keys(n);let r;const d=e.length;let h;for(r=0;r<d;r++)h=e[r],t[h]=n[h];return t}function E0(n){function t(e,r,d,h){let p=e[h++];if(p==="__proto__")return!0;const v=Number.isFinite(+p),s=h>=e.length;return p=!p&&_e.isArray(d)?d.length:p,s?(_e.hasOwnProp(d,p)?d[p]=_e.isArray(d[p])?d[p].concat(r):[d[p],r]:d[p]=r,!v):((!d[p]||!_e.isObject(d[p]))&&(d[p]=[]),t(e,r,d[p],h)&&_e.isArray(d[p])&&(d[p]=bT(d[p])),!v)}if(_e.isFormData(n)&&_e.isFunction(n.entries)){const e={};return _e.forEachEntry(n,(r,d)=>{t(yT(r),d,e,0)}),e}return null}const ba=(n,t)=>n!=null&&_e.hasOwnProp(n,t)?n[t]:void 0;function wT(n,t,e){if(_e.isString(n))try{return(t||JSON.parse)(n),_e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const pl={transitional:kd,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,d=_e.isObject(n);if(d&&_e.isHTMLForm(n)&&(n=new FormData(n)),_e.isFormData(n))return r?JSON.stringify(E0(n)):n;if(_e.isArrayBuffer(n)||_e.isBuffer(n)||_e.isStream(n)||_e.isFile(n)||_e.isBlob(n)||_e.isReadableStream(n))return n;if(_e.isArrayBufferView(n))return n.buffer;if(_e.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let h;if(d){const p=ba(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return vT(n,p).toString();if((h=_e.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=ba(this,"env"),s=v&&v.FormData;return Ec(h?{"files[]":n}:n,s&&new s,p)}}return d||r?(t.setContentType("application/json",!1),wT(n)):n}],transformResponse:[function(n){const t=ba(this,"transitional")||pl.transitional,e=t&&t.forcedJSONParsing,r=ba(this,"responseType"),d=r==="json";if(_e.isResponse(n)||_e.isReadableStream(n))return n;if(n&&_e.isString(n)&&(e&&!r||d)){const h=!(t&&t.silentJSONParsing)&&d;try{return JSON.parse(n,ba(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?ct.from(p,ct.ERR_BAD_RESPONSE,this,null,ba(this,"response")):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Or.classes.FormData,Blob:Or.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch","query"],n=>{pl.headers[n]={}});function $d(n,t){const e=this||pl,r=t||e,d=Kr.from(r.headers);let h=r.data;return _e.forEach(n,function(p){h=p.call(e,h,d.normalize(),t?t.status:void 0)}),d.normalize(),h}function R0(n){return!!(n&&n.__CANCEL__)}let gl=class extends ct{constructor(t,e,r){super(t??"canceled",ct.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function T0(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new ct("Request failed with status code "+e.status,e.status>=400&&e.status<500?ct.ERR_BAD_REQUEST:ct.ERR_BAD_RESPONSE,e.config,e.request,e))}function xT(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function CT(n,t){n=n||10;const e=new Array(n),r=new Array(n);let d=0,h=0,p;return t=t!==void 0?t:1e3,function(v){const s=Date.now(),f=r[h];p||(p=s),e[d]=v,r[d]=s;let i=h,a=0;for(;i!==d;)a+=e[i++],i=i%n;if(d=(d+1)%n,d===h&&(h=(h+1)%n),s-p<t)return;const u=f&&s-f;return u?Math.round(a*1e3/u):void 0}}function _T(n,t){let e=0,r=1e3/t,d,h;const p=(v,s=Date.now())=>{e=s,d=null,h&&(clearTimeout(h),h=null),n(...v)};return[(...v)=>{const s=Date.now(),f=s-e;f>=r?p(v,s):(d=v,h||(h=setTimeout(()=>{h=null,p(d)},r-f)))},()=>d&&p(d)]}const Rc=(n,t,e=3)=>{let r=0;const d=CT(50,250);return _T(h=>{const p=h.loaded,v=h.lengthComputable?h.total:void 0,s=v!=null?Math.min(p,v):p,f=Math.max(0,s-r),i=d(f);r=Math.max(r,s);const a={loaded:s,total:v,progress:v?s/v:void 0,bytes:f,rate:i||void 0,estimated:i&&v?(v-s)/i:void 0,event:h,lengthComputable:v!=null,[t?"download":"upload"]:!0};n(a)},e)},M0=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},L0=n=>(...t)=>_e.asap(()=>n(...t)),kT=Or.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Or.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Or.origin),Or.navigator&&/(msie|trident)/i.test(Or.navigator.userAgent)):()=>!0,AT=Or.hasStandardBrowserEnv?{write(n,t,e,r,d,h,p){if(typeof document>"u")return;const v=[`${n}=${encodeURIComponent(t)}`];_e.isNumber(e)&&v.push(`expires=${new Date(e).toUTCString()}`),_e.isString(r)&&v.push(`path=${r}`),_e.isString(d)&&v.push(`domain=${d}`),h===!0&&v.push("secure"),_e.isString(p)&&v.push(`SameSite=${p}`),document.cookie=v.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const r=t[e].replace(/^\s+/,""),d=r.indexOf("=");if(d!==-1&&r.slice(0,d)===n)return decodeURIComponent(r.slice(d+1))}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ST(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function $T(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function I0(n,t,e){let r=!ST(t);return n&&(r||e===!1)?$T(n,t):t}const O0=n=>n instanceof Kr?{...n}:n;function Ss(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,i,a,u){return _e.isPlainObject(f)&&_e.isPlainObject(i)?_e.merge.call({caseless:u},f,i):_e.isPlainObject(i)?_e.merge({},i):_e.isArray(i)?i.slice():i}function d(f,i,a,u){if(_e.isUndefined(i)){if(!_e.isUndefined(f))return r(void 0,f,a,u)}else return r(f,i,a,u)}function h(f,i){if(!_e.isUndefined(i))return r(void 0,i)}function p(f,i){if(_e.isUndefined(i)){if(!_e.isUndefined(f))return r(void 0,f)}else return r(void 0,i)}function v(f,i,a){if(_e.hasOwnProp(t,a))return r(f,i);if(_e.hasOwnProp(n,a))return r(void 0,f)}const s={url:h,method:h,data:h,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:v,headers:(f,i,a)=>d(O0(f),O0(i),a,!0)};return _e.forEach(Object.keys({...n,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const i=_e.hasOwnProp(s,f)?s[f]:d,a=_e.hasOwnProp(n,f)?n[f]:void 0,u=_e.hasOwnProp(t,f)?t[f]:void 0,g=i(a,u,f);_e.isUndefined(g)&&i!==v||(e[f]=g)}),e}const ET=["content-type","content-length"];function RT(n,t,e){if(e!=="content-only"){n.set(t);return}Object.entries(t).forEach(([r,d])=>{ET.includes(r.toLowerCase())&&n.set(r,d)})}const TT=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),N0=n=>{const t=Ss({},n),e=u=>_e.hasOwnProp(t,u)?t[u]:void 0,r=e("data");let d=e("withXSRFToken");const h=e("xsrfHeaderName"),p=e("xsrfCookieName");let v=e("headers");const s=e("auth"),f=e("baseURL"),i=e("allowAbsoluteUrls"),a=e("url");if(t.headers=v=Kr.from(v),t.url=S0(I0(f,a,i),n.params,n.paramsSerializer),s&&v.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?TT(s.password):""))),_e.isFormData(r)&&(Or.hasStandardBrowserEnv||Or.hasStandardBrowserWebWorkerEnv?v.setContentType(void 0):_e.isFunction(r.getHeaders)&&RT(v,r.getHeaders(),e("formDataHeaderPolicy"))),Or.hasStandardBrowserEnv&&(_e.isFunction(d)&&(d=d(t)),d===!0||d==null&&kT(t.url))){const u=h&&p&&AT.read(p);u&&v.set(h,u)}return t},MT=typeof XMLHttpRequest<"u",LT=MT&&function(n){return new Promise(function(t,e){const r=N0(n);let d=r.data;const h=Kr.from(r.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:s}=r,f,i,a,u,g;function o(){u&&u(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=Kr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),R={data:!p||p==="text"||p==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:n,request:c};T0(function($){t($),o()},function($){e($),o()},R),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(m)},c.onabort=function(){c&&(e(new ct("Request aborted",ct.ECONNABORTED,n,c)),o(),c=null)},c.onerror=function(x){const R=x&&x.message?x.message:"Network Error",$=new ct(R,ct.ERR_NETWORK,n,c);$.event=x||null,e($),o(),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||kd;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new ct(x,R.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,n,c)),o(),c=null},d===void 0&&h.setContentType(null),"setRequestHeader"in c&&_e.forEach(h.toJSON(),function(x,R){c.setRequestHeader(R,x)}),_e.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),p&&p!=="json"&&(c.responseType=r.responseType),s&&([a,g]=Rc(s,!0),c.addEventListener("progress",a)),v&&c.upload&&([i,u]=Rc(v),c.upload.addEventListener("progress",i),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{c&&(e(!x||x.type?new gl(null,n,c):x),c.abort(),o(),c=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=xT(r.url);if(w&&!Or.protocols.includes(w)){e(new ct("Unsupported protocol "+w+":",ct.ERR_BAD_REQUEST,n));return}c.send(d||null)})},IT=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,d;const h=function(f){if(!d){d=!0,v();const i=f instanceof Error?f:this.reason;r.abort(i instanceof ct?i:new gl(i instanceof Error?i.message:i))}};let p=t&&setTimeout(()=>{p=null,h(new ct(`timeout of ${t}ms exceeded`,ct.ETIMEDOUT))},t);const v=()=>{n&&(p&&clearTimeout(p),p=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(h):f.removeEventListener("abort",h)}),n=null)};n.forEach(f=>f.addEventListener("abort",h));const{signal:s}=r;return s.unsubscribe=()=>_e.asap(v),s}},OT=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,d;for(;r<e;)d=r+t,yield n.slice(r,d),r=d},NT=async function*(n,t){for await(const e of DT(n))yield*OT(e,t)},DT=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},D0=(n,t,e,r)=>{const d=NT(n,t);let h=0,p,v=s=>{p||(p=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:f,value:i}=await d.next();if(f){v(),s.close();return}let a=i.byteLength;if(e){let u=h+=a;e(u)}s.enqueue(new Uint8Array(i))}catch(f){throw v(f),f}},cancel(s){return v(s),d.return()}},{highWaterMark:2})};function PT(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const e=n.slice(5,t),r=n.slice(t+1);if(/;base64/i.test(e)){let h=r.length;const p=r.length;for(let a=0;a<p;a++)if(r.charCodeAt(a)===37&&a+2<p){const u=r.charCodeAt(a+1),g=r.charCodeAt(a+2);(u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(h-=2,a+=2)}let v=0,s=p-1;const f=a=>a>=2&&r.charCodeAt(a-2)===37&&r.charCodeAt(a-1)===51&&(r.charCodeAt(a)===68||r.charCodeAt(a)===100);s>=0&&(r.charCodeAt(s)===61?(v++,s--):f(s)&&(v++,s-=3)),v===1&&s>=0&&(r.charCodeAt(s)===61||f(s))&&v++;const i=Math.floor(h/4)*3-(v||0);return i>0?i:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let d=0;for(let h=0,p=r.length;h<p;h++){const v=r.charCodeAt(h);if(v<128)d+=1;else if(v<2048)d+=2;else if(v>=55296&&v<=56319&&h+1<p){const s=r.charCodeAt(h+1);s>=56320&&s<=57343?(d+=4,h++):d+=3}else d+=3}return d}const Ed="1.16.0",P0=64*1024,{isFunction:Tc}=_e,F0=(n,...t)=>{try{return!!n(...t)}catch{return!1}},FT=n=>{const t=_e.global??globalThis,{ReadableStream:e,TextEncoder:r}=t;n=_e.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:d,Request:h,Response:p}=n,v=d?Tc(d):typeof fetch=="function",s=Tc(h),f=Tc(p);if(!v)return!1;const i=v&&Tc(e),a=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new h(w).arrayBuffer())),u=s&&i&&F0(()=>{let w=!1;const x=new h(Or.origin,{body:new e,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),g=f&&i&&F0(()=>_e.isReadableStream(new p("").body)),o={stream:g&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!o[w]&&(o[w]=(x,R)=>{let $=x&&x[w];if($)return $.call(x);throw new ct(`Response type '${w}' is not supported`,ct.ERR_NOT_SUPPORT,R)})});const c=async w=>{if(w==null)return 0;if(_e.isBlob(w))return w.size;if(_e.isSpecCompliantForm(w))return(await new h(Or.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(w)||_e.isArrayBuffer(w))return w.byteLength;if(_e.isURLSearchParams(w)&&(w=w+""),_e.isString(w))return(await a(w)).byteLength},m=async(w,x)=>_e.toFiniteNumber(w.getContentLength())??c(x);return async w=>{let{url:x,method:R,data:$,signal:k,cancelToken:C,timeout:O,onDownloadProgress:N,onUploadProgress:I,responseType:M,headers:W,withCredentials:F="same-origin",fetchOptions:D,maxContentLength:A,maxBodyLength:_}=N0(w);const L=_e.isNumber(A)&&A>-1,B=_e.isNumber(_)&&_>-1;let U=d||fetch;M=M?(M+"").toLowerCase():"text";let V=IT([k,C&&C.toAbortSignal()],O),K=null;const ee=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ae;try{if(L&&typeof x=="string"&&x.startsWith("data:")&&PT(x)>A)throw new ct("maxContentLength size of "+A+" exceeded",ct.ERR_BAD_RESPONSE,w,K);if(B&&R!=="get"&&R!=="head"){const ve=await m(W,$);if(typeof ve=="number"&&isFinite(ve)&&ve>_)throw new ct("Request body larger than maxBodyLength limit",ct.ERR_BAD_REQUEST,w,K)}if(I&&u&&R!=="get"&&R!=="head"&&(ae=await m(W,$))!==0){let ve=new h(x,{method:"POST",body:$,duplex:"half"}),$e;if(_e.isFormData($)&&($e=ve.headers.get("content-type"))&&W.setContentType($e),ve.body){const[Re,Ye]=M0(ae,Rc(L0(I)));$=D0(ve.body,P0,Re,Ye)}}_e.isString(F)||(F=F?"include":"omit");const Q=s&&"credentials"in h.prototype;if(_e.isFormData($)){const ve=W.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&W.delete("content-type")}W.set("User-Agent","axios/"+Ed,!1);const oe={...D,signal:V,method:R.toUpperCase(),headers:W.normalize().toJSON(),body:$,duplex:"half",credentials:Q?F:void 0};K=s&&new h(x,oe);let se=await(s?U(K,D):U(x,oe));if(L){const ve=_e.toFiniteNumber(se.headers.get("content-length"));if(ve!=null&&ve>A)throw new ct("maxContentLength size of "+A+" exceeded",ct.ERR_BAD_RESPONSE,w,K)}const ue=g&&(M==="stream"||M==="response");if(g&&se.body&&(N||L||ue&&ee)){const ve={};["status","statusText","headers"].forEach(it=>{ve[it]=se[it]});const $e=_e.toFiniteNumber(se.headers.get("content-length")),[Re,Ye]=N&&M0($e,Rc(L0(N),!0))||[];let Ge=0;const at=it=>{if(L&&(Ge=it,Ge>A))throw new ct("maxContentLength size of "+A+" exceeded",ct.ERR_BAD_RESPONSE,w,K);Re&&Re(it)};se=new p(D0(se.body,P0,at,()=>{Ye&&Ye(),ee&&ee()}),ve)}M=M||"text";let pe=await o[_e.findKey(o,M)||"text"](se,w);if(L&&!g&&!ue){let ve;if(pe!=null&&(typeof pe.byteLength=="number"?ve=pe.byteLength:typeof pe.size=="number"?ve=pe.size:typeof pe=="string"&&(ve=typeof r=="function"?new r().encode(pe).byteLength:pe.length)),typeof ve=="number"&&ve>A)throw new ct("maxContentLength size of "+A+" exceeded",ct.ERR_BAD_RESPONSE,w,K)}return!ue&&ee&&ee(),await new Promise((ve,$e)=>{T0(ve,$e,{data:pe,headers:Kr.from(se.headers),status:se.status,statusText:se.statusText,config:w,request:K})})}catch(Q){if(ee&&ee(),V&&V.aborted&&V.reason instanceof ct){const oe=V.reason;throw oe.config=w,K&&(oe.request=K),Q!==oe&&(oe.cause=Q),oe}throw Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new ct("Network Error",ct.ERR_NETWORK,w,K,Q&&Q.response),{cause:Q.cause||Q}):ct.from(Q,Q&&Q.code,w,K,Q&&Q.response)}}},zT=new Map,z0=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:d}=t,h=[r,d,e];let p=h.length,v=p,s,f,i=zT;for(;v--;)s=h[v],f=i.get(s),f===void 0&&i.set(s,f=v?new Map:FT(t)),i=f;return f};z0();const Rd={http:oT,xhr:LT,fetch:{get:z0}};_e.forEach(Rd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const B0=n=>`- ${n}`,BT=n=>_e.isFunction(n)||n===null||n===!1;function WT(n,t){n=_e.isArray(n)?n:[n];const{length:e}=n;let r,d;const h={};for(let p=0;p<e;p++){r=n[p];let v;if(d=r,!BT(r)&&(d=Rd[(v=String(r)).toLowerCase()],d===void 0))throw new ct(`Unknown adapter '${v}'`);if(d&&(_e.isFunction(d)||(d=d.get(t))))break;h[v||"#"+p]=d}if(!d){const p=Object.entries(h).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=e?p.length>1?`since :
1483
- `+p.map(B0).join(`
1484
- `):" "+B0(p[0]):"as no adapter specified";throw new ct("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return d}const W0={getAdapter:WT,adapters:Rd};function Td(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new gl(null,n)}function j0(n){return Td(n),n.headers=Kr.from(n.headers),n.data=$d.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),W0.getAdapter(n.adapter||pl.adapter,n)(n).then(function(t){Td(n),n.response=t;try{t.data=$d.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Kr.from(t.headers),t},function(t){if(!R0(t)&&(Td(n),t&&t.response)){n.response=t.response;try{t.response.data=$d.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Kr.from(t.response.headers)}return Promise.reject(t)})}const Mc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Mc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const H0={};Mc.transitional=function(n,t,e){function r(d,h){return"[Axios v"+Ed+"] Transitional option '"+d+"'"+h+(e?". "+e:"")}return(d,h,p)=>{if(n===!1)throw new ct(r(h," has been removed"+(t?" in "+t:"")),ct.ERR_DEPRECATED);return t&&!H0[h]&&(H0[h]=!0,console.warn(r(h," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(d,h,p):!0}},Mc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function jT(n,t,e){if(typeof n!="object")throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const h=r[d],p=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0;if(p){const v=n[h],s=v===void 0||p(v,h,n);if(s!==!0)throw new ct("option "+h+" must be "+s,ct.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new ct("Unknown option "+h,ct.ERR_BAD_OPTION)}}const Lc={assertOptions:jT,validators:Mc},Ni=Lc.validators;let $s=class{constructor(t){this.defaults=t||{},this.interceptors={request:new $0,response:new $0}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const h=(()=>{if(!d.stack)return"";const p=d.stack.indexOf(`
1485
- `);return p===-1?"":d.stack.slice(p+1)})();try{if(!r.stack)r.stack=h;else if(h){const p=h.indexOf(`
1486
- `),v=p===-1?-1:h.indexOf(`
1487
- `,p+1),s=v===-1?"":h.slice(v+1);String(r.stack).endsWith(s)||(r.stack+=`
1488
- `+h)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ss(this.defaults,e);const{transitional:r,paramsSerializer:d,headers:h}=e;r!==void 0&&Lc.assertOptions(r,{silentJSONParsing:Ni.transitional(Ni.boolean),forcedJSONParsing:Ni.transitional(Ni.boolean),clarifyTimeoutError:Ni.transitional(Ni.boolean),legacyInterceptorReqResOrdering:Ni.transitional(Ni.boolean)},!1),d!=null&&(_e.isFunction(d)?e.paramsSerializer={serialize:d}:Lc.assertOptions(d,{encode:Ni.function,serialize:Ni.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Lc.assertOptions(e,{baseUrl:Ni.spelling("baseURL"),withXsrfToken:Ni.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=h&&_e.merge(h.common,h[e.method]);h&&_e.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete h[o]}),e.headers=Kr.concat(p,h);const v=[];let s=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;s=s&&o.synchronous;const c=e.transitional||kd;c&&c.legacyInterceptorReqResOrdering?v.unshift(o.fulfilled,o.rejected):v.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let i,a=0,u;if(!s){const o=[j0.bind(this),void 0];for(o.unshift(...v),o.push(...f),u=o.length,i=Promise.resolve(e);a<u;)i=i.then(o[a++],o[a++]);return i}u=v.length;let g=e;for(;a<u;){const o=v[a++],c=v[a++];try{g=o(g)}catch(m){c.call(this,m);break}}try{i=j0.call(this,g)}catch(o){return Promise.reject(o)}for(a=0,u=f.length;a<u;)i=i.then(f[a++],f[a++]);return i}getUri(t){t=Ss(this.defaults,t);const e=I0(t.baseURL,t.url,t.allowAbsoluteUrls);return S0(e,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){$s.prototype[n]=function(t,e){return this.request(Ss(e||{},{method:n,url:t,data:(e||{}).data}))}}),_e.forEach(["post","put","patch","query"],function(n){function t(e){return function(r,d,h){return this.request(Ss(h||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}$s.prototype[n]=t(),n!=="query"&&($s.prototype[n+"Form"]=t(!0))});let HT=class Ux{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(d){e=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](d);r._listeners=null}),this.promise.then=d=>{let h;const p=new Promise(v=>{r.subscribe(v),h=v}).then(d);return p.cancel=function(){r.unsubscribe(h)},p},t(function(d,h,p){r.reason||(r.reason=new gl(d,h,p),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Ux(function(e){t=e}),cancel:t}}};function UT(n){return function(t){return n.apply(null,t)}}function VT(n){return _e.isObject(n)&&n.isAxiosError===!0}const Md={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(Md).forEach(([n,t])=>{Md[t]=n});function U0(n){const t=new $s(n),e=d0($s.prototype.request,t);return _e.extend(e,$s.prototype,t,{allOwnKeys:!0}),_e.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return U0(Ss(n,r))},e}const Yn=Tn("A",U0(pl));Yn.Axios=$s,Yn.CanceledError=gl,Yn.CancelToken=HT,Yn.isCancel=R0,Yn.VERSION=Ed,Yn.toFormData=Ec,Yn.AxiosError=ct,Yn.Cancel=Yn.CanceledError,Yn.all=function(n){return Promise.all(n)},Yn.spread=UT,Yn.isAxiosError=VT,Yn.mergeConfig=Ss,Yn.AxiosHeaders=Kr,Yn.formToJSON=n=>E0(_e.isHTMLForm(n)?new FormData(n):n),Yn.getAdapter=W0.getAdapter,Yn.HttpStatusCode=Md,Yn.default=Yn;const{Axios:Zz,AxiosError:Qz,CanceledError:eB,isCancel:tB,CancelToken:nB,VERSION:rB,all:iB,Cancel:oB,isAxiosError:sB,spread:aB,toFormData:lB,AxiosHeaders:cB,HttpStatusCode:uB,formToJSON:hB,getAdapter:dB,mergeConfig:fB,create:pB}=Yn;function V0(){return Object.assign({},ia())}function GT(n,t,e){const r=Gr(n,e?.in);return r.setTime(r.getTime()+t*nc),r}function qT(n,t){const e=()=>fo(t?.in,NaN),r=JT(n);let d;if(r.date){const s=ZT(r.date,2);d=QT(s.restDateString,s.year)}if(!d||isNaN(+d))return e();const h=+d;let p=0,v;if(r.time&&(p=eM(r.time),isNaN(p)))return e();if(r.timezone){if(v=tM(r.timezone),isNaN(v))return e()}else{const s=new Date(h+p),f=Gr(0,t?.in);return f.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),f.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),f}return Gr(h+p+v,t?.in)}const Ic={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},KT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,YT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,XT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function JT(n){const t={},e=n.split(Ic.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],Ic.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Ic.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const d=Ic.timezone.exec(r);d?(t.time=r.replace(d[1],""),t.timezone=d[1]):t.time=r}return t}function ZT(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const d=r[1]?parseInt(r[1]):null,h=r[2]?parseInt(r[2]):null;return{year:h===null?d:h*100,restDateString:n.slice((r[1]||r[2]).length)}}function QT(n,t){if(t===null)return new Date(NaN);const e=n.match(KT);if(!e)return new Date(NaN);const r=!!e[4],d=ml(e[1]),h=ml(e[2])-1,p=ml(e[3]),v=ml(e[4]),s=ml(e[5])-1;if(r)return sM(t,v,s)?nM(t,v,s):new Date(NaN);{const f=new Date(0);return!iM(t,h,p)||!oM(t,d)?new Date(NaN):(f.setUTCFullYear(t,h,Math.max(d,p)),f)}}function ml(n){return n?parseInt(n):1}function eM(n){const t=n.match(YT);if(!t)return NaN;const e=Ld(t[1]),r=Ld(t[2]),d=Ld(t[3]);return aM(e,r,d)?e*ih+r*nc+d*1e3:NaN}function Ld(n){return n&&parseFloat(n.replace(",","."))||0}function tM(n){if(n==="Z")return 0;const t=n.match(XT);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),d=t[3]&&parseInt(t[3])||0;return lM(r,d)?e*(r*ih+d*nc):NaN}function nM(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,h=(t-1)*7+e+1-d;return r.setUTCDate(r.getUTCDate()+h),r}const rM=[31,null,31,30,31,30,31,31,30,31,30,31];function G0(n){return n%400===0||n%4===0&&n%100!==0}function iM(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(rM[t]||(G0(n)?29:28))}function oM(n,t){return t>=1&&t<=(G0(n)?366:365)}function sM(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function aM(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function lM(n,t){return t>=0&&t<=59}function cM(n,t,e){return GT(n,-t,e)}function q0(n,t,e){const r=V0(),d=dM(n,e.timeZone,e.locale??r.locale);return"formatToParts"in d?uM(d,t):hM(d,t)}function uM(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function hM(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function dM(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function fM(n,t){const e=yM(t);return"formatToParts"in e?gM(e,n):mM(e,n)}const pM={year:0,month:1,day:2,hour:3,minute:4,second:5};function gM(n,t){try{const e=n.formatToParts(t),r=[];for(let d=0;d<e.length;d++){const h=pM[e[d].type];h!==void 0&&(r[h]=parseInt(e[d].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function mM(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Id={},K0=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),vM=K0==="06/25/2014, 00:00:00"||K0==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function yM(n){return Id[n]||(Id[n]=vM?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Id[n]}function Y0(n,t,e,r,d,h,p){const v=new Date(0);return v.setUTCFullYear(n,t,e),v.setUTCHours(r,d,h,p),v}const X0=36e5,bM=6e4,Od={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Nd(n,t,e){if(!n)return 0;let r=Od.timezoneZ.exec(n);if(r)return 0;let d,h;if(r=Od.timezoneHH.exec(n),r)return d=parseInt(r[1],10),J0(d)?-(d*X0):NaN;if(r=Od.timezoneHHMM.exec(n),r){d=parseInt(r[2],10);const p=parseInt(r[3],10);return J0(d,p)?(h=Math.abs(d)*X0+p*bM,r[1]==="+"?-h:h):NaN}if(CM(n)){t=new Date(t||Date.now());const p=e?t:wM(t),v=Dd(p,n);return-(e?v:xM(t,v,n))}return NaN}function wM(n){return Y0(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Dd(n,t){const e=fM(n,t),r=Y0(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let d=n.getTime();const h=d%1e3;return d-=h>=0?h:1e3+h,r-d}function xM(n,t,e){let r=n.getTime()-t;const d=Dd(new Date(r),e);if(t===d)return t;r-=d-t;const h=Dd(new Date(r),e);return d===h?d:Math.max(d,h)}function J0(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Z0={};function CM(n){if(Z0[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Z0[n]=!0,!0}catch{return!1}}const _M=60*1e3,kM={X:function(n,t,e){const r=Pd(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Q0(r);case"XXXX":case"XX":return wa(r);default:return wa(r,":")}},x:function(n,t,e){const r=Pd(e.timeZone,n);switch(t){case"x":return Q0(r);case"xxxx":case"xx":return wa(r);default:return wa(r,":")}},O:function(n,t,e){const r=Pd(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+AM(r,":");default:return"GMT"+wa(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return q0("short",n,e);default:return q0("long",n,e)}}};function Pd(n,t){const e=n?Nd(n,t,!0)/_M:t?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Oc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function wa(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Oc(Math.floor(r/60),2),h=Oc(Math.floor(r%60),2);return e+d+t+h}function Q0(n,t){return n%60===0?(n>0?"-":"+")+Oc(Math.abs(n)/60,2):wa(n,t)}function AM(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Math.floor(r/60),h=r%60;return h===0?e+String(d):e+String(d)+t+Oc(h,2)}function eb(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const SM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Fd=36e5,tb=6e4,$M=2,Yr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:SM};function nb(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?$M:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=EM(n),{year:d,restDateString:h}=RM(r.date,e),p=TM(h,d);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const v=p.getTime();let s=0,f;if(r.time&&(s=MM(r.time),s===null||isNaN(s)))return new Date(NaN);if(r.timeZone||t.timeZone){if(f=Nd(r.timeZone||t.timeZone,new Date(v+s)),isNaN(f))return new Date(NaN)}else f=eb(new Date(v+s)),f=eb(new Date(v+s+f));return new Date(v+s+f)}else return new Date(NaN)}function EM(n){const t={};let e=Yr.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Yr.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const d=Yr.timeZone.exec(r);d?(t.time=r.replace(d[1],""),t.timeZone=d[1].trim()):t.time=r}return t}function RM(n,t){if(n){const e=Yr.YYY[t],r=Yr.YYYYY[t];let d=Yr.YYYY.exec(n)||r.exec(n);if(d){const h=d[1];return{year:parseInt(h,10),restDateString:n.slice(h.length)}}if(d=Yr.YY.exec(n)||e.exec(n),d){const h=d[1];return{year:parseInt(h,10)*100,restDateString:n.slice(h.length)}}}return{year:null}}function TM(n,t){if(t===null)return null;let e,r,d;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let h=Yr.MM.exec(n);if(h)return e=new Date(0),r=parseInt(h[1],10)-1,ob(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(h=Yr.DDD.exec(n),h){e=new Date(0);const p=parseInt(h[1],10);return OM(t,p)?(e.setUTCFullYear(t,0,p),e):new Date(NaN)}if(h=Yr.MMDD.exec(n),h){e=new Date(0),r=parseInt(h[1],10)-1;const p=parseInt(h[2],10);return ob(t,r,p)?(e.setUTCFullYear(t,r,p),e):new Date(NaN)}if(h=Yr.Www.exec(n),h)return d=parseInt(h[1],10)-1,sb(d)?rb(t,d):new Date(NaN);if(h=Yr.WwwD.exec(n),h){d=parseInt(h[1],10)-1;const p=parseInt(h[2],10)-1;return sb(d,p)?rb(t,d,p):new Date(NaN)}return null}function MM(n){let t,e,r=Yr.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),zd(t)?t%24*Fd:NaN;if(r=Yr.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),zd(t,e)?t%24*Fd+e*tb:NaN;if(r=Yr.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const d=parseFloat(r[3].replace(",","."));return zd(t,e,d)?t%24*Fd+e*tb+d*1e3:NaN}return null}function rb(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,h=t*7+e+1-d;return r.setUTCDate(r.getUTCDate()+h),r}const LM=[31,28,31,30,31,30,31,31,30,31,30,31],IM=[31,29,31,30,31,30,31,31,30,31,30,31];function ib(n){return n%400===0||n%4===0&&n%100!==0}function ob(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=ib(n);if(r&&e>IM[t]||!r&&e>LM[t])return!1}return!0}function OM(n,t){if(t<1)return!1;const e=ib(n);return!(e&&t>366||!e&&t>365)}function sb(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function zd(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const NM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function DM(n,t,e={}){t=String(t);const r=t.match(NM);if(r){const d=nb(e.originalDate||n,e);t=r.reduce(function(h,p){if(p[0]==="'")return h;const v=h.indexOf(p),s=h[v-1]==="'",f=h.replace(p,"'"+kM[p[0]](d,p,e)+"'");return s?f.substring(0,v-1)+f.substring(v+1):f},t)}return vs(n,t,e)}function PM(n,t,e){n=nb(n,e);const r=Nd(t,n,!0),d=new Date(n.getTime()-r),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}function Nc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},DM(PM(n,t,{timeZone:r.timeZone}),e,r)}const Dc="yyyy-MM-dd",ab="HH:mm:ss.SSS",lb="HH:mm:ss",Pc=`${Dc} ${ab}`,cb=`${Dc} ${lb}`,gB=Tn("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return vs(!t||t==="local"?cM(n,n.getTimezoneOffset()):n,Pc)},formatDateTime(n,t){return!t||t==="local"?vs(n,Pc):Nc(n,t,Pc)},formatDateTimeHMS(n,t){return!t||t==="local"?vs(n,cb):Nc(n,t,cb)},formatDate:function(n,t){return!t||t==="local"?vs(n,Dc):Nc(n,this.timeZone,Dc)},formatTime:function(n,t,e=ab){return!t||t==="local"?vs(n,e):Nc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,lb)},formatTimestamp(n,t){return this.formatDateTime(qT(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}}),ub=100,hb=Tn("g",dg("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:n=>t=>n.namedWidgets[t]},actions:{notifyAddHistory(n){this.notifyHistory.length>=ub&&(this.notifyHistory.length=ub-1),this.notifyHistory.unshift(n)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(n){Object.assign(this.namedWidgets,n)},clearNamedWidget(n){delete this.namedWidgets[n]},updatePlayback(n){Object.assign(this.playback,n)}}})),xa=fg();xa.use(({store:n})=>{n.commit=(t,e)=>{typeof n[t]=="function"&&n[t](e)},n.dispatch=(t,e)=>{if(typeof n[t]=="function")return n[t](e)}});const FM=xa.install.bind(xa);xa.install=n=>{FM(n);const t=hb(xa);n.config.globalProperties.$store={state:new Proxy({},{get(e,r){return t.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,d]=r.split("/");return t[d]}return t[r]}}),commit(e,r){if(e.includes("/")){const[,d]=e.split("/");t[d]?.(r)}else t[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,d]=e.split("/");return t[d]?.(r)}else return t[e]?.(r)}}};const zM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",BM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return zM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=qM.indexOf(db[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,d=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*d}px;`,`background-size: ${e}px ${r}px;`,`height: ${d}px;`,`width: ${d}px;`,`padding-top: ${n-1}px;`].join("")}}};function WM(n,t,e,r,d,h){return rt(),nn("div",{style:ls(h.iconStyle)},null,4)}const jM=qi(BM,[["render",WM]]),HM={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function UM(n,t,e,r,d,h){const p=Ue("rux-icon");return rt(),Pt(p,{size:e.size,icon:e.icon,style:ls(h.colorStyle)},null,8,["size","icon","style"])}const VM=qi(HM,[["render",UM],["__scopeId","data-v-bb4cd487"]]),db={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},Bd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},GM=function(n){const t="#000000",e="#ffffff",r=Bd[db[n]];if(r){const d=+`0x${r.slice(1,3)}`,h=+`0x${r.slice(3,5)}`,p=+`0x${r.slice(5,7)}`;if((d*299+h*587+p*114)/1e3>128)return t}return e},qM=Object.keys(Bd),KM={astro:{component:n=>Zs(VM,{...n})},"astro-status":{component:n=>Zs(jM,{...n,status:n.icon})}},YM={extras:{component:n=>Zs(aC,{...n})}},XM=50,JM=2e3,fb="single-spa:app-change",ZM={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(fb,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},JM)},unmounted(){window.removeEventListener(fb,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Iu().length>0,Iu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},XM)}}},QM={class:"mx-1"},eL={key:1,class:"d-flex justify-center align-center"};function tL(n,t,e,r,d,h){const p=Ue("v-card-title"),v=Ue("v-card-text"),s=Ue("v-card"),f=Ue("v-progress-circular");return rt(),nn(si,null,[d.show?(rt(),Pt(s,{key:0},{default:ze(()=>[We(p,null,{default:ze(()=>[...t[0]||(t[0]=[It(" 404 Not Found ",-1)])]),_:1}),We(v,{class:"d-flex align-center mt-3"},{default:ze(()=>[t[1]||(t[1]=It(" The requested URL ",-1)),qn("code",QM,gn(n.$route.fullPath),1),t[2]||(t[2]=It(" was not routable. ",-1)),t[3]||(t[3]=qn("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ur("",!0),h.showSpinner?(rt(),nn("div",eL,[We(f,{indeterminate:""})])):Ur("",!0)],64)}const nL=qi(ZM,[["render",tL]]);var Wd={};const rL={props:{modelValue:Boolean},emits:["update:modelValue"],data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const n=/\w+.gem/;return this.response.tree.filter(t=>n.exec(t.path)).map(t=>({name:t.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${t.path}`}))},getResponse:function(){this.disableSearch=!0,Yn.get(this.url).then(n=>{this.response=n.data}),setTimeout(()=>{this.disableSearch=!1},1e4)},searchGithub:function(){this.type="github",this.url="https://api.github.com/repos/OpenC3/openc3-tools/git/trees/main?recursive=1",this.getResponse()},downloadGem:function(n){const t=document.createElement("a");t.href=n.url,t.setAttribute("download",n.name),t.click(),t.remove()}}},iL={class:"pa-3"},oL={class:"px-2"},sL={key:0,class:"mt-4"},aL={key:1,class:"mt-4"};function lL(n,t,e,r,d,h){const p=Ue("v-spacer"),v=Ue("v-toolbar"),s=Ue("v-row"),f=Ue("v-icon"),i=Ue("v-btn"),a=Ue("v-col"),u=Ue("v-list-item-title"),g=Ue("v-progress-circular"),o=Ue("v-list-item"),c=Ue("v-divider"),m=Ue("v-card-text"),w=Ue("v-card"),x=Ue("v-dialog");return rt(),Pt(x,{modelValue:h.show,"onUpdate:modelValue":t[0]||(t[0]=R=>h.show=R),width:"600"},{default:ze(()=>[We(w,null,{default:ze(()=>[We(v,{height:"24"},{default:ze(()=>[We(p),t[1]||(t[1]=qn("span",null," Download Gems ",-1)),We(p)]),_:1}),We(m,null,{default:ze(()=>[qn("div",iL,[We(s,{class:"my-2"},{default:ze(()=>[...t[2]||(t[2]=[It(" Select a download option ",-1)])]),_:1}),We(s,null,{default:ze(()=>[We(a,null,{default:ze(()=>[qn("div",oL,[We(i,{block:"","data-test":"searchGithub",color:"primary",disabled:d.disableSearch,onClick:h.searchGithub},{default:ze(()=>[t[4]||(t[4]=It(" Github ",-1)),We(f,{end:"",theme:"dark"},{default:ze(()=>[...t[3]||(t[3]=[It(" mdi-github ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(s,{class:"mt-5"},{default:ze(()=>[...t[5]||(t[5]=[It(" Community Gems ",-1)])]),_:1}),h.listData.length<1?(rt(),nn("div",sL,[We(s,{class:"mx-2"},{default:ze(()=>[...t[6]||(t[6]=[qn("span",null," I’m sorry, Dave. No gems available.... ",-1)])]),_:1})])):(rt(),nn("div",aL,[(rt(!0),nn(si,null,ho(h.listData,(R,$)=>(rt(),nn("div",{key:$},[We(o,null,{default:ze(()=>[We(u,null,{default:ze(()=>[It(gn(R.name),1)]),_:2},1024),We(o,{icon:""},{default:ze(()=>[d.activeDownload?(rt(),Pt(g,{key:0,indeterminate:"",color:"primary"})):(rt(),Pt(i,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:d.activeDownload,onClick:k=>h.downloadGem(R)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),$<h.listData.length-1?(rt(),Pt(c,{key:$})):Ur("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const mB=Tn("b",qi(rL,[["render",lL]])),cL={props:{modelValue:Boolean,plugin:{type:String,default:null},targets:{type:Array,default:null},pluginDelete:Boolean},emits:["update:modelValue","submit","cancel"],data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)Ju.get(`/openc3-api/targets/${n.name}/modified_files`).then(t=>{t.data.length!==0&&this.modifiedTargets.push({name:n.name,files:t.data})})},methods:{cancel(){this.show=!1,this.$emit("cancel")}}},uL={class:"file-list-container"};function hL(n,t,e,r,d,h){const p=Ue("v-spacer"),v=Ue("v-toolbar"),s=Ue("v-list-item-title"),f=Ue("v-list-item-subtitle"),i=Ue("v-list-item"),a=Ue("v-checkbox"),u=Ue("v-card-text"),g=Ue("v-btn"),o=Ue("v-card-actions"),c=Ue("v-card"),m=Ue("v-dialog");return rt(),Pt(m,{modelValue:h.show,"onUpdate:modelValue":t[2]||(t[2]=w=>h.show=w),persistent:"",width:"600",onKeydown:zl(h.cancel,["esc"])},{default:ze(()=>[We(c,null,{default:ze(()=>[We(v,{height:"24"},{default:ze(()=>[We(p),t[3]||(t[3]=qn("span",null," Modified Plugin ",-1)),We(p)]),_:1}),We(u,{class:"pa-3 card-container"},{default:ze(()=>[qn("div",null," Plugin "+gn(e.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(rt(!0),nn(si,null,ho(d.modifiedTargets,(w,x)=>(rt(),Pt(i,{key:x,lines:"two"},{default:ze(()=>[We(s,null,{default:ze(()=>[It(gn(w.name),1)]),_:2},1024),qn("div",uL,[(rt(!0),nn(si,null,ho(w.files,(R,$)=>(rt(),Pt(f,{key:$},{default:ze(()=>[It(gn(R),1)]),_:2},1024))),128))])]),_:2},1024))),128)),We(a,{modelValue:d.deleteModified,"onUpdate:modelValue":t[0]||(t[0]=w=>d.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(o,{class:"px-2"},{default:ze(()=>[We(p),We(g,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:h.cancel},{default:ze(()=>[...t[4]||(t[4]=[It(" Cancel ",-1)])]),_:1},8,["onClick"]),We(g,{variant:"flat","data-test":"modified-plugin-submit",onClick:t[1]||(t[1]=()=>{h.show=!1,n.$emit("submit",d.deleteModified)})},{default:ze(()=>[...t[5]||(t[5]=[It(" Confirm ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const vB=Tn("S",qi(cL,[["render",hL],["__scopeId","data-v-06cfb31b"]])),jd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>tt(()=>et.import("./PluginsTab-CLQ0EbDl-5047f5c4aeb9e86537a5.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>tt(()=>et.import("./TargetsTab-DcHwCcSU-89e9ff5556005b9dc355.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>tt(()=>et.import("./InterfacesTab-CITUnMac-0085a7a386d1f92a98db.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>tt(()=>et.import("./RoutersTab-Dpq_F5it-6e53c3f7b80a8a4394c0.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>tt(()=>et.import("./MicroservicesTab-gCXt9Jlh-ae566dd9addb4d797386.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>tt(()=>et.import("./PackagesTab-DmsuQSmU-294a5184dcaa0a941c15.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>tt(()=>et.import("./ToolsTab-MCjy5Bf6-0637f1a3a75fdf06961e.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>tt(()=>et.import("./RedisTab-9hUKvLT7-309940c3d130392a1f70.js"),void 0)},{displayName:"TSDB",name:"TsdbTab",path:"tsdb",component:()=>tt(()=>et.import("./TsdbTab-4OaejSum-06231378c66fdfdefcc3.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>tt(()=>et.import("./SecretsTab-DAZeb63H-99fe50bcd5dfb4c1b37b.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>tt(()=>et.import("./SettingsTab-CHcHYnay-28b2eddedc8430da6c99.js"),void 0)}],dL={components:{TopBar:iR},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return jd.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function fL(n,t,e,r,d,h){const p=Ue("top-bar"),v=Ue("v-tab"),s=Ue("v-tabs"),f=Ue("router-view"),i=Ue("v-card");return rt(),nn("div",null,[We(p,{title:d.title},null,8,["title"]),We(i,null,{default:ze(()=>[We(s,{modelValue:d.curTab,"onUpdate:modelValue":t[0]||(t[0]=a=>d.curTab=a),"fixed-tabs":""},{default:ze(()=>[(rt(!0),nn(si,null,ho(h.tabs,(a,u)=>(rt(),Pt(v,{key:u,to:a.path},{default:ze(()=>[It(gn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(f)]),_:1})])}const pL=qi(dL,[["render",fL]]);function Hd(n){let[t,e]=n;return[t,e]}function pb(n,t){let e=n,r=t,d=e.length,h=r.length;if(d===0||h===0)return 0;d>h?e=e.substring(d-h):d<h&&(r=r.substring(0,d));let p=Math.min(d,h);if(e===r)return p;let v=0,s=1;for(let f=0;f!==-1;){let i=e.substring(p-s);if(f=r.indexOf(i),f===-1)return v;s+=f,(f===0||e.substring(p-s)===r.substring(0,s))&&(v=s,s++)}return v}function Ud(n,t){if(!n||!t||n[0]!==t[0])return 0;let e=0,r=Math.min(n.length,t.length),d=r,h=0;for(;e<d;)n.substring(h,d)===t.substring(h,d)?(e=d,h=e):r=d,d=Math.floor((r-e)/2+e);return d}function Fc(n,t){if(!n||!t||n[n.length-1]!==t[t.length-1])return 0;let e=0,r=Math.min(n.length,t.length),d=r,h=0;for(;e<d;)n.substring(n.length-d,n.length-h)===t.substring(t.length-d,t.length-h)?(e=d,h=e):r=d,d=Math.floor((r-e)/2+e);return d}function gL(n){let t=n.charCodeAt(0);return t>=55296&&t<=56319}function mL(n){let t=n.charCodeAt(0);return t>=56320&&t<=57343}function vL(n,t,e){let r=n.length,d=t.length,h=Math.ceil((r+d)/2),p=h,v=2*h,s=Array(v),f=Array(v);for(let m=0;m<v;m++)s[m]=-1,f[m]=-1;s[p+1]=0,f[p+1]=0;let i=r-d,a=i%2!=0,u=0,g=0,o=0,c=0;for(let m=0;m<h&&!(Date.now()>e);m++){for(let w=-m+u;w<=m-g;w+=2){let x=p+w,R;R=w===-m||w!==m&&s[x-1]<s[x+1]?s[x+1]:s[x-1]+1;let $=R-w;for(;R<r&&$<d&&n.charAt(R)===t.charAt($);)R++,$++;if(s[x]=R,R>r)g+=2;else if($>d)u+=2;else if(a){let k=p+i-w;if(k>=0&&k<v&&f[k]!==-1){let C=r-f[k];if(R>=C)return gb(n,t,R,$,e)}}}for(let w=-m+o;w<=m-c;w+=2){let x=p+w,R;R=w===-m||w!==m&&f[x-1]<f[x+1]?f[x+1]:f[x-1]+1;let $=R-w;for(;R<r&&$<d&&n.charAt(r-R-1)===t.charAt(d-$-1);)R++,$++;if(f[x]=R,R>r)c+=2;else if($>d)o+=2;else if(!a){let k=p+i-w;if(k>=0&&k<v&&s[k]!==-1){let C=s[k],O=p+C-k;if(R=r-R,C>=R)return gb(n,t,C,O,e)}}}}return[[Ca,n],[_a,t]]}function gb(n,t,e,r,d){let h=n.substring(0,e),p=t.substring(0,r),v=n.substring(e),s=t.substring(r),f=Es(h,p,{checkLines:!1,deadline:d}),i=Es(v,s,{checkLines:!1,deadline:d});return f.concat(i)}function yL(n,t,e=1){if(e<=0)return null;let r=n.length>t.length?n:t,d=n.length>t.length?t:n;if(r.length<4||d.length*2<r.length)return null;let h=mb(r,d,Math.ceil(r.length/4)),p=mb(r,d,Math.ceil(r.length/2)),v;if(h&&p)v=h[4].length>p[4].length?h:p;else{if(!h&&!p)return null;p?h||(v=p):v=h}if(!v)throw Error("Unable to find a half match.");let s,f,i,a;n.length>t.length?(s=v[0],f=v[1],i=v[2],a=v[3]):(i=v[0],a=v[1],s=v[2],f=v[3]);let u=v[4];return[s,f,i,a,u]}function mb(n,t,e){let r=n.slice(e,e+Math.floor(n.length/4)),d=-1,h="",p,v,s,f;for(;(d=t.indexOf(r,d+1))!==-1;){let i=Ud(n.slice(e),t.slice(d)),a=Fc(n.slice(0,e),t.slice(0,d));h.length<a+i&&(h=t.slice(d-a,d)+t.slice(d,d+i),p=n.slice(0,e-a),v=n.slice(e+i),s=t.slice(0,d-a),f=t.slice(d+i))}return h.length*2>=n.length?[p||"",v||"",s||"",f||"",h||""]:null}function bL(n,t){for(let e=0;e<n.length;e++){let r=n[e][1],d=[];for(let h=0;h<r.length;h++)d[h]=t[r.charCodeAt(h)];n[e][1]=d.join("")}}function wL(n,t){let e=[],r={};e[0]="";function d(v){let s="",f=0,i=-1,a=e.length;for(;i<v.length-1;){i=v.indexOf(`
1489
- `,f),i===-1&&(i=v.length-1);let u=v.slice(f,i+1);(r.hasOwnProperty?r.hasOwnProperty(u):r[u]!==void 0)?s+=String.fromCharCode(r[u]):(a===h&&(u=v.slice(f),i=v.length),s+=String.fromCharCode(a),r[u]=a,e[a++]=u),f=i+1}return s}let h=4e4,p=d(n);return h=65535,{chars1:p,chars2:d(t),lineArray:e}}function xL(n,t,e){let r=n,d=t,h=wL(r,d);r=h.chars1,d=h.chars2;let p=h.lineArray,v=Es(r,d,{checkLines:!1,deadline:e.deadline});bL(v,p),v=wb(v),v.push([zc,""]);let s=0,f=0,i=0,a="",u="";for(;s<v.length;){switch(v[s][0]){case _a:i++,u+=v[s][1];break;case Ca:f++,a+=v[s][1];break;case zc:if(f>=1&&i>=1){v.splice(s-f-i,f+i),s=s-f-i;let g=Es(a,u,{checkLines:!1,deadline:e.deadline});for(let o=g.length-1;o>=0;o--)v.splice(s,0,g[o]);s+=g.length}i=0,f=0,a="",u="";break;default:throw Error("Unknown diff operation.")}s++}return v.pop(),v}function CL(n,t,e){let r;if(!n)return[[_a,t]];if(!t)return[[Ca,n]];let d=n.length>t.length?n:t,h=n.length>t.length?t:n,p=d.indexOf(h);if(p!==-1)return r=[[_a,d.substring(0,p)],[zc,h],[_a,d.substring(p+h.length)]],n.length>t.length&&(r[0][0]=Ca,r[2][0]=Ca),r;if(h.length===1)return[[Ca,n],[_a,t]];let v=yL(n,t);if(v){let s=v[0],f=v[1],i=v[2],a=v[3],u=v[4],g=Es(s,i,e),o=Es(f,a,e);return g.concat([[zc,u]],o)}return e.checkLines&&n.length>100&&t.length>100?xL(n,t,e):vL(n,t,e.deadline)}var _L=Object.defineProperty,vb=Object.getOwnPropertySymbols,kL=Object.prototype.hasOwnProperty,AL=Object.prototype.propertyIsEnumerable,yb=(n,t,e)=>t in n?_L(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,SL=(n,t)=>{for(var e in t||={})kL.call(t,e)&&yb(n,e,t[e]);if(vb)for(var e of vb(t))AL.call(t,e)&&yb(n,e,t[e]);return n};const Ca=-1,_a=1,zc=0;function $L(n,t,e){if(n===null||t===null)throw Error("Null input. (diff)");let r=Es(n,t,RL({}));return ML(r),r}function Es(n,t,e){let r=n,d=t;if(r===d)return r?[[0,r]]:[];let h=Ud(r,d),p=r.substring(0,h);r=r.substring(h),d=d.substring(h),h=Fc(r,d);let v=r.substring(r.length-h);r=r.substring(0,r.length-h),d=d.substring(0,d.length-h);let s=CL(r,d,e);return p&&s.unshift([0,p]),v&&s.push([0,v]),s=Vd(s),s}function EL(n){let t=1;return typeof n<"u"&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+t*1e3}function RL(n){return SL({checkLines:!0,deadline:EL(n.timeout||1)},n)}function Bc(n,t,e){return e===1?n+t:t+n}function Wc(n,t){return t===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function TL(n,t,e,r){return r===1?n[t][1][n[t][1].length-1]===n[e][1][n[e][1].length-1]:n[t][1][0]===n[e][1][0]}function bb(n,t,e){let r=e===1?-1:1,d=null,h=null,p=t+e;for(;p>=0&&p<n.length&&(d===null||h===null);p+=e){let[f,i]=n[p];if(i.length!==0){if(f===1){d===null&&(d=p);continue}else if(f===-1){h===null&&(h=p);continue}else if(f===0){if(d===null&&h===null){let[a,u]=Wc(n[t][1],e);n[t][1]=a,n[p][1]=Bc(n[p][1],u,r);return}break}}}if(d!==null&&h!==null&&TL(n,d,h,e)){let[f,i]=Wc(n[d][1],r),[a]=Wc(n[h][1],r);n[d][1]=f,n[h][1]=a,n[t][1]=Bc(n[t][1],i,e);return}let[v,s]=Wc(n[t][1],e);n[t][1]=v,d===null?(n.splice(p,0,[1,s]),h!==null&&h>=p&&h++):n[d][1]=Bc(n[d][1],s,r),h===null?n.splice(p,0,[-1,s]):n[h][1]=Bc(n[h][1],s,r)}function ML(n){for(let t=0;t<n.length;t++){let[e,r]=n[t];if(r.length===0)continue;let d=r[0],h=r[r.length-1];gL(h)&&e===0&&bb(n,t,1),mL(d)&&e===0&&bb(n,t,-1)}for(let t=0;t<n.length;t++)n[t][1].length===0&&n.splice(t,1)}function wb(n){let t=n.map(a=>Hd(a)),e=!1,r=[],d=0,h=null,p=0,v=0,s=0,f=0,i=0;for(;p<t.length;)t[p][0]===0?(r[d++]=p,v=f,s=i,f=0,i=0,h=t[p][1]):(t[p][0]===1?f+=t[p][1].length:i+=t[p][1].length,h&&h.length<=Math.max(v,s)&&h.length<=Math.max(f,i)&&(t.splice(r[d-1],0,[-1,h]),t[r[d-1]+1][0]=1,d--,d--,p=d>0?r[d-1]:-1,v=0,s=0,f=0,i=0,h=null,e=!0)),p++;for(e&&(t=Vd(t)),t=OL(t),p=1;p<t.length;){if(t[p-1][0]===-1&&t[p][0]===1){let a=t[p-1][1],u=t[p][1],g=pb(a,u),o=pb(u,a);g>=o?(g>=a.length/2||g>=u.length/2)&&(t.splice(p,0,[0,u.substring(0,g)]),t[p-1][1]=a.substring(0,a.length-g),t[p+1][1]=u.substring(g),p++):(o>=a.length/2||o>=u.length/2)&&(t.splice(p,0,[0,a.substring(0,o)]),t[p-1][0]=1,t[p-1][1]=u.substring(0,u.length-o),t[p+1][0]=-1,t[p+1][1]=a.substring(o),p++),p++}p++}return t}const xb=/[^a-zA-Z0-9]/,Cb=/\s/,_b=/[\r\n]/,LL=/\n\r?\n$/,IL=/^\r?\n\r?\n/;function OL(n){let t=n.map(d=>Hd(d));function e(d,h){if(!d||!h)return 6;let p=d.charAt(d.length-1),v=h.charAt(0),s=p.match(xb),f=v.match(xb),i=s&&p.match(Cb),a=f&&v.match(Cb),u=i&&p.match(_b),g=a&&v.match(_b),o=u&&d.match(LL),c=g&&h.match(IL);return o||c?5:u||g?4:s&&!i&&a?3:i||a?2:s||f?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let d=t[r-1][1],h=t[r][1],p=t[r+1][1],v=Fc(d,h);if(v){let u=h.substring(h.length-v);d=d.substring(0,d.length-v),h=u+h.substring(0,h.length-v),p=u+p}let s=d,f=h,i=p,a=e(d,h)+e(h,p);for(;h.charAt(0)===p.charAt(0);){d+=h.charAt(0),h=h.substring(1)+p.charAt(0),p=p.substring(1);let u=e(d,h)+e(h,p);u>=a&&(a=u,s=d,f=h,i=p)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=f,i?t[r+1][1]=i:(t.splice(r+1,1),r--))}r++}return t}function Vd(n){let t=n.map(f=>Hd(f));t.push([0,""]);let e=0,r=0,d=0,h="",p="",v;for(;e<t.length;)switch(t[e][0]){case 1:d++,p+=t[e][1],e++;break;case-1:r++,h+=t[e][1],e++;break;case 0:r+d>1?(r!==0&&d!==0&&(v=Ud(p,h),v!==0&&(e-r-d>0&&t[e-r-d-1][0]===0?t[e-r-d-1][1]+=p.substring(0,v):(t.splice(0,0,[0,p.substring(0,v)]),e++),p=p.substring(v),h=h.substring(v)),v=Fc(p,h),v!==0&&(t[e][1]=p.substring(p.length-v)+t[e][1],p=p.substring(0,p.length-v),h=h.substring(0,h.length-v))),e-=r+d,t.splice(e,r+d),h.length&&(t.splice(e,0,[-1,h]),e++),p.length&&(t.splice(e,0,[1,p]),e++),e++):e!==0&&t[e-1][0]===0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,d=0,r=0,h="",p="";break;default:throw Error("Unknown diff operation")}t[t.length-1][1]===""&&t.pop();let s=!1;for(e=1;e<t.length-1;)t[e-1][0]===0&&t[e+1][0]===0&&(t[e][1].substring(t[e][1].length-t[e-1][1].length)===t[e-1][1]?(t[e][1]=t[e-1][1]+t[e][1].substring(0,t[e][1].length-t[e-1][1].length),t[e+1][1]=t[e-1][1]+t[e+1][1],t.splice(e-1,1),s=!0):t[e][1].substring(0,t[e+1][1].length)===t[e+1][1]&&(t[e-1][1]+=t[e+1][1],t[e][1]=t[e][1].substring(t[e+1][1].length)+t[e+1][1],t.splice(e+1,1),s=!0)),e++;return s&&(t=Vd(t)),t}function kb(n,t,e=!1){let r=null,d=!0;return function(...h){let p=e&&d,v=()=>{n.apply(this,h),r=null};p&&(d=!1,v()),r||=setTimeout(v,t)}}function NL(n,t){let e;return function(...r){clearTimeout(e),e=setTimeout(()=>n.apply(this,r),t)}}function Ab(n=""){return(n??"").replace(/\r\n/g,`
1490
- `)}function Sb(n,t,e,r){let d=n+(e-n)/2;return`M ${n} ${t} C ${d},${t} ${d},${r} ${e},${r}`}const ka="right",Rs="left",DL="specific",PL="broad";var $b={SVG_NS:"http://www.w3.org/2000/svg"};function Eb(n,t){let{mode:e}=n.options;return t===Rs&&n.options.left.mode!==null&&(e=n.options.left.mode??e),t===ka&&n.options.right.mode!==null&&(e=n.options.right.mode??e),e}function Rb(n,t){let{theme:e}=n.options;return t===Rs&&n.options.left.theme!==null&&(e=n.options.left.theme??e),t===ka&&n.options.right.theme!==null&&(e=n.options.right.theme??e),e}function FL(n,t){return n.ace.getSession().doc.getLine(t)}function zL(n){let t=n.options.left.id;return t?document.getElementById(t)?.offsetHeight??0:0}function Tb(n){let t=document.createElement("div"),e={class:n.className,style:`top:${n.topOffset}px`,title:n.tooltip,"data-diff-index":n.diffIndex};for(let r in e)t.setAttribute(r,String(e[r]));return t.innerHTML=n.arrowContent,t}function Gd(n,t){let e=`js-${t}-${Math.random().toString(36).substr(2,5)}`,r=n.querySelector(`.${t}`);if(r)return r.id=r.id||e,r.id;let d=document.createElement("div");return n.appendChild(d),d.className=t,d.id=e,d.id}function Mb(n,t,e,r){let d=n==="document"?document:document.querySelector(n);d&&d.addEventListener(t,h=>{let p=d.querySelectorAll(e),v=h.target;for(let s=0,f=p.length;s<f;s+=1){let i=v,a=p[s];for(;i&&i!==d;)i===a&&r.call(a,h),i=i.parentNode}})}let Ts=null;function BL(n){if(n.Range)return n.Range;let t=n.acequire||n.require;return t?t("ace/range"):!1}const WL={ace:void 0,mode:null,theme:null,element:null,diffGranularity:PL,lockScrolling:!0,showDiffs:!0,showConnectors:!0,charDiffs:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",diffChar:"acediff__diffChar",diffGutter:"acediff__diffGutter",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"&#8594;",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"&#8592;",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0,onDiffReady:null};var jL=class{options;el;editors;diffs=[];lineHeight=0;gutterSVG=null;gutterWidth=0;gutterHeight=0;copyLeftContainer=null;copyRightContainer=null;connectorYOffset=0;removeEventHandlers=null;constructor(n={}){let t=JSON.parse(JSON.stringify(WL));this.options={...t,...n,left:{...t.left,...n.left},right:{...t.right,...n.right},classes:{...t.classes,...n.classes}};let e=()=>typeof window<"u"?window.ace:void 0;this.options.ace||(this.options.ace=e());let{ace:r}=this.options;if(!r){let h="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";throw console.error(h),Error(h)}let d=BL(r);if(!d){let h="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";throw console.error(h),Error(h)}if(Ts=d,this.options.element===null){let h="You need to specify an element for Ace-diff - `options.element` is missing";throw console.error(h),Error(h)}if(this.options.element instanceof HTMLElement)this.el=this.options.element;else{let h=document.body.querySelector(this.options.element);if(!h){let p=`Can't find the specified element ${this.options.element}`;throw console.error(p),Error(p)}this.el=h}this.options.left.id=Gd(this.el,"acediff__left"),this.options.classes.gutterID=Gd(this.el,"acediff__gutter"),this.options.right.id=Gd(this.el,"acediff__right"),this.el.innerHTML=`<div class="acediff acediff__wrap">${this.el.innerHTML}</div>`,this.editors={left:{ace:r.edit(this.options.left.id),markers:[],lineLengths:[],diffGutters:[]},right:{ace:r.edit(this.options.right.id),markers:[],lineLengths:[],diffGutters:[]},editorHeight:null},this.editors.left.ace.getSession().setMode(Eb(this,Rs)??""),this.editors.right.ace.getSession().setMode(Eb(this,ka)??""),this.editors.left.ace.setReadOnly(!this.options.left.editable),this.editors.right.ace.setReadOnly(!this.options.right.editable),this.editors.left.ace.setShowFoldWidgets(!1),this.editors.right.ace.setShowFoldWidgets(!1),this.editors.left.ace.setTheme(Rb(this,Rs)??""),this.editors.right.ace.setTheme(Rb(this,ka)??""),this.editors.left.ace.setValue(Ab(this.options.left.content??null),-1),this.editors.right.ace.setValue(Ab(this.options.right.content??null),-1),this.editors.editorHeight=zL(this),setTimeout(()=>{this.lineHeight=this.editors.left.ace.renderer.lineHeight,this.addEventHandlers(),this.createCopyContainers(),this.createGutter(),this.diff()},1)}setOptions(n){this.options={...this.options,...n,left:{...this.options.left,...n.left},right:{...this.options.right,...n.right},classes:{...this.options.classes,...n.classes}},this.diff()}getNumDiffs(){return this.diffs.length}getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}}diff(){let n=this.editors.left.ace.getSession().getValue(),t=wb($L(this.editors.right.ace.getSession().getValue(),n));this.editors.left.lineLengths=this.getLineLengths(this.editors.left),this.editors.right.lineLengths=this.getLineLengths(this.editors.right);let e=[],r={left:0,right:0};t.forEach(d=>{let h=d[0],p=d[1];p.length!==0&&(h===0?(r.left+=p.length,r.right+=p.length):h===-1?(e.push(this.computeDiff(-1,r.left,r.right,p)),r.right+=p.length):h===1&&(e.push(this.computeDiff(1,r.left,r.right,p)),r.left+=p.length))}),this.diffs=this.simplifyDiffs(e),!(this.diffs.length>this.options.maxDiffs)&&(this.clearDiffs(),this.decorate(),typeof this.options.onDiffReady=="function"&&this.options.onDiffReady(this.diffs))}clear(){this.clearDiffs(),this.clearGutter(),this.clearArrows()}destroy(){let n=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let t=this.editors.left.ace.container,e=t.cloneNode(!1);e.textContent=n,t.parentNode?.replaceChild(e,t);let r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),t=this.editors.right.ace.container,e=t.cloneNode(!1),e.textContent=r,t.parentNode?.replaceChild(e,t);let d=document.getElementById(this.options.classes.gutterID);d&&(d.innerHTML=""),this.removeEventHandlers?.()}addEventHandlers(){let n=!1,t=(d,h)=>{if(!this.options.lockScrolling||n)return;let p=d.ace.getSession(),v=h.ace.getSession(),s=p.getScrollTop(),f=p.getLength()*this.lineHeight,i=d.ace.renderer.$size.scrollerHeight,a=Math.max(0,f-i),u=a>0?s/a:0,g=v.getLength()*this.lineHeight,o=h.ace.renderer.$size.scrollerHeight,c=u*Math.max(0,g-o);n=!0,v.setScrollTop(c),n=!1};this.editors.left.ace.getSession().on("changeScrollTop",kb(()=>{t(this.editors.left,this.editors.right),this.updateGap()},16)),this.editors.right.ace.getSession().on("changeScrollTop",kb(()=>{t(this.editors.right,this.editors.left),this.updateGap()},16));let e=this.diff.bind(this);this.editors.left.ace.on("change",e),this.editors.right.ace.on("change",e),this.options.left.copyLinkEnabled&&Mb(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.newCodeConnectorLink}`,d=>this.copy(d,"ltr")),this.options.right.copyLinkEnabled&&Mb(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.deletedCodeConnectorLink}`,d=>this.copy(d,"rtl"));let r=NL(()=>{let d=document.getElementById(this.options.left.id);d&&(this.editors.availableHeight=d.offsetHeight),this.diff()},250);window.addEventListener("resize",r),this.removeEventHandlers=()=>{window.removeEventListener("resize",r)}}copy(n,t){let e=n.target,r=parseInt(e.getAttribute("data-diff-index")??"0",10),d=this.diffs[r];if(!d||t==="ltr"&&!this.options.right.editable||t==="rtl"&&!this.options.left.editable)return;let h,p,v,s,f,i;t==="ltr"?(h=this.editors.left,p=this.editors.right,v=d.leftStartOffset,s=d.leftEndOffset,f=d.rightStartOffset,i=d.rightEndOffset):(h=this.editors.right,p=this.editors.left,v=d.rightStartOffset,s=d.rightEndOffset,f=d.leftStartOffset,i=d.leftEndOffset);let a=h.ace.getValue().substring(v,s),u=p.ace.getSession().doc,g=u.indexToPosition(f,0),o=u.indexToPosition(i,0),c=p.ace.getSession().getScrollTop();Ts&&p.ace.getSession().replace(new Ts(g.row,g.column,o.row,o.column),a),p.ace.getSession().setScrollTop(parseInt(String(c),10)),this.diff()}getLineLengths(n){return n.ace.getSession().doc.getAllLines().map(t=>t.length+1)}showDiff(n,t,e,r,d){let h=this.editors[n],p=e;p<t&&(p=t);let v=`${d} ${p>t?"lines":"targetOnly"} ${n}`,s=p;if(s>t&&--s,Ts&&h.markers.push(h.ace.session.addMarker(new Ts(t,0,s,1),v,"fullLine")),this.options.charDiffs&&r&&r.length>0){let i=`${this.options.classes.diffChar} ${n}`;r.forEach(a=>{Ts&&h.markers.push(h.ace.session.addMarker(new Ts(a.lineStart,a.start,a.lineEnd-1,a.end),i,"text"))})}let f=`${this.options.classes.diffGutter} ${n}`;for(let i=t;i<p;i+=1)h.ace.session.addGutterDecoration(i,f),h.diffGutters.push({line:i,className:f})}updateGap(){this.clearDiffs(),this.decorate(),this.positionCopyContainers()}clearDiffs(){this.editors.left.markers.forEach(n=>{this.editors.left.ace.getSession().removeMarker(n)}),this.editors.right.markers.forEach(n=>{this.editors.right.ace.getSession().removeMarker(n)}),this.editors.left.markers=[],this.editors.right.markers=[],this.editors.left.diffGutters.forEach(n=>{this.editors.left.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.right.diffGutters.forEach(n=>{this.editors.right.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.left.diffGutters=[],this.editors.right.diffGutters=[]}addConnector(n,t,e,r){let d=this.editors.left.ace.getSession().getScrollTop(),h=this.editors.right.ace.getSession().getScrollTop();this.connectorYOffset=1;let p=n*this.lineHeight-d+.5,v=this.gutterWidth+1,s=e*this.lineHeight-h+.5,f=t*this.lineHeight-d+this.connectorYOffset+.5,i=this.gutterWidth+1,a=r*this.lineHeight-h+this.connectorYOffset+.5,u=Sb(-1,p,v,s),g=Sb(i,a,-1,f),o=`${u} ${`L${v},${s} ${i},${a}`} ${g} ${`L-1,${f} -1,${p}`}`,c=document.createElementNS($b.SVG_NS,"path");c.setAttribute("d",o),c.setAttribute("class",this.options.classes.connector??""),this.gutterSVG?.appendChild(c)}addCopyArrows(n,t){if(n.leftEndLine>n.leftStartLine&&this.options.left.copyLinkEnabled&&this.options.right.editable){let e=Tb({className:this.options.classes.newCodeConnectorLink??"",topOffset:n.leftStartLine*this.lineHeight,tooltip:"Copy to right",diffIndex:t,arrowContent:this.options.classes.newCodeConnectorLinkContent??""});this.copyRightContainer?.appendChild(e)}if(n.rightEndLine>n.rightStartLine&&this.options.right.copyLinkEnabled&&this.options.left.editable){let e=Tb({className:this.options.classes.deletedCodeConnectorLink??"",topOffset:n.rightStartLine*this.lineHeight,tooltip:"Copy to left",diffIndex:t,arrowContent:this.options.classes.deletedCodeConnectorLinkContent??""});this.copyLeftContainer?.appendChild(e)}}positionCopyContainers(){let n=this.editors.left.ace.getSession().getScrollTop(),t=this.editors.right.ace.getSession().getScrollTop();this.copyRightContainer&&(this.copyRightContainer.style.cssText=`top: ${-n}px`),this.copyLeftContainer&&(this.copyLeftContainer.style.cssText=`top: ${-t}px`)}computeDiff(n,t,e,r){let d={};if(n===1){let h=this.getSingleDiffInfo(this.editors.left,t,r),p=this.getLineForCharPosition(this.editors.right,e),v=this.getCharsOnLine(this.editors.right,p),s=this.getCharsOnLine(this.editors.left,h.startLine),f=p,i=h.startLine===h.endLine,a=0;(h.startChar>0||i&&r.length<s)&&v>0&&h.startChar<s&&a++,d={leftStartLine:h.startLine,leftEndLine:h.endLine+1,rightStartLine:f,rightEndLine:f+a,leftStartOffset:t,leftEndOffset:t+r.length,rightStartOffset:e,rightEndOffset:e,leftStartChar:h.startChar,leftEndChar:h.endChar}}else{let h=this.getSingleDiffInfo(this.editors.right,e,r),p=this.getLineForCharPosition(this.editors.left,t),v=this.getCharsOnLine(this.editors.left,p),s=this.getCharsOnLine(this.editors.right,h.startLine),f=p,i=h.startLine===h.endLine,a=0;(h.startChar>0||i&&r.length<s)&&v>0&&h.startChar<s&&a++,d={leftStartLine:f,leftEndLine:f+a,rightStartLine:h.startLine,rightEndLine:h.endLine+1,leftStartOffset:t,leftEndOffset:t,rightStartOffset:e,rightEndOffset:e+r.length,rightStartChar:h.startChar,rightEndChar:h.endChar}}return d}getSingleDiffInfo(n,t,e){let r={startLine:0,startChar:0,endLine:0,endChar:0},d=t+e.length,h=0,p=!1,v=!1;n.lineLengths.forEach((f,i)=>{h+=f,!p&&t<h&&(r.startLine=i,r.startChar=t-h+f,p=!0),!v&&d<=h&&(r.endLine=i,r.endChar=d-h+f,v=!0)}),r.startChar>0&&this.getCharsOnLine(n,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;let s=/\n$/.test(e);return r.startChar>0&&s&&r.endLine++,r}getCharsOnLine(n,t){return FL(n,t).length}getLineForCharPosition(n,t){let e=n.ace.getSession().doc.getAllLines(),r=0,d=0;for(let h=0;h<e.length;h+=1){let p=e[h];if(p!==void 0&&(d+=p.length+1),t<=d){r=h,t===d&&h<e.length-1&&(r+=1);break}}return d>=n.ace.getSession().getValue().length&&(r+=1),r}createGutter(){let n=document.getElementById(this.options.classes.gutterID);if(!n)return;this.gutterHeight=n.clientHeight,this.gutterWidth=n.clientWidth;let t=this.getTotalHeight(Rs),e=this.getTotalHeight(ka),r=Math.max(t,e,this.gutterHeight);this.gutterSVG=document.createElementNS($b.SVG_NS,"svg"),this.gutterSVG.setAttribute("width",String(this.gutterWidth)),this.gutterSVG.setAttribute("height",String(r)),n.appendChild(this.gutterSVG)}getTotalHeight(n){return(n===Rs?this.editors.left:this.editors.right).ace.getSession().getLength()*this.lineHeight}createCopyContainers(){this.copyRightContainer=document.createElement("div"),this.copyRightContainer.setAttribute("class",this.options.classes.copyRightContainer??""),this.copyLeftContainer=document.createElement("div"),this.copyLeftContainer.setAttribute("class",this.options.classes.copyLeftContainer??"");let n=document.getElementById(this.options.classes.gutterID);n&&(n.appendChild(this.copyRightContainer),n.appendChild(this.copyLeftContainer))}clearGutter(){let n=document.getElementById(this.options.classes.gutterID);n&&this.gutterSVG&&n.removeChild(this.gutterSVG),this.createGutter()}clearArrows(){this.copyLeftContainer&&(this.copyLeftContainer.innerHTML=""),this.copyRightContainer&&(this.copyRightContainer.innerHTML="")}simplifyDiffs(n){let t=[],e=d=>this.options.diffGranularity===DL?d<1:d<=1,r=d=>{let h={...d,leftChars:[],rightChars:[]};return d.leftEndChar!==void 0&&h.leftChars.push({start:d.leftStartChar??0,end:d.leftEndChar,lineStart:d.leftStartLine??0,lineEnd:d.leftEndLine??0}),d.rightEndChar!==void 0&&h.rightChars.push({start:d.rightStartChar??0,end:d.rightEndChar,lineStart:d.rightStartLine??0,lineEnd:d.rightEndLine??0}),h};return n.forEach((d,h)=>{if(h===0){t.push(r(d));return}let p=!1;for(let v=0;v<t.length;v+=1)if(e(Math.abs(d.leftStartLine-t[v].leftEndLine))&&e(Math.abs(d.rightStartLine-t[v].rightEndLine))){t[v].leftStartLine=Math.min(d.leftStartLine,t[v].leftStartLine),t[v].rightStartLine=Math.min(d.rightStartLine,t[v].rightStartLine),t[v].leftEndLine=Math.max(d.leftEndLine,t[v].leftEndLine),t[v].rightEndLine=Math.max(d.rightEndLine,t[v].rightEndLine),t[v].leftStartOffset=Math.min(d.leftStartOffset,t[v].leftStartOffset),t[v].leftEndOffset=Math.max(d.leftEndOffset,t[v].leftEndOffset),t[v].rightStartOffset=Math.min(d.rightStartOffset,t[v].rightStartOffset),t[v].rightEndOffset=Math.max(d.rightEndOffset,t[v].rightEndOffset),d.leftEndChar!==void 0&&t[v].leftChars.push({start:d.leftStartChar??0,end:d.leftEndChar,lineStart:d.leftStartLine,lineEnd:d.leftEndLine}),d.rightEndChar!==void 0&&t[v].rightChars.push({start:d.rightStartChar??0,end:d.rightEndChar,lineStart:d.rightStartLine,lineEnd:d.rightEndLine}),p=!0;break}p||t.push(r(d))}),t.filter(d=>!(d.leftStartLine===d.leftEndLine&&d.rightStartLine===d.rightEndLine))}decorate(){this.clearGutter(),this.clearArrows(),this.diffs.forEach((n,t)=>{this.options.showDiffs&&(this.showDiff(Rs,n.leftStartLine,n.leftEndLine,n.leftChars,this.options.classes.diff??""),this.showDiff(ka,n.rightStartLine,n.rightEndLine,n.rightChars,this.options.classes.diff??""),this.options.showConnectors&&this.addConnector(n.leftStartLine,n.leftEndLine,n.rightStartLine,n.rightEndLine),this.addCopyArrows(n,t))})}},qd={exports:{}},Kd,Lb;function vl(){if(Lb)return Kd;Lb=1;const n="2.0.0",t=256,e=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,d=t-6;return Kd={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Kd}var Ib,Ob;function jc(){return Ob||(Ob=1,Ib=typeof process=="object"&&Wd&&Wd.NODE_DEBUG&&/\bsemver\b/i.test(Wd.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{}),Ib}var Nb;function yl(){return Nb||(Nb=1,(function(n,t){const{MAX_SAFE_COMPONENT_LENGTH:e,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:d}=vl(),h=jc();t=n.exports={};const p=t.re=[],v=t.safeRe=[],s=t.src=[],f=t.safeSrc=[],i=t.t={};let a=0;const u="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",d],[u,r]],o=m=>{for(const[w,x]of g)m=m.split(`${w}*`).join(`${w}{0,${x}}`).split(`${w}+`).join(`${w}{1,${x}}`);return m},c=(m,w,x)=>{const R=o(w),$=a++;h(m,$,w),i[m]=$,s[$]=w,f[$]=R,p[$]=new RegExp(w,x?"g":void 0),v[$]=new RegExp(R,x?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","\\d+"),c("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),c("MAINVERSION",`(${s[i.NUMERICIDENTIFIER]})\\.(${s[i.NUMERICIDENTIFIER]})\\.(${s[i.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[i.NUMERICIDENTIFIERLOOSE]})\\.(${s[i.NUMERICIDENTIFIERLOOSE]})\\.(${s[i.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[i.NONNUMERICIDENTIFIER]}|${s[i.NUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[i.NONNUMERICIDENTIFIER]}|${s[i.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASE",`(?:-(${s[i.PRERELEASEIDENTIFIER]}(?:\\.${s[i.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[i.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER",`${u}+`),c("BUILD",`(?:\\+(${s[i.BUILDIDENTIFIER]}(?:\\.${s[i.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[i.MAINVERSION]}${s[i.PRERELEASE]}?${s[i.BUILD]}?`),c("FULL",`^${s[i.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[i.MAINVERSIONLOOSE]}${s[i.PRERELEASELOOSE]}?${s[i.BUILD]}?`),c("LOOSE",`^${s[i.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[i.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[i.XRANGEIDENTIFIER]})(?:\\.(${s[i.XRANGEIDENTIFIER]})(?:\\.(${s[i.XRANGEIDENTIFIER]})(?:${s[i.PRERELEASE]})?${s[i.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[i.XRANGEIDENTIFIERLOOSE]})(?:${s[i.PRERELEASELOOSE]})?${s[i.BUILD]}?)?)?`),c("XRANGE",`^${s[i.GTLT]}\\s*${s[i.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[i.GTLT]}\\s*${s[i.XRANGEPLAINLOOSE]}$`),c("COERCEPLAIN",`(^|[^\\d])(\\d{1,${e}})(?:\\.(\\d{1,${e}}))?(?:\\.(\\d{1,${e}}))?`),c("COERCE",`${s[i.COERCEPLAIN]}(?:$|[^\\d])`),c("COERCEFULL",s[i.COERCEPLAIN]+`(?:${s[i.PRERELEASE]})?(?:${s[i.BUILD]})?(?:$|[^\\d])`),c("COERCERTL",s[i.COERCE],!0),c("COERCERTLFULL",s[i.COERCEFULL],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${s[i.LONETILDE]}${s[i.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[i.LONETILDE]}${s[i.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${s[i.LONECARET]}${s[i.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[i.LONECARET]}${s[i.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[i.GTLT]}\\s*(${s[i.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[i.GTLT]}\\s*(${s[i.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[i.GTLT]}\\s*(${s[i.LOOSEPLAIN]}|${s[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[i.XRANGEPLAIN]})\\s+-\\s+(${s[i.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[i.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(qd,qd.exports)),qd.exports}var Yd,Db;function Xd(){if(Db)return Yd;Db=1;const n=Object.freeze({loose:!0}),t=Object.freeze({});return Yd=e=>e?typeof e!="object"?n:e:t,Yd}var Jd,Pb;function Fb(){if(Pb)return Jd;Pb=1;const n=/^[0-9]+$/,t=(e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;const d=n.test(e),h=n.test(r);return d&&h&&(e=+e,r=+r),e===r?0:d&&!h?-1:h&&!d?1:e<r?-1:1};return Jd={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)},Jd}var Zd,zb;function Nr(){if(zb)return Zd;zb=1;const n=jc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:e}=vl(),{safeRe:r,t:d}=yl(),h=Xd(),{compareIdentifiers:p}=Fb();class v{constructor(f,i){if(i=h(i),f instanceof v){if(f.loose===!!i.loose&&f.includePrerelease===!!i.includePrerelease)return f;f=f.version}else if(typeof f!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof f}".`);if(f.length>t)throw new TypeError(`version is longer than ${t} characters`);n("SemVer",f,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const a=f.trim().match(i.loose?r[d.LOOSE]:r[d.FULL]);if(!a)throw new TypeError(`Invalid Version: ${f}`);if(this.raw=f,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>e||this.major<0)throw new TypeError("Invalid major version");if(this.minor>e||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>e||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(u=>{if(/^[0-9]+$/.test(u)){const g=+u;if(g>=0&&g<e)return g}return u}):this.prerelease=[],this.build=a[5]?a[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(f){if(n("SemVer.compare",this.version,this.options,f),!(f instanceof v)){if(typeof f=="string"&&f===this.version)return 0;f=new v(f,this.options)}return f.version===this.version?0:this.compareMain(f)||this.comparePre(f)}compareMain(f){return f instanceof v||(f=new v(f,this.options)),this.major<f.major?-1:this.major>f.major?1:this.minor<f.minor?-1:this.minor>f.minor?1:this.patch<f.patch?-1:this.patch>f.patch?1:0}comparePre(f){if(f instanceof v||(f=new v(f,this.options)),this.prerelease.length&&!f.prerelease.length)return-1;if(!this.prerelease.length&&f.prerelease.length)return 1;if(!this.prerelease.length&&!f.prerelease.length)return 0;let i=0;do{const a=this.prerelease[i],u=f.prerelease[i];if(n("prerelease compare",i,a,u),a===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(a===void 0)return-1;if(a!==u)return p(a,u)}while(++i)}compareBuild(f){f instanceof v||(f=new v(f,this.options));let i=0;do{const a=this.build[i],u=f.build[i];if(n("build compare",i,a,u),a===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(a===void 0)return-1;if(a!==u)return p(a,u)}while(++i)}inc(f,i,a){if(f.startsWith("pre")){if(!i&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const u=`-${i}`.match(this.options.loose?r[d.PRERELEASELOOSE]:r[d.PRERELEASE]);if(!u||u[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(f){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,a),this.inc("pre",i,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,a),this.inc("pre",i,a);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const u=Number(a)?1:0;if(this.prerelease.length===0)this.prerelease=[u];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(i===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(u)}}if(i){let g=[i,u];a===!1&&(g=[i]),p(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=g):this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${f}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Zd=v,Zd}var Qd,Bb;function Ms(){if(Bb)return Qd;Bb=1;const n=Nr();return Qd=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(d){if(!r)return null;throw d}},Qd}var ef,Wb;function HL(){if(Wb)return ef;Wb=1;const n=Ms();return ef=(t,e)=>{const r=n(t,e);return r?r.version:null},ef}var tf,jb;function UL(){if(jb)return tf;jb=1;const n=Ms();return tf=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},tf}var nf,Hb;function VL(){if(Hb)return nf;Hb=1;const n=Nr();return nf=(t,e,r,d,h)=>{typeof r=="string"&&(h=d,d=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,d,h).version}catch{return null}},nf}var rf,Ub;function GL(){if(Ub)return rf;Ub=1;const n=Ms();return rf=(t,e)=>{const r=n(t,null,!0),d=n(e,null,!0),h=r.compare(d);if(h===0)return null;const p=h>0,v=p?r:d,s=p?d:r,f=!!v.prerelease.length;if(s.prerelease.length&&!f){if(!s.patch&&!s.minor)return"major";if(s.compareMain(v)===0)return s.minor&&!s.patch?"minor":"patch"}const i=f?"pre":"";return r.major!==d.major?i+"major":r.minor!==d.minor?i+"minor":r.patch!==d.patch?i+"patch":"prerelease"},rf}var of,Vb;function qL(){if(Vb)return of;Vb=1;const n=Nr();return of=(t,e)=>new n(t,e).major,of}var sf,Gb;function KL(){if(Gb)return sf;Gb=1;const n=Nr();return sf=(t,e)=>new n(t,e).minor,sf}var af,qb;function YL(){if(qb)return af;qb=1;const n=Nr();return af=(t,e)=>new n(t,e).patch,af}var lf,Kb;function XL(){if(Kb)return lf;Kb=1;const n=Ms();return lf=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null},lf}var cf,Yb;function eo(){if(Yb)return cf;Yb=1;const n=Nr();return cf=(t,e,r)=>new n(t,r).compare(new n(e,r)),cf}var uf,Xb;function JL(){if(Xb)return uf;Xb=1;const n=eo();return uf=(t,e,r)=>n(e,t,r),uf}var hf,Jb;function ZL(){if(Jb)return hf;Jb=1;const n=eo();return hf=(t,e)=>n(t,e,!0),hf}var df,Zb;function ff(){if(Zb)return df;Zb=1;const n=Nr();return df=(t,e,r)=>{const d=new n(t,r),h=new n(e,r);return d.compare(h)||d.compareBuild(h)},df}var pf,Qb;function QL(){if(Qb)return pf;Qb=1;const n=ff();return pf=(t,e)=>t.sort((r,d)=>n(r,d,e)),pf}var gf,ew;function eI(){if(ew)return gf;ew=1;const n=ff();return gf=(t,e)=>t.sort((r,d)=>n(d,r,e)),gf}var mf,tw;function Hc(){if(tw)return mf;tw=1;const n=eo();return mf=(t,e,r)=>n(t,e,r)>0,mf}var vf,nw;function yf(){if(nw)return vf;nw=1;const n=eo();return vf=(t,e,r)=>n(t,e,r)<0,vf}var bf,rw;function iw(){if(rw)return bf;rw=1;const n=eo();return bf=(t,e,r)=>n(t,e,r)===0,bf}var wf,ow;function sw(){if(ow)return wf;ow=1;const n=eo();return wf=(t,e,r)=>n(t,e,r)!==0,wf}var xf,aw;function Cf(){if(aw)return xf;aw=1;const n=eo();return xf=(t,e,r)=>n(t,e,r)>=0,xf}var _f,lw;function kf(){if(lw)return _f;lw=1;const n=eo();return _f=(t,e,r)=>n(t,e,r)<=0,_f}var Af,cw;function uw(){if(cw)return Af;cw=1;const n=iw(),t=sw(),e=Hc(),r=Cf(),d=yf(),h=kf();return Af=(p,v,s,f)=>{switch(v){case"===":return typeof p=="object"&&(p=p.version),typeof s=="object"&&(s=s.version),p===s;case"!==":return typeof p=="object"&&(p=p.version),typeof s=="object"&&(s=s.version),p!==s;case"":case"=":case"==":return n(p,s,f);case"!=":return t(p,s,f);case">":return e(p,s,f);case">=":return r(p,s,f);case"<":return d(p,s,f);case"<=":return h(p,s,f);default:throw new TypeError(`Invalid operator: ${v}`)}},Af}var Sf,hw;function tI(){if(hw)return Sf;hw=1;const n=Nr(),t=Ms(),{safeRe:e,t:r}=yl();return Sf=(d,h)=>{if(d instanceof n)return d;if(typeof d=="number"&&(d=String(d)),typeof d!="string")return null;h=h||{};let p=null;if(!h.rtl)p=d.match(h.includePrerelease?e[r.COERCEFULL]:e[r.COERCE]);else{const u=h.includePrerelease?e[r.COERCERTLFULL]:e[r.COERCERTL];let g;for(;(g=u.exec(d))&&(!p||p.index+p[0].length!==d.length);)(!p||g.index+g[0].length!==p.index+p[0].length)&&(p=g),u.lastIndex=g.index+g[1].length+g[2].length;u.lastIndex=-1}if(p===null)return null;const v=p[2],s=p[3]||"0",f=p[4]||"0",i=h.includePrerelease&&p[5]?`-${p[5]}`:"",a=h.includePrerelease&&p[6]?`+${p[6]}`:"";return t(`${v}.${s}.${f}${i}${a}`,h)},Sf}var $f,dw;function nI(){if(dw)return $f;dw=1;const n=Ms(),t=vl(),e=Nr(),r=(v,s,f)=>{if(!t.RELEASE_TYPES.includes(s))return null;const i=d(v,f);return i&&h(i,s)},d=(v,s)=>{const f=v instanceof e?v.version:v;return n(f,s)},h=(v,s)=>{if(p(s))return v.version;switch(v.prerelease=[],s){case"major":v.minor=0,v.patch=0;break;case"minor":v.patch=0;break}return v.format()},p=v=>v.startsWith("pre");return $f=r,$f}var Ef,fw;function rI(){if(fw)return Ef;fw=1;class n{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const d=this.map.keys().next().value;this.delete(d)}this.map.set(e,r)}return this}}return Ef=n,Ef}var Rf,pw;function to(){if(pw)return Rf;pw=1;const n=/\s+/g;class t{constructor(_,L){if(L=d(L),_ instanceof t)return _.loose===!!L.loose&&_.includePrerelease===!!L.includePrerelease?_:new t(_.raw,L);if(_ instanceof h)return this.raw=_.value,this.set=[[_]],this.formatted=void 0,this;if(this.options=L,this.loose=!!L.loose,this.includePrerelease=!!L.includePrerelease,this.raw=_.trim().replace(n," "),this.set=this.raw.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(U=>!c(U[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const U of this.set)if(U.length===1&&m(U[0])){this.set=[U];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let _=0;_<this.set.length;_++){_>0&&(this.formatted+="||");const L=this.set[_];for(let B=0;B<L.length;B++)B>0&&(this.formatted+=" "),this.formatted+=L[B].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(_){const L=((this.options.includePrerelease&&g)|(this.options.loose&&o))+":"+_,B=r.get(L);if(B)return B;const U=this.options.loose,V=U?s[f.HYPHENRANGELOOSE]:s[f.HYPHENRANGE];_=_.replace(V,F(this.options.includePrerelease)),p("hyphen replace",_),_=_.replace(s[f.COMPARATORTRIM],i),p("comparator trim",_),_=_.replace(s[f.TILDETRIM],a),p("tilde trim",_),_=_.replace(s[f.CARETTRIM],u),p("caret trim",_);let K=_.split(" ").map(oe=>x(oe,this.options)).join(" ").split(/\s+/).map(oe=>W(oe,this.options));U&&(K=K.filter(oe=>(p("loose invalid filter",oe,this.options),!!oe.match(s[f.COMPARATORLOOSE])))),p("range list",K);const ee=new Map,ae=K.map(oe=>new h(oe,this.options));for(const oe of ae){if(c(oe))return[oe];ee.set(oe.value,oe)}ee.size>1&&ee.has("")&&ee.delete("");const Q=[...ee.values()];return r.set(L,Q),Q}intersects(_,L){if(!(_ instanceof t))throw new TypeError("a Range is required");return this.set.some(B=>w(B,L)&&_.set.some(U=>w(U,L)&&B.every(V=>U.every(K=>V.intersects(K,L)))))}test(_){if(!_)return!1;if(typeof _=="string")try{_=new v(_,this.options)}catch{return!1}for(let L=0;L<this.set.length;L++)if(D(this.set[L],_,this.options))return!0;return!1}}Rf=t;const e=rI(),r=new e,d=Xd(),h=Uc(),p=jc(),v=Nr(),{safeRe:s,t:f,comparatorTrimReplace:i,tildeTrimReplace:a,caretTrimReplace:u}=yl(),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:o}=vl(),c=A=>A.value==="<0.0.0-0",m=A=>A.value==="",w=(A,_)=>{let L=!0;const B=A.slice();let U=B.pop();for(;L&&B.length;)L=B.every(V=>U.intersects(V,_)),U=B.pop();return L},x=(A,_)=>(A=A.replace(s[f.BUILD],""),p("comp",A,_),A=C(A,_),p("caret",A),A=$(A,_),p("tildes",A),A=N(A,_),p("xrange",A),A=M(A,_),p("stars",A),A),R=A=>!A||A.toLowerCase()==="x"||A==="*",$=(A,_)=>A.trim().split(/\s+/).map(L=>k(L,_)).join(" "),k=(A,_)=>{const L=_.loose?s[f.TILDELOOSE]:s[f.TILDE];return A.replace(L,(B,U,V,K,ee)=>{p("tilde",A,B,U,V,K,ee);let ae;return R(U)?ae="":R(V)?ae=`>=${U}.0.0 <${+U+1}.0.0-0`:R(K)?ae=`>=${U}.${V}.0 <${U}.${+V+1}.0-0`:ee?(p("replaceTilde pr",ee),ae=`>=${U}.${V}.${K}-${ee} <${U}.${+V+1}.0-0`):ae=`>=${U}.${V}.${K} <${U}.${+V+1}.0-0`,p("tilde return",ae),ae})},C=(A,_)=>A.trim().split(/\s+/).map(L=>O(L,_)).join(" "),O=(A,_)=>{p("caret",A,_);const L=_.loose?s[f.CARETLOOSE]:s[f.CARET],B=_.includePrerelease?"-0":"";return A.replace(L,(U,V,K,ee,ae)=>{p("caret",A,U,V,K,ee,ae);let Q;return R(V)?Q="":R(K)?Q=`>=${V}.0.0${B} <${+V+1}.0.0-0`:R(ee)?V==="0"?Q=`>=${V}.${K}.0${B} <${V}.${+K+1}.0-0`:Q=`>=${V}.${K}.0${B} <${+V+1}.0.0-0`:ae?(p("replaceCaret pr",ae),V==="0"?K==="0"?Q=`>=${V}.${K}.${ee}-${ae} <${V}.${K}.${+ee+1}-0`:Q=`>=${V}.${K}.${ee}-${ae} <${V}.${+K+1}.0-0`:Q=`>=${V}.${K}.${ee}-${ae} <${+V+1}.0.0-0`):(p("no pr"),V==="0"?K==="0"?Q=`>=${V}.${K}.${ee}${B} <${V}.${K}.${+ee+1}-0`:Q=`>=${V}.${K}.${ee}${B} <${V}.${+K+1}.0-0`:Q=`>=${V}.${K}.${ee} <${+V+1}.0.0-0`),p("caret return",Q),Q})},N=(A,_)=>(p("replaceXRanges",A,_),A.split(/\s+/).map(L=>I(L,_)).join(" ")),I=(A,_)=>{A=A.trim();const L=_.loose?s[f.XRANGELOOSE]:s[f.XRANGE];return A.replace(L,(B,U,V,K,ee,ae)=>{p("xRange",A,B,U,V,K,ee,ae);const Q=R(V),oe=Q||R(K),se=oe||R(ee),ue=se;return U==="="&&ue&&(U=""),ae=_.includePrerelease?"-0":"",Q?U===">"||U==="<"?B="<0.0.0-0":B="*":U&&ue?(oe&&(K=0),ee=0,U===">"?(U=">=",oe?(V=+V+1,K=0,ee=0):(K=+K+1,ee=0)):U==="<="&&(U="<",oe?V=+V+1:K=+K+1),U==="<"&&(ae="-0"),B=`${U+V}.${K}.${ee}${ae}`):oe?B=`>=${V}.0.0${ae} <${+V+1}.0.0-0`:se&&(B=`>=${V}.${K}.0${ae} <${V}.${+K+1}.0-0`),p("xRange return",B),B})},M=(A,_)=>(p("replaceStars",A,_),A.trim().replace(s[f.STAR],"")),W=(A,_)=>(p("replaceGTE0",A,_),A.trim().replace(s[_.includePrerelease?f.GTE0PRE:f.GTE0],"")),F=A=>(_,L,B,U,V,K,ee,ae,Q,oe,se,ue)=>(R(B)?L="":R(U)?L=`>=${B}.0.0${A?"-0":""}`:R(V)?L=`>=${B}.${U}.0${A?"-0":""}`:K?L=`>=${L}`:L=`>=${L}${A?"-0":""}`,R(Q)?ae="":R(oe)?ae=`<${+Q+1}.0.0-0`:R(se)?ae=`<${Q}.${+oe+1}.0-0`:ue?ae=`<=${Q}.${oe}.${se}-${ue}`:A?ae=`<${Q}.${oe}.${+se+1}-0`:ae=`<=${ae}`,`${L} ${ae}`.trim()),D=(A,_,L)=>{for(let B=0;B<A.length;B++)if(!A[B].test(_))return!1;if(_.prerelease.length&&!L.includePrerelease){for(let B=0;B<A.length;B++)if(p(A[B].semver),A[B].semver!==h.ANY&&A[B].semver.prerelease.length>0){const U=A[B].semver;if(U.major===_.major&&U.minor===_.minor&&U.patch===_.patch)return!0}return!1}return!0};return Rf}var Tf,gw;function Uc(){if(gw)return Tf;gw=1;const n=Symbol("SemVer ANY");class t{static get ANY(){return n}constructor(i,a){if(a=e(a),i instanceof t){if(i.loose===!!a.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),p("comparator",i,a),this.options=a,this.loose=!!a.loose,this.parse(i),this.semver===n?this.value="":this.value=this.operator+this.semver.version,p("comp",this)}parse(i){const a=this.options.loose?r[d.COMPARATORLOOSE]:r[d.COMPARATOR],u=i.match(a);if(!u)throw new TypeError(`Invalid comparator: ${i}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new v(u[2],this.options.loose):this.semver=n}toString(){return this.value}test(i){if(p("Comparator.test",i,this.options.loose),this.semver===n||i===n)return!0;if(typeof i=="string")try{i=new v(i,this.options)}catch{return!1}return h(i,this.operator,this.semver,this.options)}intersects(i,a){if(!(i instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new s(i.value,a).test(this.value):i.operator===""?i.value===""?!0:new s(this.value,a).test(i.semver):(a=e(a),a.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!a.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||h(this.semver,"<",i.semver,a)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||h(this.semver,">",i.semver,a)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}}Tf=t;const e=Xd(),{safeRe:r,t:d}=yl(),h=uw(),p=jc(),v=Nr(),s=to();return Tf}var Mf,mw;function Vc(){if(mw)return Mf;mw=1;const n=to();return Mf=(t,e,r)=>{try{e=new n(e,r)}catch{return!1}return e.test(t)},Mf}var Lf,vw;function iI(){if(vw)return Lf;vw=1;const n=to();return Lf=(t,e)=>new n(t,e).set.map(r=>r.map(d=>d.value).join(" ").trim().split(" ")),Lf}var If,yw;function oI(){if(yw)return If;yw=1;const n=Nr(),t=to();return If=(e,r,d)=>{let h=null,p=null,v=null;try{v=new t(r,d)}catch{return null}return e.forEach(s=>{v.test(s)&&(!h||p.compare(s)===-1)&&(h=s,p=new n(h,d))}),h},If}var Of,bw;function sI(){if(bw)return Of;bw=1;const n=Nr(),t=to();return Of=(e,r,d)=>{let h=null,p=null,v=null;try{v=new t(r,d)}catch{return null}return e.forEach(s=>{v.test(s)&&(!h||p.compare(s)===1)&&(h=s,p=new n(h,d))}),h},Of}var Nf,ww;function aI(){if(ww)return Nf;ww=1;const n=Nr(),t=to(),e=Hc();return Nf=(r,d)=>{r=new t(r,d);let h=new n("0.0.0");if(r.test(h)||(h=new n("0.0.0-0"),r.test(h)))return h;h=null;for(let p=0;p<r.set.length;++p){const v=r.set[p];let s=null;v.forEach(f=>{const i=new n(f.semver.version);switch(f.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!s||e(i,s))&&(s=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${f.operator}`)}}),s&&(!h||e(h,s))&&(h=s)}return h&&r.test(h)?h:null},Nf}var Df,xw;function lI(){if(xw)return Df;xw=1;const n=to();return Df=(t,e)=>{try{return new n(t,e).range||"*"}catch{return null}},Df}var Pf,Cw;function Ff(){if(Cw)return Pf;Cw=1;const n=Nr(),t=Uc(),{ANY:e}=t,r=to(),d=Vc(),h=Hc(),p=yf(),v=kf(),s=Cf();return Pf=(f,i,a,u)=>{f=new n(f,u),i=new r(i,u);let g,o,c,m,w;switch(a){case">":g=h,o=v,c=p,m=">",w=">=";break;case"<":g=p,o=s,c=h,m="<",w="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(f,i,u))return!1;for(let x=0;x<i.set.length;++x){const R=i.set[x];let $=null,k=null;if(R.forEach(C=>{C.semver===e&&(C=new t(">=0.0.0")),$=$||C,k=k||C,g(C.semver,$.semver,u)?$=C:c(C.semver,k.semver,u)&&(k=C)}),$.operator===m||$.operator===w||(!k.operator||k.operator===m)&&o(f,k.semver)||k.operator===w&&c(f,k.semver))return!1}return!0},Pf}var zf,_w;function cI(){if(_w)return zf;_w=1;const n=Ff();return zf=(t,e,r)=>n(t,e,">",r),zf}var Bf,kw;function uI(){if(kw)return Bf;kw=1;const n=Ff();return Bf=(t,e,r)=>n(t,e,"<",r),Bf}var Wf,Aw;function hI(){if(Aw)return Wf;Aw=1;const n=to();return Wf=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r)),Wf}var jf,Sw;function dI(){if(Sw)return jf;Sw=1;const n=Vc(),t=eo();return jf=(e,r,d)=>{const h=[];let p=null,v=null;const s=e.sort((u,g)=>t(u,g,d));for(const u of s)n(u,r,d)?(v=u,p||(p=u)):(v&&h.push([p,v]),v=null,p=null);p&&h.push([p,null]);const f=[];for(const[u,g]of h)u===g?f.push(u):!g&&u===s[0]?f.push("*"):g?u===s[0]?f.push(`<=${g}`):f.push(`${u} - ${g}`):f.push(`>=${u}`);const i=f.join(" || "),a=typeof r.raw=="string"?r.raw:String(r);return i.length<a.length?i:r},jf}var Hf,$w;function fI(){if($w)return Hf;$w=1;const n=to(),t=Uc(),{ANY:e}=t,r=Vc(),d=eo(),h=(a,u,g={})=>{if(a===u)return!0;a=new n(a,g),u=new n(u,g);let o=!1;e:for(const c of a.set){for(const m of u.set){const w=s(c,m,g);if(o=o||w!==null,w)continue e}if(o)return!1}return!0},p=[new t(">=0.0.0-0")],v=[new t(">=0.0.0")],s=(a,u,g)=>{if(a===u)return!0;if(a.length===1&&a[0].semver===e){if(u.length===1&&u[0].semver===e)return!0;g.includePrerelease?a=p:a=v}if(u.length===1&&u[0].semver===e){if(g.includePrerelease)return!0;u=v}const o=new Set;let c,m;for(const N of a)N.operator===">"||N.operator===">="?c=f(c,N,g):N.operator==="<"||N.operator==="<="?m=i(m,N,g):o.add(N.semver);if(o.size>1)return null;let w;if(c&&m&&(w=d(c.semver,m.semver,g),w>0||w===0&&(c.operator!==">="||m.operator!=="<=")))return null;for(const N of o){if(c&&!r(N,String(c),g)||m&&!r(N,String(m),g))return null;for(const I of u)if(!r(N,String(I),g))return!1;return!0}let x,R,$,k,C=m&&!g.includePrerelease&&m.semver.prerelease.length?m.semver:!1,O=c&&!g.includePrerelease&&c.semver.prerelease.length?c.semver:!1;C&&C.prerelease.length===1&&m.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const N of u){if(k=k||N.operator===">"||N.operator===">=",$=$||N.operator==="<"||N.operator==="<=",c){if(O&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===O.major&&N.semver.minor===O.minor&&N.semver.patch===O.patch&&(O=!1),N.operator===">"||N.operator===">="){if(x=f(c,N,g),x===N&&x!==c)return!1}else if(c.operator===">="&&!r(c.semver,String(N),g))return!1}if(m){if(C&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===C.major&&N.semver.minor===C.minor&&N.semver.patch===C.patch&&(C=!1),N.operator==="<"||N.operator==="<="){if(R=i(m,N,g),R===N&&R!==m)return!1}else if(m.operator==="<="&&!r(m.semver,String(N),g))return!1}if(!N.operator&&(m||c)&&w!==0)return!1}return!(c&&$&&!m&&w!==0||m&&k&&!c&&w!==0||O||C)},f=(a,u,g)=>{if(!a)return u;const o=d(a.semver,u.semver,g);return o>0?a:o<0||u.operator===">"&&a.operator===">="?u:a},i=(a,u,g)=>{if(!a)return u;const o=d(a.semver,u.semver,g);return o<0?a:o>0||u.operator==="<"&&a.operator==="<="?u:a};return Hf=h,Hf}var Uf,Ew;function pI(){if(Ew)return Uf;Ew=1;const n=yl(),t=vl(),e=Nr(),r=Fb(),d=Ms(),h=HL(),p=UL(),v=VL(),s=GL(),f=qL(),i=KL(),a=YL(),u=XL(),g=eo(),o=JL(),c=ZL(),m=ff(),w=QL(),x=eI(),R=Hc(),$=yf(),k=iw(),C=sw(),O=Cf(),N=kf(),I=uw(),M=tI(),W=nI(),F=Uc(),D=to(),A=Vc(),_=iI(),L=oI(),B=sI(),U=aI(),V=lI(),K=Ff(),ee=cI(),ae=uI(),Q=hI(),oe=dI(),se=fI();return Uf={parse:d,valid:h,clean:p,inc:v,diff:s,major:f,minor:i,patch:a,prerelease:u,compare:g,rcompare:o,compareLoose:c,compareBuild:m,sort:w,rsort:x,gt:R,lt:$,eq:k,neq:C,gte:O,lte:N,cmp:I,coerce:M,truncate:W,Comparator:F,Range:D,satisfies:A,toComparators:_,maxSatisfying:L,minSatisfying:B,minVersion:U,validRange:V,outside:K,gtr:ee,ltr:ae,intersects:Q,simplifyRange:oe,subset:se,SemVer:e,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},Uf}var gI=Tn("o",pI());const mI={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1,default:null},storePluginId:{type:Number,required:!1,default:null},storeVersionId:{type:Number,required:!1,default:null},minCosmosVersion:{type:String,required:!1,default:void 0},modelValue:Boolean},emits:["callback","update:modelValue"],data(){return{installedCosmosVersion:null,tab:0,localVariables:{},localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{value:{immediate:!0,handler:function(){const n=JSON.parse(JSON.stringify(this.variables));this.localVariables={};for(const[t,e]of Object.entries(n))typeof e=="string"?this.localVariables[t]={value:e}:this.localVariables[t]=e;this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},created(){Ju.get("/openc3-api/info").then(({data:n})=>{this.installedCosmosVersion=n.version})},mounted(){const n=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ys.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new n),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.localPluginTxt),this.editor.clearSelection(),xc.applyVimModeIfEnabled(this.editor),this.editor.session.$undoManager.markClean(),this.editor.focus()):(this.tab=1,this.differ=new jL({element:this.$refs.editor,mode:new n,theme:"ace/theme/twilight",left:{content:this.localExistingPluginTxt,copyLinkEnabled:!1},right:{content:this.localPluginTxt,editable:!1}}),this.differ.getEditors().left.setFontSize(16),this.differ.getEditors().right.setFontSize(16),xc.applyVimModeIfEnabled(this.differ.getEditors().left),xc.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},methods:{previousDiff(){this.curDiff--,this.curDiff<0&&(this.curDiff=this.differ.diffs.length-1),this.scrollToCurDiff()},nextDiff(){this.curDiff++,this.curDiff>=this.differ.diffs.length&&(this.curDiff=0),this.scrollToCurDiff()},scrollToCurDiff(){if(this.differ.diffs.length===0)return;let n=this.differ.diffs[this.curDiff].leftStartLine,t=this.differ.diffs[this.curDiff].rightStartLine;n>5&&(n-=5),t>5&&(t-=5),this.differ.getEditors().left.scrollToLine(n),this.differ.getEditors().right.scrollToLine(t)},buildPluginMode(){let n=ys.require("ace/lib/oop"),t=ys.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,e=["VARIABLE","VARIABLE_DESCRIPTION","VARIABLE_STATE"],r=new RegExp(`(\\b${e.join("\\b|\\b")}\\b)`),d=function(){t.call(this);for(let i in this.$rules)this.$rules[i].unshift({regex:r,token:"support.function"})};n.inherits(d,t);let h=ys.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,p=ys.require("ace/mode/behaviour/cstyle").CstyleBehaviour,v=ys.require("ace/mode/folding/ruby").FoldMode,s=function(){this.HighlightRules=d,this.$outdent=new h,this.$behaviour=new p,this.foldingRules=new v,this.indentKeywords=this.foldingRules.indentKeywords},f=ys.require("ace/mode/ruby").Mode;return n.inherits(s,f),(function(){this.$id="ace/mode/openc3"}).call(s.prototype),s},checkVersionAndSubmit:function(){!this.installedCosmosVersion||!this.minCosmosVersion||gI.gte(this.installedCosmosVersion,this.minCosmosVersion)?this.submit():this.$dialog.confirm(`This plugin requires a minimum COSMOS version of ${this.minCosmosVersion}, which is greater than your installed version (${this.installedCosmosVersion}). Install anyway?`,{okText:"Install",cancelText:"Cancel"}).then(n=>{this.submit()}).catch(n=>{this.close()})},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
1491
- `)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1492
- `)):this.$dialog.confirm("Diffs still detected! Install using 'Existing plugin.txt' (left) and ignore additional changes in the new plugin.txt (right)?",{okText:"Install",cancelText:"Cancel"}).then(n=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1493
- `))}).catch(n=>{})},emitSubmit(n){let t={name:this.pluginName,variables:Qp(this.localVariables),plugin_txt_lines:n,store_plugin_id:this.storePluginId,store_version_id:this.storeVersionId};this.$emit("callback",t)},close:function(){this.show=!this.show},handleEsc:function(){this.editor.session.$undoManager.isClean()?this.close():this.$dialog.confirm("You have unsaved changes. Are you sure you want to close?",{okText:"Close without saving",cancelText:"Cancel"}).then(()=>{this.close()}).catch(()=>{this.editor?.focus()})},showContextMenu:function(n){this.menuX=n.pageX,this.menuY=n.pageY;let t=this.editor.getCursorPosition(),e=this.editor.session.getTokenAt(t.row,t.column);if(e){let r=e.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&xc.toggleVimMode(this.editor)},hasOptions(n){return n.options&&n.options.length>0},getDescription(n){return n.description||""},getOptionItems(n){return n.options?n.options.map(t=>({text:t.text||t.value,value:t.value})):[]}}},vI={key:0,class:"text-body-1 text-medium-emphasis pa-3"},yI={ref:"editor",class:"editor"},bI={key:0};function wI(n,t,e,r,d,h){const p=Ue("v-card-title"),v=Ue("v-alert"),s=Ue("v-tab"),f=Ue("v-tabs"),i=Ue("v-list-item"),a=Ue("v-combobox"),u=Ue("v-text-field"),g=Ue("v-col"),o=Ue("v-row"),c=Ue("v-window-item"),m=Ue("v-list-item-title"),w=Ue("v-divider"),x=Ue("v-list"),R=Ue("v-menu"),$=Ue("v-window"),k=Ue("v-btn"),C=Ue("v-spacer"),O=Ue("v-card-actions"),N=Ue("v-card-text"),I=Ue("v-card"),M=Ue("v-dialog");return rt(),Pt(M,{modelValue:h.show,"onUpdate:modelValue":t[5]||(t[5]=W=>h.show=W),persistent:"",width:"80vw",onKeydown:zl(Qs(h.handleEsc,["stop"]),["esc"])},{default:ze(()=>[We(I,null,{default:ze(()=>[We(p,null,{default:ze(()=>[It(gn(e.pluginName),1)]),_:1}),We(N,{class:"pt-0"},{default:ze(()=>[e.existingPluginTxt!==null?(rt(),Pt(v,{key:0,type:"warning",variant:"tonal",class:"mb-3"},{default:ze(()=>[It(" The existing plugin.txt is different from the "+gn(e.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+gn(e.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Ur("",!0),We(f,{modelValue:d.tab,"onUpdate:modelValue":t[0]||(t[0]=W=>d.tab=W),class:"mb-3"},{default:ze(()=>[(rt(),Pt(s,{key:0},{default:ze(()=>[...t[6]||(t[6]=[It(" Variables ",-1)])]),_:1})),(rt(),Pt(s,{key:1},{default:ze(()=>[...t[7]||(t[7]=[It(" plugin.txt ",-1)])]),_:1}))]),_:1},8,["modelValue"]),qn("form",{onSubmit:t[4]||(t[4]=Qs((...W)=>n.onSubmit&&n.onSubmit(...W),["prevent"]))},[We($,{modelValue:d.tab,"onUpdate:modelValue":t[3]||(t[3]=W=>d.tab=W)},{default:ze(()=>[We(c,{value:0,eager:"true",class:"tab"},{default:ze(()=>[Object.keys(d.localVariables).length===0?(rt(),nn("div",vI," No variables defined for this plugin. ")):(rt(),Pt(o,{key:1,class:"pt-2"},{default:ze(()=>[(rt(!0),nn(si,null,ho(d.localVariables,(W,F)=>(rt(),Pt(g,{key:F,cols:"12",sm:"6",md:"3"},{default:ze(()=>[h.hasOptions(W)?(rt(),Pt(a,{key:0,modelValue:W.value,"onUpdate:modelValue":D=>W.value=D,items:h.getOptionItems(W),"item-title":"text","item-value":"value","return-object":!1,label:F,hint:h.getDescription(W),"persistent-hint":"",density:"comfortable",variant:"outlined","data-test":"variable-combobox"},{item:ze(({item:D,props:A})=>[We(i,ja({ref_for:!0},A),{title:ze(()=>[It(gn(D.raw.text),1)]),_:2},1040)]),_:1},8,["modelValue","onUpdate:modelValue","items","label","hint"])):(rt(),Pt(u,{key:1,modelValue:W.value,"onUpdate:modelValue":D=>W.value=D,label:F,hint:h.getDescription(W),"persistent-hint":"",clearable:"",density:"comfortable",variant:"outlined","data-test":"variable-text"},null,8,["modelValue","onUpdate:modelValue","label","hint"]))]),_:2},1024))),128))]),_:1}))]),_:1}),e.existingPluginTxt===null?(rt(),Pt(c,{key:0,value:1,eager:"true",class:"tab"},{default:ze(()=>[We(o,{class:"pa-3"},{default:ze(()=>[We(g,null,{default:ze(()=>[...t[8]||(t[8]=[It(" This can be edited before installation. ",-1)])]),_:1})]),_:1}),qn("pre",{ref:"editor",class:"editor",onContextmenu:t[1]||(t[1]=Qs((...W)=>h.showContextMenu&&h.showContextMenu(...W),["prevent"]))},null,544),We(R,{modelValue:d.contextMenu,"onUpdate:modelValue":t[2]||(t[2]=W=>d.contextMenu=W),target:[d.menuX,d.menuY]},{default:ze(()=>[We(x,null,{default:ze(()=>[We(i,{link:""},{default:ze(()=>[We(m,{onClick:n.openDocumentation},{default:ze(()=>[It(gn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(w),We(i,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:h.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(rt(),Pt(c,{key:1,value:1,eager:"true",class:"tab"},{default:ze(()=>[We(o,{class:"pa-3"},{default:ze(()=>[We(g,null,{default:ze(()=>[...t[9]||(t[9]=[It(" Existing plugin.txt. This can be edited before installation. ",-1)])]),_:1}),We(g,{class:"ml-6"},{default:ze(()=>[...t[10]||(t[10]=[It(" Uneditable plugin.txt from the new plugin. ",-1)])]),_:1})]),_:1}),qn("pre",yI,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(O,{class:"px-2 mt-2"},{default:ze(()=>[e.existingPluginTxt!==null?(rt(),nn("div",bI,[We(k,{variant:"text",onClick:h.nextDiff},{default:ze(()=>[...t[11]||(t[11]=[It(" Next Diff ",-1)])]),_:1},8,["onClick"]),We(k,{variant:"text",onClick:h.previousDiff},{default:ze(()=>[...t[12]||(t[12]=[It(" Previous Diff ",-1)])]),_:1},8,["onClick"])])):Ur("",!0),We(C),We(k,{variant:"outlined","data-test":"edit-cancel",onClick:Qs(h.close,["prevent"])},{default:ze(()=>[...t[13]||(t[13]=[It(" Cancel ",-1)])]),_:1},8,["onClick"]),We(k,{variant:"flat","data-test":"edit-submit",onClick:h.checkVersionAndSubmit},{default:ze(()=>[...t[14]||(t[14]=[It(" Install ",-1)])]),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const yB=Tn("C",qi(mI,[["render",wI],["__scopeId","data-v-1bfc6e55"]])),xI=jd.find(n=>n.name==="PluginsTab"),Rw=[{path:"/",component:pL,children:[{component:xI.component,path:""},...jd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:nL}];Rw.forEach(n=>mg(n));const CI=ug({history:hg(),routes:Rw}),{entries:Tw,setPrototypeOf:Mw,isFrozen:_I,getPrototypeOf:kI,getOwnPropertyDescriptor:AI}=Object;let{freeze:Xr,seal:Di,create:Aa}=Object,{apply:Vf,construct:Gf}=typeof Reflect<"u"&&Reflect;Xr||(Xr=function(n){return n}),Di||(Di=function(n){return n}),Vf||(Vf=function(n,t){for(var e=arguments.length,r=new Array(e>2?e-2:0),d=2;d<e;d++)r[d-2]=arguments[d];return n.apply(t,r)}),Gf||(Gf=function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return new n(...e)});const bl=tr(Array.prototype.forEach),SI=tr(Array.prototype.lastIndexOf),Lw=tr(Array.prototype.pop),wl=tr(Array.prototype.push),$I=tr(Array.prototype.splice),Jr=Array.isArray,xl=tr(String.prototype.toLowerCase),qf=tr(String.prototype.toString),Iw=tr(String.prototype.match),Sa=tr(String.prototype.replace),Ow=tr(String.prototype.indexOf),EI=tr(String.prototype.trim),RI=tr(Number.prototype.toString),TI=tr(Boolean.prototype.toString),Nw=typeof BigInt>"u"?null:tr(BigInt.prototype.toString),Dw=typeof Symbol>"u"?null:tr(Symbol.prototype.toString),jn=tr(Object.prototype.hasOwnProperty),Cl=tr(Object.prototype.toString),Cr=tr(RegExp.prototype.test),Gc=MI(TypeError);function tr(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),d=1;d<e;d++)r[d-1]=arguments[d];return Vf(n,t,r)}}function MI(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Gf(n,e)}}function Ot(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xl;if(Mw&&Mw(n,null),!Jr(t))return n;let r=t.length;for(;r--;){let d=t[r];if(typeof d=="string"){const h=e(d);h!==d&&(_I(t)||(t[r]=h),d=h)}n[d]=!0}return n}function LI(n){for(let t=0;t<n.length;t++)jn(n,t)||(n[t]=null);return n}function ci(n){const t=Aa(null);for(const[e,r]of Tw(n))jn(n,e)&&(Jr(r)?t[e]=LI(r):r&&typeof r=="object"&&r.constructor===Object?t[e]=ci(r):t[e]=r);return t}function II(n){switch(typeof n){case"string":return n;case"number":return RI(n);case"boolean":return TI(n);case"bigint":return Nw?Nw(n):"0";case"symbol":return Dw?Dw(n):"Symbol()";case"undefined":return Cl(n);case"function":case"object":{if(n===null)return Cl(n);const t=n,e=$a(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:Cl(r)}return Cl(n)}default:return Cl(n)}}function $a(n,t){for(;n!==null;){const r=AI(n,t);if(r){if(r.get)return tr(r.get);if(typeof r.value=="function")return tr(r.value)}n=kI(n)}function e(){return null}return e}function OI(n){try{return Cr(n,""),!0}catch{return!1}}const Pw=Xr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Kf=Xr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yf=Xr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),NI=Xr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Xf=Xr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),DI=Xr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fw=Xr(["#text"]),zw=Xr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Jf=Xr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Bw=Xr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),qc=Xr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PI=Di(/\{\{[\w\W]*|[\w\W]*\}\}/gm),FI=Di(/<%[\w\W]*|[\w\W]*%>/gm),zI=Di(/\$\{[\w\W]*/gm),BI=Di(/^data-[\-\w.\u00B7-\uFFFF]+$/),WI=Di(/^aria-[\-\w]+$/),Ww=Di(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jI=Di(/^(?:\w+script|data):/i),HI=Di(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jw=Di(/^html$/i),UI=Di(/^[a-z][.\w]*(-[.\w]+)+$/i);var Hw=Object.freeze({__proto__:null,ARIA_ATTR:WI,ATTR_WHITESPACE:HI,CUSTOM_ELEMENT:UI,DATA_ATTR:BI,DOCTYPE_NAME:jw,ERB_EXPR:FI,IS_ALLOWED_URI:Ww,IS_SCRIPT_OR_DATA:jI,MUSTACHE_EXPR:PI,TMPLIT_EXPR:zI});const _l={element:1,text:3,progressingInstruction:7,comment:8,document:9},VI=function(){return typeof window>"u"?null:window},GI=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const d="dompurify"+(e?"#"+e:"");try{return n.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},Uw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Vw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VI();const t=le=>Vw(le);if(t.version="3.4.2",t.removed=[],!n||!n.document||n.document.nodeType!==_l.document||!n.Element)return t.isSupported=!1,t;let{document:e}=n;const r=e,d=r.currentScript,{DocumentFragment:h,HTMLTemplateElement:p,Node:v,Element:s,NodeFilter:f,NamedNodeMap:i=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:a,DOMParser:u,trustedTypes:g}=n,o=s.prototype,c=$a(o,"cloneNode"),m=$a(o,"remove"),w=$a(o,"nextSibling"),x=$a(o,"childNodes"),R=$a(o,"parentNode");if(typeof p=="function"){const le=e.createElement("template");le.content&&le.content.ownerDocument&&(e=le.content.ownerDocument)}let $,k="";const{implementation:C,createNodeIterator:O,createDocumentFragment:N,getElementsByTagName:I}=e,{importNode:M}=r;let W=Uw();t.isSupported=typeof Tw=="function"&&typeof R=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:D,TMPLIT_EXPR:A,DATA_ATTR:_,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:V}=Hw;let{IS_ALLOWED_URI:K}=Hw,ee=null;const ae=Ot({},[...Pw,...Kf,...Yf,...Xf,...Fw]);let Q=null;const oe=Ot({},[...zw,...Jf,...Bw,...qc]);let se=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,pe=null;const ve=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $e=!0,Re=!0,Ye=!1,Ge=!0,at=!1,it=!0,ut=!1,Ht=!1,_r=!1,Rt=!1,cr=!1,Mn=!1,kr=!0,yn=!1;const ur="user-content-";let mt=!0,Je=!1,Tt={},en=null;const Dn=Ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xn=null;const hr=Ot({},["audio","video","img","source","image","track"]);let bn=null;const Hn=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",an="http://www.w3.org/1999/xhtml";let Dr=an,Zr=!1,Ar=null;const Ci=Ot({},[Pn,Xt,an],qf);let _i=Ot({},["mi","mo","mn","ms","mtext"]),nr=Ot({},["annotation-xml"]);const no=Ot({},["title","style","font","a","script"]);let Qr=null;const Ls=["application/xhtml+xml","text/html"],ei="text/html";let $n=null,ki=null;const Ro=e.createElement("form"),ui=function(le){return le instanceof RegExp||le instanceof Function},En=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ki&&ki===le)return;(!le||typeof le!="object")&&(le={}),le=ci(le),Qr=Ls.indexOf(le.PARSER_MEDIA_TYPE)===-1?ei:le.PARSER_MEDIA_TYPE,$n=Qr==="application/xhtml+xml"?qf:xl,ee=jn(le,"ALLOWED_TAGS")&&Jr(le.ALLOWED_TAGS)?Ot({},le.ALLOWED_TAGS,$n):ae,Q=jn(le,"ALLOWED_ATTR")&&Jr(le.ALLOWED_ATTR)?Ot({},le.ALLOWED_ATTR,$n):oe,Ar=jn(le,"ALLOWED_NAMESPACES")&&Jr(le.ALLOWED_NAMESPACES)?Ot({},le.ALLOWED_NAMESPACES,qf):Ci,bn=jn(le,"ADD_URI_SAFE_ATTR")&&Jr(le.ADD_URI_SAFE_ATTR)?Ot(ci(Hn),le.ADD_URI_SAFE_ATTR,$n):Hn,Xn=jn(le,"ADD_DATA_URI_TAGS")&&Jr(le.ADD_DATA_URI_TAGS)?Ot(ci(hr),le.ADD_DATA_URI_TAGS,$n):hr,en=jn(le,"FORBID_CONTENTS")&&Jr(le.FORBID_CONTENTS)?Ot({},le.FORBID_CONTENTS,$n):Dn,ue=jn(le,"FORBID_TAGS")&&Jr(le.FORBID_TAGS)?Ot({},le.FORBID_TAGS,$n):ci({}),pe=jn(le,"FORBID_ATTR")&&Jr(le.FORBID_ATTR)?Ot({},le.FORBID_ATTR,$n):ci({}),Tt=jn(le,"USE_PROFILES")?le.USE_PROFILES&&typeof le.USE_PROFILES=="object"?ci(le.USE_PROFILES):le.USE_PROFILES:!1,$e=le.ALLOW_ARIA_ATTR!==!1,Re=le.ALLOW_DATA_ATTR!==!1,Ye=le.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=le.SAFE_FOR_TEMPLATES||!1,it=le.SAFE_FOR_XML!==!1,ut=le.WHOLE_DOCUMENT||!1,Rt=le.RETURN_DOM||!1,cr=le.RETURN_DOM_FRAGMENT||!1,Mn=le.RETURN_TRUSTED_TYPE||!1,_r=le.FORCE_BODY||!1,kr=le.SANITIZE_DOM!==!1,yn=le.SANITIZE_NAMED_PROPS||!1,mt=le.KEEP_CONTENT!==!1,Je=le.IN_PLACE||!1,K=OI(le.ALLOWED_URI_REGEXP)?le.ALLOWED_URI_REGEXP:Ww,Dr=typeof le.NAMESPACE=="string"?le.NAMESPACE:an,_i=jn(le,"MATHML_TEXT_INTEGRATION_POINTS")&&le.MATHML_TEXT_INTEGRATION_POINTS&&typeof le.MATHML_TEXT_INTEGRATION_POINTS=="object"?ci(le.MATHML_TEXT_INTEGRATION_POINTS):Ot({},["mi","mo","mn","ms","mtext"]),nr=jn(le,"HTML_INTEGRATION_POINTS")&&le.HTML_INTEGRATION_POINTS&&typeof le.HTML_INTEGRATION_POINTS=="object"?ci(le.HTML_INTEGRATION_POINTS):Ot({},["annotation-xml"]);const Ne=jn(le,"CUSTOM_ELEMENT_HANDLING")&&le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING=="object"?ci(le.CUSTOM_ELEMENT_HANDLING):Aa(null);if(se=Aa(null),jn(Ne,"tagNameCheck")&&ui(Ne.tagNameCheck)&&(se.tagNameCheck=Ne.tagNameCheck),jn(Ne,"attributeNameCheck")&&ui(Ne.attributeNameCheck)&&(se.attributeNameCheck=Ne.attributeNameCheck),jn(Ne,"allowCustomizedBuiltInElements")&&typeof Ne.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=Ne.allowCustomizedBuiltInElements),at&&(Re=!1),cr&&(Rt=!0),Tt&&(ee=Ot({},Fw),Q=Aa(null),Tt.html===!0&&(Ot(ee,Pw),Ot(Q,zw)),Tt.svg===!0&&(Ot(ee,Kf),Ot(Q,Jf),Ot(Q,qc)),Tt.svgFilters===!0&&(Ot(ee,Yf),Ot(Q,Jf),Ot(Q,qc)),Tt.mathMl===!0&&(Ot(ee,Xf),Ot(Q,Bw),Ot(Q,qc))),ve.tagCheck=null,ve.attributeCheck=null,jn(le,"ADD_TAGS")&&(typeof le.ADD_TAGS=="function"?ve.tagCheck=le.ADD_TAGS:Jr(le.ADD_TAGS)&&(ee===ae&&(ee=ci(ee)),Ot(ee,le.ADD_TAGS,$n))),jn(le,"ADD_ATTR")&&(typeof le.ADD_ATTR=="function"?ve.attributeCheck=le.ADD_ATTR:Jr(le.ADD_ATTR)&&(Q===oe&&(Q=ci(Q)),Ot(Q,le.ADD_ATTR,$n))),jn(le,"ADD_URI_SAFE_ATTR")&&Jr(le.ADD_URI_SAFE_ATTR)&&Ot(bn,le.ADD_URI_SAFE_ATTR,$n),jn(le,"FORBID_CONTENTS")&&Jr(le.FORBID_CONTENTS)&&(en===Dn&&(en=ci(en)),Ot(en,le.FORBID_CONTENTS,$n)),jn(le,"ADD_FORBID_CONTENTS")&&Jr(le.ADD_FORBID_CONTENTS)&&(en===Dn&&(en=ci(en)),Ot(en,le.ADD_FORBID_CONTENTS,$n)),mt&&(ee["#text"]=!0),ut&&Ot(ee,["html","head","body"]),ee.table&&(Ot(ee,["tbody"]),delete ue.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=le.TRUSTED_TYPES_POLICY,k=$.createHTML("")}else $===void 0&&($=GI(g,d)),$!==null&&typeof k=="string"&&(k=$.createHTML(""));Xr&&Xr(le),ki=le},Sr=Ot({},[...Kf,...Yf,...NI]),Pr=Ot({},[...Xf,...DI]),Fn=function(le){let Ne=R(le);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:Dr,tagName:"template"});const He=xl(le.tagName),xt=xl(Ne.tagName);return Ar[le.namespaceURI]?le.namespaceURI===Xt?Ne.namespaceURI===an?He==="svg":Ne.namespaceURI===Pn?He==="svg"&&(xt==="annotation-xml"||_i[xt]):!!Sr[He]:le.namespaceURI===Pn?Ne.namespaceURI===an?He==="math":Ne.namespaceURI===Xt?He==="math"&&nr[xt]:!!Pr[He]:le.namespaceURI===an?Ne.namespaceURI===Xt&&!nr[xt]||Ne.namespaceURI===Pn&&!_i[xt]?!1:!Pr[He]&&(no[He]||!Sr[He]):!!(Qr==="application/xhtml+xml"&&Ar[le.namespaceURI]):!1},_n=function(le){wl(t.removed,{element:le});try{R(le).removeChild(le)}catch{m(le)}},yr=function(le,Ne){try{wl(t.removed,{attribute:Ne.getAttributeNode(le),from:Ne})}catch{wl(t.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(le),le==="is")if(Rt||cr)try{_n(Ne)}catch{}else try{Ne.setAttribute(le,"")}catch{}},hi=function(le){let Ne=null,He=null;if(_r)le="<remove></remove>"+le;else{const Kt=Iw(le,/^[\r\n\t ]+/);He=Kt&&Kt[0]}Qr==="application/xhtml+xml"&&Dr===an&&(le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+le+"</body></html>");const xt=$?$.createHTML(le):le;if(Dr===an)try{Ne=new u().parseFromString(xt,Qr)}catch{}if(!Ne||!Ne.documentElement){Ne=C.createDocument(Dr,"template",null);try{Ne.documentElement.innerHTML=Zr?k:xt}catch{}}const wn=Ne.body||Ne.documentElement;return le&&He&&wn.insertBefore(e.createTextNode(He),wn.childNodes[0]||null),Dr===an?I.call(Ne,ut?"html":"body")[0]:ut?Ne.documentElement:wn},go=function(le){return O.call(le.ownerDocument||le,le,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},mo=function(le){return le instanceof a&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof i)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},To=function(le){return typeof v=="function"&&le instanceof v};function Fr(le,Ne,He){bl(le,xt=>{xt.call(t,Ne,He,ki)})}const di=function(le){let Ne=null;if(Fr(W.beforeSanitizeElements,le,null),mo(le))return _n(le),!0;const He=$n(le.nodeName);if(Fr(W.uponSanitizeElement,le,{tagName:He,allowedTags:ee}),it&&le.hasChildNodes()&&!To(le.firstElementChild)&&Cr(/<[/\w!]/g,le.innerHTML)&&Cr(/<[/\w!]/g,le.textContent)||it&&le.namespaceURI===an&&He==="style"&&To(le.firstElementChild)||le.nodeType===_l.progressingInstruction||it&&le.nodeType===_l.comment&&Cr(/<[/\w]/g,le.data))return _n(le),!0;if(ue[He]||!(ve.tagCheck instanceof Function&&ve.tagCheck(He))&&!ee[He]){if(!ue[He]&&Mo(He)&&(se.tagNameCheck instanceof RegExp&&Cr(se.tagNameCheck,He)||se.tagNameCheck instanceof Function&&se.tagNameCheck(He)))return!1;if(mt&&!en[He]){const xt=R(le)||le.parentNode,wn=x(le)||le.childNodes;if(wn&&xt){const Kt=wn.length;for(let $r=Kt-1;$r>=0;--$r){const Jn=c(wn[$r],!0);xt.insertBefore(Jn,w(le))}}}return _n(le),!0}return le instanceof s&&!Fn(le)||(He==="noscript"||He==="noembed"||He==="noframes")&&Cr(/<\/no(script|embed|frames)/i,le.innerHTML)?(_n(le),!0):(at&&le.nodeType===_l.text&&(Ne=le.textContent,bl([F,D,A],xt=>{Ne=Sa(Ne,xt," ")}),le.textContent!==Ne&&(wl(t.removed,{element:le.cloneNode()}),le.textContent=Ne)),Fr(W.afterSanitizeElements,le,null),!1)},ti=function(le,Ne,He){if(pe[Ne]||kr&&(Ne==="id"||Ne==="name")&&(He in e||He in Ro))return!1;const xt=Q[Ne]||ve.attributeCheck instanceof Function&&ve.attributeCheck(Ne,le);if(!(Re&&!pe[Ne]&&Cr(_,Ne))&&!($e&&Cr(L,Ne))){if(!xt||pe[Ne]){if(!(Mo(le)&&(se.tagNameCheck instanceof RegExp&&Cr(se.tagNameCheck,le)||se.tagNameCheck instanceof Function&&se.tagNameCheck(le))&&(se.attributeNameCheck instanceof RegExp&&Cr(se.attributeNameCheck,Ne)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(Ne,le))||Ne==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&Cr(se.tagNameCheck,He)||se.tagNameCheck instanceof Function&&se.tagNameCheck(He))))return!1}else if(!bn[Ne]&&!Cr(K,Sa(He,U,""))&&!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&le!=="script"&&Ow(He,"data:")===0&&Xn[le])&&!(Ye&&!Cr(B,Sa(He,U,"")))&&He)return!1}return!0},Ft=Ot({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mo=function(le){return!Ft[xl(le)]&&Cr(V,le)},dr=function(le){Fr(W.beforeSanitizeAttributes,le,null);const{attributes:Ne}=le;if(!Ne||mo(le))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let xt=Ne.length;for(;xt--;){const wn=Ne[xt],{name:Kt,namespaceURI:$r,value:Jn}=wn,fn=$n(Kt),br=Jn;let xn=Kt==="value"?br:EI(br);if(He.attrName=fn,He.attrValue=xn,He.keepAttr=!0,He.forceKeepAttr=void 0,Fr(W.uponSanitizeAttribute,le,He),xn=He.attrValue,yn&&(fn==="id"||fn==="name")&&Ow(xn,ur)!==0&&(yr(Kt,le),xn=ur+xn),it&&Cr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xn)){yr(Kt,le);continue}if(fn==="attributename"&&Iw(xn,"href")){yr(Kt,le);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){yr(Kt,le);continue}if(!Ge&&Cr(/\/>/i,xn)){yr(Kt,le);continue}at&&bl([F,D,A],vo=>{xn=Sa(xn,vo," ")});const wr=$n(le.nodeName);if(!ti(wr,fn,xn)){yr(Kt,le);continue}if($&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!$r)switch(g.getAttributeType(wr,fn)){case"TrustedHTML":{xn=$.createHTML(xn);break}case"TrustedScriptURL":{xn=$.createScriptURL(xn);break}}if(xn!==br)try{$r?le.setAttributeNS($r,Kt,xn):le.setAttribute(Kt,xn),mo(le)?_n(le):Lw(t.removed)}catch{yr(Kt,le)}}Fr(W.afterSanitizeAttributes,le,null)},Ln=function(le){let Ne=null;const He=go(le);for(Fr(W.beforeSanitizeShadowDOM,le,null);Ne=He.nextNode();)Fr(W.uponSanitizeShadowNode,Ne,null),di(Ne),dr(Ne),Ne.content instanceof h&&Ln(Ne.content);Fr(W.afterSanitizeShadowDOM,le,null)};return t.sanitize=function(le){let Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=null,xt=null,wn=null,Kt=null;if(Zr=!le,Zr&&(le="<!-->"),typeof le!="string"&&!To(le)&&(le=II(le),typeof le!="string"))throw Gc("dirty is not a string, aborting");if(!t.isSupported)return le;if(Ht||En(Ne),t.removed=[],typeof le=="string"&&(Je=!1),Je){const fn=le.nodeName;if(typeof fn=="string"){const br=$n(fn);if(!ee[br]||ue[br])throw Gc("root node is forbidden and cannot be sanitized in-place")}}else if(le instanceof v)He=hi("<!---->"),xt=He.ownerDocument.importNode(le,!0),xt.nodeType===_l.element&&xt.nodeName==="BODY"||xt.nodeName==="HTML"?He=xt:He.appendChild(xt);else{if(!Rt&&!at&&!ut&&le.indexOf("<")===-1)return $&&Mn?$.createHTML(le):le;if(He=hi(le),!He)return Rt?null:Mn?k:""}He&&_r&&_n(He.firstChild);const $r=go(Je?le:He);for(;wn=$r.nextNode();)di(wn),dr(wn),wn.content instanceof h&&Ln(wn.content);if(Je)return le;if(Rt){if(at){He.normalize();let fn=He.innerHTML;bl([F,D,A],br=>{fn=Sa(fn,br," ")}),He.innerHTML=fn}if(cr)for(Kt=N.call(He.ownerDocument);He.firstChild;)Kt.appendChild(He.firstChild);else Kt=He;return(Q.shadowroot||Q.shadowrootmode)&&(Kt=M.call(r,Kt,!0)),Kt}let Jn=ut?He.outerHTML:He.innerHTML;return ut&&ee["!doctype"]&&He.ownerDocument&&He.ownerDocument.doctype&&He.ownerDocument.doctype.name&&Cr(jw,He.ownerDocument.doctype.name)&&(Jn="<!DOCTYPE "+He.ownerDocument.doctype.name+`>
1494
- `+Jn),at&&bl([F,D,A],fn=>{Jn=Sa(Jn,fn," ")}),$&&Mn?$.createHTML(Jn):Jn},t.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};En(le),Ht=!0},t.clearConfig=function(){ki=null,Ht=!1},t.isValidAttribute=function(le,Ne,He){ki||En({});const xt=$n(le),wn=$n(Ne);return ti(xt,wn,He)},t.addHook=function(le,Ne){typeof Ne=="function"&&wl(W[le],Ne)},t.removeHook=function(le,Ne){if(Ne!==void 0){const He=SI(W[le],Ne);return He===-1?void 0:$I(W[le],He,1)[0]}return Lw(W[le])},t.removeHooks=function(le){W[le]=[]},t.removeAllHooks=function(){W=Uw()},t}var qI=Vw();const KI={dark:!0,colors:{primary:"#005A8F",secondary:"#4DACFF",tertiary:"#BBC1C9","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},YI={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return qI.sanitize(this.params.text)}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},XI=["innerHTML"],JI={key:2},ZI={key:3,class:"validate mt-4"};function QI(n,t,e,r,d,h){const p=Ue("v-spacer"),v=Ue("v-toolbar"),s=Ue("v-icon"),f=Ue("v-text-field"),i=Ue("v-card-text"),a=Ue("v-btn"),u=Ue("v-card-actions"),g=Ue("v-card"),o=Ue("v-dialog"),c=Ue("v-app");return rt(),Pt(c,null,{default:ze(()=>[We(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=m=>n.show=m),persistent:"",width:"600",onKeydown:zl(h.cancel,["esc"])},{default:ze(()=>[We(g,null,{default:ze(()=>[We(v,{height:"24"},{default:ze(()=>[We(p),qn("span",null,gn(n.params.title),1),We(p)]),_:1}),We(i,{class:"mt-4 pa-3"},{default:ze(()=>[n.params.validateText?(rt(),Pt(s,{key:0,class:"mr-2"},{default:ze(()=>[...t[2]||(t[2]=[It(" mdi-alert ",-1)])]),_:1})):Ur("",!0),n.params.html?(rt(),nn("span",{key:1,innerHTML:h.sanitizedText},null,8,XI)):(rt(),nn("span",JI,gn(h.sanitizedText),1)),n.params.validateText?(rt(),nn("div",ZI,[It(" Enter "+gn(n.params.validateText)+" to confirm! ",1),We(f,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=m=>n.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ur("",!0)]),_:1}),We(u,{class:"px-2"},{default:ze(()=>[We(p),n.params.cancelText?(rt(),Pt(a,{key:0,variant:"outlined","data-test":h.dataTestCancel,onClick:h.cancel},{default:ze(()=>[It(gn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ur("",!0),We(a,{variant:"flat",color:n.params.okClass,"data-test":h.dataTestOk,onClick:h.ok},{default:ze(()=>[It(gn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const eO=qi(YI,[["render",QI],["__scopeId","data-v-53691296"]]);class tO{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(eO);t.use(Qf);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:d,validateText:h,cancelText:p,html:v}){return this.mount(),new Promise((s,f)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:d,validateText:h,cancelText:p,html:v},s,f)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:d,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:d="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:d,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:d="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:h,validateText:r,cancelText:d,html:!1})}}const nO={install(n,t){const e=new tO;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},rO={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){return this.toastNotification.type==="notification"?"mdi-bell":"mdi-alert-box"},toastStyle:function(){return`
1495
- --toast-bg-color:${Bd[this.toastNotification.level]};
1496
- --toast-fg-color:${GM(this.toastNotification.level)};
1497
- `},contentStyle:function(){return`
1498
- white-space: ${this.expanded?"normal":"nowrap"};
1499
- overflow-x: ${this.expanded?"visible":"hidden"};
1500
- text-overflow: ${this.expanded?"unset":"ellipsis"};
1501
- `}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},iO={key:0,class:"text-subtitle-1 mr-1 notification-text"},oO={key:1,class:"text-body-2 notification-text"},sO={key:2,class:"text-body-2 notification-text"};function aO(n,t,e,r,d,h){const p=Ue("v-icon"),v=Ue("v-spacer"),s=Ue("v-btn"),f=Ue("v-sheet"),i=Ue("v-slide-y-transition");return rt(),Pt(i,null,{default:ze(()=>[lg(We(f,{style:ls(h.toastStyle),class:"toast-notification",onClick:h.expand},{default:ze(()=>[We(p,{class:"mr-1 notification-text"},{default:ze(()=>[It(gn(h.toastNotificationIcon),1)]),_:1}),qn("div",{class:"toast-content",style:ls(h.contentStyle)},[n.toastNotification.title?(rt(),nn("span",iO,[n.toastNotification.body||n.toastNotification.message?(rt(),nn(si,{key:0},[It(gn(n.toastNotification.title)+": ",1)],64)):(rt(),nn(si,{key:1},[It(gn(n.toastNotification.title),1)],64))])):Ur("",!0),n.toastNotification.body?(rt(),nn("span",oO,gn(n.toastNotification.body),1)):Ur("",!0),n.toastNotification.message?(rt(),nn("span",sO,gn(n.toastNotification.message),1)):Ur("",!0)],4),We(v),We(s,{variant:"text",class:"notification-text",onClick:Qs(h.hide,["stop"])},{default:ze(()=>[...t[0]||(t[0]=[It(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[cg,n.showToast]])]),_:1})}const lO=qi(rO,[["render",aO],["__scopeId","data-v-ef96840d"]]);class cO{constructor(t={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=hb()),this.store}mount(){if(this.mounted)return;const t=Lu(lO);t.use(Qf);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:d,level:h,duration:p,type:v="alert",logToConsole:s=!1,saveToHistory:f=!0}){this.mount(),s&&console.log(d?`${h.toUpperCase()} - ${d}`:`${h.toUpperCase()} - ${e}: ${r}`),f&&this.getStore().notifyAddHistory({title:e,body:r,message:d,level:h}),this[t]({title:e,body:r,message:d,level:h,duration:p,type:v})}toast({title:t,body:e,message:r,level:d,duration:h,type:p}){this.$root.toast({title:t,body:e,message:r,level:d,type:p},h)}critical({title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v})}caution({title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v})}off({title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:d,duration:h,logToConsole:p,saveToHistory:v})}}const uO={install(n,t){const e=new cO(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}};function hO(n){tg(`Vuetify: ${n}`)}function Gw(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function dO(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function qw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const d in n)r[d]=n[d];for(const d in t){const h=n[d],p=t[d];if(Gw(h)&&Gw(p)){r[d]=qw(h,p,e);continue}if(e&&Array.isArray(h)&&Array.isArray(p)){r[d]=e(h,p);continue}r[d]=p}return r}function kl(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(kl.cache.has(n))return kl.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return kl.cache.set(n,t),t}kl.cache=new Map;function Kw(n,t){return e=>Object.keys(n).reduce((r,d)=>{const h=typeof n[d]=="object"&&n[d]!=null&&!Array.isArray(n[d])?n[d]:{type:n[d]};return e&&d in e?r[d]={...h,default:e[d]}:r[d]=h,t&&!r[d].source&&(r[d].source=t),r},{})}function Yw(n,t){const e=sg();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function fO(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yw("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const Zf=Symbol.for("vuetify:defaults");function Xw(){const n=ng(Zf);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function pO(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[kl(t)]<"u")}function gO(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xw();const r=Yw("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const d=Mu(()=>e.value?.[n._as??t]),h=new Proxy(n,{get(s,f){const i=Reflect.get(s,f);if(f==="class"||f==="style")return[d.value?.[f],i].filter(g=>g!=null);if(pO(r.vnode,f))return i;const a=d.value?.[f];if(a!==void 0)return a;const u=e.value?.global?.[f];return u!==void 0?u:i}}),p=rg();ig(()=>{if(d.value){const s=Object.entries(d.value).filter(f=>{let[i]=f;return i.startsWith(i[0].toUpperCase())});p.value=s.length?Object.fromEntries(s):void 0}else p.value=void 0});function v(){const s=fO(Zf,r);ag(Zf,Mu(()=>p.value?qw(s?.value??{},p.value):s?.value))}return{props:h,provideSubDefaults:v}}function Kc(n){if(n._setup=n._setup??n.setup,!n.name)return hO("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Kw(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return dO(e,t)},n.props._as=String,n.setup=function(e,r){const d=Xw();if(!d.value)return n._setup(e,r);const{props:h,provideSubDefaults:p}=gO(e,e._as??n.name,d),v=n._setup(h,r);return p(),v}}return n}function mO(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?Kc:eg)(t)}const vO=[String,Function,Object,Array],Yc=Kw({icon:{type:vO},tag:{type:[String,Object,Function],required:!0}},"icon");mO()({name:"VComponentIcon",props:Yc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return We(n.tag,null,{default:()=>[n.icon?We(r,null,null):e.default?.()]})}}}),Kc({name:"VSvgIcon",inheritAttrs:!1,props:Yc(),setup(n,t){let{attrs:e}=t;return()=>We(n.tag,ja(e,{style:null}),{default:()=>[qn("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?qn("path",{d:r[0],"fill-opacity":r[1]},null):qn("path",{d:r},null)):qn("path",{d:n.icon},null)])]})}}),Kc({name:"VLigatureIcon",props:Yc(),setup(n){return()=>We(n.tag,null,{default:()=>[n.icon]})}});const yO=Kc({name:"VClassIcon",props:Yc(),setup(n){return()=>We(n.tag,{class:og(n.icon)},null)}}),bO={component:n=>Zs(yO,{...n,class:"mdi"})},wO={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},xO={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},CO={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},_O={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},Qf=pg({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:KI,cosmosDarkCobalt:wO,cosmosDarkIndigo:xO,cosmosDarkSlate:CO,cosmosDarkEmerald:_O}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:bO,...KM,...YM}}}),ep=qx({createApp:Lu,appOptions:{render(){return Zs(tC,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(CI),n.use(xa),n.use(Qf),n.use(nO),n.use(uO)}}),bB=Tn("q",ep.bootstrap),wB=Tn("r",ep.mount),xB=Tn("s",ep.unmount)})}}));