openc3-cosmos-tool-dataextractor 7.0.1 → 7.1.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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/{ArrayWidget-Dh6zDiC7-873bed41f0920d4f20e2.js → ArrayWidget-CmKZQfWB-316284df219381b9c608.js} +2 -2
  3. data/tools/dataextractor/{ArrayplotWidget-CSc_TqNm-faea7e102c3b0e77340e.js → ArrayplotWidget-D5McM1rY-84bbb4b36d873b94c8f9.js} +1 -1
  4. data/tools/dataextractor/BarColumn-BtP1cQcf-f92fc05ebb0e9117a3d4.js +1 -0
  5. data/tools/dataextractor/BlockWidget-BKMse4hP-8bdc0b11498302b95c1f.js +2 -0
  6. data/tools/dataextractor/ButtonWidget-BLNVL46w-e577648e2665645edef7.js +2 -0
  7. data/tools/dataextractor/{CanvasWidget-DuXOo3jG-cca60757795adfc9b555.js → CanvasWidget-1jy1JskS-112d32201ad2294cf975.js} +1 -1
  8. data/tools/dataextractor/CanvasdotWidget-DxuFGoWt-1e95745cf96436372a10.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-tWpK5rsv-037c03642913e202f682.js → CanvasimageWidget-B_JxCI_f-4efa805404970348a383.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-BVzJYz3l-3d76b92444baed7b16b9.js → CanvasimagevalueWidget-DwHIZzWo-ce7dc4860d646547ca92.js} +1 -1
  11. data/tools/dataextractor/CanvaslabelWidget-Tt4dmAOI-0791a8cb0d60b3e8652d.js +1 -0
  12. data/tools/dataextractor/{CanvaslabelvalueWidget-DzJKD6qs-16454bcd3f0db6ad1a0d.js → CanvaslabelvalueWidget-D1-kZsi--eea1f7c137b58e94c46d.js} +1 -1
  13. data/tools/dataextractor/{CanvaslineWidget-BttTXCZq-4f927bb9d629d4ca2431.js → CanvaslineWidget-Din8LMyF-fc3a537b16766642b116.js} +1 -1
  14. data/tools/dataextractor/{CanvaslinevalueWidget-i6G0JfnZ-6ed33732c8ac89cd98bb.js → CanvaslinevalueWidget-DOrasE2j-d8532b8ace8da01886b3.js} +1 -1
  15. data/tools/dataextractor/CheckbuttonWidget-A07FryqU-461fef72d2635ff7c3d8.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-xayce-aY-7605f54bbaa22fd68569.js +1 -0
  17. data/tools/dataextractor/DataExtractor-006ab46fdfac042cf003.js +14 -0
  18. data/tools/dataextractor/{DateWidget-DkFAFlc8-8b87a00cd8c7df7adf8c.js → DateWidget-DrYZJta_-418188177f795dd16514.js} +1 -1
  19. data/tools/dataextractor/{DetailsDialog-sqja4Lzq-3c07f8084078cec125bc.js → DetailsDialog-CFCaJZWz-bb3c149806450af49675.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-BuSbQVhf-57879c868050e8e6066a.js → DynamicWidget-BuSbQVhf-c06a8693b276fb5b5083.js} +1 -1
  21. data/tools/dataextractor/{FilechecksumWidget-DqJ_hvN4-458d5afdd66f766a320e.js → FilechecksumWidget-CTf0XGST-57da030df88bcae0840f.js} +1 -1
  22. data/tools/dataextractor/{FiledisplayWidget-CYznG_tf-633ffe7729c3d8df045f.js → FiledisplayWidget-DLJuesmU-7a9c94d3f7db028b52b8.js} +1 -1
  23. data/tools/dataextractor/{FormatvalueWidget-BnVu4YGx-685c1b3d38cda62137ef.js → FormatvalueWidget-DODmUWPH-6b499827be47ec864d36.js} +1 -1
  24. data/tools/dataextractor/Graph-Cwghj5Pc-4a4336a11d30c4ff2295.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-DO5XbOGy-edd2165bb446a9306f21.js → GraphWidget-Rc-fnHCt-54c64ceaa7db83c11660.js} +1 -1
  26. data/tools/dataextractor/{HorizontalWidget-BA9PiP3d-61dbe5e15cff5d64bb29.js → HorizontalWidget-CZqN6UYp-3ffbc823163c6f336bbc.js} +1 -1
  27. data/tools/dataextractor/{HorizontalboxWidget-B-7HOqgl-32dab144449bf94f15aa.js → HorizontalboxWidget-BV7cyhwN-01fb3d720ab9c0004ff1.js} +1 -1
  28. data/tools/dataextractor/HorizontallineWidget-ChDLR_8D-34c99e1ebe7cabde2cec.js +1 -0
  29. data/tools/dataextractor/{IframeWidget-BzOka-fX-cbf4824b3f4d3e3f6424.js → IframeWidget-BdOS5sm_-830d369a6d746cc4ea70.js} +1 -1
  30. data/tools/dataextractor/{ImageLoader-CstmWFM4-f27420bebced8580ff70.js → ImageLoader-CnlQ4xLd-9d5ac60caef9a79ee131.js} +1 -1
  31. data/tools/dataextractor/{ImageviewerWidget-BA9uOM1q-b0947f82f033e760c532.js → ImageviewerWidget-DoJBe5eZ-e93fdee9a5de4d3e540f.js} +1 -1
  32. data/tools/dataextractor/{LabelWidget-Da2howZF-bfb9fcc9c81e16f870e5.js → LabelWidget-DYwcB_S4-228ac374bdbaaf35fc94.js} +1 -1
  33. data/tools/dataextractor/{LabelledWidget-BH8y3OXT-68af25a9704951142531.js → LabelledWidget-D4N2gPxJ-627cb1272084c20e6ddd.js} +1 -1
  34. data/tools/dataextractor/LabelprogressbarWidget-CRnteLAo-8bb1c5ac4fefd5c5f93d.js +1 -0
  35. data/tools/dataextractor/LabelsparklineWidget-Bbjjio1S-3cb1052ea5432387b327.js +1 -0
  36. data/tools/dataextractor/LabelvalueWidget-Bc6HtTMO-03e6935aea12be74b056.js +1 -0
  37. data/tools/dataextractor/LabelvaluedescWidget-D5aDNr1o-b9941eda8fd09aeb8d5a.js +1 -0
  38. data/tools/dataextractor/LabelvaluelimitsbarWidget-CMnJoNKz-f1f138068e3c77abe3d6.js +1 -0
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-R5ofG4q1-78da786e41b65ca740f2.js +1 -0
  40. data/tools/dataextractor/LabelvaluerangebarWidget-Qa3R2_4p-dcbaee45027629c6ede5.js +1 -0
  41. data/tools/dataextractor/{Layout-D7RGn0Fe-4c6501b5b5c13bc5939b.js → Layout-BBLYT0gE-7b312adea09917fdfab4.js} +1 -1
  42. data/tools/dataextractor/{LedWidget-DgMtvsiv-f9fb0a4ee2f71ef2a9f6.js → LedWidget-CL2dOxb7-3bbab87f88de3eada6df.js} +1 -1
  43. data/tools/dataextractor/{LimitsBar-CcOaAw0C-3ee7e5044b0ba18270a6.js → LimitsBar-59_qNqi8-78bb8167d1397a411d10.js} +1 -1
  44. data/tools/dataextractor/{LimitsbarWidget-DpmJn1Lo-06311c5aa1a8fd9c3272.js → LimitsbarWidget-C0N2611W-c9f1083a540f416bd609.js} +1 -1
  45. data/tools/dataextractor/{LimitscolorWidget-BMXiEaDm-82722cde5d79a4a63dd5.js → LimitscolorWidget-GfNCPo3i-f888da188ac9d157fb04.js} +1 -1
  46. data/tools/dataextractor/{LimitscolumnWidget-ufFMz6R--c471ef82b3a96efbb076.js → LimitscolumnWidget-ut6NX68S-edbe1ef81ec64412dba6.js} +1 -1
  47. data/tools/dataextractor/{LinegraphWidget-BC2wVOny-7d86e1f9b9bee5c66333.js → LinegraphWidget-DaCyvdnI-567f1f90bbecc08449c1.js} +1 -1
  48. data/tools/dataextractor/{MatrixbycolumnsWidget-DfUAeBnO-b55624295093260752b3.js → MatrixbycolumnsWidget-Cni63alW-21d337386672ee72b233.js} +1 -1
  49. data/tools/dataextractor/OpenC3TimePicker-WVlNQdKk-a1efabf60524315223d4.js +1 -0
  50. data/tools/dataextractor/{ProgressbarWidget-D3ndYnq_-3586c760d2e8861c4010.js → ProgressbarWidget-BWqCsk87-c7254b5a6b747c1721d0.js} +1 -1
  51. data/tools/dataextractor/{RadiobuttonWidget-CP0S9nWW-7982529538978f6d02c1.js → RadiobuttonWidget-Dza2r34f-1d7eef1843f1b2c63a33.js} +1 -1
  52. data/tools/dataextractor/{RadiogroupWidget-BXHfA21T-dd31b0768cdf93c1cabc.js → RadiogroupWidget-DWmZMNmr-45df96c649488079d1dc.js} +1 -1
  53. data/tools/dataextractor/{RangebarWidget-Bv2DqkPo-ec5662b730343afaa28e.js → RangebarWidget-DsGCC1x7-1a79d953342f57177d52.js} +1 -1
  54. data/tools/dataextractor/{RollupWidget-o_huYU0x-8a7a96915fa5538ce930.js → RollupWidget-DGElKXm3-26d24274fdcdc8b0f0d1.js} +1 -1
  55. data/tools/dataextractor/{ScrollwindowWidget-DdjaML6D-b4480561f3da8583459b.js → ScrollwindowWidget-BvKT59rV-b1335c2891dd687cd82b.js} +1 -1
  56. data/tools/dataextractor/{SignalWidget-Dd54y28I-ad29f9a3ddb39bc8e712.js → SignalWidget-DRAFunW0-7dfe185f6a32704f4963.js} +1 -1
  57. data/tools/dataextractor/SpacerWidget-CUGpXBpA-4cf00997aa32318d0007.js +1 -0
  58. data/tools/dataextractor/SparklineWidget-SBWjRrqq-e88851c1437b3c0091c1.js +1 -0
  59. data/tools/dataextractor/{TabbookWidget-DeaC27yC-a92ec7a904c37d283bab.js → TabbookWidget-7l6fPoRA-309a39ebc7060a289b55.js} +1 -1
  60. data/tools/dataextractor/TargetPacketItemChooser-QPHy-p2u-6c3336ddfc2130c89fa9.js +1 -0
  61. data/tools/dataextractor/{TextboxWidget-tL41zWUX-75750425b2582c87e1a4.js → TextboxWidget-Qb0TNt4Y-3ee0f155bb1a69f6087b.js} +1 -1
  62. data/tools/dataextractor/TextfieldWidget-DcSGRfnF-0c9e29695e9c0a978059.js +1 -0
  63. data/tools/dataextractor/TimeWidget-aoMkDgRR-c2bdb71e979e1f3ded87.js +1 -0
  64. data/tools/dataextractor/{TitleWidget-CLx-tuYT-e469f1843cd091fea225.js → TitleWidget-C8b9Vp5r-fefda26a56e5cfe6d28b.js} +1 -1
  65. data/tools/dataextractor/VWidget-BgNciXK1-5b6d047860037a624d22.js +1 -0
  66. data/tools/dataextractor/ValueWidget-B1OvCmXK-09e4bc6504657c9b88e9.js +1 -0
  67. data/tools/dataextractor/ValuelimitsbarWidget-CUd9P_Xg-1b29e5d70333e68048fa.js +1 -0
  68. data/tools/dataextractor/ValuelimitscolumnWidget-CbThSMma-abe8e36e957d772236ce.js +1 -0
  69. data/tools/dataextractor/ValuerangebarWidget-DjL4ze3d-50409a8ea2bb90611d48.js +1 -0
  70. data/tools/dataextractor/{VerticalWidget-BvsVh0Ob-32ffa67d963ba10b5185.js → VerticalWidget-V5-vGq7l-d4d21b3cdc3044ddb3eb.js} +1 -1
  71. data/tools/dataextractor/{VerticalboxWidget-ClTCDCQN-b36d02475eee09ac8fa2.js → VerticalboxWidget-OigMLjH8-c9332d7615a38507d88f.js} +1 -1
  72. data/tools/dataextractor/{Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js → Widget-BiaunQ83-decc581ca3ab27c1b845.js} +1 -1
  73. data/tools/dataextractor/main-bd615259325517ea1b6f.js +1496 -0
  74. data/tools/dataextractor/main.js +1 -1
  75. metadata +73 -73
  76. data/tools/dataextractor/BarColumn-DmjMnw5l-e63ca3ac4f4e5f880c78.js +0 -1
  77. data/tools/dataextractor/BlockWidget-BdR_HCVc-339e6dbc0abdf23824ee.js +0 -2
  78. data/tools/dataextractor/ButtonWidget-DZ4VCNWU-467ba3039befef92a15a.js +0 -2
  79. data/tools/dataextractor/CanvasdotWidget-WoLpxI1u-42cc7026c74d2b83f1bf.js +0 -1
  80. data/tools/dataextractor/CanvaslabelWidget-CDFf8Vll-90f5994b9ebe9dd669d7.js +0 -1
  81. data/tools/dataextractor/CheckbuttonWidget-18jtf7sh-1bb7cf5924c0accea787.js +0 -1
  82. data/tools/dataextractor/ComboboxWidget-BjaVFbD4-68be351db2576115fc45.js +0 -1
  83. data/tools/dataextractor/DataExtractor-6a57a8b8549d610cacac.js +0 -11
  84. data/tools/dataextractor/Graph-CUFzx8Ti-e326729124e84b220373.js +0 -1
  85. data/tools/dataextractor/HorizontallineWidget-D-o9MGo0-ddb9630a2adc743b1e74.js +0 -1
  86. data/tools/dataextractor/LabelprogressbarWidget-Brl24F4c-e37d3a3a1ea8e0130fa0.js +0 -1
  87. data/tools/dataextractor/LabelsparklineWidget-D22MB7-4-4d4c54cc590572f96ebc.js +0 -1
  88. data/tools/dataextractor/LabelvalueWidget-_1JPbK-K-79535add803f699f912d.js +0 -1
  89. data/tools/dataextractor/LabelvaluedescWidget-BgduSJJb-2c9d371ecc2f493464fd.js +0 -1
  90. data/tools/dataextractor/LabelvaluelimitsbarWidget-C9PlEhWo-124291211bb9a7fb7a20.js +0 -1
  91. data/tools/dataextractor/LabelvaluelimitscolumnWidget-Cay6AhoZ-aeb62c844e9d862bc2b3.js +0 -1
  92. data/tools/dataextractor/LabelvaluerangebarWidget-s_8IgY-C-299393edba519bae3a75.js +0 -1
  93. data/tools/dataextractor/OpenC3TimePicker-DpkbfbgC-b9b15927c58cff1786d9.js +0 -1
  94. data/tools/dataextractor/SpacerWidget-GPFYtIG1-9dd77eb1e2a7304cf299.js +0 -1
  95. data/tools/dataextractor/SparklineWidget-f11nrlLS-92deda7a9b6298571159.js +0 -1
  96. data/tools/dataextractor/TargetPacketItemChooser-BoBqvs3T-341c7c9e84a220b1a0d3.js +0 -1
  97. data/tools/dataextractor/TextfieldWidget-D1qj14Qi-0858b199ec7f9902291c.js +0 -1
  98. data/tools/dataextractor/TimeWidget-CSVGNong-12f265007f01523c523a.js +0 -1
  99. data/tools/dataextractor/VWidget-CxnaMF0w-a4302069e065dead5397.js +0 -1
  100. data/tools/dataextractor/ValueWidget-BYgpXfDo-9f7bb34efd4d22fd774e.js +0 -1
  101. data/tools/dataextractor/ValuelimitsbarWidget-Dc9-VNZ3-42880e7e026ad3e9e259.js +0 -1
  102. data/tools/dataextractor/ValuelimitscolumnWidget-b7W8K3mR-c331b0200587603b6c9e.js +0 -1
  103. data/tools/dataextractor/ValuerangebarWidget-DmhczZQb-c8c6852c06a1fb11c936.js +0 -1
  104. data/tools/dataextractor/main-7641c12765b47b03f01d.js +0 -1490
@@ -0,0 +1,1496 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Tn,ot){"use strict";var St,Mn,io,Ot,dt,ti,fr,Cf,_f,js,Ea,kl,Rr,ni,wo,Al,Hs,Sl,$l,kf,Af,Sf,cu,$f,Rf,Ef,Tf,Mf,uu,If,Lf,Of,Nf,Df,hu,Pf;return{setters:[Et=>{St=Et.resolveComponent,Mn=Et.openBlock,io=Et.createBlock,Ot=Et.withCtx,dt=Et.createVNode,ti=Et.createElementBlock,fr=Et.createElementVNode,Cf=Et.useCssVars,_f=Et.defineAsyncComponent,js=Et.h,Ea=Et.normalizeStyle,kl=Et.Fragment,Rr=Et.createTextVNode,ni=Et.toDisplayString,wo=Et.createCommentVNode,Al=Et.withKeys,Hs=Et.withModifiers,Sl=Et.withDirectives,$l=Et.vShow,kf=Et.defineComponent,Af=Et.warn,Sf=Et.inject,cu=Et.computed,$f=Et.shallowRef,Rf=Et.watchEffect,Ef=Et.normalizeClass,Tf=Et.getCurrentInstance,Mf=Et.provide,uu=Et.createApp,If=Et.mergeProps},Et=>{Lf=Et.createRouter,Of=Et.createWebHistory},Et=>{Nf=Et.defineStore,Df=Et.createPinia},Et=>{hu=Et.getMountedApps},Et=>{Pf=Et.createVuetify}],execute:(function(){Tn({B:Br,D:tg,G:oo,H:Du,N:Fu,P:Kp,V:Ks,W:qp,g:ng,h:Wa,j:eg,n:dy,o:Tr,v:Ys,x:Gp});var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ff(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable}))),e.push.apply(e,r)}return e}function rs(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Ff(Object(e),!0).forEach((function(r){Z0(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ff(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function Z0(t,n,e){return(n=(function(r){var m=(function(f,g){if(is(f)!=="object"||f===null)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var u=w.call(f,g);if(is(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(f)})(r,"string");return is(m)==="symbol"?m:String(m)})(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function is(t){return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},is(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var n=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,m=String(e),f=m.length,g=-1,w="",u=m.charCodeAt(0);++g<f;)(r=m.charCodeAt(g))!=0?w+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&u==45?"\\"+r.toString(16)+" ":g==0&&f==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+m.charAt(g):m.charAt(g):w+="�";return w};t.CSS||(t.CSS={}),t.CSS.escape=n})(Et);var X0={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function Q0(t){if(is(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=rs(rs({},X0),t);if(!n.Vue&&!n.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!n.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(n.appOptions.el&&typeof n.appOptions.el!="string"&&!(n.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(is(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var e={};return{bootstrap:ew.bind(null,n,e),mount:tw.bind(null,n,e),unmount:rw.bind(null,n,e),update:nw.bind(null,n,e)}}function ew(t){return t.loadRootComponent?t.loadRootComponent().then((function(n){return t.rootComponent=n})):Promise.resolve()}function tw(t,n,e){var r={};return Promise.resolve().then((function(){return(function(m,f){return typeof m.appOptions=="function"?m.appOptions(f):Promise.resolve(rs({},m.appOptions))})(t,e).then((function(m){var f;if(e.domElement&&!m.el&&(m.el=e.domElement),m.el)if(typeof m.el=="string"){if(!(f=document.querySelector(m.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(m.el))}else(f=m.el).id||(f.id="single-spa-application:".concat(e.name)),m.el="#".concat(CSS.escape(f.id));else{var g="single-spa-application:".concat(e.name);m.el="#".concat(CSS.escape(g)),(f=document.getElementById(g))||((f=document.createElement("div")).id=g,document.body.appendChild(f))}if(!t.replaceMode&&(m.el=m.el+" .single-spa-container",!f.querySelector(".single-spa-container"))){var w=document.createElement("div");w.className="single-spa-container",f.appendChild(w)}r.domEl=f,m.render||m.template||!t.rootComponent||(m.render=function(d){return d(t.rootComponent)}),m.data||(m.data={});var u=m.data;if(m.data=function(){return rs(rs({},typeof u=="function"?u.call(this,this):u),e)},t.createApp){if(r.vueInstance=t.createApp(m),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(m.el),n[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(m.el)}else if(r.vueInstance=new t.Vue(m),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return n[e.name]=r,r.vueInstance}));return n[e.name]=r,r.vueInstance}))}))}function nw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name],m=rs(rs({},t.appOptions.data||{}),e),f=r.root||r.vueInstance;for(var g in m)f[g]=m[g]}))}function rw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name];t.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 iw=Tn("_",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),ow={};function sw(t,n){const e=St("router-view"),r=St("v-app");return Mn(),io(r,{id:"innerapp"},{default:Ot(()=>[dt(e)]),_:1})}const aw=iw(ow,[["render",sw]]),v2="modulepreload",y2=function(t){return"/"+t},b2={},st=function(n,e,r){let m=Promise.resolve();function f(g){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=g,window.dispatchEvent(w),!w.defaultPrevented)throw g}return m.then(g=>{for(const w of g||[])w.status==="rejected"&&f(w.reason);return n().catch(f)})},zf=function(t){!t.name!=="NotFound"&&(t.path=`/tools/dataextractor/${t.path.replace(/^\//,"")}`),t.children?.forEach(zf)},zo=Tn("d",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),lw="/icons/customIcons.svg",du={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return lw+"#"+this.icon}}},Wf=()=>{Cf(t=>({v4ccb3d08:t.color}))},Bf=du.setup;du.setup=Bf?(t,n)=>(Wf(),Bf(t,n)):Wf;const cw={class:"cosmos-custom-icon"},uw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},hw=["href"];function dw(t,n,e,r,m,f){return Mn(),ti("span",cw,[(Mn(),ti("svg",uw,[fr("use",{href:f.iconSrc},null,8,hw)]))])}const fw=zo(du,[["render",dw],["__scopeId","data-v-54b83b01"]]);function jf(t,n){return function(){return t.apply(n,arguments)}}const{toString:pw}=Object.prototype,{getPrototypeOf:Rl}=Object,{iterator:El,toStringTag:Hf}=Symbol,Tl=(t=>n=>{const e=pw.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Hi=t=>(t=t.toLowerCase(),n=>Tl(n)===t),Ml=t=>n=>typeof n===t,{isArray:Us}=Array,Vs=Ml("undefined");function Ta(t){return t!==null&&!Vs(t)&&t.constructor!==null&&!Vs(t.constructor)&&ri(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Uf=Hi("ArrayBuffer");function gw(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Uf(t.buffer),n}const mw=Ml("string"),ri=Ml("function"),Vf=Ml("number"),Ma=t=>t!==null&&typeof t=="object",vw=t=>t===!0||t===!1,Il=t=>{if(Tl(t)!=="object")return!1;const n=Rl(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Hf in t)&&!(El in t)},yw=t=>{if(!Ma(t)||Ta(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},bw=Hi("Date"),ww=Hi("File"),xw=t=>!!(t&&typeof t.uri<"u"),Cw=t=>t&&typeof t.getParts<"u",_w=Hi("Blob"),kw=Hi("FileList"),Aw=t=>Ma(t)&&ri(t.pipe);function Sw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const qf=Sw(),Gf=typeof qf.FormData<"u"?qf.FormData:void 0,$w=t=>{if(!t)return!1;if(Gf&&t instanceof Gf)return!0;const n=Rl(t);if(!n||n===Object.prototype||!ri(t.append))return!1;const e=Tl(t);return e==="formdata"||e==="object"&&ri(t.toString)&&t.toString()==="[object FormData]"},Rw=Hi("URLSearchParams"),[Ew,Tw,Mw,Iw]=["ReadableStream","Request","Response","Headers"].map(Hi),Lw=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ia(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),Us(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(Ta(t))return;const f=e?Object.getOwnPropertyNames(t):Object.keys(t),g=f.length;let w;for(r=0;r<g;r++)w=f[r],n.call(null,t[w],w,t)}}function Kf(t,n){if(Ta(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const os=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yf=t=>!Vs(t)&&t!==os;function fu(...t){const{caseless:n,skipUndefined:e}=Yf(this)&&this||{},r={},m=(f,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const w=n&&Kf(r,g)||g,u=pu(r,w)?r[w]:void 0;Il(u)&&Il(f)?r[w]=fu(u,f):Il(f)?r[w]=fu({},f):Us(f)?r[w]=f.slice():(!e||!Vs(f))&&(r[w]=f)};for(let f=0,g=t.length;f<g;f++)t[f]&&Ia(t[f],m);return r}const Ow=(t,n,e,{allOwnKeys:r}={})=>(Ia(n,(m,f)=>{e&&ri(m)?Object.defineProperty(t,f,{__proto__:null,value:jf(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,f,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),Nw=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Dw=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),e&&Object.assign(t.prototype,e)},Pw=(t,n,e,r)=>{let m,f,g;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),f=m.length;f-- >0;)g=m[f],(!r||r(g,t,n))&&!w[g]&&(n[g]=t[g],w[g]=!0);t=e!==!1&&Rl(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},Fw=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},zw=t=>{if(!t)return null;if(Us(t))return t;let n=t.length;if(!Vf(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},Ww=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&Rl(Uint8Array)),Bw=(t,n)=>{const e=(t&&t[El]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},jw=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},Hw=Hi("HTMLFormElement"),Uw=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),pu=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),Vw=Hi("RegExp"),Jf=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};Ia(e,(m,f)=>{let g;(g=n(m,f,t))!==!1&&(r[f]=g||m)}),Object.defineProperties(t,r)},qw=t=>{Jf(t,(n,e)=>{if(ri(t)&&["arguments","caller","callee"].includes(e))return!1;const r=t[e];if(ri(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Gw=(t,n)=>{const e={},r=m=>{m.forEach(f=>{e[f]=!0})};return Us(t)?r(t):r(String(t).split(n)),e},Kw=()=>{},Yw=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function Jw(t){return!!(t&&ri(t.append)&&t[Hf]==="FormData"&&t[El])}const Zw=t=>{const n=new Array(10),e=(r,m)=>{if(Ma(r)){if(n.indexOf(r)>=0)return;if(Ta(r))return r;if(!("toJSON"in r)){n[m]=r;const f=Us(r)?[]:{};return Ia(r,(g,w)=>{const u=e(g,m+1);!Vs(u)&&(f[w]=u)}),n[m]=void 0,f}}return r};return e(t,0)},Xw=Hi("AsyncFunction"),Qw=t=>t&&(Ma(t)||ri(t))&&ri(t.then)&&ri(t.catch),Zf=((t,n)=>t?setImmediate:n?((e,r)=>(os.addEventListener("message",({source:m,data:f})=>{m===os&&f===e&&r.length&&r.shift()()},!1),m=>{r.push(m),os.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ri(os.postMessage)),ex=typeof queueMicrotask<"u"?queueMicrotask.bind(os):typeof process<"u"&&process.nextTick||Zf,tx=t=>t!=null&&ri(t[El]),Ce={isArray:Us,isArrayBuffer:Uf,isBuffer:Ta,isFormData:$w,isArrayBufferView:gw,isString:mw,isNumber:Vf,isBoolean:vw,isObject:Ma,isPlainObject:Il,isEmptyObject:yw,isReadableStream:Ew,isRequest:Tw,isResponse:Mw,isHeaders:Iw,isUndefined:Vs,isDate:bw,isFile:ww,isReactNativeBlob:xw,isReactNative:Cw,isBlob:_w,isRegExp:Vw,isFunction:ri,isStream:Aw,isURLSearchParams:Rw,isTypedArray:Ww,isFileList:kw,forEach:Ia,merge:fu,extend:Ow,trim:Lw,stripBOM:Nw,inherits:Dw,toFlatObject:Pw,kindOf:Tl,kindOfTest:Hi,endsWith:Fw,toArray:zw,forEachEntry:Bw,matchAll:jw,isHTMLForm:Hw,hasOwnProperty:pu,hasOwnProp:pu,reduceDescriptors:Jf,freezeMethods:qw,toObjectSet:Gw,toCamelCase:Uw,noop:Kw,toFiniteNumber:Yw,findKey:Kf,global:os,isContextDefined:Yf,isSpecCompliantForm:Jw,toJSONObject:Zw,isAsyncFn:Xw,isThenable:Qw,setImmediate:Zf,asap:ex,isIterable:tx},nx=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"]),rx=t=>{const n={};let e,r,m;return t&&t.split(`
2
+ `).forEach(function(f){m=f.indexOf(":"),e=f.substring(0,m).trim().toLowerCase(),r=f.substring(m+1).trim(),!(!e||n[e]&&nx[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n},Xf=Symbol("internals"),ix=/[^\x09\x20-\x7E\x80-\xFF]/g;function ox(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}function La(t){return t&&String(t).trim().toLowerCase()}function sx(t){return ox(t.replace(ix,""))}function Ll(t){return t===!1||t==null?t:Ce.isArray(t)?t.map(Ll):sx(String(t))}function ax(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const lx=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function gu(t,n,e,r,m){if(Ce.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!Ce.isString(n)){if(Ce.isString(r))return n.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(n)}}function cx(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function ux(t,n){const e=Ce.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{__proto__:null,value:function(m,f,g){return this[r].call(this,n,m,f,g)},configurable:!0})})}let Wr=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function f(w,u,d){const a=La(u);if(!a)throw new Error("header name must be a non-empty string");const l=Ce.findKey(m,a);(!l||m[l]===void 0||d===!0||d===void 0&&m[l]!==!1)&&(m[l||u]=Ll(w))}const g=(w,u)=>Ce.forEach(w,(d,a)=>f(d,a,u));if(Ce.isPlainObject(n)||n instanceof this.constructor)g(n,e);else if(Ce.isString(n)&&(n=n.trim())&&!lx(n))g(rx(n),e);else if(Ce.isObject(n)&&Ce.isIterable(n)){let w={},u,d;for(const a of n){if(!Ce.isArray(a))throw TypeError("Object iterator must return a key-value pair");w[d=a[0]]=(u=w[d])?Ce.isArray(u)?[...u,a[1]]:[u,a[1]]:a[1]}g(w,e)}else n!=null&&f(e,n,r);return this}get(n,e){if(n=La(n),n){const r=Ce.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return ax(m);if(Ce.isFunction(e))return e.call(this,m,r);if(Ce.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=La(n),n){const r=Ce.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||gu(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function f(g){if(g=La(g),g){const w=Ce.findKey(r,g);w&&(!e||gu(r,r[w],w,e))&&(delete r[w],m=!0)}}return Ce.isArray(n)?n.forEach(f):f(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const f=e[r];(!n||gu(this,this[f],f,n,!0))&&(delete this[f],m=!0)}return m}normalize(n){const e=this,r={};return Ce.forEach(this,(m,f)=>{const g=Ce.findKey(r,f);if(g){e[g]=Ll(m),delete e[f];return}const w=n?cx(f):String(f).trim();w!==f&&delete e[f],e[w]=Ll(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return Ce.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&Ce.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[Xf]=this[Xf]={accessors:{}}).accessors,r=this.prototype;function m(f){const g=La(f);e[g]||(ux(r,f),e[g]=!0)}return Ce.isArray(n)?n.forEach(m):m(n),this}};Wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Wr.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),Ce.freezeMethods(Wr);const hx="[REDACTED ****]";function dx(t){if(Ce.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(Ce.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function fx(t,n){const e=new Set(n.map(f=>String(f).toLowerCase())),r=[],m=f=>{if(f===null||typeof f!="object"||Ce.isBuffer(f))return f;if(r.indexOf(f)!==-1)return;f instanceof Wr&&(f=f.toJSON()),r.push(f);let g;if(Ce.isArray(f))g=[],f.forEach((w,u)=>{const d=m(w);Ce.isUndefined(d)||(g[u]=d)});else{if(!Ce.isPlainObject(f)&&dx(f))return r.pop(),f;g=Object.create(null);for(const[w,u]of Object.entries(f)){const d=e.has(w.toLowerCase())?hx:m(u);Ce.isUndefined(d)||(g[w]=d)}}return r.pop(),g};return m(t)}let nt=class G0 extends Error{static from(n,e,r,m,f,g){const w=new G0(n.message,e||n.code,r,m,f);return w.cause=n,w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),g&&Object.assign(w,g),w}constructor(n,e,r,m,f){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),f&&(this.response=f,this.status=f.status)}toJSON(){const n=this.config,e=n&&Ce.hasOwnProp(n,"redact")?n.redact:void 0,r=Ce.isArray(e)&&e.length>0?fx(n,e):Ce.toJSONObject(n);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}}};nt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",nt.ERR_BAD_OPTION="ERR_BAD_OPTION",nt.ECONNABORTED="ECONNABORTED",nt.ETIMEDOUT="ETIMEDOUT",nt.ECONNREFUSED="ECONNREFUSED",nt.ERR_NETWORK="ERR_NETWORK",nt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",nt.ERR_DEPRECATED="ERR_DEPRECATED",nt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",nt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",nt.ERR_CANCELED="ERR_CANCELED",nt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",nt.ERR_INVALID_URL="ERR_INVALID_URL",nt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const px=null;function mu(t){return Ce.isPlainObject(t)||Ce.isArray(t)}function Qf(t){return Ce.endsWith(t,"[]")?t.slice(0,-2):t}function vu(t,n,e){return t?t.concat(n).map(function(r,m){return r=Qf(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function gx(t){return Ce.isArray(t)&&!t.some(mu)}const mx=Ce.toFlatObject(Ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Ol(t,n,e){if(!Ce.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=Ce.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(s,p){return!Ce.isUndefined(p[s])});const r=e.metaTokens,m=e.visitor||l,f=e.dots,g=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,u=e.maxDepth===void 0?100:e.maxDepth,d=w&&Ce.isSpecCompliantForm(n);if(!Ce.isFunction(m))throw new TypeError("visitor must be a function");function a(s){if(s===null)return"";if(Ce.isDate(s))return s.toISOString();if(Ce.isBoolean(s))return s.toString();if(!d&&Ce.isBlob(s))throw new nt("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(s)||Ce.isTypedArray(s)?d&&typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function l(s,p,b){let x=s;if(Ce.isReactNative(n)&&Ce.isReactNativeBlob(s))return n.append(vu(b,p,f),a(s)),!1;if(s&&!b&&typeof s=="object"){if(Ce.endsWith(p,"{}"))p=r?p:p.slice(0,-2),s=JSON.stringify(s);else if(Ce.isArray(s)&&gx(s)||(Ce.isFileList(s)||Ce.endsWith(p,"[]"))&&(x=Ce.toArray(s)))return p=Qf(p),x.forEach(function(M,R){!(Ce.isUndefined(M)||M===null)&&n.append(g===!0?vu([p],R,f):g===null?p:p+"[]",a(M))}),!1}return mu(s)?!0:(n.append(vu(b,p,f),a(s)),!1)}const c=[],h=Object.assign(mx,{defaultVisitor:l,convertValue:a,isVisitable:mu});function o(s,p,b=0){if(!Ce.isUndefined(s)){if(b>u)throw new nt("Object is too deeply nested ("+b+" levels). Max depth: "+u,nt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(c.indexOf(s)!==-1)throw Error("Circular reference detected in "+p.join("."));c.push(s),Ce.forEach(s,function(x,M){(!(Ce.isUndefined(x)||x===null)&&m.call(n,x,Ce.isString(M)?M.trim():M,p,h))===!0&&o(x,p?p.concat(M):[M],b+1)}),c.pop()}}if(!Ce.isObject(t))throw new TypeError("data must be an object");return o(t),n}function ep(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function yu(t,n){this._pairs=[],t&&Ol(t,this,n)}const tp=yu.prototype;tp.append=function(t,n){this._pairs.push([t,n])},tp.toString=function(t){const n=t?function(e){return t.call(this,e,ep)}:ep;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function vx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function np(t,n,e){if(!n)return t;const r=e&&e.encode||vx,m=Ce.isFunction(e)?{serialize:e}:e,f=m&&m.serialize;let g;if(f?g=f(n,m):g=Ce.isURLSearchParams(n)?n.toString():new yu(n,m).toString(r),g){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+g}return t}let rp=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){Ce.forEach(this.handlers,function(e){e!==null&&n(e)})}};const bu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},yx=typeof URLSearchParams<"u"?URLSearchParams:yu,bx=typeof FormData<"u"?FormData:null,wx=typeof Blob<"u"?Blob:null,xx={isBrowser:!0,classes:{URLSearchParams:yx,FormData:bx,Blob:wx},protocols:["http","https","file","blob","url","data"]},wu=typeof window<"u"&&typeof document<"u",xu=typeof navigator=="object"&&navigator||void 0,Cx=wu&&(!xu||["ReactNative","NativeScript","NS"].indexOf(xu.product)<0),_x=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kx=wu&&window.location.href||"http://localhost",Ax=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wu,hasStandardBrowserEnv:Cx,hasStandardBrowserWebWorkerEnv:_x,navigator:xu,origin:kx},Symbol.toStringTag,{value:"Module"})),Er={...Ax,...xx};function Sx(t,n){return Ol(t,new Er.classes.URLSearchParams,{visitor:function(e,r,m,f){return Er.isNode&&Ce.isBuffer(e)?(this.append(r,e.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...n})}function $x(t){return Ce.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Rx(t){const n={},e=Object.keys(t);let r;const m=e.length;let f;for(r=0;r<m;r++)f=e[r],n[f]=t[f];return n}function ip(t){function n(e,r,m,f){let g=e[f++];if(g==="__proto__")return!0;const w=Number.isFinite(+g),u=f>=e.length;return g=!g&&Ce.isArray(m)?m.length:g,u?(Ce.hasOwnProp(m,g)?m[g]=Ce.isArray(m[g])?m[g].concat(r):[m[g],r]:m[g]=r,!w):((!m[g]||!Ce.isObject(m[g]))&&(m[g]=[]),n(e,r,m[g],f)&&Ce.isArray(m[g])&&(m[g]=Rx(m[g])),!w)}if(Ce.isFormData(t)&&Ce.isFunction(t.entries)){const e={};return Ce.forEachEntry(t,(r,m)=>{n($x(r),m,e,0)}),e}return null}const qs=(t,n)=>t!=null&&Ce.hasOwnProp(t,n)?t[n]:void 0;function Ex(t,n,e){if(Ce.isString(t))try{return(n||JSON.parse)(t),Ce.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const Oa={transitional:bu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=Ce.isObject(t);if(m&&Ce.isHTMLForm(t)&&(t=new FormData(t)),Ce.isFormData(t))return r?JSON.stringify(ip(t)):t;if(Ce.isArrayBuffer(t)||Ce.isBuffer(t)||Ce.isStream(t)||Ce.isFile(t)||Ce.isBlob(t)||Ce.isReadableStream(t))return t;if(Ce.isArrayBufferView(t))return t.buffer;if(Ce.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(m){const g=qs(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return Sx(t,g).toString();if((f=Ce.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=qs(this,"env"),u=w&&w.FormData;return Ol(f?{"files[]":t}:t,u&&new u,g)}}return m||r?(n.setContentType("application/json",!1),Ex(t)):t}],transformResponse:[function(t){const n=qs(this,"transitional")||Oa.transitional,e=n&&n.forcedJSONParsing,r=qs(this,"responseType"),m=r==="json";if(Ce.isResponse(t)||Ce.isReadableStream(t))return t;if(t&&Ce.isString(t)&&(e&&!r||m)){const f=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,qs(this,"parseReviver"))}catch(g){if(f)throw g.name==="SyntaxError"?nt.from(g,nt.ERR_BAD_RESPONSE,this,null,qs(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Er.classes.FormData,Blob:Er.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch","query"],t=>{Oa.headers[t]={}});function Cu(t,n){const e=this||Oa,r=n||e,m=Wr.from(r.headers);let f=r.data;return Ce.forEach(t,function(g){f=g.call(e,f,m.normalize(),n?n.status:void 0)}),m.normalize(),f}function op(t){return!!(t&&t.__CANCEL__)}let Na=class extends nt{constructor(n,e,r){super(n??"canceled",nt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function sp(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new nt("Request failed with status code "+e.status,e.status>=400&&e.status<500?nt.ERR_BAD_REQUEST:nt.ERR_BAD_RESPONSE,e.config,e.request,e))}function Tx(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function Mx(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,f=0,g;return n=n!==void 0?n:1e3,function(w){const u=Date.now(),d=r[f];g||(g=u),e[m]=w,r[m]=u;let a=f,l=0;for(;a!==m;)l+=e[a++],a=a%t;if(m=(m+1)%t,m===f&&(f=(f+1)%t),u-g<n)return;const c=d&&u-d;return c?Math.round(l*1e3/c):void 0}}function Ix(t,n){let e=0,r=1e3/n,m,f;const g=(w,u=Date.now())=>{e=u,m=null,f&&(clearTimeout(f),f=null),t(...w)};return[(...w)=>{const u=Date.now(),d=u-e;d>=r?g(w,u):(m=w,f||(f=setTimeout(()=>{f=null,g(m)},r-d)))},()=>m&&g(m)]}const Nl=(t,n,e=3)=>{let r=0;const m=Mx(50,250);return Ix(f=>{const g=f.loaded,w=f.lengthComputable?f.total:void 0,u=w!=null?Math.min(g,w):g,d=Math.max(0,u-r),a=m(d);r=Math.max(r,u);const l={loaded:u,total:w,progress:w?u/w:void 0,bytes:d,rate:a||void 0,estimated:a&&w?(w-u)/a:void 0,event:f,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(l)},e)},ap=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},lp=t=>(...n)=>Ce.asap(()=>t(...n)),Lx=Er.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,Er.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(Er.origin),Er.navigator&&/(msie|trident)/i.test(Er.navigator.userAgent)):()=>!0,Ox=Er.hasStandardBrowserEnv?{write(t,n,e,r,m,f,g){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];Ce.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),Ce.isString(r)&&w.push(`path=${r}`),Ce.isString(m)&&w.push(`domain=${m}`),f===!0&&w.push("secure"),Ce.isString(g)&&w.push(`SameSite=${g}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let e=0;e<n.length;e++){const r=n[e].replace(/^\s+/,""),m=r.indexOf("=");if(m!==-1&&r.slice(0,m)===t)return decodeURIComponent(r.slice(m+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Nx(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Dx(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function cp(t,n,e){let r=!Nx(n);return t&&(r||e===!1)?Dx(t,n):n}const up=t=>t instanceof Wr?{...t}:t;function ss(t,n){n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,a,l,c){return Ce.isPlainObject(d)&&Ce.isPlainObject(a)?Ce.merge.call({caseless:c},d,a):Ce.isPlainObject(a)?Ce.merge({},a):Ce.isArray(a)?a.slice():a}function m(d,a,l,c){if(Ce.isUndefined(a)){if(!Ce.isUndefined(d))return r(void 0,d,l,c)}else return r(d,a,l,c)}function f(d,a){if(!Ce.isUndefined(a))return r(void 0,a)}function g(d,a){if(Ce.isUndefined(a)){if(!Ce.isUndefined(d))return r(void 0,d)}else return r(void 0,a)}function w(d,a,l){if(Ce.hasOwnProp(n,l))return r(d,a);if(Ce.hasOwnProp(t,l))return r(void 0,d)}const u={url:f,method:f,data:f,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:w,headers:(d,a,l)=>m(up(d),up(a),l,!0)};return Ce.forEach(Object.keys({...t,...n}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const a=Ce.hasOwnProp(u,d)?u[d]:m,l=Ce.hasOwnProp(t,d)?t[d]:void 0,c=Ce.hasOwnProp(n,d)?n[d]:void 0,h=a(l,c,d);Ce.isUndefined(h)&&a!==w||(e[d]=h)}),e}const Px=["content-type","content-length"];function Fx(t,n,e){if(e!=="content-only"){t.set(n);return}Object.entries(n).forEach(([r,m])=>{Px.includes(r.toLowerCase())&&t.set(r,m)})}const zx=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16))),hp=t=>{const n=ss({},t),e=c=>Ce.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const f=e("xsrfHeaderName"),g=e("xsrfCookieName");let w=e("headers");const u=e("auth"),d=e("baseURL"),a=e("allowAbsoluteUrls"),l=e("url");if(n.headers=w=Wr.from(w),n.url=np(cp(d,l,a),t.params,t.paramsSerializer),u&&w.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?zx(u.password):""))),Ce.isFormData(r)&&(Er.hasStandardBrowserEnv||Er.hasStandardBrowserWebWorkerEnv?w.setContentType(void 0):Ce.isFunction(r.getHeaders)&&Fx(w,r.getHeaders(),e("formDataHeaderPolicy"))),Er.hasStandardBrowserEnv&&(Ce.isFunction(m)&&(m=m(n)),m===!0||m==null&&Lx(n.url))){const c=f&&g&&Ox.read(g);c&&w.set(f,c)}return n},Wx=typeof XMLHttpRequest<"u",Bx=Wx&&function(t){return new Promise(function(n,e){const r=hp(t);let m=r.data;const f=Wr.from(r.headers).normalize();let{responseType:g,onUploadProgress:w,onDownloadProgress:u}=r,d,a,l,c,h;function o(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function p(){if(!s)return;const x=Wr.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),M={data:!g||g==="text"||g==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:t,request:s};sp(function(R){n(R),o()},function(R){e(R),o()},M),s=null}"onloadend"in s?s.onloadend=p:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.startsWith("file:"))||setTimeout(p)},s.onabort=function(){s&&(e(new nt("Request aborted",nt.ECONNABORTED,t,s)),o(),s=null)},s.onerror=function(x){const M=x&&x.message?x.message:"Network Error",R=new nt(M,nt.ERR_NETWORK,t,s);R.event=x||null,e(R),o(),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||bu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new nt(x,M.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,t,s)),o(),s=null},m===void 0&&f.setContentType(null),"setRequestHeader"in s&&Ce.forEach(f.toJSON(),function(x,M){s.setRequestHeader(M,x)}),Ce.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),g&&g!=="json"&&(s.responseType=r.responseType),u&&([l,h]=Nl(u,!0),s.addEventListener("progress",l)),w&&s.upload&&([a,c]=Nl(w),s.upload.addEventListener("progress",a),s.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new Na(null,t,s):x),s.abort(),o(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const b=Tx(r.url);if(b&&!Er.protocols.includes(b)){e(new nt("Unsupported protocol "+b+":",nt.ERR_BAD_REQUEST,t));return}s.send(m||null)})},jx=(t,n)=>{const{length:e}=t=t?t.filter(Boolean):[];if(n||e){let r=new AbortController,m;const f=function(d){if(!m){m=!0,w();const a=d instanceof Error?d:this.reason;r.abort(a instanceof nt?a:new Na(a instanceof Error?a.message:a))}};let g=n&&setTimeout(()=>{g=null,f(new nt(`timeout of ${n}ms exceeded`,nt.ETIMEDOUT))},n);const w=()=>{t&&(g&&clearTimeout(g),g=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(f):d.removeEventListener("abort",f)}),t=null)};t.forEach(d=>d.addEventListener("abort",f));const{signal:u}=r;return u.unsubscribe=()=>Ce.asap(w),u}},Hx=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},Ux=async function*(t,n){for await(const e of Vx(t))yield*Hx(e,n)},Vx=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},dp=(t,n,e,r)=>{const m=Ux(t,n);let f=0,g,w=u=>{g||(g=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:a}=await m.next();if(d){w(),u.close();return}let l=a.byteLength;if(e){let c=f+=l;e(c)}u.enqueue(new Uint8Array(a))}catch(d){throw w(d),d}},cancel(u){return w(u),m.return()}},{highWaterMark:2})};function qx(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const e=t.slice(5,n),r=t.slice(n+1);if(/;base64/i.test(e)){let f=r.length;const g=r.length;for(let l=0;l<g;l++)if(r.charCodeAt(l)===37&&l+2<g){const c=r.charCodeAt(l+1),h=r.charCodeAt(l+2);(c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102)&&(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102)&&(f-=2,l+=2)}let w=0,u=g-1;const d=l=>l>=2&&r.charCodeAt(l-2)===37&&r.charCodeAt(l-1)===51&&(r.charCodeAt(l)===68||r.charCodeAt(l)===100);u>=0&&(r.charCodeAt(u)===61?(w++,u--):d(u)&&(w++,u-=3)),w===1&&u>=0&&(r.charCodeAt(u)===61||d(u))&&w++;const a=Math.floor(f/4)*3-(w||0);return a>0?a:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let m=0;for(let f=0,g=r.length;f<g;f++){const w=r.charCodeAt(f);if(w<128)m+=1;else if(w<2048)m+=2;else if(w>=55296&&w<=56319&&f+1<g){const u=r.charCodeAt(f+1);u>=56320&&u<=57343?(m+=4,f++):m+=3}else m+=3}return m}const _u="1.16.0",fp=64*1024,{isFunction:Dl}=Ce,pp=(t,...n)=>{try{return!!t(...n)}catch{return!1}},Gx=t=>{const n=Ce.global??globalThis,{ReadableStream:e,TextEncoder:r}=n;t=Ce.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:m,Request:f,Response:g}=t,w=m?Dl(m):typeof fetch=="function",u=Dl(f),d=Dl(g);if(!w)return!1;const a=w&&Dl(e),l=w&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new f(b).arrayBuffer())),c=u&&a&&pp(()=>{let b=!1;const x=new f(Er.origin,{body:new e,method:"POST",get duplex(){return b=!0,"half"}}),M=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!M}),h=d&&a&&pp(()=>Ce.isReadableStream(new g("").body)),o={stream:h&&(b=>b.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!o[b]&&(o[b]=(x,M)=>{let R=x&&x[b];if(R)return R.call(x);throw new nt(`Response type '${b}' is not supported`,nt.ERR_NOT_SUPPORT,M)})});const s=async b=>{if(b==null)return 0;if(Ce.isBlob(b))return b.size;if(Ce.isSpecCompliantForm(b))return(await new f(Er.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(b)||Ce.isArrayBuffer(b))return b.byteLength;if(Ce.isURLSearchParams(b)&&(b=b+""),Ce.isString(b))return(await l(b)).byteLength},p=async(b,x)=>Ce.toFiniteNumber(b.getContentLength())??s(x);return async b=>{let{url:x,method:M,data:R,signal:A,cancelToken:C,timeout:O,onDownloadProgress:D,onUploadProgress:I,responseType:T,headers:B,withCredentials:F="same-origin",fetchOptions:L,maxContentLength:$,maxBodyLength:_}=hp(b);const N=Ce.isNumber($)&&$>-1,W=Ce.isNumber(_)&&_>-1;let U=m||fetch;T=T?(T+"").toLowerCase():"text";let G=jx([A,C&&C.toAbortSignal()],O),J=null;const te=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let he;try{if(N&&typeof x=="string"&&x.startsWith("data:")&&qx(x)>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,b,J);if(W&&M!=="get"&&M!=="head"){const ve=await p(B,R);if(typeof ve=="number"&&isFinite(ve)&&ve>_)throw new nt("Request body larger than maxBodyLength limit",nt.ERR_BAD_REQUEST,b,J)}if(I&&c&&M!=="get"&&M!=="head"&&(he=await p(B,R))!==0){let ve=new f(x,{method:"POST",body:R,duplex:"half"}),$e;if(Ce.isFormData(R)&&($e=ve.headers.get("content-type"))&&B.setContentType($e),ve.body){const[Ee,qe]=ap(he,Nl(lp(I)));R=dp(ve.body,fp,Ee,qe)}}Ce.isString(F)||(F=F?"include":"omit");const ee=u&&"credentials"in f.prototype;if(Ce.isFormData(R)){const ve=B.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&B.delete("content-type")}B.set("User-Agent","axios/"+_u,!1);const le={...L,signal:G,method:M.toUpperCase(),headers:B.normalize().toJSON(),body:R,duplex:"half",credentials:ee?F:void 0};J=u&&new f(x,le);let se=await(u?U(J,L):U(x,le));if(N){const ve=Ce.toFiniteNumber(se.headers.get("content-length"));if(ve!=null&&ve>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,b,J)}const ce=h&&(T==="stream"||T==="response");if(h&&se.body&&(D||N||ce&&te)){const ve={};["status","statusText","headers"].forEach(Xe=>{ve[Xe]=se[Xe]});const $e=Ce.toFiniteNumber(se.headers.get("content-length")),[Ee,qe]=D&&ap($e,Nl(lp(D),!0))||[];let He=0;const tt=Xe=>{if(N&&(He=Xe,He>$))throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,b,J);Ee&&Ee(Xe)};se=new g(dp(se.body,fp,tt,()=>{qe&&qe(),te&&te()}),ve)}T=T||"text";let pe=await o[Ce.findKey(o,T)||"text"](se,b);if(N&&!h&&!ce){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>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,b,J)}return!ce&&te&&te(),await new Promise((ve,$e)=>{sp(ve,$e,{data:pe,headers:Wr.from(se.headers),status:se.status,statusText:se.statusText,config:b,request:J})})}catch(ee){if(te&&te(),G&&G.aborted&&G.reason instanceof nt){const le=G.reason;throw le.config=b,J&&(le.request=J),ee!==le&&(le.cause=ee),le}throw ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new nt("Network Error",nt.ERR_NETWORK,b,J,ee&&ee.response),{cause:ee.cause||ee}):nt.from(ee,ee&&ee.code,b,J,ee&&ee.response)}}},Kx=new Map,gp=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,f=[r,m,e];let g=f.length,w=g,u,d,a=Kx;for(;w--;)u=f[w],d=a.get(u),d===void 0&&a.set(u,d=w?new Map:Gx(n)),a=d;return d};gp();const ku={http:px,xhr:Bx,fetch:{get:gp}};Ce.forEach(ku,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const mp=t=>`- ${t}`,Yx=t=>Ce.isFunction(t)||t===null||t===!1;function Jx(t,n){t=Ce.isArray(t)?t:[t];const{length:e}=t;let r,m;const f={};for(let g=0;g<e;g++){r=t[g];let w;if(m=r,!Yx(r)&&(m=ku[(w=String(r)).toLowerCase()],m===void 0))throw new nt(`Unknown adapter '${w}'`);if(m&&(Ce.isFunction(m)||(m=m.get(n))))break;f[w||"#"+g]=m}if(!m){const g=Object.entries(f).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let w=e?g.length>1?`since :
4
+ `+g.map(mp).join(`
5
+ `):" "+mp(g[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return m}const vp={getAdapter:Jx,adapters:ku};function Au(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Na(null,t)}function yp(t){return Au(t),t.headers=Wr.from(t.headers),t.data=Cu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),vp.getAdapter(t.adapter||Oa.adapter,t)(t).then(function(n){Au(t),t.response=n;try{n.data=Cu.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=Wr.from(n.headers),n},function(n){if(!op(n)&&(Au(t),n&&n.response)){t.response=n.response;try{n.response.data=Cu.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=Wr.from(n.response.headers)}return Promise.reject(n)})}const Pl={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Pl[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const bp={};Pl.transitional=function(t,n,e){function r(m,f){return"[Axios v"+_u+"] Transitional option '"+m+"'"+f+(e?". "+e:"")}return(m,f,g)=>{if(t===!1)throw new nt(r(f," has been removed"+(n?" in "+n:"")),nt.ERR_DEPRECATED);return n&&!bp[f]&&(bp[f]=!0,console.warn(r(f," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,f,g):!0}},Pl.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function Zx(t,n,e){if(typeof t!="object")throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const f=r[m],g=Object.prototype.hasOwnProperty.call(n,f)?n[f]:void 0;if(g){const w=t[f],u=w===void 0||g(w,f,t);if(u!==!0)throw new nt("option "+f+" must be "+u,nt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new nt("Unknown option "+f,nt.ERR_BAD_OPTION)}}const Fl={assertOptions:Zx,validators:Pl},Ri=Fl.validators;let as=class{constructor(n){this.defaults=n||{},this.interceptors={request:new rp,response:new rp}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const f=(()=>{if(!m.stack)return"";const g=m.stack.indexOf(`
6
+ `);return g===-1?"":m.stack.slice(g+1)})();try{if(!r.stack)r.stack=f;else if(f){const g=f.indexOf(`
7
+ `),w=g===-1?-1:f.indexOf(`
8
+ `,g+1),u=w===-1?"":f.slice(w+1);String(r.stack).endsWith(u)||(r.stack+=`
9
+ `+f)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=ss(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:f}=e;r!==void 0&&Fl.assertOptions(r,{silentJSONParsing:Ri.transitional(Ri.boolean),forcedJSONParsing:Ri.transitional(Ri.boolean),clarifyTimeoutError:Ri.transitional(Ri.boolean),legacyInterceptorReqResOrdering:Ri.transitional(Ri.boolean)},!1),m!=null&&(Ce.isFunction(m)?e.paramsSerializer={serialize:m}:Fl.assertOptions(m,{encode:Ri.function,serialize:Ri.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Fl.assertOptions(e,{baseUrl:Ri.spelling("baseURL"),withXsrfToken:Ri.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=f&&Ce.merge(f.common,f[e.method]);f&&Ce.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete f[o]}),e.headers=Wr.concat(g,f);const w=[];let u=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;u=u&&o.synchronous;const s=e.transitional||bu;s&&s.legacyInterceptorReqResOrdering?w.unshift(o.fulfilled,o.rejected):w.push(o.fulfilled,o.rejected)});const d=[];this.interceptors.response.forEach(function(o){d.push(o.fulfilled,o.rejected)});let a,l=0,c;if(!u){const o=[yp.bind(this),void 0];for(o.unshift(...w),o.push(...d),c=o.length,a=Promise.resolve(e);l<c;)a=a.then(o[l++],o[l++]);return a}c=w.length;let h=e;for(;l<c;){const o=w[l++],s=w[l++];try{h=o(h)}catch(p){s.call(this,p);break}}try{a=yp.call(this,h)}catch(o){return Promise.reject(o)}for(l=0,c=d.length;l<c;)a=a.then(d[l++],d[l++]);return a}getUri(n){n=ss(this.defaults,n);const e=cp(n.baseURL,n.url,n.allowAbsoluteUrls);return np(e,n.params,n.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(t){as.prototype[t]=function(n,e){return this.request(ss(e||{},{method:t,url:n,data:(e||{}).data}))}}),Ce.forEach(["post","put","patch","query"],function(t){function n(e){return function(r,m,f){return this.request(ss(f||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}as.prototype[t]=n(),t!=="query"&&(as.prototype[t+"Form"]=n(!0))});let Xx=class K0{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](m);r._listeners=null}),this.promise.then=m=>{let f;const g=new Promise(w=>{r.subscribe(w),f=w}).then(m);return g.cancel=function(){r.unsubscribe(f)},g},n(function(m,f,g){r.reason||(r.reason=new Na(m,f,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new K0(function(e){n=e}),cancel:n}}};function Qx(t){return function(n){return t.apply(null,n)}}function e1(t){return Ce.isObject(t)&&t.isAxiosError===!0}const Su={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(Su).forEach(([t,n])=>{Su[n]=t});function wp(t){const n=new as(t),e=jf(as.prototype.request,n);return Ce.extend(e,as.prototype,n,{allOwnKeys:!0}),Ce.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return wp(ss(t,r))},e}const Hn=wp(Oa);Hn.Axios=as,Hn.CanceledError=Na,Hn.CancelToken=Xx,Hn.isCancel=op,Hn.VERSION=_u,Hn.toFormData=Ol,Hn.AxiosError=nt,Hn.Cancel=Hn.CanceledError,Hn.all=function(t){return Promise.all(t)},Hn.spread=Qx,Hn.isAxiosError=e1,Hn.mergeConfig=ss,Hn.AxiosHeaders=Wr,Hn.formToJSON=t=>ip(Ce.isHTMLForm(t)?new FormData(t):t),Hn.getAdapter=vp.getAdapter,Hn.HttpStatusCode=Su,Hn.default=Hn;const{Axios:w2,AxiosError:x2,CanceledError:C2,isCancel:_2,CancelToken:k2,VERSION:A2,all:S2,Cancel:$2,isAxiosError:R2,spread:E2,toFormData:T2,AxiosHeaders:M2,HttpStatusCode:I2,formToJSON:L2,getAdapter:O2,mergeConfig:N2,create:D2}=Hn,$u=Hn.create({baseURL:location.origin,timeout:6e4,params:{}});$u.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let n=`HTTP ${t.response.status} - `;t.response?.statusText&&(n+=`${t.response.statusText} `),t.response?.config?.data&&(n+=`${t.response.config.data} `),t.response?.data?.message?n+=`${t.response.data.message}`:t.response?.data?.exception?n+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(n+=`${t.response.data.error.class} `),n+=`${t.response.data.error.message}`):n+=`${t.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:n}),t}else throw t});const zl=async function(t,n,{data:e,params:r={},headers:m,noAuth:f=!1,noScope:g=!1,onUploadProgress:w=!1}={}){if(!f){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}m.Authorization=localStorage.openc3Token}return m.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),$u({method:t,url:n,data:e,params:r,headers:m,onUploadProgress:w})},Ru={Accept:"application/json"},xp={...Ru,"Content-Type":"application/json"},t1=Tn("S",{get:function(t,{params:n,headers:e=Ru,noScope:r,noAuth:m,onUploadProgress:f}={}){return zl("get",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:f})},put:function(t,{data:n,params:e,headers:r=xp,noScope:m,noAuth:f,onUploadProgress:g}={}){return zl("put",t,{data:n,params:e,headers:r,noScope:m,noAuth:f,onUploadProgress:g})},post:function(t,{data:n,params:e,headers:r=xp,noScope:m,noAuth:f,onUploadProgress:g}={}){return zl("post",t,{data:n,params:e,headers:r,noScope:m,noAuth:f,onUploadProgress:g})},delete:function(t,{params:n,headers:e=Ru,noScope:r,noAuth:m,onUploadProgress:f}={}){return zl("delete",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:f})}});let Wl=()=>({emit(t,...n){for(let e=this.events[t]||[],r=0,m=e.length;r<m;r++)e[r](...n)},events:{},on(t,n){return(this.events[t]||=[]).push(n),()=>{this.events[t]=this.events[t]?.filter(e=>n!==e)}}}),Da=class extends Error{constructor(n,e){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=e,this.name="ReasonError"}},Eu=class extends Da{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}};class n1 extends Da{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}let Ui=class extends Da{constructor(n,e){e?super(n,e):super("Disconnected",n),this.name="DisconnectedError"}};class r1 extends Ui{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}}function Cp(t){return t?`{${Object.keys(t).sort().filter(n=>t[n]!==void 0).map(n=>{let e=JSON.stringify(t[n]);return`${JSON.stringify(n)}:${e}`}).join(",")}}`:""}let i1=class{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,e){if(!this._info)return this._info={id:String(n),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((e,{id:r,info:m})=>(e[r]=m,e),{})}};const ls=Symbol("state");let _p=class{constructor(n={}){this.emitter=Wl(),this.params=Object.freeze(n),this.presence=new i1(this),this.initialConnect=!0,this[ls]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Cp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ls]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[ls]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ls]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[ls]="connected";let n=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[ls]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[ls]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,e)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(n,e){this.emit("message",n,e)}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}emit(n,...e){return this.emitter.emit(n,...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((n,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(m=>m()),n()})),r.push(this.on("close",m=>{r.forEach(f=>f()),e(m||new Da("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class o1{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let e=this.channels.indexOf(n);e>-1&&this.channels.splice(e,1)}notify(n,...e){this.state=n==="restored"?"connected":n,e.length===1?this.channels.forEach(r=>r[n](e[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let e=this._pendings[0];return!e||e.intent!==n?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(n){this._checkIntent(n);let e,r={promise:new Promise(f=>{e=f}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},m=this._pendingTop;return this._pendings.push(r),m&&await m.promise,this.gvl&&await this.gvl.acquire(r,n),r.acquired=!0,r}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let e=this._pendingTop;return!e||e.acquired||e.intent!==n?!1:(this._pendings.pop(),e.canceled=!0,!0)}}let s1=class{constructor(){this.queue=[]}async acquire(n,e){e==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}};class a1{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new s1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:e,unsubscribe:r}){let m=this._subscriptions[n]=new o1(n);return m.remoteId=this._localToRemote[n],m.subscriber=e,m.unsubscriber=r,m.gvl=this.glv,m}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,e){this._localToRemote[n]=e;let r=this.get(n);r&&(r.remoteId=e)}}class l1{constructor(n={}){this.subscriptions=new a1(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,e){this._remoteToLocal[e]=n,this.subscriptions.storeRemoteId(n,e),this.flush(e)}unsubscribe(n){let e=this.subscriptions.get(n);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,e,r){let m=this._remoteToLocal[n];if(!m){this._pendingMessages.push([n,e,r]);return}let f=this.subscriptions.get(m);f&&f.channels.forEach(g=>{g.receive(e,r)})}notify(n,e,r){let m=this._remoteToLocal[n];if(!m)return;let f=this.subscriptions.get(m);f&&f.channels.forEach(g=>g.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let e=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const kp={debug:0,info:1,warn:2,error:3};class Ap{constructor(n){this.level=n||"warn"}log(n,e,r){kp[n]<kp[this.level]||this.writeLogEntry(n,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,e){this.log("debug",n,e)}info(n,e){this.log("info",n,e)}warn(n,e){this.log("warn",n,e)}error(n,e){this.log("error",n,e)}}let Pa=class extends Ap{writeLogEntry(){}},c1=class{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}},u1=0,Sp=class{constructor(n={}){let{logger:e}=n;this.logger=e||new Pa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,e){let r={channel:n};e&&Object.assign(r,e);let m=Cp(r);if(this.pendingUnsubscriptions[m]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,m),new Promise(w=>{setTimeout(()=>{w(this.subscribe(n,e))},g)})}if(this.pendingSubscriptions[m])return this.logger.warn("subscription is already pending, skipping",m),Promise.reject(Error("Already subscribing"));let f=this.subscribeRetryInterval;return new Promise((g,w)=>{let u=++u1;this.pendingSubscriptions[m]={resolve:g,reject:w,id:u},this.cable.send(this.buildSubscribeRequest(m)),this.maybeRetrySubscribe(u,m,f)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(n,e,r))},r)}maybeExpireSubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(delete this.pendingSubscriptions[e],m.reject(new n1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,e,r){return e==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,e){return this.cable.send({command:"whisper",identifier:n,data:e}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m,reason:f,reconnect:g}=n;if(e==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="welcome"){let w=n.sid;return w&&this.cable.setSessionId(w),this.cable.connected()}if(e==="disconnect"){let w=new Ui(f);this.reset(w),g===!1?this.cable.closed(w):this.cable.disconnected(w);return}if(e==="confirm_subscription"){let w=this.pendingSubscriptions[r];if(!w){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],w.resolve(r)}if(e==="reject_subscription"){let w=this.pendingSubscriptions[r];return w?(delete this.pendingSubscriptions[r],w.reject(new Eu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(m)return{identifier:r,message:m};this.logger.warn(`unknown message type: ${e}`,{message:n})}reset(n){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const $p=()=>Date.now()/1e3|0;class h1 extends Sp{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=$p()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let e in this.pendingPresence)this.pendingPresence[e].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m}=n;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(e==="reject_subscription")return super.receive(n);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(e==="ping")return this.restoreSince&&(this.restoreSince=$p()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let f=n.restored_ids||Object.keys(this.subscriptionStreams);for(let g of f)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(f)}return this.cable.connected(this.sessionId)}if(e==="presence"){let f=m.type;if(f==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(m))}else if(f==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:m}}if(m){let f=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:m,meta:f}}this.logger.warn(`unknown message type: ${e}`,{message:n})}perform(n,e,r){switch(e){case"$presence:join":return this.join(n,r);case"$presence:leave":return this.leave(n,r);case"$presence:info":return this.presence(n,r)}return super.perform(n,e,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let e=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(e.history=r,this.pendingHistory[n]=!0);let m=this.presenceInfo[n];return m&&(e.presence=m),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let e={},r=!1;if(this.subscriptionStreams[n])for(let m of this.subscriptionStreams[n]){let f=this.streamsPositions[m];f&&(r=!0,e[m]=f)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(n,e,r,m){if(!(!e||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(e),this.streamsPositions[e]={epoch:r,offset:m},{stream:e,epoch:r,offset:m}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,e){return this.presenceInfo[n]=e,this.cable.send({command:"join",identifier:n,presence:e}),Promise.resolve()}async leave(n,e){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:e}),Promise.resolve()}presence(n,e){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,m)=>{this.pendingPresence[n]={resolve:r,reject:m},this.cable.send({command:"presence",identifier:n,data:e})})}}class d1 extends Da{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}let Rp=class extends _p{static identifier="__ghost__";constructor(n,e){super(e),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}};const f1="$pubsub";let Ep=class extends _p{static identifier=f1;async perform(n,e){if(n.startsWith("$"))return super.perform(n,e);throw Error("not implemented")}};const cs=Symbol("state");let p1=class{constructor({transport:t,protocol:n,encoder:e,logger:r,lazy:m,hubOptions:f,performFailures:g,transportConfigurator:w}){this.emitter=Wl(),this.transport=t,this.encoder=e,this.logger=r||new Pa,this.protocol=n,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new l1(f||{}),this[cs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=w,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,m===!1&&this.connect().catch(()=>{})}get state(){return this[cs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[cs]="connecting";let n=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(e){this.handleClose(e)}return n}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[cs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",new Ui("recovery_failed"))),this.hub.subscriptions.all().forEach(n=>this._resubscribe(n));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[cs]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Ui("recovery_failed")),this._resubscribe(r))});let n=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}notify(t,n,e){n&&typeof n!="string"&&(e=n,n=void 0),n?this.hub.notify(n,"info",{type:t,data:e}):this.emit("info",{type:t,data:e})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Ui(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[cs]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(n=>n.notify("connecting")):this.hub.subscriptions.all().forEach(n=>{n.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let n;t&&(n=t instanceof Ui?t:new Ui(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[cs]="closed";let e=n||new Ui("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",n)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let n=this.encoder.decode(t);if(n===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",n);let e=this.protocol.receive(n);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:m,message:f,meta:g}=e;r?this.hub.notify(m,r,f):this.hub.transmit(m,f,g)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let n=this.encoder.encode(t);if(n===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(n)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let n=new Ep({stream_name:t});return this.subscribe(n)}streamFromSigned(t){let n=new Ep({signed_stream_name:t});return this.subscribe(n)}subscribeTo(t,n){let e,r;return typeof t=="string"&&(r=t,t=Rp),e=r?new t(r,n):new t(n),this.subscribe(e)}subscribe(t){if(!t.attached(this))return t;let n=t.identifier;t.connecting();let e=this.hub.subscriptions.get(n)||this.hub.subscriptions.create(n,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(t),e.intent==="subscribed"&&e.state==="connected"&&t.connected(),e.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,n,e){let r=t.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 m=await t.acquire("subscribed");if(m.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),m.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),m.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),m.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),m.release();return}let f={identifier:n,params:e};this.logger.debug("subscribing",f);try{let g=await this.protocol.subscribe(n,e);this.hub.subscribe(r,g),this.logger.debug("subscribed",{...f,remoteId:g}),t.notify("connected")}catch(g){if(g){if(g instanceof Eu&&this.logger.warn("rejected",f),g instanceof Ui){this.logger.debug("disconnected during subscription; will retry on connect",f),m.release();return}this.logger.error("failed to subscribe",{error:g,...f})}t.close(g),this.hub.unsubscribe(r)}m.release()}unsubscribe(t){let n=t.identifier,e=this.hub.subscriptions.get(n);if(!e)throw Error(`Subscription not found: ${n}`);e.remove(t),t.closed(),e.maybeUnsubscribe()}async _unsubscribe(t){let n=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:n});let e=await t.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:n}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:n}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:n,intent:t.intent}),e.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:n}),e.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:n}),t.close(),this.hub.unsubscribe(n),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:n})}catch(m){m&&(m instanceof Ui?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:n,error:m}):this.logger.error("unsubscribe failed",{id:n,error:m}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(n)):t.state="closed",e.release()}async perform(t,n,e){if(this.performFailures==="throw")return this._perform(t,n,e);try{return await this._perform(t,n,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,n,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new d1;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let m=r.remoteId,f={id:m,action:n,payload:e};this.logger.debug("perform",f);try{let g=await this.protocol.perform(m,n,e);return g&&this.logger.debug("perform result",{message:g,request:f}),g}catch(g){throw this.logger.error("perform failed",{error:g,request:f}),g}}on(t,n){return this.emitter.on(t,n)}once(t,n){let e=this.emitter.on(t,(...r)=>{e(),n(...r)});return e}emit(t,...n){return this.emitter.emit(t,...n)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,n)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),t()})),e.push(this.on("close",r=>{e.forEach(m=>m()),n(r)})),e.push(this.on("disconnect",r=>{e.forEach(m=>m()),n(r)}))}),this._pendingConnect)}};const g1={maxMissingPings:2,maxReconnectAttempts:1/0},Gs=()=>Date.now(),Tp=(t,n)=>{n=n||{};let{backoffRate:e,jitterRatio:r,maxInterval:m}=n;return e=e||2,r===void 0&&(r=.5),f=>{let g=t*e**f,w=g*e,u=g+(w-g)*Math.random(),d=2*(Math.random()-.5)*r;return u=u*(1+d),m&&m<u&&(u=m),u}};let Mp=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},g1,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 Pa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Gs()}watch(n){this.target=n,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(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=Gs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Gs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Gs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Gs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=Gs()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new r1))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}},m1=class{constructor(n,e={}){this.transports=n,this.transport=null,this.emitter=Wl(),this.unbind=[],this.logger=e.logger||new Pa}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let e=this.transports[n];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(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}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(n,e){this.transports.forEach(r=>{r.setParam(n,e)})}setToken(n,e){this.transports.forEach(r=>{r.setToken(n,e)})}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}};class v1{constructor(n,e={}){this.url=n;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=Wl();let{format:m,subprotocol:f,authStrategy:g}=e;this.format=m||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=f}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let m=[];m.push(this.once("open",()=>{m.forEach(f=>f()),e()})),m.push(this.once("close",()=>{m.forEach(f=>f()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,e){let r=new URL(this.url);r.searchParams.set(n,e);let m=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(m)}setToken(n,e="jid"){if(this.authStrategy==="param")this.setParam(e,n);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(m=>m.toLowerCase()===r)||r,this.connectionOptions.headers[r]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let e=n.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 y1{constructor(n){this.channel=n}notify(n,...e){typeof this[n]=="function"&&this[n](...e)}perform(n,e={}){this.channel.perform(n,e)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}let b1=class extends Rp{constructor(n,e,r){super(n,e),this.subscription=new y1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:m})=>this.subscription.notify("connected",{reconnected:m})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",m=>this.subscription.notify("received",m)),this.on("close",m=>{m&&m instanceof Eu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}};class w1{constructor(n){this.cable=n}create(n,e){let r,m;typeof n=="object"?(r=n.channel,delete n.channel,m=n):(r=n,m={});let f=new b1(r,m,e);return f.subscription.notify("initialized"),this.cable.subscribe(f),f.subscription}findAll(n){return this.cable.hub.channels.filter(e=>e.identifier===n).map(e=>e.subscription)}}class x1{constructor(n){this.cable=n,this.subscriptions=new w1(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const Ip={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function C1(t,n){if(typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),n=n||{},!t&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},Ip,n);let{protocol:e,websocketImplementation:r,websocketFormat:m,websocketOptions:f,websocketAuthStrategy:g,fallbacks:w,logLevel:u,logger:d,transport:a,encoder:l,lazy:c,monitor:h,pingInterval:o,reconnectStrategy:s,maxMissingPings:p,maxReconnectAttempts:b,subprotocol:x,tokenRefresher:M,historyTimestamp:R,protocolOptions:A,concurrentSubscribes:C,performFailures:O,transportConfigurator:D,auth:I}=n;if(d=d||new Pa(u),typeof e=="string"){x=x||e;let F=e.substring(0,e.lastIndexOf("-")),L=e.substring(e.lastIndexOf("-")+1);if(A=A||{},F==="actioncable-v1")e=new Sp({logger:d,...A});else if(F==="actioncable-v1-ext")e=new h1({logger:d,historyTimestamp:R,...A});else throw Error(`Protocol is not supported yet: ${e}`);if(L==="json")l=l||new c1,m=m||"text";else if(L==="msgpack"){if(m="binary",!l)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(L==="protobuf"){if(m=m||"binary",!l)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");a=a||new v1(t,{websocketImplementation:r,websocketOptions:f,subprotocol:x,authStrategy:g,format:m}),w&&(a=new m1([a,...w],{logger:d})),I&&I.token&&a.setToken(I.token,I.param||"jid"),s=s||Tp(o),h!==!1&&(h=h||new Mp({pingInterval:o,reconnectStrategy:s,maxMissingPings:p,maxReconnectAttempts:b,logger:d}));let T={concurrentSubscribes:C},B=new p1({protocol:e,transport:a,encoder:l,logger:d,lazy:c,hubOptions:T,performFailures:O,transportConfigurator:D});return h&&(h.watch(B),B.monitor=h),M&&_1(B,async()=>{try{await M(a)}catch(F){return d.error("Failed to refresh authentication token: "+F),!1}return B.connect().catch(()=>{}),!0}),B}function _1(t,n){let e=!1;t.on("connect",()=>e=!1),t.on("close",async r=>{if(r){if(e){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await n())}})}class k1 extends Ap{writeLogEntry(n,e,r){r?console[n](e,r):console[n](e)}}class A1 extends Mp{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=m=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:m})},r=()=>this.disconnect(new Ui("page_frozen"));document.addEventListener("visibilitychange",n,!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",n,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}}const S1=["cable","action-cable"],$1="/cable",Bl=(t,n)=>{for(let e of S1){let r=t.head.querySelector(`meta[name='${e}-${n}']`);if(r)return r.getAttribute("content")}},Lp=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,R1=()=>{if(typeof document<"u"&&document.head){let t=Bl(document,"url");if(t)return Lp(t)}return Lp($1)},E1=()=>{if(typeof document<"u"&&document.head){let t=Bl(document,"history-timestamp");if(t)return t|0}},T1=()=>{if(typeof document<"u"&&document.head)return Bl(document,"token")},M1=()=>{if(typeof document<"u"&&document.head)return Bl(document,"token-param")};function I1(t,n){typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),t=t||R1(),n=n||{},n.historyTimestamp||=E1();let e=T1();if(e){let d=M1();n.auth=Object.assign({token:e,param:d},n.auth||{})}n=Object.assign({},Ip,n);let{logLevel:r,logger:m,pingInterval:f,reconnectStrategy:g,maxMissingPings:w,maxReconnectAttempts:u}=n;return m=n.logger=n.logger||new k1(r),g=n.reconnectStrategy=n.reconnectStrategy||Tp(f),n.monitor!==!1&&(n.monitor=n.monitor||new A1({pingInterval:f,reconnectStrategy:g,maxMissingPings:w,maxReconnectAttempts:u,logger:m})),C1(t,n)}function L1(t,n){let e=I1(t,n);return new x1(e)}class O1{constructor(n="/openc3-api/cable",e="/openc3-api/auth/otp"){this._cable=null,this._url=n,this._otpUrl=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,e,r={},m={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(f=>(f&&OpenC3Auth.setTokens(),t1.get(this._otpUrl,{params:{scope:e}}))).then(({data:f})=>{if(this._cable==null){const g=new URL(this._url,document.baseURI);g.searchParams.set("scope",e),g.searchParams.set("authorization",f),this._cable=L1(g.href)}return this._cable.subscriptions.create({channel:n,...m},r)})}recordPing(){}}Tn("a",O1),Tn("U",class{constructor(n,e,r="",m=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=e,this.usage=r,this.url=m}});function Fa(t){return N1.test(t)}const N1=/^-?[0-9]+$/;function Op(t){return D1.test(t)}const D1=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Np(t,n){if(Fa(t))return Number.isSafeInteger(Number.parseInt(t,10));const e=Number.parseFloat(t),r=String(e);if(t===r)return!0;const m=Dp(t),f=Dp(r);return!!(m===f||n?.approx===!0&&!Fa(t)&&f.length>=14&&m.startsWith(f.substring(0,14)))}let za=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function P1(t){if(Np(t,{approx:!1}))return;if(Fa(t))return za.truncate_integer;const n=Number.parseFloat(t);return Number.isFinite(n)?n===0?za.underflow:za.truncate_float:za.overflow}function Dp(t){const{start:n,end:e}=F1(t),r=t.substring(n,e),m=r.indexOf(".");return m===-1?r:r.substring(0,m)+r.substring(m+1)}function F1(t){let n=0;for(t[0]==="-"&&n++;t[n]==="0"||t[n]===".";)n++;let e=t.lastIndexOf("e");for(e===-1&&(e=t.lastIndexOf("E")),e===-1&&(e=t.length);(t[e-1]==="0"||t[e-1]===".")&&e>n;)e--;return{start:n,end:e}}let z1=class{isLosslessNumber=!0;constructor(n){if(!Op(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=P1(this.value);if(n===void 0||n===za.truncate_float)return Number.parseFloat(this.value);if(Fa(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}};function W1(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function B1(t){return new z1(t)}function j1(t,n){return Tu({"":t},"",t,n)}function Tu(t,n,e,r){return Array.isArray(e)?r.call(t,n,U1(e,r)):e&&typeof e=="object"&&!W1(e)?r.call(t,n,H1(e,r)):r.call(t,n,e)}function H1(t,n){for(const e of Object.keys(t)){const r=Tu(t,e,t[e],n);r!==void 0?t[e]=r:delete t[e]}return t}function U1(t,n){for(let e=0;e<t.length;e++)t[e]=Tu(t,String(e),t[e],n);return t}function V1(t,n,e){const r=typeof e=="function"?{parseNumber:e}:e,m=r?.parseNumber??B1,f=r?.onDuplicateKey??O;let g=0;const w=a();return b(w),M(),n?j1(w,n):w;function u(){if(t.charCodeAt(g)===Z1){g++,c();const W={};let U=!0;for(;g<t.length&&t.charCodeAt(g)!==Fp;){U?U=!1:(s(),c());const G=g,J=h();if(J===void 0){C();return}c(),p();const te=a();if(te===void 0){F();return}if(Object.prototype.hasOwnProperty.call(W,J)&&!Mu(te,W[J])){const he=f({key:J,position:G+1,oldValue:W[J],newValue:te});he!==void 0&&(W[J]=he)}else W[J]=te}return t.charCodeAt(g)!==Fp&&D(),g++,W}}function d(){if(t.charCodeAt(g)===X1){g++,c();const W=[];let U=!0;for(;g<t.length&&t.charCodeAt(g)!==zp;){U?U=!1:s();const G=a();x(G),W.push(G)}return t.charCodeAt(g)!==zp&&I(),g++,W}}function a(){c();const W=h()??o()??u()??d()??l("true",!0)??l("false",!1)??l("null",null);return c(),W}function l(W,U){if(t.slice(g,g+W.length)===W)return g+=W.length,U}function c(){for(;q1(t.charCodeAt(g));)g++}function h(){if(t.charCodeAt(g)===Iu){g++;let W="";for(;g<t.length&&t.charCodeAt(g)!==Iu;){if(t.charCodeAt(g)===J1){const U=t[g+1],G=Y1[U];G!==void 0?(W+=G,g++):U==="u"?jl(t.charCodeAt(g+2))&&jl(t.charCodeAt(g+3))&&jl(t.charCodeAt(g+4))&&jl(t.charCodeAt(g+5))?(W+=String.fromCharCode(Number.parseInt(t.slice(g+2,g+6),16)),g+=5):L(g):B(g)}else K1(t.charCodeAt(g))?W+=t[g]:T(t[g]);g++}return A(),g++,W}}function o(){const W=g;if(t.charCodeAt(g)===Wp&&(g++,R(W)),t.charCodeAt(g)===Lu)g++;else if(G1(t.charCodeAt(g)))for(g++;Hl(t.charCodeAt(g));)g++;if(t.charCodeAt(g)===sC)for(g++,R(W);Hl(t.charCodeAt(g));)g++;if(t.charCodeAt(g)===hC||t.charCodeAt(g)===uC)for(g++,(t.charCodeAt(g)===Wp||t.charCodeAt(g)===rC)&&g++,R(W);Hl(t.charCodeAt(g));)g++;if(g>W)return m(t.slice(W,g))}function s(){if(t.charCodeAt(g)!==oC)throw new SyntaxError(`Comma ',' expected after value ${N()}`);g++}function p(){if(t.charCodeAt(g)!==aC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);g++}function b(W){if(W===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function x(W){if(W===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function M(){if(g<t.length)throw new SyntaxError(`Expected end of input ${N()}`)}function R(W){if(!Hl(t.charCodeAt(g))){const U=t.slice(W,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${N()}`)}}function A(){if(t.charCodeAt(g)!==Iu)throw new SyntaxError(`End of string '"' expected ${N()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function O(W){let{key:U,position:G}=W;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${G}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function T(W){throw new SyntaxError(`Invalid character '${W}' ${$()}`)}function B(W){const U=t.slice(W,W+2);throw new SyntaxError(`Invalid escape character '${U}' ${$()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function L(W){const U=t.slice(W,W+6);throw new SyntaxError(`Invalid unicode character '${U}' ${$()}`)}function $(){return`at position ${g}`}function _(){return g<t.length?`but got '${t[g]}'`:"but reached end of input"}function N(){return`${_()} ${$()}`}}function q1(t){return t===Q1||t===eC||t===tC||t===nC}function jl(t){return t>=Lu&&t<=Ou||t>=lC&&t<=dC||t>=cC&&t<=fC}function Hl(t){return t>=Lu&&t<=Ou}function G1(t){return t>=iC&&t<=Ou}function K1(t){return t>=32&&t<=1114111}function Mu(t,n){return t===n?!0:Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>Mu(e,n[r])):Pp(t)&&Pp(n)?[...new Set([...Object.keys(t),...Object.keys(n)])].every(e=>Mu(t[e],n[e])):!1}function Pp(t){return typeof t=="object"&&t!==null}const Y1={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" "},J1=92,Z1=123,Fp=125,X1=91,zp=93,Q1=32,eC=10,tC=9,nC=13,Iu=34,rC=43,Wp=45,Lu=48,iC=49,Ou=57,oC=44,sC=46,aC=58,lC=65,cC=97,uC=69,hC=101,dC=70,fC=102;function Bp(t,n,e,r){return m(t);function m(u,d){if(Array.isArray(r)){const a=r.find(l=>l.test(u));if(a){const l=a.stringify(u);if(typeof l!="string"||!Op(l))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${l})`);return l}}if(typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u===null||u instanceof Date||u instanceof Boolean||u instanceof Number||u instanceof String)return JSON.stringify(u);if(u?.isLosslessNumber||typeof u=="bigint")return u.toString();if(Array.isArray(u))return f(u);if(u&&typeof u=="object")return g(u)}function f(u,d){if(u.length===0)return"[]";let a="[";for(let l=0;l<u.length;l++){const c=u[l];typeof c<"u"&&typeof c!="function"?a+=m(c):a+="null",l<u.length-1&&(a+=",")}return a+="]",a}function g(u,d){if(typeof u.toJSON=="function")return Bp(u.toJSON(),n,e,void 0);const a=Array.isArray(n)?n.map(String):Object.keys(u);if(a.length===0)return"{}";let l=!0,c="{";for(const h of a){const o=u[h];if(w(h,o)){l?l=!1:c+=",";const s=JSON.stringify(h);c+=`${s}:`,c+=m(o)}}return c+="}",c}function w(u,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function pC(t){return Fa(t)&&!Np(t)?BigInt(t):parseFloat(t)}class us{id=1;constructor(){}async exec(n,e,r={},m={},f=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,m.manual=!0,(await $u.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...m},timeout:f,transformRequest:[(g,w)=>Bp(g)],transformResponse:[g=>{try{return V1(g,void 0,pC)}catch{const w=typeof g=="string"?g.substring(0,200):String(g),u=new Error(`Server returned non-JSON response: ${w}`);throw u.name="ServerError",u}}]})).data.result}catch(g){let w=new Error;throw g.response?(w.name=g.response.data.error.data.class,w.message=g.response.data.error.data.message,w.object=g.response.data.error):g.request?(w.name="Request error",w.message="Request error, no response received"):w=g,w}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(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(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,e,r,m,f){return this.exec("map_target_to_interface",[n,e],{cmd_only:r,tlm_only:m,unmap_old:f})}unmap_target_from_interface(n,e,r,m){return this.exec("unmap_target_from_interface",[n,e],{cmd_only:r,tlm_only:m})}connect_interface(n,...e){return e.length>0?this.exec("connect_interface",[n,...e]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,e,...r){return this.exec("interface_cmd",[n,e,...r])}interface_target_enable(n,e,r=!1,m=!1){return this.exec("interface_target_enable",[n,e],{cmd_only:r,tlm_only:m})}interface_target_disable(n,e,r=!1,m=!1){return this.exec("interface_target_disable",[n,e],{cmd_only:r,tlm_only:m})}interface_details(n){return this.exec("interface_details",[n])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(n,e,r,m,f){return this.exec("map_target_to_router",[n,e],{cmd_only:r,tlm_only:m,unmap_old:f})}unmap_target_from_router(n,e,r,m){return this.exec("unmap_target_from_router",[n,e],{cmd_only:r,tlm_only:m})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,e,r=!1,m=!1){return this.exec("router_target_enable",[n,e],{cmd_only:r,tlm_only:m})}router_target_disable(n,e,r=!1,m=!1){return this.exec("router_target_disable",[n,e],{cmd_only:r,tlm_only:m})}router_details(n){return this.exec("router_details",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,e,r){return this.exec("get_item",[n,e,r])}get_param(n,e,r){return this.exec("get_param",[n,e,r])}get_parameter(n,e,r){return this.exec("get_param",[n,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(n,e){return this.exec("get_tlm",[n,e])}get_telemetry(n,e){return this.exec("get_tlm",[n,e])}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.exec("get_all_tlm",[n])}get_all_tlm_names(n,e=!1){return this.exec("get_all_tlm_names",[n],{hidden:e})}get_all_telemetry_names(n){return this.exec("get_all_tlm_names",[n])}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,e,r,m=30){const f=await this.exec("get_tlm_packet",[n,e],{type:r,stale_time:m});if(f!=null){let g=f.length,w=null;for(let u=0;u<g;u++)w=this.decode_openc3_type(f[u][1]),w!==null&&(f[u][1]=w)}return f}get_packet_derived_items(n,e){return this.exec("get_packet_derived_items",[n,e])}get_tlm_buffer(n,e){return this.exec("get_tlm_buffer",[n,e])}get_tlm_available(n){return this.exec("get_tlm_available",[n])}async get_tlm_values(n,e=30,r=null,m=null,f=null){let g={stale_time:e};r!==null&&(g.cache_timeout=r),m!==null&&(g.start_time=m.toISOString()),f!==null&&(g.end_time=f.toISOString());const w=await this.exec("get_tlm_values",[n],g,{},1e4);if(w&&w.length>0){let u=w.length,d=null;for(let a=0;a<u;a++)d=this.decode_openc3_type(w[a][0]),d!==null&&(w[a][0]=d)}return w}get_limits(n,e,r){return this.exec("get_limits",[n,e,r])}async tlm(n,e,r,m="CONVERTED"){let f=null;if(e===void 0)f=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))f=await this.exec("tlm",[n],{type:e});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,w}else f=await this.exec("tlm",[n,e,r],{type:m});let g=this.decode_openc3_type(f);return g!==null&&(f=g),f}async inject_tlm(n,e,r=null,m="CONVERTED",f=!1){await this.exec("inject_tlm",[n,e,r],{type:m,stored:f})}set_tlm(n,e,r,m){return this.exec("set_tlm",[n,e,r],{type:m})}override_tlm(n,e,r,m){return this.exec("override_tlm",[n,e,r],{type:m})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,e,r,m){return this.exec("normalize_tlm",[n,e,r],{type:m})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.exec("get_all_cmds",[n])}get_all_cmd_names(n,e=!1){return this.exec("get_all_cmd_names",[n],{hidden:e})}get_all_command_names(n){return this.exec("get_all_cmd_names",[n])}get_cmd(n,e){return this.exec("get_cmd",[n,e])}get_command(n,e){return this.exec("get_cmd",[n,e])}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,e,r,m="CONVERTED"){return this.exec("get_cmd_value",[n,e,r,m])}get_cmd_buffer(n,e){return this.exec("get_cmd_buffer",[n,e])}_cmd(n,e,r,m,f,g={}){let w=null;for(let u in m)Object.prototype.hasOwnProperty.call(m,u)&&(w=this.encode_openc3_type(m[u]),w!==null&&(m[u]=w));return this.exec(n,[e,r,m],g,f)}get_cmd_hazardous(n,e,r,m={}){return e===void 0?this.exec("get_cmd_hazardous",n,{},m):this._cmd("get_cmd_hazardous",n,e,r,m)}cmd(n,e,r,m={},f={}){return e===void 0?this.exec("cmd",n,f,m):this._cmd("cmd",n,e,r,m,f)}cmd_no_range_check(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_no_range_check",n,f,m):this._cmd("cmd_no_range_check",n,e,r,m,f)}cmd_raw(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_raw",n,f,m):this._cmd("cmd_raw",n,e,r,m,f)}cmd_raw_no_range_check(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_raw_no_range_check",n,f,m):this._cmd("cmd_raw_no_range_check",n,e,r,m,f)}cmd_no_hazardous_check(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_no_hazardous_check",n,f,m):this._cmd("cmd_no_hazardous_check",n,e,r,m,f)}cmd_no_checks(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_no_checks",n,f,m):this._cmd("cmd_no_checks",n,e,r,m,f)}cmd_raw_no_hazardous_check(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",n,f,m):this._cmd("cmd_raw_no_hazardous_check",n,e,r,m,f)}cmd_raw_no_checks(n,e,r,m={},f={}){return e===void 0?this.exec("cmd_raw_no_checks",n,f,m):this._cmd("cmd_raw_no_checks",n,e,r,m,f)}build_cmd(n,e,r,m={},f={}){return e===void 0?this.exec("build_cmd",n,f,m):this._cmd("build_cmd",n,e,r,m,f)}build_command(n,e,r,m={},f={}){return e===void 0?this.exec("build_cmd",n,f,m):this._cmd("build_cmd",n,e,r,m,f)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,e){return this.exec("send_raw",[n,e])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,e){return this.exec("load_config",[n,e])}save_config(n,e,r){return this.exec("save_config",[n,e,r])}delete_config(n,e){return this.exec("delete_config",[n,e])}enable_limits(n,e,r){return this.exec("enable_limits",[n,e,r])}disable_limits(n,e,r){return this.exec("disable_limits",[n,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,e){return this.exec("get_setting",[n],e)}get_settings(n,e){return this.exec("get_settings",n,e)}set_setting(n,e){return this.exec("set_setting",[n,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,e){return this.exec("set_setting",[n,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const e=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",e),m=new Uint8Array(r);return Array.from(m).map(f=>f.toString(16).padStart(2,"0")).join("")}}}Tn("c",us);const jp=6048e5,gC=864e5,Ul=6e4,Nu=36e5,mC=1e3,Hp=Symbol.for("constructDateFrom");Tn({u:Ul,l:Nu,i:mC});function oo(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&Hp in t?t[Hp](n):t instanceof Date?new t.constructor(n):new Date(n)}function Br(t,n){return oo(n||t,t)}let vC={};function Ks(){return vC}function Ys(t,n){const e=Ks(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,m=Br(t,n?.in),f=m.getDay(),g=(f<r?7:0)+f-r;return m.setDate(m.getDate()-g),m.setHours(0,0,0,0),m}function Wa(t,n){return Ys(t,{...n,weekStartsOn:1})}function Up(t,n){const e=Br(t,n?.in),r=e.getFullYear(),m=oo(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const f=Wa(m),g=oo(e,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const w=Wa(g);return e.getTime()>=f.getTime()?r+1:e.getTime()>=w.getTime()?r:r-1}function Du(t){const n=Br(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function yC(t,...n){const e=oo.bind(null,n.find(r=>typeof r=="object"));return n.map(e)}function Vp(t,n){const e=Br(t,n?.in);return e.setHours(0,0,0,0),e}function bC(t,n,e){const[r,m]=yC(e?.in,t,n),f=Vp(r),g=Vp(m),w=+f-Du(f),u=+g-Du(g);return Math.round((w-u)/gC)}function wC(t,n){const e=Up(t,n),r=oo(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Wa(r)}function xC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function qp(t){return!(!xC(t)&&typeof t!="number"||isNaN(+Br(t)))}function CC(t,n){const e=Br(t,n?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const _C={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"}},kC=(t,n,e)=>{let r;const m=_C[t];return typeof m=="string"?r=m:n===1?r=m.one:r=m.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Pu(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const AC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SC={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$C={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},RC={date:Pu({formats:AC,defaultWidth:"full"}),time:Pu({formats:SC,defaultWidth:"full"}),dateTime:Pu({formats:$C,defaultWidth:"full"})},EC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TC=(t,n,e,r)=>EC[t];function Ba(t){return(n,e)=>{const r=e?.context?String(e.context):"standalone";let m;if(r==="formatting"&&t.formattingValues){const g=t.defaultFormattingWidth||t.defaultWidth,w=e?.width?String(e.width):g;m=t.formattingValues[w]||t.formattingValues[g]}else{const g=t.defaultWidth,w=e?.width?String(e.width):t.defaultWidth;m=t.values[w]||t.values[g]}const f=t.argumentCallback?t.argumentCallback(n):n;return m[f]}}const MC={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},IC={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},LC={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"]},OC={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"]},NC={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"}},DC={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"}},PC=(t,n)=>{const e=Number(t),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"},FC={ordinalNumber:PC,era:Ba({values:MC,defaultWidth:"wide"}),quarter:Ba({values:IC,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ba({values:LC,defaultWidth:"wide"}),day:Ba({values:OC,defaultWidth:"wide"}),dayPeriod:Ba({values:NC,defaultWidth:"wide",formattingValues:DC,defaultFormattingWidth:"wide"})};function ja(t){return(n,e={})=>{const r=e.width,m=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],f=n.match(m);if(!f)return null;const g=f[0],w=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(w)?WC(w,l=>l.test(g)):zC(w,l=>l.test(g));let d;d=t.valueCallback?t.valueCallback(u):u,d=e.valueCallback?e.valueCallback(d):d;const a=n.slice(g.length);return{value:d,rest:a}}}function zC(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function WC(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function BC(t){return(n,e={})=>{const r=n.match(t.matchPattern);if(!r)return null;const m=r[0],f=n.match(t.parsePattern);if(!f)return null;let g=t.valueCallback?t.valueCallback(f[0]):f[0];g=e.valueCallback?e.valueCallback(g):g;const w=n.slice(m.length);return{value:g,rest:w}}}const jC=/^(\d+)(th|st|nd|rd)?/i,HC=/\d+/i,UC={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},VC={any:[/^b/i,/^(a|c)/i]},qC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GC={any:[/1/i,/2/i,/3/i,/4/i]},KC={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},YC={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]},JC={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},ZC={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]},XC={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},QC={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}},e_={ordinalNumber:BC({matchPattern:jC,parsePattern:HC,valueCallback:t=>parseInt(t,10)}),era:ja({matchPatterns:UC,defaultMatchWidth:"wide",parsePatterns:VC,defaultParseWidth:"any"}),quarter:ja({matchPatterns:qC,defaultMatchWidth:"wide",parsePatterns:GC,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ja({matchPatterns:KC,defaultMatchWidth:"wide",parsePatterns:YC,defaultParseWidth:"any"}),day:ja({matchPatterns:JC,defaultMatchWidth:"wide",parsePatterns:ZC,defaultParseWidth:"any"}),dayPeriod:ja({matchPatterns:XC,defaultMatchWidth:"any",parsePatterns:QC,defaultParseWidth:"any"})},t_=Tn("e",{code:"en-US",formatDistance:kC,formatLong:RC,formatRelative:TC,localize:FC,match:e_,options:{weekStartsOn:0,firstWeekContainsDate:1}});function n_(t,n){const e=Br(t,n?.in);return bC(e,CC(e))+1}function Gp(t,n){const e=Br(t,n?.in),r=+Wa(e)-+wC(e);return Math.round(r/jp)+1}function Fu(t,n){const e=Br(t,n?.in),r=e.getFullYear(),m=Ks(),f=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??m.firstWeekContainsDate??m.locale?.options?.firstWeekContainsDate??1,g=oo(n?.in||t,0);g.setFullYear(r+1,0,f),g.setHours(0,0,0,0);const w=Ys(g,n),u=oo(n?.in||t,0);u.setFullYear(r,0,f),u.setHours(0,0,0,0);const d=Ys(u,n);return+e>=+w?r+1:+e>=+d?r:r-1}function r_(t,n){const e=Ks(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,m=Fu(t,n),f=oo(n?.in||t,0);return f.setFullYear(m,0,r),f.setHours(0,0,0,0),Ys(f,n)}function Kp(t,n){const e=Br(t,n?.in),r=+Ys(e,n)-+r_(e,n);return Math.round(r/jp)+1}function ln(t,n){const e=t<0?"-":"",r=Math.abs(t).toString().padStart(n,"0");return e+r}const Wo={y(t,n){const e=t.getFullYear(),r=e>0?e:1-e;return ln(n==="yy"?r%100:r,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):ln(e+1,2)},d(t,n){return ln(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){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(t,n){return ln(t.getHours()%12||12,n.length)},H(t,n){return ln(t.getHours(),n.length)},m(t,n){return ln(t.getMinutes(),n.length)},s(t,n){return ln(t.getSeconds(),n.length)},S(t,n){const e=n.length,r=t.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return ln(m,n.length)}},Js={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Yp={G:function(t,n,e){const r=t.getFullYear()>0?1:0;switch(n){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(t,n,e){if(n==="yo"){const r=t.getFullYear(),m=r>0?r:1-r;return e.ordinalNumber(m,{unit:"year"})}return Wo.y(t,n)},Y:function(t,n,e,r){const m=Fu(t,r),f=m>0?m:1-m;if(n==="YY"){const g=f%100;return ln(g,2)}return n==="Yo"?e.ordinalNumber(f,{unit:"year"}):ln(f,n.length)},R:function(t,n){const e=Up(t);return ln(e,n.length)},u:function(t,n){const e=t.getFullYear();return ln(e,n.length)},Q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return ln(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(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return ln(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(t,n,e){const r=t.getMonth();switch(n){case"M":case"MM":return Wo.M(t,n);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(t,n,e){const r=t.getMonth();switch(n){case"L":return String(r+1);case"LL":return ln(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(t,n,e,r){const m=Kp(t,r);return n==="wo"?e.ordinalNumber(m,{unit:"week"}):ln(m,n.length)},I:function(t,n,e){const r=Gp(t);return n==="Io"?e.ordinalNumber(r,{unit:"week"}):ln(r,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):Wo.d(t,n)},D:function(t,n,e){const r=n_(t);return n==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):ln(r,n.length)},E:function(t,n,e){const r=t.getDay();switch(n){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(t,n,e,r){const m=t.getDay(),f=(m-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(f);case"ee":return ln(f,2);case"eo":return e.ordinalNumber(f,{unit:"day"});case"eee":return e.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(m,{width:"short",context:"formatting"});default:return e.day(m,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){const m=t.getDay(),f=(m-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(f);case"cc":return ln(f,n.length);case"co":return e.ordinalNumber(f,{unit:"day"});case"ccc":return e.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(m,{width:"narrow",context:"standalone"});case"cccccc":return e.day(m,{width:"short",context:"standalone"});default:return e.day(m,{width:"wide",context:"standalone"})}},i:function(t,n,e){const r=t.getDay(),m=r===0?7:r;switch(n){case"i":return String(m);case"ii":return ln(m,n.length);case"io":return e.ordinalNumber(m,{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(t,n,e){const r=t.getHours()/12>=1?"pm":"am";switch(n){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(t,n,e){const r=t.getHours();let m;switch(r===12?m=Js.noon:r===0?m=Js.midnight:m=r/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(t,n,e){const r=t.getHours();let m;switch(r>=17?m=Js.evening:r>=12?m=Js.afternoon:r>=4?m=Js.morning:m=Js.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let r=t.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Wo.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):Wo.H(t,n)},K:function(t,n,e){const r=t.getHours()%12;return n==="Ko"?e.ordinalNumber(r,{unit:"hour"}):ln(r,n.length)},k:function(t,n,e){let r=t.getHours();return r===0&&(r=24),n==="ko"?e.ordinalNumber(r,{unit:"hour"}):ln(r,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):Wo.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):Wo.s(t,n)},S:function(t,n){return Wo.S(t,n)},X:function(t,n,e){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Zp(r);case"XXXX":case"XX":return hs(r);default:return hs(r,":")}},x:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"x":return Zp(r);case"xxxx":case"xx":return hs(r);default:return hs(r,":")}},O:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Jp(r,":");default:return"GMT"+hs(r,":")}},z:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Jp(r,":");default:return"GMT"+hs(r,":")}},t:function(t,n,e){const r=Math.trunc(+t/1e3);return ln(r,n.length)},T:function(t,n,e){return ln(+t,n.length)}};function Jp(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.trunc(r/60),f=r%60;return f===0?e+String(m):e+String(m)+n+ln(f,2)}function Zp(t,n){return t%60===0?(t>0?"-":"+")+ln(Math.abs(t)/60,2):hs(t,n)}function hs(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=ln(Math.trunc(r/60),2),f=ln(r%60,2);return e+m+n+f}const Xp=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},Qp=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},i_=(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return Xp(t,n);let f;switch(r){case"P":f=n.dateTime({width:"short"});break;case"PP":f=n.dateTime({width:"medium"});break;case"PPP":f=n.dateTime({width:"long"});break;default:f=n.dateTime({width:"full"});break}return f.replace("{{date}}",Xp(r,n)).replace("{{time}}",Qp(m,n))},o_=Tn("f",{p:Qp,P:i_}),s_=/^D+$/,a_=/^Y+$/,l_=["D","DD","YY","YYYY"];function eg(t){return s_.test(t)}function tg(t){return a_.test(t)}function ng(t,n,e){const r=c_(t,n,e);if(console.warn(r),l_.includes(t))throw new RangeError(r)}function c_(t,n,e){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const u_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,h_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,d_=/^'([^]*?)'?$/,f_=/''/g,p_=/[a-zA-Z]/;function ds(t,n,e){const r=Ks(),m=e?.locale??r.locale??t_,f=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,w=Br(t,e?.in);if(!qp(w))throw new RangeError("Invalid time value");let u=n.match(h_).map(a=>{const l=a[0];if(l==="p"||l==="P"){const c=o_[l];return c(a,m.formatLong)}return a}).join("").match(u_).map(a=>{if(a==="''")return{isToken:!1,value:"'"};const l=a[0];if(l==="'")return{isToken:!1,value:g_(a)};if(Yp[l])return{isToken:!0,value:a};if(l.match(p_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:a}});m.localize.preprocessor&&(u=m.localize.preprocessor(w,u));const d={firstWeekContainsDate:f,weekStartsOn:g,locale:m};return u.map(a=>{if(!a.isToken)return a.value;const l=a.value;(!e?.useAdditionalWeekYearTokens&&tg(l)||!e?.useAdditionalDayOfYearTokens&&eg(l))&&ng(l,n,String(t));const c=Yp[l[0]];return c(w,l,m.localize,d)}).join("")}function g_(t){const n=t.match(d_);return n?n[1].replace(f_,"'"):t}var Bo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rg={exports:{}},ig;function m_(){return ig||(ig=1,(function(t,n){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var m=function(a,l,c){if(typeof a!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=l),m.modules[a]||(m.payloads[a]=c,m.modules[a]=null)};m.modules={},m.payloads={};var f=function(a,l,c){if(typeof l=="string"){var h=u(a,l);if(h!=null)return c&&c(),h}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var o=[],s=0,p=l.length;s<p;++s){var b=u(a,l[s]);if(b==null&&g.original)return;o.push(b)}return c&&c.apply(null,o)||!0}},g=function(a,l){var c=f("",a,l);return c==null&&g.original?g.original.apply(this,arguments):c},w=function(a,l){if(l.indexOf("!")!==-1){var c=l.split("!");return w(a,c[0])+"!"+w(a,c[1])}if(l.charAt(0)=="."){var h=a.split("/").slice(0,-1).join("/");for(l=h+"/"+l;l.indexOf(".")!==-1&&o!=l;){var o=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},u=function(a,l){l=w(a,l);var c=m.modules[l];if(!c){if(c=m.payloads[l],typeof c=="function"){var h={},o={id:l,uri:"",exports:h,packaged:!0},s=function(b,x){return f(l,b,x)},p=c(s,h,o);h=p||o.exports,m.modules[l]=h,delete m.payloads[l]}c=m.modules[l]=h||c}return c};function d(a){var l=r;r[a]||(r[a]={}),l=r[a],(!l.define||!l.define.packaged)&&(m.original=l.define,l.define=m,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(g.original=l.require,l.require=g,l.require.packaged=!0)}d(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,m){function f(g,w,u){Object.defineProperty(g,w,{value:u,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||f(String.prototype,"startsWith",function(g,w){return w=w||0,this.lastIndexOf(g,w)===w}),String.prototype.endsWith||f(String.prototype,"endsWith",function(g,w){var u=this;(w===void 0||w>u.length)&&(w=u.length),w-=g.length;var d=u.indexOf(g,w);return d!==-1&&d===w}),String.prototype.repeat||f(String.prototype,"repeat",function(g){for(var w="",u=this;g>0;)g&1&&(w+=u),(g>>=1)&&(u+=u);return w}),String.prototype.includes||f(String.prototype,"includes",function(g,w){return this.indexOf(g,w)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(g),u=1;u<arguments.length;u++){var d=arguments[u];d!=null&&Object.keys(d).forEach(function(a){w[a]=d[a]})}return w}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(w){return g[w]})}),Array.prototype.find||f(Array.prototype,"find",function(g){for(var w=this.length,u=arguments[1],d=0;d<w;d++){var a=this[d];if(g.call(u,a,d,this))return a}}),Array.prototype.findIndex||f(Array.prototype,"findIndex",function(g){for(var w=this.length,u=arguments[1],d=0;d<w;d++){var a=this[d];if(g.call(u,a,d,this))return d}}),Array.prototype.includes||f(Array.prototype,"includes",function(g,w){return this.indexOf(g,w)!=-1}),Array.prototype.fill||f(Array.prototype,"fill",function(g){for(var w=this,u=w.length>>>0,d=arguments[1],a=d>>0,l=a<0?Math.max(u+a,0):Math.min(a,u),c=arguments[2],h=c===void 0?u:c>>0,o=h<0?Math.max(u+h,0):Math.min(h,u);l<o;)w[l]=g,l++;return w}),Array.of||f(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,m){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,m){r.deepCopy=function f(g){if(typeof g!="object"||!g)return g;var w;if(Array.isArray(g)){w=[];for(var u=0;u<g.length;u++)w[u]=f(g[u]);return w}if(Object.prototype.toString.call(g)!=="[object Object]")return g;w={};for(var u in g)w[u]=f(g[u]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,u){for(var d="";u>0;)u&1&&(d+=w),(u>>=1)&&(w+=w);return d};var f=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(f,"")},r.stringTrimRight=function(w){return w.replace(g,"")},r.copyObject=function(w){var u={};for(var d in w)u[d]=w[d];return u},r.copyArray=function(w){for(var u=[],d=0,a=w.length;d<a;d++)w[d]&&typeof w[d]=="object"?u[d]=this.copyObject(w[d]):u[d]=w[d];return u},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var u={},d=0;d<w.length;d++)u[w[d]]=1;return u},r.createMap=function(w){var u=Object.create(null);for(var d in w)u[d]=w[d];return u},r.arrayRemove=function(w,u){for(var d=0;d<=w.length;d++)u===w[d]&&w.splice(d,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(w,u){var d=[];return w.replace(u,function(a){d.push({offset:arguments[arguments.length-2],length:a.length})}),d},r.deferredCall=function(w){var u=null,d=function(){u=null,w()},a=function(l){return a.cancel(),u=setTimeout(d,l||0),a};return a.schedule=a,a.call=function(){return this.cancel(),w(),a},a.cancel=function(){return clearTimeout(u),u=null,a},a.isPending=function(){return u},a},r.delayedCall=function(w,u){var d=null,a=function(){d=null,w()},l=function(c){d==null&&(d=setTimeout(a,c||u))};return l.delay=function(c){d&&clearTimeout(d),d=setTimeout(a,c||u)},l.schedule=l,l.call=function(){this.cancel(),w()},l.cancel=function(){d&&clearTimeout(d),d=null},l.isPending=function(){return d},l},r.sleep=function(w){return new Promise(function(u){setTimeout(u,w)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(w,u,d){return d&&w.codePointAt(u)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,m){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 f=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(f.platform)||["other"])[0].toLowerCase(),w=f.userAgent||"",u=f.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=u=="Microsoft Internet Explorer"||u.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=w.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(w.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,r.isAIR=w.indexOf("AdobeAIR")>=0,r.isAndroid=w.indexOf("Android")>=0,r.isChromeOS=w.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(w)&&!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,m){var f=e("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function c(h,o,s){if(typeof h=="string"&&h){var p=document.createTextNode(h);return o&&o.appendChild(p),p}if(!Array.isArray(h))return h&&h.appendChild&&o&&o.appendChild(h),h;if(typeof h[0]!="string"||!h[0]){for(var b=[],x=0;x<h.length;x++){var M=c(h[x],o,s);M&&b.push(M)}return b}var R=document.createElement(h[0]),A=h[1],C=1;A&&typeof A=="object"&&!Array.isArray(A)&&(C=2);for(var x=C;x<h.length;x++)c(h[x],R,s);return C==2&&Object.keys(A).forEach(function(O){var D=A[O];O==="class"?R.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||O=="value"||O[0]=="$"?R[O]=D:O==="ref"?s&&(s[D]=R):O==="style"?typeof D=="string"&&(R.style.cssText=D):D!=null&&R.setAttribute(O,D)}),o&&o.appendChild(R),R},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,h){return document.createElementNS?document.createElementNS(h||g,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,h){var o=h?h.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var h=c?c.ownerDocument:document;return h.createDocumentFragment()},r.hasCssClass=function(c,h){var o=(c.className+"").split(/\s+/g);return o.indexOf(h)!==-1},r.addCssClass=function(c,h){r.hasCssClass(c,h)||(c.className+=" "+h)},r.removeCssClass=function(c,h){for(var o=c.className.split(/\s+/g);;){var s=o.indexOf(h);if(s==-1)break;o.splice(s,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,h){for(var o=c.className.split(/\s+/g),s=!0;;){var p=o.indexOf(h);if(p==-1)break;s=!1,o.splice(p,1)}return s&&o.push(h),c.className=o.join(" "),s},r.setCssClass=function(c,h,o){o?r.addCssClass(c,h):r.removeCssClass(c,h)},r.hasCssString=function(c,h){var o=0,s;if(h=h||document,s=h.querySelectorAll("style")){for(;o<s.length;)if(s[o++].id===c)return!0}},r.removeElementById=function(c,h){h=h||document,h.getElementById(c)&&h.getElementById(c).remove()};var w,u=[];r.useStrictCSP=function(c){w=c,c==!1?d():u||(u=[])};function d(){var c=u;u=null,c&&c.forEach(function(h){a(h[0],h[1])})}function a(c,h,o){if(!(typeof document>"u")){if(u){if(o)d();else if(o===!1)return u.push([c,h])}if(!w){var s=o;!o||!o.getRootNode?s=document:(s=o.getRootNode(),(!s||s==o)&&(s=document));var p=s.ownerDocument||s;if(h&&r.hasCssString(h,s))return null;h&&(c+=`
11
+ /*# sourceURL=ace/css/`+h+" */");var b=r.createElement("style");b.appendChild(p.createTextNode(c)),h&&(b.id=h),s==p&&(s=r.getDocumentHead(p)),s.insertBefore(b,s.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(c,h){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(h))},r.$fixPositionBug=function(c){var h=c.getBoundingClientRect();if(c.style.left){var o=parseFloat(c.style.left),s=+h.left;Math.abs(o-s)>1&&(c.style.left=2*o-s+"px")}if(c.style.right){var o=parseFloat(c.style.right),s=window.innerWidth-h.right;Math.abs(o-s)>1&&(c.style.right=2*o-s+"px")}if(c.style.top){var o=parseFloat(c.style.top),s=+h.top;Math.abs(o-s)>1&&(c.style.top=2*o-s+"px")}if(c.style.bottom){var o=parseFloat(c.style.bottom),s=window.innerHeight-h.bottom;Math.abs(o-s)>1&&(c.style.bottom=2*o-s+"px")}},r.scrollbarWidth=function(c){var h=r.createElement("ace_inner");h.style.width="100%",h.style.minWidth="0px",h.style.height="200px",h.style.display="block";var o=r.createElement("ace_outer"),s=o.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",o.appendChild(h);var p=c&&c.documentElement||document&&document.documentElement;if(!p)return 0;p.appendChild(o);var b=h.offsetWidth;s.overflow="scroll";var x=h.offsetWidth;return b===x&&(x=o.clientWidth),p.removeChild(o),b-x},r.computedStyle=function(c,h){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,h,o){c[h]!==o&&(c[h]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=f.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,f.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!f.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,h,o){c.style.transform="translate("+Math.round(h)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,h,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(h)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,m){var f=e("./dom");r.get=function(g,w){var u=new XMLHttpRequest;u.open("GET",g,!0),u.onreadystatechange=function(){u.readyState===4&&w(u.responseText)},u.send(null)},r.loadScript=function(g,w){var u=f.getDocumentHead(),d=document.createElement("script");d.src=g,u.appendChild(d),d.onload=d.onreadystatechange=function(a,l){(l||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,l||w())}},r.qualifyURL=function(g){var w=document.createElement("a");return w.href=g,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,m){r.inherits=function(f,g){f.super_=g,f.prototype=Object.create(g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(f,g){for(var w in g)f[w]=g[w];return f},r.implement=function(f,g){r.mixin(f,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,m){var f={},g=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};f._emit=f._dispatchEvent=function(u,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[u]||[],l=this._defaultHandlers[u];if(!(!a.length&&!l)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=u),d.stopPropagation||(d.stopPropagation=g),d.preventDefault||(d.preventDefault=w),a=a.slice();for(var c=0;c<a.length&&(a[c](d,this),!d.propagationStopped);c++);if(l&&!d.defaultPrevented)return l(d,this)}},f._signal=function(u,d){var a=(this._eventRegistry||{})[u];if(a){a=a.slice();for(var l=0;l<a.length;l++)a[l](d,this)}},f.once=function(u,d){var a=this;if(this.on(u,function l(){a.off(u,l),d.apply(null,arguments)}),!d)return new Promise(function(l){d=l})},f.setDefaultHandler=function(u,d){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[u]){var l=a[u],c=a._disabled_[u];c||(a._disabled_[u]=c=[]),c.push(l);var h=c.indexOf(d);h!=-1&&c.splice(h,1)}a[u]=d},f.removeDefaultHandler=function(u,d){var a=this._defaultHandlers;if(a){var l=a._disabled_[u];if(a[u]==d)l&&this.setDefaultHandler(u,l.pop());else if(l){var c=l.indexOf(d);c!=-1&&l.splice(c,1)}}},f.on=f.addEventListener=function(u,d,a){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[u];return l||(l=this._eventRegistry[u]=[]),l.indexOf(d)==-1&&l[a?"unshift":"push"](d),d},f.off=f.removeListener=f.removeEventListener=function(u,d){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[u];if(a){var l=a.indexOf(d);l!==-1&&a.splice(l,1)}},f.removeAllListeners=function(u){u||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[u]=void 0),this._defaultHandlers&&(this._defaultHandlers[u]=void 0)},r.EventEmitter=f}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,m){r.reportError=function(f,g){var w=new Error(f);w.data=g,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,m){var f={"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=f}),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,m){"no use strict";var f=e("./oop"),g=e("./event_emitter").EventEmitter,w=e("./report_error").reportError,u=e("./default_english_messages").defaultEnglishMessages,d={setOptions:function(o){Object.keys(o).forEach(function(s){this.setOption(s,o[s])},this)},getOptions:function(o){var s={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var p=this.$options;o=Object.keys(p).filter(function(b){return!p[b].hidden})}return o.forEach(function(b){s[b]=this.getOption(b)},this),s},setOption:function(o,s){if(this["$"+o]!==s){var p=this.$options[o];if(!p)return a('misspelled option "'+o+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(o,s);p.handlesSet||(this["$"+o]=s),p&&p.set&&p.set.call(this,s)}},getOption:function(o){var s=this.$options[o];return s?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].getOption(o):s&&s.get?s.get.call(this):this["$"+o]:a('misspelled option "'+o+'"')}};function a(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,c,h=(function(){function o(){this.$defaultOptions={},l=u,c="dollarSigns"}return o.prototype.defineOptions=function(s,p,b){return s.$options||(this.$defaultOptions[p]=s.$options={}),Object.keys(b).forEach(function(x){var M=b[x];typeof M=="string"&&(M={forwardTo:M}),M.name||(M.name=x),s.$options[M.name]=M,"initialValue"in M&&(s["$"+M.name]=M.initialValue)}),f.implement(s,d),this},o.prototype.resetOptions=function(s){Object.keys(s.$options).forEach(function(p){var b=s.$options[p];"value"in b&&s.setOption(p,b.value)})},o.prototype.setDefaultValue=function(s,p,b){if(!s){for(s in this.$defaultOptions)if(this.$defaultOptions[s][p])break;if(!this.$defaultOptions[s][p])return!1}var x=this.$defaultOptions[s]||(this.$defaultOptions[s]={});x[p]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,p,b):x[p].value=b)},o.prototype.setDefaultValues=function(s,p){Object.keys(p).forEach(function(b){this.setDefaultValue(s,b,p[b])},this)},o.prototype.setMessages=function(s,p){l=s,p&&p.placeholders&&(c=p.placeholders)},o.prototype.nls=function(s,p,b){l[s]||(a("No message found for the key '"+s+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+p+"'."),l[p]||a("No message found for the default string '"+p+"' in the provided messages. Falling back to the default English message."));var x=l[s]||l[p]||p;return b&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(M,R){return R=="$"?"$":b[R]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(M,R){return b[R]}))),x},o})();h.prototype.warn=a,h.prototype.reportError=w,f.implement(h.prototype,g),r.AppConfig=h}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,m){m.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,m){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var f=e("../lib/dom");f.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,m){"no use strict";var f=e("./lib/lang"),g=e("./lib/net"),w=e("./lib/dom"),u=e("./lib/app_config").AppConfig;m.exports=r=new u;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(h){if(!d.hasOwnProperty(h))throw new Error("Unknown config key: "+h);return d[h]},r.set=function(h,o){if(d.hasOwnProperty(h))d[h]=o;else if(this.setDefaultValue("",h,o)==!1)throw new Error("Unknown config key: "+h);h=="useStrictCSP"&&w.useStrictCSP(o)},r.all=function(){return f.copyObject(d)},r.$modes={},r.moduleUrl=function(h,o){if(d.$moduleUrls[h])return d.$moduleUrls[h];var s=h.split("/");o=o||s[s.length-2]||"";var p=o=="snippets"?"/":"-",b=s[s.length-1];if(o=="worker"&&p=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");b=b.replace(x,"")}(!b||b==o)&&s.length>1&&(b=s[s.length-2]);var M=d[o+"Path"];return M==null?M=d.basePath:p=="/"&&(o=p=""),M&&M.slice(-1)!="/"&&(M+="/"),M+o+p+b+this.get("suffix")},r.setModuleUrl=function(h,o){return d.$moduleUrls[h]=o};var a=function(h,o){if(h==="ace/theme/textmate"||h==="./theme/textmate")return o(null,e("./theme/textmate"));if(l)return l(h,o);console.error("loader is not configured")},l;r.setLoader=function(h){l=h},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(h,o){var s;if(Array.isArray(h))var p=h[0],b=h[1];else if(typeof h=="string")var b=h;var x=function(M){if(M&&!r.$loading[b])return o&&o(M);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(o),!(r.$loading[b].length>1)){var R=function(){a(b,function(A,C){C&&(r.$loaded[b]=C),r._emit("load.module",{name:b,module:C});var O=r.$loading[b];r.$loading[b]=null,O.forEach(function(D){D&&D(C)})})};if(!r.get("packaged"))return R();g.loadScript(r.moduleUrl(b,p),R),c()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(M){M.default?x(M.default):x(M)});else{try{s=this.$require(b)}catch{}x(s||r.$loaded[b])}},r.$require=function(h){if(typeof m.require=="function"){var o="require";return m[o](h)}},r.setModuleLoader=function(h,o){r.dynamicModules[h]=o};var c=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$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"),c=function(){})};r.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,m){e("./lib/fixoldbrowsers");var f=e("./config");f.setLoader(function(d,a){e([d],function(l){a(null,l)})});var g=(function(){return this||typeof window<"u"&&window})();m.exports=function(d){f.init=w,f.$require=e,d.require=e},w(!0);function w(d){if(!(!g||!g.document)){f.set("packaged",d||e.packaged||m.packaged||g.define&&(void 0).packaged);var a={},l="",c=document.currentScript||document._currentScript,h=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=h.getElementsByTagName("script"),s=0;s<o.length;s++){var p=o[s],b=p.src||p.getAttribute("src");if(b){for(var x=p.attributes,M=0,R=x.length;M<R;M++){var A=x[M];A.name.indexOf("data-ace-")===0&&(a[u(A.name.replace(/^data-ace-/,""))]=A.value)}var C=b.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(l=C[1])}}l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var O in a)typeof a[O]<"u"&&f.set(O,a[O])}}function u(d){return d.replace(/-(.)/g,function(a,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,m){var f=(function(){function g(w,u,d,a){this.start={row:w,column:u},this.end={row:d,column:a}}return g.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(w,u){return this.compare(w,u)==0},g.prototype.compareRange=function(w){var u,d=w.end,a=w.start;return u=this.compare(d.row,d.column),u==1?(u=this.compare(a.row,a.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(a.row,a.column),u==-1?-1:u==1?42:0)},g.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},g.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},g.prototype.intersects=function(w){var u=this.compareRange(w);return u==-1||u==0||u==1},g.prototype.isEnd=function(w,u){return this.end.row==w&&this.end.column==u},g.prototype.isStart=function(w,u){return this.start.row==w&&this.start.column==u},g.prototype.setStart=function(w,u){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=u)},g.prototype.setEnd=function(w,u){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=u)},g.prototype.inside=function(w,u){return this.compare(w,u)==0?!(this.isEnd(w,u)||this.isStart(w,u)):!1},g.prototype.insideStart=function(w,u){return this.compare(w,u)==0?!this.isEnd(w,u):!1},g.prototype.insideEnd=function(w,u){return this.compare(w,u)==0?!this.isStart(w,u):!1},g.prototype.compare=function(w,u){return!this.isMultiLine()&&w===this.start.row?u<this.start.column?-1:u>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?u>=this.start.column?0:-1:this.end.row===w?u<=this.end.column?0:1:0},g.prototype.compareStart=function(w,u){return this.start.row==w&&this.start.column==u?-1:this.compare(w,u)},g.prototype.compareEnd=function(w,u){return this.end.row==w&&this.end.column==u?1:this.compare(w,u)},g.prototype.compareInside=function(w,u){return this.end.row==w&&this.end.column==u?1:this.start.row==w&&this.start.column==u?-1:this.compare(w,u)},g.prototype.clipRows=function(w,u){if(this.end.row>u)var d={row:u+1,column:0};else if(this.end.row<w)var d={row:w,column:0};if(this.start.row>u)var a={row:u+1,column:0};else if(this.start.row<w)var a={row:w,column:0};return g.fromPoints(a||this.start,d||this.end)},g.prototype.extend=function(w,u){var d=this.compare(w,u);if(d==0)return this;if(d==-1)var a={row:w,column:u};else var l={row:w,column:u};return g.fromPoints(a||this.start,l||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(w){var u=w.documentToScreenPosition(this.start),d=w.documentToScreenPosition(this.end);return new g(u.row,u.column,d.row,d.column)},g.prototype.moveBy=function(w,u){this.start.row+=w,this.start.column+=u,this.end.row+=w,this.end.column+=u},g})();f.fromPoints=function(g,w){return new f(g.row,g.column,w.row,w.column)},f.comparePoints=function(g,w){return g.row-w.row||g.column-w.column},r.Range=f}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,m){for(var f=e("./oop"),g={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:"*"}},w={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},u=0;u<10;u++)w["Digit"+u]=48+u,w["Numpad"+u]=96+u,g.PRINTABLE_KEYS[48+u]=""+u,g.FUNCTION_KEYS[96+u]="Numpad"+u;for(var u=65;u<91;u++){var d=String.fromCharCode(u+32);w["Key"+d.toUpperCase()]=u,g.PRINTABLE_KEYS[u]=d}for(var u=1;u<13;u++)w["F"+u]=111+u,g.FUNCTION_KEYS[111+u]="F"+u;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var l in a)w[l]=w[l+"Left"]=w[l+"Right"]=a[l];r.$codeToKeyCode=w,g.PRINTABLE_KEYS[173]="-";for(var c in g.FUNCTION_KEYS){var h=g.FUNCTION_KEYS[c].toLowerCase();g[h]=parseInt(c,10)}for(var c in g.PRINTABLE_KEYS){var h=g.PRINTABLE_KEYS[c].toLowerCase();g[h]=parseInt(c,10)}f.mixin(g,g.MODIFIER_KEYS),f.mixin(g,g.PRINTABLE_KEYS),f.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],s=Math.pow(2,o.length);s--;)g.KEY_MODS[s]=o.filter(function(p){return s&g.KEY_MODS[p]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",f.mixin(r,g),r.default=r,r.keyCodeToString=function(o){var s=g[o];return typeof s!="string"&&(s=String.fromCharCode(o)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var f=e("./keys"),g=e("./useragent"),w=null,u=0,d;function a(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function l(){return d==null&&a(),d}function c(M,R,A){this.elem=M,this.type=R,this.callback=A}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=r.addListener=function(M,R,A,C){M.addEventListener(R,A,l()),C&&C.$toDestroy.push(new c(M,R,A))},o=r.removeListener=function(M,R,A){M.removeEventListener(R,A,l())};r.stopEvent=function(M){return r.stopPropagation(M),r.preventDefault(M),!1},r.stopPropagation=function(M){M.stopPropagation&&M.stopPropagation()},r.preventDefault=function(M){M.preventDefault&&M.preventDefault()},r.getButton=function(M){return M.type=="dblclick"?0:M.type=="contextmenu"||g.isMac&&M.ctrlKey&&!M.altKey&&!M.shiftKey?2:M.button},r.capture=function(M,R,A){var C=M&&M.ownerDocument||document;function O(D){R&&R(D),A&&A(D),o(C,"mousemove",R),o(C,"mouseup",O),o(C,"dragstart",O)}return h(C,"mousemove",R),h(C,"mouseup",O),h(C,"dragstart",O),O},r.addMouseWheelListener=function(M,R,A){h(M,"wheel",function(C){var O=.15,D=C.deltaX||0,I=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=D*O,C.wheelY=I*O;break;case C.DOM_DELTA_LINE:var T=15;C.wheelX=D*T,C.wheelY=I*T;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=D*B,C.wheelY=I*B;break}R(C)},A)},r.addMultiMouseDownListener=function(M,R,A,C,O){var D=0,I,T,B,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function L($){if(r.getButton($)!==0?D=0:$.detail>1?(D++,D>4&&(D=1)):D=1,g.isIE){var _=Math.abs($.clientX-I)>5||Math.abs($.clientY-T)>5;(!B||_)&&(D=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},R[D-1]||600),D==1&&(I=$.clientX,T=$.clientY)}if($._clicks=D,A[C]("mousedown",$),D>4)D=0;else if(D>1)return A[C](F[D],$)}Array.isArray(M)||(M=[M]),M.forEach(function($){h($,"mousedown",L,O)})};function s(M){return 0|(M.ctrlKey?1:0)|(M.altKey?2:0)|(M.shiftKey?4:0)|(M.metaKey?8:0)}r.getModifierString=function(M){return f.KEY_MODS[s(M)]};function p(M,R,A){var C=s(R);if(!A&&R.code&&(A=f.$codeToKeyCode[R.code]||A),!g.isMac&&w){if(R.getModifierState&&(R.getModifierState("OS")||R.getModifierState("Win"))&&(C|=8),w.altGr)if((3&C)!=3)w.altGr=0;else return;if(A===18||A===17){var O=R.location;if(A===17&&O===1)w[A]==1&&(u=R.timeStamp);else if(A===18&&C===3&&O===2){var D=R.timeStamp-u;D<50&&(w.altGr=!0)}}}if(A in f.MODIFIER_KEYS&&(A=-1),!(!C&&A===13&&R.location===3&&(M(R,C,-A),R.defaultPrevented))){if(g.isChromeOS&&C&8){if(M(R,C,A),R.defaultPrevented)return;C&=-9}return!C&&!(A in f.FUNCTION_KEYS)&&!(A in f.PRINTABLE_KEYS)?!1:M(R,C,A)}}r.addCommandKeyListener=function(M,R,A){var C=null;h(M,"keydown",function(O){w[O.keyCode]=(w[O.keyCode]||0)+1;var D=p(R,O,O.keyCode);return C=O.defaultPrevented,D},A),h(M,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(r.stopEvent(O),C=null)},A),h(M,"keyup",function(O){w[O.keyCode]=null},A),w||(b(),h(window,"focus",b))};function b(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(M,R){R=R||window;var A="zero-timeout-message-"+x++,C=function(O){O.data==A&&(r.stopPropagation(O),o(R,"message",C),M())};h(R,"message",C),R.postMessage(A,"*")}}r.$idleBlocked=!1,r.onIdle=function(M,R){return setTimeout(function A(){r.$idleBlocked?setTimeout(A,100):M()},R)},r.$idleBlockId=null,r.blockIdle=function(M){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},M||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(M){setTimeout(M,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,m){var f;m.exports={lineMode:!1,pasteCancelled:function(){return f&&f>Date.now()-50?!0:f=!1},cancel:function(){f=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,m){var f=e("../lib/event"),g=e("../config").nls,w=e("../lib/useragent"),u=e("../lib/dom"),d=e("../lib/lang"),a=e("../clipboard"),l=w.isChrome<18,c=w.isIE,h=w.isChrome>63,o=400,s=e("../lib/keys"),p=s.KEY_MODS,b=w.isIOS,x=b?/\s/:/\n/,M=w.isMobile,R=(function(){function A(C,O){var D=this;this.host=O,this.text=u.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="",M||(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"}),f.addListener(this.text,"blur",function(I){D.ignoreFocusEvents||(O.onBlur(I),D.$isFocused=!1)},O),f.addListener(this.text,"focus",function(I){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(I),w.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var I=O.curOp,T=I&&I.command&&I.command.name;if(T!="insertstring"){var B=T&&(I.docChanged||I.selectionChanged);D.inComposition&&B&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),O.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=b?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&O.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,f.addCommandKeyListener(this.text,function(I,T,B){if(!D.inComposition)return O.onCommandKey(I,T,B)},O),f.addListener(this.text,"select",this.onSelect.bind(this),O),f.addListener(this.text,"input",this.onInput.bind(this),O),f.addListener(this.text,"cut",this.onCut.bind(this),O),f.addListener(this.text,"copy",this.onCopy.bind(this),O),f.addListener(this.text,"paste",this.onPaste.bind(this),O),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&f.addListener(C,"keydown",function(I){if(!(w.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:D.onCopy(I);break;case 86:D.onPaste(I);break;case 88:D.onCut(I);break}},O),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),f.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),O),f.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),O),f.addListener(this.text,"keyup",this.onKeyup.bind(this),O),f.addListener(this.text,"keydown",this.syncComposition.bind(this),O),f.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),O),this.closeTimeout,f.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),O),f.addListener(this.text,"mousedown",function(I){I.preventDefault(),D.onContextMenuClose()},O),f.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),f.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),b&&this.addIosSelectionHandler(C,O,this.text)}return A.prototype.addIosSelectionHandler=function(C,O,D){var I=this,T=null,B=!1;D.addEventListener("keydown",function(L){T&&clearTimeout(T),B=!0},!0),D.addEventListener("keyup",function(L){T=setTimeout(function(){B=!1},100)},!0);var F=function(L){if(document.activeElement===D&&!(B||I.inComposition||O.$mouseHandler.isMousePressed)&&!I.copied){var $=D.selectionStart,_=D.selectionEnd,N=null,W=0;if($==0?N=s.up:$==1?N=s.home:_>I.lastSelectionEnd&&I.lastValue[_]==`
170
+ `?N=s.end:$<I.lastSelectionStart&&I.lastValue[$-1]==" "?(N=s.left,W=p.option):$<I.lastSelectionStart||$==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&$==_?N=s.left:_>I.lastSelectionEnd&&I.lastValue.slice(0,_).split(`
171
+ `).length>2?N=s.down:_>I.lastSelectionEnd&&I.lastValue[_-1]==" "?(N=s.right,W=p.option):(_>I.lastSelectionEnd||_==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&$==_)&&(N=s.right),$!==_&&(W|=p.shift),N){var U=O.onCommandKey({},W,N);if(!U&&O.commands){N=s.keyCodeToString(N);var G=O.commands.findKeyCommand(W,N);G&&O.execCommand(G)}I.lastSelectionStart=$,I.lastSelectionEnd=_,I.resetSelection("")}}};document.addEventListener("selectionchange",F),O.on("destroy",function(){document.removeEventListener("selectionchange",F)})},A.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)},A.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},A.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()},A.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},A.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()))}},A.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)}}},A.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())},A.prototype.onCut=function(C){this.doCopy(C,!0)},A.prototype.onCopy=function(C){this.doCopy(C,!1)},A.prototype.onPaste=function(C){var O=this.handleClipboardData(C);a.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),w.isIE&&setTimeout(this.resetSelection),f.preventDefault(C)):(this.text.value="",this.pasted=!0))},A.prototype.doCopy=function(C,O){var D=this,I=this.host.getCopyText();if(!I)return f.preventDefault(C);this.handleClipboardData(C,I)?(b&&(this.resetSelection(I),this.copied=I,setTimeout(function(){D.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),f.preventDefault(C)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),O?D.host.onCut():D.host.onCopy()}))},A.prototype.handleClipboardData=function(C,O,D){var I=C.clipboardData||window.clipboardData;if(!(!I||l)){var T=c||D?"Text":"text/plain";try{return O?I.setData(T,O)!==!1:I.getData(T)}catch(B){if(!D)return this.handleClipboardData(B,O,!0)}}},A.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,D=this.sendText(O,!0);(O.length>o+100||x.test(D)||M&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},A.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 D=this.text.selectionStart,I=this.text.selectionEnd,T=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,F=C,L=C.length-D,$=C.length-I,_=0;T>0&&this.lastValue[_]==C[_];)_++,T--;for(F=F.slice(_),_=1;B>0&&this.lastValue.length-_>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-_]==C[C.length-_];)_++,B--;L-=_-1,$-=_-1;var N=F.length-_+1;if(N<0&&(T=-N,N=0),F=F.slice(0,N),!O&&!F&&!L&&!T&&!B&&!$)return"";this.sendingText=!0;var W=!1;return w.isAndroid&&F==". "&&(F=" ",W=!0),F&&!T&&!B&&!L&&!$||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:T,extendRight:B,restoreStart:L,restoreEnd:$}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=D,this.lastSelectionEnd=I,this.lastRestoreEnd=$,W?`
172
+ `:F},A.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var D=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:D(this.text)?(this.host.selectAll(),this.resetSelection()):M&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},A.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 D=4,I=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(D,I),this.lastSelectionStart=D,this.lastSelectionEnd=I}},A.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,D=0,I="",T=function(G,J){for(var te=J,he=1;he<=G-C.rowStart&&he<2*C.numberOfExtraLines+1;he++)te+=C.host.session.getLine(G-he).length+1;return te};if(this.host.session){var B=this.host.selection,F=B.getRange(),L=B.cursor.row;L===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):L===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(L<this.rowStart-1||L>this.rowEnd+1)&&(this.rowStart=L>this.numberOfExtraLines?L-this.numberOfExtraLines:0,this.rowEnd=L>this.numberOfExtraLines?L+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var $=[],_=this.rowStart;_<=this.rowEnd;_++)$.push(this.host.session.getLine(_));if(I=$.join(`
175
+ `),O=T(F.start.row,F.start.column),D=T(F.end.row,F.end.column),F.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);O=F.start.row<this.rowStart-1?0:O,D+=N.length+1,I=N+`
176
+ `+I}else if(F.end.row>this.rowEnd){var W=this.host.session.getLine(this.rowEnd+1);D=F.end.row>this.rowEnd+1?W.length:F.end.column,D+=I.length+1,I=I+`
177
+ `+W}else M&&L>0&&(I=`
178
+ `+I,D+=1,O+=1);I.length>o&&(O<o&&D<o?I=I.slice(0,o):(I=`
179
+ `,O==D?O=D=0:(O=0,D=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!=D||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,D),this.lastSelectionStart=O,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},A.prototype.setHost=function(C){this.host=C},A.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},A.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+=g("text-input.aria-label","Cursor at row $0",[O+1])}this.text.setAttribute("aria-label",C)},A.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",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},A.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||h||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 D=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(D)for(var T=this.text.parentElement;T&&T.nodeType==1;)I.push(T),T.setAttribute("ace_nocontext","true"),!T.parentElement&&T.getRootNode?T=T.getRootNode().host:T=T.parentElement;this.text.focus({preventScroll:!0}),D&&I.forEach(function(B){B.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},A.prototype.blur=function(){this.text.blur()},A.prototype.isFocused=function(){return this.$isFocused},A.prototype.setInputHandler=function(C){this.inputHandler=C},A.prototype.getInputHandler=function(){return this.inputHandler},A.prototype.getElement=function(){return this.text},A.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},A.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},A.prototype.setCopyWithEmptySelection=function(C){},A.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},A.prototype.moveToMouse=function(C,O){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),T=u.computedStyle(this.host.container),B=I.top+(parseInt(T.borderTopWidth)||0),F=I.left+(parseInt(T.borderLeftWidth)||0),L=I.bottom-B-this.text.clientHeight-2,$=function(_){u.translate(D.text,_.clientX-F-2,Math.min(_.clientY-B-2,L))};$(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&f.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},A.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},A})();r.TextInput=R,r.$setUserAgentForTests=function(A,C){M=A,b=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,m){var f=e("../lib/useragent"),g=0,w=550,u=(function(){function l(c){c.$clickSelection=null;var h=c.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(s){c[s]=this[s]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return l.prototype.onMouseDown=function(c){var h=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var s=this.editor,p=c.getButton();if(p!==0){var b=s.getSelectionRange(),x=b.isEmpty();(x||p==1)&&s.selection.moveToPosition(o),p==2&&(s.textInput.onContextMenu(c.domEvent),f.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!s.isFocused()&&(s.focus(),this.$focusTimeout&&!this.$clickSelection&&!s.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},l.prototype.startSelect=function(c,h){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):h||o.selection.moveToPosition(c),h||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var c,h=this.editor,o=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o);if(s==-1)c=this.$clickSelection.end;else if(s==1)c=this.$clickSelection.start;else{var p=a(this.$clickSelection,o,h.session);o=p.cursor,c=p.anchor}h.selection.setSelectionAnchor(c.row,c.column)}h.selection.selectToPosition(o),h.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(c){var h,o=this.editor,s=o.renderer.screenToTextCoordinates(this.x,this.y),p=o.selection[c](s.row,s.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(p.start),x=this.$clickSelection.comparePoint(p.end);if(b==-1&&x<=0)h=this.$clickSelection.end,(p.end.row!=s.row||p.end.column!=s.column)&&(s=p.start);else if(x==1&&b>=0)h=this.$clickSelection.start,(p.start.row!=s.row||p.start.column!=s.column)&&(s=p.end);else if(b==-1&&x==1)s=p.end,h=p.start;else{var M=a(this.$clickSelection,s,o.session);s=M.cursor,h=M.anchor}o.selection.setSelectionAnchor(h.row,h.column)}o.selection.selectToPosition(s),o.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var c=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(c>g||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(c){var h=c.getDocumentPosition(),o=this.editor,s=o.session,p=s.getBracketRange(h);p?(p.isEmpty()&&(p.start.column--,p.end.column++),this.setState("select")):(p=o.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=p,this.select()},l.prototype.onTripleClick=function(c){var h=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var s=o.getSelectionRange();s.isMultiLine()&&s.contains(h.row,h.column)?(this.$clickSelection=o.selection.getLineRange(s.start.row),this.$clickSelection.end=o.selection.getLineRange(s.end.row).end):this.$clickSelection=o.selection.getLineRange(h.row),this.select()},l.prototype.onQuadClick=function(c){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,s=c.domEvent.timeStamp,p=s-o.t,b=p?c.wheelX/p:o.vx,x=p?c.wheelY/p:o.vy;p<w&&(b=(b+o.vx)/2,x=(x+o.vy)/2);var M=Math.abs(b/x),R=!1;if(M>=1&&h.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(R=!0),M<=1&&h.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(R=!0),R)o.allowed=s;else if(s-o.allowed<w){var A=Math.abs(b)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);A?(R=!0,o.allowed=s):o.allowed=0}if(o.t=s,o.vx=b,o.vy=x,R)return h.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},l})();u.prototype.selectEnd=u.prototype.selectByLinesEnd,u.prototype.selectAllEnd=u.prototype.selectByLinesEnd,u.prototype.selectByWordsEnd=u.prototype.selectByLinesEnd,r.DefaultHandlers=u;function d(l,c,h,o){return Math.sqrt(Math.pow(h-l,2)+Math.pow(o-c,2))}function a(l,c,h){if(l.start.row==l.end.row)var o=2*c.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var o=3*c.column-2*h.getLine(l.start.row).length;else var o=2*c.row-l.start.row-l.end.row;return o<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var f=e("../lib/event"),g=e("../lib/useragent"),w=(function(){function u(d,a){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=a,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return u.prototype.stopPropagation=function(){f.stopPropagation(this.domEvent),this.propagationStopped=!0},u.prototype.preventDefault=function(){f.preventDefault(this.domEvent),this.defaultPrevented=!0},u.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},u.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},u.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(d,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-l},u.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,a=d.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=a.contains(l.row,l.column)}return this.$inSelection},u.prototype.getButton=function(){return f.getButton(this.domEvent)},u.prototype.getShiftKey=function(){return this.domEvent.shiftKey},u.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},u})();r.MouseEvent=w}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,m){r.preventParentScroll=function(f){f.stopPropagation();var g=f.currentTarget,w=g.scrollHeight>g.clientHeight;w||f.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,m){var f=this&&this.__extends||(function(){var s=function(p,b){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,M){x.__proto__=M}||function(x,M){for(var R in M)Object.prototype.hasOwnProperty.call(M,R)&&(x[R]=M[R])},s(p,b)};return function(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");s(p,b);function x(){this.constructor=p}p.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}})(),g=this&&this.__values||function(s){var p=typeof Symbol=="function"&&Symbol.iterator,b=p&&s[p],x=0;if(b)return b.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&x>=s.length&&(s=void 0),{value:s&&s[x++],done:!s}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("./lib/dom");e("./lib/event");var u=e("./range").Range,d=e("./lib/scroll").preventParentScroll,a="ace_tooltip",l=(function(){function s(p){this.isOpen=!1,this.$element=null,this.$parentNode=p}return s.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(p){this.getElement().textContent=p},s.prototype.setHtml=function(p){this.getElement().innerHTML=p},s.prototype.setPosition=function(p,b){this.getElement().style.left=p+"px",this.getElement().style.top=b+"px"},s.prototype.setClassName=function(p){w.addCssClass(this.getElement(),p)},s.prototype.setTheme=function(p){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),p.isDark&&w.addCssClass(this.getElement(),"ace_dark"),p.cssClass&&w.addCssClass(this.getElement(),p.cssClass),this.theme={isDark:p.isDark,cssClass:p.cssClass}},s.prototype.show=function(p,b,x){p!=null&&this.setText(p),b!=null&&x!=null&&this.setPosition(b,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(p){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s})(),c=(function(){function s(){this.popups=[]}return s.prototype.addPopup=function(p){this.popups.push(p),this.updatePopups()},s.prototype.removePopup=function(p){var b=this.popups.indexOf(p);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},s.prototype.updatePopups=function(){var p,b,x,M;this.popups.sort(function(F,L){return L.priority-F.priority});var R=[];try{for(var A=g(this.popups),C=A.next();!C.done;C=A.next()){var O=C.value,D=!0;try{for(var I=(x=void 0,g(R)),T=I.next();!T.done;T=I.next()){var B=T.value;if(this.doPopupsOverlap(B,O)){D=!1;break}}}catch(F){x={error:F}}finally{try{T&&!T.done&&(M=I.return)&&M.call(I)}finally{if(x)throw x.error}}D?R.push(O):O.hide()}}catch(F){p={error:F}}finally{try{C&&!C.done&&(b=A.return)&&b.call(A)}finally{if(p)throw p.error}}},s.prototype.doPopupsOverlap=function(p,b){var x=p.getElement().getBoundingClientRect(),M=b.getElement().getBoundingClientRect();return x.left<M.right&&x.right>M.left&&x.top<M.bottom&&x.bottom>M.top},s})(),h=new c;r.popupManager=h,r.Tooltip=l;var o=(function(s){f(p,s);function p(b){b===void 0&&(b=document.body);var x=s.call(this,b)||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 M=x.getElement();return M.style.whiteSpace="pre-wrap",M.style.pointerEvents="auto",M.addEventListener("mouseout",x.onMouseOut),M.tabIndex=-1,M.addEventListener("blur",(function(){M.contains(document.activeElement)||this.hide()}).bind(x)),M.addEventListener("wheel",d),x}return p.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},p.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},p.prototype.onMouseMove=function(b,x){this.lastEvent=b,this.lastT=Date.now();var M=x.$mouseHandler.isMousePressed;if(this.isOpen){var R=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(R.row,R.column)||M||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||M||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},p.prototype.isOutsideOfText=function(b){var x=b.editor,M=b.getDocumentPosition(),R=x.session.getLine(M.row);if(M.column==R.length){var A=x.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),C=x.session.documentToScreenPosition(M.row,M.column);if(C.column!=A.column||C.row!=A.row)return!0}return!1},p.prototype.setDataProvider=function(b){this.$gatherData=b},p.prototype.showForRange=function(b,x,M,R){if(!(R&&R!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var A=b.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(A.theme)),this.isOpen=!0,this.range=u.fromPoints(x.start,x.end);var C=A.textToScreenCoordinates(x.start.row,x.start.column),O=A.scroller.getBoundingClientRect();C.pageX<O.left&&(C.pageX=O.left);var D=this.getElement();D.innerHTML="",D.appendChild(M),D.style.maxHeight="",D.style.display="block",this.$setPosition(b,C,!0,x),w.$fixPositionBug(D)}},p.prototype.$setPosition=function(b,x,M,R){var A=10;M&&this.addMarker(R,b.session);var C=b.renderer,O=this.getElement(),D=O.offsetHeight,I=O.offsetWidth,T=x.pageY,B=x.pageX,F=window.innerHeight-T-C.lineHeight,L=this.$shouldPlaceAbove(D,T,F-A);O.style.maxHeight=(L?T:F)-A+"px",O.style.top=L?"":T+C.lineHeight+"px",O.style.bottom=L?window.innerHeight-T+"px":"",O.style.left=Math.min(B,window.innerWidth-I-A)+"px"},p.prototype.$shouldPlaceAbove=function(b,x,M){return!(x-b<0&&x<M)},p.prototype.addMarker=function(b,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(b,"ace_highlight-marker","text")},p.prototype.hide=function(b){b&&this.$fromKeyboard&&b.type=="keydown"&&b.code=="Escape"||!b&&document.activeElement==this.getElement()||b&&b.target&&(b.type!="keydown"||b.ctrlKey||b.metaKey)&&this.$element.contains(b.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,h.removePopup(this)))},p.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},p.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},p.prototype.onMouseOut=function(b){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!b.relatedTarget||this.getElement().contains(b.relatedTarget)||b&&b.currentTarget.contains(b.relatedTarget)||b.relatedTarget.classList.contains("ace_content")||this.hide())},p})(l);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,m){var f=this&&this.__extends||(function(){var o=function(s,p){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&(b[M]=x[M])},o(s,p)};return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");o(s,p);function b(){this.constructor=s}s.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}})(),g=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,p=s&&o[s],b=0;if(p)return p.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&b>=o.length&&(o=void 0),{value:o&&o[b++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("../lib/dom"),u=e("./mouse_event").MouseEvent,d=e("../tooltip").HoverTooltip,a=e("../config").nls,l=e("../range").Range;function c(o){var s=o.editor,p=s.renderer.$gutterLayer;o.$tooltip=new h(s),o.$tooltip.addToEditor(s),o.$tooltip.setDataProvider(function(b,x){var M=b.getDocumentPosition().row;o.$tooltip.showTooltip(M)}),o.editor.setDefaultHandler("guttermousedown",function(b){if(!(!s.isFocused()||b.getButton()!=0)){var x=p.getRegion(b);if(x!="foldWidgets"){var M=b.getDocumentPosition().row,R=s.session.selection;if(b.getShiftKey())R.selectTo(M,0);else{if(b.domEvent.detail==2)return s.selectAll(),b.preventDefault();o.$clickSelection=s.selection.getLineRange(M)}return o.setState("selectByLines"),o.captureMouse(b),b.preventDefault()}}})}r.GutterHandler=c;var h=(function(o){f(s,o);function s(p){var b=o.call(this,p.container)||this;b.id="gt"+ ++s.$uid,b.editor=p,b.visibleTooltipRow;var x=b.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",b.id),x.style.pointerEvents="auto",b.idleTime=50,b.onDomMouseMove=b.onDomMouseMove.bind(b),b.onDomMouseOut=b.onDomMouseOut.bind(b),b.setClassName("ace_gutter-tooltip"),b}return s.prototype.onDomMouseMove=function(p){var b=new u(p,this.editor);this.onMouseMove(b,this.editor)},s.prototype.onDomMouseOut=function(p){var b=new u(p,this.editor);this.onMouseOut(b)},s.prototype.addToEditor=function(p){var b=p.renderer.$gutter;b.addEventListener("mousemove",this.onDomMouseMove),b.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,p)},s.prototype.removeFromEditor=function(p){var b=p.renderer.$gutter;b.removeEventListener("mousemove",this.onDomMouseMove),b.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,p)},s.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(p){var b,x=this.editor.renderer.$gutterLayer,M=x.$annotations[p],R;M?R={displayText:Array.from(M.displayText),type:Array.from(M.type)}:R={displayText:[],type:[]};var A=x.session.getFoldLine(p);if(A&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},D,I=p+1;I<=A.end.row;I++)if(x.$annotations[I])for(var T=0;T<x.$annotations[I].text.length;T++){var B=x.$annotations[I].type[T];C[B].push(x.$annotations[I].text[T]),(!D||O[B]<O[D])&&(D=B)}if(["error","security","warning"].includes(D)){var F="".concat(s.annotationsToSummaryString(C)," in folded code.");R.displayText.push(F),R.type.push(D+"_fold")}}if(R.displayText.length===0)return this.hide();for(var L={error:[],security:[],warning:[],info:[],hint:[]},$=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<R.displayText.length;I++){var _=w.createElement("span"),N=w.createElement("span");(b=N.classList).add.apply(b,["ace_".concat(R.type[I]),$]),N.setAttribute("aria-label","".concat(s.annotationLabels[R.type[I].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(w.createTextNode(" ")),_.appendChild(N),_.appendChild(w.createTextNode(R.displayText[I])),_.appendChild(w.createElement("br")),L[R.type[I].replace("_fold","")].push(_)}var W=w.createElement("span");L.error.forEach(function(J){return W.appendChild(J)}),L.security.forEach(function(J){return W.appendChild(J)}),L.warning.forEach(function(J){return W.appendChild(J)}),L.info.forEach(function(J){return W.appendChild(J)}),L.hint.forEach(function(J){return W.appendChild(J)}),W.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(p);U&&U.setAttribute("aria-describedby",this.id);var G=l.fromPoints({row:p,column:0},{row:p,column:0});this.showForRange(this.editor,G,W),this.visibleTooltipRow=p,this.editor._signal("showGutterTooltip",this)},s.prototype.$setPosition=function(p,b,x,M){var R=this.$findCellByRow(M.start.row);if(R){var A=R&&R.element,C=A&&A.querySelector(".ace_gutter_annotation");if(C){var O=C.getBoundingClientRect();if(O){var D={pageX:O.right,pageY:O.top};return o.prototype.$setPosition.call(this,p,D,!1,M)}}}},s.prototype.$shouldPlaceAbove=function(p,b,x){return x<p},s.prototype.$findLinkedAnnotationNode=function(p){var b=this.$findCellByRow(p);if(b){var x=b.element;if(x.childNodes.length>2)return x.childNodes[2]}},s.prototype.$findCellByRow=function(p){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===p})},s.prototype.hide=function(p){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var b=this.$findLinkedAnnotationNode(this.visibleTooltipRow);b&&b.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,p)}},s.annotationsToSummaryString=function(p){var b,x,M=[],R=["error","security","warning","info","hint"];try{for(var A=g(R),C=A.next();!C.done;C=A.next()){var O=C.value;if(p[O].length){var D=p[O].length===1?s.annotationLabels[O].singular:s.annotationLabels[O].plural;M.push("".concat(p[O].length," ").concat(D))}}}catch(I){b={error:I}}finally{try{C&&!C.done&&(x=A.return)&&x.call(A)}finally{if(b)throw b.error}}return M.join(", ")},s.prototype.isOutsideOfText=function(p){var b=p.editor,x=b.renderer.$gutter.getBoundingClientRect();return!(p.clientX>=x.left&&p.clientX<=x.right&&p.clientY>=x.top&&p.clientY<=x.bottom)},s})(d);h.$uid=0,r.GutterTooltip=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,m){var f=e("../lib/dom"),g=e("../lib/event"),w=e("../lib/useragent"),u=200,d=200,a=5;function l(h){var o=h.editor,s=f.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent=" ";var p=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];p.forEach(function(ee){h[ee]=this[ee]},this),o.on("mousedown",this.onMouseDown.bind(h));var b=o.container,x,M,R,A,C,O,D=0,I,T,B,F,L;this.onDragStart=function(ee){if(this.cancelDrag||!b.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ee)},0),ee.preventDefault()}C=o.getSelectionRange();var se=ee.dataTransfer;se.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(s),se.setDragImage&&se.setDragImage(s,0,0),setTimeout(function(){o.container.removeChild(s)}),se.clearData(),se.setData("Text",o.session.getTextRange()),T=!0,this.setState("drag")},this.onDragEnd=function(ee){if(b.draggable=!1,T=!1,this.setState(null),!o.getReadOnly()){var le=ee.dataTransfer.dropEffect;!I&&le=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ee){if(!(o.getReadOnly()||!te(ee.dataTransfer)))return M=ee.clientX,R=ee.clientY,x||W(),D++,ee.dataTransfer.dropEffect=I=he(ee),g.preventDefault(ee)},this.onDragOver=function(ee){if(!(o.getReadOnly()||!te(ee.dataTransfer)))return M=ee.clientX,R=ee.clientY,x||(W(),D++),G!==null&&(G=null),ee.dataTransfer.dropEffect=I=he(ee),g.preventDefault(ee)},this.onDragLeave=function(ee){if(D--,D<=0&&x)return U(),I=null,g.preventDefault(ee)},this.onDrop=function(ee){if(O){var le=ee.dataTransfer;if(T)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=le.getData("Text");C={start:O,end:o.session.insert(O,se)},o.focus(),I=null}return U(),g.preventDefault(ee)}},g.addListener(b,"dragstart",this.onDragStart.bind(h),o),g.addListener(b,"dragend",this.onDragEnd.bind(h),o),g.addListener(b,"dragenter",this.onDragEnter.bind(h),o),g.addListener(b,"dragover",this.onDragOver.bind(h),o),g.addListener(b,"dragleave",this.onDragLeave.bind(h),o),g.addListener(b,"drop",this.onDrop.bind(h),o);function $(ee,le){var se=Date.now(),ce=!le||ee.row!=le.row,pe=!le||ee.column!=le.column;if(!F||ce||pe)o.moveCursorToPosition(ee),F=se,L={x:M,y:R};else{var ve=c(L.x,L.y,M,R);ve>a?F=null:se-F>=d&&(o.renderer.scrollCursorIntoView(),F=null)}}function _(ee,le){var se=Date.now(),ce=o.renderer.layerConfig.lineHeight,pe=o.renderer.layerConfig.characterWidth,ve=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:M-ve.left,right:ve.right-M},y:{top:R-ve.top,bottom:ve.bottom-R}},Ee=Math.min($e.x.left,$e.x.right),qe=Math.min($e.y.top,$e.y.bottom),He={row:ee.row,column:ee.column};Ee/pe<=2&&(He.column+=$e.x.left<$e.x.right?-3:2),qe/ce<=1&&(He.row+=$e.y.top<$e.y.bottom?-1:1);var tt=ee.row!=He.row,Xe=ee.column!=He.column,it=!le||ee.row!=le.row;tt||Xe&&!it?B?se-B>=u&&o.renderer.scrollCursorIntoView(He):B=se:B=null}function N(){var ee=O;O=o.renderer.screenToTextCoordinates(M,R),$(O,ee),_(O,ee)}function W(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(A),N(),A=setInterval(N,20),D=0,g.addListener(document,"mousemove",J)}function U(){clearInterval(A),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!T&&o.$resetCursorStyle(),C=null,O=null,D=0,B=null,F=null,g.removeListener(document,"mousemove",J)}var G=null;function J(){G==null&&(G=setTimeout(function(){G!=null&&x&&U()},20))}function te(ee){var le=ee.types;return!le||Array.prototype.some.call(le,function(se){return se=="text/plain"||se=="Text"})}function he(ee){var le=["copy","copymove","all","uninitialized"],se=["move","copymove","linkmove","all","uninitialized"],ce=w.isMac?ee.altKey:ee.ctrlKey,pe="uninitialized";try{pe=ee.dataTransfer.effectAllowed.toLowerCase()}catch{}var ve="none";return ce&&le.indexOf(pe)>=0?ve="copy":se.indexOf(pe)>=0?ve="move":le.indexOf(pe)>=0&&(ve="copy"),ve}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,o=h.container;o.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var s=w.isWin?"default":"move";h.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(h){var o=this.editor.container;if(w.isIE&&this.state=="dragReady"){var s=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&o.dragDrop()}if(this.state==="dragWait"){var s=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var o=this.editor,s=h.inSelection(),p=h.getButton(),b=h.domEvent.detail||1;if(b===1&&p===0&&s){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var M=o.container;M.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(l.prototype);function c(h,o,s,p){return Math.sqrt(Math.pow(s-h,2)+Math.pow(p-o,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,m){var f=e("./mouse_event").MouseEvent,g=e("../lib/event"),w=e("../lib/dom");r.addTouchListeners=function(u,d){var a="scroll",l,c,h,o,s,p,b=0,x,M=0,R=0,A=0,C,O;function D(){var $=window.navigator&&window.navigator.clipboard,_=!1,N=function(){var G=d.getCopyText(),J=d.session.getUndoManager().hasUndo();O.replaceChild(w.buildDom(_?["span",!G&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],J&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),O.firstChild)},W=function(G){return d.commands.canExecute(G,d)},U=function(G){var J=G.target.getAttribute("action");if(J=="more"||!_)return _=!_,N();J=="paste"?$.readText().then(function(te){d.execCommand(J,te)}):J&&((J=="cut"||J=="copy")&&($?$.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(J)),O.firstChild.style.display="none",_=!1,J!="openCommandPalette"&&d.focus()};O=w.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container),O.addEventListener("touchstart",function(G){a="menu",G.stopPropagation(),G.preventDefault(),d.textInput.focus()}),O.addEventListener("touchend",function(G){G.stopPropagation(),G.preventDefault(),U(G)})}function I(){if(!d.getOption("enableMobileMenu")){O&&T();return}O||D();var $=d.selection.cursor,_=d.renderer.textToScreenCoordinates($.row,$.column),N=d.renderer.textToScreenCoordinates(0,0).pageX,W=d.renderer.scrollLeft,U=d.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=N+W-U.left+"px"),O.style.display="",O.firstChild.style.display="none",d.on("input",T)}function T($){O&&(O.style.display="none"),d.off("input",T)}function B(){s=null,clearTimeout(s);var $=d.selection.getRange(),_=$.contains(x.row,x.column);($.isEmpty()||!_)&&(d.selection.moveToPosition(x),d.selection.selectWord()),a="wait",I()}function F(){s=null,clearTimeout(s),d.selection.moveToPosition(x);var $=M>=2?d.selection.getLineRange(x.row):d.session.getBracketRange(x);$&&!$.isEmpty()?d.selection.setRange($):d.selection.selectWord(),a="wait"}g.addListener(u,"contextmenu",function($){if(C){var _=d.textInput.getElement();_.focus()}},d),g.addListener(u,"touchstart",function($){var _=$.touches;if(s||_.length>1){clearTimeout(s),s=null,h=-1,a="zoom";return}C=d.$mouseHandler.isMousePressed=!0;var N=d.renderer.layerConfig.lineHeight,W=d.renderer.layerConfig.lineHeight,U=$.timeStamp;o=U;var G=_[0],J=G.clientX,te=G.clientY;Math.abs(l-J)+Math.abs(c-te)>N&&(h=-1),l=$.clientX=J,c=$.clientY=te,R=A=0;var he=new f($,d);if(x=he.getDocumentPosition(),U-h<500&&_.length==1&&!b)M++,$.preventDefault(),$.button=0,F();else{M=0;var ee=d.selection.cursor,le=d.selection.isEmpty()?ee:d.selection.anchor,se=d.renderer.$cursorLayer.getPixelPosition(ee,!0),ce=d.renderer.$cursorLayer.getPixelPosition(le,!0),pe=d.renderer.scroller.getBoundingClientRect(),ve=d.renderer.layerConfig.offset,$e=d.renderer.scrollLeft,Ee=function(tt,Xe){return tt=tt/W,Xe=Xe/N-.75,tt*tt+Xe*Xe};if($.clientX<pe.left){a="zoom";return}var qe=Ee($.clientX-pe.left-se.left+$e,$.clientY-pe.top-se.top+ve),He=Ee($.clientX-pe.left-ce.left+$e,$.clientY-pe.top-ce.top+ve);qe<3.5&&He<3.5&&(a=qe>He?"cursor":"anchor"),He<3.5?a="anchor":qe<3.5?a="cursor":a="scroll",s=setTimeout(B,450)}h=U},d),g.addListener(u,"touchend",function($){C=d.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),a=="zoom"?(a="",b=0):s?(d.selection.moveToPosition(x),b=0,I()):a=="scroll"?(L(),T()):I(),clearTimeout(s),s=null},d),g.addListener(u,"touchmove",function($){s&&(clearTimeout(s),s=null);var _=$.touches;if(!(_.length>1||a=="zoom")){var N=_[0],W=l-N.clientX,U=c-N.clientY;if(a=="wait")if(W*W+U*U>4)a="cursor";else return $.preventDefault();l=N.clientX,c=N.clientY,$.clientX=N.clientX,$.clientY=N.clientY;var G=$.timeStamp,J=G-o;if(o=G,a=="scroll"){var te=new f($,d);te.speed=1,te.wheelX=W,te.wheelY=U,10*Math.abs(W)<Math.abs(U)&&(W=0),10*Math.abs(U)<Math.abs(W)&&(U=0),J!=0&&(R=W/J,A=U/J),d._emit("mousewheel",te),te.propagationStopped||(R=A=0)}else{var he=new f($,d),ee=he.getDocumentPosition();a=="cursor"?d.selection.moveCursorToPosition(ee):a=="anchor"&&d.selection.setSelectionAnchor(ee.row,ee.column),d.renderer.scrollCursorIntoView(ee),$.preventDefault()}}},d);function L(){b+=60,p=setInterval(function(){b--<=0&&(clearInterval(p),p=null),Math.abs(R)<.01&&(R=0),Math.abs(A)<.01&&(A=0),b<20&&(R=.9*R),b<20&&(A=.9*A);var $=d.session.getScrollTop();d.renderer.scrollBy(10*R,10*A),$==d.session.getScrollTop()&&(b=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,m){var f=e("../lib/event"),g=e("../lib/useragent"),w=e("./default_handlers").DefaultHandlers,u=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,c=e("../config"),h=(function(){function o(s){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var p=this;this.editor=s,new w(this),new u(this),new a(this);var b=function(R){var A=!document.hasFocus||!document.hasFocus()||!s.isFocused()&&document.activeElement==(s.textInput&&s.textInput.getElement());A&&window.focus(),s.focus(),setTimeout(function(){s.isFocused()||s.focus()})},x=s.renderer.getMouseEventTarget();f.addListener(x,"click",this.onMouseEvent.bind(this,"click"),s),f.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),s),f.addMultiMouseDownListener([x,s.renderer.scrollBarV&&s.renderer.scrollBarV.inner,s.renderer.scrollBarH&&s.renderer.scrollBarH.inner,s.textInput&&s.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",s),f.addMouseWheelListener(s.container,this.onMouseWheel.bind(this,"mousewheel"),s),l(s.container,s);var M=s.renderer.$gutter;f.addListener(M,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),s),f.addListener(M,"click",this.onMouseEvent.bind(this,"gutterclick"),s),f.addListener(M,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),s),f.addListener(M,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),s),f.addListener(x,"mousedown",b,s),f.addListener(M,"mousedown",b,s),g.isIE&&s.renderer.scrollBarV&&(f.addListener(s.renderer.scrollBarV.element,"mousedown",b,s),f.addListener(s.renderer.scrollBarH.element,"mousedown",b,s)),s.on("mousemove",function(R){if(!(p.state||p.$dragDelay||!p.$dragEnabled)){var A=s.renderer.screenToTextCoordinates(R.x,R.y),C=s.session.selection.getRange(),O=s.renderer;!C.isEmpty()&&C.insideStart(A.row,A.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},s)}return o.prototype.onMouseEvent=function(s,p){this.editor.session&&this.editor._emit(s,new d(p,this.editor))},o.prototype.onMouseMove=function(s,p){var b=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!b||!b.length||this.editor._emit(s,new d(p,this.editor))},o.prototype.onMouseWheel=function(s,p){var b=new d(p,this.editor);b.speed=this.$scrollSpeed*2,b.wheelX=p.wheelX,b.wheelY=p.wheelY,this.editor._emit(s,b)},o.prototype.setState=function(s){this.state=s},o.prototype.captureMouse=function(s,p){this.x=s.x,this.y=s.y,this.isMousePressed=!0;var b=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var M=this,R=!0,A=function(T){if(T){if(g.isWebKit&&!T.which&&M.releaseMouse)return M.releaseMouse();M.x=T.clientX,M.y=T.clientY,p&&p(T),M.mouseEvent=new d(T,M.editor),M.$mouseMoved=!0}},C=function(T){b.off("beforeEndOperation",I),R=!1,b.session&&O(),M[M.state+"End"]&&M[M.state+"End"](T),M.state="",M.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),M.$onCaptureMouseMove=M.releaseMouse=null,T&&M.onMouseEvent("mouseup",T),b.endOperation()},O=function(){M[M.state]&&M[M.state](),M.$mouseMoved=!1},D=function(){R&&(O(),f.nextFrame(D))};if(g.isOldIE&&s.domEvent.type=="dblclick")return setTimeout(function(){C(s)});var I=function(T){M.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(M[M.state+"End"]&&M[M.state+"End"](),M.state="",M.releaseMouse())};b.on("beforeEndOperation",I),b.startOperation({command:{name:"mouse"}}),M.$onCaptureMouseMove=A,M.releaseMouse=f.capture(this.editor.container,A,C),D()},o.prototype.cancelContextMenu=function(){var s=(function(p){p&&p.domEvent&&p.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",s),p&&p.domEvent&&f.stopEvent(p.domEvent))}).bind(this);setTimeout(s,10),this.editor.on("nativecontextmenu",s)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();h.prototype.releaseMouse=null,c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,m){var f=e("../lib/dom"),g=(function(){function w(u){u.on("click",function(d){var a=d.getDocumentPosition(),l=u.session,c=l.getFoldAt(a.row,a.column,1);c&&(d.getAccelKey()?l.removeFold(c):l.expandFold(c),d.stop());var h=d.domEvent&&d.domEvent.target;h&&f.hasCssClass(h,"ace_inline_button")&&f.hasCssClass(h,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),u.renderer.scrollCursorIntoView())}),u.on("gutterclick",function(d){var a=u.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,c=u.session;c.foldWidgets&&c.foldWidgets[l]&&u.session.onFoldWidgetClick(l,d),u.isFocused()||u.focus(),d.stop()}}),u.on("gutterdblclick",function(d){var a=u.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,c=u.session,h=c.getParentFoldRangeData(l,!0),o=h.range||h.firstRange;if(o){l=o.start.row;var s=c.getFoldAt(l,c.getLine(l).length,1);s?c.removeFold(s):(c.addFold("...",o),u.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}d.stop()}})}return w})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,m){var f=e("../lib/keys"),g=e("../lib/event"),w=(function(){function u(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return u.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},u.prototype.setKeyboardHandler=function(d){var a=this.$handlers;if(a[a.length-1]!=d){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(d,1)}},u.prototype.addKeyboardHandler=function(d,a){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var l=this.$handlers.indexOf(d);l!=-1&&this.$handlers.splice(l,1),a==null?this.$handlers.push(d):this.$handlers.splice(a,0,d),l==-1&&d.attach&&d.attach(this.$editor)}},u.prototype.removeKeyboardHandler=function(d){var a=this.$handlers.indexOf(d);return a==-1?!1:(this.$handlers.splice(a,1),d.detach&&d.detach(this.$editor),!0)},u.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},u.prototype.getStatusText=function(){var d=this.$data,a=d.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(a,d)||""}).filter(Boolean).join(" ")},u.prototype.$callKeyboardHandlers=function(d,a,l,c){for(var h,o=!1,s=this.$editor.commands,p=this.$handlers.length;p--&&(h=this.$handlers[p].handleKeyboard(this.$data,d,a,l,c),!(!(!h||!h.command)&&(h.command=="null"?o=!0:o=s.exec(h.command,this.$editor,h.args,c),o&&c&&d!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&g.stopEvent(c),o))););return!o&&d==-1&&(h={command:"insertstring"},o=s.exec("insertstring",this.$editor,a)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),o},u.prototype.onCommandKey=function(d,a,l){var c=f.keyCodeToString(l);return this.$callKeyboardHandlers(a,c,l,d)},u.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},u})();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,m){var f=0,g=0,w=!1,u=!1,d=!1,a=[[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]],l=[[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]],c=0,h=1,o=0,s=1,p=2,b=3,x=4,M=5,R=6,A=7,C=8,O=9,D=10,I=11,T=12,B=13,F=14,L=15,$=16,_=17,N=18,W=[N,N,N,N,N,N,N,N,N,R,M,R,C,M,N,N,N,N,N,N,N,N,N,N,N,N,N,N,M,M,M,R,C,x,x,I,I,I,x,x,x,x,x,D,O,D,O,O,p,p,p,p,p,p,p,p,p,p,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,N,N,N,N,N,N,M,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,O,x,I,I,I,I,x,x,x,x,o,x,x,N,x,x,I,I,p,p,x,o,x,x,x,p,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,s,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,M,B,F,L,$,_,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 G(ee,le,se,ce){var pe=f?l:a,ve=null,$e=null,Ee=null,qe=0,He=null,tt=null,Xe=-1,it=null,Wt=null,br=[];if(!ce)for(it=0,ce=[];it<se;it++)ce[it]=he(ee[it]);for(g=f,w=!1,u=!1,d=!1,Wt=0;Wt<se;Wt++){if(ve=qe,br[Wt]=$e=te(ee,ce,br,Wt),qe=pe[ve][$e],He=qe&240,qe&=15,le[Wt]=Ee=pe[qe][5],He>0)if(He==16){for(it=Xe;it<Wt;it++)le[it]=1;Xe=-1}else Xe=-1;if(tt=pe[qe][6],tt)Xe==-1&&(Xe=Wt);else if(Xe>-1){for(it=Xe;it<Wt;it++)le[it]=Ee;Xe=-1}ce[Wt]==M&&(le[Wt]=0),g|=Ee}if(d){for(it=0;it<se;it++)if(ce[it]==R){le[it]=f;for(var At=it-1;At>=0&&ce[At]==C;At--)le[At]=f}}}function J(ee,le,se){if(!(g<ee)){if(ee==1&&f==h&&!u){se.reverse();return}for(var ce=se.length,pe=0,ve,$e,Ee,qe;pe<ce;){if(le[pe]>=ee){for(ve=pe+1;ve<ce&&le[ve]>=ee;)ve++;for($e=pe,Ee=ve-1;$e<Ee;$e++,Ee--)qe=se[$e],se[$e]=se[Ee],se[Ee]=qe;pe=ve}pe++}}}function te(ee,le,se,ce){var pe=le[ce],ve,$e,Ee,qe;switch(pe){case o:case s:w=!1;case x:case b:return pe;case p:return w?b:p;case A:return w=!0,s;case C:return x;case O:return ce<1||ce+1>=le.length||(ve=se[ce-1])!=p&&ve!=b||($e=le[ce+1])!=p&&$e!=b?x:(w&&($e=b),$e==ve?$e:x);case D:return ve=ce>0?se[ce-1]:M,ve==p&&ce+1<le.length&&le[ce+1]==p?p:x;case I:if(ce>0&&se[ce-1]==p)return p;if(w)return x;for(qe=ce+1,Ee=le.length;qe<Ee&&le[qe]==I;)qe++;return qe<Ee&&le[qe]==p?p:x;case T:for(Ee=le.length,qe=ce+1;qe<Ee&&le[qe]==T;)qe++;if(qe<Ee){var He=ee[ce],tt=He>=1425&&He<=2303||He==64286;if(ve=le[qe],tt&&(ve==s||ve==A))return s}return ce<1||(ve=le[ce-1])==M?x:se[ce-1];case M:return w=!1,u=!0,f;case R:return d=!0,x;case B:case F:case $:case _:case L:w=!1;case N:return x}}function he(ee){var le=ee.charCodeAt(0),se=le>>8;return se==0?le>191?o:W[le]:se==5?/[\u0591-\u05f4]/.test(ee)?s:o:se==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ee)?T:/[\u0660-\u0669\u066b-\u066c]/.test(ee)?b:le==1642?I:/[\u06f0-\u06f9]/.test(ee)?p:A:se==32&&le<=8287?U[le&255]:se==254&&le>=65136?A:x}r.L=o,r.R=s,r.EN=p,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ee,le,se){if(ee.length<2)return{};var ce=ee.split(""),pe=new Array(ce.length),ve=new Array(ce.length),$e=[];f=se?h:c,G(ce,$e,ce.length,le);for(var Ee=0;Ee<pe.length;pe[Ee]=Ee,Ee++);J(2,$e,pe),J(1,$e,pe);for(var Ee=0;Ee<pe.length-1;Ee++)le[Ee]===b?$e[Ee]=r.AN:$e[Ee]===s&&(le[Ee]>A&&le[Ee]<B||le[Ee]===x||le[Ee]===N)?$e[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&($e[Ee-1]=$e[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&($e[ce.length-1]=r.B),ce[0]==="‫"&&($e[0]=r.RLE);for(var Ee=0;Ee<pe.length;Ee++)ve[Ee]=$e[pe[Ee]];return{logicalFromVisual:pe,bidiLevels:ve}},r.hasBidiCharacters=function(ee,le){for(var se=!1,ce=0;ce<ee.length;ce++)le[ce]=he(ee.charAt(ce)),!se&&(le[ce]==s||le[ce]==A||le[ce]==b)&&(se=!0);return se},r.getVisualFromLogicalIdx=function(ee,le){for(var se=0;se<le.logicalFromVisual.length;se++)if(le.logicalFromVisual[se]==ee)return se;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,m){var f=e("./lib/bidiutil"),g=e("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,u=(function(){function d(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=f,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=w.test(a.getValue())}return d.prototype.isBidiRow=function(a,l,c){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(l,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&w.test(a.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var a=0,l=this.session.$screenRowCache;if(l.length){var c=this.session.$getRowCacheIndex(l,this.currentRow);c>=0&&(a=this.session.$docRowCache[c])}return a},d.prototype.getSplitIndex=function(){var a=0,l=this.session.$screenRowCache;if(l.length)for(var c,h=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-a>0&&(c=this.session.$getRowCacheIndex(l,this.currentRow-a-1),c===h);)h=c,a++;else a=this.currentRow;return a},d.prototype.updateRowLine=function(a,l){a===void 0&&(a=this.getDocumentRow());var c=a===this.session.getLength()-1,h=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[a];o&&(l===void 0&&(l=this.getSplitIndex()),l>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[f.L],this.line=l<o.length?this.line.substring(o[l-1],o[l]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[l]),l==o.length&&(this.line+=this.showInvisibles?h:f.DOT))}else this.line+=this.showInvisibles?h:f.DOT;var s=this.session,p=0,b;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,M){return x===" "||s.isFullWidth(x.charCodeAt(0))?(b=x===" "?s.getScreenTabSize(M+p):2,p+=b-1,g.stringRepeat(f.DOT,b)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==f.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var a=[];f.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=f.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var l=this.characterWidth=a.$characterSize.width,c=a.$measureCharWidth("ה");this.charWidths[f.L]=this.charWidths[f.EN]=this.charWidths[f.ON_R]=l,this.charWidths[f.R]=this.charWidths[f.AN]=c,this.charWidths[f.R_H]=c*.45,this.charWidths[f.B]=this.charWidths[f.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},d.prototype.setEolChar=function(a){this.EOL=a},d.prototype.setContentWidth=function(a){this.contentWidth=a},d.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(a,l){for(var c=a.getCursorPosition(),h=a.selection.getSelectionAnchor().row;h<=c.row;h++)!l&&a.session.getLine(h).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(h,0,1):l&&a.session.getLine(h).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:h},a.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(a){a-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,c=a>l?this.session.getOverwrite()?a:a-1:l,h=f.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&a<=l&&o[h]%2!==0&&h++;for(var p=0;p<h;p++)s+=this.charWidths[o[p]];return!this.session.getOverwrite()&&a>l&&o[h]%2===0&&(s+=this.charWidths[o[h]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},d.prototype.getSelections=function(a,l){var c=this.bidiMap,h=c.bidiLevels,o,s=[],p=0,b=Math.min(a,l)-this.wrapIndent,x=Math.max(a,l)-this.wrapIndent,M=!1,R=!1,A=0;this.wrapIndent&&(p+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<h.length;O++)C=c.logicalFromVisual[O],o=h[O],M=C>=b&&C<x,M&&!R?A=p:!M&&R&&s.push({left:A,width:p-A}),p+=this.charWidths[o],R=M;if(M&&O===h.length&&s.push({left:A,width:p-A}),this.isRtlDir)for(var D=0;D<s.length;D++)s[D].left+=this.rtlLineOffset;return s},d.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var l=0,c=Math.max(c,0),h=0,o=0,s=this.bidiMap.bidiLevels,p=this.charWidths[s[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>h+p/2;){if(h+=p,o===s.length-1){p=0;break}p=this.charWidths[s[++o]]}return o>0&&s[o-1]%2!==0&&s[o]%2===0?(c<h&&o--,l=this.bidiMap.logicalFromVisual[o]):o>0&&s[o-1]%2===0&&s[o]%2!==0?l=1+(c>h?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===s.length-1&&p===0&&s[o-1]%2===0||!this.isRtlDir&&o===0&&s[o]%2!==0?l=1+this.bidiMap.logicalFromVisual[o]:(o>0&&s[o-1]%2!==0&&p!==0&&o--,l=this.bidiMap.logicalFromVisual[o]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},d})();r.BidiHandler=u}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,m){var f=e("./lib/oop"),g=e("./lib/lang"),w=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,d=(function(){function a(l){this.session=l,this.doc=l.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(h){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&h.old.column!=h.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(l,c){this.$isEmpty=!1,this.anchor.setPosition(l,c)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var l=this.anchor,c=this.lead;return l.row>c.row||l.row==c.row&&l.column>c.column},a.prototype.getRange=function(){var l=this.anchor,c=this.lead;return this.$isEmpty?u.fromPoints(c,c):this.isBackwards()?u.fromPoints(c,l):u.fromPoints(l,c)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(l,c){var h=c?l.end:l.start,o=c?l.start:l.end;this.$setSelection(h.row,h.column,o.row,o.column)},a.prototype.$setSelection=function(l,c,h,o){if(!this.$silent){var s=this.$isEmpty,p=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,c),this.cursor.setPosition(h,o),this.$isEmpty=!u.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||p)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(l){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),l.call(this)},a.prototype.selectTo=function(l,c){this.$moveSelection(function(){this.moveCursorTo(l,c)})},a.prototype.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},a.prototype.moveTo=function(l,c){this.clearSelection(),this.moveCursorTo(l,c)},a.prototype.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(l,c){if(typeof c>"u"){var h=l||this.lead;l=h.row,c=h.column}return this.session.getWordRange(l,c)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var l=this.getCursor(),c=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(c)},a.prototype.getLineRange=function(l,c){var h=typeof l=="number"?l:this.lead.row,o,s=this.session.getFoldLine(h);return s?(h=s.start.row,o=s.end.row):o=h,c===!0?new u(h,0,o,this.session.getLine(o).length):new u(h,0,o+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(l,c,h){var o=l.column,s=l.column+c;return h<0&&(o=l.column-c,s=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(o,s).split(" ").length-1==c},a.prototype.moveCursorLeft=function(){var l=this.lead.getPosition(),c;if(c=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var h=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,h,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-h):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var l=this.lead.getPosition(),c;if(c=this.session.getFoldAt(l.row,l.column,1))this.moveCursorTo(c.end.row,c.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 h=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,h,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,h):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var l=this.lead.row,c=this.lead.column,h=this.session.documentToScreenRow(l,c),o=this.session.screenToDocumentPosition(h,0),s=this.session.getDisplayLine(l,null,o.row,o.column),p=s.match(/^\s*/);p[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=p[0].length),this.moveCursorToPosition(o)},a.prototype.moveCursorLineEnd=function(){var l=this.lead,c=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==c.column){var h=this.session.getLine(c.row);if(c.column==h.length){var o=h.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},a.prototype.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,c=this.doc.getLine(l).length;this.moveCursorTo(l,c)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var l=this.lead.row,c=this.lead.column,h=this.doc.getLine(l),o=h.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(l,c,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=h.substring(c)),c>=h.length){this.moveCursorTo(l,h.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,c)},a.prototype.moveCursorLongWordLeft=function(){var l=this.lead.row,c=this.lead.column,h;if(h=this.session.getFoldAt(l,c,-1)){this.moveCursorTo(h.start.row,h.start.column);return}var o=this.session.getFoldStringAt(l,c,-1);o==null&&(o=this.doc.getLine(l).substring(0,c));var s=g.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(c-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,c)},a.prototype.$shortWordEndIndex=function(l){var c=0,h,o=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(l))c=this.session.tokenRe.lastIndex;else{for(;(h=l[c])&&o.test(h);)c++;if(c<1){for(s.lastIndex=0;(h=l[c])&&!s.test(h);)if(s.lastIndex=0,c++,o.test(h))if(c>2){c--;break}else{for(;(h=l[c])&&o.test(h);)c++;if(c>2)break}}}return s.lastIndex=0,c},a.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,c=this.lead.column,h=this.doc.getLine(l),o=h.substring(c),s=this.session.getFoldAt(l,c,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(c==h.length){var p=this.doc.getLength();do l++,o=this.doc.getLine(l);while(l<p&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var b=this.$shortWordEndIndex(o);this.moveCursorTo(l,c+b)},a.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,c=this.lead.column,h;if(h=this.session.getFoldAt(l,c,-1))return this.moveCursorTo(h.start.row,h.start.column);var o=this.session.getLine(l).substring(0,c);if(c===0){do l--,o=this.doc.getLine(l);while(l>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var s=g.stringReverse(o),p=this.$shortWordEndIndex(s);return this.moveCursorTo(l,c-p)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(l,c){var h=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(l!==0&&(this.session.$bidiHandler.isBidiRow(h.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(h.column),h.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=h.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?h.column=this.$desiredColumn:this.$desiredColumn=h.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];l<0?l-=s.rowsAbove||0:l>0&&(l+=s.rowCount-(s.rowsAbove||0))}var p=this.session.screenToDocumentPosition(h.row+l,h.column,o);l!==0&&c===0&&p.row===this.lead.row&&(p.column,this.lead.column),this.moveCursorTo(p.row,p.column+c,c===0)},a.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},a.prototype.moveCursorTo=function(l,c,h){var o=this.session.getFoldAt(l,c,1);o&&(l=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(s.charAt(c))&&s.charAt(c-1)&&(this.lead.row==l&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(l,c),this.$keepDesiredColumnOnChange=!1,h||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(l,c,h){var o=this.session.screenToDocumentPosition(l,c);this.moveCursorTo(o.row,o.column,h)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(l){var c=this.getRange();return l?(l.start.column=c.start.column,l.start.row=c.start.row,l.end.column=c.end.column,l.end.row=c.end.row):l=c,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},a.prototype.getRangeOfMovements=function(l){var c=this.getCursor();try{l(this);var h=this.getCursor();return u.fromPoints(c,h)}catch{return u.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},a.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(c){var h=c.clone();return h.isBackwards=c.cursor==c.start,h});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},a.prototype.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var c=l.length;c--;){var h=u.fromPoints(l[c].start,l[c].end);l[c].isBackwards&&(h.cursor=h.start),this.addRange(h,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},a.prototype.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(l[c]))return!1;return!0},a})();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,f.implement(d.prototype,w),r.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,m){var f=e("./lib/report_error").reportError,g=2e3,w=(function(){function u(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var a in this.states){for(var l=this.states[a],c=[],h=0,o=this.matchMappings[a]={defaultToken:"text"},s="g",p=[],b=0;b<l.length;b++){var x=l[b];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&s.indexOf("i")===-1&&(s+="i"),x.unicode&&s.indexOf("u")===-1&&(s+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var M=x.regex,R=new RegExp("(?:("+M+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||R==1?x.token=x.token[0]:R-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:R-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(R>1?x.onMatch=this.$applyToken:x.onMatch=x.token),R>1&&(/\\\d/.test(x.regex)?M=x.regex.replace(/\\([0-9]+)/g,function(A,C){return"\\"+(parseInt(C,10)+h+1)}):(R=1,M=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&p.push(x)),o[h]=b,h+=R,c.push(M),x.onMatch||(x.onMatch=null)}}c.length||(o[0]=0,c.push("$")),p.forEach(function(A){A.splitRegex=this.createSplitterRegexp(A.regex,s)},this),this.regExps[a]=new RegExp("("+c.join(")|(")+")|($)",s)}}return u.prototype.$setMaxTokenCount=function(d){g=d|0},u.prototype.$applyToken=function(d){var a=this.splitRegex.exec(d).slice(1),l=this.token.apply(this,a);if(typeof l=="string")return[{type:l,value:d}];for(var c=[],h=0,o=l.length;h<o;h++)a[h]&&(c[c.length]={type:l[h],value:a[h]});return c},u.prototype.$arrayTokens=function(d){if(!d)return[];var a=this.splitRegex.exec(d);if(!a)return"text";for(var l=[],c=this.tokenArray,h=0,o=c.length;h<o;h++)a[h+1]&&(l[l.length]={type:c[h],value:a[h+1]});return l},u.prototype.removeCapturingGroups=function(d){var a=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,c){return c?"(?:":l});return a},u.prototype.createSplitterRegexp=function(d,a){if(d.indexOf("(?=")!=-1){var l=0,c=!1,h={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,s,p,b,x,M){return c?c=x!="]":x?c=!0:b?(l==h.stack&&(h.end=M+1,h.stack=-1),l--):p&&(l++,p.length!=1&&(h.stack=l,h.start=M)),o}),h.end!=null&&/^\)*$/.test(d.substr(h.end))&&(d=d.substring(0,h.start)+d.substr(h.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(a||"").replace("g",""))},u.prototype.getLineTokens=function(d,a){if(a&&typeof a!="string"){var l=a.slice(0);a=l[0],a==="#tmp"&&(l.shift(),a=l.shift())}else var l=[];var c=a||"start",h=this.states[c];h||(c="start",h=this.states[c]);var o=this.matchMappings[c],s=this.regExps[c];s.lastIndex=0;for(var p,b=[],x=0,M=0,R={type:null,value:""};p=s.exec(d);){var A=o.defaultToken,C=null,O=p[0],D=s.lastIndex;if(D-O.length>x){var I=d.substring(x,D-O.length);R.type==A?R.value+=I:(R.type&&b.push(R),R={type:A,value:I})}for(var T=0;T<p.length-2;T++)if(p[T+1]!==void 0){C=h[o[T]],C.onMatch?A=C.onMatch(O,c,l,d):A=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,l),h=this.states[c],h||(this.reportError("state doesn't exist",c),c="start",h=this.states[c]),o=this.matchMappings[c],x=D,s=this.regExps[c],s.lastIndex=D),C.consumeLineEnd&&(x=D);break}if(O){if(typeof A=="string")(!C||C.merge!==!1)&&R.type===A?R.value+=O:(R.type&&b.push(R),R={type:A,value:O});else if(A){R.type&&b.push(R),R={type:null,value:""};for(var T=0;T<A.length;T++)b.push(A[T])}}if(x==d.length)break;if(x=D,M++>g){for(M>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:d});x<d.length;)R.type&&b.push(R),R={value:d.substring(x,x+=500),type:"overflow"};c="start",l=[];break}}return R.type&&b.push(R),l.length>1&&l[0]!==c&&l.unshift("#tmp",c),{tokens:b,state:l.length?l:c}},u})();w.prototype.reportError=f,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){var f=e("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,a){if(!a){for(var l in d)this.$rules[l]=d[l];return}for(var l in d){for(var c=d[l],h=0;h<c.length;h++){var o=c[h];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(a)!==0&&(o.next=a+o.next),o.nextState&&o.nextState.indexOf(a)!==0&&(o.nextState=a+o.nextState))}this.$rules[a+l]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(d,a,l,c,h){var o=typeof d=="function"?new d().getRules():d;if(c)for(var s=0;s<c.length;s++)c[s]=a+c[s];else{c=[];for(var p in o)c.push(a+p)}if(this.addRules(o,a),l)for(var b=Array.prototype[h?"push":"unshift"],s=0;s<c.length;s++)b.apply(this.$rules[c[s]],f(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var w=function(d,a){return(d!="start"||a.length)&&a.unshift(this.nextState,d),this.nextState},u=function(d,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var d=0,a=this.$rules;function l(c){var h=a[c];h.processed=!0;for(var o=0;o<h.length;o++){var s=h[o],p=null;Array.isArray(s)&&(p=s,s={}),!s.regex&&s.start&&(s.regex=s.start,s.next||(s.next=[]),s.next.push({defaultToken:s.token},{token:s.token+".end",regex:s.end||s.start,next:"pop"}),s.token=s.token+".start",s.push=!0);var b=s.next||s.push;if(b&&Array.isArray(b)){var x=s.stateName;x||(x=s.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=d++)),a[x]=b,s.next=x,l(x)}else b=="pop"&&(s.next=u);if(s.push&&(s.nextState=s.next||s.push,s.next=w,delete s.push),s.rules)for(var M in s.rules)a[M]?a[M].push&&a[M].push.apply(a[M],s.rules[M]):a[M]=s.rules[M];var R=typeof s=="string"?s:s.include;if(R&&(R==="$self"&&(R="start"),Array.isArray(R)?p=R.map(function(C){return a[C]}):p=a[R]),p){var A=[o,1].concat(p);s.noEscape&&(A=A.filter(function(C){return!C.next})),h.splice.apply(h,A),o--}s.keywordMap&&(s.token=this.createKeywordMapper(s.keywordMap,s.defaultToken||"text",s.caseInsensitive),delete s.defaultToken)}}Object.keys(a).forEach(l,this)},this.createKeywordMapper=function(d,a,l,c){var h=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(o){for(var s=d[o],p=s.split(c||"|"),b=p.length;b--;){var x=p[b];this.$keywordList.push(x),l&&(x=x.toLowerCase()),h[x]=o}},this),d=null,l?function(o){return h[o.toLowerCase()]||a}:function(o){return h[o]||a}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,m){var f;f=function(){this.$behaviours={}},(function(){this.add=function(g,w,u){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][w]=u},this.addBehaviours=function(g){for(var w in g)for(var u in g[w])this.add(w,u,g[w][u])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,w){if(typeof g=="function")var u=new g().getBehaviours(w);else var u=g.getBehaviours(w);this.addBehaviours(u)},this.getBehaviours=function(g){if(g){for(var w={},u=0;u<g.length;u++)this.$behaviours[g[u]]&&(w[g[u]]=this.$behaviours[g[u]]);return w}else return this.$behaviours}}).call(f.prototype),r.Behaviour=f}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,m){var f=e("./range").Range,g=(function(){function w(u,d,a){this.$session=u,this.$row=d,this.$rowTokens=u.getTokens(d);var l=u.getTokenAt(d,a);this.$tokenIndex=l?l.index:-1}return w.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]},w.prototype.stepForward=function(){this.$tokenIndex+=1;for(var u;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,u||(u=this.$session.getLength()),this.$row>=u)return this.$row=u-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var u=this.$rowTokens,d=this.$tokenIndex,a=u[d].start;if(a!==void 0)return a;for(a=0;d>0;)d-=1,a+=u[d].value.length;return a},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var u=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new f(this.$row,d,this.$row,d+u.value.length)},w})();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,m){var f=e("../../lib/oop"),g=e("../behaviour").Behaviour,w=e("../../token_iterator").TokenIterator,u=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,c={},h={'"':'"',"'":"'"},o=function(b){var x=-1;if(b.multiSelect&&(x=b.selection.index,c.rangeCount!=b.multiSelect.rangeCount&&(c={rangeCount:b.multiSelect.rangeCount})),c[x])return l=c[x];l=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},s=function(b,x,M,R){var A=b.end.row-b.start.row;return{text:M+x+R,selection:[0,b.start.column+1,A,b.end.column+(A?0:1)]}},p;p=function(b){b=b||{},this.add("braces","insertion",function(x,M,R,A,C){var O=R.getCursorPosition(),D=A.doc.getLine(O.row);if(C=="{"){o(R);var I=R.getSelectionRange(),T=A.doc.getTextRange(I),B=A.getTokenAt(O.row,O.column);if(T!==""&&T!=="{"&&R.getWrapBehavioursEnabled())return s(I,T,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(G){return G.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[O.column-B.start-1]!=="$"?void 0:(p.recordAutoInsert(R,A,"}"),{text:"{}",selection:[1,1]})}else if(p.isSaneInsertion(R,A))return/[\]\}\)]/.test(D[O.column])||R.inMultiSelectMode||b.braces?(p.recordAutoInsert(R,A,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(R,A,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(R);var L=D.substring(O.column,O.column+1);if(L=="}"){var $=A.$findOpeningBracket("}",{column:O.column+1,row:O.row});if($!==null&&p.isAutoInsertedClosing(O,D,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
+ `||C==`\r
184
+ `){o(R);var _="";p.isMaybeInsertedClosing(O,D)&&(_=u.stringRepeat("}",l.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var L=D.substring(O.column,O.column+1);if(L==="}"){var N=A.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!N)return null;var W=this.$getIndent(A.getLine(N.row))}else if(_)var W=this.$getIndent(D);else{p.clearMaybeInsertedClosing();return}var U=W+A.getTabString();return{text:`
185
+ `+U+`
186
+ `+W+_,selection:[1,U.length,1,U.length]}}else p.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,M,R,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){o(R);var D=A.doc.getLine(C.start.row),I=D.substring(C.end.column,C.end.column+1);if(I=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,M,R,A,C){if(C=="("){o(R);var O=R.getSelectionRange(),D=A.doc.getTextRange(O);if(D!==""&&R.getWrapBehavioursEnabled())return s(O,D,"(",")");if(p.isSaneInsertion(R,A))return p.recordAutoInsert(R,A,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(R);var I=R.getCursorPosition(),T=A.doc.getLine(I.row),B=T.substring(I.column,I.column+1);if(B==")"){var F=A.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(F!==null&&p.isAutoInsertedClosing(I,T,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,M,R,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){o(R);var D=A.doc.getLine(C.start.row),I=D.substring(C.start.column+1,C.start.column+2);if(I==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,M,R,A,C){if(C=="["){o(R);var O=R.getSelectionRange(),D=A.doc.getTextRange(O);if(D!==""&&R.getWrapBehavioursEnabled())return s(O,D,"[","]");if(p.isSaneInsertion(R,A))return p.recordAutoInsert(R,A,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(R);var I=R.getCursorPosition(),T=A.doc.getLine(I.row),B=T.substring(I.column,I.column+1);if(B=="]"){var F=A.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(F!==null&&p.isAutoInsertedClosing(I,T,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,M,R,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){o(R);var D=A.doc.getLine(C.start.row),I=D.substring(C.start.column+1,C.start.column+2);if(I=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,M,R,A,C){var O=A.$mode.$quotes||h;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(R);var D=C,I=R.getSelectionRange(),T=A.doc.getTextRange(I);if(T!==""&&(T.length!=1||!O[T])&&R.getWrapBehavioursEnabled())return s(I,T,D,D);if(!T){var B=R.getCursorPosition(),F=A.doc.getLine(B.row),L=F.substring(B.column-1,B.column),$=F.substring(B.column,B.column+1),_=A.getTokenAt(B.row,B.column),N=A.getTokenAt(B.row,B.column+1);if(L=="\\"&&_&&/escape/.test(_.type))return null;var W=_&&/string|escape/.test(_.type),U=!N||/string|escape/.test(N.type),G;if($==D)G=W!==U,G&&/string\.end/.test(N.type)&&(G=!1);else{if(W&&!U||W&&U)return null;var J=A.$mode.tokenRe;J.lastIndex=0;var te=J.test(L);J.lastIndex=0;var he=J.test($),ee=A.$mode.$pairQuotesAfter,le=ee&&ee[D]&&ee[D].test(L);if(!le&&te||he||$&&!/[\s;,.})\]\\]/.test($))return null;var se=F[B.column-2];if(L==D&&(se==D||J.test(se)))return null;G=!0}return{text:G?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,M,R,A,C){var O=A.$mode.$quotes||h,D=A.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(D)){o(R);var I=A.doc.getLine(C.start.row),T=I.substring(C.start.column+1,C.start.column+2);if(T==D)return C.end.column++,C}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,M,R,A,C){if(x==="doc-start"&&(C===`
187
+ `||C===`\r
188
+ `)&&R.selection.isEmpty()){var O=R.getCursorPosition();if(O.column===0)return;for(var D=A.doc.getLine(O.row),I=A.doc.getLine(O.row+1),T=A.getTokens(O.row),B=0,F=0;F<T.length;F++){B+=T[F].value.length;var L=T[F];if(B>=O.column){if(B===O.column){if(!/\.doc/.test(L.type))return;if(/\*\//.test(L.value)){var $=T[F+1];if(!$||!/\.doc/.test($.type))return}}var _=O.column-(B-L.value.length),N=L.value.indexOf("*/"),W=L.value.indexOf("/**",N>-1?N+2:0);if(W!==-1&&_>W&&_<W+3||N!==-1&&W!==-1&&_>=N&&_<=W||!/\.doc/.test(L.type))return;break}}var U=this.$getIndent(D);if(/\s*\*/.test(I))return/^\s*\*/.test(D)?{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(D.substring(0,O.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},p.isSaneInsertion=function(b,x){var M=b.getCursorPosition(),R=new w(x,M.row,M.column);if(!this.$matchTokenType(R.getCurrentToken()||"text",d)){if(/[)}\]]/.test(b.session.getLine(M.row)[M.column]))return!0;var A=new w(x,M.row,M.column+1);if(!this.$matchTokenType(A.getCurrentToken()||"text",d))return!1}return R.stepForward(),R.getCurrentTokenRow()!==M.row||this.$matchTokenType(R.getCurrentToken()||"text",a)},p.$matchTokenType=function(b,x){return x.indexOf(b.type||b)>-1},p.recordAutoInsert=function(b,x,M){var R=b.getCursorPosition(),A=x.doc.getLine(R.row);this.isAutoInsertedClosing(R,A,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=R.row,l.autoInsertedLineEnd=M+A.substr(R.column),l.autoInsertedBrackets++},p.recordMaybeInsert=function(b,x,M){var R=b.getCursorPosition(),A=x.doc.getLine(R.row);this.isMaybeInsertedClosing(R,A)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=R.row,l.maybeInsertedLineStart=A.substr(0,R.column)+M,l.maybeInsertedLineEnd=A.substr(R.column),l.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(b,x,M){return l.autoInsertedBrackets>0&&b.row===l.autoInsertedRow&&M===l.autoInsertedLineEnd[0]&&x.substr(b.column)===l.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(b,x){return l.maybeInsertedBrackets>0&&b.row===l.maybeInsertedRow&&x.substr(b.column)===l.maybeInsertedLineEnd&&x.substr(0,b.column)==l.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},f.inherits(p,g),r.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,r,m){for(var f=[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],g=0,w=[],u=0;u<f.length;u+=2)w.push(g+=f[u]),f[u+1]&&w.push(45,g+=f[u+1]);r.wordChars=String.fromCharCode.apply(null,w)}),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,m){var f=e("../config"),g=e("../tokenizer").Tokenizer,w=e("./text_highlight_rules").TextHighlightRules,u=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,h;h=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new u,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,s,p,b){var x=s.doc,M=!0,R=!0,A=1/0,C=s.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var D=this.lineCommentStart.map(a.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var D=a.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;D=new RegExp("^(\\s*)(?:"+D+") ?"),O=s.getUseSoftTabs();var T=function(G,J){var te=G.match(D);if(te){var he=te[1].length,ee=te[0].length;!$(G,he,ee)&&te[0][ee-1]==" "&&ee--,x.removeInLine(J,he,ee)}},B=I+" ",F=function(G,J){(!M||/\S/.test(G))&&($(G,A,A)?x.insertInLine({row:J,column:A},B):x.insertInLine({row:J,column:A},I))},L=function(G,J){return D.test(G)},$=function(G,J,te){for(var he=0;J--&&G.charAt(J)==" ";)he++;if(he%C!=0)return!1;for(var he=0;G.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,_=this.blockComment.end,D=new RegExp("^(\\s*)(?:"+a.escapeRegExp(I)+")"),N=new RegExp("(?:"+a.escapeRegExp(_)+")\\s*$"),F=function(le,se){L(le,se)||(!M||/\S/.test(le))&&(x.insertInLine({row:se,column:le.length},_),x.insertInLine({row:se,column:A},I))},T=function(le,se){var ce;(ce=le.match(N))&&x.removeInLine(se,le.length-ce[0].length,le.length),(ce=le.match(D))&&x.removeInLine(se,ce[1].length,ce[0].length)},L=function(le,se){if(D.test(le))return!0;for(var ce=s.getTokens(se),pe=0;pe<ce.length;pe++)if(ce[pe].type==="comment")return!0}}function W(G){for(var J=p;J<=b;J++)G(x.getLine(J),J)}var U=1/0;W(function(G,J){var te=G.search(/\S/);te!==-1?(te<A&&(A=te),R&&!L(G,J)&&(R=!1)):U>G.length&&(U=G.length)}),A==1/0&&(A=U,M=!1,R=!1),O&&A%C!=0&&(A=Math.floor(A/C)*C),W(R?T:F)},this.toggleBlockComment=function(o,s,p,b){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var M=new l(s,b.row,b.column),R=M.getCurrentToken();s.selection;var A=s.selection.toOrientedRange(),C,O;if(R&&/comment/.test(R.type)){for(var D,I;R&&/comment/.test(R.type);){var T=R.value.indexOf(x.start);if(T!=-1){var B=M.getCurrentTokenRow(),F=M.getCurrentTokenColumn()+T;D=new c(B,F,B,F+x.start.length);break}R=M.stepBackward()}for(var M=new l(s,b.row,b.column),R=M.getCurrentToken();R&&/comment/.test(R.type);){var T=R.value.indexOf(x.end);if(T!=-1){var B=M.getCurrentTokenRow(),F=M.getCurrentTokenColumn()+T;I=new c(B,F,B,F+x.end.length);break}R=M.stepForward()}I&&s.remove(I),D&&(s.remove(D),C=D.start.row,O=-x.start.length)}else O=x.start.length,C=p.start.row,s.insert(p.end,x.end),s.insert(p.start,x.start);A.start.row==C&&(A.start.column+=O),A.end.row==C&&(A.end.column+=O),s.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(o,s,p){return this.$getIndent(s)},this.checkOutdent=function(o,s,p){return!1},this.autoOutdent=function(o,s,p){},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 s in o)if(o[s]){var p=o[s],b=p.prototype.$id,x=f.$modes[b];x||(f.$modes[b]=x=new p),f.$modes[s]||(f.$modes[s]=x),this.$embeds.push(s),this.$modes[s]=x}for(var M=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],R=function(O){(function(D){var I=M[O],T=D[I];D[M[O]]=function(){return this.$delegator(I,arguments,T)}})(A)},A=this,s=0;s<M.length;s++)R(s)},this.$delegator=function(o,s,p){var b=s[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var x=b[2][b[2].length-1],M=this.$modes[x];if(M)return M[o].apply(M,[b[1]].concat([].slice.call(s,1)))}b=b[0]||"start"}for(var R=0;R<this.$embeds.length;R++)if(this.$modes[this.$embeds[R]]){var A=b.split(this.$embeds[R]);if(!A[0]&&A[1]){s[0]=A[1];var M=this.$modes[this.$embeds[R]];return M[o].apply(M,s)}}var C=p.apply(this,s);return p?C:void 0},this.transformAction=function(o,s,p,b,x){if(this.$behaviour){var M=this.$behaviour.getBehaviours();for(var R in M)if(M[R][s]){var A=M[R][s].apply(this,arguments);if(A)return A}}},this.getKeywords=function(o){if(!this.completionKeywords){var s=this.$tokenizer.rules,p=[];for(var b in s)for(var x=s[b],M=0,R=x.length;M<R;M++)if(typeof x[M].token=="string")/keyword|support|storage/.test(x[M].token)&&p.push(x[M].regex);else if(typeof x[M].token=="object"){for(var A=0,C=x[M].token.length;A<C;A++)if(/keyword|support|storage/.test(x[M].token[A])){var b=x[M].regex.match(/\(.+?\)/g)[A];p.push(b.substr(1,b.length-2))}}this.completionKeywords=p}return o?p.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,s,p,b){var x=this.$keywordList||this.$createKeywordList();return x.map(function(M){return{name:M,value:M,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),r.Mode=h}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,m){var f=e("./lib/dom"),g=(function(){function w(u){this.session=u,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 w.prototype.getRowLength=function(u){var d;return this.lineWidgets?d=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[u]?1+d:this.$wrapData[u].length+1+d},w.prototype.$getWidgetScreenLength=function(){var u=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(u+=d.rowCount)}),u},w.prototype.$onChangeEditor=function(u){this.attach(u.editor)},w.prototype.attach=function(u){u&&u.widgetManager&&u.widgetManager!=this&&u.widgetManager.detach(),this.editor!=u&&(this.detach(),this.editor=u,u&&(u.widgetManager=this,u.renderer.on("beforeRender",this.measureWidgets),u.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(u){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},w.prototype.updateOnFold=function(u,d){var a=d.lineWidgets;if(!(!a||!u.action)){for(var l=u.data,c=l.start.row,h=l.end.row,o=u.action=="add",s=c+1;s<h;s++)a[s]&&(a[s].hidden=o);a[h]&&(o?a[c]?a[h].hidden=o:a[c]=a[h]:(a[c]==a[h]&&(a[c]=void 0),a[h].hidden=o))}},w.prototype.updateOnChange=function(u){var d=this.session.lineWidgets;if(d){var a=u.start.row,l=u.end.row-a;if(l!==0)if(u.action=="remove"){var c=d.splice(a+1,l);!d[a]&&c[c.length-1]&&(d[a]=c.pop()),c.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var h=new Array(l);d[a]&&d[a].column!=null&&u.start.column>d[a].column&&a++,h.unshift(a,0),d.splice.apply(d,h),this.$updateRows()}}},w.prototype.$updateRows=function(){var u=this.session.lineWidgets;if(u){var d=!0;u.forEach(function(a,l){if(a)for(d=!1,a.row=l;a.$oldWidget;)a.$oldWidget.row=l,a=a.$oldWidget}),d&&(this.session.lineWidgets=null)}},w.prototype.$registerLineWidget=function(u){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[u.row];return d&&(u.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[u.row]=u,u},w.prototype.addLineWidget=function(u){if(this.$registerLineWidget(u),u.session=this.session,!this.editor)return u;var d=this.editor.renderer;u.html&&!u.el&&(u.el=f.createElement("div"),u.el.innerHTML=u.html),u.text&&!u.el&&(u.el=f.createElement("div"),u.el.textContent=u.text),u.el&&(f.addCssClass(u.el,"ace_lineWidgetContainer"),u.className&&f.addCssClass(u.el,u.className),u.el.style.position="absolute",u.el.style.zIndex="5",d.container.appendChild(u.el),u._inDocument=!0,u.coverGutter||(u.el.style.zIndex="3"),u.pixelHeight==null&&(u.pixelHeight=u.el.offsetHeight)),u.rowCount==null&&(u.rowCount=u.pixelHeight/d.layerConfig.lineHeight);var a=this.session.getFoldAt(u.row,0);if(u.$fold=a,a){var l=this.session.lineWidgets;u.row==a.end.row&&!l[a.start.row]?l[a.start.row]=u:u.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(u),u},w.prototype.removeLineWidget=function(u){if(u._inDocument=!1,u.session=null,u.el&&u.el.parentNode&&u.el.parentNode.removeChild(u.el),u.editor&&u.editor.destroy)try{u.editor.destroy()}catch{}if(this.session.lineWidgets){var d=this.session.lineWidgets[u.row];if(d==u)this.session.lineWidgets[u.row]=u.$oldWidget,u.$oldWidget&&this.onWidgetChanged(u.$oldWidget);else for(;d;){if(d.$oldWidget==u){d.$oldWidget=u.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(u){for(var d=this.session.lineWidgets,a=d&&d[u],l=[];a;)l.push(a),a=a.$oldWidget;return l},w.prototype.onWidgetChanged=function(u){this.session._changedWidgets.push(u),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(u,d){var a=this.session._changedWidgets,l=d.layerConfig;if(!(!a||!a.length)){for(var c=1/0,h=0;h<a.length;h++){var o=a[h];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,d.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/l.characterWidth));var s=o.h/l.lineHeight;o.coverLine&&(s-=this.session.getRowLineCount(o.row),s<0&&(s=0)),o.rowCount!=s&&(o.rowCount=s,o.row<c&&(c=o.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(u,d){var a=d.layerConfig,l=this.session.lineWidgets;if(l){for(var c=Math.min(this.firstRow,a.firstRow),h=Math.max(this.lastRow,a.lastRow,l.length);c>0&&!l[c];)c--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,d.$cursorLayer.config=a;for(var o=c;o<=h;o++){var s=l[o];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+"px";continue}s._inDocument||(s._inDocument=!0,d.container.appendChild(s.el));var p=d.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;s.coverLine||(p+=a.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=p-a.offset+"px";var b=s.coverGutter?0:d.gutterWidth;s.fixedWidth||(b-=d.scrollLeft),s.el.style.left=b+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=a.width+2*a.padding+"px"),s.fixedWidth?s.el.style.right=d.scrollBar.getWidth()+"px":s.el.style.right=""}}}},w})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,m){r.applyDelta=function(f,g,w){var u=g.start.row,d=g.start.column,a=f[u]||"";switch(g.action){case"insert":var l=g.lines;if(l.length===1)f[u]=a.substring(0,d)+g.lines[0]+a.substring(d);else{var c=[u,1].concat(g.lines);f.splice.apply(f,c),f[u]=a.substring(0,d)+f[u],f[u+g.lines.length-1]+=a.substring(d)}break;case"remove":var h=g.end.column,o=g.end.row;u===o?f[u]=a.substring(0,d)+a.substring(h):f.splice(u,o-u+1,a.substring(0,d)+f[o].substring(h));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var f=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,w=(function(){function a(l,c,h){this.$onChange=this.onChange.bind(this),this.attach(l),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,h)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var c=d(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},a.prototype.setPosition=function(l,c,h){var o;if(h?o={row:l,column:c}:o=this.$clipPositionToDocument(l,c),!(this.row==o.row&&this.column==o.column)){var s={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:s,value:o})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(l,c){var h={};return l>=this.document.getLength()?(h.row=Math.max(0,this.document.getLength()-1),h.column=this.document.getLine(h.row).length):l<0?(h.row=0,h.column=0):(h.row=l,h.column=Math.min(this.document.getLine(h.row).length,Math.max(0,c))),c<0&&(h.column=0),h},a})();w.prototype.$insertRight=!1,f.implement(w.prototype,g);function u(a,l,c){var h=c?a.column<=l.column:a.column<l.column;return a.row<l.row||a.row==l.row&&h}function d(a,l,c){var h=a.action=="insert",o=(h?1:-1)*(a.end.row-a.start.row),s=(h?1:-1)*(a.end.column-a.start.column),p=a.start,b=h?p:a.end;return u(l,p,c)?{row:l.row,column:l.column}:u(b,l,!c)?{row:l.row+o,column:l.column+(l.row==b.row?s:0)}:{row:p.row,column:p.column}}r.Anchor=w}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,m){var f=e("./lib/oop"),g=e("./apply_delta").applyDelta,w=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,d=e("./anchor").Anchor,a=(function(){function l(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return l.prototype.setValue=function(c){var h=this.getLength()-1;this.remove(new u(0,0,h,this.getLine(h).length)),this.insert({row:0,column:0},c||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(c,h){return new d(this,c,h)},l.prototype.$detectNewLine=function(c){var h=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=h?h[1]:`
189
+ `,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},l.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(c){return c==`\r
193
+ `||c=="\r"||c==`
194
+ `},l.prototype.getLine=function(c){return this.$lines[c]||""},l.prototype.getLines=function(c,h){return this.$lines.slice(c,h+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(c){var h;if(c.start.row===c.end.row)h=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{h=this.getLines(c.start.row,c.end.row),h[0]=(h[0]||"").substring(c.start.column);var o=h.length-1;c.end.row-c.start.row==o&&(h[o]=h[o].substring(0,c.end.column))}return h},l.prototype.insertLines=function(c,h){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,h)},l.prototype.removeLines=function(c,h){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,h)},l.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},l.prototype.insert=function(c,h){return this.getLength()<=1&&this.$detectNewLine(h),this.insertMergedLines(c,this.$split(h))},l.prototype.insertInLine=function(c,h){var o=this.clippedPos(c.row,c.column),s=this.pos(c.row,c.column+h.length);return this.applyDelta({start:o,end:s,action:"insert",lines:[h]},!0),this.clonePos(s)},l.prototype.clippedPos=function(c,h){var o=this.getLength();c===void 0?c=o:c<0?c=0:c>=o&&(c=o-1,h=void 0);var s=this.getLine(c);return h==null&&(h=s.length),h=Math.min(Math.max(h,0),s.length),{row:c,column:h}},l.prototype.clonePos=function(c){return{row:c.row,column:c.column}},l.prototype.pos=function(c,h){return{row:c,column:h}},l.prototype.$clipPosition=function(c){var h=this.getLength();return c.row>=h?(c.row=Math.max(0,h-1),c.column=this.getLine(h-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},l.prototype.insertFullLines=function(c,h){c=Math.min(Math.max(c,0),this.getLength());var o=0;c<this.getLength()?(h=h.concat([""]),o=0):(h=[""].concat(h),c--,o=this.$lines[c].length),this.insertMergedLines({row:c,column:o},h)},l.prototype.insertMergedLines=function(c,h){var o=this.clippedPos(c.row,c.column),s={row:o.row+h.length-1,column:(h.length==1?o.column:0)+h[h.length-1].length};return this.applyDelta({start:o,end:s,action:"insert",lines:h}),this.clonePos(s)},l.prototype.remove=function(c){var h=this.clippedPos(c.start.row,c.start.column),o=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:h,end:o,action:"remove",lines:this.getLinesForRange({start:h,end:o})}),this.clonePos(h)},l.prototype.removeInLine=function(c,h,o){var s=this.clippedPos(c,h),p=this.clippedPos(c,o);return this.applyDelta({start:s,end:p,action:"remove",lines:this.getLinesForRange({start:s,end:p})},!0),this.clonePos(s)},l.prototype.removeFullLines=function(c,h){c=Math.min(Math.max(0,c),this.getLength()-1),h=Math.min(Math.max(0,h),this.getLength()-1);var o=h==this.getLength()-1&&c>0,s=h<this.getLength()-1,p=o?c-1:c,b=o?this.getLine(p).length:0,x=s?h+1:h,M=s?0:this.getLine(x).length,R=new u(p,b,x,M),A=this.$lines.slice(c,h+1);return this.applyDelta({start:R.start,end:R.end,action:"remove",lines:this.getLinesForRange(R)}),A},l.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(c,h){if(c instanceof u||(c=u.fromPoints(c.start,c.end)),h.length===0&&c.isEmpty())return c.start;if(h==this.getTextRange(c))return c.end;this.remove(c);var o;return h?o=this.insert(c.start,h):o=c.start,o},l.prototype.applyDeltas=function(c){for(var h=0;h<c.length;h++)this.applyDelta(c[h])},l.prototype.revertDeltas=function(c){for(var h=c.length-1;h>=0;h--)this.revertDelta(c[h])},l.prototype.applyDelta=function(c,h){var o=c.action=="insert";(o?c.lines.length<=1&&!c.lines[0]:!u.comparePoints(c.start,c.end))||(o&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(g(this.$lines,c,h),this._signal("change",c)))},l.prototype.$safeApplyDelta=function(c){var h=this.$lines.length;(c.action=="remove"&&c.start.row<h&&c.end.row<h||c.action=="insert"&&c.start.row<=h)&&this.applyDelta(c)},l.prototype.$splitAndapplyLargeDelta=function(c,h){for(var o=c.lines,s=o.length-h+1,p=c.start.row,b=c.start.column,x=0,M=0;x<s;x=M){M+=h-1;var R=o.slice(x,M);R.push(""),this.applyDelta({start:this.pos(p+x,b),end:this.pos(p+M,b=0),action:c.action,lines:R},!0)}c.lines=o.slice(x),c.start.row=p+x,c.start.column=b,this.applyDelta(c,!0)},l.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},l.prototype.indexToPosition=function(c,h){for(var o=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,p=h||0,b=o.length;p<b;p++)if(c-=o[p].length+s,c<0)return{row:p,column:c+o[p].length+s};return{row:b-1,column:c+o[b-1].length+s}},l.prototype.positionToIndex=function(c,h){for(var o=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,p=0,b=Math.min(c.row,o.length),x=h||0;x<b;++x)p+=o[x].length+s;return p+c.column},l.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},l})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",f.implement(a.prototype,w),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var f=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,w=(function(){function u(d,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var l=this;this.$worker=function(){if(l.running){for(var c=new Date,h=l.currentLine,o=-1,s=l.doc,p=h;l.lines[h];)h++;var b=s.getLength(),x=0;for(l.running=!1;h<b;){l.$tokenizeRow(h),o=h;do h++;while(l.lines[h]);if(x++,x%5===0&&new Date-c>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=h,o==-1&&(o=h),p<=o&&l.fireUpdateEvent(p,o)}}}return u.prototype.setTokenizer=function(d){this.tokenizer=d,this.lines=[],this.states=[],this.start(0)},u.prototype.setDocument=function(d){this.doc=d,this.lines=[],this.states=[],this.stop()},u.prototype.fireUpdateEvent=function(d,a){var l={first:d,last:a};this._signal("update",{data:l})},u.prototype.start=function(d){this.currentLine=Math.min(d||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)},u.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},u.prototype.$updateOnChange=function(d){var a=d.start.row,l=d.end.row-a;if(l===0)this.lines[a]=null;else if(d.action=="remove")this.lines.splice(a,l+1,null),this.states.splice(a,l+1,null);else{var c=Array(l+1);c.unshift(a,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},u.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},u.prototype.getTokens=function(d){return this.lines[d]||this.$tokenizeRow(d)},u.prototype.getState=function(d){return this.currentLine==d&&this.$tokenizeRow(d),this.states[d]||"start"},u.prototype.$tokenizeRow=function(d){var a=this.doc.getLine(d),l=this.states[d-1],c=this.tokenizer.getLineTokens(a,l,d);return this.states[d]+""!=c.state+""?(this.states[d]=c.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=c.tokens},u.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},u})();f.implement(w.prototype,g),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,m){var f=e("./lib/lang"),g=e("./range").Range,w=(function(){function u(d,a,l){l===void 0&&(l="text"),this.setRegexp(d),this.clazz=a,this.type=l,this.docLen=0}return u.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},u.prototype.update=function(d,a,l,c){if(this.regExp){for(var h=c.firstRow,o=c.lastRow,s={},p=l.$editor&&l.$editor.$search,b=p&&p.$isMultilineSearch(l.$editor.getLastSearchOptions()),x=h;x<=o;x++){var M=this.cache[x];if(M==null||l.getValue().length!=this.docLen){if(b){M=[];var R=p.$multiLineForward(l,this.regExp,x,o);if(R){var A=R.endRow<=o?R.endRow-1:o;A>x&&(x=A),M.push(new g(R.startRow,R.startCol,R.endRow,R.endCol))}M.length>this.MAX_RANGES&&(M=M.slice(0,this.MAX_RANGES))}else M=f.getMatchOffsets(l.getLine(x),this.regExp),M.length>this.MAX_RANGES&&(M=M.slice(0,this.MAX_RANGES)),M=M.map(function(I){return new g(x,I.offset,x,I.offset+I.length)});this.cache[x]=M.length?M:""}if(M.length!==0)for(var C=M.length;C--;){var O=M[C].toScreenRange(l),D=O.toString();s[D]||(s[D]=!0,a.drawSingleLineMarker(d,O,this.clazz,c))}}this.docLen=l.getValue().length}},u})();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,m){var f=(function(){function A(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return A.prototype.addSession=function(C){this.$session=C},A.prototype.add=function(C,O,D){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)}},A.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},A.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},A.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var D=this.$undoStack,I=D.length;I--;){var T=D[I][0];if(T.id<=C)break;T.id<O&&(T.ignore=!0)}this.lastDeltas=null},A.prototype.getSelection=function(C,O){for(var D=this.selections,I=D.length;I--;){var T=D[I];if(T.rev<C)return O&&(T=D[I+1]),T}},A.prototype.getRevision=function(){return this.$rev},A.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var D=this.$undoStack,I=null,T=0,B=D.length;B--;){var F=D[B][0];if(F.id<O&&!I&&(I=B+1),F.id<=C){T=B+1;break}}return D.slice(T,I)},A.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},A.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},A.prototype.undo=function(C,O){this.lastDeltas=null;var D=this.$undoStack;if(g(D,D.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var I=D.pop(),T=null;return I&&(T=C.undoChanges(I,O),this.$redoStack.push(I),this.$syncRev()),this.$fromUndo=!1,T}},A.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);R(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(B){B[0].id=++this.$maxRev},this)}var I=this.$redoStack.pop(),T=null;return I&&(T=C.redoChanges(I,O),this.$undoStack.push(I),this.$syncRev()),this.$fromUndo=!1,T},A.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],D=O&&O[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},A.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=[]},A.prototype.canUndo=function(){return this.$undoStack.length>0},A.prototype.canRedo=function(){return this.$redoStack.length>0},A.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},A.prototype.isAtBookmark=function(){return this.$rev===this.mark},A.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},A.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},A.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
195
+ ---
196
+ `+l(this.$redoStack)},A})();f.prototype.hasUndo=f.prototype.canUndo,f.prototype.hasRedo=f.prototype.canRedo,f.prototype.isClean=f.prototype.isAtBookmark,f.prototype.markClean=f.prototype.bookmark;function g(A,C){for(var O=C;O--;){var D=A[O];if(D&&!D[0].ignore){for(;O<C-1;){var I=o(A[O],A[O+1]);A[O]=I[0],A[O+1]=I[1],O++}return!0}}}var w=e("./range").Range,u=w.comparePoints;w.comparePoints;function d(A){return{row:A.row,column:A.column}}function a(A){return{start:d(A.start),end:d(A.end),action:A.action,lines:A.lines.slice()}}function l(A){if(A=A||this,Array.isArray(A))return A.map(l).join(`
197
+ `);var C="";return A.action?(C=A.action=="insert"?"+":"-",C+="["+A.lines+"]"):A.value&&(Array.isArray(A.value)?C=A.value.map(c).join(`
198
+ `):C=c(A.value)),A.start&&(C+=c(A)),(A.id||A.rev)&&(C+=" ("+(A.id||A.rev)+")"),C}function c(A){return A.start.row+":"+A.start.column+"=>"+A.end.row+":"+A.end.column}function h(A,C){var O=A.action=="insert",D=C.action=="insert";if(O&&D)if(u(C.start,A.end)>=0)p(C,A,-1);else if(u(C.start,A.start)<=0)p(A,C,1);else return null;else if(O&&!D)if(u(C.start,A.end)>=0)p(C,A,-1);else if(u(C.end,A.start)<=0)p(A,C,-1);else return null;else if(!O&&D)if(u(C.start,A.start)>=0)p(C,A,1);else if(u(C.start,A.start)<=0)p(A,C,1);else return null;else if(!O&&!D)if(u(C.start,A.start)>=0)p(C,A,1);else if(u(C.end,A.start)<=0)p(A,C,-1);else return null;return[C,A]}function o(A,C){for(var O=A.length;O--;)for(var D=0;D<C.length;D++)if(!h(A[O],C[D])){for(;O<A.length;){for(;D--;)h(C[D],A[O]);D=C.length,O++}return[A,C]}return A.selectionBefore=C.selectionBefore=A.selectionAfter=C.selectionAfter=null,[C,A]}function s(A,C){var O=A.action=="insert",D=C.action=="insert";if(O&&D)u(A.start,C.start)<0?p(C,A,1):p(A,C,1);else if(O&&!D)u(A.start,C.end)>=0?p(A,C,-1):(u(A.start,C.start)<=0||p(A,w.fromPoints(C.start,A.start),-1),p(C,A,1));else if(!O&&D)u(C.start,A.end)>=0?p(C,A,-1):(u(C.start,A.start)<=0||p(C,w.fromPoints(A.start,C.start),-1),p(A,C,1));else if(!O&&!D)if(u(C.start,A.end)>=0)p(C,A,-1);else if(u(C.end,A.start)<=0)p(A,C,-1);else{var I,T;return u(A.start,C.start)<0&&(I=A,A=x(A,C.start)),u(A.end,C.end)>0&&(T=x(A,C.end)),b(C.end,A.start,A.end,-1),T&&!I&&(A.lines=T.lines,A.start=T.start,A.end=T.end,T=A),[C,I,T].filter(Boolean)}return[C,A]}function p(A,C,O){b(A.start,C.start,C.end,O),b(A.end,C.start,C.end,O)}function b(A,C,O,D){A.row==(D==1?C:O).row&&(A.column+=D*(O.column-C.column)),A.row+=D*(O.row-C.row)}function x(A,C){var O=A.lines,D=A.end;A.end=d(C);var I=A.end.row-A.start.row,T=O.splice(I,O.length),B=I?C.column:C.column-A.start.column;O.push(T[0].substring(0,B)),T[0]=T[0].substr(B);var F={start:d(C),end:D,lines:T,action:A.action};return F}function M(A,C){C=a(C);for(var O=A.length;O--;){for(var D=A[O],I=0;I<D.length;I++){var T=D[I],B=s(T,C);C=B[0],B.length!=2&&(B[2]?(D.splice(I+1,1,B[1],B[2]),I++):B[1]||(D.splice(I,1),I--))}D.length||A.splice(O,1)}return A}function R(A,C){for(var O=0;O<C.length;O++)for(var D=C[O],I=0;I<D.length;I++)M(A,D[I])}r.UndoManager=f}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,m){var f=e("../range").Range,g=(function(){function w(u,d){this.foldData=u,Array.isArray(d)?this.folds=d:d=this.folds=[d];var a=d[d.length-1];this.range=new f(d[0].start.row,d[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return w.prototype.shiftRow=function(u){this.start.row+=u,this.end.row+=u,this.folds.forEach(function(d){d.start.row+=u,d.end.row+=u})},w.prototype.addFold=function(u){if(u.sameRow){if(u.start.row<this.startRow||u.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(u),this.folds.sort(function(d,a){return-d.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(u.start.row,u.start.column)>0?(this.end.row=u.end.row,this.end.column=u.end.column):this.range.compareStart(u.end.row,u.end.column)<0&&(this.start.row=u.start.row,this.start.column=u.start.column)}else if(u.start.row==this.end.row)this.folds.push(u),this.end.row=u.end.row,this.end.column=u.end.column;else if(u.end.row==this.start.row)this.folds.unshift(u),this.start.row=u.start.row,this.start.column=u.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");u.foldLine=this},w.prototype.containsRow=function(u){return u>=this.start.row&&u<=this.end.row},w.prototype.walk=function(u,d,a){var l=0,c=this.folds,h,o,s,p=!0;d==null&&(d=this.end.row,a=this.end.column);for(var b=0;b<c.length;b++){if(h=c[b],o=h.range.compareStart(d,a),o==-1){u(null,d,a,l,p);return}if(s=u(null,h.start.row,h.start.column,l,p),s=!s&&u(h.placeholder,h.start.row,h.start.column,l),s||o===0)return;p=!h.sameRow,l=h.end.column}u(null,d,a,l,p)},w.prototype.getNextFoldTo=function(u,d){for(var a,l,c=0;c<this.folds.length;c++){if(a=this.folds[c],l=a.range.compareEnd(u,d),l==-1)return{fold:a,kind:"after"};if(l===0)return{fold:a,kind:"inside"}}return null},w.prototype.addRemoveChars=function(u,d,a){var l=this.getNextFoldTo(u,d),c,h;if(l){if(c=l.fold,l.kind=="inside"&&c.start.column!=d&&c.start.row!=u)window.console&&window.console.log(u,d,c);else if(c.start.row==u){h=this.folds;var o=h.indexOf(c);for(o===0&&(this.start.column+=a),o;o<h.length;o++){if(c=h[o],c.start.column+=a,!c.sameRow)return;c.end.column+=a}this.end.column+=a}}},w.prototype.split=function(u,d){var a=this.getNextFoldTo(u,d);if(!a||a.kind=="inside")return null;var l=a.fold,c=this.folds,h=this.foldData,o=c.indexOf(l),s=c[o-1];this.end.row=s.end.row,this.end.column=s.end.column,c=c.splice(o,c.length-o);var p=new w(h,c);return h.splice(h.indexOf(this)+1,0,p),p},w.prototype.merge=function(u){for(var d=u.folds,a=0;a<d.length;a++)this.addFold(d[a]);var l=this.foldData;l.splice(l.indexOf(u),1)},w.prototype.toString=function(){var u=[this.range.toString()+": ["];return this.folds.forEach(function(d){u.push(" "+d.toString())}),u.push("]"),u.join(`
199
+ `)},w.prototype.idxToPosition=function(u){for(var d=0,a=0;a<this.folds.length;a++){var l=this.folds[a];if(u-=l.start.column-d,u<0)return{row:l.start.row,column:l.start.column+u};if(u-=l.placeholder.length,u<0)return l.start;d=l.end.column}return{row:this.end.row,column:this.end.column+u}},w})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,m){var f=e("./range").Range,g=f.comparePoints,w=(function(){function u(){this.ranges=[],this.$bias=1}return u.prototype.pointIndex=function(d,a,l){for(var c=this.ranges,h=l||0;h<c.length;h++){var o=c[h],s=g(d,o.end);if(!(s>0)){var p=g(d,o.start);return s===0?a&&p!==0?-h-2:h:p>0||p===0&&!a?h:-h-1}}return-h-1},u.prototype.add=function(d){var a=!d.isEmpty(),l=this.pointIndex(d.start,a);l<0&&(l=-l-1);var c=this.pointIndex(d.end,a,l);return c<0?c=-c-1:c++,this.ranges.splice(l,c-l,d)},u.prototype.addList=function(d){for(var a=[],l=d.length;l--;)a.push.apply(a,this.add(d[l]));return a},u.prototype.substractPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges.splice(a,1)},u.prototype.merge=function(){var d=[],a=this.ranges;a=a.sort(function(s,p){return g(s.start,p.start)});for(var l=a[0],c,h=1;h<a.length;h++){c=l,l=a[h];var o=g(c.end,l.start);o<0||o==0&&!c.isEmpty()&&!l.isEmpty()||(g(c.end,l.end)<0&&(c.end.row=l.end.row,c.end.column=l.end.column),a.splice(h,1),d.push(l),l=c,h--)}return this.ranges=a,d},u.prototype.contains=function(d,a){return this.pointIndex({row:d,column:a})>=0},u.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},u.prototype.rangeAtPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges[a]},u.prototype.clipRows=function(d,a){var l=this.ranges;if(l[0].start.row>a||l[l.length-1].start.row<d)return[];var c=this.pointIndex({row:d,column:0});c<0&&(c=-c-1);var h=this.pointIndex({row:a,column:0},c);h<0&&(h=-h-1);for(var o=[],s=c;s<h;s++)o.push(l[s]);return o},u.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},u.prototype.attach=function(d){this.session&&this.detach(),this.session=d,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},u.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},u.prototype.$onChange=function(d){for(var a=d.start,l=d.end,c=a.row,h=l.row,o=this.ranges,s=0,p=o.length;s<p;s++){var b=o[s];if(b.end.row>=c)break}if(d.action=="insert")for(var x=h-c,M=-a.column+l.column;s<p;s++){var b=o[s];if(b.start.row>c)break;if(b.start.row==c&&b.start.column>=a.column&&(b.start.column==a.column&&this.$bias<=0||(b.start.column+=M,b.start.row+=x)),b.end.row==c&&b.end.column>=a.column){if(b.end.column==a.column&&this.$bias<0)continue;b.end.column==a.column&&M>0&&s<p-1&&b.end.column>b.start.column&&b.end.column==o[s+1].start.column&&(b.end.column-=M),b.end.column+=M,b.end.row+=x}}else for(var x=c-h,M=a.column-l.column;s<p;s++){var b=o[s];if(b.start.row>h)break;b.end.row<h&&(c<b.end.row||c==b.end.row&&a.column<b.end.column)?(b.end.row=c,b.end.column=a.column):b.end.row==h?b.end.column<=l.column?(x||b.end.column>a.column)&&(b.end.column=a.column,b.end.row=a.row):(b.end.column+=M,b.end.row+=x):b.end.row>h&&(b.end.row+=x),b.start.row<h&&(c<b.start.row||c==b.start.row&&a.column<b.start.column)?(b.start.row=c,b.start.column=a.column):b.start.row==h?b.start.column<=l.column?(x||b.start.column>a.column)&&(b.start.column=a.column,b.start.row=a.row):(b.start.column+=M,b.start.row+=x):b.start.row>h&&(b.start.row+=x)}if(x!=0&&s<p)for(;s<p;s++){var b=o[s];b.start.row+=x,b.end.row+=x}},u})();w.prototype.comparePoints=g,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,m){var f=this&&this.__extends||(function(){var c=function(h,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(s[b]=p[b])},c(h,o)};return function(h,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(h,o);function s(){this.constructor=h}h.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}})(),g=e("../range_list").RangeList,w=(function(c){f(h,c);function h(o,s){var p=c.call(this)||this;return p.foldLine=null,p.placeholder=s,p.range=o,p.start=o.start,p.end=o.end,p.sameRow=o.start.row==o.end.row,p.subFolds=p.ranges=[],p}return h.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},h.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(s){s.setFoldLine(o)})},h.prototype.clone=function(){var o=this.range.clone(),s=new h(o,this.placeholder);return this.subFolds.forEach(function(p){s.subFolds.push(p.clone())}),s.collapseChildren=this.collapseChildren,s},h.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){d(o,this.start);for(var s=o.start.row,p=o.start.column,b=0,x=-1;b<this.subFolds.length&&(x=this.subFolds[b].range.compare(s,p),x==1);b++);var M=this.subFolds[b],R=0;if(x==0){if(M.range.containsRange(o))return M.addSubFold(o);R=1}for(var s=o.range.end.row,p=o.range.end.column,A=b,x=-1;A<this.subFolds.length&&(x=this.subFolds[A].range.compare(s,p),x==1);A++);x==0&&A++;for(var C=this.subFolds.splice(b,A-b,o),O=x==0?C.length-1:C.length,D=R;D<O;D++)o.addSubFold(C[D]);return o.setFoldLine(this.foldLine),o}},h.prototype.restoreRange=function(o){return l(o,this.start)},h})(g);function u(c,h){c.row-=h.row,c.row==0&&(c.column-=h.column)}function d(c,h){u(c.start,h),u(c.end,h)}function a(c,h){c.row==0&&(c.column+=h.column),c.row+=h.row}function l(c,h){a(c.start,h),a(c.end,h)}r.Fold=w}),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,m){var f=e("../range").Range,g=e("./fold_line").FoldLine,w=e("./fold").Fold,u=e("../token_iterator").TokenIterator,d=e("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(l,c,h){var o=this.getFoldLine(l);if(!o)return null;for(var s=o.folds,p=0;p<s.length;p++){var b=s[p].range;if(b.contains(l,c)){if(h==1&&b.isEnd(l,c)&&!b.isEmpty()||h==-1&&b.isStart(l,c)&&!b.isEmpty())continue;return s[p]}}},this.getFoldsInRange=function(l){var c=l.start,h=l.end,o=this.$foldData,s=[];c.column+=1,h.column-=1;for(var p=0;p<o.length;p++){var b=o[p].range.compareRange(l);if(b!=2){if(b==-2)break;for(var x=o[p].folds,M=0;M<x.length;M++){var R=x[M];if(b=R.range.compareRange(l),b==-2)break;if(b!=2){if(b==42)break;s.push(R)}}}}return c.column-=1,h.column+=1,s},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var c=[];l.forEach(function(o){c=c.concat(this.getFoldsInRange(o))},this)}else var c=this.getFoldsInRange(l);return c},this.getAllFolds=function(){for(var l=[],c=this.$foldData,h=0;h<c.length;h++)for(var o=0;o<c[h].folds.length;o++)l.push(c[h].folds[o]);return l},this.getFoldStringAt=function(l,c,h,o){if(o=o||this.getFoldLine(l),!o)return null;for(var s={end:{column:0}},p,b,x=0;x<o.folds.length;x++){b=o.folds[x];var M=b.range.compareEnd(l,c);if(M==-1){p=this.getLine(b.start.row).substring(s.end.column,b.start.column);break}else if(M===0)return null;s=b}return p||(p=this.getLine(b.start.row).substring(s.end.column)),h==-1?p.substring(0,c-s.end.column):h==1?p.substring(c-s.end.column):p},this.getFoldLine=function(l,c){var h=this.$foldData,o=0;for(c&&(o=h.indexOf(c)),o==-1&&(o=0),o;o<h.length;o++){var s=h[o];if(s.start.row<=l&&s.end.row>=l)return s;if(s.end.row>l)return null}return null},this.getNextFoldLine=function(l,c){var h=this.$foldData,o=0;for(c&&(o=h.indexOf(c)),o==-1&&(o=0),o;o<h.length;o++){var s=h[o];if(s.end.row>=l)return s}return null},this.getFoldedRowCount=function(l,c){for(var h=this.$foldData,o=c-l+1,s=0;s<h.length;s++){var p=h[s],b=p.end.row,x=p.start.row;if(b>=c){x<c&&(x>=l?o-=c-x:o=0);break}else b>=l&&(x>=l?o-=b-x:o-=b-l+1)}return o},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(c,h){return c.start.row-h.start.row}),l},this.addFold=function(l,c){var h=this.$foldData,o=!1,s;l instanceof w?s=l:(s=new w(c,l),s.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(s.range);var p=s.start.row,b=s.start.column,x=s.end.row,M=s.end.column,R=this.getFoldAt(p,b,1),A=this.getFoldAt(x,M,-1);if(R&&A==R)return R.addSubFold(s);R&&!R.range.isStart(p,b)&&this.removeFold(R),A&&!A.range.isEnd(x,M)&&this.removeFold(A);var C=this.getFoldsInRange(s.range);C.length>0&&(this.removeFolds(C),s.collapseChildren||C.forEach(function(T){s.addSubFold(T)}));for(var O=0;O<h.length;O++){var D=h[O];if(x==D.start.row){D.addFold(s),o=!0;break}else if(p==D.end.row){if(D.addFold(s),o=!0,!s.sameRow){var I=h[O+1];if(I&&I.start.row==x){D.merge(I);break}}break}else if(x<=D.start.row)break}return o||(D=this.$addFoldLine(new g(this.$foldData,s))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:s,action:"add"}),s},this.addFolds=function(l){l.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(l){var c=l.foldLine,h=c.start.row,o=c.end.row,s=this.$foldData,p=c.folds;if(p.length==1)s.splice(s.indexOf(c),1);else if(c.range.isEnd(l.end.row,l.end.column))p.pop(),c.end.row=p[p.length-1].end.row,c.end.column=p[p.length-1].end.column;else if(c.range.isStart(l.start.row,l.start.column))p.shift(),c.start.row=p[0].start.row,c.start.column=p[0].start.column;else if(l.sameRow)p.splice(p.indexOf(l),1);else{var b=c.split(l.start.row,l.start.column);p=b.folds,p.shift(),b.start.row=p[0].start.row,b.start.column=p[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(h,o):this.$updateRowLengthCache(h,o)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var c=[],h=0;h<l.length;h++)c.push(l[h]);c.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(c){l.restoreRange(c),this.addFold(c)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(l,c){var h,o;if(l==null)h=new f(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof l=="number")h=new f(l,0,l,this.getLine(l).length);else if("row"in l)h=f.fromPoints(l,l);else{if(Array.isArray(l))return o=[],l.forEach(function(p){o=o.concat(this.unfold(p))},this),o;h=l}o=this.getFoldsInRangeList(h);for(var s=o;o.length==1&&f.comparePoints(o[0].start,h.start)<0&&f.comparePoints(o[0].end,h.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(h);if(c!=!1?this.removeFolds(o):this.expandFolds(o),s.length)return s},this.isRowFolded=function(l,c){return!!this.getFoldLine(l,c)},this.getRowFoldEnd=function(l,c){var h=this.getFoldLine(l,c);return h?h.end.row:l},this.getRowFoldStart=function(l,c){var h=this.getFoldLine(l,c);return h?h.start.row:l},this.getFoldDisplayLine=function(l,c,h,o,s){o==null&&(o=l.start.row),s==null&&(s=0),c==null&&(c=l.end.row),h==null&&(h=this.getLine(c).length);var p=this.doc,b="";return l.walk(function(x,M,R,A){if(!(M<o)){if(M==o){if(R<s)return;A=Math.max(s,A)}x!=null?b+=x:b+=p.getLine(M).substring(A,R)}},c,h),b},this.getDisplayLine=function(l,c,h,o){var s=this.getFoldLine(l);if(s)return this.getFoldDisplayLine(s,l,c,h,o);var p;return p=this.doc.getLine(l),p.substring(o||0,c||p.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(c){var h=c.folds.map(function(o){return o.clone()});return new g(l,h)}),l},this.toggleFold=function(l){var c=this.selection,h=c.getRange(),o,s;if(h.isEmpty()){var p=h.start;if(o=this.getFoldAt(p.row,p.column),o){this.expandFold(o);return}else if(l){var b=this.getFoldLine(p.row);b&&this.expandFolds(b.folds);return}else(s=this.findMatchingBracket(p))?h.comparePoint(s)==1?h.end=s:(h.start=s,h.start.column++,h.end.column--):(s=this.findMatchingBracket({row:p.row,column:p.column+1}))?(h.comparePoint(s)==1?h.end=s:h.start=s,h.start.column++):h=this.getCommentFoldRange(p.row,p.column)||h}else{var x=this.getFoldsInRange(h);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(h.start.row,h.start.column)),o&&o.range.toString()==h.toString()){this.expandFold(o);return}var M="...";if(!h.isMultiLine()){if(M=this.getTextRange(h),M.length<4)return;M=M.trim().substring(0,2)+".."}this.addFold(M,h)},this.getCommentFoldRange=function(l,c,h){var o=new u(this,l,c),s=o.getCurrentToken(),p=s&&s.type;if(s&&/^comment|string/.test(p)){p=p.match(/comment|string/)[0],p=="comment"&&(p+="|doc-start|\\.doc");var b=new RegExp(p),x=new f;if(h!=1){do s=o.stepBackward();while(s&&b.test(s.type));s=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+s.value.length,o=new u(this,l,c);var M=this.getState(o.$row);if(h!=-1){var R=-1;do if(s=o.stepForward(),R==-1){var A=this.getState(o.$row);M.toString()!==A.toString()&&(R=o.$row)}else if(o.$row>R)break;while(s&&b.test(s.type));s=o.stepBackward()}else s=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(l,c,h,o){h==null&&(h=1e5);var s=this.foldWidgets;if(s){c=c||this.getLength(),l=l||0;for(var p=l;p<c;p++)if(s[p]==null&&(s[p]=this.getFoldWidget(p)),s[p]=="start"&&!(o&&!o(p))){var b=this.getFoldWidgetRange(p);b&&b.isMultiLine()&&b.end.row<=c&&b.start.row>=l&&(p=b.end.row,b.collapseChildren=h,this.addFold("...",b))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(c){for(var h=l.getTokens(c),o=0;o<h.length;o++){var s=h[o];if(!(s.type=="text"&&/^\s+$/.test(s.value)))return!!/comment/.test(s.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,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(l,c){var h=this.foldWidgets;if(!h||c&&h[l])return{};for(var o=l-1,s;o>=0;){var p=h[o];if(p==null&&(p=h[o]=this.getFoldWidget(o)),p=="start"){var b=this.getFoldWidgetRange(o);if(s||(s=b),b&&b.end.row>=l)break}o--}return{range:o!==-1&&b,firstRange:s}},this.onFoldWidgetClick=function(l,c){c instanceof d&&(c=c.domEvent);var h={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},o=this.$toggleFoldWidget(l,h);if(!o){var s=c.target||c.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,c){if(this.getFoldWidget){var h=this.getFoldWidget(l),o=this.getLine(l),s=h==="end"?-1:1,p=this.getFoldAt(l,s===-1?0:o.length,s);if(p)return c.children||c.all?this.removeFold(p):this.expandFold(p),p;var b=this.getFoldWidgetRange(l,!0);if(b&&!b.isMultiLine()&&(p=this.getFoldAt(b.start.row,b.start.column,1),p&&b.isEqual(p.range)))return this.removeFold(p),p;if(c.siblings){var x=this.getParentFoldRangeData(l);if(x.range)var M=x.range.start.row+1,R=x.range.end.row;this.foldAll(M,R,c.all?1e4:0)}else c.children?(R=b?b.end.row:this.getLength(),this.foldAll(l+1,R,c.all?1e4:0)):b&&(c.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(l){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var h=this.$toggleFoldWidget(c,{});if(!h){var o=this.getParentFoldRangeData(c,!0);if(h=o.range||o.firstRange,h){c=h.start.row;var s=this.getFoldAt(c,this.getLine(c).length,1);s?this.removeFold(s):this.addFold("...",h)}}},this.updateFoldWidgets=function(l){var c=l.start.row,h=l.end.row-c;if(h===0)this.foldWidgets[c]=null;else if(l.action=="remove")this.foldWidgets.splice(c,h+1,null);else{var o=Array(h+1);o.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(l){var c=l.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,m){var f=e("../token_iterator").TokenIterator,g=e("../range").Range;function w(){this.findMatchingBracket=function(u,d){if(u.column==0)return null;var a=d||this.getLine(u.row).charAt(u.column-1);if(a=="")return null;var l=a.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],u):this.$findOpeningBracket(l[2],u):null},this.getBracketRange=function(u){var d=this.getLine(u.row),a=!0,l,c=d.charAt(u.column-1),h=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(h||(c=d.charAt(u.column),u={row:u.row,column:u.column+1},h=c&&c.match(/([\(\[\{])|([\)\]\}])/),a=!1),!h)return null;if(h[1]){var o=this.$findClosingBracket(h[1],u);if(!o)return null;l=g.fromPoints(u,o),a||(l.end.column++,l.start.column--),l.cursor=l.end}else{var o=this.$findOpeningBracket(h[2],u);if(!o)return null;l=g.fromPoints(o,u),a||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(u,d){var a=this.getLine(u.row),l=/([\(\[\{])|([\)\]\}])/,c=!d&&a.charAt(u.column-1),h=c&&c.match(l);if(h||(c=(d===void 0||d)&&a.charAt(u.column),u={row:u.row,column:u.column+1},h=c&&c.match(l)),!h)return null;var o=new g(u.row,u.column-1,u.row,u.column),s=h[1]?this.$findClosingBracket(h[1],u):this.$findOpeningBracket(h[2],u);if(!s)return[o];var p=new g(s.row,s.column,s.row,s.column+1);return[o,p]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(u,d,a){var l=this.$brackets[u],c=1,h=new f(this,d.row,d.column),o=h.getCurrentToken();if(o||(o=h.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var s=d.column-h.getCurrentTokenColumn()-2,p=o.value;;){for(;s>=0;){var b=p.charAt(s);if(b==l){if(c-=1,c==0)return{row:h.getCurrentTokenRow(),column:s+h.getCurrentTokenColumn()}}else b==u&&(c+=1);s-=1}do o=h.stepBackward();while(o&&!a.test(o.type));if(o==null)break;p=o.value,s=p.length-1}return null}},this.$findClosingBracket=function(u,d,a){var l=this.$brackets[u],c=1,h=new f(this,d.row,d.column),o=h.getCurrentToken();if(o||(o=h.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var s=d.column-h.getCurrentTokenColumn();;){for(var p=o.value,b=p.length;s<b;){var x=p.charAt(s);if(x==l){if(c-=1,c==0)return{row:h.getCurrentTokenRow(),column:s+h.getCurrentTokenColumn()}}else x==u&&(c+=1);s+=1}do o=h.stepForward();while(o&&!a.test(o.type));if(o==null)break;s=0}return null}},this.getMatchingTags=function(u){var d=new f(this,u.row,u.column),a=this.$findTagName(d);if(a){var l=d.stepBackward();return l.value==="<"?this.$findClosingTag(d,a):this.$findOpeningTag(d,a)}},this.$findTagName=function(u){var d=u.getCurrentToken(),a=!1,l=!1;if(d&&d.type.indexOf("tag-name")===-1)do l?d=u.stepBackward():d=u.stepForward(),d&&(d.value==="/>"?l=!0:d.type.indexOf("tag-name")!==-1&&(a=!0));while(d&&!a);return d},this.$findClosingTag=function(u,d){var a,l=d.value,c=d.value,h=0,o=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);d=u.stepForward();var s=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+d.value.length),p=!1;do{if(a=d,a.type.indexOf("tag-close")!==-1&&!p){var b=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);p=!0}if(d=u.stepForward(),d){if(d.value===">"&&!p){var b=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);p=!0}if(d.type.indexOf("tag-name")!==-1){if(l=d.value,c===l){if(a.value==="<")h++;else if(a.value==="</"&&(h--,h<0)){u.stepBackward();var x=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2);d=u.stepForward();var M=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=u.stepForward()),d&&d.value===">")var R=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);else return}}}else if(c===l&&d.value==="/>"&&(h--,h<0))var x=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2),M=x,R=M,b=new g(s.end.row,s.end.column,s.end.row,s.end.column+1)}}while(d&&h>=0);if(o&&b&&x&&R&&s&&M)return{openTag:new g(o.start.row,o.start.column,b.end.row,b.end.column),closeTag:new g(x.start.row,x.start.column,R.end.row,R.end.column),openTagName:s,closeTagName:M}},this.$findOpeningTag=function(u,d){var a=u.getCurrentToken(),l=d.value,c=0,h=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),s=o+2,p=new g(h,o,h,s);u.stepForward();var b=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=u.stepForward()),!(!d||d.value!==">")){var x=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);u.stepBackward(),u.stepBackward();do if(d=a,h=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),s=o+d.value.length,a=u.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(l===d.value)if(a.value==="<"){if(c++,c>0){var M=new g(h,o,h,s),R=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);do d=u.stepForward();while(d&&d.value!==">");var A=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1)}}else a.value==="</"&&c--}else if(d.value==="/>"){for(var C=0,O=a;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===l){c--;break}else if(O.value==="<")break;O=u.stepBackward(),C++}for(var D=0;D<C;D++)u.stepForward()}}while(a&&c<=0);if(R&&A&&p&&x&&M&&b)return{openTag:new g(R.start.row,R.start.column,A.end.row,A.end.column),closeTag:new g(p.start.row,p.start.column,x.end.row,x.end.column),openTagName:M,closeTagName:b}}}}r.BracketMatch=w}),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,m){var f=e("./lib/oop"),g=e("./lib/lang"),w=e("./bidihandler").BidiHandler,u=e("./config"),d=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,h=e("./line_widgets").LineWidgets,o=e("./document").Document,s=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,b=e("./undomanager").UndoManager,x=(function(){function F(L,$){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 s(new l().getTokenizer(),this);var _=this;this.bgTokenizer.on("update",function(N){_._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof L!="object"||!L.getLine)&&(L=new o(L)),this.setDocument(L),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),u.resetOptions(this),this.setMode($),u._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var L=this;this.curOp=null,this.on("change",function(){L.curOp||(L.startOperation(),L.curOp.selectionBefore=L.$lastSel),L.curOp.docChanged=!0},!0),this.on("changeSelection",function(){L.curOp||(L.startOperation(),L.curOp.selectionBefore=L.$lastSel),L.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(L){if(this.curOp){if(!L||this.curOp.command)return;this.prevOp=this.curOp}L||(L={}),this.$operationResetTimer.schedule(),this.curOp={command:L.command||{},args:L.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",L)},F.prototype.endOperation=function(L){if(this.curOp){if(L&&L.returnValue===!1){this.curOp=null,this._signal("endOperation",L);return}if(L==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection($),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",L)}},F.prototype.setDocument=function(L){this.doc&&this.doc.off("change",this.$onChange),this.doc=L,L.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 L=new h(this);return this.widgetManager=L,this.$editor&&L.attach(this.$editor),L},set:function(L){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:L})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(L){if(!L){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,_=this.$getRowCacheIndex(this.$docRowCache,L)+1;$>_&&(this.$docRowCache.splice(_,$),this.$screenRowCache.splice(_,$))},F.prototype.$getRowCacheIndex=function(L,$){for(var _=0,N=L.length-1;_<=N;){var W=_+N>>1,U=L[W];if($>U)_=W+1;else if($<U)N=W-1;else return W}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(L){var $=L.data;this.$resetRowCache($.start.row)},F.prototype.onChange=function(L){this.$modified=!0,this.$bidiHandler.onChange(L),this.$resetRowCache(L.start.row);var $=this.$updateInternalDataOnChange(L);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(L,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(L),this._signal("change",L)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(L){this.doc.setValue(L),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(L){typeof L=="string"&&(L=JSON.parse(L));var $=new b;$.$undoStack=L.history.$undoStack,$.$redoStack=L.history.$redoStack,$.mark=L.history.mark,$.$rev=L.history.rev;var _=new F(L.value);return L.folds.forEach(function(N){_.addFold("...",c.fromPoints(N.start,N.end))}),_.setAnnotations(L.annotations),_.setBreakpoints(L.breakpoints),_.setMode(L.mode),_.setScrollLeft(L.scrollLeft),_.setScrollTop(L.scrollTop),_.setUndoManager($),_.selection.fromJSON(L.selection),_},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(L){return L.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(L){return this.bgTokenizer.getState(L)},F.prototype.getTokens=function(L){return this.bgTokenizer.getTokens(L)},F.prototype.getTokenAt=function(L,$){var _=this.bgTokenizer.getTokens(L),N,W=0;if($==null){var U=_.length-1;W=this.getLine(L).length}else for(var U=0;U<_.length&&(W+=_[U].value.length,!(W>=$));U++);return N=_[U],N?(N.index=U,N.start=W-N.value.length,N):null},F.prototype.setUndoManager=function(L){if(this.$undoManager=L,this.$informUndoManager&&this.$informUndoManager.cancel(),L){var $=this;L.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.mergeUndoDeltas=!1},this.$informUndoManager=g.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()?g.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(L){this.setOption("useSoftTabs",L)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(L){this.setOption("tabSize",L)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(L){return this.$useSoftTabs&&L.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(L){this.setOption("navigateWithinSoftTabs",L)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(L){this.setOption("overwrite",L)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(L,$){this.$decorations[L]||(this.$decorations[L]=""),this.$decorations[L]+=" "+$,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(L){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(L)},F.prototype.addGutterCustomWidget=function(L,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(L,$)},F.prototype.removeGutterDecoration=function(L,$){this.$decorations[L]=(this.$decorations[L]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(L){this.$breakpoints=[];for(var $=0;$<L.length;$++)this.$breakpoints[L[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(L,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[L]=$:delete this.$breakpoints[L],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(L){delete this.$breakpoints[L],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(L,$,_,N){var W=this.$markerId++,U={range:L,type:_||"line",renderer:typeof _=="function"?_:null,clazz:$,inFront:!!N,id:W};return N?(this.$frontMarkers[W]=U,this._signal("changeFrontMarker")):(this.$backMarkers[W]=U,this._signal("changeBackMarker")),W},F.prototype.addDynamicMarker=function(L,$){if(L.update){var _=this.$markerId++;return L.id=_,L.inFront=!!$,$?(this.$frontMarkers[_]=L,this._signal("changeFrontMarker")):(this.$backMarkers[_]=L,this._signal("changeBackMarker")),L}},F.prototype.removeMarker=function(L){var $=this.$frontMarkers[L]||this.$backMarkers[L];if($){var _=$.inFront?this.$frontMarkers:this.$backMarkers;delete _[L],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(L){return L?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(L){if(!this.$searchHighlight){var $=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(L)},F.prototype.highlightLines=function(L,$,_,N){typeof $!="number"&&(_=$,$=L),_||(_="ace_step");var W=new c(L,0,$,1/0);return W.id=this.addMarker(W,_,"fullLine",N),W},F.prototype.setAnnotations=function(L){this.$annotations=L,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(L){var $=L.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
201
+ `},F.prototype.getWordRange=function(L,$){var _=this.getLine(L),N=!1;if($>0&&(N=!!_.charAt($-1).match(this.tokenRe)),N||(N=!!_.charAt($).match(this.tokenRe)),N)var W=this.tokenRe;else if(/^\s+$/.test(_.slice($-1,$+1)))var W=/\s/;else var W=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&_.charAt(U).match(W));U++}for(var G=$;G<_.length&&_.charAt(G).match(W);)G++;return new c(L,U,L,G)},F.prototype.getAWordRange=function(L,$){for(var _=this.getWordRange(L,$),N=this.getLine(_.end.row);N.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},F.prototype.setNewLineMode=function(L){this.doc.setNewLineMode(L)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(L){this.setOption("useWorker",L)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(L){var $=L.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",L)},F.prototype.setMode=function(L,$){if(L&&typeof L=="object"){if(L.getTokenizer)return this.$onChangeMode(L);var _=L,N=_.path}else N=L||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[N]&&!_){this.$onChangeMode(this.$modes[N]),$&&$();return}this.$modeId=N,u.loadModule(["mode",N],(function(W){if(!this.destroyed){if(this.$modeId!==N)return $&&$();this.$modes[N]&&!_?this.$onChangeMode(this.$modes[N]):W&&W.Mode&&(W=new W.Mode(_),_||(this.$modes[N]=W,W.$id=N),this.$onChangeMode(W)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(L,$){if($||(this.$modeId=L.$id),this.$mode!==L){var _=this.$mode;this.$mode=L,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=L.getTokenizer();if(N.on!==void 0){var W=this.onReloadTokenizer.bind(this);N.on("update",W)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=L.tokenRe,this.nonTokenRe=L.nonTokenRe,$||(L.attachToSession&&L.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(L.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:L}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(L){u.warn("Could not load worker",L),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(L){this.$scrollTop===L||isNaN(L)||(this.$scrollTop=L,this._signal("changeScrollTop",L))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(L){this.$scrollLeft===L||isNaN(L)||(this.$scrollLeft=L,this._signal("changeScrollLeft",L))},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 L=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>L&&(L=$.screenWidth)}),this.lineWidgetWidth=L},F.prototype.$computeWidth=function(L){if(this.$modified||L){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),_=this.$rowLengthCache,N=0,W=0,U=this.$foldData[W],G=U?U.start.row:1/0,J=$.length,te=0;te<J;te++){if(te>G){if(te=U.end.row+1,te>=J)break;U=this.$foldData[W++],G=U?U.start.row:1/0}_[te]==null&&(_[te]=this.$getStringScreenWidth($[te])[0]),_[te]>N&&(N=_[te])}this.screenWidth=N}},F.prototype.getLine=function(L){return this.doc.getLine(L)},F.prototype.getLines=function(L,$){return this.doc.getLines(L,$)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(L){return this.doc.getTextRange(L||this.selection.getRange())},F.prototype.insert=function(L,$){return this.doc.insert(L,$)},F.prototype.remove=function(L){return this.doc.remove(L)},F.prototype.removeFullLines=function(L,$){return this.doc.removeFullLines(L,$)},F.prototype.undoChanges=function(L,$){if(L.length){this.$fromUndo=!0;for(var _=L.length-1;_!=-1;_--){var N=L[_];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!$&&this.$undoSelect&&(L.selectionBefore?this.selection.fromJSON(L.selectionBefore):this.selection.setRange(this.$getUndoSelection(L,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(L,$){if(L.length){this.$fromUndo=!0;for(var _=0;_<L.length;_++){var N=L[_];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!$&&this.$undoSelect&&(L.selectionAfter?this.selection.fromJSON(L.selectionAfter):this.selection.setRange(this.$getUndoSelection(L,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(L){this.$undoSelect=L},F.prototype.$getUndoSelection=function(L,$){function _(J){return $?J.action!=="insert":J.action==="insert"}for(var N,W,U=0;U<L.length;U++){var G=L[U];if(G.start){if(!N){_(G)?N=c.fromPoints(G.start,G.end):N=c.fromPoints(G.start,G.start);continue}_(G)?(W=G.start,N.compare(W.row,W.column)==-1&&N.setStart(W),W=G.end,N.compare(W.row,W.column)==1&&N.setEnd(W)):(W=G.start,N.compare(W.row,W.column)==-1&&(N=c.fromPoints(G.start,G.start)))}}return N},F.prototype.replace=function(L,$){return this.doc.replace(L,$)},F.prototype.moveText=function(L,$,_){var N=this.getTextRange(L),W=this.getFoldsInRange(L),U=c.fromPoints($,$);if(!_){this.remove(L);var G=L.start.row-L.end.row,J=G?-L.end.column:L.start.column-L.end.column;J&&(U.start.row==L.end.row&&U.start.column>L.end.column&&(U.start.column+=J),U.end.row==L.end.row&&U.end.column>L.end.column&&(U.end.column+=J)),G&&U.start.row>=L.end.row&&(U.start.row+=G,U.end.row+=G)}if(U.end=this.insert(U.start,N),W.length){var te=L.start,he=U.start,G=he.row-te.row,J=he.column-te.column;this.addFolds(W.map(function(se){return se=se.clone(),se.start.row==te.row&&(se.start.column+=J),se.end.row==te.row&&(se.end.column+=J),se.start.row+=G,se.end.row+=G,se}))}return U},F.prototype.indentRows=function(L,$,_){_=_.replace(/\t/g,this.getTabString());for(var N=L;N<=$;N++)this.doc.insertInLine({row:N,column:0},_)},F.prototype.outdentRows=function(L){for(var $=L.collapseRows(),_=new c(0,0,0,0),N=this.getTabSize(),W=$.start.row;W<=$.end.row;++W){var U=this.getLine(W);_.start.row=W,_.end.row=W;for(var G=0;G<N&&U.charAt(G)==" ";++G);G<N&&U.charAt(G)==" "?(_.start.column=G,_.end.column=G+1):(_.start.column=0,_.end.column=G),this.remove(_)}},F.prototype.$moveLines=function(L,$,_){if(L=this.getRowFoldStart(L),$=this.getRowFoldEnd($),_<0){var N=this.getRowFoldStart(L+_);if(N<0)return 0;var W=N-L}else if(_>0){var N=this.getRowFoldEnd($+_);if(N>this.doc.getLength()-1)return 0;var W=N-$}else{L=this.$clipRowToDocument(L),$=this.$clipRowToDocument($);var W=$-L+1}var U=new c(L,0,$,Number.MAX_VALUE),G=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=W,te.end.row+=W,te}),J=_==0?this.doc.getLines(L,$):this.doc.removeFullLines(L,$);return this.doc.insertFullLines(L+W,J),G.length&&this.addFolds(G),W},F.prototype.moveLinesUp=function(L,$){return this.$moveLines(L,$,-1)},F.prototype.moveLinesDown=function(L,$){return this.$moveLines(L,$,1)},F.prototype.duplicateLines=function(L,$){return this.$moveLines(L,$,0)},F.prototype.$clipRowToDocument=function(L){return Math.max(0,Math.min(L,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(L,$){return $<0?0:Math.min(this.doc.getLine(L).length,$)},F.prototype.$clipPositionToDocument=function(L,$){if($=Math.max(0,$),L<0)L=0,$=0;else{var _=this.doc.getLength();L>=_?(L=_-1,$=this.doc.getLine(_-1).length):$=Math.min(this.doc.getLine(L).length,$)}return{row:L,column:$}},F.prototype.$clipRangeToDocument=function(L){L.start.row<0?(L.start.row=0,L.start.column=0):L.start.column=this.$clipColumnToRow(L.start.row,L.start.column);var $=this.doc.getLength()-1;return L.end.row>$?(L.end.row=$,L.end.column=this.doc.getLine($).length):L.end.column=this.$clipColumnToRow(L.end.row,L.end.column),L},F.prototype.setUseWrapMode=function(L){if(L!=this.$useWrapMode){if(this.$useWrapMode=L,this.$modified=!0,this.$resetRowCache(0),L){var $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(L,$){(this.$wrapLimitRange.min!==L||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:L,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(L,$){var _=this.$wrapLimitRange;_.max<0&&(_={min:$,max:$});var N=this.$constrainWrapLimit(L,_.min,_.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(L,$,_){return $&&(L=Math.max($,L)),_&&(L=Math.min(_,L)),L},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(L){this.setWrapLimitRange(L,L)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(L){var $=this.$useWrapMode,_=L.action,N=L.start,W=L.end,U=N.row,G=W.row,J=G-U,te=null;if(this.$updating=!0,J!=0)if(_==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,J);var he=this.$foldData;te=this.getFoldsInRange(L),this.removeFolds(te);var ee=this.getFoldLine(W.row),le=0;if(ee){ee.addRemoveChars(W.row,W.column,N.column-W.column),ee.shiftRow(-J);var se=this.getFoldLine(U);se&&se!==ee&&(se.merge(ee),ee=se),le=he.indexOf(ee)+1}for(le;le<he.length;le++){var ee=he[le];ee.start.row>=W.row&&ee.shiftRow(-J)}G=U}else{var ce=Array(J);ce.unshift(U,0);var pe=$?this.$wrapData:this.$rowLengthCache;pe.splice.apply(pe,ce);var he=this.$foldData,ee=this.getFoldLine(U),le=0;if(ee){var ve=ee.range.compareInside(N.row,N.column);ve==0?(ee=ee.split(N.row,N.column),ee&&(ee.shiftRow(J),ee.addRemoveChars(G,0,W.column-N.column))):ve==-1&&(ee.addRemoveChars(U,0,W.column-N.column),ee.shiftRow(J)),le=he.indexOf(ee)+1}for(le;le<he.length;le++){var ee=he[le];ee.start.row>=U&&ee.shiftRow(J)}}else{J=Math.abs(L.start.column-L.end.column),_==="remove"&&(te=this.getFoldsInRange(L),this.removeFolds(te),J=-J);var ee=this.getFoldLine(U);ee&&ee.addRemoveChars(U,N.column,J)}return $&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,$?this.$updateWrapData(U,G):this.$updateRowLengthCache(U,G),te},F.prototype.$updateRowLengthCache=function(L,$){this.$rowLengthCache[L]=null,this.$rowLengthCache[$]=null},F.prototype.$updateWrapData=function(L,$){var _=this.doc.getAllLines(),N=this.getTabSize(),W=this.$wrapData,U=this.$wrapLimit,G,J,te=L;for($=Math.min($,_.length-1);te<=$;)J=this.getFoldLine(te,J),J?(G=[],J.walk((function(he,ee,le,se){var ce;if(he!=null){ce=this.$getDisplayTokens(he,G.length),ce[0]=A;for(var pe=1;pe<ce.length;pe++)ce[pe]=C}else ce=this.$getDisplayTokens(_[ee].substring(se,le),G.length);G=G.concat(ce)}).bind(this),J.end.row,_[J.end.row].length+1),W[J.start.row]=this.$computeWrapSplits(G,U,N),te=J.end.row+1):(G=this.$getDisplayTokens(_[te]),W[te]=this.$computeWrapSplits(G,U,N),te++)},F.prototype.$computeWrapSplits=function(L,$,_){if(L.length==0)return[];var N=[],W=L.length,U=0,G=0,J=this.$wrapAsCode,te=this.$indentedSoftWrap,he=$<=Math.max(2*_,8)||te===!1?0:Math.floor($/2);function ee(){var ve=0;if(he===0)return ve;if(te)for(var $e=0;$e<L.length;$e++){var Ee=L[$e];if(Ee==D)ve+=1;else if(Ee==I)ve+=_;else{if(Ee==T)continue;break}}return J&&te!==!1&&(ve+=_),Math.min(ve,he)}function le(ve){for(var $e=ve-U,Ee=U;Ee<ve;Ee++){var qe=L[Ee];(qe===12||qe===2)&&($e-=1)}N.length||(se=ee(),N.indent=se),G+=$e,N.push(G),U=ve}for(var se=0;W-U>$-se;){var ce=U+$-se;if(L[ce-1]>=D&&L[ce]>=D){le(ce);continue}if(L[ce]==A||L[ce]==C){for(ce;ce!=U-1&&L[ce]!=A;ce--);if(ce>U){le(ce);continue}for(ce=U+$,ce;ce<L.length&&L[ce]==C;ce++);if(ce==L.length)break;le(ce);continue}for(var pe=Math.max(ce-($-($>>2)),U-1);ce>pe&&L[ce]<A;)ce--;if(J){for(;ce>pe&&L[ce]<A;)ce--;for(;ce>pe&&L[ce]==O;)ce--}else for(;ce>pe&&L[ce]<D;)ce--;if(ce>pe){le(++ce);continue}ce=U+$,L[ce]==R&&ce--,le(ce-se)}return N},F.prototype.$getDisplayTokens=function(L,$){var _=[],N;$=$||0;for(var W=0;W<L.length;W++){var U=L.charCodeAt(W);if(U==9){N=this.getScreenTabSize(_.length+$),_.push(I);for(var G=1;G<N;G++)_.push(T)}else U==32?_.push(D):U>39&&U<48||U>57&&U<64?_.push(O):U>=4352&&B(U)?_.push(M,R):_.push(M)}return _},F.prototype.$getStringScreenWidth=function(L,$,_){if($==0)return[0,0];$==null&&($=1/0),_=_||0;var N,W;for(W=0;W<L.length&&(N=L.charCodeAt(W),N==9?_+=this.getScreenTabSize(_):N>=4352&&B(N)?_+=2:_+=1,!(_>$));W++);return[_,W]},F.prototype.getRowLength=function(L){var $=1;return this.lineWidgets&&($+=this.lineWidgets[L]&&this.lineWidgets[L].rowCount||0),!this.$useWrapMode||!this.$wrapData[L]?$:this.$wrapData[L].length+$},F.prototype.getRowLineCount=function(L){return!this.$useWrapMode||!this.$wrapData[L]?1:this.$wrapData[L].length+1},F.prototype.getRowWrapIndent=function(L){if(this.$useWrapMode){var $=this.screenToDocumentPosition(L,Number.MAX_VALUE),_=this.$wrapData[$.row];return _.length&&_[0]<$.column?_.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(L){var $=this.screenToDocumentPosition(L,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},F.prototype.getDocumentLastRowColumn=function(L,$){var _=this.documentToScreenRow(L,$);return this.getScreenLastRowColumn(_)},F.prototype.getDocumentLastRowColumnPosition=function(L,$){var _=this.documentToScreenRow(L,$);return this.screenToDocumentPosition(_,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(L){if(this.$useWrapMode)return this.$wrapData[L]},F.prototype.getScreenTabSize=function(L){return this.$tabSize-(L%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(L,$){return this.screenToDocumentPosition(L,$).row},F.prototype.screenToDocumentColumn=function(L,$){return this.screenToDocumentPosition(L,$).column},F.prototype.screenToDocumentPosition=function(L,$,_){if(L<0)return{row:0,column:0};var N,le=0,W=0,U,ee=0,G=0,J=this.$screenRowCache,te=this.$getRowCacheIndex(J,L),he=J.length;if(he&&te>=0)var ee=J[te],le=this.$docRowCache[te],se=L>J[he-1];else var se=!he;for(var ce=this.getLength()-1,pe=this.getNextFoldLine(le),ve=pe?pe.start.row:1/0;ee<=L&&(G=this.getRowLength(le),!(ee+G>L||le>=ce));)ee+=G,le++,le>ve&&(le=pe.end.row+1,pe=this.getNextFoldLine(le,pe),ve=pe?pe.start.row:1/0),se&&(this.$docRowCache.push(le),this.$screenRowCache.push(ee));if(pe&&pe.start.row<=le)N=this.getFoldDisplayLine(pe),le=pe.start.row;else{if(ee+G<=L||le>ce)return{row:ce,column:this.getLine(ce).length};N=this.getLine(le),pe=null}var $e=0,Ee=Math.floor(L-ee);if(this.$useWrapMode){var qe=this.$wrapData[le];qe&&(U=qe[Ee],Ee>0&&qe.length&&($e=qe.indent,W=qe[Ee-1]||qe[qe.length-1],N=N.substring(W)))}return _!==void 0&&this.$bidiHandler.isBidiRow(ee+Ee,le,Ee)&&($=this.$bidiHandler.offsetToCol(_)),W+=this.$getStringScreenWidth(N,$-$e)[1],this.$useWrapMode&&W>=U&&(W=U-1),pe?pe.idxToPosition(W):{row:le,column:W}},F.prototype.documentToScreenPosition=function(L,$){if(typeof $>"u")var _=this.$clipPositionToDocument(L.row,L.column);else _=this.$clipPositionToDocument(L,$);L=_.row,$=_.column;var ee=0,N=null,W=null;W=this.getFoldAt(L,$,1),W&&(L=W.start.row,$=W.start.column);var U,he=0,G=this.$docRowCache,J=this.$getRowCacheIndex(G,L),te=G.length;if(te&&J>=0)var he=G[J],ee=this.$screenRowCache[J],le=L>G[te-1];else var le=!te;for(var se=this.getNextFoldLine(he),ce=se?se.start.row:1/0;he<L;){if(he>=ce){if(U=se.end.row+1,U>L)break;se=this.getNextFoldLine(U,se),ce=se?se.start.row:1/0}else U=he+1;ee+=this.getRowLength(he),he=U,le&&(this.$docRowCache.push(he),this.$screenRowCache.push(ee))}var pe="";se&&he>=ce?(pe=this.getFoldDisplayLine(se,L,$),N=se.start.row):(pe=this.getLine(L).substring(0,$),N=L);var ve=0;if(this.$useWrapMode){var $e=this.$wrapData[N];if($e){for(var Ee=0;pe.length>=$e[Ee];)ee++,Ee++;pe=pe.substring($e[Ee-1]||0,pe.length),ve=Ee>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ee+=this.lineWidgets[he].rowsAbove),{row:ee,column:ve+this.$getStringScreenWidth(pe)[0]}},F.prototype.documentToScreenColumn=function(L,$){return this.documentToScreenPosition(L,$).column},F.prototype.documentToScreenRow=function(L,$){return this.documentToScreenPosition(L,$).row},F.prototype.getScreenLength=function(){var L=0,$=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,N=0,W=0,$=this.$foldData[W++],U=$?$.start.row:1/0;N<_;){var G=this.$wrapData[N];L+=G?G.length+1:1,N++,N>U&&(N=$.end.row+1,$=this.$foldData[W++],U=$?$.start.row:1/0)}else{L=this.getLength();for(var J=this.$foldData,W=0;W<J.length;W++)$=J[W],L-=$.end.row-$.start.row}return this.lineWidgets&&(L+=this.$getWidgetScreenLength()),L},F.prototype.$setFontMetrics=function(L){this.$enableVarChar&&(this.$getStringScreenWidth=function($,_,N){if(_===0)return[0,0];_||(_=1/0),N=N||0;var W,U;for(U=0;U<$.length&&(W=$.charAt(U),W===" "?N+=this.getScreenTabSize(N):N+=L.getCharacterWidth(W),!(N>_));U++);return[N,U]})},F.prototype.getPrecedingCharacter=function(){var L=this.selection.getCursor();if(L.column===0)return L.row===0?"":this.doc.getNewLineCharacter();var $=this.getLine(L.row);return $[L.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=u.$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=B,f.implement(x.prototype,d);var M=1,R=2,A=3,C=4,O=9,D=10,I=11,T=12;function B(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),u.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 L=typeof F=="number"?F:null;this.setWrapLimitRange(L,L),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,m){var f=e("./lib/lang"),g=e("./lib/oop"),w=e("./range").Range,u=(function(){function c(){this.$options={}}return c.prototype.set=function(h){return g.mixin(this.$options,h),this},c.prototype.getOptions=function(){return f.copyObject(this.$options)},c.prototype.setOptions=function(h){this.$options=h},c.prototype.find=function(h){var o=this.$options,s=this.$matchIterator(h,o);if(!s)return!1;var p=null;return s.forEach(function(b,x,M,R){return p=new w(b,x,M,R),x==R&&o.start&&o.start.start&&o.skipCurrent!=!1&&p.isEqual(o.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(h){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var s=o.range,p=s?h.getLines(s.start.row,s.end.row):h.doc.getAllLines(),b=[],x=o.re;if(o.$isMultiLine){var M=x.length,R=p.length-M,A;e:for(var C=x.offset||0;C<=R;C++){for(var O=0;O<M;O++)if(p[C+O].search(x[O])==-1)continue e;var D=p[C],I=p[C+M-1],T=D.length-D.match(x[0])[0].length,B=I.match(x[M-1])[0].length;A&&A.end.row===C&&A.end.column>T||(b.push(A=new w(C,T,C+M-1,B)),M>2&&(C=C+M-2))}}else for(var F,L=0;L<p.length;L++)if(this.$isMultilineSearch(o)){var $=p.length-1;if(F=this.$multiLineForward(h,x,L,$),F){var _=F.endRow<=$?F.endRow-1:$;_>L&&(L=_),b.push(new w(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=f.getMatchOffsets(p[L],x);for(var O=0;O<F.length;O++){var N=F[O];b.push(new w(L,N.offset,L,N.offset+N.length))}}if(s){for(var W=s.start.column,U=s.end.column,L=0,O=b.length-1;L<O&&b[L].start.column<W&&b[L].start.row==0;)L++;for(var G=s.end.row-s.start.row;L<O&&b[O].end.column>U&&b[O].end.row==G;)O--;for(b=b.slice(L,O+1),L=0,O=b.length;L<O;L++)b[L].start.row+=s.start.row,b[L].end.row+=s.start.row}return b},c.prototype.parseReplaceString=function(h){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},s="",p=0,b=h.length;p<b;p++){var x=h.charCodeAt(p);if(x===o.Backslash){if(p++,p>=b){s+="\\";break}var M=h.charCodeAt(p);switch(M){case o.Backslash:s+="\\";break;case o.n:s+=`
202
+ `;break;case o.t:s+=" ";break}continue}if(x===o.DollarSign){if(p++,p>=b){s+="$";break}var R=h.charCodeAt(p);if(R===o.DollarSign){s+="$$";continue}if(R===o.Digit0||R===o.Ampersand){s+="$&";continue}if(o.Digit1<=R&&R<=o.Digit9){s+="$"+h[p];continue}}s+=h[p]}return s||h},c.prototype.replace=function(h,o){var s=this.$options,p=this.$assembleRegExp(s);if(s.$isMultiLine)return o;if(p){var b=this.$isMultilineSearch(s);b&&(h=h.replace(/\r\n|\r|\n/g,`
203
+ `));var x=p.exec(h);if(!x||!b&&x[0].length!=h.length)return null;if(o=s.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=h.replace(p,o),s.preserveCase){o=o.split("");for(var M=Math.min(h.length,h.length);M--;){var R=h[M];R&&R.toLowerCase()!=R?o[M]=o[M].toUpperCase():o[M]=o[M].toLowerCase()}o=o.join("")}return o}},c.prototype.$assembleRegExp=function(h,o){if(h.needle instanceof RegExp)return h.re=h.needle;var s=h.needle;if(!h.needle)return h.re=!1;h.regExp||(s=f.escapeRegExp(s));var p=h.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),h.$supportsUnicodeFlag=!0,p+="u"}catch{h.$supportsUnicodeFlag=!1}if(h.wholeWord&&(s=d(s,h)),h.$isMultiLine=!o&&/[\n\r]/.test(s),h.$isMultiLine)return h.re=this.$assembleMultilineRegExp(s,p);try{var b=new RegExp(s,p)}catch{b=!1}return h.re=b},c.prototype.$assembleMultilineRegExp=function(h,o){for(var s=h.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),p=[],b=0;b<s.length;b++)try{p.push(new RegExp(s[b],o))}catch{return!1}return p},c.prototype.$isMultilineSearch=function(h){return h.re&&/\\r\\n|\\r|\\n/.test(h.re.source)&&h.regExp&&!h.$isMultiLine},c.prototype.$multiLineForward=function(h,o,s,p){for(var b,x=l(h,s),M=s;M<=p;){for(var R=0;R<x&&!(M>p);R++){var A=h.getLine(M++);b=b==null?A:b+`
206
+ `+A}var C=o.exec(b);if(o.lastIndex=0,C){var O=b.slice(0,C.index).split(`
207
+ `),D=C[0].split(`
208
+ `),I=s+O.length-1,T=O[O.length-1].length,B=I+D.length-1,F=D.length==1?T+D[0].length:D[D.length-1].length;return{startRow:I,startCol:T,endRow:B,endCol:F}}}return null},c.prototype.$multiLineBackward=function(h,o,s,p,b){for(var x,M=l(h,p),R=h.getLine(p).length-s,A=p;A>=b;){for(var C=0;C<M&&A>=b;C++){var O=h.getLine(A--);x=x==null?O:O+`
209
+ `+x}var D=a(x,o,R);if(D){var I=x.slice(0,D.index).split(`
210
+ `),T=D[0].split(`
211
+ `),B=A+I.length,F=I[I.length-1].length,L=B+T.length-1,$=T.length==1?F+T[0].length:T[T.length-1].length;return{startRow:B,startCol:F,endRow:L,endCol:$}}}return null},c.prototype.$matchIterator=function(h,o){var s=this.$assembleRegExp(o);if(!s)return!1;var p=this.$isMultilineSearch(o),b=this.$multiLineForward,x=this.$multiLineBackward,M=o.backwards==!0,R=o.skipCurrent!=!1,A=s.unicode,C=o.range,O=o.start;O||(O=C?C[M?"end":"start"]:h.selection.getRange()),O.start&&(O=O[R!=M?"end":"start"]);var D=C?C.start.row:0,I=C?C.end.row:h.getLength()-1;if(M)var T=function(L){var $=O.row;if(!F($,O.column,L)){for($--;$>=D;$--)if(F($,Number.MAX_VALUE,L))return;if(o.wrap!=!1){for($=I,D=O.row;$>=D;$--)if(F($,Number.MAX_VALUE,L))return}}};else var T=function(L){var $=O.row;if(!F($,O.column,L)){for($=$+1;$<=I;$++)if(F($,0,L))return;if(o.wrap!=!1){for($=D,I=O.row;$<=I;$++)if(F($,0,L))return}}};if(o.$isMultiLine)var B=s.length,F=function(L,$,_){var N=M?L-B+1:L;if(!(N<0||N+B>h.getLength())){var W=h.getLine(N),U=W.search(s[0]);if(!(!M&&U<$||U===-1)){for(var G=1;G<B;G++)if(W=h.getLine(N+G),W.search(s[G])==-1)return;var J=W.match(s[B-1])[0].length;if(!(M&&J>$)&&_(N,U,N+B-1,J))return!0}}};else if(M)var F=function(L,$,_){if(p){var N=x(h,s,$,L,D);if(!N)return!1;if(_(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var W=h.getLine(L),U=[],G,J=0;for(s.lastIndex=0;G=s.exec(W);){var te=G[0].length;if(J=G.index,!te){if(J>=W.length)break;s.lastIndex=J+=f.skipEmptyMatch(W,J,A)}if(G.index+te>$)break;U.push(G.index,te)}for(var he=U.length-1;he>=0;he-=2){var ee=U[he-1],te=U[he];if(_(L,ee,L,ee+te))return!0}}};else var F=function(L,$,_){if(s.lastIndex=$,p){var N=b(h,s,L,I);if(N){var W=N.endRow<=I?N.endRow-1:I;W>L&&(L=W)}if(!N)return!1;if(_(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=h.getLine(L),G,J;J=s.exec(U);){var te=J[0].length;if(G=J.index,_(L,G,L,G+te))return!0;if(!te&&(s.lastIndex=G+=f.skipEmptyMatch(U,G,A),G>=U.length))return!1}};return{forEach:T}},c})();function d(c,h){var o=f.supportsLookbehind();function s(M,R){R===void 0&&(R=!0);var A=o&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return A.test(M)||h.regExp?o&&h.$supportsUnicodeFlag?R?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),b=p[0],x=p[p.length-1];return s(b)+c+s(x,!1)}function a(c,h,o){for(var s=null,p=0;p<=c.length;){h.lastIndex=p;var b=h.exec(c);if(!b)break;var x=b.index+b[0].length;if(x>c.length-o)break;(!s||x>s.index+s[0].length)&&(s=b),p=b.index+1}return s}function l(c,h){var o=5e3,s={row:h,column:0},p=c.doc.positionToIndex(s),b=p+o,x=c.doc.indexToPosition(b),M=x.row;return M+1}r.Search=u}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var f=this&&this.__extends||(function(){var c=function(h,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(s[b]=p[b])},c(h,o)};return function(h,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(h,o);function s(){this.constructor=h}h.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}})(),g=e("../lib/keys"),w=e("../lib/useragent"),u=g.KEY_MODS,d=(function(){function c(h,o){this.$init(h,o,!1)}return c.prototype.$init=function(h,o,s){this.platform=o||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(h),this.$singleCommand=s},c.prototype.addCommand=function(h){this.commands[h.name]&&this.removeCommand(h),this.commands[h.name]=h,h.bindKey&&this._buildKeyHash(h)},c.prototype.removeCommand=function(h,o){var s=h&&(typeof h=="string"?h:h.name);h=this.commands[s],o||delete this.commands[s];var p=this.commandKeyBinding;for(var b in p){var x=p[b];if(x==h)delete p[b];else if(Array.isArray(x)){var M=x.indexOf(h);M!=-1&&(x.splice(M,1),x.length==1&&(p[b]=x[0]))}}},c.prototype.bindKey=function(h,o,s){if(typeof h=="object"&&h&&(s==null&&(s=h.position),h=h[this.platform]),!!h){if(typeof o=="function")return this.addCommand({exec:o,bindKey:h,name:o.name||h});h.split("|").forEach(function(p){var b="";if(p.indexOf(" ")!=-1){var x=p.split(/\s+/);p=x.pop(),x.forEach(function(A){var C=this.parseKeys(A),O=u[C.hashId]+C.key;b+=(b?" ":"")+O,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var M=this.parseKeys(p),R=u[M.hashId]+M.key;this._addCommandToBinding(b+R,o,s)},this)}},c.prototype._addCommandToBinding=function(h,o,s){var p=this.commandKeyBinding,b;if(!o)delete p[h];else if(!p[h]||this.$singleCommand)p[h]=o;else{Array.isArray(p[h])?(b=p[h].indexOf(o))!=-1&&p[h].splice(b,1):p[h]=[p[h]],typeof s!="number"&&(s=a(o));var x=p[h];for(b=0;b<x.length;b++){var M=x[b],R=a(M);if(R>s)break}x.splice(b,0,o)}},c.prototype.addCommands=function(h){h&&Object.keys(h).forEach(function(o){var s=h[o];if(s){if(typeof s=="string")return this.bindKey(s,o);typeof s=="function"&&(s={exec:s}),typeof s=="object"&&(s.name||(s.name=o),this.addCommand(s))}},this)},c.prototype.removeCommands=function(h){Object.keys(h).forEach(function(o){this.removeCommand(h[o])},this)},c.prototype.bindKeys=function(h){Object.keys(h).forEach(function(o){this.bindKey(o,h[o])},this)},c.prototype._buildKeyHash=function(h){this.bindKey(h.bindKey,h)},c.prototype.parseKeys=function(h){var o=h.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(R){return R}),s=o.pop(),p=g[s];if(g.FUNCTION_KEYS[p])s=g.FUNCTION_KEYS[p].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:s.toUpperCase(),hashId:-1}}else return{key:s,hashId:-1};for(var b=0,x=o.length;x--;){var M=g.KEY_MODS[o[x]];if(M==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+h),!1;b|=M}return{key:s,hashId:b}},c.prototype.findKeyCommand=function(h,o){var s=u[h]+o;return this.commandKeyBinding[s]},c.prototype.handleKeyboard=function(h,o,s,p){if(!(p<0)){var b=u[o]+s,x=this.commandKeyBinding[b];return h.$keyChain&&(h.$keyChain+=" "+b,x=this.commandKeyBinding[h.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(h.$keyChain=h.$keyChain||b,{command:"null"}):(h.$keyChain&&((!o||o==4)&&s.length==1?h.$keyChain=h.$keyChain.slice(0,-b.length-1):(o==-1||p>0)&&(h.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(h,o){return o.$keyChain||""},c})();function a(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var l=(function(c){f(h,c);function h(o,s){var p=c.call(this,o,s)||this;return p.$singleCommand=!0,p}return h})(d);l.call=function(c,h,o){d.prototype.$init.call(c,h,o,!0)},d.call=function(c,h,o){d.prototype.$init.call(c,h,o,!1)},r.HashHandler=l,r.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,m){var f=this&&this.__extends||(function(){var a=function(l,c){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(h[s]=o[s])},a(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");a(l,c);function h(){this.constructor=l}l.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}})(),g=e("../lib/oop"),w=e("../keyboard/hash_handler").MultiHashHandler,u=e("../lib/event_emitter").EventEmitter,d=(function(a){f(l,a);function l(c,h){var o=a.call(this,h,c)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),o}return l.prototype.exec=function(c,h,o){if(Array.isArray(c)){for(var s=c.length;s--;)if(this.exec(c[s],h,o))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var p={editor:h,command:c,args:o};return this.canExecute(c,h)?(p.returnValue=this._emit("exec",p),this._signal("afterExec",p),p.returnValue!==!1):(this._signal("commandUnavailable",p),!1)},l.prototype.canExecute=function(c,h){return typeof c=="string"&&(c=this.commands[c]),!(!c||h&&h.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(h))},l.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._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(h){this.macro.push([h.command,h.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(h){typeof h=="string"?this.exec(h,c):this.exec(h[0],c,h[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(c){return c.map(function(h){return typeof h[0]!="string"&&(h[0]=h[0].name),h[1]||(h=h[0]),h})},l})(w);g.implement(d.prototype,u),r.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,m){var f=e("../lib/lang"),g=e("../config"),w=e("../range").Range;function u(a,l){return{win:a,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:u("Ctrl-,","Command-,"),exec:function(a){g.loadModule("ace/ext/settings_menu",function(l){l.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:u("Alt-E","F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:u("Alt-Shift-E","Shift-F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:u("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:u(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:u("Ctrl-L","Command-L"),exec:function(a,l){typeof l=="number"&&!isNaN(l)&&a.gotoLine(l),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:u("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:u("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:u("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:u("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:u("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:u("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:u("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:u("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:u("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:u("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:u("Ctrl-F","Command-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:u("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:u("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:u("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:u("Up","Up|Ctrl-P"),exec:function(a,l){a.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:u("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:u("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:u("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:u("Down","Down|Ctrl-N"),exec:function(a,l){a.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:u("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:u("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:u("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:u("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:u("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:u("Left","Left|Ctrl-B"),exec:function(a,l){a.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:u("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:u("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:u("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:u("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:u("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:u("Right","Right|Ctrl-F"),exec:function(a,l){a.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:u(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:u("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:u(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:u("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:u("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:u("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:u("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:u("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:u("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:u("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:u(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var l=a.$copyWithEmptySelection&&a.selection.isEmpty(),c=l?a.selection.getLineRange():a.selection.getRange();a._emit("cut",c),c.isEmpty()||a.session.remove(c),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,l){a.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:u("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:u("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:u("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:u("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:u("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:u("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:u("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:u("Ctrl-H","Command-Option-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:u("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:u("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:u("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:u("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:u("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:u("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:u("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:u("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:u("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:u("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:u("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:u("Ctrl-Shift-Backspace",null),exec:function(a){var l=a.selection.getRange();l.start.column=0,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:u("Ctrl-Shift-Delete",null),exec:function(a){var l=a.selection.getRange();l.end.column=Number.MAX_VALUE,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:u("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:u("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:u("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:u("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:u("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:u("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,l){a.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,l){a.insert(f.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:u(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:u("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:u("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:u("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:u(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:u("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var l=a.selection.getRange();l.start.column=l.end.column=0,l.end.row++,a.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:u("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:u(null,null),exec:function(a){for(var l=a.selection.isBackwards(),c=l?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),h=l?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),o=a.session.doc.getLine(c.row).length,s=a.session.doc.getTextRange(a.selection.getRange()),p=s.replace(/\n\s*/," ").length,b=a.session.doc.getLine(c.row),x=c.row+1;x<=h.row+1;x++){var M=f.stringTrimLeft(f.stringTrimRight(a.session.doc.getLine(x)));M.length!==0&&(M=" "+M),b+=M}h.row+1<a.session.doc.getLength()-1&&(b+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new w(c.row,0,h.row+2,0),b),p>0?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+p)):(o=a.session.doc.getLine(c.row).length>o?o+1:o,a.selection.moveCursorTo(c.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:u(null,null),exec:function(a){var l=a.session.doc.getLength()-1,c=a.session.doc.getLine(l).length,h=a.selection.rangeList.ranges,o=[];h.length<1&&(h=[a.selection.getRange()]);for(var s=0;s<h.length;s++)s==h.length-1&&(h[s].end.row===l&&h[s].end.column===c||o.push(new w(h[s].end.row,h[s].end.column,l,c))),s===0?h[s].start.row===0&&h[s].start.column===0||o.push(new w(0,0,h[s].start.row,h[s].start.column)):o.push(new w(h[s-1].end.row,h[s-1].end.column,h[s].start.row,h[s].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var s=0;s<o.length;s++)a.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var l=a.getCursorPosition();a.selection.moveTo(l.row-1,Number.MAX_VALUE),a.insert(`
213
+ `),l.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:u("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:u(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)r.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,m){var f=e("../lib/keys"),g=(function(){function u(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return u.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))},u.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))},u.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===f.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=f.enter)return;d.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(l),h=this.$findNearestAnnotation(l);if(!(c===null&&h===null)){var o=this.$findClosestNumber(c,h,l);if(o===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=h,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new w(d,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===f.tab){d.preventDefault();return}if(d.keyCode===f.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===f.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===f.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===f.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===f.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===f.enter||d.keyCode===f.space){switch(d.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),l=this.editor.session.$gutterCustomWidgets[a];if(l)l.callbacks&&l.callbacks.onClick&&l.callbacks.onClick(d,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),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}},u.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()},u.prototype.$isFoldWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getFoldWidget(d).style.display!=="none";return a&&l},u.prototype.$isCustomWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=!!this.$getCustomWidget(d);return a&&l},u.prototype.$isAnnotationVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getAnnotation(d).style.display!=="none";return a&&l},u.prototype.$getFoldWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[1]},u.prototype.$getCustomWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[3]},u.prototype.$getAnnotation=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[2]},u.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isCustomWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+a))return d+a;if(d-a>=0&&this.$isFoldWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+a))return d+a}return null},u.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isAnnotationVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+a))return d+a}return null},u.prototype.$focusFoldWidget=function(d){if(d!=null){var a=this.$getFoldWidget(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},u.prototype.$focusCustomWidget=function(d){if(d!=null){var a=this.$getCustomWidget(d);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},u.prototype.$focusAnnotation=function(d){if(d!=null){var a=this.$getAnnotation(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},u.prototype.$blurFoldWidget=function(d){var a=this.$getFoldWidget(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},u.prototype.$blurCustomWidget=function(d){var a=this.$getCustomWidget(d);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},u.prototype.$blurAnnotation=function(d){var a=this.$getAnnotation(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$findClosestNumber=function(d,a,l){return d===null?a:a===null||Math.abs(l-d)<=Math.abs(l-a)?d:a},u.prototype.$switchLane=function(d){switch(d){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(l===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$isCustomWidgetVisible(l)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},u.prototype.$rowIndexToRow=function(d){var a=this.lines.get(d);return a?a.row:null},u.prototype.$rowToRowIndex=function(d){for(var a=0;a<this.lines.getLength();a++){var l=this.lines.get(a);if(l.row==d)return a}return null},u})();r.GutterKeyboardHandler=g;var w=(function(){function u(d,a){this.gutterKeyboardHandler=a,this.domEvent=d}return u.prototype.getKey=function(){return f.keyCodeToString(this.domEvent.keyCode)},u.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},u.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},u.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},u})();r.GutterKeyboardEvent=w}),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,m){var f=this&&this.__values||function($){var _=typeof Symbol=="function"&&Symbol.iterator,N=_&&$[_],W=0;if(N)return N.call($);if($&&typeof $.length=="number")return{next:function(){return $&&W>=$.length&&($=void 0),{value:$&&$[W++],done:!$}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},g=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/lang"),d=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,s=e("./search").Search,p=e("./range").Range,b=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,M=e("./commands/default_commands").commands,R=e("./config"),A=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,O=e("./config").nls,D=e("./clipboard"),I=e("./lib/keys"),T=e("./lib/event"),B=e("./tooltip").HoverTooltip,F=(function(){function $(_,N,W){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=_.getContainerElement();this.container=U,this.renderer=_,this.commands=new x(d.isMac?"mac":"win",M),typeof document=="object"&&(this.textInput=new a(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new h(this),this.$search=new s().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=u.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,J){J._$emitInputEvent.schedule(31)}),this.setSession(N||W&&W.session||new o("")),R.resetOptions(this),W&&this.setOptions(W),R._signal("editor",this)}return $.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},$.prototype.startOperation=function(_){this.session.startOperation(_)},$.prototype.endOperation=function(_){this.session.endOperation(_)},$.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},$.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,W=N&&N.scrollIntoView;if(W){switch(W){case"center-animate":W="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),G=this.renderer.layerConfig;(U.start.row>=G.lastRow||U.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}W=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},$.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var N=this.prevOp,W=this.$mergeableCommands,U=N.command&&_.command.name==N.command.name;if(_.command.name=="insertstring"){var G=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&W.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:W.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(_,N){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var W=this;R.loadModule(["keybinding",_],function(U){W.$keybindingId==_&&W.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),N&&N()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var W=this.session.getSelection();W.off("changeCursor",this.$onCursorChange),W.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(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:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),_&&_._signal("changeEditor",{editor:this}),_&&(_.$editor=this),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(_,N){return this.session.doc.setValue(_),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),_},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(_){this.renderer.onResize(_)},$.prototype.setTheme=function(_,N){this.renderer.setTheme(_,N)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(_,N){this.renderer.setStyle(_,N)},$.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(_){this.setOption("fontSize",_)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var N=_.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(se){N.removeMarker(se)}),N.$bracketHighlight=null);var W=_.getCursorPosition(),U=_.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(_),J=N.getMatchingBracketRanges(W,G);if(!J){var te=new A(N,W.row,W.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ee=N.getMatchingTags(W);ee&&(J=[ee.openTagName.isEmpty()?ee.openTag:ee.openTagName,ee.closeTagName.isEmpty()?ee.closeTag:ee.closeTagName])}}if(!J&&N.$mode.getMatching&&(J=N.$mode.getMatching(_.session)),!J){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(J)?J.length==1&&(le="ace_error_bracket"):J=[J],J.length==2&&(p.comparePoints(J[0].end,J[1].start)==0?J=[p.fromPoints(J[0].start,J[1].end)]:p.comparePoints(J[0].start,J[1].end)==0&&(J=[p.fromPoints(J[1].start,J[0].end)])),N.$bracketHighlight={ranges:J,markerIds:J.map(function(se){return N.addMarker(se,le,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},$.prototype.focus=function(){this.textInput.focus()},$.prototype.isFocused=function(){return this.textInput.isFocused()},$.prototype.blur=function(){this.textInput.blur()},$.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},$.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(_){var N=this.session.$useWrapMode,W=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,W,N),this._signal("change",_),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(_){var N=_.data;this.renderer.updateLines(N.first,N.last)},$.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},$.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},$.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},$.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),_.$highlightLineMarker&&!N)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&N){var W=new p(N.row,N.column,N.row,1/0);W.id=_.addMarker(W,"ace_active-line","screenLine"),_.$highlightLineMarker=W}else N&&(_.$highlightLineMarker.start.row=N.row,_.$highlightLineMarker.end.row=N.row,_.$highlightLineMarker.start.column=N.column,_._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(_){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var W=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(W,"ace_selection",U)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var W=N.start.column,U=N.end.column,G=_.getLine(N.start.row),J=G.substring(W,U);if(!(J.length>5e3||!/[\w\d]/.test(J))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:J}),he=G.substring(W-1,U+1);if(te.test(he))return te}}},$.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},$.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},$.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},$.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},$.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},$.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},$.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},$.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},$.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},$.prototype.getCopyText=function(){var _=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),W=!1;if(!_&&this.$copyWithEmptySelection){W=!0;for(var U=this.selection.getAllRanges(),G=0;G<U.length;G++){var J=U[G];G&&U[G-1].start.row==J.start.row||(_+=this.session.getLine(J.start.row)+N)}}var te={text:_};return this._signal("copy",te),D.lineMode=W?te.text:!1,te.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(_,N){var W={text:_,event:N};this.commands.exec("paste",this,W)},$.prototype.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var N=_.text,W=N===D.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(W)this.selection.rangeList.ranges.forEach(function(le){U.insert({row:le.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),J=this.selection.rangeList.ranges,te=G.length==2&&(!G[0]||!G[1]);if(G.length!=J.length||te)return this.commands.exec("insertstring",this,N);for(var he=J.length;he--;){var ee=J[he];ee.isEmpty()||U.remove(ee),U.insert(ee.start,G[he])}}},$.prototype.execCommand=function(_,N){return this.commands.exec(_,this,N)},$.prototype.insert=function(_,N){var W=this.session,U=W.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var J=U.transformAction(W.getState(G.row),"insertion",this,W,_);J&&(_!==J.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),_=J.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
214
+ `)==-1){var te=p.fromPoints(G,G);te.end.column+=_.length,this.session.remove(te)}}else{var te=this.getSelectionRange();G=this.session.remove(te),this.clearSelection()}if(_==`
215
+ `||_==`\r
216
+ `){var se=W.getLine(G.row);if(G.column>se.search(/\S|$/)){var he=se.substr(G.column).search(/\S|$/);W.doc.removeInLine(G.row,G.column,G.column+he)}}this.clearSelection();var ee=G.column,le=W.getState(G.row),se=W.getLine(G.row),ce=U.checkOutdent(le,se,_);if(W.insert(G,_),J&&J.selection&&(J.selection.length==2?this.selection.setSelectionRange(new p(G.row,ee+J.selection[0],G.row,ee+J.selection[1])):this.selection.setSelectionRange(new p(G.row+J.selection[0],J.selection[1],G.row+J.selection[2],J.selection[3]))),this.$enableAutoIndent){if(W.getDocument().isNewLine(_)){var pe=U.getNextLineIndent(le,se.slice(0,G.column),W.getTabString());W.insert({row:G.row+1,column:0},pe)}ce&&U.autoOutdent(le,W,G.row)}},$.prototype.autoIndent=function(){for(var _=this.session,N=_.getMode(),W=this.selection.isEmpty()?[new p(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",J="",te=_.getTabString(),he=0;he<W.length;he++)for(var ee=W[he].start.row,le=W[he].end.row,se=ee;se<=le;se++){se>0&&(U=_.getState(se-1),G=_.getLine(se-1),J=N.getNextLineIndent(U,G,te));var ce=_.getLine(se),pe=N.$getIndent(ce);if(J!==pe){if(pe.length>0){var ve=new p(se,0,se,pe.length);_.remove(ve)}J.length>0&&_.insert({row:se,column:0},J)}N.autoOutdent(U,_,se)}},$.prototype.onTextInput=function(_,N){if(!N)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var W=this.applyComposition.bind(this,_,N);this.selection.rangeCount?this.forEachSelection(W):W(),this.endOperation()},$.prototype.applyComposition=function(_,N){if(N.extendLeft||N.extendRight){var W=this.selection.getRange();W.start.column-=N.extendLeft,W.end.column+=N.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),!_&&!W.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),N.restoreStart||N.restoreEnd){var W=this.selection.getRange();W.start.column-=N.restoreStart,W.end.column-=N.restoreEnd,this.selection.setRange(W)}},$.prototype.onCommandKey=function(_,N,W){return this.keyBinding.onCommandKey(_,N,W)},$.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var W=this.session,U=W.getState(N.start.row),G=W.getMode().transformAction(U,"deletion",this,W,N);if(N.end.column===0){var J=W.getTextRange(N);if(J[J.length-1]==`
217
+ `){var te=W.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}G&&(N=G)}this.session.remove(N),this.clearSelection()},$.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(_)},$.prototype.setGhostText=function(_,N){this.renderer.setGhostText(_,N)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),N=_.column;if(N!==0){var W=this.session.getLine(_.row),U,G;N<W.length?(U=W.charAt(N)+W.charAt(N-1),G=new p(_.row,N-1,_.row,N+1)):(U=W.charAt(N-1)+W.charAt(N-2),G=new p(_.row,N-2,_.row,N)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},$.prototype.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toLowerCase()),this.selection.setSelectionRange(_)},$.prototype.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toUpperCase()),this.selection.setSelectionRange(_)},$.prototype.indent=function(){var _=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var W=this.$getSelectedRows();_.indentRows(W.first,W.last," ");return}else if(N.start.column<N.end.column){var U=_.getTextRange(N);if(!/^\s+$/.test(U)){var W=this.$getSelectedRows();_.indentRows(W.first,W.last," ");return}}var G=_.getLine(N.start.row),J=N.start,te=_.getTabSize(),he=_.documentToScreenColumn(J.row,J.column);if(this.session.getUseSoftTabs())var ee=te-he%te,le=u.stringRepeat(" ",ee);else{for(var ee=he%te;G[N.start.column-1]==" "&&ee;)N.start.column--,ee--;this.selection.setSelectionRange(N),le=" "}return this.insert(le)},$.prototype.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},$.prototype.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},$.prototype.sortLines=function(){for(var _=this.$getSelectedRows(),N=this.session,W=[],U=_.first;U<=_.last;U++)W.push(N.getLine(U));W.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var G=new p(0,0,0,0),U=_.first;U<=_.last;U++){var J=N.getLine(U);G.start.row=U,G.end.row=U,G.end.column=J.length,N.replace(G,W[U-_.first])}},$.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,N.first,N.last)},$.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),N=this.session.getState(_.row),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,W,_)},$.prototype.getNumberAt=function(_,N){var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g;W.lastIndex=0;for(var U=this.session.getLine(_);W.lastIndex<N;){var G=W.exec(U);if(G.index<=N&&G.index+G[0].length>=N){var J={value:G[0],start:G.index,end:G.index+G[0].length};return J}}return null},$.prototype.modifyNumber=function(_){var N=this.selection.getCursor().row,W=this.selection.getCursor().column,U=new p(N,W-1,N,W),G=this.session.getTextRange(U);if(!isNaN(parseFloat(G))&&isFinite(G)){var J=this.getNumberAt(N,W);if(J){var te=J.value.indexOf(".")>=0?J.start+J.value.indexOf(".")+1:J.end,he=J.start+J.value.length-te,ee=parseFloat(J.value);ee*=Math.pow(10,he),te!==J.end&&W<te?_*=Math.pow(10,J.end-W-1):_*=Math.pow(10,J.end-W),ee+=_,ee/=Math.pow(10,he);var le=ee.toFixed(he),se=new p(N,J.start,N,J.end);this.session.replace(se,le),this.moveCursorTo(N,Math.max(J.start+1,W+le.length-J.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var _=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var W=this.getSelectedText(),U=this.selection.getWordRange().start.column,G=W.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),J=N-U-1;J<0&&(J=0);var te=0,he=0,ee=this;W.match(/[A-Za-z0-9_]+/)&&G.forEach(function(He,tt){he=te+He.length,J>=te&&J<=he&&(W=He,ee.selection.clearSelection(),ee.moveCursorTo(_,te+U),ee.selection.selectTo(_,he+U)),te=he});for(var le=this.$toggleWordPairs,se,ce=0;ce<le.length;ce++)for(var pe=le[ce],ve=0;ve<=1;ve++){var $e=+!ve,Ee=W.match(new RegExp("^\\s?_?("+u.escapeRegExp(pe[ve])+")\\s?$","i"));if(Ee){var qe=W.match(new RegExp("([_]|^|\\s)("+u.escapeRegExp(Ee[1])+")($|\\s)","g"));qe&&(se=W.replace(new RegExp(u.escapeRegExp(pe[ve]),"i"),function(He){var tt=pe[$e];return He.toUpperCase()==He?tt=tt.toUpperCase():He.charAt(0).toUpperCase()==He.charAt(0)&&(tt=tt.substr(0,0)+pe[$e].charAt(0).toUpperCase()+tt.substr(1)),tt}),this.insert(se),se="")}}},$.prototype.findLinkAt=function(_,N){var W,U,G=this.session.getLine(_),J=G.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ee=0,le;try{for(var se=f(J),ce=se.next();!ce.done;ce=se.next()){var pe=ce.value;if(ee=he+pe.length,te>=he&&te<=ee&&pe.match(/((?:https?|ftp):\/\/[\S]+)/)){le=pe.replace(/[\s:.,'";}\]]+$/,"");break}he=ee}}catch(ve){W={error:ve}}finally{try{ce&&!ce.done&&(U=se.return)&&U.call(se)}finally{if(W)throw W.error}}return le},$.prototype.openLink=function(){var _=this.selection.getCursor(),N=this.findLinkAt(_.row,_.column);return N&&window.open(N,"_blank"),N!=null},$.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var _=this.selection,N=this.session,W=_.getRange(),U=_.isBackwards();if(W.isEmpty()){var G=W.start.row;N.duplicateLines(G,G)}else{var J=U?W.start:W.end,te=N.insert(J,N.getTextRange(W));W.start=J,W.end=te,_.setSelectionRange(W,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(_,N,W){return this.session.moveText(_,N,W)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(_,N){var W,U,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var J=G.toOrientedRange();W=this.$getSelectedRows(J),U=this.session.$moveLines(W.first,W.last,N?0:_),N&&_==-1&&(U=0),J.moveBy(U,0),G.fromOrientedRange(J)}else{var te=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ee=0,le=te.length,se=0;se<le;se++){var ce=se;te[se].moveBy(he,0),W=this.$getSelectedRows(te[se]);for(var pe=W.first,ve=W.last;++se<le;){ee&&te[se].moveBy(ee,0);var $e=this.$getSelectedRows(te[se]);if(N&&$e.first!=ve||!N&&$e.first>ve+1)break;ve=$e.last}for(se--,he=this.session.$moveLines(pe,ve,N?0:_),N&&_==-1&&(ce=se+1);ce<=se;)te[ce].moveBy(he,0),ce++;N||(he=0),ee+=he}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},$.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},$.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(_,N){var W=this.renderer,U=this.renderer.layerConfig,G=_*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var J=W.scrollTop;W.scrollBy(0,G*U.lineHeight),N!=null&&W.scrollCursorIntoView(null,.5),W.animateScrolling(J)},$.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},$.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},$.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},$.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},$.prototype.scrollPageDown=function(){this.$moveByPage(1)},$.prototype.scrollPageUp=function(){this.$moveByPage(-1)},$.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},$.prototype.scrollToLine=function(_,N,W,U){this.renderer.scrollToLine(_,N,W,U)},$.prototype.centerSelection=function(){var _=this.getSelectionRange(),N={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(N,.5)},$.prototype.getCursorPosition=function(){return this.selection.getCursor()},$.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},$.prototype.getSelectionRange=function(){return this.selection.getRange()},$.prototype.selectAll=function(){this.selection.selectAll()},$.prototype.clearSelection=function(){this.selection.clearSelection()},$.prototype.moveCursorTo=function(_,N){this.selection.moveCursorTo(_,N)},$.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},$.prototype.jumpToMatching=function(_,N){var W=this.getCursorPosition(),U=new A(this.session,W.row,W.column),G=U.getCurrentToken(),J=0;G&&G.type.indexOf("tag-name")!==-1&&(G=U.stepBackward());var te=G||U.stepForward();if(te){var he,ee=!1,le={},se=W.column-te.start,ce,pe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;se<te.value.length&&!ee;se++)if(pe[te.value[se]])switch(ce=pe[te.value[se]]+"."+te.type.replace("rparen","lparen"),isNaN(le[ce])&&(le[ce]=0),te.value[se]){case"(":case"[":case"{":le[ce]++;break;case")":case"]":case"}":le[ce]--,le[ce]===-1&&(he="bracket",ee=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(le[te.value])&&(le[te.value]=0),G.value==="<"&&J>1?le[te.value]++:G.value==="</"&&le[te.value]--,le[te.value]===-1&&(he="tag",ee=!0));ee||(G=te,J++,te=U.stepForward(),se=0)}while(te&&!ee);if(he){var ve,$e;if(he==="bracket")ve=this.session.getBracketRange(W),ve||(ve=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1),$e=ve.start,(N||$e.row===W.row&&Math.abs($e.column-W.column)<2)&&(ve=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(ve=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),ve.compare(W.row,W.column)===0){var Ee=this.session.getMatchingTags(W);Ee&&(Ee.openTag.contains(W.row,W.column)?(ve=Ee.closeTag,$e=ve.start):(ve=Ee.openTag,Ee.closeTag.start.row===W.row&&Ee.closeTag.start.column===W.column?$e=ve.end:$e=ve.start))}$e=$e||ve.start}$e=ve&&ve.cursor||$e,$e&&(_?ve&&N?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))}}},$.prototype.gotoLine=function(_,N,W){this.selection.clearSelection(),this.session.unfold({row:_-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,N||0),this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,W)},$.prototype.navigateTo=function(_,N){this.selection.moveTo(_,N)},$.prototype.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},$.prototype.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},$.prototype.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},$.prototype.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},$.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},$.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},$.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},$.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},$.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},$.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},$.prototype.replace=function(_,N){N&&this.$search.set(N);var W=this.$search.find(this.session),U=0;return W&&(this.$tryReplace(W,_)&&(U=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),U},$.prototype.replaceAll=function(_,N){N&&this.$search.set(N);var W=this.$search.findAll(this.session),U=0;if(!W.length)return U;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var J=W.length-1;J>=0;--J)this.$tryReplace(W[J],_)&&U++;return this.selection.setSelectionRange(G),U},$.prototype.$tryReplace=function(_,N){var W=this.session.getTextRange(_);return N=this.$search.replace(W,N),N!==null?(_.end=this.session.replace(_,N),_):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(_,N,W){N||(N={}),typeof _=="string"||_ instanceof RegExp?N.needle=_:typeof _=="object"&&g.mixin(N,_);var U=this.selection.getRange();N.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(N),N.start||this.$search.set({start:U});var G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,W),G;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(_,N){this.find({skipCurrent:!0,backwards:!1},_,N)},$.prototype.findPrevious=function(_,N){this.find(_,{skipCurrent:!0,backwards:!0},N)},$.prototype.revealRange=function(_,N){this.session.unfold(_),this.selection.setSelectionRange(_);var W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),N!==!1&&this.renderer.animateScrolling(W)},$.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},$.prototype.setAutoScrollEditorIntoView=function(_){if(_){var N,W=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var J=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(N=W.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&N&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())){var ee=W.renderer,le=ee.$cursorLayer.$pixelPos,se=ee.layerConfig,ce=le.top-se.offset;le.top>=0&&ce+N.top<0?U=!0:le.top<se.height&&le.top+N.top+se.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(G.style.top=ce+"px",G.style.left=le.left+"px",G.style.height=se.lineHeight+"px",G.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(ee){ee||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",J),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},$.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(_)),N.isBlinking=!this.$readOnly&&_!="wide",w.setCssClass(N.element,"ace_slim-cursors",/slim/.test(_)))},$.prototype.prompt=function(_,N,W){var U=this;R.loadModule("ace/ext/prompt",function(G){G.prompt(U,_,N,W)})},Object.defineProperty($.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new B(this.container))},set:function(_){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=_},enumerable:!1,configurable:!0}),$})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],g.implement(F.prototype,b),R.defineOptions(F.prototype,"editor",{selectionStyle:{set:function($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var _=this;if(this.textInput.setReadOnly($),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(W){var U=!1;if(W&&W.type=="keydown"){if(W&&W.key&&!W.ctrlKey&&!W.metaKey&&(W.key==" "&&W.preventDefault(),U=W.key.length==1),!U)return}else W&&W.type!=="exec"&&(U=!0);if(U){var G=w.createElement("div");G.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),_.hoverTooltip.isOpen||_.hoverTooltip.showForRange(_,_.getSelectionRange(),G)}else _.hoverTooltip&&_.hoverTooltip.isOpen&&_.hoverTooltip.hide()});var N=this.textInput.getElement();$?(T.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(T.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?L.attach(this):L.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?L.attach(this):L.detach(this)}},placeholder:{set:function($){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),w.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),w.addCssClass(this.container,"ace_hasPlaceholder");var N=w.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,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($){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},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===I.enter){U.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},W;$?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.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",N.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),W||(W=new C(this)),W.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",N.bind(this)),this.commands.removeCommand(_),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),W&&W.removeListener())},initialValue:!1},textInputAriaLabel:{set:function($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var L={getText:function($,_){return(Math.abs($.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function($,_,N){return Math.max(_.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function($,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,m){var f=e("../lib/dom"),g=(function(){function w(u,d){this.element=u,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(u){f.translate(this.element,0,-(u.firstRowScreen*u.lineHeight%this.canvasHeight)-u.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(u,d){return Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(u,d,a){var l=d.firstRowScreen*d.lineHeight,c=Math.floor(l/this.canvasHeight),h=a.documentToScreenRow(u,0)*d.lineHeight;return h-c*this.canvasHeight},w.prototype.computeLineHeight=function(u,d,a){return d.lineHeight*a.getRowLineCount(u)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(u){return this.cells[u]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(u){if(Array.isArray(u)){this.cells.push.apply(this.cells,u);for(var d=f.createFragment(this.element),a=0;a<u.length;a++)d.appendChild(u[a].element);this.element.appendChild(d)}else this.cells.push(u),this.element.appendChild(u.element)},w.prototype.unshift=function(u){if(Array.isArray(u)){this.cells.unshift.apply(this.cells,u);for(var d=f.createFragment(this.element),a=0;a<u.length;a++)d.appendChild(u[a].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(u),this.element.insertAdjacentElement("afterbegin",u.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(u){u&&(u.element.remove(),this.cellCache.push(u))},w.prototype.createCell=function(u,d,a,l){var c=this.cellCache.pop();if(!c){var h=f.createElement("div");l&&l(h),this.element.appendChild(h),c={element:h,text:"",row:u}}return c.row=u,c},w})();r.Lines=g}),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,m){var f=e("../lib/dom"),g=e("../lib/oop"),w=e("../lib/lang"),u=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,a=e("../config").nls,l=(function(){function h(o){this.$showCursorMarker=null,this.element=f.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 d(this.element),this.$lines.$offsetCoefficient=1}return h.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},h.prototype.addGutterDecoration=function(o,s){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,s)},h.prototype.removeGutterDecoration=function(o,s){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,s)},h.prototype.setAnnotations=function(o){this.$annotations=[];for(var s=0;s<o.length;s++){var p=o[s],b=p.row,x=this.$annotations[b];x||(x=this.$annotations[b]={text:[],type:[],displayText:[]});var M=p.text,R=p.text,A=p.type;M=M?w.escapeHTML(M):p.html||"",R=R||p.html||"",x.text.indexOf(M)===-1&&(x.text.push(M),x.type.push(A),x.displayText.push(R));var C=p.className;C?x.className=C:A==="error"?x.className=" ace_error":A==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":A==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":A==="info"&&!x.className?x.className=" ace_info":A==="hint"&&!x.className&&(x.className=" ace_hint")}},h.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var s=o.start.row,p=o.end.row-s;if(p!==0)if(o.action=="remove")this.$annotations.splice(s,p+1,null);else{var b=new Array(p+1);b.unshift(s,1),this.$annotations.splice.apply(this.$annotations,b)}}},h.prototype.update=function(o){this.config=o;var s=this.session,p=o.firstRow,b=Math.min(o.lastRow+o.gutterOffset,s.getLength()-1);this.oldLastRow=b,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=s.getNextFoldLine(p),M=x?x.start.row:1/0,R=null,A=-1,C=p;;){if(C>M&&(C=x.end.row+1,x=s.getNextFoldLine(C,x),M=x?x.start.row:1/0),C>b){for(;this.$lines.getLength()>A+1;)this.$lines.pop();break}R=this.$lines.get(++A),R?R.row=C:(R=this.$lines.createCell(C,o,this.session,c),this.$lines.push(R)),this.$renderCell(R,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},h.prototype.$updateGutterWidth=function(o){var s=this.session,p=s.gutterRenderer||this.$renderer,b=s.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||s.$useWrapMode)&&(x=s.getLength()+b-1);var M=p?p.getWidth(s,x,o):x.toString().length*o.characterWidth,R=this.$padding||this.$computePadding();M+=R.left+R.right,M!==this.gutterWidth&&!isNaN(M)&&(this.gutterWidth=M,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",M))},h.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},h.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 s=this.$lines.cells;this.$cursorCell=null;for(var p=0;p<s.length;p++){var b=s[p];if(b.row>=this.$cursorRow){if(b.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(p>0&&x&&x.start.row==s[p-1].row)b=s[p-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},h.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=f.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var s=o.selection.cursor,p=this.config,b=this.$lines,x=p.firstRowScreen*p.lineHeight,M=Math.floor(x/b.canvasHeight),R=o.documentToScreenRow(s)*p.lineHeight,A=R-M*b.canvasHeight;f.setStyle(this.$highlightElement.style,"height",p.lineHeight+"px"),f.setStyle(this.$highlightElement.style,"top",A+"px")}},h.prototype.scrollLines=function(o){var s=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(s,o))return this.update(o);this.$lines.moveContainer(o);var p=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=p,!s||b<o.firstRow)return this.update(o);if(p<s.firstRow)return this.update(o);if(s.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(b>p)for(var x=this.session.getFoldedRowCount(p+1,b);x>0;x--)this.$lines.pop();o.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,s.firstRow-1)),p>b&&this.$lines.push(this.$renderLines(o,b+1,p)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},h.prototype.$renderLines=function(o,s,p){for(var b=[],x=s,M=this.session.getNextFoldLine(x),R=M?M.start.row:1/0;x>R&&(x=M.end.row+1,M=this.session.getNextFoldLine(x,M),R=M?M.start.row:1/0),!(x>p);){var A=this.$lines.createCell(x,o,this.session,c);this.$renderCell(A,o,M,x),b.push(A),x++}return b},h.prototype.$renderCell=function(o,s,p,b){var x=o.element,M=this.session,R=x.childNodes[0],A=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],D=C.firstChild,I=M.$firstLineNumber,T=M.$breakpoints,B=M.$decorations,F=M.gutterRenderer||this.$renderer,L=this.$showFoldWidgets&&M.foldWidgets,$=p?p.start.row:Number.MAX_VALUE,_=s.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",W=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(F?F.getText(M,b):b+I).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||p&&b<this.$cursorRow&&b>=$&&this.$cursorRow<=p.end.row)&&(N+="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)),T[b]&&(N+=T[b]),B[b]&&(N+=B[b]),this.$annotations[b]&&b!==$&&(N+=this.$annotations[b].className),L){var G=L[b];G==null&&(G=L[b]=M.getFoldWidget(b))}if(G){var J="ace_fold-widget ace_"+G,te=G=="start"&&b==$&&b<p.end.row;if(te){J+=" ace_closed";for(var he="",ee=!1,le=b+1;le<=p.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ee=!0,he=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ee=!0,he=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&he!==" ace_security_fold"&&(ee=!0,he=" ace_warning_fold")}N+=he}else J+=" ace_open";A.className!=J&&(A.className=J),f.setStyle(A.style,"height",_),f.setStyle(A.style,"display","inline-block"),A.setAttribute("role","button"),A.setAttribute("tabindex","-1");var se=M.getFoldWidgetRange(b);se?A.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[se.start.row+1,se.end.row+1])):p?A.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[p.start.row+1,p.end.row+1])):A.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),te?(A.setAttribute("aria-expanded","false"),A.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(A.setAttribute("aria-expanded","true"),A.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else A&&(f.setStyle(A.style,"display","none"),A.setAttribute("tabindex","0"),A.removeAttribute("role"),A.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[b];if(ce?this.$addCustomWidget(b,ce,o):O&&this.$removeCustomWidget(b,o),ee&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",D.className=W,D.className+=he,f.setStyle(D.style,"height",_),f.setStyle(C.style,"display","block"),f.setStyle(C.style,"height",_);var pe;switch(he){case" ace_error_fold":pe=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":pe=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":pe=a("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[b]){C.className="ace_gutter_annotation",D.className=W,this.$useSvgGutterIcons?D.className+=this.$annotations[b].className:x.classList.add(this.$annotations[b].className.replace(" ","")),f.setStyle(D.style,"height",_),f.setStyle(C.style,"display","block"),f.setStyle(C.style,"height",_);var pe;switch(this.$annotations[b].className){case" ace_error":pe=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":pe=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":pe=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":pe=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":pe=a("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 f.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==R.data&&(R.data=U),x.className!=N&&(x.className=N),f.setStyle(o.element.style,"height",this.$lines.computeLineHeight(b,s,M)+"px"),f.setStyle(o.element.style,"top",this.$lines.computeLineTop(b,s,M)+"px"),o.text=U,C.style.display==="none"&&A.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},h.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},h.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},h.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},h.prototype.setShowFoldWidgets=function(o){o?f.addCssClass(this.element,"ace_folding-enabled"):f.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},h.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},h.prototype.$hideFoldWidget=function(o,s){var p=s||this.$getGutterCell(o);if(p&&p.element){var b=p.element.childNodes[1];b&&f.setStyle(b.style,"display","none")}},h.prototype.$showFoldWidget=function(o,s){var p=s||this.$getGutterCell(o);if(p&&p.element){var b=p.element.childNodes[1];b&&this.session.foldWidgets&&this.session.foldWidgets[p.row]&&f.setStyle(b.style,"display","inline-block")}},h.prototype.$getGutterCell=function(o){var s=this.$lines.cells,p=0,b=s.length-1;if(!(o<s[0].row||o>s[b].row)){for(;p<=b;){var x=Math.floor((p+b)/2),M=s[x];if(M.row>o)b=x-1;else if(M.row<o)p=x+1;else return M}return M}},h.prototype.$addCustomWidget=function(o,s,p){var b=s.className,x=s.label,M=s.title,R=s.callbacks;this.session.$gutterCustomWidgets[o]={className:b,label:x,title:M,callbacks:R},this.$hideFoldWidget(o,p);var A=p||this.$getGutterCell(o);if(A&&A.element){var C=A.element.querySelector(".ace_custom-widget");C&&C.remove(),C=f.createElement("span"),C.className="ace_custom-widget ".concat(b),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",M),f.setStyle(C.style,"display","inline-block"),f.setStyle(C.style,"height","inherit"),R&&R.onClick&&C.addEventListener("click",function(O){R.onClick(O,o),O.stopPropagation()}),A.element.appendChild(C)}},h.prototype.$removeCustomWidget=function(o,s){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,s);var p=s||this.$getGutterCell(o);if(p&&p.element){var b=p.element.querySelector(".ace_custom-widget");b&&p.element.removeChild(b)}},h.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=f.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},h.prototype.getRegion=function(o){var s=this.$padding||this.$computePadding(),p=this.element.getBoundingClientRect();if(o.x<s.left+p.left)return"markers";if(this.$showFoldWidgets&&o.x>p.right-s.right)return"foldWidgets"},h})();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,g.implement(l.prototype,u);function c(h){var o=document.createTextNode("");h.appendChild(o);var s=f.createElement("span");h.appendChild(s);var p=f.createElement("span");h.appendChild(p);var b=f.createElement("span");return p.appendChild(b),h}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,m){var f=e("../range").Range,g=e("../lib/dom"),w=(function(){function d(a){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setMarkers=function(a){this.markers=a},d.prototype.elt=function(a,l){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=l,c.className=a},d.prototype.update=function(a){if(a){this.config=a,this.i=0;var l;for(var c in this.markers){var h=this.markers[c];if(!h.range){h.update(l,this,this.session,a);continue}var o=h.range.clipRows(a.firstRow,a.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),h.renderer){var s=this.$getTop(o.start.row,a),p=this.$padding+o.start.column*a.characterWidth;h.renderer(l,o,p,s,a)}else h.type=="fullLine"?this.drawFullLineMarker(l,o,h.clazz,a):h.type=="screenLine"?this.drawScreenLineMarker(l,o,h.clazz,a):o.isMultiLine()?h.type=="text"?this.drawTextMarker(l,o,h.clazz,a):this.drawMultiLineMarker(l,o,h.clazz,a):this.drawSingleLineMarker(l,o,h.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(a,l){return(a-l.firstRowScreen)*l.lineHeight},d.prototype.drawTextMarker=function(a,l,c,h,o){for(var s=this.session,p=l.start.row,b=l.end.row,x=p,M=0,R=0,A=s.getScreenLastRowColumn(x),C=new f(x,l.start.column,x,R);x<=b;x++)C.start.row=C.end.row=x,C.start.column=x==p?l.start.column:s.getRowWrapIndent(x),C.end.column=A,M=R,R=A,A=x+1<b?s.getScreenLastRowColumn(x+1):x==b?0:l.end.column,this.drawSingleLineMarker(a,C,c+(x==p?" ace_start":"")+" ace_br"+u(x==p||x==p+1&&l.start.column,M<R,R>A,x==b),h,x==b?0:1,o)},d.prototype.drawMultiLineMarker=function(a,l,c,h,o){var s=this.$padding,p=h.lineHeight,b=this.$getTop(l.start.row,h),x=s+l.start.column*h.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var M=l.clone();M.end.row=M.start.row,M.end.column=this.session.getLine(M.start.row).length,this.drawBidiSingleLineMarker(a,M,c+" ace_br1 ace_start",h,null,o)}else this.elt(c+" ace_br1 ace_start","height:"+p+"px;right:"+s+"px;top:"+b+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var M=l.clone();M.start.row=M.end.row,M.start.column=0,this.drawBidiSingleLineMarker(a,M,c+" ace_br12",h,null,o)}else{b=this.$getTop(l.end.row,h);var R=l.end.column*h.characterWidth;this.elt(c+" ace_br12","height:"+p+"px;width:"+R+"px;top:"+b+"px;left:"+s+"px;"+(o||""))}if(p=(l.end.row-l.start.row-1)*h.lineHeight,!(p<=0)){b=this.$getTop(l.start.row+1,h);var A=(l.start.column?1:0)|(l.end.column?0:8);this.elt(c+(A?" ace_br"+A:""),"height:"+p+"px;right:"+s+"px;top:"+b+"px;left:"+s+"px;"+(o||""))}},d.prototype.drawSingleLineMarker=function(a,l,c,h,o,s){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(a,l,c,h,o,s);var p=h.lineHeight,b=(l.end.column+(o||0)-l.start.column)*h.characterWidth,x=this.$getTop(l.start.row,h),M=this.$padding+l.start.column*h.characterWidth;this.elt(c,"height:"+p+"px;width:"+b+"px;top:"+x+"px;left:"+M+"px;"+(s||""))},d.prototype.drawBidiSingleLineMarker=function(a,l,c,h,o,s){var p=h.lineHeight,b=this.$getTop(l.start.row,h),x=this.$padding,M=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);M.forEach(function(R){this.elt(c,"height:"+p+"px;width:"+(R.width+(o||0))+"px;top:"+b+"px;left:"+(x+R.left)+"px;"+(s||""))},this)},d.prototype.drawFullLineMarker=function(a,l,c,h,o){var s=this.$getTop(l.start.row,h),p=h.lineHeight;l.start.row!=l.end.row&&(p+=this.$getTop(l.end.row,h)-s),this.elt(c,"height:"+p+"px;top:"+s+"px;left:0;right:0;"+(o||""))},d.prototype.drawScreenLineMarker=function(a,l,c,h,o){var s=this.$getTop(l.start.row,h),p=h.lineHeight;this.elt(c,"height:"+p+"px;top:"+s+"px;left:0;right:0;"+(o||""))},d})();w.prototype.$padding=0;function u(d,a,l,c){return(d?1:0)|(a?2:0)|(l?4:0)|(c?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,m){var f=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return f.has(g)}}),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,m){var f=e("../lib/oop"),g=e("../lib/dom"),w=e("../lib/lang"),u=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,l=e("./text_util").isTextToken,c=(function(){function h(o){this.dom=g,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 u(this.element)}return h.prototype.$updateEolChar=function(){var o=this.session.doc,s=o.getNewLineCharacter()==`
219
+ `&&o.getNewLineMode()!="windows",p=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=p)return this.EOL_CHAR=p,!0},h.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},h.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},h.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},h.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(s){this._signal("changeCharacterSize",s)}).bind(this)),this.$pollSizeChanges()},h.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},h.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},h.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},h.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)},h.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},h.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},h.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var s=this.$tabStrings=[0],p=1;p<o+1;p++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=w.stringRepeat(this.TAB_CHAR,p),s.push(b)}else s.push(this.dom.createTextNode(w.stringRepeat(" ",p),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",M=this.showSpaces?" ace_invisible ace_invisible_space":"",R=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),A=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):R,b=this.dom.createElement("span");b.className=x+M,b.textContent=R,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=x+A,b.textContent=C,this.$tabStrings[" "]=b}},h.prototype.updateLines=function(o,s,p){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var b=Math.max(s,o.firstRow),x=Math.min(p,o.lastRow),M=this.element.childNodes,R=0,A=o.firstRow;A<b;A++){var C=this.session.getFoldLine(A);if(C)if(C.containsRow(b)){b=C.start.row;break}else A=C.end.row;R++}for(var O=!1,A=b,C=this.session.getNextFoldLine(A),D=C?C.start.row:1/0;A>D&&(A=C.end.row+1,C=this.session.getNextFoldLine(A,C),D=C?C.start.row:1/0),!(A>x);){var I=M[R++];if(I){this.dom.removeChildren(I),this.$renderLine(I,A,A==D?C:!1),O&&(I.style.top=this.$lines.computeLineTop(A,o,this.session)+"px");var T=o.lineHeight*this.session.getRowLength(A)+"px";I.style.height!=T&&(O=!0,I.style.height=T)}A++}if(O)for(;R<this.$lines.cells.length;){var B=this.$lines.cells[R++];B.element.style.top=this.$lines.computeLineTop(B.row,o,this.session)+"px"}},h.prototype.scrollLines=function(o){var s=this.config;if(this.config=o,this.$lines.pageChanged(s,o))return this.update(o);this.$lines.moveContainer(o);var p=o.lastRow,b=s?s.lastRow:-1;if(!s||b<o.firstRow)return this.update(o);if(p<s.firstRow)return this.update(o);if(!s||s.lastRow<o.firstRow)return this.update(o);if(o.lastRow<s.firstRow)return this.update(o);if(s.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(s.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,s.lastRow);x>0;x--)this.$lines.pop();o.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,s.firstRow-1)),o.lastRow>s.lastRow&&this.$lines.push(this.$renderLinesFragment(o,s.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},h.prototype.$renderLinesFragment=function(o,s,p){for(var b=[],x=s,M=this.session.getNextFoldLine(x),R=M?M.start.row:1/0;x>R&&(x=M.end.row+1,M=this.session.getNextFoldLine(x,M),R=M?M.start.row:1/0),!(x>p);){var A=this.$lines.createCell(x,o,this.session),C=A.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==R?M:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",b.push(A),x++}return b},h.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var s=o.firstRow,p=o.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(o,s,p))},h.prototype.$renderToken=function(o,s,p,b){for(var x=this,M=/(\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,R=this.dom.createFragment(this.element),A,C=0;A=M.exec(b);){var O=A[1],D=A[2],I=A[3],T=A[4],B=A[5];if(!(!x.showSpaces&&D)){var F=C!=A.index?b.slice(C,A.index):"";if(C=A.index+A[0].length,F&&R.appendChild(this.dom.createTextNode(F,this.element)),O){var L=x.session.getScreenTabSize(s+A.index),$=x.$tabStrings[L].cloneNode(!0);$.charCount=1,R.appendChild($),s+=L-1}else if(D)if(x.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=w.stringRepeat(x.SPACE_CHAR,D.length),R.appendChild(_)}else R.appendChild(this.dom.createTextNode(D,this.element));else if(I){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=w.stringRepeat(x.SPACE_CHAR,I.length),R.appendChild(_)}else if(T){s+=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:T,R.appendChild(_)}else if(B){s+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=B,R.appendChild(_)}}}if(R.appendChild(this.dom.createTextNode(C?b.slice(C):b,this.element)),l(p.type))o.appendChild(R);else{var N="ace_"+p.type.replace(/\./g," ace_"),_=this.dom.createElement("span");p.type=="fold"&&(_.style.width=p.value.length*this.config.characterWidth+"px",_.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),_.className=N,_.appendChild(R),o.appendChild(_)}return s+b.length},h.prototype.renderIndentGuide=function(o,s,p){var b=s.search(this.$indentGuideRe);if(b<=0||b>=p)return s;if(s[0]==" "){b-=b%this.tabSize;for(var x=b/this.tabSize,M=0;M<x;M++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(b)}else if(s[0]==" "){for(var M=0;M<b;M++){var R=this.$tabStrings[" "].cloneNode(!0);R.charCount=1,o.appendChild(R)}return this.$highlightIndentGuide(),s.substr(b)}return this.$highlightIndentGuide(),s},h.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 s=this.session.selection.getCursor(),p=/^\s*/.exec(this.session.doc.getLine(s.row))[0].length,b=Math.floor(p/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:s.row};var x=this.session.$bracketHighlight;if(x){for(var M=this.session.$bracketHighlight.ranges,R=0;R<M.length;R++)if(s.row!==M[R].start.row){this.$highlightIndentGuideMarker.end=M[R].start.row+1,s.row>M[R].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[s.row]!==""&&s.column===o[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var R=s.row+1;R<o.length;R++){var A=o[R],C=/^\s*/.exec(A)[0].length;if(A!==""&&(this.$highlightIndentGuideMarker.end=R,C<=p))break}}this.$renderHighlightIndentGuide()}}},h.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),s=0;s<o.length;s++)o[s].classList.remove("ace_indent-guide-active")},h.prototype.$setIndentGuideActive=function(o,s){var p=this.session.doc.getLine(o.row);if(p!==""){var b=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)b=o.element.childNodes[0];else return;var x=b.childNodes;if(x){var M=x[s-1];M&&M.classList&&M.classList.contains("ace_indent-guide")&&M.classList.add("ace_indent-guide-active")}}},h.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var s=this.$highlightIndentGuideMarker.indentLevel;if(s!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var p=0;p<o.length;p++){var b=o[p];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,s)}}else for(var p=o.length-1;p>=0;p--){var b=o[p];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,s)}}}},h.prototype.$createLineElement=function(o){var s=this.dom.createElement("div");return s.className="ace_line",s.style.height=this.config.lineHeight+"px",s},h.prototype.$renderWrappedLine=function(o,s,p){var b=0,x=0,M=p[0],R=0,A=this.$createLineElement();o.appendChild(A);for(var C=0;C<s.length;C++){var O=s[C],D=O.value;if(C==0&&this.displayIndentGuides){if(b=D.length,D=this.renderIndentGuide(A,D,M),!D)continue;b-=D.length}if(b+D.length<M)R=this.$renderToken(A,R,O,D),b+=D.length;else{for(;b+D.length>=M;){R=this.$renderToken(A,R,O,D.substring(0,M-b)),D=D.substring(M-b),b=M,A=this.$createLineElement(),o.appendChild(A);var I=this.dom.createTextNode(w.stringRepeat(" ",p.indent),this.element);I.charCount=0,A.appendChild(I),x++,R=0,M=p[x]||Number.MAX_VALUE}D.length!=0&&(b+=D.length,R=this.$renderToken(A,R,O,D))}}p[p.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(A,R,null,"",!0)},h.prototype.$renderSimpleLine=function(o,s){for(var p=0,b=0;b<s.length;b++){var x=s[b],M=x.value;if(!(b==0&&this.displayIndentGuides&&(M=this.renderIndentGuide(o,M),!M))){if(p+M.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,p,x,M);p=this.$renderToken(o,p,x,M)}}},h.prototype.$renderOverflowMessage=function(o,s,p,b,x){p&&this.$renderToken(o,s,p,b.slice(0,this.MAX_LINE_LENGTH-s));var M=this.dom.createElement("span");M.className="ace_inline_button ace_keyword ace_toggle_wrap",M.textContent=x?"<hide>":"<click to see more...>",o.appendChild(M)},h.prototype.$renderLine=function(o,s,p){if(!p&&p!=!1&&(p=this.session.getFoldLine(s)),p)var b=this.$getFoldLineTokens(s,p);else var b=this.session.getTokens(s);var x=o;if(b.length){var M=this.session.getRowSplitData(s);if(M&&M.length){this.$renderWrappedLine(o,b,M);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,b)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){p&&(s=p.end.row);var R=this.dom.createElement("span");R.className="ace_invisible ace_invisible_eol",R.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(R)}},h.prototype.$getFoldLineTokens=function(o,s){var p=this.session,b=[];function x(R,A,C){for(var O=0,D=0;D+R[O].value.length<A;)if(D+=R[O].value.length,O++,O==R.length)return;if(D!=A){var I=R[O].value.substring(A-D);I.length>C-A&&(I=I.substring(0,C-A)),b.push({type:R[O].type,value:I}),D=A+I.length,O+=1}for(;D<C&&O<R.length;){var I=R[O].value;I.length+D>C?b.push({type:R[O].type,value:I.substring(0,C-D)}):b.push(R[O]),D+=I.length,O+=1}}var M=p.getTokens(o);return s.walk(function(R,A,C,O,D){R!=null?b.push({type:"fold",value:R}):(D&&(M=p.getTokens(A)),M.length&&x(M,O,C))},s.end.row,this.session.getLine(s.end.row).length),b},h.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},h})();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,f.implement(c.prototype,d),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,m){var f=e("../lib/dom"),g=(function(){function w(u){this.element=f.createElement("div"),this.element.className="ace_layer ace_cursor-layer",u.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),f.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(u){for(var d=this.cursors,a=d.length;a--;)f.setStyle(d[a].style,"opacity",u?"":"0")},w.prototype.$startCssAnimation=function(){for(var u=this.cursors,d=u.length;d--;)u[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&f.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,f.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(u){this.$padding=u},w.prototype.setSession=function(u){this.session=u},w.prototype.setBlinking=function(u){u!=this.isBlinking&&(this.isBlinking=u,this.restartTimer())},w.prototype.setBlinkInterval=function(u){u!=this.blinkInterval&&(this.blinkInterval=u,this.restartTimer())},w.prototype.setSmoothBlinking=function(u){u!=this.smoothBlinking&&(this.smoothBlinking=u,f.setCssClass(this.element,"ace_smooth-blinking",u),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var u=f.createElement("div");return u.className="ace_cursor",this.element.appendChild(u),this.cursors.push(u),u},w.prototype.removeCursor=function(){if(this.cursors.length>1){var u=this.cursors.pop();return u.parentNode.removeChild(u),u}},w.prototype.hideCursor=function(){this.isVisible=!1,f.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,f.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var u=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,f.removeCssClass(this.element,"ace_smooth-blinking")),u(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&f.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),f.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){u(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){u(!0),d()},this.blinkInterval),d()}},w.prototype.getPixelPosition=function(u,d){if(!this.config||!this.session)return{left:0,top:0};u||(u=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(u),l=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,u.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),c=(a.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:c}},w.prototype.isCursorInView=function(u,d){return u.top>=0&&u.top<d.maxHeight},w.prototype.update=function(u){this.config=u;var d=this.session.$selectionMarkers,a=0,l=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var a=0,c=d.length;a<c;a++){var h=this.getPixelPosition(d[a].cursor,!0);if(!((h.top>u.height+u.offset||h.top<0)&&a>1)){var o=this.cursors[l++]||this.addCursor(),s=o.style;this.drawCursor?this.drawCursor(o,h,u,d[a],this.session):this.isCursorInView(h,u)?(f.setStyle(s,"display","block"),f.translate(o,h.left,h.top),f.setStyle(s,"width",Math.round(u.characterWidth)+"px"),f.setStyle(s,"height",u.lineHeight+"px")):f.setStyle(s,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var p=this.session.getOverwrite();this.$setOverwrite(p),this.$pixelPos=h,this.restartTimer()},w.prototype.$setOverwrite=function(u){u!=this.overwrite&&(this.overwrite=u,u?f.addCssClass(this.element,"ace_overwrite-cursors"):f.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var f=this&&this.__extends||(function(){var o=function(s,p){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&(b[M]=x[M])},o(s,p)};return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");o(s,p);function b(){this.constructor=s}s.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}})(),g=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter,a=32768,l=(function(){function o(s,p){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+p,this.element.tabIndex=-1,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addListener(this.element,"scroll",this.onScroll.bind(this)),u.addListener(this.element,"mousedown",u.preventDefault)}return o.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},o})();g.implement(l.prototype,d);var c=(function(o){f(s,o);function s(p,b){var x=o.call(this,p,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,b.$scrollbarWidth=x.width=w.scrollbarWidth(p.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return s.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var p=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-p)/(this.coeff-p)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(p){this.element.style.height=p+"px"},s.prototype.setScrollHeight=function(p){this.scrollHeight=p,p>a?(this.coeff=a/p,p=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=p+"px"},s.prototype.setScrollTop=function(p){this.scrollTop!=p&&(this.skipEvent=!0,this.scrollTop=p,this.element.scrollTop=p*this.coeff)},s})(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var h=(function(o){f(s,o);function s(p,b){var x=o.call(this,p,"-h")||this;return x.scrollLeft=0,x.height=b.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return s.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.setWidth=function(p){this.element.style.width=p+"px"},s.prototype.setInnerWidth=function(p){this.inner.style.width=p+"px"},s.prototype.setScrollWidth=function(p){this.inner.style.width=p+"px"},s.prototype.setScrollLeft=function(p){this.scrollLeft!=p&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=p)},s})(l);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=h,r.VScrollBar=c,r.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var f=this&&this.__extends||(function(){var h=function(o,s){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,b){p.__proto__=b}||function(p,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(p[x]=b[x])},h(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");h(o,s);function p(){this.constructor=o}o.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}})(),g=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter;w.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 a=(function(){function h(o,s){this.element=w.createElement("div"),this.element.className="ace_sb"+s,this.inner=w.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,u.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return h.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},h})();g.implement(a.prototype,d);var l=(function(h){f(o,h);function o(s,p){var b=h.call(this,s,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=s,b.width=b.VScrollWidth,b.renderer=p,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return o.prototype.onMouseDown=function(s,p){if(s==="mousedown"&&!(u.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var b=this,x=p.clientY,M=function(T){x=T.clientY},R=function(){clearInterval(D)},A=p.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var T=b.scrollTopFromThumbTop(C+x-A);T!==b.scrollTop&&b._emit("scroll",{data:T})}};u.capture(this.inner,M,R);var D=setInterval(O,20);return u.preventDefault(p)}var I=p.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),u.preventDefault(p)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(s){var p=s*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return p=p>>0,p<0?p=0:p>this.pageHeight-this.viewHeight&&(p=this.pageHeight-this.viewHeight),p},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(s){this.height=Math.max(0,s),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(s,p){this.pageHeight===s&&!p||(this.pageHeight=s,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(s){this.scrollTop=s,s<0&&(s=0),this.thumbTop=s*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var c=(function(h){f(o,h);function o(s,p){var b=h.call(this,s,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=p,b}return o.prototype.onMouseDown=function(s,p){if(s==="mousedown"&&!(u.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var b=this,x=p.clientX,M=function(T){x=T.clientX},R=function(){clearInterval(D)},A=p.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var T=b.scrollLeftFromThumbLeft(C+x-A);T!==b.scrollLeft&&b._emit("scroll",{data:T})}};u.capture(this.inner,M,R);var D=setInterval(O,20);return u.preventDefault(p)}var I=p.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),u.preventDefault(p)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(s){var p=s*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return p=p>>0,p<0?p=0:p>this.pageWidth-this.viewWidth&&(p=this.pageWidth-this.viewWidth),p},o.prototype.setWidth=function(s){this.width=Math.max(0,s),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(s,p){this.pageWidth===s&&!p||(this.pageWidth=s,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(s){this.scrollLeft=s,s<0&&(s=0),this.thumbLeft=s*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(a);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=c,r.VScrollBar=l,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,m){var f=e("./lib/event"),g=(function(){function w(u,d){this.onRender=u,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var a=this;this._flush=function(l){a.pending=!1;var c=a.changes;if(c&&(f.blockIdle(100),a.changes=0,a.onRender(c)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return w.prototype.schedule=function(u){this.changes=this.changes|u,this.changes&&!this.pending&&(f.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(u){var d=this.changes;return this.changes=0,d},w})();r.RenderLoop=g}),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,m){var f=e("../lib/oop"),g=e("../lib/dom"),w=e("../lib/lang"),u=e("../lib/event"),d=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=512,c=typeof ResizeObserver=="function",h=200,o=(function(){function s(p){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),p.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",l),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return s.prototype.$setMeasureNodeStyles=function(p,b){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",d.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=b?"hidden":"visible"},s.prototype.checkForSizeChanges=function(p){if(p===void 0&&(p=this.$measureSizes()),p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===p.width&&b.height===p.height,this._emit("changeCharacterSize",{data:p})}},s.prototype.$addObserver=function(){var p=this;this.$observer=new window.ResizeObserver(function(b){p.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},s.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=u.onIdle(function b(){p.checkForSizeChanges(),u.onIdle(b,500)},500)},s.prototype.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},s.prototype.$measureSizes=function(p){var b={height:(p||this.$measureNode).clientHeight,width:(p||this.$measureNode).clientWidth/l};return b.width===0||b.height===0?null:b},s.prototype.$measureCharWidth=function(p){this.$main.textContent=w.stringRepeat(p,l);var b=this.$main.getBoundingClientRect();return b.width/l},s.prototype.getCharacterWidth=function(p){var b=this.charSizes[p];return b===void 0&&(b=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),b},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},s.prototype.$getZoom=function(p){return!p||!p.parentElement?1:(Number(window.getComputedStyle(p).zoom)||1)*this.$getZoom(p.parentElement)},s.prototype.$initTransformMeasureNodes=function(){var p=function(b,x){return["div",{style:"position: absolute;top:"+b+"px;left:"+x+"px;"}]};this.els=g.buildDom([p(0,0),p(h,0),p(0,h),p(h,h)],this.el)},s.prototype.transformCoordinates=function(p,b){if(p){var x=this.$getZoom(this.el);p=C(1/x,p)}function M(J,te,he){var ee=J[1]*te[0]-J[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ee,(+J[1]*he[0]-J[0]*he[1])/ee]}function R(J,te){return[J[0]-te[0],J[1]-te[1]]}function A(J,te){return[J[0]+te[0],J[1]+te[1]]}function C(J,te){return[J*te[0],J*te[1]]}this.els||this.$initTransformMeasureNodes();function O(J){var te=J.getBoundingClientRect();return[te.left,te.top]}var D=O(this.els[0]),I=O(this.els[1]),T=O(this.els[2]),B=O(this.els[3]),F=M(R(B,I),R(B,T),R(A(I,T),A(B,D))),L=C(1+F[0],R(I,D)),$=C(1+F[1],R(T,D));if(b){var _=b,N=F[0]*_[0]/h+F[1]*_[1]/h+1,W=A(C(_[0],L),C(_[1],$));return A(C(1/N/h,W),D)}var U=R(p,D),G=M(R(L,C(F[0],U)),R($,C(F[1],U)),U);return C(h,G)},s})();o.prototype.$characterSize={width:0,height:0},f.implement(o.prototype,a),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,m){m.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,m){var f=e("../lib/dom"),g=e("../lib/oop"),w=e("../lib/event_emitter").EventEmitter,u=(function(){function d(a,l){this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.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(a)}return d.prototype.$createCanvas=function(){this.canvas=f.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var c=this.canvas.getContext("2d");function h(L,$){return L.priority<$.priority?-1:L.priority>$.priority?1:0}var o=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach(function(L){L.priority=s[L.type]||null}),o=o.sort(h);for(var p=0;p<o.length;p++){var b=o[p].row,x=this.getVerticalOffsetForRow(b),M=x+this.lineHeight,R=Math.round(this.heightRatio*x),A=Math.round(this.heightRatio*M),C=Math.round((R+A)/2),O=A-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var D=C-O,I=C+O,T=I-D;c.fillStyle=l[o[p].type]||null,c.fillRect(0,D,Math.round(this.oneZoneWidth-1),T)}}var B=this.renderer.session.selection.getCursor();if(B){var F=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,F,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(a){a=a|0;var l=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return l},d.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.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},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d})();g.implement(u.prototype,w),r.Decorator=u}),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,m){var f=e("./lib/oop"),g=e("./lib/dom"),w=e("./lib/lang"),u=e("./config"),d=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,s=e("./scrollbar_custom").HScrollBar,p=e("./scrollbar_custom").VScrollBar,b=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,M=e("./lib/event_emitter").EventEmitter,R=e("./css/editor-css"),A=e("./layer/decorators").Decorator,C=e("./lib/useragent"),O=e("./layer/text_util").isTextToken;g.importCssString(R,"ace_editor.css",!1);var D=(function(){function I(T,B){var F=this;this.container=T||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),u.get("useStrictCSP")==null&&u.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var L=this.$textLayer=new l(this.content);this.canvas=L.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",function($){F.$scrollAnimation||F.session.setScrollTop($.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){F.$scrollAnimation||F.session.setScrollLeft($.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function($){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),u.resetOptions(this),u._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(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(T){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=T,T&&this.scrollMargin.top&&T.getScrollTop()<=0&&T.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(T),this.$markerBack.setSession(T),this.$markerFront.setSession(T),this.$gutterLayer.setSession(T),this.$textLayer.setSession(T),T&&(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(T,B,F){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:T,lastRow:B},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(T){T?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(T,B,F,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var $=this.container;L||(L=$.clientHeight||$.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",L=$.clientHeight||$.scrollHeight),F||(F=$.clientWidth||$.scrollWidth);var _=this.$updateCachedSize(T,B,F,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!L)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?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(T,B,F,L){L-=this.$extraHeight||0;var $=0,_=this.$size,N={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};if(L&&(T||_.height!=L)&&(_.height=L,$|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(_.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),F&&(T||_.width!=F)){$|=this.CHANGE_SIZE,_.width=F,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,g.setStyle(this.scrollBarH.element.style,"left",B+"px"),g.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),_.scrollerWidth=Math.max(0,F-B-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var W=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",W),g.setStyle(this.scroller.style,"right",W),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(_.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&($|=this.CHANGE_FULL)}return _.$dirty=!F||!L,$&&this._signal("resize",N),$},I.prototype.onGutterResize=function(T){var B=this.$showGutter?T:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,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 T=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},I.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},I.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=g.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.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 T=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){g.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){B&&B.markerRange&&(F=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var L=this.layerConfig,$=F.top,_=F.left;$-=L.offset;var N=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if($<0||$>L.height-N){g.translate(this.textarea,0,0);return}var W=1,U=this.$size.height-N;if(!B)$+=this.lineHeight;else if(B.useTextareaForIME){var G=this.textarea.value;W=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else $+=this.lineHeight+2;_-=this.scrollLeft,_>this.$size.scrollerWidth-W&&(_=this.$size.scrollerWidth-W),_+=this.gutterWidth+this.margin.left,g.setStyle(T,"height",N+"px"),g.setStyle(T,"width",W+"px"),g.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-W),Math.min($,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 T=this.layerConfig,B=T.lastRow,F=this.session.documentToScreenRow(B,0)*T.lineHeight;return F-this.session.getScrollTop()>T.height-T.lineHeight?B-1:B},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(T){this.$padding=T,this.$textLayer.setPadding(T),this.$cursorLayer.setPadding(T),this.$markerFront.setPadding(T),this.$markerBack.setPadding(T),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(T,B,F,L){var $=this.scrollMargin;$.top=T|0,$.bottom=B|0,$.right=L|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},I.prototype.setMargin=function(T,B,F,L){var $=this.margin;$.top=T|0,$.bottom=B|0,$.right=L|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},I.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-B&&(T=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+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(T,B){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!B){this.$changes|=T;return}if(this.$size.$dirty)return this.$changes|=T,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",T),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(T&this.CHANGE_FULL||T&this.CHANGE_SIZE||T&this.CHANGE_TEXT||T&this.CHANGE_LINES||T&this.CHANGE_SCROLL||T&this.CHANGE_H_SCROLL){if(T|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-F.offset);var $=F.width+2*this.$padding+"px",_=F.minHeight+"px";g.setStyle(this.content.style,"width",$),g.setStyle(this.content.style,"height",_)}if(T&this.CHANGE_H_SCROLL&&(g.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)),T&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",T);return}if(T&this.CHANGE_SCROLL){this.$changedLines=null,T&this.CHANGE_TEXT||T&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(T&this.CHANGE_GUTTER||T&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",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",T)},I.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,F=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var L=F<=2*this.lineHeight,$=!L&&T>B;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));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 T=this.session,B=this.$size,F=B.height<=2*this.lineHeight,L=this.session.getScreenLength(),$=L*this.lineHeight,_=this.$getLongestLine(),N=!F&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-_-2*this.$padding<0),W=this.$horizScroll!==N;W&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=B.height<=2*this.lineHeight);var G=B.scrollerHeight+this.lineHeight,J=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=J;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,$-B.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,_+2*this.$padding-B.scrollerWidth+te.right)));var he=!F&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-$+J<0||this.scrollTop>te.top),ee=U!==he;ee&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var le=this.scrollTop%this.lineHeight,se=Math.ceil(G/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),pe=ce+se,ve,$e,Ee=this.lineHeight;ce=T.screenToDocumentRow(ce,0);var qe=T.getFoldLine(ce);qe&&(ce=qe.start.row),ve=T.documentToScreenRow(ce,0),$e=T.getRowLength(ce)*Ee,pe=Math.min(T.screenToDocumentRow(pe,0),T.getLength()-1),G=B.scrollerHeight+T.getRowLength(pe)*Ee+$e,le=this.scrollTop-ve*Ee,le<0&&ve>0&&(ve=Math.max(0,ve+Math.floor(le/Ee)),le=this.scrollTop-ve*Ee);var He=0;return(this.layerConfig.width!=_||W)&&(He=this.CHANGE_H_SCROLL),(W||ee)&&(He|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),ee&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:ce,firstRowScreen:ve,lastRow:pe,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:G,maxHeight:$,offset:le,gutterOffset:Ee?Math.max(0,Math.ceil((le+B.height-B.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(_-this.$padding),He},I.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(T>F.lastRow+1)&&!(B<F.firstRow)){if(B===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,T,B),!0}}},I.prototype.$getLongestLine=function(){var T=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(T+=1),this.$textLayer&&T>this.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*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(T,B){this.$gutterLayer.addGutterDecoration(T,B)},I.prototype.removeGutterDecoration=function(T,B){this.$gutterLayer.removeGutterDecoration(T,B)},I.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),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(T,B,F){this.scrollCursorIntoView(T,F),this.scrollCursorIntoView(B,F)},I.prototype.scrollCursorIntoView=function(T,B,F){if(this.$size.scrollerHeight!==0){var L=this.$cursorLayer.getPixelPosition(T),$=L.left,_=L.top,N=F&&F.top||0,W=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>_?(B&&U+N>_+this.lineHeight&&(_-=B*this.$size.scrollerHeight),_===0&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):U+this.$size.scrollerHeight-W<_+this.lineHeight&&(B&&U+this.$size.scrollerHeight-W<_-this.lineHeight&&(_+=B*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight+W-this.$size.scrollerHeight));var G=this.scrollLeft,J=2*this.layerConfig.characterWidth;$-J<G?($-=J,$<this.$padding+J&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=J,G+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&$-G<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(T){this.session.setScrollTop(T*this.lineHeight)},I.prototype.alignCursor=function(T,B){typeof T=="number"&&(T={row:T,column:0});var F=this.$cursorLayer.getPixelPosition(T),L=this.$size.scrollerHeight-this.lineHeight,$=F.top-L*(B||0);return this.session.setScrollTop($),$},I.prototype.$calcSteps=function(T,B){var F=0,L=this.STEPS,$=[],_=function(N,W,U){return U*(Math.pow(N-1,3)+1)+W};for(F=0;F<L;++F)$.push(_(F/this.STEPS,T,B-T));return $},I.prototype.scrollToLine=function(T,B,F,L){var $=this.$cursorLayer.getPixelPosition({row:T,column:0}),_=$.top;B&&(_-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(_),F!==!1&&this.animateScrolling(N,L)},I.prototype.animateScrolling=function(T,B){var F=this.scrollTop;if(!this.$animatedScroll)return;var L=this;if(T==F)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(T=$[0],T==F))return}var _=L.$calcSteps(T,F);this.$scrollAnimation={from:T,to:F,steps:_},clearInterval(this.$timer),L.session.setScrollTop(_.shift()),L.session.$scrollTop=F;function N(){L.$timer=clearInterval(L.$timer),L.$scrollAnimation=null,L.$stopAnimation=!1,B&&B()}this.$timer=setInterval(function(){if(L.$stopAnimation){N();return}if(!L.session)return clearInterval(L.$timer);_.length?(L.session.setScrollTop(_.shift()),L.session.$scrollTop=F):F!=null?(L.session.$scrollTop=-1,L.session.setScrollTop(F),F=null):N()},10)},I.prototype.scrollToY=function(T){this.scrollTop!==T&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=T)},I.prototype.scrollToX=function(T){this.scrollLeft!==T&&(this.scrollLeft=T),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(T,B){this.session.setScrollTop(B),this.session.setScrollLeft(T)},I.prototype.scrollBy=function(T,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),T&&this.session.setScrollLeft(this.session.getScrollLeft()+T)},I.prototype.isScrollableBy=function(T,B){if(B<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||T<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||T>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(T,B){var F;if(this.$hasCssTransforms){F={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([T,B]);T=L[1]-this.gutterWidth-this.margin.left,B=L[0]}else F=this.scroller.getBoundingClientRect();var $=T+this.scrollLeft-F.left-this.$padding,_=$/this.characterWidth,N=Math.floor((B+this.scrollTop-F.top)/this.lineHeight),W=this.$blockCursor?Math.floor(_):Math.round(_);return{row:N,column:W,side:_-W>0?1:-1,offsetX:$}},I.prototype.screenToTextCoordinates=function(T,B){var F;if(this.$hasCssTransforms){F={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([T,B]);T=L[1]-this.gutterWidth-this.margin.left,B=L[0]}else F=this.scroller.getBoundingClientRect();var $=T+this.scrollLeft-F.left-this.$padding,_=$/this.characterWidth,N=this.$blockCursor?Math.floor(_):Math.round(_),W=(B+this.scrollTop-F.top)/this.lineHeight;return this.session.screenToDocumentPosition(W,Math.max(N,0),$)},I.prototype.textToScreenCoordinates=function(T,B){var F=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition(T,B),$=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,T)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),_=L.row*this.lineHeight;return{pageX:F.left+$-this.scrollLeft,pageY:F.top+_-this.scrollTop}},I.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):T.markerId=this.session.addMarker(T.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(T){var B=this.session.selection.cursor;this.addToken(T,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var T=this.session.selection.cursor;this.removeExtraToken(T.row,T.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(T,B){var F=this.session.selection.cursor,L=B||{row:F.row,column:F.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(T,L);this.addToken($[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:T,position:{row:L.row,column:L.column}};var _=g.createElement("div");if($.length>1){var N=this.hideTokensAfterPosition(L.row,L.column),W;$.slice(1).forEach(function(ee){var le=g.createElement("div"),se=g.createElement("span");se.className="ace_ghost_text",ee.wrapped&&(le.className="ghost_text_line_wrapped"),ee.text.length===0&&(ee.text=" "),se.appendChild(g.createTextNode(ee.text)),le.appendChild(se),_.appendChild(le),W=le}),N.forEach(function(ee){var le=g.createElement("span");O(ee.type)||(le.className="ace_"+ee.type.replace(/\./g," ace_")),le.appendChild(g.createTextNode(ee.value)),W.appendChild(le)}),this.$ghostTextWidget={el:_,row:L.row,column:L.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(L,!0),G=this.container,J=G.getBoundingClientRect().height,te=$.length*this.lineHeight,he=te<J-U.top;if(he)return;te<J?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(L.row)}},I.prototype.$calculateWrappedTextChunks=function(T,B){var F=this.$size.scrollerWidth-this.$padding*2,L=Math.floor(F/this.characterWidth)-2;L=L<=0?60:L;for(var $=T.split(/\r?\n/),_=[],N=0;N<$.length;N++){var W=this.session.$getDisplayTokens($[N],B.column),U=this.session.$computeWrapSplits(W,L,this.session.$tabSize);if(U.length>0){var G=0;U.push($[N].length);for(var J=0;J<U.length;J++){var te=$[N].slice(G,U[J]);_.push({text:te,wrapped:!0}),G=U[J]}}else _.push({text:$[N],wrapped:!1})}return _},I.prototype.removeGhostText=function(){if(this.$ghostText){var T=this.$ghostText.position;this.removeExtraToken(T.row,T.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(T,B,F,L){var $=this.session;$.bgTokenizer.lines[F]=null;var _={type:B,value:T},N=$.getTokens(F);if(L==null||!N.length)N.push(_);else for(var W=0,U=0;U<N.length;U++){var G=N[U];if(W+=G.value.length,L<=W){var J=G.value.length-(W-L),te=G.value.slice(0,J),he=G.value.slice(J);N.splice(U,1,{type:G.type,value:te},_,{type:G.type,value:he});break}}this.updateLines(F,F)},I.prototype.hideTokensAfterPosition=function(T,B){for(var F=this.session.getTokens(T),L=0,$=!1,_=[],N=0;N<F.length;N++){var W=F[N];if(L+=W.value.length,W.type!=="ghost_text"){if($){_.push({type:W.type,value:W.value}),W.type="hidden_token";continue}L===B&&($=!0)}}return this.updateLines(T,T),_},I.prototype.removeExtraToken=function(T,B){this.session.bgTokenizer.lines[T]=null,this.updateLines(T,T)},I.prototype.setTheme=function(T,B){var F=this;if(this.$themeId=T,F._dispatchEvent("themeChange",{theme:T}),!T||typeof T=="string"){var L=T||this.$options.theme.initialValue;u.loadModule(["theme",L],$)}else $(T);function $(_){if(F.$themeId!=T)return B&&B();if(!_||!_.cssClass)throw new Error("couldn't load module "+T+" or it didn't call define");_.$id&&(F.$themeId=_.$id),g.importCssString(_.cssText,_.cssClass,F.container),F.theme&&g.removeCssClass(F.container,F.theme.cssClass);var N="padding"in _?_.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&N!=F.$padding&&F.setPadding(N),F.$gutterLayer){var W=_.$showGutterCursorMarker;W&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!W&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=_.cssClass,F.theme=_,g.addCssClass(F.container,_.cssClass),g.setCssClass(F.container,"ace_dark",_.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:_}),B&&B(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(T,B){g.setCssClass(this.container,T,B!==!1)},I.prototype.unsetStyle=function(T){g.removeCssClass(this.container,T)},I.prototype.setCursorStyle=function(T){g.setStyle(this.scroller.style,"cursor",T)},I.prototype.setMouseCursor=function(T){g.setStyle(this.scroller.style,"cursor",T)},I.prototype.attachToShadowRoot=function(){g.importCssString(R,"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(T){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),T===!0?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollTop(F.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollLeft(F.data-B.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new A(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollTop(F.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollLeft(F.data-B.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var T=this;this.$resizeTimer=w.delayedCall(function(){T.destroyed||T.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var F=B[0].contentRect.width,L=B[0].contentRect.height;Math.abs(T.$size.width-F)>1||Math.abs(T.$size.height-L)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I})();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,f.implement(D.prototype,M),u.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){g.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=D}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,m){var f=e("../lib/oop"),g=e("../lib/net"),w=e("../lib/event_emitter").EventEmitter,u=e("../config");function d(h){var o="importScripts('"+g.qualifyURL(h)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,p=new s;return p.append(o),p.getBlob("application/javascript")}}function a(h){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(u.get("loadWorkerFromBlob")){var o=d(h),s=window.URL||window.webkitURL,p=s.createObjectURL(o);return new Worker(p)}return new Worker(h)}var l=function(h){h.postMessage||(h=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=h,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(){f.implement(this,w),this.$createWorkerFromOldConfig=function(h,o,s,p,b){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),u.get("packaged")||!e.toUrl)p=p||u.moduleUrl(o,"worker");else{var x=this.$normalizePath;p=p||x(e.toUrl("ace/worker/worker.js",null,"_"));var M={};h.forEach(function(R){M[R]=x(e.toUrl(R,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(p),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:M,module:o,classname:s}),this.$worker},this.onMessage=function(h){var o=h.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var s=this.callbacks[o.id];s&&(s(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(h){window.console&&console.error&&console.error(h)},this.$normalizePath=function(h){return g.qualifyURL(h)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(h){h.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(h,o){this.$worker.postMessage({command:h,args:o})},this.call=function(h,o,s){if(s){var p=this.callbackId++;this.callbacks[p]=s,o.push(p)}this.send(h,o)},this.emit=function(h,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:h,data:{data:o.data}})}catch(s){console.error(s.stack)}},this.attachToDocument=function(h){this.$doc&&this.terminate(),this.$doc=h,this.call("setValue",[h.getValue()]),h.on("change",this.changeListener,!0)},this.changeListener=function(h){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),h.action=="insert"?this.deltaQueue.push(h.start,h.lines):this.deltaQueue.push(h.start,h.end)},this.$sendDeltaQueue=function(){var h=this.deltaQueue;h&&(this.deltaQueue=null,h.length>50&&h.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:h}))}}).call(l.prototype);var c=function(h,o,s){var p=null,b=!1,x=Object.create(w),M=[],R=new l({messageBuffer:M,terminate:function(){},postMessage:function(C){M.push(C),p&&(b?setTimeout(A):A())}});R.setEmitSync=function(C){b=C};var A=function(){var C=M.shift();C.command?p[C.command].apply(p,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){R.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})},u.loadModule(["worker",o],function(C){for(p=new C[s](x);M.length;)A()}),R};r.UIWorkerClient=c,r.WorkerClient=l,r.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,m){var f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,w=e("./lib/oop"),u=(function(){function d(a,l,c,h,o,s){var p=this;this.length=l,this.session=a,this.doc=a.getDocument(),this.mainClass=o,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=h,this.$onCursorChange=function(){setTimeout(function(){p.onCursorChange()})},this.$pos=c;var b=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var a=this,l=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var h=this.pos;h.$insertRight=!0,h.detach(),h.markerId=c.addMarker(new f(h.row,h.column,h.row,h.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var s=l.createAnchor(o.row,o.column);s.$insertRight=!0,s.detach(),a.others.push(s)}),c.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,l=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new f(c.row,c.column,c.row,c.column+l.length),l.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},d.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var l=a;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var c=a.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,h=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,o=l.start.column-this.pos.column;if(this.updateAnchors(a),h&&(this.length+=c),h&&!this.session.$fromUndo){if(a.action==="insert")for(var s=this.others.length-1;s>=0;s--){var p=this.others[s],b={row:p.row,column:p.column+o};this.doc.insertMergedLines(b,a.lines)}else if(a.action==="remove")for(var s=this.others.length-1;s>=0;s--){var p=this.others[s],b={row:p.row,column:p.column+o};this.doc.remove(new f(b.row,b.column,b.row,b.column-c))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var l=this.others.length;l--;)this.others[l].onChange(a);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var a=this,l=this.session,c=function(o,s){l.removeMarker(o.markerId),o.markerId=l.addMarker(new f(o.row,o.column,o.row,o.column+a.length),s,null,!1)};c(this.pos,this.mainClass);for(var h=this.others.length;h--;)c(this.others[h],this.othersClass)}},d.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},d.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},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),l=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;c<l;c++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d})();w.implement(u.prototype,g),r.PlaceHolder=u}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var f=e("../lib/event"),g=e("../lib/useragent");function w(d,a){return d.row==a.row&&d.column==a.column}function u(d){var a=d.domEvent,l=a.altKey,c=a.shiftKey,h=a.ctrlKey,o=d.getAccelKey(),s=d.getButton();if(h&&g.isMac&&(s=a.button),d.editor.inMultiSelectMode&&s==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!h&&!l&&!o){s===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(s===0){var p=d.editor,b=p.selection,x=p.inMultiSelectMode,M=d.getDocumentPosition(),R=b.getCursor(),A=d.inSelection()||b.isEmpty()&&w(M,R),C=d.x,O=d.y,D=function(te){C=te.clientX,O=te.clientY},I=p.session,T=p.renderer.pixelToScreenCoordinates(C,O),B=T,F;if(p.$mouseHandler.$enableJumpToDef)h&&l||o&&l?F=c?"block":"add":l&&p.$blockSelectEnabled&&(F="block");else if(o&&!l){if(F="add",!x&&c)return}else l&&p.$blockSelectEnabled&&(F="block");if(F&&g.isMac&&a.ctrlKey&&p.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&A)return;if(!x){var L=b.toOrientedRange();p.addSelectionMarker(L)}var $=b.rangeList.rangeAtPoint(M);p.inVirtualSelectionMode=!0,c&&($=null,L=b.ranges[0]||L,p.removeSelectionMarker(L)),p.once("mouseup",function(){var te=b.toOrientedRange();$&&te.isEmpty()&&w($.cursor,te.cursor)?b.substractPoint(te.cursor):(c?b.substractPoint(L.cursor):L&&(p.removeSelectionMarker(L),b.addRange(L)),b.addRange(te)),p.inVirtualSelectionMode=!1})}else if(F=="block"){d.stop(),p.inVirtualSelectionMode=!0;var _,N=[],W=function(){var te=p.renderer.pixelToScreenCoordinates(C,O),he=I.screenToDocumentPosition(te.row,te.column,te.offsetX);w(B,te)&&w(he,b.lead)||(B=te,p.selection.moveToPosition(he),p.renderer.scrollCursorIntoView(),p.removeSelectionMarkers(N),N=b.rectangularRangeBlock(B,T),p.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=p.$mouseHandler.$clickSelection.clone()),N.forEach(p.addSelectionMarker,p),p.updateSelectionMarkers())};x&&!o?b.toSingleRange():!x&&o&&(_=b.toOrientedRange(),p.addSelectionMarker(_)),c?T=I.documentToScreenPosition(b.lead):b.moveToPosition(M),B={row:-1,column:-1};var U=function(te){W(),clearInterval(J),p.removeSelectionMarkers(N),N.length||(N=[b.toOrientedRange()]),_&&(p.removeSelectionMarker(_),b.toSingleRange(_));for(var he=0;he<N.length;he++)b.addRange(N[he]);p.inVirtualSelectionMode=!1,p.$mouseHandler.$clickSelection=null},G=W;f.capture(p.container,D,U);var J=setInterval(function(){G()},20);return d.preventDefault()}}}r.onMouseDown=u}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,m){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.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(g){g.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(g){g.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(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.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(g){g.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(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.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(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var f=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new f(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,m){var f=e("./range_list").RangeList,g=e("./range").Range,w=e("./selection").Selection,u=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),a=e("./lib/lang"),l=e("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var c=e("./search").Search,h=new c;function o(R,A,C){return h.$options.wrap=!0,h.$options.needle=A,h.$options.backwards=C==-1,h.find(R)}var s=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(R,A){if(R){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(R),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),A||this.fromOrientedRange(R);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}R.cursor||(R.cursor=R.end);var O=this.rangeList.add(R);return this.$onAddRange(R),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)),A||this.fromOrientedRange(R)}},this.toSingleRange=function(R){R=R||this.ranges[0];var A=this.rangeList.removeAll();A.length&&this.$onRemoveRange(A),R&&this.fromOrientedRange(R)},this.substractPoint=function(R){var A=this.rangeList.substractPoint(R);if(A)return this.$onRemoveRange(A),A[0]},this.mergeOverlappingRanges=function(){var R=this.rangeList.merge();R.length&&this.$onRemoveRange(R)},this.$onAddRange=function(R){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(R),this._signal("addRange",{range:R})},this.$onRemoveRange=function(R){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var A=this.rangeList.ranges.pop();R.push(A),this.rangeCount=0}for(var C=R.length;C--;){var O=this.ranges.indexOf(R[C]);this.ranges.splice(O,1)}this._signal("removeRange",{ranges:R}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),A=A||this.ranges[0],A&&!A.isEqual(this.getRange())&&this.fromOrientedRange(A)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new f,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var R=this.ranges.length?this.ranges:[this.getRange()],A=[],C=0;C<R.length;C++){var O=R[C],D=O.start.row,I=O.end.row;if(D===I)A.push(O.clone());else{for(A.push(new g(D,O.start.column,D,this.session.getLine(D).length));++D<I;)A.push(this.getLineRange(D,!0));A.push(new g(I,0,I,O.end.column))}C==0&&!this.isBackwards()&&(A=A.reverse())}this.toSingleRange();for(var C=A.length;C--;)this.addRange(A[C])},this.joinSelections=function(){var R=this.rangeList.ranges,A=R[R.length-1],C=g.fromPoints(R[0].start,A.end);this.toSingleRange(),this.setSelectionRange(C,A.cursor==A.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var R=this.rangeList.ranges,A=R[R.length-1],C=g.fromPoints(R[0].start,A.end);this.toSingleRange(),this.setSelectionRange(C,A.cursor==A.start)}else{var O=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(O,D);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(R,A,C){var O=[],D=R.column<A.column;if(D)var I=R.column,T=A.column,B=R.offsetX,F=A.offsetX;else var I=A.column,T=R.column,B=A.offsetX,F=R.offsetX;var L=R.row<A.row;if(L)var $=R.row,_=A.row;else var $=A.row,_=R.row;I<0&&(I=0),$<0&&($=0),$==_&&(C=!0);for(var N,W=$;W<=_;W++){var U=g.fromPoints(this.session.screenToDocumentPosition(W,I,B),this.session.screenToDocumentPosition(W,T,F));if(U.isEmpty()){if(N&&b(U.end,N))break;N=U.end}U.cursor=D?U.start:U.end,O.push(U)}if(L&&O.reverse(),!C){for(var G=O.length-1;O[G].isEmpty()&&G>0;)G--;if(G>0)for(var J=0;O[J].isEmpty();)J++;for(var te=G;te>=J;te--)O[te].isEmpty()&&O.splice(te,1)}return O}}).call(w.prototype);var p=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(R){R.cursor||(R.cursor=R.end);var A=this.getSelectionStyle();return R.marker=this.session.addMarker(R,"ace_selection",A),this.session.$selectionMarkers.push(R),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,R},this.removeSelectionMarker=function(R){if(R.marker){this.session.removeMarker(R.marker);var A=this.session.$selectionMarkers.indexOf(R);A!=-1&&this.session.$selectionMarkers.splice(A,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(R){for(var A=this.session.$selectionMarkers,C=R.length;C--;){var O=R[C];if(O.marker){this.session.removeMarker(O.marker);var D=A.indexOf(O);D!=-1&&A.splice(D,1)}}this.session.selectionMarkerCount=A.length},this.$onAddRange=function(R){this.addSelectionMarker(R.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(R){this.removeSelectionMarkers(R.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(R){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(R){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(R){var A=R.command,C=R.editor;if(C.multiSelect){if(A.multiSelectAction)A.multiSelectAction=="forEach"?O=C.forEachSelection(A,R.args):A.multiSelectAction=="forEachLine"?O=C.forEachSelection(A,R.args,!0):A.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=A.exec(C,R.args||{})):O=A.multiSelectAction(C,R.args||{});else{var O=A.exec(C,R.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function(R,A,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,D=C==!0||C&&C.$byLines,I=this.session,T=this.selection,B=T.rangeList,F=(O?T:B).ranges,L;if(!F.length)return R.exec?R.exec(this,A||{}):R(this,A||{});var $=T._eventRegistry;T._eventRegistry={};var _=new w(I);this.inVirtualSelectionMode=!0;for(var N=F.length;N--;){if(D)for(;N>0&&F[N].start.row==F[N-1].end.row;)N--;_.fromOrientedRange(F[N]),_.index=N,this.selection=I.selection=_;var W=R.exec?R.exec(this,A||{}):R(this,A||{});!L&&W!==void 0&&(L=W),_.toOrientedRange(F[N])}_.detach(),this.selection=I.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=$,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),L}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var R="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var A=this.multiSelect.rangeList.ranges,C=[],O=0;O<A.length;O++)C.push(this.session.getTextRange(A[O]));var D=this.session.getDocument().getNewLineCharacter();R=C.join(D),R.length==(C.length-1)*D.length&&(R="")}else this.selection.isEmpty()||(R=this.session.getTextRange(this.getSelectionRange()));return R},this.$checkMultiselectChange=function(R,A){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&A==this.multiSelect.anchor)return;var O=A==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=A.row||this.session.$clipPositionToDocument(O.row,O.column).column!=A.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(R,A,C){if(A=A||{},A.needle=R||A.needle,A.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();A.needle=this.session.getTextRange(O)}this.$search.set(A);var D=this.$search.findAll(this.session);if(!D.length)return 0;var I=this.multiSelect;C||I.toSingleRange(D[0]);for(var T=D.length;T--;)I.addRange(D[T],!0);return O&&I.rangeList.rangeAtPoint(O.start)&&I.addRange(O,!0),D.length},this.selectMoreLines=function(R,A){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,D=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(D.row+R,D.column);if(C.isEmpty())var B=I;else var T=this.session.documentToScreenPosition(O?C.end:C.start),B=this.session.screenToDocumentPosition(T.row+R,T.column);if(O){var F=g.fromPoints(I,B);F.cursor=F.start}else{var F=g.fromPoints(B,I);F.cursor=F.end}if(F.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(A)var L=C.cursor;this.selection.addRange(F),L&&this.selection.substractPoint(L)},this.transposeSelections=function(R){for(var A=this.session,C=A.multiSelect,O=C.ranges,D=O.length;D--;){var I=O[D];if(I.isEmpty()){var T=A.getWordRange(I.start.row,I.start.column);I.start.row=T.start.row,I.start.column=T.start.column,I.end.row=T.end.row,I.end.column=T.end.column}}C.mergeOverlappingRanges();for(var B=[],D=O.length;D--;){var I=O[D];B.unshift(A.getTextRange(I))}R<0?B.unshift(B.pop()):B.push(B.shift());for(var D=O.length;D--;){var I=O[D],F=I.clone();A.replace(I,B[D]),I.start.row=F.start.row,I.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(R,A,C){var O=this.session,D=O.multiSelect,I=D.toOrientedRange();if(!(I.isEmpty()&&(I=O.getWordRange(I.start.row,I.start.column),I.cursor=R==-1?I.start:I.end,this.multiSelect.addRange(I),C))){var T=O.getTextRange(I),B=o(O,T,R);B&&(B.cursor=R==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),A&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var R=this.session,A=R.multiSelect,C=A.ranges,O=-1,D=C.filter(function(G){if(G.cursor.row==O)return!0;O=G.cursor.row});if(!C.length||D.length==C.length-1){var I=this.selection.getRange(),T=I.start.row,B=I.end.row,F=T==B;if(F){var L=this.session.getLength(),$;do $=this.session.getLine(B);while(/[=:]/.test($)&&++B<L);do $=this.session.getLine(T);while(/[=:]/.test($)&&--T>0);T<0&&(T=0),B>=L&&(B=L-1)}var _=this.session.removeFullLines(T,B);_=this.$reAlignText(_,F),this.session.insert({row:T,column:0},_.join(`
954
+ `)+`
955
+ `),F||(I.start.column=0,I.end.column=_[_.length-1].length),this.selection.setRange(I)}else{D.forEach(function(G){A.substractPoint(G.cursor)});var N=0,W=1/0,U=C.map(function(G){var J=G.cursor,te=R.getLine(J.row),he=te.substr(J.column).search(/\S/g);return he==-1&&(he=0),J.column>N&&(N=J.column),he<W&&(W=he),he});C.forEach(function(G,J){var te=G.cursor,he=N-te.column,ee=U[J]-W;he>ee?R.insert(te,a.stringRepeat(" ",he-ee)):R.remove(new g(te.row,te.column,te.row,te.column-he+ee)),G.start.column=G.end.column=N,G.start.row=G.end.row=te.row,G.cursor=G.end}),A.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(R,A){var C=!0,O=!0,D,I,T;return R.map(function(_){var N=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,I=N[2].length,T=N[3].length,N):(D+I+T!=N[1].length+N[2].length+N[3].length&&(O=!1),D!=N[1].length&&(C=!1),D>N[1].length&&(D=N[1].length),I<N[2].length&&(I=N[2].length),T>N[3].length&&(T=N[3].length),N):[_]}).map(A?F:C?O?L:F:$);function B(_){return a.stringRepeat(" ",_)}function F(_){return _[2]?B(D)+_[2]+B(I-_[2].length+T)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function L(_){return _[2]?B(D+I-_[2].length)+_[2]+B(T)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function $(_){return _[2]?B(D)+_[2]+B(T)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(p.prototype);function b(R,A){return R.row==A.row&&R.column==A.column}r.onSessionChange=function(R){var A=R.session;A&&!A.multiSelect&&(A.$selectionMarkers=[],A.selection.$initRangeList(),A.multiSelect=A.selection),this.multiSelect=A&&A.multiSelect;var C=R.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)),A&&(A.multiSelect.on("addRange",this.$onAddRange),A.multiSelect.on("removeRange",this.$onRemoveRange),A.multiSelect.on("multiSelect",this.$onMultiSelect),A.multiSelect.on("singleSelect",this.$onSingleSelect),A.multiSelect.lead.on("change",this.$checkMultiselectChange),A.multiSelect.anchor.on("change",this.$checkMultiselectChange)),A&&this.inMultiSelectMode!=A.selection.inMultiSelectMode&&(A.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(R){R.$multiselectOnSessionChange||(R.$onAddRange=R.$onAddRange.bind(R),R.$onRemoveRange=R.$onRemoveRange.bind(R),R.$onMultiSelect=R.$onMultiSelect.bind(R),R.$onSingleSelect=R.$onSingleSelect.bind(R),R.$multiselectOnSessionChange=r.onSessionChange.bind(R),R.$checkMultiselectChange=R.$checkMultiselectChange.bind(R),R.$multiselectOnSessionChange(R),R.on("changeSession",R.$multiselectOnSessionChange),R.on("mousedown",u),R.commands.addCommands(l.defaultCommands),M(R))}function M(R){if(!R.textInput)return;var A=R.textInput.getElement(),C=!1;d.addListener(A,"keydown",function(D){var I=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);R.$blockSelectEnabled&&I?C||(R.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},R),d.addListener(A,"keyup",O,R),d.addListener(A,"blur",O,R);function O(D){C&&(R.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(R){x(this),R?this.on("mousedown",u):this.off("mousedown",u)},value:!0},enableBlockSelect:{set:function(R){this.$blockSelectEnabled=R},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,m){var f=e("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,u,d){var a=w.getLine(d);return this.foldingStartMarker.test(a)?"start":u=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(w,u,d){return null},this.indentationBlock=function(w,u,d){var a=/\S/,l=w.getLine(u),c=l.search(a);if(c!=-1){for(var h=d||l.length,o=w.getLength(),s=u,p=u;++u<o;){var b=w.getLine(u).search(a);if(b!=-1){if(b<=c){var x=w.getTokenAt(u,0);if(!x||x.type!=="string")break}p=u}}if(p>s){var M=w.getLine(p).length;return new f(s,h,p,M)}}},this.openingBracketBlock=function(w,u,d,a,l){var c={row:d,column:a+1},h=w.$findClosingBracket(u,c,l);if(h){var o=w.foldWidgets[h.row];return o==null&&(o=w.getFoldWidget(h.row)),o=="start"&&h.row>c.row&&(h.row--,h.column=w.getLine(h.row).length),f.fromPoints(c,h)}},this.closingBracketBlock=function(w,u,d,a,l){var c={row:d,column:a},h=w.$findOpeningBracket(u,c);if(h)return h.column++,c.column--,f.fromPoints(h,c)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,m){var f=e("../lib/dom"),g=e("../range").Range,w=e("../config").nls;function u(a,l,c){for(var h=0,o=a.length-1;h<=o;){var s=h+o>>1,p=c(l,a[s]);if(p>0)h=s+1;else if(p<0)o=s-1;else return s}return-(h+1)}function d(a,l,c){var h=a.getAnnotations().sort(g.comparePoints);if(h.length){var o=u(h,{row:l,column:-1},g.comparePoints);o<0&&(o=-o-1),o>=h.length?o=c>0?0:h.length-1:o===0&&c<0&&(o=h.length-1);var s=h[o];if(!(!s||!c)){if(s.row===l){do s=h[o+=c];while(s&&s.row===l);if(!s)return h.slice()}var p=[];l=s.row;do p[c<0?"unshift":"push"](s),s=h[o+=c];while(s&&s.row==l);return p.length&&p}}}r.showErrorMarker=function(a,l){var c=a.session,h=a.getCursorPosition(),o=h.row,s=c.widgetManager.getWidgetsAtRow(o).filter(function(D){return D.type=="errorMarker"})[0];s?s.destroy():o-=l;var p=d(c,o,l),b;if(p){var x=p[0];h.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,h.row=x.row,b=a.renderer.$gutterLayer.$annotations[h.row]}else{if(s)return;b={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(h.row),a.selection.moveToPosition(h);var M={row:h.row,fixedWidth:!0,coverGutter:!0,el:f.createElement("div"),type:"errorMarker"},R=M.el.appendChild(f.createElement("div")),A=M.el.appendChild(f.createElement("div"));A.className="error_widget_arrow "+b.className;var C=a.renderer.$cursorLayer.getPixelPosition(h).left;A.style.left=C+a.renderer.gutterWidth-5+"px",M.el.className="error_widget_wrapper",R.className="error_widget "+b.className,b.displayText.forEach(function(D,I){R.appendChild(f.createTextNode(D)),I<b.displayText.length-1&&R.appendChild(f.createElement("br"))}),R.appendChild(f.createElement("div"));var O=function(D,I,T){if(I===0&&(T==="esc"||T==="return"))return M.destroy(),{command:"null"}};M.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(O),c.widgetManager.removeLineWidget(M),a.off("changeSelection",M.destroy),a.off("changeSession",M.destroy),a.off("mouseup",M.destroy),a.off("change",M.destroy))},a.keyBinding.addKeyboardHandler(O),a.on("changeSelection",M.destroy),a.on("changeSession",M.destroy),a.on("mouseup",M.destroy),a.on("change",M.destroy),a.session.widgetManager.addLineWidget(M),M.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:M.el.offsetHeight})},f.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,m){e("./loader_build")(r);var f=e("./lib/dom"),g=e("./range").Range,w=e("./editor").Editor,u=e("./edit_session").EditSession,d=e("./undomanager").UndoManager,a=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(c,h){if(typeof c=="string"){var o=c;if(c=document.getElementById(o),!c)throw new Error("ace.edit can't find div #"+o)}if(c&&c.env&&c.env.editor instanceof w)return c.env.editor;var s="";if(c&&/input|textarea/i.test(c.tagName)){var p=c;s=p.value,c=f.createElement("pre"),p.parentNode.replaceChild(c,p)}else c&&(s=c.textContent,c.innerHTML="");var b=r.createEditSession(s),x=new w(new a(c),b,h),M={document:b,editor:x,onResize:x.resize.bind(x,null)};return p&&(M.textarea=p),x.on("destroy",function(){M.editor.container.env=null}),x.container.env=x.env=M,x},r.createEditSession=function(c,h){var o=new u(c,h);return o.setUndoManager(new d),o},r.Range=g,r.Editor=w,r.EditSession=u,r.UndoManager=d,r.VirtualRenderer=a;var l=r.config.version;r.version=l}),(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 m in e)e.hasOwnProperty(m)&&(r.ace[m]=e[m]);r.ace.default=r.ace,t&&(t.exports=r.ace)})})()})(rg)),rg.exports}var F2=Tn("m",m_()),og={exports:{}},sg;function v_(){return sg||(sg=1,(function(t,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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 u=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},d=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},l=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},h=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"},s=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},p=function(){var b="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",M="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",R="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",A=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":M,"variable.language":R,"support.function":b,"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(D,I,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,I),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,I,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,I),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,I,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,I),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,I,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,I),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,I,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,I),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},s,{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:/\?(?=.+:)/},c,h,w,u,o,d,a,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:A,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(D,I,T){var B=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",F=D.split(this.splitRegex);return T.push(B,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(D,I,T){return D===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(D,I,T){return D===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,I){return I[0]==="heredoc"||I[0]==="indentedHeredoc"?I[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,I,T){return this.next="",D=="}"&&T.length>1&&T[1]!="start"&&(T.shift(),this.next=T.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,T){return T.length&&D===T[0]?(T.unshift(D,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(D,I,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,T){return T.length&&D===T[0]?(T.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,T){return T.length&&D===T[0]?(T.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,T){return T.length&&D===T[0]?(T.unshift(D,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(D,I,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(D,I,T){return T.length&&D===T[0]?(T.unshift(D,I),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,I,T){return T.length&&D[0]===O[T[0]]?(T.shift(),this.next=T.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()};f.inherits(p,g),r.RubyHighlightRules=p}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var f=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var d=w.getLine(u),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,c=w.findMatchingBracket({row:u,column:l});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new f(u,0,u,l-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),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,m){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=e("../../range").Range,u=e("../../token_iterator").TokenIterator,d=r.FoldMode=function(){};f.inherits(d,g),(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(a,l,c){var h=a.getLine(c),o=this.foldingStartMarker.test(h),s=this.foldingStopMarker.test(h);if(o&&!s){var p=h.match(this.foldingStartMarker);if(p[1]){if((p[1]=="if"||p[1]=="else"||p[1]=="while"||p[1]=="until"||p[1]=="unless")&&(p[1]=="else"&&/^\s*else\s*$/.test(h)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(h)===!1)||p[1]=="when"&&/\sthen\s/.test(h)===!0)return;if(a.getTokenAt(c,p.index+2).type==="keyword")return"start"}else if(!p[3]||a.getTokenAt(c,p.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!s||o&&s)return"";var p=h.match(this.foldingStopMarker);if(p[3]==="end"){if(a.getTokenAt(c,p.index+1).type==="keyword")return"end"}else if(!p[1]||a.getTokenAt(c,p.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,l,c){var h=a.doc.getLine(c),o=this.foldingStartMarker.exec(h);if(o)return o[1]||o[3]?this.rubyBlock(a,c,o.index+2):this.openingBracketBlock(a,"{",c,o.index);var o=this.foldingStopMarker.exec(h);if(o)return o[3]==="end"&&a.getTokenAt(c,o.index+1).type==="keyword"?this.rubyBlock(a,c,o.index+1):o[1]==="=end"&&a.getTokenAt(c,o.index+1).type==="comment.multiline"?this.rubyBlock(a,c,o.index+1):this.closingBracketBlock(a,"}",c,o.index+o[0].length)},this.rubyBlock=function(a,l,c,h){var o=new u(a,l,c),s=o.getCurrentToken();if(!(!s||s.type!="keyword"&&s.type!="comment.multiline")){var p=s.value,b=a.getLine(l);switch(s.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);if(!x.test(b))return;var M=this.indentKeywords[p];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var M=1;break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");if(!x.test(b))return;var M=1;break;default:var M=this.indentKeywords[p]}var R=[p];if(M){var A=M===-1?a.getLine(l-1).length:a.getLine(l).length,C=l,O=[];if(O.push(o.getCurrentTokenRange()),o.step=M===-1?o.stepBackward:o.stepForward,s.type=="comment.multiline"){for(;s=o.step();)if(s.type==="comment.multiline"){if(M==1){if(A=6,s.value=="=end")break}else if(s.value=="=begin")break}}else for(;s=o.step();){var D=!1;if(s.type==="keyword"){var I=M*this.indentKeywords[s.value];switch(b=a.getLine(o.getCurrentTokenRow()),s.value){case"do":for(var T=o.$tokenIndex-1;T>=0;T--){var B=o.$rowTokens[T];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){I=0;break}}break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");(!x.test(b)||p=="case")&&(I=0,D=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);x.test(b)||(I=0,D=!0);break;case"when":(/\sthen\s/.test(b)||p=="case")&&(I=0,D=!0)}if(I>0)R.unshift(s.value);else if(I<=0&&D===!1){if(R.shift(),!R.length&&((p=="while"||p=="until"||p=="for")&&s.value!="do"||s.value=="do"&&M==-1&&I!=0||s.value!="do"))break;I===0&&R.unshift(s.value)}}}if(!s)return null;if(h)return O.push(o.getCurrentTokenRange()),O;var l=o.getCurrentTokenRow();if(M===-1){if(s.type==="comment.multiline")var F=6;else var F=a.getLine(l).length;return new w(l,F,C-1,A)}return new w(C,A,l-1,a.getLine(l-1).length)}}}}).call(d.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,m){var f=e("../lib/oop"),g=e("./text").Mode,w=e("./ruby_highlight_rules").RubyHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../range").Range,a=e("./folding/ruby").FoldMode,l=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};f.inherits(l,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,h,o){var s=this.$getIndent(h),p=this.getTokenizer().getLineTokens(h,c),b=p.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(c=="start"){var x=h.match(/^.*[\{\(\[]\s*$/),M=h.match(/^\s*(class|def|module)\s.*$/),R=h.match(/.*do(\s*|\s+\|.*\|\s*)$/),A=h.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||M||R||A)&&(s+=o)}return s},this.checkOutdent=function(c,h,o){return/^\s+(end|else|rescue|ensure)$/.test(h+o)||this.$outdent.checkOutdent(h,o)},this.autoOutdent=function(c,h,o){var s=h.getLine(o);if(/}/.test(s))return this.$outdent.autoOutdent(h,o);var p=this.$getIndent(s),b=h.getLine(o-1),x=this.$getIndent(b),M=h.getTabString();x.length<=p.length&&p.slice(-M.length)==M&&h.remove(new d(o,p.length-M.length,o,p.length))},this.getMatching=function(c,h,o){if(h==null){var s=c.selection.lead;o=s.column,h=s.row}var p=c.getTokenAt(h,o);if(p&&p.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,h,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/ruby"],function(e){t&&(t.exports=e)})})()})(og)),og.exports}v_();var ag={exports:{}},lg;function y_(){return lg||(lg=1,(function(t,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(){var u="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",d="True|False|None|NotImplemented|Ellipsis|__debug__",a="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",l=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":a,"variable.language":"self|cls","constant.language":d,keyword:u},"identifier"),c="[uU]?",h="[rR]",o="[fF]",s="(?:[rR][fF]|[fF][rR])",p="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",M="(?:0[bB][01]+)",R="(?:"+p+"|"+b+"|"+x+"|"+M+")",A="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",D="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",I="(?:(?:"+D+"|"+O+")"+A+")",T="(?:"+I+"|"+D+")",B=`\\\\(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:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:h+'"{3}',next:"rawqqstring3"},{token:"string",regex:h+'"(?=.)',next:"rawqqstring"},{token:"string",regex:h+"'{3}",next:"rawqstring3"},{token:"string",regex:h+"'(?=.)",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:s+'"{3}',next:"rfqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rfqqstring"},{token:"string",regex:s+"'{3}",next:"rfqstring3"},{token:"string",regex:s+"'(?=.)",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:B},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:B},{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:B},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:B},{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:"(?:"+T+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:T},{token:"constant.numeric",regex:R+"[lL]\\b"},{token:"constant.numeric",regex:R+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};f.inherits(w,g),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=r.FoldMode=function(u){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+u+")(?:\\s*)(?:#.*)?$")};f.inherits(w,g),(function(){this.getFoldWidgetRange=function(u,d,a){var l=u.getLine(a),c=l.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(u,c[1],a,c.index):c[2]?this.indentationBlock(u,a,c.index+c[2].length):this.indentationBlock(u,a)}}).call(w.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,m){var f=e("../lib/oop"),g=e("./text").Mode,w=e("./python_highlight_rules").PythonHighlightRules,u=e("./folding/pythonic").FoldMode,d=e("../range").Range,a=function(){this.HighlightRules=w,this.foldingRules=new u("\\:"),this.$behaviour=this.$defaultBehaviour};f.inherits(a,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,h,o){var s=this.$getIndent(h),p=this.getTokenizer().getLineTokens(h,c),b=p.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(c=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(s+=o)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,h,o){if(o!==`\r
989
+ `&&o!=="\r"&&o!==`
990
+ `)return!1;var s=this.getTokenizer().getLineTokens(h.trim(),c).tokens;if(!s)return!1;do var p=s.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&l[p.value]:!1},this.autoOutdent=function(c,h,o){o+=1;var s=this.$getIndent(h.getLine(o)),p=h.getTabString();s.slice(-p.length)==p&&h.remove(new d(o,s.length-p.length,o,s.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/python"],function(e){t&&(t.exports=e)})})()})(ag)),ag.exports}y_();var cg={exports:{}},ug;function b_(){return ug||(ug=1,(function(t,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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"}]}};f.inherits(w,g),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var f=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var d=w.getLine(u),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,c=w.findMatchingBracket({row:u,column:l});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new f(u,0,u,l-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var f=e("../../lib/oop"),g=e("../../range").Range,w=e("./fold_mode").FoldMode,u=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};f.inherits(u,w),(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(d,a,l){var c=d.getLine(l);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var h=this._getFoldWidgetBase(d,a,l);return!h&&this.startRegionRe.test(c)?"start":h},this.getFoldWidgetRange=function(d,a,l,c){var h=d.getLine(l);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(d,h,l);var o=h.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(d,o[1],l,s);var p=d.getCommentFoldRange(l,s+o[0].length,1);return p&&!p.isMultiLine()&&(c?p=this.getSectionRange(d,l):a!="all"&&(p=null)),p}if(a!=="markbegin"){var o=h.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),c=l.search(/\S/),h=a,o=l.length;a+=1;for(var s=a,p=d.getLength();++a<p;){l=d.getLine(a);var b=l.search(/\S/);if(b!==-1){if(c>b)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=h)break;if(x.isMultiLine())a=x.end.row;else if(c==b)break}s=a}}return new g(h,o,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,a,l){for(var c=a.search(/\s*$/),h=d.getLength(),o=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++l<h;){a=d.getLine(l);var b=s.exec(a);if(b&&(b[1]?p--:p++,!p))break}var x=l;if(x>o)return new g(o,c,x,a.length)}}).call(u.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,m){var f=e("../lib/oop"),g=e("./text").Mode,w=e("./json_highlight_rules").JsonHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new d};f.inherits(l,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,h,o){var s=this.$getIndent(h);if(c=="start"){var p=h.match(/^.*[\{\(\[]\s*$/);p&&(s+=o)}return s},this.checkOutdent=function(c,h,o){return this.$outdent.checkOutdent(h,o)},this.autoOutdent=function(c,h,o){this.$outdent.autoOutdent(h,o)},this.createWorker=function(c){var h=new a(["ace"],"ace/mode/json_worker","JsonWorker");return h.attachToDocument(c.getDocument()),h.on("annotate",function(o){c.setAnnotations(o.data)}),h.on("terminate",function(){c.clearAnnotations()}),h},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/json"],function(e){t&&(t.exports=e)})})()})(cg)),cg.exports}b_();var hg={exports:{}},dg;function w_(){return dg||(dg=1,(function(t,n){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop");e("../lib/lang");var g=e("./text_highlight_rules").TextHighlightRules,w=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",u=r.supportFunction="rgb|rgba|url|attr|counter|counters",d=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",a=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",l=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",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=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",s=function(){var p=this.createKeywordMapper({"support.function":u,"support.constant":d,"support.type":w,"support.constant.color":a,"support.constant.fonts":l},"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:c},{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:"("+c+")(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:c},{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:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:p,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()};f.inherits(s,g),r.CssHighlightRules=s}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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|$)"},w.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};f.inherits(w,g),w.getTagRule=function(u){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(u){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:u}},w.getEndRule=function(u){return{token:"comment.doc",regex:"\\*\\/",next:u}},r.JsDocCommentHighlightRules=w}),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,m){function f(){var c=a.replace("\\d","\\d\\-"),h={onMatch:function(s,p,b){var x=s.charAt(1)=="/"?2:1;return x==1?(p!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):x==2&&p==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:s.slice(0,x)},{type:"meta.tag.tag-name.xml",value:s.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(h);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,h,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(s,p,b){return p==b[0]&&b.shift(),s.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:s}]},nextState:"jsx"},o,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{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"}]},h],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(c){return[{token:"comment",regex:/\/\*/,next:[u.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[u.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var w=e("../lib/oop"),u=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,d=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",l=function(c){var h={"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(h,"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",p="\\\\(?: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]?|.)",b="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(h).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[u.getStartRule("doc-start"),g("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:"("+a+")(\\s*)(=)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\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:a},{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:b+"(\\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:a},{regex:"",token:"empty",next:"no_regex"}],start:[u.getStartRule("doc-start"),g("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:[g("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:p},{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)?/}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(M,R,A){if(this.next=M=="{"?this.nextState:"",M=="{"&&A.length)A.unshift("start",R);else if(M=="}"&&A.length&&(A.shift(),this.next=A.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return M=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:p},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\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"}),(!c||c.jsx!=0)&&f.call(this)),this.embedRules(u,"doc-",[u.getEndRule("no_regex")]),this.normalizeRules()};w.inherits(l,d),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(u){var d="[_: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:"(<\\?)("+d+")",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:d},{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:"(<\\!)("+d+")",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:"(?:(<)|(</))((?:"+d+":)?"+d+")",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:d},{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===w&&this.normalizeRules()};(function(){this.embedTagRules=function(u,d,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:d+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,c,h){return h.splice(0),this.token}}],this.embedRules(u,d,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),f.inherits(w,g),r.XmlHighlightRules=w}),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,m){var f=e("../lib/oop"),g=e("../lib/lang"),w=e("./css_highlight_rules").CssHighlightRules,u=e("./javascript_highlight_rules").JavaScriptHighlightRules,d=e("./xml_highlight_rules").XmlHighlightRules,a=g.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"}),l=function(){d.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(c,h){var o=a[h];return["meta.tag.punctuation."+(c=="<"?"":"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(w,"css-","style"),this.embedTagRules(new u({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};f.inherits(l,d),r.HtmlHighlightRules=l}),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,m){var f=e("../config").$modes,g=e("../lib/oop"),w=e("../lib/lang"),u=e("./text_highlight_rules").TextHighlightRules,d=e("./html_highlight_rules").HtmlHighlightRules,a=function(c){return"(?:[^"+w.escapeRegExp(c)+"\\\\]|\\\\.)*"},l=function(){d.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,s,p,b){var x=o.match(/^(\s*)([`~]+)(.*)/),M=/[\w-]+|$/.exec(x[3])[0];return f[M]||(M=""),p.unshift("githubblock",[],[x[1],x[2],M],s),this.token},next:"githubblock"},h=[{token:"support.function",regex:".*",onMatch:function(o,s,p,b){var x=p[1],M=p[2][0],R=p[2][1],A=p[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<M.length+3&&C[2].length>=R.length&&C[2][0]==R[0])return p.splice(0,3),this.next=p.shift(),this.token;if(this.next="",A&&f[A]){var O=f[A].getTokenizer().getLineTokens(o,x.slice(0));return p[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"},c,{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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\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},c,{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:h}),this.normalizeRules()};g.inherits(l,u),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,m){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=e("../../range").Range,u=r.FoldMode=function(){};f.inherits(u,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(d,a,l){var c=d.getLine(l);return this.foldingStartMarker.test(c)?c[0]=="`"&&d.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(d,a,l){function c(D){return M=d.getTokens(D)[0],M&&M.type.lastIndexOf(R,0)===0}function h(){var D=M.value[0];return D=="="?6:D=="-"?5:7-M.value.search(/[^#]|$/)}var o=d.getLine(l),s=o.length,p=d.getLength(),b=l,x=l;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(d.bgTokenizer.getState(l)!=="start"){for(;++l<p&&(o=d.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(b,s,l,0)}for(;l-- >0&&(o=d.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(l,o.length,b,0)}var M,R="markup.heading";if(c(l)){for(var A=h();++l<p;)if(c(l)){var C=h();if(C>=A)break}if(x=l-(!M||["=","-"].indexOf(M.value[0])==-1?1:2),x>b)for(;x>b&&/^\s*$/.test(d.getLine(x));)x--;if(x>b){var O=d.getLine(x).length;return new w(b,s,x,O)}}}}}).call(u.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var f=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var d=w.getLine(u),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,c=w.findMatchingBracket({row:u,column:l});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new f(u,0,u,l-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,m){function f(a,l){return a&&a.type.lastIndexOf(l+".xml")>-1}var g=e("../../lib/oop"),w=e("../behaviour").Behaviour,u=e("../../token_iterator").TokenIterator,d=function(){this.add("string_dquotes","insertion",function(a,l,c,h,o){if(o=='"'||o=="'"){var s=o,p=h.doc.getTextRange(c.getSelectionRange());if(p!==""&&p!=="'"&&p!='"'&&c.getWrapBehavioursEnabled())return{text:s+p+s,selection:!1};var b=c.getCursorPosition(),x=h.doc.getLine(b.row),M=x.substring(b.column,b.column+1),R=new u(h,b.row,b.column),A=R.getCurrentToken();if(M==s&&(f(A,"attribute-value")||f(A,"string")))return{text:"",selection:[1,1]};if(A||(A=R.stepBackward()),!A)return;for(;f(A,"tag-whitespace")||f(A,"whitespace");)A=R.stepBackward();var C=!M||M.match(/\s/);if(f(A,"attribute-equals")&&(C||M==">")||f(A,"decl-attribute-equals")&&(C||M=="?"))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,l,c,h,o){var s=h.doc.getTextRange(o);if(!o.isMultiLine()&&(s=='"'||s=="'")){var p=h.doc.getLine(o.start.row),b=p.substring(o.start.column+1,o.start.column+2);if(b==s)return o.end.column++,o}}),this.add("autoclosing","insertion",function(a,l,c,h,o){if(o==">"){var s=c.getSelectionRange().start,p=new u(h,s.row,s.column),b=p.getCurrentToken()||p.stepBackward();if(!b||!(f(b,"tag-name")||f(b,"tag-whitespace")||f(b,"attribute-name")||f(b,"attribute-equals")||f(b,"attribute-value"))||f(b,"reference.attribute-value"))return;if(f(b,"attribute-value")){var x=p.getCurrentTokenColumn()+b.value.length;if(s.column<x)return;if(s.column==x){var M=p.stepForward();if(M&&f(M,"attribute-value"))return;p.stepBackward()}}if(/^\s*>/.test(h.getLine(s.row).slice(s.column)))return;for(;!f(b,"tag-name");)if(b=p.stepBackward(),b.value=="<"){b=p.stepForward();break}var R=p.getCurrentTokenRow(),A=p.getCurrentTokenColumn();if(f(p.stepBackward(),"end-tag-open"))return;var C=b.value;return R==s.row&&(C=C.substring(0,s.column-A)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,l,c,h,o){if(o==`
991
+ `){var s=c.getCursorPosition(),p=h.getLine(s.row),b=new u(h,s.row,s.column),x=b.getCurrentToken();if(f(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=b.stepBackward();if(!x)return;var M=x.value,R=b.getCurrentTokenRow();if(x=b.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[M]||!this.voidElements){var A=h.getTokenAt(s.row,s.column+1),p=h.getLine(R),C=this.$getIndent(p),O=C+h.getTabString();return A&&A.value==="</"?{text:`
992
+ `+O+`
993
+ `+C,selection:[1,O.length,1,O.length]}:{text:`
994
+ `+O}}}}})};g.inherits(d,w),r.XmlBehaviour=d}),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,m){var f=e("../../lib/oop"),g=e("../../token_iterator").TokenIterator,w=e("../behaviour/cstyle").CstyleBehaviour,u=e("../behaviour/xml").XmlBehaviour,d=function(){var a=new u({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(w),this.add("autoclosing-fragment","insertion",function(l,c,h,o,s){if(s==">"){var p=h.getSelectionRange().start,b=new g(o,p.row,p.column),x=b.getCurrentToken()||b.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};f.inherits(d,w),r.JavaScriptBehaviour=d}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){function f(l,c){return l&&l.type&&l.type.lastIndexOf(c+".xml")>-1}var g=e("../../lib/oop"),w=e("../../range").Range,u=e("./fold_mode").FoldMode,d=r.FoldMode=function(l,c){u.call(this),this.voidElements=l||{},this.optionalEndTags=g.mixin({},this.voidElements),c&&g.mixin(this.optionalEndTags,c)};g.inherits(d,u);var a=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(l,c,h){var o=this._getFirstTagInLine(l,h);return o?o.closing||!o.tagName&&o.selfClosing?c==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(l,h,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(l,h)},this.getCommentFoldWidget=function(l,c){return/comment/.test(l.getState(c))&&/<!-/.test(l.getLine(c))?"start":""},this._getFirstTagInLine=function(l,c){for(var h=l.getTokens(c),o=new a,s=0;s<h.length;s++){var p=h[s];if(f(p,"tag-open")){if(o.end.column=o.start.column+p.value.length,o.closing=f(p,"end-tag-open"),p=h[++s],!p)return null;if(o.tagName=p.value,p.value===""){if(p=h[++s],!p)return null;o.tagName=p.value}for(o.end.column+=p.value.length,s++;s<h.length;s++)if(p=h[s],o.end.column+=p.value.length,f(p,"tag-close")){o.selfClosing=p.value=="/>";break}return o}if(f(p,"tag-close"))return o.selfClosing=p.value=="/>",o;o.start.column+=p.value.length}return null},this._findEndTagInLine=function(l,c,h,o){for(var s=l.getTokens(c),p=0,b=0;b<s.length;b++){var x=s[b];if(p+=x.value.length,!(p<o-1)&&f(x,"end-tag-open")&&(x=s[b+1],f(x,"tag-name")&&x.value===""&&(x=s[b+2]),x&&x.value==h))return!0}return!1},this.getFoldWidgetRange=function(l,c,h){var o=this._getFirstTagInLine(l,h);if(!o)return this.getCommentFoldWidget(l,h)&&l.getCommentFoldRange(h,l.getLine(h).length);var s=l.getMatchingTags({row:h,column:0});if(s)return new w(s.openTag.end.row,s.openTag.end.column,s.closeTag.start.row,s.closeTag.start.column)}}).call(d.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var f=e("../../lib/oop"),g=e("../../range").Range,w=e("./fold_mode").FoldMode,u=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};f.inherits(u,w),(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(d,a,l){var c=d.getLine(l);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var h=this._getFoldWidgetBase(d,a,l);return!h&&this.startRegionRe.test(c)?"start":h},this.getFoldWidgetRange=function(d,a,l,c){var h=d.getLine(l);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(d,h,l);var o=h.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(d,o[1],l,s);var p=d.getCommentFoldRange(l,s+o[0].length,1);return p&&!p.isMultiLine()&&(c?p=this.getSectionRange(d,l):a!="all"&&(p=null)),p}if(a!=="markbegin"){var o=h.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),c=l.search(/\S/),h=a,o=l.length;a+=1;for(var s=a,p=d.getLength();++a<p;){l=d.getLine(a);var b=l.search(/\S/);if(b!==-1){if(c>b)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=h)break;if(x.isMultiLine())a=x.end.row;else if(c==b)break}s=a}}return new g(h,o,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,a,l){for(var c=a.search(/\s*$/),h=d.getLength(),o=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++l<h;){a=d.getLine(l);var b=s.exec(a);if(b&&(b[1]?p--:p++,!p))break}var x=l;if(x>o)return new g(o,c,x,a.length)}}).call(u.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var f=e("../../lib/oop"),g=e("./xml").FoldMode,w=e("./cstyle").FoldMode,u=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end))),this.xmlFoldMode=new g};f.inherits(u,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,a,l){var c=this.getFoldWidgetBase(d,a,l);return c||this.xmlFoldMode.getFoldWidget(d,a,l)},this.getFoldWidgetRange=function(d,a,l,c){var h=this.getFoldWidgetRangeBase(d,a,l,c);return h||this.xmlFoldMode.getFoldWidgetRange(d,a,l)}}).call(u.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,m){var f=e("../lib/oop"),g=e("./text").Mode,w=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,l=e("./folding/javascript").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=new a,this.foldingRules=new l};f.inherits(c,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(h,o,s){var p=this.$getIndent(o),b=this.getTokenizer().getLineTokens(o,h),x=b.tokens,M=b.state;if(x.length&&x[x.length-1].type=="comment")return p;if(h=="start"||h=="no_regex"){var R=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);R&&(p+=s)}else if(h=="doc-start"&&(M=="start"||M=="no_regex"))return"";return p},this.checkOutdent=function(h,o,s){return this.$outdent.checkOutdent(o,s)},this.autoOutdent=function(h,o,s){this.$outdent.autoOutdent(o,s)},this.createWorker=function(h){var o=new d(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(h.getDocument()),o.on("annotate",function(s){h.setAnnotations(s.data)}),o.on("terminate",function(){h.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,m){var f={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}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var u in w)if(typeof w[u]=="string"){var d=u.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});f.hasOwnProperty(d)||(f[d]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,u,d,a){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||u.$mode.$id=="ace/mode/scss"){var l=u.getLine(d.row).substr(0,d.column),c=/\([^)]*$/.test(l);return c&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(w,u,d,a):this.getPropertyCompletions(w,u,d,a,c)}return[]},this.getPropertyCompletions=function(w,u,d,a,l){l=l||!1;var c=Object.keys(f);return c.map(function(h){return{caption:h,snippet:h+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,u,d,a){var l=u.getLine(d.row).substr(0,d.column),c=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!c)return[];var h=[];return c in f&&typeof f[c]=="object"&&(h=Object.keys(f[c])),h.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),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,m){var f=e("../../lib/oop");e("../behaviour").Behaviour;var g=e("./cstyle").CstyleBehaviour,w=e("../../token_iterator").TokenIterator,u=function(){this.inherit(g),this.add("colon","insertion",function(d,a,l,c,h){if(h===":"&&l.selection.isEmpty()){var o=l.getCursorPosition(),s=new w(c,o.row,o.column),p=s.getCurrentToken();if(p&&p.value.match(/\s+/)&&(p=s.stepBackward()),p&&p.type==="support.type"){var b=c.doc.getLine(o.row),x=b.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(d,a,l,c,h){var o=c.doc.getTextRange(h);if(!h.isMultiLine()&&o===":"){var s=l.getCursorPosition(),p=new w(c,s.row,s.column),b=p.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=p.stepBackward()),b&&b.type==="support.type"){var x=c.doc.getLine(h.start.row),M=x.substring(h.end.column,h.end.column+1);if(M===";")return h.end.column++,h}}}),this.add("semicolon","insertion",function(d,a,l,c,h){if(h===";"&&l.selection.isEmpty()){var o=l.getCursorPosition(),s=c.doc.getLine(o.row),p=s.substring(o.column,o.column+1);if(p===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(d,a,l,c,h){if(h==="!"&&l.selection.isEmpty()){var o=l.getCursorPosition(),s=c.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(s.substring(o.column)))return{text:"!important",selection:[10,10]}}})};f.inherits(u,g),r.CssBehaviour=u}),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,m){var f=e("../lib/oop"),g=e("./text").Mode,w=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new c};f.inherits(h,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,s,p){var b=this.$getIndent(s),x=this.getTokenizer().getLineTokens(s,o).tokens;if(x.length&&x[x.length-1].type=="comment")return b;var M=s.match(/^.*\{\s*$/);return M&&(b+=p),b},this.checkOutdent=function(o,s,p){return this.$outdent.checkOutdent(s,p)},this.autoOutdent=function(o,s,p){this.$outdent.autoOutdent(s,p)},this.getCompletions=function(o,s,p,b){return this.$completer.getCompletions(o,s,p,b)},this.createWorker=function(o){var s=new d(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(o.getDocument()),s.on("annotate",function(p){o.setAnnotations(p.data)}),s.on("terminate",function(){o.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=r.FoldMode=function(u,d){this.defaultMode=u,this.subModes=d};f.inherits(w,g),(function(){this.$getMode=function(u){typeof u!="string"&&(u=u[0]);for(var d in this.subModes)if(u.indexOf(d)===0)return this.subModes[d];return null},this.$tryMode=function(u,d,a,l){var c=this.$getMode(u);return c?c.getFoldWidget(d,a,l):""},this.getFoldWidget=function(u,d,a){return this.$tryMode(u.getState(a-1),u,d,a)||this.$tryMode(u.getState(a),u,d,a)||this.defaultMode.getFoldWidget(u,d,a)},this.getFoldWidgetRange=function(u,d,a){var l=this.$getMode(u.getState(a-1));return(!l||!l.getFoldWidget(u,d,a))&&(l=this.$getMode(u.getState(a))),(!l||!l.getFoldWidget(u,d,a))&&(l=this.defaultMode),l.getFoldWidgetRange(u,d,a)}}).call(w.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,m){var f=e("../../lib/oop"),g=e("./mixed").FoldMode,w=e("./xml").FoldMode,u=e("./cstyle").FoldMode,d=r.FoldMode=function(a,l){g.call(this,new w(a,l),{"js-":new u,"css-":new u})};f.inherits(d,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,m){function f(s,p){return s.type.lastIndexOf(p+".xml")>-1}function g(s,p){for(var b=new u(s,p.row,p.column),x=b.getCurrentToken();x&&!f(x,"tag-name");)x=b.stepBackward();if(x)return x.value}function w(s,p){for(var b=new u(s,p.row,p.column),x=b.getCurrentToken();x&&!f(x,"attribute-name");)x=b.stepBackward();if(x)return x.value}var u=e("../token_iterator").TokenIterator,d=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["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"],l=d.concat(a),c={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:{}},h=Object.keys(c),o=function(){};(function(){this.getCompletions=function(s,p,b,x){var M=p.getTokenAt(b.row,b.column);if(!M)return[];if(f(M,"tag-name")||f(M,"tag-open")||f(M,"end-tag-open"))return this.getTagCompletions(s,p,b,x);if(f(M,"tag-whitespace")||f(M,"attribute-name"))return this.getAttributeCompletions(s,p,b,x);if(f(M,"attribute-value"))return this.getAttributeValueCompletions(s,p,b,x);var R=p.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(R)?this.getHTMLEntityCompletions(s,p,b,x):[]},this.getTagCompletions=function(s,p,b,x){return h.map(function(M){return{value:M,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(s,p,b,x){var M=g(p,b);if(!M)return[];var R=l;return M in c&&(R=R.concat(Object.keys(c[M]))),R.map(function(A){return{caption:A,snippet:A+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(s,p,b,x){var M=g(p,b),R=w(p,b);if(!M)return[];var A=[];return M in c&&R in c[M]&&typeof c[M][R]=="object"&&(A=Object.keys(c[M][R])),A.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(s,p,b,x){var M=["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 M.map(function(R){return{caption:R,snippet:R,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,m){var f=e("../lib/oop"),g=e("../lib/lang"),w=e("./text").Mode,u=e("./javascript").Mode,d=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,h=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,s=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new h,this.createModeDelegates({"js-":u,"css-":d}),this.foldingRules=new c(this.voidElements,g.arrayToMap(p))};f.inherits(b,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(s),this.getNextLineIndent=function(x,M,R){return this.$getIndent(M)},this.checkOutdent=function(x,M,R){return!1},this.getCompletions=function(x,M,R,A){return this.$completer.getCompletions(x,M,R,A)},this.createWorker=function(x){if(this.constructor==b){var M=new o(["ace"],"ace/mode/html_worker","Worker");return M.attachToDocument(x.getDocument()),this.fragmentContext&&M.call("setOptions",[{context:this.fragmentContext}]),M.on("error",function(R){x.setAnnotations(R.data)}),M.on("terminate",function(){x.clearAnnotations()}),M}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),r.Mode=b}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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",u=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",d=function(){var a=this.createKeywordMapper({keyword:w,"support.function.builtin":u,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",h="(?:\\d+)",o="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",s="(?:(?:"+o+"|"+h+"))",p="(?:"+s+"|"+o+")",b="(?:&"+h+")",x="[a-zA-Z_][a-zA-Z0-9_]*",M="(?:"+x+"(?==))",R="(?:\\$(?:SHLVL|\\$|\\!|\\?))",A="(?:"+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,D){var I=C[2]=="-"?"indentedHeredoc":"heredoc",T=C.split(this.splitRegex);return D.push(I,T[4]),[{type:"constant",value:T[1]},{type:"text",value:T[2]},{type:"string",value:T[3]},{type:"support.class",value:T[4]},{type:"string",value:T[5]}]},rules:{heredoc:[{onMatch:function(C,O,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[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:R},{token:"variable",regex:M},{include:"variables"},{token:"support.function",regex:A},{token:"support.function",regex:b},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:l+"\\b"},{token:a,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()};f.inherits(d,g),r.ShHighlightRules=d}),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,m){var f=e("../lib/oop"),g=e("./text").Mode,w=e("./sh_highlight_rules").ShHighlightRules,u=e("../range").Range,d=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=w,this.foldingRules=new d,this.$behaviour=this.$defaultBehaviour};f.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,h,o){var s=this.$getIndent(h),p=this.getTokenizer().getLineTokens(h,c),b=p.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(c=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(s+=o)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,h,o){if(o!==`\r
995
+ `&&o!=="\r"&&o!==`
996
+ `)return!1;var s=this.getTokenizer().getLineTokens(h.trim(),c).tokens;if(!s)return!1;do var p=s.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&l[p.value]:!1},this.autoOutdent=function(c,h,o){o+=1;var s=this.$getIndent(h.getLine(o)),p=h.getTabString();s.slice(-p.length)==p&&h.remove(new u(o,s.length-p.length,o,s.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(a.prototype),r.Mode=a}),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,m){var f=e("../lib/oop"),g=e("../lib/lang"),w=e("./text").Mode,u=e("./xml_highlight_rules").XmlHighlightRules,d=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,l=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=u,this.$behaviour=new d,this.foldingRules=new a};f.inherits(c,w),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(h){var o=new l(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(h.getDocument()),o.on("error",function(s){h.setAnnotations(s.data)}),o.on("terminate",function(){h.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),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,m){var f=e("../lib/oop"),g=e("./behaviour/cstyle").CstyleBehaviour,w=e("./text").Mode,u=e("./markdown_highlight_rules").MarkdownHighlightRules,d=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=u,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 d,this.$behaviour=new g({braces:!0})};f.inherits(a,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,c,h){if(l=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!o)return"";var s=o[2];return s||(s=parseInt(o[3],10)+1+"."),o[1]+s+o[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/markdown"],function(e){t&&(t.exports=e)})})()})(hg)),hg.exports}w_();var fg={exports:{}},pg;function x_(){return pg||(pg=1,(function(t,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.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,m){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var f=e("../lib/dom");f.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){t&&(t.exports=e)})})()})(fg)),fg.exports}x_();var gg={exports:{}},mg;function C_(){return mg||(mg=1,(function(t,n){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,m){function f(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var g=e("./lib/dom"),w=e("./lib/oop"),u=e("./lib/event_emitter").EventEmitter,d=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,o=e("./clipboard"),s={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,D){var I=C.session.getTextRange();return D?I.replace(/\n\r?([ \t]*\S)/g,`
1127
+ `+D+"$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:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};s.SELECTED_TEXT=s.SELECTION;var p=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=s}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(T){return T=T.substr(1),/^\d+$/.test(T)?[{tabstopId:parseInt(T,10)}]:[{text:T}]}function D(T){return"(?:[^\\\\"+T+"]|\\\\.)"}var I={regex:"/("+D("/")+"+)/",onMatch:function(T,B,F){var L=F[0];return L.fmtString=!0,L.guard=T.slice(1,-1),L.flag="",""},next:"formatString"};return C.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(T,B,F){var L=T[1];return(L=="}"&&F.length||"`$\\".indexOf(L)!=-1)&&(T=L),[T]}},{regex:/}/,onMatch:function(T,B,F){return[F.length?F.shift():T]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(T,B,F){var L=O(T.substr(1));return F.unshift(L[0]),L},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(T,B,F){var L=T.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return F[0].choices=L,[L[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(T,B,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(T,B,F){var L=T[1];return L=="}"&&F.length||"`$\\".indexOf(L)!=-1?T=L:L=="n"?T=`
1128
+ `:L=="t"?T=" ":"ulULE".indexOf(L)!=-1&&(T={changeCase:L,local:L>"a"}),[T]}},{regex:"/\\w*}",onMatch:function(T,B,F){var L=F.shift();return L&&(L.flag=T.slice(1,-1)),this.next=L&&L.tabstopId?"start":"",[L||T]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(T,B,F){return[{text:T.slice(1)}]}},{regex:/\${\w+/,onMatch:function(T,B,F){var L={text:T.slice(2)};return F.unshift(L),[L]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(T,B,F){var L=F.shift();return this.next=L&&L.tabstopId?"start":"",[L||T]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(T,B,F){var L=F[0];return L.formatFunction=T.slice(2,-1),[F.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(T,B,F){T[1]=="+"&&(F[0].ifEnd=F[0]),T[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,D){return this.getTokenizer().getLineTokens(O,D).tokens.map(function(I){return I.value||I})},C.prototype.getVariableValue=function(O,D,I){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var T=this.variables[D];return typeof T=="function"&&(T=this.variables[D](O,D,I)),T??""},C.prototype.tmStrFormat=function(O,D,I){if(!D.fmt)return O;var T=D.flag||"",B=D.guard;B=new RegExp(B,T.replace(/[^gim]/g,""));var F=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,L=this,$=O.replace(B,function(){var _=L.variables.__;L.variables.__=[].slice.call(arguments);for(var N=L.resolveVariables(F,I),W="E",U=0;U<N.length;U++){var G=N[U];if(typeof G=="object")if(N[U]="",G.changeCase&&G.local){var J=N[U+1];J&&typeof J=="string"&&(G.changeCase=="u"?N[U]=J[0].toUpperCase():N[U]=J[0].toLowerCase(),N[U+1]=J.substr(1))}else G.changeCase&&(W=G.changeCase);else W=="U"?N[U]=G.toUpperCase():W=="L"&&(N[U]=G.toLowerCase())}return L.variables.__=_,N.join("")});return $},C.prototype.tmFormatFunction=function(O,D,I){return D.formatFunction=="upcase"?O.toUpperCase():D.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,D){function I(W){var U=O.indexOf(W,L+1);U!=-1&&(L=U)}for(var T=[],B="",F=!0,L=0;L<O.length;L++){var $=O[L];if(typeof $=="string"){T.push($),$==`
1129
+ `?(F=!0,B=""):F&&(B=/^\t*/.exec($)[0],F=/\S/.test($));continue}if($){if(F=!1,$.fmtString){var _=O.indexOf($,L+1);_==-1&&(_=O.length),$.fmt=O.slice(L+1,_),L=_}if($.text){var N=this.getVariableValue(D,$.text,B)+"";$.fmtString&&(N=this.tmStrFormat(N,$,D)),$.formatFunction&&(N=this.tmFormatFunction(N,$,D)),N&&!$.ifEnd?(T.push(N),I($)):!N&&$.ifEnd&&I($.ifEnd)}else $.elseEnd?I($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&T.push($)}}return T},C.prototype.getDisplayTextForSnippet=function(O,D){var I=b.call(this,O,D);return I.text},C.prototype.insertSnippetForSelection=function(O,D,I){I===void 0&&(I={});var T=b.call(this,O,D,I),B=O.getSelectionRange(),F=O.session.replace(B,T.text),L=new x(O),$=O.inVirtualSelectionMode&&O.selection.index;L.addTabstops(T.tabstops,B.start,F,$)},C.prototype.insertSnippet=function(O,D,I){I===void 0&&(I={});var T=this;if(O.inVirtualSelectionMode)return T.insertSnippetForSelection(O,D,I);O.forEachSelection(function(){T.insertSnippetForSelection(O,D,I)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var D=O.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!O.session.$mode.inlinePhp&&(D="html");var I=O.getCursorPosition(),T=O.session.getState(I.row);typeof T=="object"&&(T=T[0]),T.substring&&(T.substring(0,3)=="js-"?D="javascript":T.substring(0,4)=="css-"?D="css":T.substring(0,4)=="php-"&&(D="php"))}return D},C.prototype.getActiveScopes=function(O){var D=this.$getScope(O),I=[D],T=this.snippetMap;return T[D]&&T[D].includeScopes&&I.push.apply(I,T[D].includeScopes),I.push("_"),I},C.prototype.expandWithTab=function(O,D){var I=this,T=O.forEachSelection(function(){return I.expandSnippetForSelection(O,D)},null,{keepOrder:!0});return T&&O.tabstopManager&&O.tabstopManager.tabNext(),T},C.prototype.expandSnippetForSelection=function(O,D){var I=O.getCursorPosition(),T=O.session.getLine(I.row),B=T.substring(0,I.column),F=T.substr(I.column),L=this.snippetMap,$;return this.getActiveScopes(O).some(function(_){var N=L[_];return N&&($=this.findMatchingSnippet(N,B,F)),!!$},this),$?(D&&D.dryRun||(O.session.doc.removeInLine(I.row,I.column-$.replaceBefore.length,I.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(O,$.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,D,I){for(var T=O.length;T--;){var B=O[T];if(!(B.startRe&&!B.startRe.test(D))&&!(B.endRe&&!B.endRe.test(I))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(D):[""],B.matchAfter=B.endRe?B.endRe.exec(I):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(D)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(I)[0]:"",B}},C.prototype.register=function(O,D){function I(_){return _&&!/^\^?\(.*\)\$?$|^\\b$/.test(_)&&(_="(?:"+_+")"),_||""}function T(_,N,W){return _=I(_),N=I(N),_=N+_,_&&_[_.length-1]!="$"&&(_+="$"),new RegExp(_)}function B(_){_.scope||(_.scope=D||"_"),D=_.scope,F[D]||(F[D]=[],L[D]={});var N=L[D];if(_.name){var W=N[_.name];W&&$.unregister(W),N[_.name]=_}F[D].push(_),_.prefix&&(_.tabTrigger=_.prefix),!_.content&&_.body&&(_.content=Array.isArray(_.body)?_.body.join(`
1130
+ `):_.body),_.tabTrigger&&!_.trigger&&(!_.guard&&/^\w/.test(_.tabTrigger)&&(_.guard="\\b"),_.trigger=d.escapeRegExp(_.tabTrigger)),!(!_.trigger&&!_.guard&&!_.endTrigger&&!_.endGuard)&&(_.startRe=T(_.trigger,_.guard),_.triggerRe=new RegExp(_.trigger),_.endRe=T(_.endTrigger,_.endGuard),_.endTriggerRe=new RegExp(_.endTrigger))}var F=this.snippetMap,L=this.snippetNameMap,$=this;O||(O=[]),Array.isArray(O)?O.forEach(B):Object.keys(O).forEach(function(_){B(O[_])}),this._signal("registerSnippets",{scope:D})},C.prototype.unregister=function(O,D){function I(F){var L=B[F.scope||D];if(L&&L[F.name]){delete L[F.name];var $=T[F.scope||D],_=$&&$.indexOf(F);_>=0&&$.splice(_,1)}}var T=this.snippetMap,B=this.snippetNameMap;O.content?I(O):Array.isArray(O)&&O.forEach(I)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var D=[],I={},T=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=T.exec(O);){if(B[1])try{I=JSON.parse(B[1]),D.push(I)}catch{}if(B[4])I.content=B[4].replace(/^\t/gm,""),D.push(I),I={};else{var F=B[2],L=B[3];if(F=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=$.exec(L)[1],I.trigger=$.exec(L)[1],I.endTrigger=$.exec(L)[1],I.endGuard=$.exec(L)[1]}else F=="snippet"?(I.tabTrigger=L.match(/^\S*/)[0],I.name||(I.name=L)):F&&(I[F]=L)}}return D},C.prototype.getSnippetByName=function(O,D){var I=this.snippetNameMap,T;return this.getActiveScopes(D).some(function(B){var F=I[B];return F&&(T=F[O]),!!T},this),T},C})();w.implement(p.prototype,u);var b=function(C,O,D){function I(ce){for(var pe=[],ve=0;ve<ce.length;ve++){var $e=ce[ve];if(typeof $e=="object"){if(N[$e.tabstopId])continue;var Ee=ce.lastIndexOf($e,ve-1);$e=pe[Ee]||{tabstopId:$e.tabstopId}}pe[ve]=$e}return pe}D===void 0&&(D={});var T=C.getCursorPosition(),B=C.session.getLine(T.row),F=C.session.getTabString(),L=B.match(/^\s*/)[0];T.column<L.length&&(L=L.slice(0,T.column)),O=O.replace(/\r/g,"");var $=this.tokenizeTmSnippet(O);$=this.resolveVariables($,C),$=$.map(function(ce){return ce==`
1131
+ `&&!D.excludeExtraIndent?ce+L:typeof ce=="string"?ce.replace(/\t/g,F):ce});var _=[];$.forEach(function(ce,pe){if(typeof ce=="object"){var ve=ce.tabstopId,$e=_[ve];if($e||($e=_[ve]=[],$e.index=ve,$e.value="",$e.parents={}),$e.indexOf(ce)===-1){ce.choices&&!$e.choices&&($e.choices=ce.choices),$e.push(ce);var Ee=$.indexOf(ce,pe+1);if(Ee!==-1){var qe=$.slice(pe+1,Ee),He=qe.some(function(tt){return typeof tt=="object"});He&&!$e.value?$e.value=qe:qe.length&&(!$e.value||typeof $e.value!="string")&&($e.value=qe.join(""))}}}}),_.forEach(function(ce){ce.length=0});for(var N={},W=0;W<$.length;W++){var U=$[W];if(typeof U=="object"){var G=U.tabstopId,J=_[G],te=$.indexOf(U,W+1);if(N[G]){N[G]===U&&(delete N[G],Object.keys(N).forEach(function(ce){J.parents[ce]=!0}));continue}N[G]=U;var he=J.value;typeof he!="string"?he=I(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),$.splice.apply($,[W+1,Math.max(0,te-W)].concat(he,U)),J.indexOf(U)===-1&&J.push(U)}}var ee=0,le=0,se="";return $.forEach(function(ce){if(typeof ce=="string"){var pe=ce.split(`
1132
+ `);pe.length>1?(le=pe[pe.length-1].length,ee+=pe.length-1):le+=ce.length,se+=ce}else ce&&(ce.start?ce.end={row:ee,column:le}:ce.start={row:ee,column:le})}),{text:se,tabstops:_,tokens:$}},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=d.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 D=O.action[0]=="r",I=this.selectedTabstop||{},T=I.parents||{},B=this.tabstops.slice(),F=0;F<B.length;F++){var L=B[F],$=L==I||T[L.index];if(L.rangeList.$bias=$?0:1,O.action=="remove"&&L!==I){var _=L.parents&&L.parents[I.index],N=L.rangeList.pointIndex(O.start,_);N=N<0?-N-1:N+1;var W=L.rangeList.pointIndex(O.end,_);W=W<0?-W-1:W-1;for(var U=L.rangeList.ranges.slice(N,W),G=0;G<U.length;G++)this.removeRange(U[G])}L.rangeList.$onChange(O)}var J=this.session;!this.$inChange&&D&&J.getLength()==1&&!J.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var O=this.selectedTabstop;if(!(!O||!O.hasLinkedRanges||!O.firstNonLinked)){this.$inChange=!0;for(var D=this.session,I=D.getTextRange(O.firstNonLinked),T=0;T<O.length;T++){var B=O[T];if(B.linked){var F=B.original,L=r.snippetManager.tmStrFormat(I,F,this.editor);D.replace(B,L)}}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,D=this.editor.selection.anchor,I=this.editor.selection.isEmpty(),T=0;T<this.ranges.length;T++)if(!this.ranges[T].linked){var B=this.ranges[T].contains(O.row,O.column),F=I||this.ranges[T].contains(D.row,D.column);if(B&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var D=this.tabstops.length,I=this.index+(O||1);I=Math.min(Math.max(I,1),D),I==D&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=O,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var I=D.firstNonLinked||D;if(D.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var T=this.editor.multiSelect;T.toSingleRange(I);for(var B=0;B<D.length;B++)D.hasLinkedRanges&&D[B].linked||T.addRange(D[B].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,D,I){var T=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var B=a.fromPoints(I,I);R(B.start,D),R(B.end,D),O[0]=[B],O[0].index=0}var F=this.index,L=[F+1,0],$=this.ranges,_=this.snippetId=(this.snippetId||0)+1;O.forEach(function(N,W){var U=this.$openTabstops[W]||N;U.snippetId=_;for(var G=0;G<N.length;G++){var J=N[G],te=a.fromPoints(J.start,J.end||J.start);M(te.start,D),M(te.end,D),te.original=J,te.tabstop=U,$.push(te),U!=N?U.unshift(te):U[G]=te,J.fmtString||U.firstNonLinked&&T?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(L.push(U),this.$openTabstops[W]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new l,U.rangeList.$bias=0,U.rangeList.addList(U)},this),L.length>2&&(this.tabstops.length&&L.push(L.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,L))},C.prototype.addTabstopMarkers=function(O){var D=this.session;O.forEach(function(I){I.markerId||(I.markerId=D.addMarker(I,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var D=this.session;O.forEach(function(I){D.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(D){D.snippetId===O?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},C.prototype.removeRange=function(O){var D=O.tabstop.indexOf(O);D!=-1&&O.tabstop.splice(D,1),D=this.ranges.indexOf(O),D!=-1&&this.ranges.splice(D,1),D=O.tabstop.rangeList.ranges.indexOf(O),D!=-1&&O.tabstop.splice(D,1),this.session.removeMarker(O.markerId),O.tabstop.length||(D=this.tabstops.indexOf(O.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new c,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 M=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},R=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};g.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 p;var A=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(A.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,m){var f=e("../virtual_renderer").VirtualRenderer,g=e("../editor").Editor,w=e("../range").Range,u=e("../lib/event"),d=e("../lib/lang"),a=e("../lib/dom"),l=e("../config").nls,c=e("./../lib/useragent"),h=function(M){return"suggest-aria-id:".concat(M)},o=c.isSafari?"menu":"listbox",s=c.isSafari?"menuitem":"option",p=c.isSafari?"aria-current":"aria-selected",b=function(M){var R=new f(M);R.$maxLines=4;var A=new g(R);return A.setHighlightActiveLine(!1),A.setShowPrintMargin(!1),A.renderer.setShowGutter(!1),A.renderer.setHighlightGutterLine(!1),A.$mouseHandler.$focusTimeout=0,A.$highlightTagPending=!0,A},x=(function(){function M(R){var A=a.createElement("div"),C=b(A);R&&R.appendChild(A),A.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",l("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",l("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($){var _=$.getDocumentPosition();C.selection.moveToPosition(_),T.start.row=T.end.row=_.row,$.stop()});var D,I=new w(-1,0,-1,1/0),T=new w(-1,0,-1,1/0);T.id=C.session.addMarker(T,"ace_active-line","fullLine"),C.setSelectOnHover=function($){$?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($){if(!D){D=$;return}if(!(D.x==$.x&&D.y==$.y)){D=$,D.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var _=D.getDocumentPosition().row;I.start.row!=_&&(I.id||C.setRow(_),F(_))}}),C.renderer.on("beforeRender",function(){if(D&&I.start.row!=-1){D.$pos=null;var $=D.getDocumentPosition().row;I.id||C.setRow($),F($,!0)}}),C.renderer.on("afterRender",function(){for(var $=C.renderer.$textLayer,_=$.config.firstRow,N=$.config.lastRow;_<=N;_++){var W=$.element.childNodes[_-$.config.firstRow];W.setAttribute("role",s),W.setAttribute("aria-roledescription",l("autocomplete.popup.item.aria-roledescription","item")),W.setAttribute("aria-setsize",C.data.length),W.setAttribute("aria-describedby","doc-tooltip"),W.setAttribute("aria-posinset",_+1);var U=C.getData(_);if(U){var G="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");W.setAttribute("aria-label",G)}var J=W.querySelectorAll(".ace_completion-highlight");J.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var $=C.getRow(),_=C.renderer.$textLayer,N=_.element.childNodes[$-_.config.firstRow],W=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(p),C.selectedNode.removeAttribute("id")),W.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=h($);a.addCssClass(N,"ace_selected"),N.id=U,_.element.setAttribute("aria-activedescendant",U),W.setAttribute("aria-activedescendant",U),N.setAttribute(p,"true")}});var B=function(){F(-1)},F=function($,_){$!==I.start.row&&(I.start.row=I.end.row=$,_||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return I.start.row},u.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,B()}),C.on("hide",B),C.on("changeSelection",B),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function($){var _=C.data[$];return typeof _=="string"?_:_&&_.value||""};var L=C.session.bgTokenizer;return L.$tokenizeRow=function($){function _(ce,pe){ce&&W.push({type:(N.className||"")+(pe||""),value:ce})}var N=C.data[$],W=[];if(!N)return W;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,G=U.toLowerCase(),J=(C.filterText||"").toLowerCase(),te=0,he=0,ee=0;ee<=J.length;ee++)if(ee!=he&&(N.matchMask&1<<ee||ee==J.length)){var le=J.slice(he,ee);he=ee;var se=G.indexOf(le,te);if(se==-1)continue;_(U.slice(te,se),""),te=se+le.length,_(U.slice(se,te),"completion-highlight")}return _(U.slice(te,U.length),""),W.push({type:"completion-spacer",value:" "}),N.meta&&W.push({type:"completion-meta",value:N.meta}),N.message&&W.push({type:"completion-message",value:N.message}),W},L.$updateOnChange=O,L.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($,_){C.filterText=_||"",C.setValue(d.stringRepeat(`
1140
+ `,$.length),-1),C.data=$||[],C.setRow(0)},C.getData=function($){return C.data[$]},C.getRow=function(){return T.start.row},C.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),T.start.row!=$&&(C.selection.clearSelection(),T.start.row=T.end.row=$||0,C.session._emit("changeBackMarker"),C.moveCursorTo($||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($,_,N,W){if(!W&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===$.top&&C.anchorPos.left===$.left&&C.anchor===N)return!0;var U=this.container,G=this.renderer.scrollBar.width||10,J=window.innerHeight-G,te=window.innerWidth-G,he=this.renderer,ee=he.$maxLines*_*1.4,le={top:0,bottom:0},se=J-$.top-3*this.$borderSize-_,ce=$.top-3*this.$borderSize;N||(ce<=se||se>=ee?N="bottom":N="top"),N==="top"?(le.bottom=$.top-this.$borderSize,le.top=le.bottom-ee):N==="bottom"&&(le.top=$.top+_+this.$borderSize,le.bottom=le.top+ee);var pe=le.top>=0&&le.bottom<=J;if(!W&&!pe)return!1;pe?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=se,N==="top"?(U.style.top="",U.style.bottom=J+G-le.bottom+"px",C.isTopdown=!1):(U.style.top=le.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var ve=$.left;return ve+U.offsetWidth>te&&(ve=te-U.offsetWidth),U.style.left=ve+"px",U.style.right="",a.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),D=null),C.anchorPos=$,C.anchor=N,!0},C.show=function($,_,N){this.tryShow($,_,N?"bottom":void 0,!0)},C.goTo=function($){var _=this.getRow(),N=this.session.getLength()-1;switch($){case"up":_=_<=0?N:_-1;break;case"down":_=_>=N?-1:_+1;break;case"start":_=0;break;case"end":_=N}this.setRow(_)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return M})();a.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=b,r.getAriaId=h}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,m){var f=(function(){function g(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(w){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var d=this.popup.getRow(),a=this.popup.renderer.$textLayer,l=a.element.childNodes[d-a.config.firstRow];if(l){for(var c="doc-tooltip ",h=0;h<this._lines.length;h++)c+="ace-inline-screenreader-line-".concat(h," ");l.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var u=this.createCodeBlock();this.screenReaderDiv.appendChild(u)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.setAttribute("id","ace-inline-screenreader");for(var u=0;u<this._lines.length;u++){var d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(u));var a=document.createTextNode(this._lines[u]);d.appendChild(a),w.appendChild(d)}return w},g})();r.AceInlineScreenReader=f}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,m){var f=e("../snippets").snippetManager,g=e("./inline_screenreader").AceInlineScreenReader,w=(function(){function u(){this.editor=null}return u.prototype.show=function(d,a,l){if(l=l||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(d));var c=a.snippet?f.getDisplayTextForSnippet(d,a.snippet):a.value;return a.hideInlinePreview||!c||!c.startsWith(l)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(l.length),c===""?d.removeGhostText():d.setGhostText(c),!0)},u.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},u.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},u.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},u})();r.AceInline=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,m){r.parForEach=function(g,w,u){var d=0,a=g.length;a===0&&u();for(var l=0;l<a;l++)w(g[l],function(c,h){d++,d===a&&u(c,h)})};var f=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,w,u){u=u||f;for(var d=[],a=w-1;a>=0&&u.test(g[a]);a--)d.push(g[a]);return d.reverse().join("")},r.retrieveFollowingIdentifier=function(g,w,u){u=u||f;for(var d=[],a=w;a<g.length&&u.test(g[a]);a++)d.push(g[a]);return d},r.getCompletionPrefix=function(g){var w=g.getCursorPosition(),u=g.session.getLine(w.row),d;return g.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(l){!d&&l&&(d=this.retrievePrecedingIdentifier(u,w.column,l))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(u,w.column)},r.triggerAutocomplete=function(g,u){var u=u??g.session.getPrecedingCharacter();return g.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.triggerCharacters.includes(u)})}}),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,m){var f=e("./keyboard/hash_handler").HashHandler,g=e("./autocomplete/popup").AcePopup,w=e("./autocomplete/inline").AceInline,u=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),a=e("./lib/lang"),l=e("./lib/dom"),c=e("./snippets").snippetManager,h=e("./config"),o=e("./lib/event"),s=e("./lib/scroll").preventParentScroll,p=function(R,A){A.completer&&A.completer.destroy()},b=(function(){function R(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new f,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=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var A=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!A||this.editor.completers.length===0||(this.completions=new M(R.completionsForLoading),this.openPopup(this.editor,A.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(R,"completionsForLoading",{get:function(){return[{caption:h.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),R.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(A){this.insertMatch(),A.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},R.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,this.inlineRenderer},R.prototype.getPopup=function(){return this.popup||this.$init()},R.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},R.prototype.$seen=function(A){!this.hasSeen.has(A)&&A&&A.completer&&A.completer.onSeen&&typeof A.completer.onSeen=="function"&&(A.completer.onSeen(this.editor,A),this.hasSeen.add(A))},R.prototype.$onPopupChange=function(A){if(this.inlineRenderer&&this.inlineEnabled){var C=A?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)},R.prototype.$updateGhostText=function(A){var C=this.base.row,O=this.base.column,D=this.editor.getCursorPosition().column,I=this.editor.session.getLine(C).slice(O,D);this.inlineRenderer.show(this.editor,A,I)?this.$seen(A):this.inlineRenderer.hide()},R.prototype.$onPopupRender=function(){var A=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&&(!A||O.hideInlinePreview)&&this.$seen(O)}},R.prototype.$onPopupShow=function(A){this.$onPopupChange(A),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},R.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var A=this.editor.container.parentNode,C=[];A;)C.push(A),A.addEventListener("scroll",this.onLayoutChange,{passive:!0}),A=A.parentNode;this.$elements=C}},R.prototype.unObserveLayoutChanges=function(){var A=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",A.onLayoutChange,{passive:!0})}),this.$elements=null},R.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},R.prototype.$updatePopupPosition=function(){var A=this.editor,C=A.renderer,O=C.layerConfig.lineHeight,D=C.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var I=A.container.getBoundingClientRect();D.top+=I.top-C.layerConfig.offset,D.left+=I.left-A.renderer.scrollLeft,D.left+=C.gutterWidth;var T={top:D.top,left:D.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(T.top+=C.$ghostTextWidget.el.offsetHeight);var B=A.container.getBoundingClientRect().bottom-O,F=B<T.top?{top:B,left:T.left}:T;this.popup.tryShow(F,O,"bottom")||this.popup.tryShow(D,O,"top")||this.popup.show(D,O)},R.prototype.openPopup=function(A,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 D=this.popup.getRow(),I=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:u(this.popup.getRow()),inline:this.inlineEnabled}),A.keyBinding.addKeyboardHandler(this.keyboardHandler);var T;this.stickySelection&&(T=this.popup.data.indexOf(I)),(!T||T===-1)&&(T=0),this.popup.setRow(this.autoSelect?T:-1),T===D&&I!==this.completions.filtered[T]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(T===D&&B){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}O||(this.popup.setTheme(A.getTheme()),this.popup.setFontSize(A.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},R.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()},R.prototype.changeListener=function(A){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()},R.prototype.blurListener=function(A){var C=document.activeElement,O=this.editor.textInput.getElement(),D=A.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(A.relatedTarget),I=this.popup&&this.popup.container;C!=O&&C.parentNode!=I&&!D&&C!=this.tooltipNode&&A.relatedTarget!=O&&this.detach()},R.prototype.mousedownListener=function(A){this.detach()},R.prototype.mousewheelListener=function(A){this.popup&&!this.popup.isMouseOver&&this.detach()},R.prototype.mouseOutListener=function(A){this.popup.isOpen&&this.$updatePopupPosition()},R.prototype.goTo=function(A){this.popup.goTo(A)},R.prototype.insertMatch=function(A,C){if(A||(A=this.popup.getData(this.popup.getRow())),!A)return!1;if(A.value==="")return this.detach();var O=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,A,O.filterText,C);return this.completions==O&&this.detach(),D},R.prototype.showPopup=function(A,C){this.editor&&this.detach(),this.activated=!0,this.editor=A,A.completer!=this&&(A.completer&&A.completer.detach(),A.completer=this),A.on("changeSelection",this.changeListener),A.on("blur",this.blurListener),A.on("mousedown",this.mousedownListener),A.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},R.prototype.getCompletionProvider=function(A){return this.completionProvider||(this.completionProvider=new x(A)),this.completionProvider},R.prototype.gatherCompletions=function(A,C){return this.getCompletionProvider().gatherCompletions(A,C)},R.prototype.updateCompletions=function(A,C){if(A&&this.base&&this.completions){var D=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:D});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,A);return}if(C&&C.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new M(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",A)}var O=this.editor.getSession(),D=this.editor.getCursorPosition(),I=d.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(D.row,D.column-I.length),this.base.$insertRight=!0;var T={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:D}).provideCompletions(this.editor,T,(function(B,F,L){var $=F.filtered,_=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),L){if(!$.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(_)),N){var W=[{caption:N,value:""}];this.completions=new M(W),this.openPopup(this.editor,_,A),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==_&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!L&&this.showLoadingState?new M(R.completionsForLoading.concat($),F.filterText):F,this.openPopup(this.editor,_,A),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!L)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},R.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},R.prototype.updateDocTooltip=function(){var A=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[A.getHoveredRow()]||C[A.getRow()]),D=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,T=0;T<I;T++){var B=this.editor.completers[T];if(B.getDocTooltip&&O.completerId===B.id){D=B.getDocTooltip(O);break}}if(!D&&typeof O!="string"&&(D=O),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},R.prototype.showDocTooltip=function(A){this.tooltipNode||(this.tooltipNode=l.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",s));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;A.docHTML?O.innerHTML=A.docHTML:A.docText&&(O.textContent=A.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,I=D.container.getBoundingClientRect(),T=400,B=300,F=D.renderer.scrollBar.width||10,L=I.left,$=window.innerWidth-I.right-F,_=D.isTopdown?window.innerHeight-F-I.bottom:I.top,N=[Math.min($/T,1),Math.min(L/T,1),Math.min(_/B,1)*.9],W=Math.max.apply(Math,N),U=O.style;U.display="block",W==N[0]||N[0]>=1?(U.left=I.right+1+"px",U.right="",U.maxWidth=T*W+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-I.top,B)+"px"):W==N[1]||N[1]>=1?(U.right=window.innerWidth-I.left+"px",U.left="",U.maxWidth=T*W+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-I.top,B)+"px"):W==N[2]&&(U.left=I.left+"px",U.right="",U.maxWidth=Math.min(T,window.innerWidth-I.left)+"px",D.isTopdown?(U.top=I.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-I.bottom,B)+"px"):(U.top="",U.bottom=window.innerHeight-I.top+"px",U.maxHeight=Math.min(I.top,B)+"px")),l.$fixPositionBug(O)},R.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var A=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==A&&this.editor.focus(),this.tooltipNode=null,A.parentNode&&A.parentNode.removeChild(A)}},R.prototype.onTooltipClick=function(A){for(var C=A.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},R.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var A=this.popup.container;A&&A.parentNode&&A.parentNode.removeChild(A)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},R.for=function(A){return A.completer instanceof R||(A.completer&&(A.completer.destroy(),A.completer=null),h.get("sharedPopups")?(R.$sharedInstance||(R.$sharedInstance=new R),A.completer=R.$sharedInstance):(A.completer=new R,A.once("destroy",p))),A.completer},R})();b.prototype.commands={Up:function(R){R.completer.goTo("up")},Down:function(R){R.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(R){R.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(R){R.completer.goTo("end")},Esc:function(R){R.completer.detach()},Return:function(R){return R.completer.insertMatch()},"Shift-Return":function(R){R.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(R){var A=R.completer.insertMatch();if(A||R.tabstopManager)return A;R.completer.goTo("down")},Backspace:function(R){R.execCommand("backspace");var A=d.getCompletionPrefix(R);!A&&R.completer&&R.completer.detach()},PageUp:function(R){R.completer.popup.gotoPageUp()},PageDown:function(R){R.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function(R,A){var C=b.for(R);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(R,A),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function R(A){this.initialPosition=A,this.active=!0}return R.prototype.insertByIndex=function(A,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(A,this.completions.filtered[C],O)},R.prototype.insertMatch=function(A,C,O){if(!C)return!1;if(A.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(A,C);else{if(!this.completions)return!1;var D=this.completions.filterText.length,I=0;if(C.range&&C.range.start.row===C.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-C.range.start.column,I+=C.range.end.column-this.initialPosition.pos.column),D||I){var T;A.selection.getAllRanges?T=A.selection.getAllRanges():T=[A.getSelectionRange()];for(var B=0,F;F=T[B];B++)F.start.column-=D,F.end.column+=I,A.session.remove(F)}C.snippet?c.insertSnippet(A,C.snippet):this.$insertString(A,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(A,C),C.command&&C.command==="startAutocomplete"&&A.execCommand(C.command)}return A.endOperation(),!0},R.prototype.$insertString=function(A,C){var O=C.value||C;A.execCommand("insertstring",O)},R.prototype.gatherCompletions=function(A,C){var O=A.getSession(),D=A.getCursorPosition(),I=d.getCompletionPrefix(A),T=[];this.completers=A.completers;var B=A.completers.length;return A.completers.forEach(function(F,L){F.getCompletions(A,O,D,I,function($,_){F.hideInlinePreview&&(_=_.map(function(N){return Object.assign(N,{hideInlinePreview:F.hideInlinePreview})})),!$&&_&&(T=T.concat(_)),C(null,{prefix:d.getCompletionPrefix(A),matches:T,finished:--B===0})})}),!0},R.prototype.provideCompletions=function(A,C,O){var D=(function(F){var L=F.prefix,$=F.matches;this.completions=new M($),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(L),(F.finished||this.completions.filtered.length)&&O(null,this.completions,F.finished)}).bind(this),I=!0,T=null;if(this.gatherCompletions(A,(function(F,L){if(this.active){F&&(O(F,[],!0),this.detach());var $=L.prefix;if($.indexOf(L.prefix)===0){if(I){T=L;return}D(L)}}}).bind(this)),I=!1,T){var B=T;T=null,D(B)}},R.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(A){typeof A.cancel=="function"&&A.cancel()})},R})(),M=(function(){function R(A,C){this.all=A,this.filtered=A,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return R.prototype.setFilter=function(A){if(A.length>this.filterText&&A.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=A,C=this.filterCompletions(C,this.filterText),C=C.sort(function(D,I){return I.exactMatch-D.exactMatch||I.$score-D.$score||(D.caption||D.value).localeCompare(I.caption||I.value)});var O=null;C=C.filter(function(D){var I=D.snippet||D.caption||D.value;return I===O?!1:(O=I,!0)}),this.filtered=C},R.prototype.filterCompletions=function(A,C){var O=[],D=C.toUpperCase(),I=C.toLowerCase();e:for(var T=0,B;B=A[T];T++){if(B.skipFilter){B.$score=B.score,O.push(B);continue}var F=!this.ignoreCaption&&B.caption||B.value||B.snippet;if(F){var L=-1,$=0,_=0,N,W;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 G=0;G<C.length;G++){var J=F.indexOf(I[G],L+1),te=F.indexOf(D[G],L+1);if(N=J>=0&&(te<0||J<te)?J:te,N<0)continue e;W=N-L-1,W>0&&(L===-1&&(_+=10),_+=W,$|=1<<G),L=N}}B.matchMask=$,B.exactMatch=_?0:1,B.$score=(B.score||0)-_,O.push(B)}}return O},R})();r.Autocomplete=b,r.CompletionProvider=x,r.FilteredList=M}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,m){var f=(function(){function g(w,u){u&&(this.markerType=u.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(u){return u.range.contains(w.row,w.column)})},g.prototype.markersComparator=function(w,u){return w.range.start.row-u.range.start.row},g.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(w,u,d,a){if(!(!this.markers||!this.markers.length))for(var l=a.firstRow,c=a.lastRow,h,o=0,s=0,p=0;p<this.markers.length;p++){var b=this.markers[p];if(!(b.range.end.row<l)&&!(b.range.start.row>c)&&(b.range.start.row===s?o++:(s=b.range.start.row,o=0),!(o>200))){var x=b.range.clipRows(l,c);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var M=x.toScreenRange(d);if(M.isEmpty()){h=d.getNextFoldLine(x.end.row,h),h&&h.end.row>x.end.row&&(l=h.end.row);continue}this.markerType==="fullLine"?u.drawFullLineMarker(w,M,b.className,a):M.isMultiLine()?this.markerType==="line"?u.drawMultiLineMarker(w,M,b.className,a):u.drawTextMarker(w,M,b.className,a):u.drawSingleLineMarker(w,M,b.className+" ace_br15",a)}}}},g})();f.prototype.MAX_MARKERS=1e4,r.MarkerGroup=f}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,m){function f(d,a){var l=d.getTextRange(w.fromPoints({row:0,column:0},a));return l.split(u).length-1}function g(d,a){var l=f(d,a),c=d.getValue().split(u),h=Object.create(null),o=c[l];return c.forEach(function(s,p){if(!(!s||s===o)){var b=Math.abs(l-p),x=c.length-b;h[s]?h[s]=Math.max(x,h[s]):h[s]=x}}),h}var w=e("../range").Range,u=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(d,a,l,c,h){var o=g(a,l),s=Object.keys(o);h(null,s.map(function(p){return{caption:p,value:p,score:o[p],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,m){var f=e("../snippets").snippetManager,g=e("../autocomplete").Autocomplete,w=e("../config"),u=e("../lib/lang"),d=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,l=e("../autocomplete/text_completer"),c={getCompletions:function(I,T,B,F,L){if(T.$mode.completer)return T.$mode.completer.getCompletions(I,T,B,F,L);var $=I.session.getState(B.row),_=T.$mode.getCompletions($,T,B,F);_=_.map(function(N){return N.completerId=c.id,N}),L(null,_)},id:"keywordCompleter"},h=function(I){var T={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(B,F,L,$){return T[F]=$||""}).replace(/\$(\d+?)/g,function(B,F){return T[F]})},o={getCompletions:function(I,T,B,F,L){var $=[],_=T.getTokenAt(B.row,B.column);_&&_.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=f.getActiveScopes(I);var N=f.snippetMap,W=[];$.forEach(function(U){for(var G=N[U]||[],J=G.length;J--;){var te=G[J],he=te.name||te.tabTrigger;he&&W.push({caption:he,snippet:te.content,meta:te.tabTrigger&&!te.name?te.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),L(null,W)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",u.escapeHTML(I.caption),"</b>","<hr></hr>",u.escapeHTML(h(I.snippet))].join(""))},id:"snippetCompleter"},s=[o,l,c];r.setCompleters=function(I){s.length=0,I&&s.push.apply(s,I)},r.addCompleter=function(I){s.push(I)},r.textCompleter=l,r.keyWordCompleter=c,r.snippetCompleter=o;var p={name:"expandSnippet",exec:function(I){return f.expandWithTab(I)},bindKey:"Tab"},b=function(I,T){x(T.session.$mode)},x=function(I){typeof I=="string"&&(I=w.$modes[I]),I&&(f.files||(f.files={}),M(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(x))},M=function(I,T){!T||!I||f.files[I]||(f.files[I]={},w.loadModule(T,function(B){B&&(f.files[I]=B,!B.snippets&&B.snippetText&&(B.snippets=f.parseSnippetFile(B.snippetText)),f.register(B.snippets||[],B.scope),B.includeScopes&&(f.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},R=function(I){var T=I.editor,B=T.completer&&T.completer.activated;if(I.command.name==="backspace")B&&!d.getCompletionPrefix(T)&&T.completer.detach();else if(I.command.name==="insertstring"&&!B){A=I;var F=I.editor.$liveAutocompletionDelay;F?C.delay(F):O(I)}},A,C=u.delayedCall(function(){O(A)},0),O=function(I){var T=I.editor,B=d.getCompletionPrefix(T),F=I.args,L=d.triggerAutocomplete(T,F);if(B&&B.length>=T.$liveAutocompletionThreshold||L){var $=g.for(T);$.autoShown=!0,$.showPopup(T)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(g.for(this),this.completers||(this.completers=Array.isArray(I)?I:s),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:s),this.commands.on("afterExec",R)):this.commands.off("afterExec",R)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(p),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(p),this.off("changeMode",b))},value:!1}}),r.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function(e){t&&(t.exports=e)})})()})(gg)),gg.exports}C_();var vg={exports:{}},yg;function __(){return yg||(yg=1,(function(t,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.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,m){var f=e("../lib/dom"),g=e("../lib/lang"),w=e("../lib/event"),u=e("./searchbox-css"),d=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),l=e("../config").nls,c=999;f.importCssString(u,"ace_searchbox",!1);var h=(function(){function p(b,x,M){this.activeInput,this.element=f.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:l("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"},l("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:l("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},l("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},l("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:l("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:l("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:l("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:l("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:l("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(b),f.importCssString(u,"ace_searchbox",b.container),w.addListener(this.element,"touchstart",function(R){R.stopPropagation()},b)}return p.prototype.setEditor=function(b){b.searchBox=this,b.renderer.scroller.appendChild(this.element),this.editor=b},p.prototype.setSession=function(b){this.searchRange=null,this.$syncOptions(!0)},p.prototype.onEditorInput=function(){this.find(!1,!1,!0)},p.prototype.$initElements=function(b){this.searchBox=b.querySelector(".ace_search_form"),this.replaceBox=b.querySelector(".ace_replace_form"),this.searchOption=b.querySelector("[action=searchInSelection]"),this.replaceOption=b.querySelector("[action=toggleReplace]"),this.regExpOption=b.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=b.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=b.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=b.querySelector(".ace_search_counter")},p.prototype.$init=function(){var b=this.element;this.$initElements(b);var x=this;w.addListener(b,"mousedown",function(M){setTimeout(function(){x.activeInput.focus()},0),w.stopPropagation(M)}),w.addListener(b,"click",function(M){var R=M.target||M.srcElement,A=R.getAttribute("action");A&&x[A]?x[A]():x.$searchBarKb.commands[A]&&x.$searchBarKb.commands[A].exec(x),w.stopPropagation(M)}),w.addCommandKeyListener(b,function(M,R,A){var C=a.keyCodeToString(A),O=x.$searchBarKb.findKeyCommand(R,C);O&&O.exec&&(O.exec(x),w.stopEvent(M))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),w.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},p.prototype.setSearchRange=function(b){this.searchRange=b,b?this.searchRangeMarker=this.editor.session.addMarker(b,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},p.prototype.$syncOptions=function(b){f.setCssClass(this.replaceOption,"checked",this.searchRange),f.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",f.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),f.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),f.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,b)},p.prototype.highlight=function(b){this.editor.session.highlight(b||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},p.prototype.find=function(b,x,M){if(this.editor.session){var R=this.editor.find(this.searchInput.value,{skipCurrent:b,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:M,range:this.searchRange}),A=!R&&this.searchInput.value;f.setCssClass(this.searchBox,"ace_nomatch",A),this.editor._emit("findSearchBox",{match:!A}),this.highlight(),this.updateCounter()}},p.prototype.updateCounter=function(){var b=this.editor,x=b.$search.$options.re,M=x.unicode,R=0,A=0;if(x){var C=this.searchRange?b.session.getTextRange(this.searchRange):b.getValue();b.$search.$isMultilineSearch(b.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1394
+ `),b.session.doc.$autoNewLine=`
1395
+ `);var O=b.session.doc.positionToIndex(b.selection.anchor);this.searchRange&&(O-=b.session.doc.positionToIndex(this.searchRange.start));for(var D=x.lastIndex=0,I;(I=x.exec(C))&&(R++,D=I.index,D<=O&&A++,!(R>c||!I[0]&&(x.lastIndex=D+=g.skipEmptyMatch(C,D,M),D>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[A,R>c?c+"+":R])},p.prototype.findNext=function(){this.find(!0,!1)},p.prototype.findPrev=function(){this.find(!0,!0)},p.prototype.findAll=function(){var b=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!b&&this.searchInput.value;f.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},p.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},p.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},p.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},p.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()},p.prototype.show=function(b,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&&(b=g.escapeRegExp(b)),b!=null&&(this.searchInput.value=b),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},p.prototype.isFocused=function(){var b=document.activeElement;return b==this.searchInput||b==this.replaceInput},p})(),o=new d;o.bindKeys({"Ctrl-f|Command-f":function(p){var b=p.isReplace=!p.isReplace;p.replaceBox.style.display=b?"":"none",p.replaceOption.checked=!1,p.$syncOptions(),p.searchInput.focus()},"Ctrl-H|Command-Option-F":function(p){p.editor.getReadOnly()||(p.replaceOption.checked=!0,p.$syncOptions(),p.replaceInput.focus())},"Ctrl-G|Command-G":function(p){p.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(p){p.findPrev()},esc:function(p){setTimeout(function(){p.hide()})},Return:function(p){p.activeInput==p.replaceInput&&p.replace(),p.findNext()},"Shift-Return":function(p){p.activeInput==p.replaceInput&&p.replace(),p.findPrev()},"Alt-Return":function(p){p.activeInput==p.replaceInput&&p.replaceAll(),p.findAll()},"Tab|Shift-Tab":function(p){(p.activeInput==p.replaceInput?p.searchInput:p.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(p){p.regExpOption.checked=!p.regExpOption.checked,p.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(p){p.caseSensitiveOption.checked=!p.caseSensitiveOption.checked,p.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(p){p.wholeWordOption.checked=!p.wholeWordOption.checked,p.$syncOptions()}},{name:"toggleReplace",exec:function(p){p.replaceOption.checked=!p.replaceOption.checked,p.$syncOptions()}},{name:"searchInSelection",exec:function(p){p.searchOption.checked=!p.searchRange,p.setSearchRange(p.searchOption.checked&&p.editor.getSelectionRange()),p.$syncOptions()}}]);var s=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(p){p.searchBox.hide()}}]);h.prototype.$searchBarKb=o,h.prototype.$closeSearchBarKb=s,r.SearchBox=h,r.Search=function(p,b){var x=p.searchBox||new h(p),M=p.session.selection.getRange(),R=M.isMultiLine()?"":p.session.getTextRange(M);x.show(R,b)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){t&&(t.exports=e)})})()})(vg)),vg.exports}__();var bg={exports:{}},wg;function k_(){return wg||(wg=1,(function(t,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,m){function f(d,a){function l(I,T,B){if(!(I.length<T)){var F=I.slice(0,T),L=I.slice(T),$=/^(?:(\s+)|(\S+)(\s+))/.exec(L),_=/(?:(\s+)|(\s+)(\S+))$/.exec(F),N=0,W=0;if(_&&!_[2]&&(N=T-_[1].length,W=T),$&&!$[2]&&(N||(N=T),W=T+$[1].length),N)return{start:N,end:W};if(_&&_[2]&&_.index>B)return{start:_.index,end:_.index+_[2].length};if($&&$[2])return N=T+$[2].length,{start:N,end:N+$[3].length}}}for(var c=a.column||d.getOption("printMarginColumn"),h=a.allowMerge!=0,o=Math.min(a.startRow,a.endRow),s=Math.max(a.startRow,a.endRow),p=d.session;o<=s;){var b=p.getLine(o);if(b.length>c){var x=l(b,c,5);if(x){var M=/^\s*/.exec(b)[0];p.replace(new w(o,x.start,o,x.end),`
1396
+ `+M)}s++}else if(h&&/\S/.test(b)&&o!=s){var R=p.getLine(o+1);if(R&&/\S/.test(R)){var A=b.replace(/\s+$/,""),C=R.replace(/^\s+/,""),O=A+" "+C,x=l(O,c,5);if(x&&x.start>A.length||O.length<c){var D=new w(o,A.length,o+1,R.length-C.length);p.replace(D," "),o--,s--}else A.length<b.length&&p.remove(new w(o,A.length,o,b.length))}}o++}}function g(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var a=d.editor,l=a.selection.cursor;if(l.column<=a.renderer.$printMarginColumn)return;var c=a.session.$undoManager.$lastDelta;f(a,{startRow:l.row,endRow:l.row,allowMerge:!1}),c!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var w=e("../range").Range,u=e("../editor").Editor;e("../config").defineOptions(u.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=f}),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,m){function f(y){return{row:y.line,column:y.ch}}function g(y){return new De(y.row,y.column)}function w(y,S,k){if(S.line===k.line&&S.ch>=k.ch-1){var P=y.getLine(S.line),z=P.charCodeAt(S.ch);55296<=z&&z<=55551&&(k.ch+=1)}return{start:S,end:k}}function u(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),ze.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",uo),O(y),ze.on(y.getInputField(),"paste",a(y))}function d(y){y.setOption("disableInput",!1),y.off("cursorActivity",uo),ze.off(y.getInputField(),"paste",a(y)),y.state.vim=null,rn&&clearTimeout(rn)}function a(y){var S=y.state.vim;return S.onPasteFn||(S.onPasteFn=function(){S.insertMode||(y.setCursor(pe(y.getCursor(),0,1)),Bn.enterInsertMode(y,{},S))}),S.onPasteFn}function l(y,S){return S>=y.firstLine()&&S<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function h(y){return"()[]{}".indexOf(y)!=-1}function o(y){return ba.test(y)}function s(y){return ct.test(y)}function p(y){return/^\s*$/.test(y)}function b(y){return".?!".indexOf(y)!=-1}function x(y,S){for(var k=0;k<S.length;k++)if(S[k]==y)return!0;return!1}function M(y,S,k,P,z){if(S===void 0&&!z)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Ht[y]={type:k,defaultValue:S,callback:z},P)for(var j=0;j<P.length;j++)Ht[P[j]]=Ht[y];S&&R(y,S)}function R(y,S,k,P){var z=Ht[y];P=P||{};var j=P.scope;if(!z)return new Error("Unknown option: "+y);if(z.type=="boolean"){if(S&&S!==!0)return new Error("Invalid argument: "+y+"="+S);S!==!1&&(S=!0)}z.callback?(j!=="local"&&z.callback(S,void 0),j!=="global"&&k&&z.callback(S,k)):(j!=="local"&&(z.value=z.type=="boolean"?!!S:S),j!=="global"&&k&&(k.state.vim.options[y]={value:S}))}function A(y,S,k){var P=Ht[y];k=k||{};var z=k.scope;if(!P)return new Error("Unknown option: "+y);if(P.callback){var j=S&&P.callback(void 0,S);return z!=="global"&&j!==void 0?j:z!=="local"?P.callback():void 0}var j=z!=="global"&&S&&S.state.vim.options[y];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=Wn()}function O(y){return y.state.vim||(y.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function D(){je={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Oi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new J,exCommandHistoryController:new J};for(var y in Ht){var S=Ht[y];S.value=S.defaultValue}}function I(y){function S(Y){typeof Y=="string"?Dt.value=Y:Dt=null}if(y[0]=="<"){var k=y.toLowerCase().slice(1,-1),P=k.split("-");if(k=P.pop()||"",k=="lt")y="<";else if(k=="space")y=" ";else if(k=="cr")y=`
1397
+ `;else if(Qi[k]){var z=Dt.value,j={key:Qi[k],target:{value:z,selectionEnd:z.length,selectionStart:z.length}};Dt.onKeyDown&&Dt.onKeyDown(j,Dt.value,S),Dt&&Dt.onKeyUp&&Dt.onKeyUp(j,Dt.value,S);return}}if(y==`
1398
+ `){var q=Dt;Dt=null,q.onClose&&q.onClose(q.value)}else Dt.value=(Dt.value||"")+y}function T(y,S,k){var P=Ni;if(k){if(Nr.indexOf(k)!=-1)return;Nr.push(k),Ni=k.noremap!=0}try{for(var z=O(y),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec(S);){var Y=q[0],X=z.insertMode;if(Dt){I(Y);continue}var re=wt.handleKey(y,Y,"mapping");if(!re&&X&&z.insertMode){if(Y[0]=="<"){var ue=Y.toLowerCase().slice(1,-1),be=ue.split("-");if(ue=be.pop()||"",ue=="lt")Y="<";else if(ue=="space")Y=" ";else if(ue=="cr")Y=`
1399
+ `;else{if(Qi.hasOwnProperty(ue)){Y=Qi[ue],Es(y,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Nr.pop(),Ni=Nr.length?P:!1,!Nr.length&&Dt){var Ae=Dt;Dt=null,ar(y,Ae)}}}function B(y,S){var k=y.key;if(!Xn[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Dr[k]||k;var P="";if(y.ctrlKey&&(P+="C-"),y.altKey&&(P+="A-"),y.metaKey&&(P+="M-"),ze.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&y.shiftKey&&(P+="S-"),S&&!S.expectLiteralNext&&k.length==1){if(Dn.keymap&&k in Dn.keymap)(Dn.remapCtrl!=0||!P)&&(k=Dn.keymap[k]);else if(k.charCodeAt(0)>255){var z=y.code&&y.code.slice(-1)||"";y.shiftKey||(z=z.toLowerCase()),z&&(k=z)}}return P+=k,P.length>1&&(P="<"+P+">"),P}}function F(y,S){Dn.string!==y&&(Dn=L(y)),Dn.remapCtrl=S}function L(y){function S(P){return P.split(/\\?(.)/).filter(Boolean)}var k={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var z=P.split(/((?:[^\\;]|\\.)+);/);if(z.length==3){var j=S(z[1]),q=S(z[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)k[j[Y]]=q[Y]}else if(z.length==1){var X=S(P);if(X.length%2!==0)return;for(var Y=0;Y<X.length;Y+=2)k[X[Y]]=X[Y+1]}}}),{keymap:k,string:y}):{keymap:k,string:""}}function $(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(y,S){y.state.vim.inputState=new $,y.state.vim.expectLiteralNext=!1,ze.signal(y,"vim-command-done",S)}function N(){this.removed=[],this.inserted=""}function W(y,S,k){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!S,this.blockwise=!!k}function U(y,S){var k=je.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");k[y]=S,Is.push(y)}function G(y){this.registers=y,this.unnamedRegister=y['"']=new W,y["."]=new W,y[":"]=new W,y["/"]=new W,y["+"]=new W}function J(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(y,S){$n[y]=S}function he(y,S){for(var k=[],P=0;P<S;P++)k.push(y);return k}function ee(y,S){Jo[y]=S}function le(y,S){Bn[y]=S}function se(y,S,k){var P=y.state.vim,z=P.insertMode||P.visualMode,j=Math.min(Math.max(y.firstLine(),S.line),y.lastLine()),q=y.getLine(j),Y=q.length-1+ +!!z,X=Math.min(Math.max(0,S.ch),Y),re=q.charCodeAt(X);if(56320<=re&&re<=57343){var ue=1;k&&k.line==j&&k.ch>X&&(ue=-1),X+=ue,X>Y&&(X-=2)}return new De(j,X)}function ce(y){var S={};for(var k in y)y.hasOwnProperty(k)&&(S[k]=y[k]);return S}function pe(y,S,k){return typeof S=="object"&&(k=S.ch,S=S.line),new De(y.line+S,y.ch+k)}function ve(y,S,k,P){P.operator&&(k="operatorPending");for(var z,j=[],q=[],Y=Ni?S.length-Ro:0,X=Y;X<S.length;X++){var re=S[X];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||P.operator&&re.type=="action"||!(z=$e(y,re.keys))||(z=="partial"&&j.push(re),z=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function $e(y,S){var k=S.slice(-11)=="<character>",P=S.slice(-10)=="<register>";if(k||P){var z=S.length-(k?11:10),j=y.slice(0,z),q=S.slice(0,z);return j==q&&y.length>z?"full":q.indexOf(j)==0?"partial":!1}return y==S?"full":S.indexOf(y)==0?"partial":!1}function Ee(y){var S=/^.*(<[^>]+>)$/.exec(y),k=S?S[1]:y.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
1400
+ `;break;case"<Space>":k=" ";break;default:k=""}return k}function qe(y,S,k){return function(){for(var P=0;P<k;P++)S(y)}}function He(y){return new De(y.line,y.ch)}function tt(y,S){return y.ch==S.ch&&y.line==S.line}function Xe(y,S){return y.line<S.line?!0:y.line==S.line&&y.ch<S.ch}function it(y,S){return arguments.length>2&&(S=it.apply(void 0,Array.prototype.slice.call(arguments,1))),Xe(y,S)?y:S}function Wt(y,S){return arguments.length>2&&(S=Wt.apply(void 0,Array.prototype.slice.call(arguments,1))),Xe(y,S)?S:y}function br(y,S,k){var P=Xe(y,S),z=Xe(S,k);return P&&z}function At(y,S){return y.getLine(S).length}function ir(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function An(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function wr(y,S,k){var P=At(y,S),z=new Array(k-P+1).join(" ");y.setCursor(new De(S,P)),y.replaceRange(z,y.getCursor())}function fn(y,S){var k=[],P=y.listSelections(),z=He(y.clipPos(S)),j=!tt(S,z),q=y.getCursor("head"),Y=ft(P,q),X=tt(P[Y].head,P[Y].anchor),re=P.length-1,ue=re-Y>Y?re:0,be=P[ue].anchor,Ae=Math.min(be.line,z.line),ye=Math.max(be.line,z.line),xe=be.ch,Oe=z.ch,Ie=P[ue].head.ch-xe,Ge=Oe-xe;Ie>0&&Ge<=0?(xe++,j||Oe--):Ie<0&&Ge>=0?(xe--,X||Oe++):Ie<0&&Ge==-1&&(xe--,Oe++);for(var ut=Ae;ut<=ye;ut++){var Ze={anchor:new De(ut,xe),head:new De(ut,Oe)};k.push(Ze)}return y.setSelections(k),S.ch=Oe,be.ch=xe,be}function or(y,S,k){for(var P=[],z=0;z<k;z++){var j=pe(S,z,0);P.push({anchor:j,head:j})}y.setSelections(P,0)}function ft(y,S,k){for(var P=0;P<y.length;P++){var z=tt(y[P].anchor,S),j=tt(y[P].head,S);if(z||j)return P}return-1}function Ke(y,S){var k=S.lastSelection,P=function(){var j=y.listSelections(),q=j[0],Y=j[j.length-1],X=Xe(q.anchor,q.head)?q.anchor:q.head,re=Xe(Y.anchor,Y.head)?Y.head:Y.anchor;return[X,re]},z=function(){var j=y.getCursor(),q=y.getCursor(),Y=k.visualBlock;if(Y){var X=Y.width,re=Y.height;q=new De(j.line+re,j.ch+X);for(var ue=[],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};ue.push(xe)}y.setSelections(ue)}else{var Oe=k.anchorMark.find(),Ie=k.headMark.find(),Ge=Ie.line-Oe.line,ut=Ie.ch-Oe.ch;q={line:q.line+Ge,ch:Ge?q.ch:ut+q.ch},k.visualLine&&(j=new De(j.line,0),q=new De(q.line,At(y,q.line))),y.setSelection(j,q)}return[j,q]};return S.visualMode?P():z()}function $t(y,S){var k=S.sel.anchor,P=S.sel.head;S.lastPastedText&&(P=y.posFromIndex(y.indexFromPos(k)+S.lastPastedText.length),S.lastPastedText=null),S.lastSelection={anchorMark:y.setBookmark(k),headMark:y.setBookmark(P),anchor:He(k),head:He(P),visualMode:S.visualMode,visualLine:S.visualLine,visualBlock:S.visualBlock}}function Zt(y,S,k,P){var z=y.state.vim.sel,j=P?S:z.head,q=P?S:z.anchor,Y;return Xe(k,S)&&(Y=k,k=S,S=Y),Xe(j,q)?(j=it(S,j),q=Wt(q,k)):(q=it(S,q),j=Wt(j,k),j=pe(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new De(j.line-1,At(y,j.line-1)))),[q,j]}function In(y,S,z){var P=y.state.vim;S=S||P.sel;var z=z||P.visualLine?"line":P.visualBlock?"block":"char",j=Un(y,S,z);y.setSelections(j.ranges,j.primary)}function Un(y,S,k,P){var z=He(S.head),j=He(S.anchor);if(k=="char"){var q=!P&&!Xe(S.head,S.anchor)?1:0,Y=Xe(S.head,S.anchor)?1:0;return z=pe(S.head,0,q),j=pe(S.anchor,0,Y),{ranges:[{anchor:j,head:z}],primary:0}}if(k=="line"){if(Xe(S.head,S.anchor))z.ch=0,j.ch=At(y,j.line);else{j.ch=0;var X=y.lastLine();z.line>X&&(z.line=X),z.ch=At(y,z.line)}return{ranges:[{anchor:j,head:z}],primary:0}}if(k=="block"){var re=Math.min(j.line,z.line),ue=j.ch,be=Math.max(j.line,z.line),Ae=z.ch;ue<Ae?Ae+=1:ue+=1;for(var ye=be-re+1,xe=z.line==re?0:ye-1,Oe=[],Ie=0;Ie<ye;Ie++)Oe.push({anchor:new De(re+Ie,ue),head:new De(re+Ie,Ae)});return{ranges:Oe,primary:xe}}}function sr(y){var S=y.getCursor("head");return y.getSelection().length==1&&(S=it(S,y.getCursor("anchor"))),S}function pn(y,S){var k=y.state.vim;S!==!1&&y.setCursor(se(y,k.sel.head)),$t(y,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||ze.signal(y,"vim-mode-change",{mode:"normal"})}function zn(y,S,k){var P=y.getRange(S,k);if(/\n\s*$/.test(P)){var z=P.split(`
1401
+ `);z.pop();for(var j,j=z.pop();z.length>0&&j&&p(j);j=z.pop())k.line--,k.ch=0;j?(k.line--,k.ch=At(y,k.line)):k.ch=0}}function Ln(y,S,k){S.ch=0,k.ch=0,k.line++}function Gt(y){if(!y)return 0;var S=y.search(/\S/);return S==-1?y.length:S}function nn(y,S,k){var P=S.inclusive,z=S.innerWord,j=S.bigWord,q=S.noSymbol,Y=S.multiline,X=k||sr(y),re=y.getLine(X.line),ue=re,be=X.line,Ae=be,ye=X.ch,xe,Oe=q?Eo[0]:Li[0];if(z&&/\s/.test(re.charAt(ye)))Oe=function(kn){return/\s/.test(kn)};else{for(;!Oe(re.charAt(ye));)if(ye++,ye>=re.length){if(!Y)return null;ye--,xe=bi(y,X,!0,j,!0);break}j?Oe=Li[0]:(Oe=Eo[0],Oe(re.charAt(ye))||(Oe=Eo[1]))}for(var Ie=ye,Ge=ye;Oe(re.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,xe)Ie=xe.to,Ae=xe.line,ue=y.getLine(Ae),!ue&&Ie==0&&Ie++;else for(;Oe(re.charAt(Ie))&&Ie<re.length;)Ie++;if(P){var ut=Ie,Ze=X.ch<=Ge&&/\s/.test(re.charAt(X.ch));if(!Ze)for(;/\s/.test(ue.charAt(Ie))&&Ie<ue.length;)Ie++;if(ut==Ie||Ze){for(var et=Ge;/\s/.test(re.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!Ze&&(Ge=et)}}return{start:new De(be,Ge),end:new De(Ae,Ie)}}function Ir(y,S,k){var P=S;if(!ze.findMatchingTag||!ze.findEnclosingTag)return{start:P,end:P};var z=ze.findMatchingTag(y,S)||ze.findEnclosingTag(y,S);return!z||!z.open||!z.close?{start:P,end:P}:k?{start:z.open.from,end:z.close.to}:{start:z.open.to,end:z.close.from}}function Gr(y,S,k){tt(S,k)||je.jumpList.add(y,S,k)}function xr(y,S){je.lastCharacterSearch.increment=y,je.lastCharacterSearch.forward=S.forward,je.lastCharacterSearch.selectedCharacter=S.selectedCharacter}function yi(y,S,k,P){var z=He(y.getCursor()),j=k?1:-1,q=k?y.lineCount():-1,Y=z.ch,X=z.line,re=y.getLine(X),ue={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},be=Ci[P];if(!be)return z;var Ae=_i[be].init,ye=_i[be].isComplete;for(Ae&&Ae(ue);X!==q&&S;){if(ue.index+=j,ue.nextCh=ue.lineText.charAt(ue.index),!ue.nextCh){if(X+=j,ue.lineText=y.getLine(X)||"",j>0)ue.index=0;else{var xe=ue.lineText.length;ue.index=xe>0?xe-1:0}ue.nextCh=ue.lineText.charAt(ue.index)}ye(ue)&&(z.line=X,z.ch=ue.index,S--)}return ue.nextCh||ue.curMoveThrough?new De(X,ue.index):z}function bi(y,S,k,P,z){var j=S.line,q=S.ch,Y=y.getLine(j),X=k?1:-1,re=P?Li:Eo;if(z&&Y==""){if(j+=X,Y=y.getLine(j),!l(y,j))return null;q=k?0:Y.length}for(;;){if(z&&Y=="")return{from:0,to:0,line:j};for(var ue=X>0?Y.length:-1,be=ue,Ae=ue;q!=ue;){for(var ye=!1,xe=0;xe<re.length&&!ye;++xe)if(re[xe](Y.charAt(q))){for(be=q;q!=ue&&re[xe](Y.charAt(q));)q+=X;if(Ae=q,ye=be!=Ae,be==S.ch&&j==S.line&&Ae==be+X)continue;return{from:Math.min(be,Ae+1),to:Math.max(be,Ae),line:j}}ye||(q+=X)}if(j+=X,!l(y,j))return null;Y=y.getLine(j),q=X>0?0:Y.length}}function Zn(y,S,k,P,z,j){var q=He(S),Y=[];(P&&!z||!P&&z)&&k++;for(var X=!P||!z,re=0;re<k;re++){var ue=bi(y,S,P,j,X);if(!ue){var be=At(y,y.lastLine());Y.push(P?{line:y.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}Y.push(ue),S=new De(ue.line,P?ue.to-1:ue.from)}var Ae=Y.length!=k,ye=Y[0],xe=Y.pop();return P&&!z?(!Ae&&(ye.from!=q.ch||ye.line!=q.line)&&(xe=Y.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=Y.pop()),new De(xe.line,xe.to)):new De(xe.line,xe.from)}function Yi(y,S,k,P,z){var j=S,q=new De(j.line+k.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,z||(P.lastHPos=1/0,P.lastHSPos=y.charCoords(Y,"div").left),q}function Kr(y,S,k,P,z){for(var j=z||y.getCursor(),q=j.ch,Y,X=0;X<S;X++){var re=y.getLine(j.line);if(Y=Cn(q,re,P,k),Y==-1)return null;q=Y}return new De(y.getCursor().line,Y)}function Cs(y,S){var k=y.getCursor().line;return se(y,new De(k,S-1))}function Yr(y,S,k,P){!x(k,go)&&!en.test(k)||(S.marks[k]&&S.marks[k].clear(),S.marks[k]=y.setBookmark(P))}function Cn(y,S,k,P,z){var j;return P?(j=S.indexOf(k,y+1),j!=-1):(j=S.lastIndexOf(k,y-1),j!=-1),j}function wi(y,S,k,P,z){function j(Ge){return!/\S/.test(y.getLine(Ge))}function q(Ge,ut,Ze){return Ze?j(Ge)!=j(Ge+ut):!j(Ge)&&j(Ge+ut)}function Y(Ge){P=P>0?1:-1;var ut=y.ace.session.getFoldLine(Ge);ut&&Ge+P>ut.start.row&&Ge+P<ut.end.row&&(P=(P>0?ut.end.row:ut.start.row)-Ge)}var X=S.line,re=y.firstLine(),ue=y.lastLine(),be,Ae,ye=X;if(P){for(;re<=ye&&ye<=ue&&k>0;)Y(ye),q(ye,P)&&k--,ye+=P;return new De(ye,0)}var xe=y.state.vim;if(xe.visualLine&&q(X,1,!0)){var Oe=xe.sel.anchor;q(Oe.line,-1,!0)&&(!z||Oe.line!=X)&&(X+=1)}var Ie=j(X);for(ye=X;ye<=ue&&k;ye++)q(ye,1,!0)&&(!z||j(ye)!=Ie)&&k--;for(Ae=new De(ye,0),ye>ue&&!Ie?Ie=!0:z=!1,ye=X;ye>re&&!((!z||j(ye)==Ie||ye==X)&&q(ye,-1,!0));ye--);return be=new De(ye,0),{start:be,end:Ae}}function _o(y,S,k,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,ue,be,Ae){var ye=re.getLine(ue),xe={line:ye,ln:ue,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,b(xe.line[xe.pos])){if(!z)return{ln:xe.ln,pos:xe.pos+1};for(j(xe);xe.line!==null&&p(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 Y(re,ue,be,Ae){var ye=re.getLine(ue),xe={line:ye,ln:ue,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(!p(xe.line[xe.pos])&&!b(xe.line[xe.pos]))Oe=xe.pos;else if(b(xe.line[xe.pos]))return z?p(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&&p(xe.line[xe.pos])?{ln:xe.ln,pos:xe.pos}:{ln:xe.ln,pos:Oe}}for(var X={ln:S.line,pos:S.ch};k>0;)P<0?X=Y(y,X.ln,X.pos,P):X=q(y,X.ln,X.pos,P),k--;return new De(X.ln,X.pos)}function si(y,S,k,P){function z(X,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!l(X,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=X.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function j(X,re,ue,be){var Ie=X.getLine(re),Ae=Ie==="",ye={line:Ie,ln:re,pos:ue,dir:be},xe={ln:ye.ln,pos:ye.pos},Oe=ye.line==="";for(z(X,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!==""&&!p(ye.line[ye.pos]))return{ln:ye.ln,pos:ye.pos};b(ye.line[ye.pos])&&!Ae&&(ye.pos===ye.line.length-1||p(ye.line[ye.pos+1]))&&(Ae=!0),z(X,ye)}var Ie=X.getLine(xe.ln);xe.pos=0;for(var Ge=Ie.length-1;Ge>=0;--Ge)if(!p(Ie[Ge])){xe.pos=Ge;break}return xe}function q(X,re,ue,be){var Oe=X.getLine(re),Ae={line:Oe,ln:re,pos:ue,dir:be},ye={ln:Ae.ln,pos:null},xe=Ae.line==="";for(z(X,Ae);Ae.line!==null;){if(Ae.line===""&&!xe)return ye.pos!==null?ye:{ln:Ae.ln,pos:Ae.pos};if(!(!b(Ae.line[Ae.pos])||ye.pos===null||Ae.ln===ye.ln&&Ae.pos+1===ye.pos))return ye;Ae.line!==""&&!p(Ae.line[Ae.pos])&&(xe=!1,ye={ln:Ae.ln,pos:Ae.pos}),z(X,Ae)}var Oe=X.getLine(ye.ln);ye.pos=0;for(var Ie=0;Ie<Oe.length;++Ie)if(!p(Oe[Ie])){ye.pos=Ie;break}return ye}for(var Y={ln:S.line,pos:S.ch};k>0;)P<0?Y=q(y,Y.ln,Y.pos,P):Y=j(y,Y.ln,Y.pos,P),k--;return new De(Y.ln,Y.pos)}function _n(y,S,k,P){var z=S,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],X={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=y.getLine(z.line).charAt(z.ch),ue=re===X?1:0;if(j=y.scanForBracket(new De(z.line,z.ch+ue),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new De(z.line,z.ch+ue),1,void 0,{bracketRegex:Y}),!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 Cr(y,S,k,P){var z=He(S),j=y.getLine(z.line),q=j.split(""),Y,X,re,ue,be=q.indexOf(k);if(z.ch<be)z.ch=be;else if(be<z.ch&&q[z.ch]==k){var Ae=/string/.test(y.getTokenTypeAt(pe(S,0,1))),ye=/string/.test(y.getTokenTypeAt(S)),xe=Ae&&!ye;xe||(X=z.ch,--z.ch)}if(q[z.ch]==k&&!X)Y=z.ch+1;else for(re=z.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!X)for(re=Y,ue=q.length;re<ue&&!X;re++)q[re]==k&&(X=re);return!Y||!X?{start:z,end:z}:(P&&(--Y,++X),{start:new De(z.line,Y),end:new De(z.line,X)})}function Lr(){}function On(y){var S=y.state.vim;return S.searchState_||(S.searchState_=new Lr)}function yn(y){return ai(y,"/")}function pr(y){return ao(y,"/")}function ai(y,S){var k=ao(y,S)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var z=0;z<k.length;z++)typeof k[z]=="number"&&P.push(y.substring(k[z]+1,k[z+1]));return P}}function ao(y,S){S||(S="/");for(var k=!1,P=[],z=0;z<y.length;z++){var j=y.charAt(z);!k&&j==S&&P.push(z),k=!k&&j=="\\"}return P}function lo(y){for(var S="|(){",k="}",P=!1,z=[],j=-1;j<y.length;j++){var q=y.charAt(j)||"",Y=y.charAt(j+1)||"",X=Y&&S.indexOf(Y)!=-1;P?((q!=="\\"||!X)&&z.push(q),P=!1):q==="\\"?(P=!0,Y&&k.indexOf(Y)!=-1&&(X=!0),(!X||Y==="\\")&&z.push(q)):(z.push(q),X&&Y!=="\\"&&z.push("\\"))}return z.join("")}function ko(y){for(var S=!1,k=[],P=-1;P<y.length;P++){var z=y.charAt(P)||"",j=y.charAt(P+1)||"";Di[z+j]?(k.push(Di[z+j]),P++):S?(k.push(z),S=!1):z==="\\"?(S=!0,o(j)||j==="$"?k.push("$"):j!=="/"&&j!=="\\"&&k.push("\\")):(z==="$"&&k.push("$"),k.push(z),j==="/"&&k.push("\\"))}return k.join("")}function Or(y){for(var S=new ze.StringStream(y),k=[];!S.eol();){for(;S.peek()&&S.peek()!="\\";)k.push(S.next());var P=!1;for(var z in Ls)if(S.match(z,!0)){P=!0,k.push(Ls[z]);break}P||k.push(S.next())}return k.join("")}function li(y,S,k){var P=je.registerController.getRegister("/");if(P.setText(y),y instanceof RegExp)return y;var z=pr(y),j,q;if(!z.length)j=y;else{j=y.substring(0,z[0]);var Y=y.substring(z[0]);q=Y.indexOf("i")!=-1}if(!j)return null;A("pcre")||(j=lo(j)),k&&(S=/^[^A-Z]*$/.test(j));var X=new RegExp(j,S||q?"im":"m");return X}function Jr(y){typeof y=="string"&&(y=document.createElement(y));for(var S,k=1;k<arguments.length;k++)if(S=arguments[k])if(typeof S!="object"&&(S=document.createTextNode(S)),S.nodeType)y.appendChild(S);else for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(P[0]==="$"?y.style[P.slice(1)]=S[P]:y.setAttribute(P,S[P]));return y}function Nt(y,S){var k=Jr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},S);y.openNotification?y.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function Ao(y,S){return Jr("div",{$display:"flex"},Jr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,Jr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),S&&Jr("span",{$color:"#888"},S))}function ar(y,S){if(Nr.length){S.value||(S.value=""),Dt=S;return}var k=Ao(S.prefix,S.desc);if(y.openDialog)y.openDialog(k,S.onClose,{onKeyDown:S.onKeyDown,onKeyUp:S.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:S.value});else{var P="";typeof S.prefix!="string"&&S.prefix&&(P+=S.prefix.textContent),S.desc&&(P+=" "+S.desc),S.onClose(prompt(P,""))}}function Sn(y,S){if(y instanceof RegExp&&S instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var z=k[P];if(y[z]!==S[z])return!1}return!0}return!1}function oe(y,S,k,P){if(S){var z=On(y),j=li(S,!!k,!!P);if(j)return Be(y,j),Sn(j,z.getQuery())||z.setQuery(j),j}}function Ne(y){if(y.source.charAt(0)=="^")var S=!0;return{token:function(k){if(S&&!k.sol()){k.skipToEnd();return}var P=k.match(y,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!y.exec(k.next()+P[0]))?(k.next(),null):(k.match(y),"searching");for(;!k.eol()&&(k.next(),!k.match(y,!1)););},query:y}}function Be(y,S){clearTimeout(rn);var k=On(y);k.highlightTimeout=rn,rn=setTimeout(function(){if(y.state.vim){var P=On(y);P.highlightTimeout=null;var z=P.getOverlay();(!z||S!=z.query)&&(z&&y.removeOverlay(z),z=Ne(S),y.addOverlay(z),y.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(y.showMatchesOnScrollbar(S))),P.setOverlay(z))}},50)}function yt(y,S,k,P){return P===void 0&&(P=1),y.operation(function(){for(var z=y.getCursor(),j=y.getSearchCursor(k,z),q=0;q<P;q++){var Y=j.find(S);if(q==0&&Y&&tt(j.from(),z)){var X=S?j.from():j.to();Y=j.find(S),Y&&!Y[0]&&tt(j.from(),X)&&y.getLine(X.line).length==X.ch&&(Y=j.find(S))}if(!Y&&(j=y.getSearchCursor(k,S?new De(y.lastLine()):new De(y.firstLine(),0)),!j.find(S)))return}return j.from()})}function gn(y,S,k,P,z){return P===void 0&&(P=1),y.operation(function(){var j=y.getCursor(),q=y.getSearchCursor(k,j),Y=q.find(!S);!z.visualMode&&Y&&tt(q.from(),j)&&q.find(!S);for(var X=0;X<P;X++)if(Y=q.find(S),!Y&&(q=y.getSearchCursor(k,S?new De(y.lastLine()):new De(y.firstLine(),0)),!q.find(S)))return;return[q.from(),q.to()]})}function Vt(y){var S=On(y);S.highlightTimeout&&(clearTimeout(S.highlightTimeout),S.highlightTimeout=null),y.removeOverlay(On(y).getOverlay()),S.setOverlay(null),S.getScrollbarAnnotate()&&(S.getScrollbarAnnotate().clear(),S.setScrollbarAnnotate(null))}function _r(y,S,k){return typeof y!="number"&&(y=y.line),S instanceof Array?x(y,S):typeof k=="number"?y>=S&&y<=k:y==S}function Vn(y){var S=y.ace.renderer;return{top:S.getFirstFullyVisibleRow(),bottom:S.getLastFullyVisibleRow()}}function cn(y,S,k){if(k=="'"||k=="`")return je.jumpList.find(y,-1)||new De(0,0);if(k==".")return gr(y);var P=S.marks[k];return P&&P.find()}function gr(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var S=y.doc.history.done,k=S.length;k--;)if(S[k].changes)return He(S[k].changes[0].to)}function mn(y,S,k,P,z,j,q,Y,X){function re(){y.operation(function(){for(;!Oe;)ue(),Ae();ye()})}function ue(){var Ze=y.getRange(j.from(),j.to()),et=Ze.replace(q,Y),kn=j.to().line;j.replace(et),Ge=j.to().line,z+=Ge-kn,ut=Ge<kn}function be(){var Ze=Ie&&He(j.to()),et=j.findNext();return et&&!et[0]&&Ze&&tt(j.from(),Ze)&&(et=j.findNext()),et}function Ae(){for(;be()&&_r(j.from(),P,z);)if(!(!k&&j.from().line==Ge&&!ut)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Ie=j.from(),Oe=!1;return}Oe=!0}function ye(Ze){if(Ze&&Ze(),y.focus(),Ie){y.setCursor(Ie);var et=y.state.vim;et.exMode=!1,et.lastHPos=et.lastHSPos=Ie.ch}X&&X()}function xe(Ze,et,kn){ze.e_stop(Ze);var Ct=B(Ze);switch(Ct){case"y":ue(),Ae();break;case"n":Ae();break;case"a":var Kt=X;X=void 0,y.operation(re),X=Kt;break;case"l":ue();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ye(kn)}return Oe&&ye(kn),!0}y.state.vim.exMode=!0;var Oe=!1,Ie,Ge,ut;if(Ae(),Oe){Nt(y,"No matches for "+q.source);return}if(!S){re(),X&&X();return}ar(y,{prefix:Jr("span","replace with ",Jr("strong",Y)," (y/n/a/q/l)"),onKeyDown:xe})}function mr(y,S){var k=y.state.vim,P=je.macroModeState,z=je.registerController.getRegister("."),j=P.isPlaying,q=P.lastInsertModeChanges;j||(y.off("change",Uo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,ze.off(y.getInputField(),"keydown",So)),!j&&k.insertModeRepeat>1&&(Rs(y,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,S||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),z.setText(q.changes.join("")),ze.signal(y,"vim-mode-change",{mode:"normal"}),P.isRecording&&lr(P)}function co(y){Nn.unshift(y)}function _s(y,S,k,P,z){var j={keys:y,type:S};j[S]=k,j[S+"Args"]=P;for(var q in z)j[q]=z[q];co(j)}function ks(y,S,k,P){var z=je.registerController.getRegister(P);if(P==":"){z.keyBuffer[0]&&Pr.processCommand(y,z.keyBuffer[0]),k.isPlaying=!1;return}var j=z.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=z.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var X=j[Y],re,ue;X;)if(re=/<\w+-.+?>|<\w+>|./.exec(X),ue=re[0],X=X.substring(re.index+ue.length),wt.handleKey(y,ue,"macro"),S.insertMode){var be=z.insertModeChanges[q++].changes;je.macroModeState.lastInsertModeChanges.changes=be,qo(y,be,1),mr(y)}k.isPlaying=!1}function As(y,S){if(!y.isPlaying){var k=y.latestRegister,P=je.registerController.getRegister(k);P&&P.pushText(S)}}function lr(y){if(!y.isPlaying){var S=y.latestRegister,k=je.registerController.getRegister(S);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(y.lastInsertModeChanges)}}function Ss(y,S){if(!y.isPlaying){var k=y.latestRegister,P=je.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery(S)}}function Uo(y,S){var k=je.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var z=y.state.vim;S;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(S.origin=="+input"||S.origin=="paste"||S.origin===void 0){var j=y.listSelections().length;j>1&&(P.ignoreCount=j);var q=S.text.join(`
1402
+ `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var Y=z&&z.insertEnd&&z.insertEnd.find(),X=y.getCursor();if(Y&&Y.line==X.line){var re=Y.ch-X.ch;re>0&&re<q.length&&(P.changes.push([q,re]),q="")}}q&&P.changes.push(q)}}S=S.next}}function uo(y){var S=y.state.vim;if(S.insertMode){var k=je.macroModeState;if(k.isPlaying)return;var P=k.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,S.insertEnd&&S.insertEnd.clear(),S.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||$s(y,S)}function $s(y,S,k){var P=y.getCursor("anchor"),z=y.getCursor("head");if(S.visualMode&&!y.somethingSelected()?pn(y,!1):!S.visualMode&&!S.insertMode&&y.somethingSelected()&&(S.visualMode=!0,S.visualLine=!1,ze.signal(y,"vim-mode-change",{mode:"visual"})),S.visualMode){var j=Xe(z,P)?0:-1,q=Xe(z,P)?-1:0;z=pe(z,0,j),P=pe(P,0,q),S.sel={anchor:P,head:z},Yr(y,S,"<",it(z,P)),Yr(y,S,">",Wt(z,P))}else!S.insertMode&&!k&&(S.lastHPos=y.getCursor().ch)}function Vo(y,S){this.keyName=y,this.key=S.key,this.ctrlKey=S.ctrlKey,this.altKey=S.altKey,this.metaKey=S.metaKey,this.shiftKey=S.shiftKey}function So(y){var S=je.macroModeState,k=S.lastInsertModeChanges,P=ze.keyName?ze.keyName(y):y.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Vo(P,y)))}function Rs(y,S,k,P){function z(){Y?xi.processAction(y,S,S.lastEditActionCommand):xi.evalInput(y,S)}function j(ue){if(q.lastInsertModeChanges.changes.length>0){ue=S.lastEditActionCommand?ue:1;var be=q.lastInsertModeChanges;qo(y,be.changes,ue)}}var q=je.macroModeState;q.isPlaying=!0;var Y=!!S.lastEditActionCommand,X=S.inputState;if(S.inputState=S.lastEditInputState,Y&&S.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)z(),j(1);else P||z(),j(k);S.inputState=X,S.insertMode&&!P&&mr(y),q.isPlaying=!1}function Es(y,S){ze.lookupKey(S,"vim-insert",function(k){return typeof k=="string"?ze.commands[k](y):k(y),!0})}function qo(y,S,k){var P=y.getCursor("head"),z=je.macroModeState.lastInsertModeChanges.visualBlock;z&&(or(y,P,z+1),k=y.listSelections().length,y.setCursor(P));for(var j=0;j<k;j++){z&&y.setCursor(pe(P,j,0));for(var q=0;q<S.length;q++){var Y=S[q];if(Y instanceof Vo)Es(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var X=y.getCursor(),re=pe(X,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],X,Y[1]?X:re),y.setCursor(re)}}}z&&y.setCursor(pe(P,0,1))}function ga(y,S,k,P){S.length>1&&S[0]=="n"&&(S=S.replace("numpad","")),S=mo[S]||S;var z="";if(k.ctrlKey&&(z+="C-"),k.altKey&&(z+="A-"),(z||S.length>1)&&k.shiftKey&&(z+="S-"),P&&!P.expectLiteralNext&&S.length==1){if(Dn.keymap&&S in Dn.keymap)(Dn.remapCtrl!==!1||!z)&&(S=Dn.keymap[S]);else if(S.charCodeAt(0)>255){var j=k.code&&k.code.slice(-1)||"";k.shiftKey||(j=j.toLowerCase()),j&&(S=j)}}return z+=S,z.length>1&&(z="<"+z+">"),z}function ho(y){var S=new y.constructor;return Object.keys(y).forEach(function(k){if(k!="insertEnd"){var P=y[k];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=ho(P)),S[k]=P}}),y.sel&&(S.sel={head:y.sel.head&&He(y.sel.head),anchor:y.sel.anchor&&He(y.sel.anchor)}),S}function Go(y,S,k){var P=!1,z=wt.maybeInitVimState_(y),j=z.visualBlock||z.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(z.wasInVisualBlock&&!q?z.wasInVisualBlock=!1:q&&z.visualBlock&&(z.wasInVisualBlock=!0),S=="<Esc>"&&!z.insertMode&&!z.visualMode&&q)y.ace.exitMultiSelectMode();else if(j||!q||y.ace.inVirtualSelectionMode)P=wt.handleKey(y,S,k);else{var Y=ho(z),X=z.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var ue=y.ace.selection;y.state.vim.lastHPos=ue.$desiredColumn==null?ue.lead.column:ue.$desiredColumn,y.state.vim.inputState.changeQueue=X[re];var be=y.getCursor("head"),Ae=y.getCursor("anchor"),ye=Xe(be,Ae)?0:-1,xe=Xe(be,Ae)?-1:0;be=pe(be,0,ye),Ae=pe(Ae,0,xe),y.state.vim.sel.head=be,y.state.vim.sel.anchor=Ae,P=kr(y,S,k),ue.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(X[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=ho(Y)),re++}),y.curOp.cursorActivity&&!P&&(y.curOp.cursorActivity=!1),z.status=y.state.vim.status,y.state.vim=z,z.inputState.changeQueueList=X,z.inputState.changeQueue=null},!0)}return P&&!z.visualMode&&!z.insert&&z.visualMode!=y.somethingSelected()&&$s(y,z,!0),P}function Ji(y,S){S.off("beforeEndOperation",Ji);var k=S.state.cm.vimCmd;k&&S.execCommand(k.exec?k:k.name,k.args),S.curOp=S.prevOp}var cr=e("../range").Range,Ts=e("../lib/event_emitter").EventEmitter,Zr=e("../lib/dom"),ma=e("../lib/oop"),va=e("../lib/keys"),Ko=e("../lib/event"),Zi=e("../search").Search,$o=e("../lib/useragent"),Yo=e("../search_highlight").SearchHighlight,fo=e("../commands/multi_select_commands"),ya=e("../mode/text").Mode.prototype.tokenRe,po=e("../ext/hardwrap").hardWrap;e("../multi_select");var ze=function(y){this.ace=y,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)};ze.Pos=function(y,S){if(!(this instanceof De))return new De(y,S);this.line=y,this.ch=S},ze.defineOption=function(y,S,k){},ze.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1403
+ `)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},ze.keyMap={},ze.addClass=ze.rmClass=function(){},ze.e_stop=ze.e_preventDefault=Ko.stopEvent,ze.keyName=function(y){var S=va[y.keyCode]||y.key||"";return S.length==1&&(S=S.toUpperCase()),S=Ko.getModifierString(y).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+S,S},ze.keyMap.default=function(y){return function(S){var k=S.ace.commands.commandKeyBinding[y.toLowerCase()];return k&&S.ace.execCommand(k)!==!1}},ze.lookupKey=function y(S,k,P){k||(k="default"),typeof k=="string"&&(k=ze.keyMap[k]||ze.keyMap.default);var z=typeof k=="function"?k(S):k[S];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&P(z))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return y(S,k.fallthrough,P);for(var j=0;j<k.fallthrough.length;j++){var q=y(S,k.fallthrough[j],P);if(q)return q}}},ze.findMatchingTag=function(y,S){return y.findMatchingTag(S)},ze.findEnclosingTag=function(y,S){},ze.signal=function(y,S,k){return y._signal(S,k)},ze.on=Ko.addListener,ze.off=Ko.removeListener,ze.isWordChar=function(y){return y<""?/^\w$/.test(y):(ya.lastIndex=0,ya.test(y))},(function(){ma.implement(ze.prototype,Ts),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(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var P={text:k.action[0]=="i"?k.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(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(fo.keyboardHandler)},this.operation=function(k,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return k();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=k();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 k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,P,z){var j=z?z[k+"Handlers"]:(this._eventRegistry||{})[k];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(k,P){typeof k=="object"&&(P=k.ch,k=k.line);var z=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:P}),this.ace.selection.moveTo(k,P),z&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var P=this.ace.selection,z=k=="anchor"?P.isEmpty()?P.lead:P.anchor:k=="head"||!k?P.lead:P.getRange()[k];return g(z)},this.listSelections=function(k){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(g(z.cursor==z.end?z.start:z.end)),head:this.clipPos(g(z.cursor))}},this)},this.setSelections=function(k,P){var z=this.ace.multiSelect,j=k.map(function(re){var ue=f(re.anchor),be=f(re.head),Ae=cr.comparePoints(ue,be)<0?new cr.fromPoints(ue,be):new cr.fromPoints(be,ue);return Ae.cursor=cr.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,Y=0;Y<j.length;Y++){var X=q.$clipRangeToDocument(j[Y]);z.addRange(X)}},this.setSelection=function(k,P,z){var j=this.ace.selection;j.moveTo(k.line,k.ch),j.selectTo(P.line,P.ch),z&&z.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var P=this.ace.session.$clipPositionToDocument(k.line,k.ch);return g(P)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var P=k.action=="insert",z=k.start,j=k.end,q=(j.row-z.row)*(P?1:-1),Y=(j.column-z.column)*(P?1:-1);P&&(j=z);for(var X in this.marks){var re=this.marks[X],ue=cr.comparePoints(re,z);if(!(ue<0)){if(ue===0&&P)if(!re.$insertRight)ue=1;else{if(re.bias!=1){re.bias=-1;continue}ue=1}var be=P?ue:cr.comparePoints(re,j);if(be>0){re.row+=q,re.column+=re.row==j.row?Y:0;continue}!P&&be<=0&&(re.row=z.row,re.column=z.column,be===0&&(re.bias=1))}}};var y=function(k,P,z,j){this.cm=k,this.id=P,this.row=z,this.column=j,k.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return g(this)},this.setBookmark=function(k,P){var z=new y(this,this.$uid++,k.line,k.ch);return(!P||!P.insertLeft)&&(z.$insertRight=!0),this.marks[z.id]=z,z},this.moveH=function(k,P){if(P=="char"){var z=this.ace.selection;z.clearSelection(),z.moveCursorBy(0,k)}},this.findPosV=function(k,P,z,j){if(z=="page"){var q=this.ace.renderer,Y=q.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),z="line"}if(z=="line"){var X=this.ace.session.documentToScreenPosition(k.line,k.ch);j!=null&&(X.column=j),X.row+=P,X.row=Math.min(Math.max(0,X.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(X.row,X.column);return g(re)}debugger},this.charCoords=function(k,P){if(P=="div"||!P){var z=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:z.column,top:z.row}}if(P=="local"){var j=this.ace.renderer,z=this.ace.session.documentToScreenPosition(k.line,k.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,X=q*z.row;return{left:z.column*Y,top:X,bottom:X+q}}},this.coordsChar=function(k,P){var z=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(k.top/z.lineHeight)),q=Math.max(0,Math.floor(k.left/z.characterWidth)),Y=z.session.screenToDocumentPosition(j,q);return g(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(k,P,z){var j=!1,q=!1;k instanceof RegExp&&!k.global&&(j=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
1404
+ `,q=!1);var Y=new Zi;P.ch==null&&(P.ch=Number.MAX_VALUE);var X={row:P.line,column:P.ch},re=this,ue=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){Y.setOptions({needle:k,caseSensitive:j,wrap:!1,backwards:be,regExp:q,start:ue||X});var Ae=Y.find(re.ace.session);return ue=Ae,ue&&[!ue.isEmpty()]},from:function(){return ue&&g(ue.start)},to:function(){return ue&&g(ue.end)},replace:function(be){ue&&(ue.end=re.ace.session.doc.replace(ue,be))}}},this.scrollTo=function(k,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))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,P){if(k){var z=this.ace.renderer,j={top:0,bottom:P};z.scrollCursorIntoView(f(k),z.lineHeight*2/z.$size.scrollerHeight,j)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,P){return this.ace.session.getTextRange(new cr(k.line,k.ch,P.line,P.ch))},this.replaceRange=function(k,P,z){z||(z=P);var j=new cr(P.line,P.ch,z.line,z.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,k)},this.replaceSelection=this.replaceSelections=function(k){var P=Array.isArray(k)&&k,z=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(z.getRange(),P?k[0]||"":k);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?k[q]||"":k);z.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var S={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,P){switch(this.state[k]=P,k){case"indentWithTabs":k=S[k],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:k=S[k]}k&&this.ace.setOption(k,P)},this.getOption=function(k){var P,z=S[k];switch(z&&(P=this.ace.getOption(z)),k){case"indentWithTabs":return k=S[k],!P;case"keyMap":return this.state.$keyMap||"vim"}return z?P:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new Yo(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 Y=q.start.row;Y==q.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,P=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var P=this.ace.session.getTokenAt(k.line,k.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(k){var P=this.ace.session.findMatchingBracket(f(k));return{to:P&&g(P)}},this.findMatchingTag=function(k){var P=this.ace.session.getMatchingTags(f(k));if(P)return{open:{from:g(P.openTag.start),to:g(P.openTag.end)},close:{from:g(P.closeTag.start),to:g(P.closeTag.end)}}},this.indentLine=function(k,P){P===!0?this.ace.session.indentRows(k,k," "):P===!1&&this.ace.session.outdentRows(new cr(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(f(k))},this.posFromIndex=function(k){return g(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,P,z,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var X=this.ace.session.$findClosingBracket(q.slice(1,2),f(k),Y);else{var X=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!X&&j.bracketRegex&&j.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(X={row:k.line,column:k.ch-1})}return X&&{pos:g(X)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(ze.commands.hasOwnProperty(k))return ze.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var P=this.$lineHandleChanges;if(!P)return null;for(var z=k.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(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return g(k.$lastDelta.end)}}).call(ze.prototype);var Ms=ze.StringStream=function(y,S){this.pos=this.start=0,this.string=y,this.tabSize=S||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ms.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(y){var S=this.string.charAt(this.pos);if(typeof y=="string")var k=S==y;else var k=S&&(y.test?y.test(S):y(S));if(k)return++this.pos,S},eatWhile:function(y){for(var S=this.pos;this.eat(y););return this.pos>S},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var S=this.string.indexOf(y,this.pos);if(S>-1)return this.pos=S,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,S,k){if(typeof y!="string"){var P=this.string.slice(this.pos).match(y);return P&&P.index>0?null:(P&&S!==!1&&(this.pos+=P[0].length),P)}var z=function(q){return k?q.toLowerCase():q},j=this.string.substr(this.pos,y.length);if(z(j)==z(y))return S!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,S){this.lineStart+=y;try{return S()}finally{this.lineStart-=y}}},ze.defineExtension=function(y,S){ze.prototype[y]=S},Zr.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 y(k,P,z){var j=k.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 S(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}ze.defineExtension("openDialog",function(k,P,z){function j(be){if(typeof be=="string")re.value=be;else{if(Y||be&&be.type=="blur"&&document.activeElement===re)return;X.state.dialog==q&&(X.state.dialog=null,X.focus()),Y=!0,q.remove(),z.onClose&&z.onClose(q);var Ae=X;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={}),S(this,null);var q=y(this,k,z.bottom),Y=!1,X=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],ue;return re?(z.value&&(re.value=z.value,z.selectValueOnOpen!==!1&&re.select()),z.onInput&&ze.on(re,"input",function(be){z.onInput(be,re.value,j)}),z.onKeyUp&&ze.on(re,"keyup",function(be){z.onKeyUp(be,re.value,j)}),ze.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)&&(ze.e_stop(be),j()))}),z.closeOnBlur!==!1&&ze.on(re,"blur",j),re.focus()):(ue=q.getElementsByTagName("button")[0])&&(ze.on(ue,"click",function(){j(),X.focus()}),z.closeOnBlur!==!1&&ze.on(ue,"blur",j),ue.focus()),j}}),ze.defineExtension("openNotification",function(k,P){function z(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){S(this,z);var j=y(this,k,P&&P.bottom),q=!1,Y,X=P&&typeof P.duration<"u"?P.duration:5e3;return ze.on(j,"click",function(re){ze.e_preventDefault(re),z()}),X&&(Y=setTimeout(z,X)),z}})})();var De=ze.Pos,Nn=[{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"}],Ro=Nn.length,Xi=[{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"}],Dn=L(""),ba=/[\d]/,Eo=[ze.isWordChar,function(y){return y&&!ze.isWordChar(y)&&!/\s/.test(y)}],Li=[function(y){return/\S/.test(y)}],go=["<",">"],Is=["-",'"',".",":","_","/","+"],en=/^\w$/,ct;try{ct=new RegExp("^[\\p{Lu}]$","u")}catch{ct=/^[A-Z]$/}var Ht={};M("filetype",void 0,"string",["ft"],function(y,S){if(S!==void 0){if(y===void 0){var k=S.getOption("mode");return k=="null"?"":k}var k=y==""?"null":y;S.setOption("mode",k)}}),M("textwidth",80,"number",["tw"],function(y,S){if(S!==void 0){if(y===void 0){var k=S.getOption("textwidth");return k}var P=Math.round(y);P>1&&S.setOption("textwidth",P)}});var Oi=function(){function y(X,re,ue){function be(Oe){var Ie=++z%P,Ge=Y[Ie];Ge&&Ge.clear(),Y[Ie]=X.setBookmark(Oe)}var Ae=z%P,ye=Y[Ae];if(ye){var xe=ye.find();xe&&!tt(xe,re)&&be(re)}else be(re);be(ue),j=z,q=z-P+1,q<0&&(q=0)}function S(X,re){z+=re,z>j?z=j:z<q&&(z=q);var ue=Y[(P+z)%P];if(ue&&!ue.find()){var be=re>0?1:-1,Ae,ye=X.getCursor();do if(z+=be,ue=Y[(P+z)%P],ue&&(Ae=ue.find())&&!tt(ye,Ae))break;while(z<j&&z>q)}return ue}function k(X,re){var ue=z,be=S(X,re);return z=ue,be&&be.find()}var P=100,z=-1,j=0,q=0,Y=new Array(P);return{cachedCursor:void 0,add:y,find:k,move:S}},Wn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=je.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,S){var k=je.registerController.getRegister(S);if(k){if(k.clear(),this.latestRegister=S,y.openDialog){var P=Jr("span",{class:"cm-vim-message"},"recording @"+S);this.onRecordingDone=y.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var je,bn,wt={enterVimMode:u,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return je.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return je},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:Vo,map:function(y,S,k){Pr.map(y,S,k)},unmap:function(y,S){return Pr.unmap(y,S)},noremap:function(y,S,k){Pr.map(y,S,k,!0)},mapclear:function(y){var S=Nn.length,k=Ro,P=Nn.slice(0,S-k);if(Nn=Nn.slice(S-k),y)for(var z=P.length-1;z>=0;z--){var j=P[z];if(y!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var X={};for(var re in j)X[re]=j[re];X.context=q[Y],this._mapCommand(X)}}}},langmap:F,vimKeyFromEvent:B,setOption:R,getOption:A,defineOption:M,defineEx:function(y,S,k){if(!S)S=y;else if(y.indexOf(S)!==0)throw new Error('(Vim.defineEx) "'+S+'" is not a prefix of "'+y+'", command not registered');ur[y]=k,Pr.commandMap_[S]={name:y,shortName:S,type:"api"}},handleKey:function(y,S,k){var P=this.findKey(y,S,k);if(typeof P=="function")return P()},multiSelectHandleKey:Go,findKey:function(y,S,k){function P(){var re=je.macroModeState;if(re.isRecording){if(S=="q")return re.exitMacroRecordMode(),_(y),!0;k!="mapping"&&As(re,S)}}function z(){if(S=="<Esc>"){if(Y.visualMode)pn(y);else{if(!Y.insertMode)return;mr(y)}return _(y),!0}}function j(){if(z())return!0;Y.inputState.keyBuffer.push(S);var re=Y.inputState.keyBuffer.join(""),ue=S.length==1,be=xi.matchCommand(re,Nn,Y.inputState,"insert"),Ae=Y.inputState.changeQueue;if(be.type=="none")return _(y),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(Y.expectLiteralNext=!0),bn&&window.clearTimeout(bn),bn=ue&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&_(y)},A("insertModeEscKeysTimeout")),ue){var ye=y.listSelections();(!Ae||Ae.removed.length!=ye.length)&&(Ae=Y.inputState.changeQueue=new N),Ae.inserted+=S;for(var xe=0;xe<ye.length;xe++){var Oe=it(ye[xe].anchor,ye[xe].head),Ie=Wt(ye[xe].anchor,ye[xe].head),Ge=y.getRange(Oe,y.state.overwrite?pe(Ie,0,1):Ie);Ae.removed[xe]=(Ae.removed[xe]||"")+Ge}}return!ue}if(Y.expectLiteralNext=!1,bn&&window.clearTimeout(bn),be.command&&Ae){for(var ye=y.listSelections(),xe=0;xe<ye.length;xe++){var ut=ye[xe].head;y.replaceRange(Ae.removed[xe]||"",pe(ut,0,-Ae.inserted.length),ut,"+input")}je.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||_(y),be.command}function q(){if(P()||z())return!0;Y.inputState.keyBuffer.push(S);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var ue=/^(\d*)(.*)$/.exec(re);if(!ue)return _(y),!1;var be=Y.visualMode?"visual":"normal",Ae=ue[2]||ue[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ae&&(Ae=Y.inputState.operatorShortcut);var ye=xi.matchCommand(Ae,Nn,Y.inputState,be);return ye.type=="none"?(_(y),!1):ye.type=="partial"?(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ye.type=="clear"?(_(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ue=/^(\d*)(.*)$/.exec(re),ue[1]&&ue[1]!="0"&&Y.inputState.pushRepeatDigit(ue[1]),ye.command)}var Y=O(y),X;return Y.insertMode?X=j():X=q(),X===!1?!Y.insertMode&&S.length===1?function(){return!0}:void 0:X===!0?function(){return!0}:function(){if(!((X.operator||X.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{X.type=="keyToKey"?T(y,X.toKeys,X):xi.processCommand(y,Y,X)}catch(re){throw y.state.vim=void 0,O(y),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,S){Pr.processCommand(y,S)},defineMotion:te,defineAction:le,defineOperator:ee,mapCommand:_s,_mapCommand:co,defineRegister:U,exitVisualMode:pn,exitInsertMode:mr},Nr=[],Ni=!1,Dt,Dr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Xn={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Qi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Dr)).forEach(function(y){Qi[(Dr[y]||"").toLowerCase()]=Qi[y.toLowerCase()]=y}),M("langmap",void 0,"string",["lmap"],function(y,S){if(y===void 0)return Dn.string;F(y)}),$.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},$.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},W.prototype={setText:function(y,S,k){this.keyBuffer=[y||""],this.linewise=!!S,this.blockwise=!!k},pushText:function(y,S){S&&(this.linewise||this.keyBuffer.push(`
1438
+ `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Wn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(y,S,k,P,z){if(y!=="_"){P&&k.charAt(k.length-1)!==`
1439
+ `&&(k+=`
1440
+ `);var j=this.isValidRegister(y)?this.getRegister(y):null;if(!j){switch(S){case"yank":this.registers[0]=new W(k,P,z);break;case"delete":case"change":k.indexOf(`
1441
+ `)==-1?this.registers["-"]=new W(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new W(k,P))}this.unnamedRegister.setText(k,P,z);return}var q=s(y);q?j.pushText(k,P):j.setText(k,P,z),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(j.toString(),P)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new W),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,Is)||en.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},J.prototype={nextMatch:function(y,S){var k=this.historyBuffer,P=S?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var z=this.iterator+P;S?z>=0:z<k.length;z+=P)for(var j=k[z],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=z,j;if(z>=k.length)return this.iterator=k.length,this.initialPrefix;if(z<0)return y},pushInput:function(y){var S=this.historyBuffer.indexOf(y);S>-1&&this.historyBuffer.splice(S,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var xi={matchCommand:function(y,S,k,P){var z=ve(y,S,P,k);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 Y=z.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var X=Ee(y);if(!X||X.length>1)return{type:"clear"};k.selectedCharacter=X}return{type:"full",command:j}},processCommand:function(y,S,k){switch(S.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(y,S,k);break;case"operator":this.processOperator(y,S,k);break;case"operatorMotion":this.processOperatorMotion(y,S,k);break;case"action":this.processAction(y,S,k);break;case"search":this.processSearch(y,S,k);break;case"ex":case"keyToEx":this.processEx(y,S,k);break}},processMotion:function(y,S,k){S.inputState.motion=k.motion,S.inputState.motionArgs=ce(k.motionArgs),this.evalInput(y,S)},processOperator:function(y,S,k){var P=S.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(y,S);return}_(y)}P.operator=k.operator,P.operatorArgs=ce(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&(S.visualBlock=!1,In(y)),S.visualMode&&this.evalInput(y,S)},processOperatorMotion:function(y,S,k){var P=S.visualMode,z=ce(k.operatorMotionArgs);z&&P&&z.visualLine&&(S.visualLine=!0),this.processOperator(y,S,k),P||this.processMotion(y,S,k)},processAction:function(y,S,k){var P=S.inputState,z=P.getRepeat(),j=!!z,q=ce(k.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(y,S,k),k.motion&&this.processMotion(y,S,k),(k.motion||k.operator)&&this.evalInput(y,S),q.repeat=z||1,q.repeatIsExplicit=j,q.registerName=P.registerName,_(y),S.lastMotion=null,k.isEdit&&this.recordLastEdit(S,P,k),Bn[k.action](y,q,S)},processSearch:function(y,S,k){function P(Ie,Ge,ut){je.searchHistoryController.pushInput(Ie),je.searchHistoryController.reset();try{oe(y,Ie,Ge,ut)}catch{Nt(y,"Invalid regex: "+Ie),_(y);return}xi.processMotion(y,S,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function z(Ie){P(Ie,!0,!0);var Ge=je.macroModeState;Ge.isRecording&&Ss(Ge,Ie)}function j(Ie,Ge,ut){var Ze=B(Ie),et,kn;Ze=="<Up>"||Ze=="<Down>"?(et=Ze=="<Up>",kn=Ie.target?Ie.target.selectionEnd:0,Ge=je.searchHistoryController.nextMatch(Ge,et)||"",ut(Ge),kn&&Ie.target&&(Ie.target.selectionEnd=Ie.target.selectionStart=Math.min(kn,Ie.target.value.length))):Ze&&Ze!="<Left>"&&Ze!="<Right>"&&je.searchHistoryController.reset();var Ct;try{Ct=oe(y,Ge,!0,!0)}catch{}Ct?y.scrollIntoView(yt(y,!Y,Ct),30):(Vt(y),y.scrollTo(be.left,be.top))}function q(Ie,Ge,ut){var Ze=B(Ie);Ze=="<Esc>"||Ze=="<C-c>"||Ze=="<C-[>"||Ze=="<BS>"&&Ge==""?(je.searchHistoryController.pushInput(Ge),je.searchHistoryController.reset(),oe(y,ue),Vt(y),y.scrollTo(be.left,be.top),ze.e_stop(Ie),_(y),ut(),y.focus()):Ze=="<Up>"||Ze=="<Down>"?ze.e_stop(Ie):Ze=="<C-u>"&&(ze.e_stop(Ie),ut(""))}if(y.getSearchCursor){var Y=k.searchArgs.forward,X=k.searchArgs.wholeWordOnly;On(y).setReversed(!Y);var re=Y?"/":"?",ue=On(y).getQuery(),be=y.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ae=je.macroModeState;if(Ae.isPlaying){var Oe=Ae.replaySearchQueries.shift();P(Oe,!0,!1)}else ar(y,{onClose:z,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var ye=nn(y,{noSymbol:!0}),xe=!0;if(ye||(ye=nn(y,{noSymbol:!1}),xe=!1),!ye){Nt(y,"No word under cursor"),_(y);return}var Oe=y.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);xe&&X?Oe="\\b"+Oe+"\\b":Oe=An(Oe),je.jumpList.cachedCursor=y.getCursor(),y.setCursor(ye.start),P(Oe,!0,!1)}}},processEx:function(y,S,k){function P(j){je.exCommandHistoryController.pushInput(j),je.exCommandHistoryController.reset(),Pr.processCommand(y,j),y.state.vim&&_(y)}function z(j,q,Y){var X=B(j),re,ue;(X=="<Esc>"||X=="<C-c>"||X=="<C-[>"||X=="<BS>"&&q=="")&&(je.exCommandHistoryController.pushInput(q),je.exCommandHistoryController.reset(),ze.e_stop(j),_(y),Y(),y.focus()),X=="<Up>"||X=="<Down>"?(ze.e_stop(j),re=X=="<Up>",ue=j.target?j.target.selectionEnd:0,q=je.exCommandHistoryController.nextMatch(q,re)||"",Y(q),ue&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(ue,j.target.value.length))):X=="<C-u>"?(ze.e_stop(j),Y("")):X&&X!="<Left>"&&X!="<Right>"&&je.exCommandHistoryController.reset()}k.type=="keyToEx"?Pr.processCommand(y,k.exArgs.input):S.visualMode?ar(y,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:z,selectValueOnOpen:!1}):ar(y,{onClose:P,prefix:":",onKeyDown:z})},evalInput:function(y,S){var k=S.inputState,P=k.motion,z=k.motionArgs||{},j=k.operator,q=k.operatorArgs||{},Y=k.registerName,X=S.sel,re=He(S.visualMode?se(y,X.head):y.getCursor("head")),ue=He(S.visualMode?se(y,X.anchor):y.getCursor("anchor")),be=He(re),Ae=He(ue),ye,xe,Oe;if(j&&this.recordLastEdit(S,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&z.explicitRepeat?z.repeatIsExplicit=!0:(z.noRepeat||!z.explicitRepeat&&Oe===0)&&(Oe=1,z.repeatIsExplicit=!1),k.selectedCharacter&&(z.selectedCharacter=q.selectedCharacter=k.selectedCharacter),z.repeat=Oe,_(y),P){var Ie=$n[P](y,re,z,S,k);if(S.lastMotion=$n[P],!Ie)return;if(z.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=je.jumpList,ut=Ge.cachedCursor;ut?(Gr(y,ut,Ie),delete Ge.cachedCursor):Gr(y,re,Ie)}Ie instanceof Array?(xe=Ie[0],ye=Ie[1]):ye=Ie,ye||(ye=He(re)),S.visualMode?((!S.visualBlock||ye.ch!==1/0)&&(ye=se(y,ye,be)),xe&&(xe=se(y,xe)),xe=xe||Ae,X.anchor=xe,X.head=ye,In(y),Yr(y,S,"<",Xe(xe,ye)?xe:ye),Yr(y,S,">",Xe(xe,ye)?ye:xe)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ye=se(y,ye,be),y.setCursor(ye.line,ye.ch))}if(j){if(q.lastSel){xe=Ae;var Ze=q.lastSel,et=Math.abs(Ze.head.line-Ze.anchor.line),kn=Math.abs(Ze.head.ch-Ze.anchor.ch);Ze.visualLine?ye=new De(Ae.line+et,Ae.ch):Ze.visualBlock?ye=new De(Ae.line+et,Ae.ch+kn):Ze.head.line==Ze.anchor.line?ye=new De(Ae.line,Ae.ch+kn):ye=new De(Ae.line+et,Ae.ch),S.visualMode=!0,S.visualLine=Ze.visualLine,S.visualBlock=Ze.visualBlock,X=S.sel={anchor:xe,head:ye},In(y)}else S.visualMode&&(q.lastSel={anchor:He(X.anchor),head:He(X.head),visualBlock:S.visualBlock,visualLine:S.visualLine});var Ct,Kt,Tt,_t,Qn;if(S.visualMode){Ct=it(X.head,X.anchor),Kt=Wt(X.head,X.anchor),Tt=S.visualLine||q.linewise,_t=S.visualBlock?"block":Tt?"line":"char";var hr=w(y,Ct,Kt);if(Qn=Un(y,{anchor:hr.start,head:hr.end},_t),Tt){var Rn=Qn.ranges;if(_t=="block")for(var V=0;V<Rn.length;V++)Rn[V].head.ch=At(y,Rn[V].head.line);else _t=="line"&&(Rn[0].head=new De(Rn[0].head.line+1,0))}}else{if(Ct=He(xe||Ae),Kt=He(ye||be),Xe(Kt,Ct)){var Z=Ct;Ct=Kt,Kt=Z}Tt=z.linewise||q.linewise,Tt?Ln(y,Ct,Kt):z.forward&&zn(y,Ct,Kt),_t="char";var ie=!z.inclusive||Tt,hr=w(y,Ct,Kt);Qn=Un(y,{anchor:hr.start,head:hr.end},_t,ie)}y.setSelections(Qn.ranges,Qn.primary),S.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=Tt;var ae=Jo[j](y,q,Qn.ranges,Ae,ye);S.visualMode&&pn(y,ae!=null),ae&&y.setCursor(ae)}},recordLastEdit:function(y,S,k){var P=je.macroModeState;P.isPlaying||(y.lastEditInputState=S,y.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},$n={moveToTopLine:function(y,S,k){var P=Vn(y).top+k.repeat-1;return new De(P,Gt(y.getLine(P)))},moveToMiddleLine:function(y){var S=Vn(y),k=Math.floor((S.top+S.bottom)*.5);return new De(k,Gt(y.getLine(k)))},moveToBottomLine:function(y,S,k){var P=Vn(y).bottom-k.repeat+1;return new De(P,Gt(y.getLine(P)))},expandToLine:function(y,S,k){var P=S;return new De(P.line+k.repeat-1,1/0)},findNext:function(y,S,k){var P=On(y),z=P.getQuery();if(z){var j=!k.forward;return j=P.isReversed()?!j:j,Be(y,z),yt(y,j,z,k.repeat)}},findAndSelectNextInclusive:function(y,S,k,P,z){var j=On(y),q=j.getQuery();if(q){var Y=!k.forward;Y=j.isReversed()?!Y:Y;var X=gn(y,Y,q,k.repeat,P);if(X){if(z.operator)return X;var re=X[0],ue=new De(X[1].line,X[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var be=P.sel.anchor;if(be)return j.isReversed()?k.forward?[be,re]:[be,ue]:k.forward?[be,ue]:[be,re]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ue,re]:[re,ue]}}},goToMark:function(y,S,k,P){var z=cn(y,P,k.selectedCharacter);return z?k.linewise?{line:z.line,ch:Gt(y.getLine(z.line))}:z:null},moveToOtherHighlightedEnd:function(y,S,k,P){if(P.visualBlock&&k.sameLine){var z=P.sel;return[se(y,new De(z.anchor.line,z.head.ch)),se(y,new De(z.head.line,z.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(y,S,k,P){for(var z=S,j=0;j<k.repeat;j++){var q=z;for(var Y in P.marks)if(c(Y)){var X=P.marks[Y].find(),re=k.forward?Xe(X,q):Xe(q,X);if(!re&&!(k.linewise&&X.line==q.line)){var ue=tt(q,z),be=k.forward?br(q,X,z):br(z,X,q);(ue||be)&&(z=X)}}}return k.linewise&&(z=new De(z.line,Gt(y.getLine(z.line)))),z},moveByCharacters:function(y,S,k){var P=S,z=k.repeat,j=k.forward?P.ch+z:P.ch-z;return new De(P.line,j)},moveByLines:function(y,S,k,P){var z=S,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=k.repeat+(k.repeatOffset||0),Y=k.forward?z.line+q:z.line-q,X=y.firstLine(),re=y.lastLine();if(Y<X&&z.line==X)return this.moveToStartOfLine(y,S,k,P);if(Y>re&&z.line==re)return Yi(y,S,k,P,!0);var ue=y.ace.session.getFoldLine(Y);return ue&&(k.forward?Y>ue.start.row&&(Y=ue.end.row+1):Y=ue.start.row),k.toFirstChar&&(j=Gt(y.getLine(Y)),P.lastHPos=j),P.lastHSPos=y.charCoords(new De(Y,j),"div").left,new De(Y,j)},moveByDisplayLines:function(y,S,k,P){var z=S;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=y.charCoords(z,"div").left}var j=k.repeat,X=y.findPosV(z,k.forward?j:-j,"line",P.lastHSPos);if(X.hitSide)if(k.forward)var q=y.charCoords(X,"div"),Y={top:q.top+8,left:P.lastHSPos},X=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=P.lastHSPos,X=y.coordsChar(re,"div")}return P.lastHPos=X.ch,X},moveByPage:function(y,S,k){var P=S,z=k.repeat;return y.findPosV(P,k.forward?z:-z,"page")},moveByParagraph:function(y,S,k){var P=k.forward?1:-1;return wi(y,S,k.repeat,P)},moveBySentence:function(y,S,k){var P=k.forward?1:-1;return si(y,S,k.repeat,P)},moveByScroll:function(y,S,k,P){var z=y.getScrollInfo(),j=null,q=k.repeat;q||(q=z.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(S,"local");if(k.repeat=q,j=$n.moveByDisplayLines(y,S,k,P),!j)return null;var X=y.charCoords(j,"local");return y.scrollTo(null,z.top+X.top-Y.top),j},moveByWords:function(y,S,k){return Zn(y,S,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(y,S,k){var P=k.repeat,z=Kr(y,P,k.forward,k.selectedCharacter,S),j=k.forward?-1:1;return xr(j,k),z?(z.ch+=j,z):null},moveToCharacter:function(y,S,k){var P=k.repeat;return xr(0,k),Kr(y,P,k.forward,k.selectedCharacter,S)||S},moveToSymbol:function(y,S,k){var P=k.repeat;return yi(y,P,k.forward,k.selectedCharacter)||S},moveToColumn:function(y,S,k,P){var z=k.repeat;return P.lastHPos=z-1,P.lastHSPos=y.charCoords(S,"div").left,Cs(y,z)},moveToEol:function(y,S,k,P){return Yi(y,S,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,S){var k=S;return new De(k.line,Gt(y.getLine(k.line)))},moveToMatchedSymbol:function(y,S){for(var k=S,P=k.line,z=k.ch,j=y.getLine(P),q;z<j.length;z++)if(q=j.charAt(z),q&&h(q)){var Y=y.getTokenTypeAt(new De(P,z+1));if(Y!=="string"&&Y!=="comment")break}if(z<j.length){var X=/[<>]/.test(j[z])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(P,z+1),{bracketRegex:X});return re.to}return k},moveToStartOfLine:function(y,S){return new De(S.line,0)},moveToLineOrEdgeOfDocument:function(y,S,k){var P=k.forward?y.lastLine():y.firstLine();return k.repeatIsExplicit&&(P=k.repeat-y.getOption("firstLineNumber")),new De(P,Gt(y.getLine(P)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var S=y.getCursor();return S.sticky=="before"&&S.ch--,S},textObjectManipulation:function(y,S,k,P){var z={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,X,re;if(z[q]){if(re=!0,X=_n(y,S,q,Y),!X){var ue=y.getSearchCursor(new RegExp("\\"+q,"g"),S);ue.find()&&(X=_n(y,ue.from(),q,Y))}}else if(j[q])re=!0,X=Cr(y,S,q,Y);else if(q==="W"||q==="w")for(var be=k.repeat||1;be-- >0;){var Ae=nn(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},X&&X.end);Ae&&(X||(X=Ae),X.end=Ae.end)}else if(q==="p")if(X=wi(y,S,k.repeat,0,Y),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var ye=P.inputState.operatorArgs;ye&&(ye.linewise=!0),X.end.line--}else if(q==="t")X=Ir(y,S,Y);else if(q==="s"){var xe=y.getLine(S.line);S.ch>0&&b(xe[S.ch])&&(S.ch-=1);var Oe=_o(y,S,k.repeat,1,Y),Ie=_o(y,S,k.repeat,-1,Y);p(y.getLine(Ie.line)[Ie.ch])&&p(y.getLine(Oe.line)[Oe.ch-1])&&(Ie={line:Ie.line,ch:Ie.ch+1}),X={start:Ie,end:Oe}}return X?y.state.vim.visualMode?Zt(y,X.start,X.end,re):[X.start,X.end]:null},repeatLastCharacterSearch:function(y,S,k){var P=je.lastCharacterSearch,z=k.repeat,j=k.forward===P.forward,q=(P.increment?1:0)*(j?-1:1);y.moveH(-q,"char"),k.inclusive=!!j;var Y=Kr(y,z,j,P.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),S)}},Jo={change:function(y,S,k){var P,z,j=y.state.vim,q=k[0].anchor,Y=k[0].head;if(j.visualMode)if(S.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),z=y.getSelection(),y.replaceSelection(""),P=q;else{z=y.getSelection();var X=he("",k.length);y.replaceSelections(X),P=it(k[0].head,k[0].anchor)}else{z=y.getRange(q,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!p(z)){var ue=/\s+$/.exec(z);ue&&re.motionArgs&&re.motionArgs.forward&&(Y=pe(Y,0,-ue[0].length),z=z.slice(0,-ue[0].length))}S.linewise&&(q=new De(q.line,Gt(y.getLine(q.line))),Y.line>q.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),P=q}je.registerController.pushText(S.registerName,"change",z,S.linewise,k.length>1),Bn.enterInsertMode(y,{head:P},y.state.vim)},delete:function(y,S,k){var P,z,j=y.state.vim;if(j.visualBlock){z=y.getSelection();var q=he("",k.length);y.replaceSelections(q),P=it(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,X=k[0].head;S.linewise&&X.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==X.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,At(y,Y.line-1))),z=y.getRange(Y,X),y.replaceRange("",Y,X),P=Y,S.linewise&&(P=$n.moveToFirstNonWhiteSpaceCharacter(y,Y))}return je.registerController.pushText(S.registerName,"delete",z,S.linewise,j.visualBlock),se(y,P)},indent:function(y,S,k){var P=y.state.vim,z=P.visualMode?S.repeat:1;if(P.visualBlock){for(var j=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,X=k.length-1;X>=0;X--)if(Y=it(k[X].anchor,k[X].head),S.indentRight)y.replaceRange(q.repeat(z),Y,Y);else{for(var re=y.getLine(Y.line),ue=0,be=0;be<z;be++){var Ae=re[Y.ch+ue];if(Ae==" ")ue++;else{if(Ae!=" ")break;ue++;for(var ye=1;ye<q.length&&(Ae=re[Y.ch+ue],Ae===" ");ye++)ue++}}y.replaceRange("",Y,pe(Y,0,ue))}return Y}if(y.indentMore)for(var be=0;be<z;be++)S.indentRight?y.indentMore():y.indentLess();else{var xe=k[0].anchor.line,Oe=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;S.linewise&&Oe--;for(var X=xe;X<=Oe;X++)for(var be=0;be<z;be++)y.indentLine(X,S.indentRight)}return $n.moveToFirstNonWhiteSpaceCharacter(y,k[0].anchor)},indentAuto:function(y,S,k){return y.execCommand("indentAuto"),$n.moveToFirstNonWhiteSpaceCharacter(y,k[0].anchor)},hardWrap:function(y,S,k,P,z){if(y.hardWrap){var j=k[0].anchor.line,q=k[0].head.line;S.linewise&&q--;var Y=y.hardWrap({from:j,to:q});return Y>j&&S.linewise&&Y--,S.keepCursor?P:new De(Y,0)}},changeCase:function(y,S,k,P,z){for(var j=y.getSelections(),q=[],Y=S.toLower,X=0;X<j.length;X++){var re=j[X],ue="";if(Y===!0)ue=re.toLowerCase();else if(Y===!1)ue=re.toUpperCase();else for(var be=0;be<re.length;be++){var Ae=re.charAt(be);ue+=s(Ae)?Ae.toLowerCase():Ae.toUpperCase()}q.push(ue)}return y.replaceSelections(q),S.shouldMoveCursor?z:!y.state.vim.visualMode&&S.linewise&&k[0].anchor.line+1==k[0].head.line?$n.moveToFirstNonWhiteSpaceCharacter(y,P):S.linewise?P:it(k[0].anchor,k[0].head)},yank:function(y,S,k,P){var z=y.state.vim,j=y.getSelection(),q=z.visualMode?it(z.sel.anchor,z.sel.head,k[0].head,k[0].anchor):P;return je.registerController.pushText(S.registerName,"yank",j,S.linewise,z.visualBlock),q}},Bn={jumpListWalk:function(y,S,k){if(!k.visualMode){var P=S.repeat,z=S.forward,j=je.jumpList,q=j.move(y,z?P:-P),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,S,k){if(!k.visualMode){var P=S.repeat||1,z=y.defaultTextHeight(),j=y.getScrollInfo().top,q=z*P,Y=S.forward?j+q:j-q,X=He(y.getCursor()),re=y.charCoords(X,"local");if(S.forward)Y>re.top?(X.line+=(Y-re.top)/z,X.line=Math.ceil(X.line),y.setCursor(X),re=y.charCoords(X,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var ue=Y+y.getScrollInfo().clientHeight;ue<re.bottom?(X.line-=(re.bottom-ue)/z,X.line=Math.floor(X.line),y.setCursor(X),re=y.charCoords(X,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,S){var k=y.getCursor().line,P=y.charCoords(new De(k,0),"local"),z=y.getScrollInfo().clientHeight,j=P.top;switch(S.position){case"center":j=P.bottom-z/2;break;case"bottom":var q=new De(k,y.getLine(k).length-1),Y=y.charCoords(q,"local"),X=Y.bottom-j;j=j-z+X}y.scrollTo(null,j)},replayMacro:function(y,S,k){var P=S.selectedCharacter,z=S.repeat,j=je.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;z--;)ks(y,k,j,P)},enterMacroRecordMode:function(y,S){var k=je.macroModeState,P=S.selectedCharacter;je.registerController.isValidRegister(P)&&k.enterMacroRecordMode(y,P)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),ze.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),ze.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,S,k){if(!y.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=S&&S.repeat||1;var P=S?S.insertAt:null,z=k.sel,j=S.head||y.getCursor("head"),q=y.listSelections().length;if(P=="eol")j=new De(j.line,At(y,j.line));else if(P=="bol")j=new De(j.line,0);else if(P=="charAfter"){var Y=w(y,j,pe(j,0,1));j=Y.end}else if(P=="firstNonBlank"){var Y=w(y,j,$n.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.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(!k.visualMode)return;k.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(k.visualMode)return}else P=="lastEdit"&&(j=gr(y)||j);y.setOption("disableInput",!1),S&&S.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),ze.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),ze.signal(y,"vim-mode-change",{mode:"insert"})),je.macroModeState.isPlaying||(y.on("change",Uo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=y.setBookmark(j,{insertLeft:!0}),ze.on(y.getInputField(),"keydown",So)),k.visualMode&&pn(y),or(y,j,q)}},toggleVisualMode:function(y,S,k){var P=S.repeat,z=y.getCursor(),j;if(k.visualMode)k.visualLine^S.linewise||k.visualBlock^S.blockwise?(k.visualLine=!!S.linewise,k.visualBlock=!!S.blockwise,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),In(y)):pn(y);else{k.visualMode=!0,k.visualLine=!!S.linewise,k.visualBlock=!!S.blockwise,j=se(y,new De(z.line,z.ch+P-1));var q=w(y,z,j);k.sel={anchor:q.start,head:q.end},ze.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),In(y),Yr(y,k,"<",it(z,j)),Yr(y,k,">",Wt(z,j))}},reselectLastSelection:function(y,S,k){var P=k.lastSelection;if(k.visualMode&&$t(y,k),P){var z=P.anchorMark.find(),j=P.headMark.find();if(!z||!j)return;k.sel={anchor:z,head:j},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,In(y),Yr(y,k,"<",it(z,j)),Yr(y,k,">",Wt(z,j)),ze.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(y,S,k){var P,z;if(k.visualMode){if(P=y.getCursor("anchor"),z=y.getCursor("head"),Xe(z,P)){var j=z;z=P,P=j}z.ch=At(y,z.line)-1}else{var q=Math.max(S.repeat,2);P=y.getCursor(),z=se(y,new De(P.line+q-1,1/0))}for(var Y=0,X=P.line;X<z.line;X++){Y=At(y,P.line);var re="",ue=0;if(!S.keepSpaces){var be=y.getLine(P.line+1);ue=be.search(/\S/),ue==-1?ue=be.length:re=" "}y.replaceRange(re,new De(P.line,Y),new De(P.line+1,ue))}var Ae=se(y,new De(P.line,Y));k.visualMode&&pn(y,!1),y.setCursor(Ae)},newLineAndEnterInsertMode:function(y,S,k){k.insertMode=!0;var P=He(y.getCursor());if(P.line===y.firstLine()&&!S.after)y.replaceRange(`
1442
+ `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{P.line=S.after?P.line:P.line-1,P.ch=At(y,P.line),y.setCursor(P);var z=ze.commands.newlineAndIndentContinueComment||ze.commands.newlineAndIndent;z(y)}this.enterInsertMode(y,{repeat:S.repeat},k)},paste:function(y,S,k){var P=this,z=je.registerController.getRegister(S.registerName),j=function(){var q=z.toString();P.continuePaste(y,S,k,q,z)};S.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(y,S,k,q,z)},function(){j()}):j()},continuePaste:function(y,S,k,P,z){var j=He(y.getCursor());if(P){if(S.matchIndent){var q=y.getOption("tabSize"),Y=function(Rn){var V=Rn.split(" ").length-1,Z=Rn.split(" ").length-1;return V*q+Z*1},X=y.getLine(y.getCursor().line),re=Y(X.match(/^\s*/)[0]),ue=P.replace(/\n$/,""),be=P!==ue,Ae=Y(P.match(/^\s*/)[0]),P=ue.replace(/^\s*/gm,function(Rn){var V=re+(Y(Rn)-Ae);if(V<0)return"";if(y.getOption("indentWithTabs")){var Z=Math.floor(V/q);return Array(Z+1).join(" ")}return Array(V+1).join(" ")});P+=be?`
1443
+ `:""}if(S.repeat>1)var P=Array(S.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+=S.after?1:0,j.ch=Math.min(At(y,j.line),j.ch)}else ye?k.visualMode?P=k.visualLine?P.slice(0,-1):`
1445
+ `+P.slice(0,P.length-1)+`
1446
+ `:S.after?(P=`
1447
+ `+P.slice(0,P.length-1),j.ch=At(y,j.line)):j.ch=0:j.ch+=S.after?1:0;var Ie;if(k.visualMode){k.lastPastedText=P;var Ge,ut=Ke(y,k),Ze=ut[0],et=ut[1],kn=y.getSelection(),Ct=y.listSelections(),Kt=new Array(Ct.length).join("1").split("1");k.lastSelection&&(Ge=k.lastSelection.headMark.find()),je.registerController.unnamedRegister.setText(kn),xe?(y.replaceSelections(Kt),et=new De(Ze.line+P.length-1,Ze.ch),y.setCursor(Ze),fn(y,et),y.replaceSelections(P),Ie=Ze):k.visualBlock?(y.replaceSelections(Kt),y.setCursor(Ze),y.replaceRange(P,Ze,Ze),Ie=Ze):(y.replaceRange(P,Ze,et),Ie=y.posFromIndex(y.indexFromPos(Ze)+P.length-1)),Ge&&(k.lastSelection.headMark=y.setBookmark(Ge)),ye&&(Ie.ch=0)}else if(xe){y.setCursor(j);for(var Oe=0;Oe<P.length;Oe++){var Tt=j.line+Oe;Tt>y.lastLine()&&y.replaceRange(`
1448
+ `,new De(Tt,0));var _t=At(y,Tt);_t<j.ch&&wr(y,Tt,j.ch)}y.setCursor(j),fn(y,new De(j.line+P.length-1,j.ch)),y.replaceSelections(P),Ie=j}else if(y.replaceRange(P,j),ye){var Tt=S.after?j.line+1:j.line;Ie=new De(Tt,Gt(y.getLine(Tt)))}else Ie=He(j),/\n/.test(P)||(Ie.ch+=P.length-(S.after?1:0));k.visualMode&&pn(y,!1),y.setCursor(Ie)}},undo:function(y,S){y.operation(function(){qe(y,ze.commands.undo,S.repeat)(),y.setCursor(se(y,y.getCursor("start")))})},redo:function(y,S){qe(y,ze.commands.redo,S.repeat)()},setRegister:function(y,S,k){k.inputState.registerName=S.selectedCharacter},insertRegister:function(y,S,k){var P=S.selectedCharacter,z=je.registerController.getRegister(P),j=z&&z.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,S,k){mr(y,!0),k.insertModeReturn=!0,ze.on(y,"vim-command-done",function P(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Bn.enterInsertMode(y,{},k)),ze.off(y,"vim-command-done",P))})},setMark:function(y,S,k){var P=S.selectedCharacter;Yr(y,k,P,y.getCursor())},replace:function(y,S,k){var P=S.selectedCharacter,z=y.getCursor(),j,q,Y=y.listSelections();if(k.visualMode)z=y.getCursor("start"),q=y.getCursor("end");else{var X=y.getLine(z.line);j=z.ch+S.repeat,j>X.length&&(j=X.length),q=new De(z.line,j)}var re=w(y,z,q);if(z=re.start,q=re.end,P==`
1449
+ `)k.visualMode||y.replaceRange("",z,q),(ze.commands.newlineAndIndentContinueComment||ze.commands.newlineAndIndent)(y);else{var ue=y.getRange(z,q);if(ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/[^\n]/g,P),k.visualBlock){var be=new Array(y.getOption("tabSize")+1).join(" ");ue=y.getSelection(),ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/\t/g,be).replace(/[^\n]/g,P).split(`
1450
+ `),y.replaceSelections(ue)}else y.replaceRange(ue,z,q);k.visualMode?(z=Xe(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(z),pn(y,!1)):y.setCursor(pe(q,0,-1))}},incrementNumberToken:function(y,S){for(var k=y.getCursor(),P=y.getLine(k.line),z=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,X;(j=z.exec(P))!==null&&(q=j.index,Y=q+j[0].length,!(k.ch<Y)););if(!(!S.backtrack&&Y<=k.ch)&&j){var re=j[2]||j[4],ue=j[3]||j[5],be=S.increase?1:-1,Ae={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ye=parseInt(j[1]+ue,Ae)+be*S.repeat;X=ye.toString(Ae);var xe=re?new Array(ue.length-X.length+1+j[1].length).join("0"):"";X.charAt(0)==="-"?X="-"+re+xe+X.substr(1):X=re+xe+X;var Oe=new De(k.line,q),Ie=new De(k.line,Y);y.replaceRange(X,Oe,Ie),y.setCursor(new De(k.line,q+X.length-1))}},repeatLastEdit:function(y,S,k){var P=k.lastEditInputState;if(P){var z=S.repeat;z&&S.repeatIsExplicit?k.lastEditInputState.repeatOverride=z:z=k.lastEditInputState.repeatOverride||z,Rs(y,k,z,!1)}},indent:function(y,S){y.indentLine(y.getCursor().line,S.indentRight)},exitInsertMode:mr},Ci={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},_i={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var S=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,S}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var S=y.lineText.match(/^#(\w+)/)[1];if(S==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(S==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(S==="else"&&y.depth===0)return!0}return!1}}};M("pcre",!0,"boolean"),Lr.prototype={getQuery:function(){return je.query},setQuery:function(y){je.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return je.isReversed},setReversed:function(y){je.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Di={"\\n":`
1451
+ `,"\\r":"\r","\\t":" "},Ls={"\\/":"/","\\\\":"\\","\\n":`
1452
+ `,"\\r":"\r","\\t":" ","\\&":"&"},rn=0,wa=function(){this.buildCommandMap_()};wa.prototype={processCommand:function(y,S,k){var P=this;y.operation(function(){y.curOp.isVimOp=!0,P._processCommand(y,S,k)})},_processCommand:function(y,S,k){var P=y.state.vim,z=je.registerController.getRegister(":"),j=z.toString(),q=new ze.StringStream(S);z.setText(S);var Y=k||{};Y.input=S;try{this.parseInput_(y,q,Y)}catch(ue){throw Nt(y,ue.toString()),ue}P.visualMode&&pn(y);var X,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(X=this.matchCommand_(Y.commandName),X){if(re=X.name,X.excludeFromCommandHistory&&z.setText(j),this.parseCommandArgs_(q,Y,X),X.type=="exToKey"){T(y,X.toKeys,X);return}if(X.type=="exToEx"){this.processCommand(y,X.toInput);return}}if(!re){Nt(y,'Not an editor command ":'+S+'"');return}try{ur[re](y,Y),(!X||!X.possiblyAsync)&&Y.callback&&Y.callback()}catch(ue){throw Nt(y,ue.toString()),ue}},parseInput_:function(y,S,k){if(S.eatWhile(":"),S.eat("%")?(k.line=y.firstLine(),k.lineEnd=y.lastLine()):(k.line=this.parseLineSpec_(y,S),k.line!==void 0&&S.eat(",")&&(k.lineEnd=this.parseLineSpec_(y,S))),k.line==null)if(y.state.vim.visualMode){var P=cn(y,y.state.vim,"<");k.selectionLine=P&&P.line,P=cn(y,y.state.vim,">"),k.selectionLineEnd=P&&P.line}else k.selectionLine=y.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var z=S.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return z?k.commandName=z[1]:k.commandName=S.match(/.*/)[0],k},parseLineSpec_:function(y,S){var k=S.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(S.next()){case".":return this.parseLineSpecOffset_(S,y.getCursor().line);case"$":return this.parseLineSpecOffset_(S,y.lastLine());case"'":var P=S.next(),z=cn(y,y.state.vim,P);if(!z)throw new Error("Mark not set");return this.parseLineSpecOffset_(S,z.line);case"-":case"+":return S.backUp(1),this.parseLineSpecOffset_(S,y.getCursor().line);default:return S.backUp(1),void 0}},parseLineSpecOffset_:function(y,S){var k=y.match(/^([+-])?(\d+)/);if(k){var P=parseInt(k[2],10);k[1]=="-"?S-=P:S+=P}return S},parseCommandArgs_:function(y,S,k){if(!y.eol()){S.argString=y.match(/.*/)[0];var P=k.argDelimiter||/\s+/,z=ir(S.argString).split(P);z.length&&z[0]&&(S.args=z)}},matchCommand_:function(y){for(var S=y.length;S>0;S--){var k=y.substring(0,S);if(this.commandMap_[k]){var P=this.commandMap_[k];if(P.name.indexOf(y)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<Xi.length;y++){var S=Xi[y],k=S.shortName||S.name;this.commandMap_[k]=S}},map:function(y,S,k,P){if(y!=":"&&y.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var z=y.substring(1);S!=":"&&S.charAt(0)==":"?this.commandMap_[z]={name:z,type:"exToEx",toInput:S.substring(1),user:!0}:this.commandMap_[z]={name:z,type:"exToKey",toKeys:S,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:S,noremap:!!P};k&&(j.context=k),Nn.unshift(j)}},unmap:function(y,S){if(y!=":"&&y.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var k=y.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var P=y,z=0;z<Nn.length;z++)if(P==Nn[z].keys&&Nn[z].context===S)return Nn.splice(z,1),!0}};var ur={colorscheme:function(y,S){if(!S.args||S.args.length<1){Nt(y,y.getOption("theme"));return}y.setOption("theme",S.args[0])},map:function(y,S,k,P){var z=S.args;if(!z||z.length<2){y&&Nt(y,"Invalid mapping: "+S.input);return}Pr.map(z[0],z[1],k,P)},imap:function(y,S){this.map(y,S,"insert")},nmap:function(y,S){this.map(y,S,"normal")},vmap:function(y,S){this.map(y,S,"visual")},omap:function(y,S){this.map(y,S,"operatorPending")},noremap:function(y,S){this.map(y,S,void 0,!0)},inoremap:function(y,S){this.map(y,S,"insert",!0)},nnoremap:function(y,S){this.map(y,S,"normal",!0)},vnoremap:function(y,S){this.map(y,S,"visual",!0)},onoremap:function(y,S){this.map(y,S,"operatorPending",!0)},unmap:function(y,S,k){var P=S.args;(!P||P.length<1||!Pr.unmap(P[0],k))&&y&&Nt(y,"No such mapping: "+S.input)},mapclear:function(y,S){wt.mapclear()},imapclear:function(y,S){wt.mapclear("insert")},nmapclear:function(y,S){wt.mapclear("normal")},vmapclear:function(y,S){wt.mapclear("visual")},omapclear:function(y,S){wt.mapclear("operatorPending")},move:function(y,S){xi.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:S.line+1})},set:function(y,S){var k=S.args,P=S.setCfg||{};if(!k||k.length<1){y&&Nt(y,"Invalid mapping: "+S.input);return}var z=k[0].split("="),j=z[0],q=z[1],Y=!1,X=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+S.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),X=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Ht[j]&&Ht[j].type=="boolean";if(re&&(X?q=!A(j,y,P):q==null&&(q=!0)),!re&&q===void 0||Y){var ue=A(j,y,P);ue instanceof Error?Nt(y,ue.message):ue===!0||ue===!1?Nt(y," "+(ue?"":"no")+j):Nt(y," "+j+"="+ue)}else{var be=R(j,q,y,P);be instanceof Error&&Nt(y,be.message)}},setlocal:function(y,S){S.setCfg={scope:"local"},this.set(y,S)},setglobal:function(y,S){S.setCfg={scope:"global"},this.set(y,S)},registers:function(y,S){var k=S.args,P=je.registerController.registers,z=`----------Registers----------
1453
+
1454
+ `;if(k){var j;k=k.join("");for(var q=0;q<k.length;q++)if(j=k.charAt(q),!!je.registerController.isValidRegister(j)){var Y=P[j]||new W;z+='"'+j+" "+Y.toString()+`
1455
+ `}}else for(var j in P){var X=P[j].toString();X.length&&(z+='"'+j+" "+X+`
1456
+ `)}Nt(y,z)},sort:function(y,S){function k(){if(S.argString){var Tt=new ze.StringStream(S.argString);if(Tt.eat("!")&&(j=!0),Tt.eol())return;if(!Tt.eatSpace())return"Invalid arguments";var _t=Tt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!_t&&!Tt.eol())return"Invalid arguments";if(_t[1]){q=_t[1].indexOf("i")!=-1,Y=_t[1].indexOf("u")!=-1;var Qn=_t[1].indexOf("d")!=-1||_t[1].indexOf("n")!=-1&&1,hr=_t[1].indexOf("x")!=-1&&1,Rn=_t[1].indexOf("o")!=-1&&1;if(Qn+hr+Rn>1)return"Invalid arguments";X=Qn&&"decimal"||hr&&"hex"||Rn&&"octal"}_t[2]&&(re=new RegExp(_t[2].substr(1,_t[2].length-2),q?"i":""))}}function P(Tt,_t){if(j){var Qn;Qn=Tt,Tt=_t,_t=Qn}q&&(Tt=Tt.toLowerCase(),_t=_t.toLowerCase());var hr=X&&Ie.exec(Tt),Rn=X&&Ie.exec(_t);return hr?(hr=parseInt((hr[1]+hr[2]).toLowerCase(),Ge),Rn=parseInt((Rn[1]+Rn[2]).toLowerCase(),Ge),hr-Rn):Tt<_t?-1:1}function z(Tt,_t){if(j){var Qn;Qn=Tt,Tt=_t,_t=Qn}return q&&(Tt[0]=Tt[0].toLowerCase(),_t[0]=_t[0].toLowerCase()),Tt[0]<_t[0]?-1:1}var j,q,Y,X,re,ue=k();if(ue){Nt(y,ue+": "+S.argString);return}var be=S.line||y.firstLine(),Ae=S.lineEnd||S.line||y.lastLine();if(be!=Ae){var ye=new De(be,0),xe=new De(Ae,At(y,Ae)),Oe=y.getRange(ye,xe).split(`
1457
+ `),Ie=re||(X=="decimal"?/(-?)([\d]+)/:X=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:X=="octal"?/([0-7]+)/:null),Ge=X=="decimal"?10:X=="hex"?16:X=="octal"?8:null,ut=[],Ze=[];if(X||re)for(var et=0;et<Oe.length;et++){var kn=re?Oe[et].match(re):null;kn&&kn[0]!=""?ut.push(kn):!re&&Ie.exec(Oe[et])?ut.push(Oe[et]):Ze.push(Oe[et])}else Ze=Oe;if(ut.sort(re?z:P),re)for(var et=0;et<ut.length;et++)ut[et]=ut[et].input;else X||Ze.sort(P);if(Oe=j?ut.concat(Ze):Ze.concat(ut),Y){var Ct=Oe,Kt;Oe=[];for(var et=0;et<Ct.length;et++)Ct[et]!=Kt&&Oe.push(Ct[et]),Kt=Ct[et]}y.replaceRange(Oe.join(`
1458
+ `),ye,xe)}},vglobal:function(y,S){this.global(y,S)},normal:function(y,S){var k=S.argString;if(k&&k[0]=="!"&&(k=k.slice(1),Ni=!0),k=k.trimStart(),!k){Nt(y,"Argument is required.");return}var P=S.line;if(typeof P=="number")for(var z=isNaN(S.lineEnd)?P:S.lineEnd,j=P;j<=z;j++)y.setCursor(j,0),T(y,S.argString.trimStart()),y.state.vim.insertMode&&mr(y,!0);else T(y,S.argString.trimStart()),y.state.vim.insertMode&&mr(y,!0)},global:function(y,S){var k=S.argString;if(!k){Nt(y,"Regular Expression missing from global");return}var P=S.commandName[0]==="v";k[0]==="!"&&S.commandName[0]==="g"&&(P=!0,k=k.slice(1));var z=S.line!==void 0?S.line:y.firstLine(),j=S.lineEnd||S.line||y.lastLine(),q=yn(k),Y=k,X;if(q.length&&(Y=q[0],X=q.slice(1,q.length).join("/")),Y)try{oe(y,Y,!0,!0)}catch{Nt(y,"Invalid regex: "+Y);return}for(var re=On(y).getQuery(),ue=[],be=z;be<=j;be++){var Ae=y.getLine(be),ye=re.test(Ae);ye!==P&&ue.push(X?y.getLineHandle(be):Ae)}if(!X){Nt(y,ue.join(`
1459
+ `));return}var xe=0,Oe=function(){if(xe<ue.length){var Ie=ue[xe++],Ge=y.getLineNumber(Ie);if(Ge==null){Oe();return}var ut=Ge+1+X;Pr.processCommand(y,ut,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,S){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=S.argString,P=k?ai(k,k[0]):[],z,j="",q,Y,X,re=!1,ue=!1;if(P.length)z=P[0],A("pcre")&&z!==""&&(z=new RegExp(z).source),j=P[1],j!==void 0&&(A("pcre")?j=Or(j.replace(/([^\\])&/g,"$1$$&")):j=ko(j),je.lastSubstituteReplacePart=j),q=P[2]?P[2].split(" "):[];else if(k&&k.length){Nt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],X=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(ue=!0),A("pcre")?z=z+"/"+Y:z=z.replace(/\//g,"\\/")+"/"+Y)),z)try{oe(y,z,!0,!0)}catch{Nt(y,"Invalid regex: "+z);return}if(j=j||je.lastSubstituteReplacePart,j===void 0){Nt(y,"No previous substitute regular expression");return}var be=On(y),Ae=be.getQuery(),ye=S.line!==void 0?S.line:y.getCursor().line,xe=S.lineEnd||ye;ye==y.firstLine()&&xe==y.lastLine()&&(xe=1/0),X&&(ye=xe,xe=ye+X-1);var Oe=se(y,new De(ye,0)),Ie=y.getSearchCursor(Ae,Oe);mn(y,re,ue,ye,xe,Ie,Ae,j,S.callback)},startinsert:function(y,S){T(y,S.argString=="!"?"A":"i",{})},redo:ze.commands.redo,undo:ze.commands.undo,write:function(y){ze.commands.save?ze.commands.save(y):y.save&&y.save()},nohlsearch:function(y){Vt(y)},yank:function(y){var S=He(y.getCursor()),k=S.line,P=y.getLine(k);je.registerController.pushText("0","yank",P,!0,!0)},delete:function(y,S){var k=S.selectionLine,P=isNaN(S.selectionLineEnd)?k:S.selectionLineEnd;Jo.delete(y,{linewise:!0},[{anchor:new De(k,0),head:new De(P+1,0)}])},join:function(y,S){var k=S.selectionLine,P=isNaN(S.selectionLineEnd)?k:S.selectionLineEnd;y.setCursor(new De(k,0)),Bn.joinLines(y,{repeat:P-k},y.state.vim)},delmarks:function(y,S){if(!S.argString||!ir(S.argString)){Nt(y,"Argument required");return}for(var k=y.state.vim,P=new ze.StringStream(ir(S.argString));!P.eol();){P.eatSpace();var z=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Nt(y,"Invalid argument: "+S.argString.substring(z));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Nt(y,"Invalid argument: "+S.argString.substring(z));return}var q=j,Y=P.next();if(!(c(q)&&c(Y)||s(q)&&s(Y))){Nt(y,"Invalid argument: "+q+"-");return}var X=q.charCodeAt(0),re=Y.charCodeAt(0);if(X>=re){Nt(y,"Invalid argument: "+S.argString.substring(z));return}for(var ue=0;ue<=re-X;ue++){var be=String.fromCharCode(X+ue);delete k.marks[be]}}else delete k.marks[j]}}},Pr=new wa;M("insertModeEscKeysTimeout",200,"number"),ze.Vim=wt;var mo={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"},kr=wt.handleKey.bind(wt);wt.handleKey=function(y,S,k){return y.operation(function(){return kr(y,S,k)},!0)},D(),r.CodeMirror=ze;var ci=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,S,k,P,z){var j=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,X=S.top,re=S.left;if(!j.insertMode){var ue=P.cursor?cr.comparePoints(P.cursor,P.start)<=0:z.selection.isBackwards()||z.selection.isEmpty();!ue&&re>q&&(re-=q)}!j.insertMode&&j.status&&(Y/=2,X+=Y),Zr.translate(y,re,X),Zr.setStyle(y.style,"width",q+"px"),Zr.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var S=y.state.cm,k=ci(S);if(!k.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,S,k,P,z){var j=y.editor,q=j.state.cm,Y=ci(q);if(P!=-1){if(Y.insertMode||(S==-1?(k.charCodeAt(0)>255&&y.inputKey&&(k=y.inputKey,k&&y.inputHash==4&&(k=k.toUpperCase())),y.inputChar=k):S==4||S==0?y.inputKey==k&&y.inputHash==S&&y.inputChar?(k=y.inputChar,S=-1):(y.inputChar=null,y.inputKey=k,y.inputHash=S):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&S==0)return{command:"gotoleft"};if(k=="c"&&S==1&&!$o.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){pn(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var X=On(q),re=X.getOverlay();re&&q.removeOverlay(re)}if(S==-1||S&1||S===0&&k.length>1){var ue=Y.insertMode,be=ga(S,k,z||{},Y);Y.status==null&&(Y.status="");var Ae=Go(q,be,"user");return Y=ci(q),Ae&&Y.status!=null?Y.status+=be:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ae&&(S!=-1||ue)?void 0:{command:"null",passEvent:!Ae}}}},attach:function(y){function S(){var P=ci(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),y.textInput.setCommandMode(!P),y.renderer.$keepTextAreaAtCursor=P,y.renderer.$blockCursor=!P}y.state||(y.state={});var k=new ze(y);y.state.cm=k,y.$vimModeHandler=this,u(k),ci(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(ci(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||(S(),k._signal("changeStatus"))}),S(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(y){var S=y.state.cm;d(S),S.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var S=y.state.cm,k=ci(S);if(k.insertMode)return"INSERT";var P="";return k.visualMode&&(P+="VISUAL",k.visualLine&&(P+=" LINE"),k.visualBlock&&(P+=" BLOCK")),k.status&&(P+=(P?" ":"")+k.status),P}},wt.defineOption({name:"wrap",set:function(y,S){S&&S.ace.setOption("wrap",y)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),Nn.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"}}),Nn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(y,S,k,P,z){var j=k[0].anchor.line,q=k[0].head.line;return S.linewise&&q--,po(y.ace,{startRow:j,endRow:q}),De(q,0)}),M("textwidth",void 0,"number",["tw"],function(y,S){if(S!==void 0){if(y===void 0){var k=S.ace.getOption("printMarginColumn");return k}var P=Math.round(y);P>1&&S.ace.setOption("printMarginColumn",P)}}),Bn.aceCommand=function(y,S,k){y.vimCmd=S,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Ji):Ji(null,y.ace)},Bn.fold=function(y,S,k){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(S.all?2:0)+(S.open?1:0)])},Ro=Nn.length,r.handler.defaultKeymap=Nn,r.handler.actions=Bn,r.Vim=wt}),(function(){ace.require(["ace/keyboard/vim"],function(e){t&&(t.exports=e)})})()})(bg)),bg.exports}k_();var xg={},Cg;function A_(){return Cg||(Cg=1,(function(t){(function(){var n={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(w){return m(g(w),arguments)}function r(w,u){return e.apply(null,[w].concat(u||[]))}function m(w,u){var d=1,a=w.length,l,c="",h,o,s,p,b,x,M,R;for(h=0;h<a;h++)if(typeof w[h]=="string")c+=w[h];else if(typeof w[h]=="object"){if(s=w[h],s.keys)for(l=u[d],o=0;o<s.keys.length;o++){if(l==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));l=l[s.keys[o]]}else s.param_no?l=u[s.param_no]:l=u[d++];if(n.not_type.test(s.type)&&n.not_primitive.test(s.type)&&l instanceof Function&&(l=l()),n.numeric_arg.test(s.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(e("[sprintf] expecting number but found %T",l));switch(n.number.test(s.type)&&(M=l>=0),s.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,s.width?parseInt(s.width):0);break;case"e":l=s.precision?parseFloat(l).toExponential(s.precision):parseFloat(l).toExponential();break;case"f":l=s.precision?parseFloat(l).toFixed(s.precision):parseFloat(l);break;case"g":l=s.precision?String(Number(l.toPrecision(s.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=s.precision?l.substring(0,s.precision):l;break;case"t":l=String(!!l),l=s.precision?l.substring(0,s.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=s.precision?l.substring(0,s.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=s.precision?l.substring(0,s.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}n.json.test(s.type)?c+=l:(n.number.test(s.type)&&(!M||s.sign)?(R=M?"+":"-",l=l.toString().replace(n.sign,"")):R="",b=s.pad_char?s.pad_char==="0"?"0":s.pad_char.charAt(1):" ",x=s.width-(R+l).length,p=s.width&&x>0?b.repeat(x):"",c+=s.align?R+l+p:b==="0"?R+p+l:p+R+l)}return c}var f=Object.create(null);function g(w){if(f[w])return f[w];for(var u=w,d,a=[],l=0;u;){if((d=n.text.exec(u))!==null)a.push(d[0]);else if((d=n.modulo.exec(u))!==null)a.push("%");else if((d=n.placeholder.exec(u))!==null){if(d[2]){l|=1;var c=[],h=d[2],o=[];if((o=n.key.exec(h))!==null)for(c.push(o[1]);(h=h.substring(o[0].length))!=="";)if((o=n.key_access.exec(h))!==null)c.push(o[1]);else if((o=n.index_access.exec(h))!==null)c.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");d[2]=c}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");u=u.substring(d[0].length)}return f[w]=a}t.sprintf=e,t.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(xg)),xg}A_();var ql={exports:{}},S_=ql.exports,_g;function $_(){return _g||(_g=1,(function(t,n){(function(){var e,r="4.18.1",m=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",w="Invalid `variable` option passed into `_.template`",u="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",a=500,l="__lodash_placeholder__",c=1,h=2,o=4,s=1,p=2,b=1,x=2,M=4,R=8,A=16,C=32,O=64,D=128,I=256,T=512,B=30,F="...",L=800,$=16,_=1,N=2,W=3,U=1/0,G=9007199254740991,J=17976931348623157e292,te=NaN,he=4294967295,ee=he-1,le=he>>>1,se=[["ary",D],["bind",b],["bindKey",x],["curry",R],["curryRight",A],["flip",T],["partial",C],["partialRight",O],["rearg",I]],ce="[object Arguments]",pe="[object Array]",ve="[object AsyncFunction]",$e="[object Boolean]",Ee="[object Date]",qe="[object DOMException]",He="[object Error]",tt="[object Function]",Xe="[object GeneratorFunction]",it="[object Map]",Wt="[object Number]",br="[object Null]",At="[object Object]",ir="[object Promise]",An="[object Proxy]",wr="[object RegExp]",fn="[object Set]",or="[object String]",ft="[object Symbol]",Ke="[object Undefined]",$t="[object WeakMap]",Zt="[object WeakSet]",In="[object ArrayBuffer]",Un="[object DataView]",sr="[object Float32Array]",pn="[object Float64Array]",zn="[object Int8Array]",Ln="[object Int16Array]",Gt="[object Int32Array]",nn="[object Uint8Array]",Ir="[object Uint8ClampedArray]",Gr="[object Uint16Array]",xr="[object Uint32Array]",yi=/\b__p \+= '';/g,bi=/\b(__p \+=) '' \+/g,Zn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Yi=/&(?:amp|lt|gt|quot|#39);/g,Kr=/[&<>"']/g,Cs=RegExp(Yi.source),Yr=RegExp(Kr.source),Cn=/<%-([\s\S]+?)%>/g,wi=/<%([\s\S]+?)%>/g,_o=/<%=([\s\S]+?)%>/g,si=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_n=/^\w*$/,Cr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/[\\^$.*+?()[\]{}|]/g,On=RegExp(Lr.source),yn=/^\s+/,pr=/\s/,ai=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ao=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,ko=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Or=/[()=,{}\[\]\/\s]/,li=/\\(\\)?/g,Jr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Ao=/^[-+]0x[0-9a-f]+$/i,ar=/^0b[01]+$/i,Sn=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,Be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yt=/($^)/,gn=/['\n\r\u2028\u2029\\]/g,Vt="\\ud800-\\udfff",_r="\\u0300-\\u036f",Vn="\\ufe20-\\ufe2f",cn="\\u20d0-\\u20ff",gr=_r+Vn+cn,mn="\\u2700-\\u27bf",mr="a-z\\xdf-\\xf6\\xf8-\\xff",co="\\xac\\xb1\\xd7\\xf7",_s="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ks="\\u2000-\\u206f",As=" \\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",lr="A-Z\\xc0-\\xd6\\xd8-\\xde",Ss="\\ufe0e\\ufe0f",Uo=co+_s+ks+As,uo="['’]",$s="["+Vt+"]",Vo="["+Uo+"]",So="["+gr+"]",Rs="\\d+",Es="["+mn+"]",qo="["+mr+"]",ga="[^"+Vt+Uo+Rs+mn+mr+lr+"]",ho="\\ud83c[\\udffb-\\udfff]",Go="(?:"+So+"|"+ho+")",Ji="[^"+Vt+"]",cr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ts="[\\ud800-\\udbff][\\udc00-\\udfff]",Zr="["+lr+"]",ma="\\u200d",va="(?:"+qo+"|"+ga+")",Ko="(?:"+Zr+"|"+ga+")",Zi="(?:"+uo+"(?:d|ll|m|re|s|t|ve))?",$o="(?:"+uo+"(?:D|LL|M|RE|S|T|VE))?",Yo=Go+"?",fo="["+Ss+"]?",ya="(?:"+ma+"(?:"+[Ji,cr,Ts].join("|")+")"+fo+Yo+")*",po="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ze="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ms=fo+Yo+ya,De="(?:"+[Es,cr,Ts].join("|")+")"+Ms,Nn="(?:"+[Ji+So+"?",So,cr,Ts,$s].join("|")+")",Ro=RegExp(uo,"g"),Xi=RegExp(So,"g"),Dn=RegExp(ho+"(?="+ho+")|"+Nn+Ms,"g"),ba=RegExp([Zr+"?"+qo+"+"+Zi+"(?="+[Vo,Zr,"$"].join("|")+")",Ko+"+"+$o+"(?="+[Vo,Zr+va,"$"].join("|")+")",Zr+"?"+va+"+"+Zi,Zr+"+"+$o,ze,po,Rs,De].join("|"),"g"),Eo=RegExp("["+ma+Vt+gr+Ss+"]"),Li=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,go=["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"],Is=-1,en={};en[sr]=en[pn]=en[zn]=en[Ln]=en[Gt]=en[nn]=en[Ir]=en[Gr]=en[xr]=!0,en[ce]=en[pe]=en[In]=en[$e]=en[Un]=en[Ee]=en[He]=en[tt]=en[it]=en[Wt]=en[At]=en[wr]=en[fn]=en[or]=en[$t]=!1;var ct={};ct[ce]=ct[pe]=ct[In]=ct[Un]=ct[$e]=ct[Ee]=ct[sr]=ct[pn]=ct[zn]=ct[Ln]=ct[Gt]=ct[it]=ct[Wt]=ct[At]=ct[wr]=ct[fn]=ct[or]=ct[ft]=ct[nn]=ct[Ir]=ct[Gr]=ct[xr]=!0,ct[He]=ct[tt]=ct[$t]=!1;var Ht={À:"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"},Oi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bn=parseFloat,wt=parseInt,Nr=typeof Bo=="object"&&Bo&&Bo.Object===Object&&Bo,Ni=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Nr||Ni||Function("return this")(),Dr=n&&!n.nodeType&&n,Xn=Dr&&!0&&t&&!t.nodeType&&t,Qi=Xn&&Xn.exports===Dr,xi=Qi&&Nr.process,$n=(function(){try{var me=Xn&&Xn.require&&Xn.require("util").types;return me||xi&&xi.binding&&xi.binding("util")}catch{}})(),Jo=$n&&$n.isArrayBuffer,Bn=$n&&$n.isDate,Ci=$n&&$n.isMap,_i=$n&&$n.isRegExp,Di=$n&&$n.isSet,Ls=$n&&$n.isTypedArray;function rn(me,Re,Se){switch(Se.length){case 0:return me.call(Re);case 1:return me.call(Re,Se[0]);case 2:return me.call(Re,Se[0],Se[1]);case 3:return me.call(Re,Se[0],Se[1],Se[2])}return me.apply(Re,Se)}function wa(me,Re,Se,Ve){for(var ht=-1,kt=me==null?0:me.length;++ht<kt;){var Xt=me[ht];Re(Ve,Xt,Se(Xt),me)}return Ve}function ur(me,Re){for(var Se=-1,Ve=me==null?0:me.length;++Se<Ve&&Re(me[Se],Se,me)!==!1;);return me}function Pr(me,Re){for(var Se=me==null?0:me.length;Se--&&Re(me[Se],Se,me)!==!1;);return me}function mo(me,Re){for(var Se=-1,Ve=me==null?0:me.length;++Se<Ve;)if(!Re(me[Se],Se,me))return!1;return!0}function kr(me,Re){for(var Se=-1,Ve=me==null?0:me.length,ht=0,kt=[];++Se<Ve;){var Xt=me[Se];Re(Xt,Se,me)&&(kt[ht++]=Xt)}return kt}function ci(me,Re){var Se=me==null?0:me.length;return!!Se&&be(me,Re,0)>-1}function y(me,Re,Se){for(var Ve=-1,ht=me==null?0:me.length;++Ve<ht;)if(Se(Re,me[Ve]))return!0;return!1}function S(me,Re){for(var Se=-1,Ve=me==null?0:me.length,ht=Array(Ve);++Se<Ve;)ht[Se]=Re(me[Se],Se,me);return ht}function k(me,Re){for(var Se=-1,Ve=Re.length,ht=me.length;++Se<Ve;)me[ht+Se]=Re[Se];return me}function P(me,Re,Se,Ve){var ht=-1,kt=me==null?0:me.length;for(Ve&&kt&&(Se=me[++ht]);++ht<kt;)Se=Re(Se,me[ht],ht,me);return Se}function z(me,Re,Se,Ve){var ht=me==null?0:me.length;for(Ve&&ht&&(Se=me[--ht]);ht--;)Se=Re(Se,me[ht],ht,me);return Se}function j(me,Re){for(var Se=-1,Ve=me==null?0:me.length;++Se<Ve;)if(Re(me[Se],Se,me))return!0;return!1}var q=Oe("length");function Y(me){return me.split("")}function X(me){return me.match(ko)||[]}function re(me,Re,Se){var Ve;return Se(me,function(ht,kt,Xt){if(Re(ht,kt,Xt))return Ve=kt,!1}),Ve}function ue(me,Re,Se,Ve){for(var ht=me.length,kt=Se+(Ve?1:-1);Ve?kt--:++kt<ht;)if(Re(me[kt],kt,me))return kt;return-1}function be(me,Re,Se){return Re===Re?xt(me,Re,Se):ue(me,ye,Se)}function Ae(me,Re,Se,Ve){for(var ht=Se-1,kt=me.length;++ht<kt;)if(Ve(me[ht],Re))return ht;return-1}function ye(me){return me!==me}function xe(me,Re){var Se=me==null?0:me.length;return Se?Ze(me,Re)/Se:te}function Oe(me){return function(Re){return Re==null?e:Re[me]}}function Ie(me){return function(Re){return me==null?e:me[Re]}}function Ge(me,Re,Se,Ve,ht){return ht(me,function(kt,Xt,Ft){Se=Ve?(Ve=!1,kt):Re(Se,kt,Xt,Ft)}),Se}function ut(me,Re){var Se=me.length;for(me.sort(Re);Se--;)me[Se]=me[Se].value;return me}function Ze(me,Re){for(var Se,Ve=-1,ht=me.length;++Ve<ht;){var kt=Re(me[Ve]);kt!==e&&(Se=Se===e?kt:Se+kt)}return Se}function et(me,Re){for(var Se=-1,Ve=Array(me);++Se<me;)Ve[Se]=Re(Se);return Ve}function kn(me,Re){return S(Re,function(Se){return[Se,me[Se]]})}function Ct(me){return me&&me.slice(0,pt(me)+1).replace(yn,"")}function Kt(me){return function(Re){return me(Re)}}function Tt(me,Re){return S(Re,function(Se){return me[Se]})}function _t(me,Re){return me.has(Re)}function Qn(me,Re){for(var Se=-1,Ve=me.length;++Se<Ve&&be(Re,me[Se],0)>-1;);return Se}function hr(me,Re){for(var Se=me.length;Se--&&be(Re,me[Se],0)>-1;);return Se}function Rn(me,Re){for(var Se=me.length,Ve=0;Se--;)me[Se]===Re&&++Ve;return Ve}var V=Ie(Ht),Z=Ie(Oi);function ie(me){return"\\"+je[me]}function ae(me,Re){return me==null?e:me[Re]}function ge(me){return Eo.test(me)}function ke(me){return Li.test(me)}function Te(me){for(var Re,Se=[];!(Re=me.next()).done;)Se.push(Re.value);return Se}function Fe(me){var Re=-1,Se=Array(me.size);return me.forEach(function(Ve,ht){Se[++Re]=[ht,Ve]}),Se}function We(me,Re){return function(Se){return me(Re(Se))}}function Ue(me,Re){for(var Se=-1,Ve=me.length,ht=0,kt=[];++Se<Ve;){var Xt=me[Se];(Xt===Re||Xt===l)&&(me[Se]=l,kt[ht++]=Se)}return kt}function Ye(me){var Re=-1,Se=Array(me.size);return me.forEach(function(Ve){Se[++Re]=Ve}),Se}function Qe(me){var Re=-1,Se=Array(me.size);return me.forEach(function(Ve){Se[++Re]=[Ve,Ve]}),Se}function xt(me,Re,Se){for(var Ve=Se-1,ht=me.length;++Ve<ht;)if(me[Ve]===Re)return Ve;return-1}function Yt(me,Re,Se){for(var Ve=Se+1;Ve--;)if(me[Ve]===Re)return Ve;return Ve}function Pt(me){return ge(me)?vn(me):q(me)}function bt(me){return ge(me)?En(me):Y(me)}function pt(me){for(var Re=me.length;Re--&&pr.test(me.charAt(Re)););return Re}var lt=Ie(Wn);function vn(me){for(var Re=Dn.lastIndex=0;Dn.test(me);)++Re;return Re}function En(me){return me.match(Dn)||[]}function er(me){return me.match(ba)||[]}var on=(function me(Re){Re=Re==null?Dt:un.defaults(Dt.Object(),Re,un.pick(Dt,go));var Se=Re.Array,Ve=Re.Date,ht=Re.Error,kt=Re.Function,Xt=Re.Math,Ft=Re.Object,ui=Re.RegExp,Ar=Re.String,wn=Re.TypeError,Pi=Se.prototype,Sr=kt.prototype,To=Ft.prototype,Ec=Re["__core-js_shared__"],Tc=Sr.toString,sn=To.hasOwnProperty,fT=0,rb=(function(){var i=/[^.]+$/.exec(Ec&&Ec.keys&&Ec.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Mc=To.toString,pT=Tc.call(Ft),gT=Dt._,mT=ui("^"+Tc.call(sn).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ic=Qi?Re.Buffer:e,Zo=Re.Symbol,Lc=Re.Uint8Array,ib=Ic?Ic.allocUnsafe:e,Oc=We(Ft.getPrototypeOf,Ft),ob=Ft.create,sb=To.propertyIsEnumerable,Nc=Pi.splice,ab=Zo?Zo.isConcatSpreadable:e,ul=Zo?Zo.iterator:e,Os=Zo?Zo.toStringTag:e,Dc=(function(){try{var i=zs(Ft,"defineProperty");return i({},"",{}),i}catch{}})(),vT=Re.clearTimeout!==Dt.clearTimeout&&Re.clearTimeout,yT=Ve&&Ve.now!==Dt.Date.now&&Ve.now,bT=Re.setTimeout!==Dt.setTimeout&&Re.setTimeout,Pc=Xt.ceil,Fc=Xt.floor,$d=Ft.getOwnPropertySymbols,wT=Ic?Ic.isBuffer:e,lb=Re.isFinite,xT=Pi.join,CT=We(Ft.keys,Ft),dr=Xt.max,Fr=Xt.min,_T=Ve.now,kT=Re.parseInt,cb=Xt.random,AT=Pi.reverse,Rd=zs(Re,"DataView"),hl=zs(Re,"Map"),Ed=zs(Re,"Promise"),xa=zs(Re,"Set"),dl=zs(Re,"WeakMap"),fl=zs(Ft,"create"),zc=dl&&new dl,Ca={},ST=Ws(Rd),$T=Ws(hl),RT=Ws(Ed),ET=Ws(xa),TT=Ws(dl),Wc=Zo?Zo.prototype:e,pl=Wc?Wc.valueOf:e,ub=Wc?Wc.toString:e;function Q(i){if(jn(i)&&!Rt(i)&&!(i instanceof Ut)){if(i instanceof Fi)return i;if(sn.call(i,"__wrapped__"))return h0(i)}return new Fi(i)}var _a=(function(){function i(){}return function(v){if(!Pn(v))return{};if(ob)return ob(v);i.prototype=v;var E=new i;return i.prototype=e,E}})();function Bc(){}function Fi(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}Q.templateSettings={escape:Cn,evaluate:wi,interpolate:_o,variable:"",imports:{_:Q}},Q.prototype=Bc.prototype,Q.prototype.constructor=Q,Fi.prototype=_a(Bc.prototype),Fi.prototype.constructor=Fi;function Ut(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=he,this.__views__=[]}function MT(){var i=new Ut(this.__wrapped__);return i.__actions__=hi(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=hi(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=hi(this.__views__),i}function IT(){if(this.__filtered__){var i=new Ut(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function LT(){var i=this.__wrapped__.value(),v=this.__dir__,E=Rt(i),H=v<0,K=E?i.length:0,ne=VM(0,K,this.__views__),de=ne.start,fe=ne.end,we=fe-de,Me=H?fe:de-1,Le=this.__iteratees__,Pe=Le.length,Je=0,at=Fr(we,this.__takeCount__);if(!E||!H&&K==we&&at==we)return Ob(i,this.__actions__);var vt=[];e:for(;we--&&Je<at;){Me+=v;for(var Lt=-1,gt=i[Me];++Lt<Pe;){var Bt=Le[Lt],qt=Bt.iteratee,Si=Bt.type,ei=qt(gt);if(Si==N)gt=ei;else if(!ei){if(Si==_)continue e;break e}}vt[Je++]=gt}return vt}Ut.prototype=_a(Bc.prototype),Ut.prototype.constructor=Ut;function Ns(i){var v=-1,E=i==null?0:i.length;for(this.clear();++v<E;){var H=i[v];this.set(H[0],H[1])}}function OT(){this.__data__=fl?fl(null):{},this.size=0}function NT(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function DT(i){var v=this.__data__;if(fl){var E=v[i];return E===d?e:E}return sn.call(v,i)?v[i]:e}function PT(i){var v=this.__data__;return fl?v[i]!==e:sn.call(v,i)}function FT(i,v){var E=this.__data__;return this.size+=this.has(i)?0:1,E[i]=fl&&v===e?d:v,this}Ns.prototype.clear=OT,Ns.prototype.delete=NT,Ns.prototype.get=DT,Ns.prototype.has=PT,Ns.prototype.set=FT;function Mo(i){var v=-1,E=i==null?0:i.length;for(this.clear();++v<E;){var H=i[v];this.set(H[0],H[1])}}function zT(){this.__data__=[],this.size=0}function WT(i){var v=this.__data__,E=jc(v,i);if(E<0)return!1;var H=v.length-1;return E==H?v.pop():Nc.call(v,E,1),--this.size,!0}function BT(i){var v=this.__data__,E=jc(v,i);return E<0?e:v[E][1]}function jT(i){return jc(this.__data__,i)>-1}function HT(i,v){var E=this.__data__,H=jc(E,i);return H<0?(++this.size,E.push([i,v])):E[H][1]=v,this}Mo.prototype.clear=zT,Mo.prototype.delete=WT,Mo.prototype.get=BT,Mo.prototype.has=jT,Mo.prototype.set=HT;function Io(i){var v=-1,E=i==null?0:i.length;for(this.clear();++v<E;){var H=i[v];this.set(H[0],H[1])}}function UT(){this.size=0,this.__data__={hash:new Ns,map:new(hl||Mo),string:new Ns}}function VT(i){var v=eu(this,i).delete(i);return this.size-=v?1:0,v}function qT(i){return eu(this,i).get(i)}function GT(i){return eu(this,i).has(i)}function KT(i,v){var E=eu(this,i),H=E.size;return E.set(i,v),this.size+=E.size==H?0:1,this}Io.prototype.clear=UT,Io.prototype.delete=VT,Io.prototype.get=qT,Io.prototype.has=GT,Io.prototype.set=KT;function Ds(i){var v=-1,E=i==null?0:i.length;for(this.__data__=new Io;++v<E;)this.add(i[v])}function YT(i){return this.__data__.set(i,d),this}function JT(i){return this.__data__.has(i)}Ds.prototype.add=Ds.prototype.push=YT,Ds.prototype.has=JT;function eo(i){var v=this.__data__=new Mo(i);this.size=v.size}function ZT(){this.__data__=new Mo,this.size=0}function XT(i){var v=this.__data__,E=v.delete(i);return this.size=v.size,E}function QT(i){return this.__data__.get(i)}function eM(i){return this.__data__.has(i)}function tM(i,v){var E=this.__data__;if(E instanceof Mo){var H=E.__data__;if(!hl||H.length<m-1)return H.push([i,v]),this.size=++E.size,this;E=this.__data__=new Io(H)}return E.set(i,v),this.size=E.size,this}eo.prototype.clear=ZT,eo.prototype.delete=XT,eo.prototype.get=QT,eo.prototype.has=eM,eo.prototype.set=tM;function hb(i,v){var E=Rt(i),H=!E&&Bs(i),K=!E&&!H&&ns(i),ne=!E&&!H&&!K&&$a(i),de=E||H||K||ne,fe=de?et(i.length,Ar):[],we=fe.length;for(var Me in i)(v||sn.call(i,Me))&&!(de&&(Me=="length"||K&&(Me=="offset"||Me=="parent")||ne&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||No(Me,we)))&&fe.push(Me);return fe}function db(i){var v=i.length;return v?i[Wd(0,v-1)]:e}function nM(i,v){return tu(hi(i),Ps(v,0,i.length))}function rM(i){return tu(hi(i))}function Td(i,v,E){(E!==e&&!no(i[v],E)||E===e&&!(v in i))&&vo(i,v,E)}function gl(i,v,E){var H=i[v];(!(sn.call(i,v)&&no(H,E))||E===e&&!(v in i))&&vo(i,v,E)}function jc(i,v){for(var E=i.length;E--;)if(no(i[E][0],v))return E;return-1}function iM(i,v,E,H){return Xo(i,function(K,ne,de){v(H,K,E(K),de)}),H}function fb(i,v){return i&&bo(v,vr(v),i)}function oM(i,v){return i&&bo(v,fi(v),i)}function vo(i,v,E){v=="__proto__"&&Dc?Dc(i,v,{configurable:!0,enumerable:!0,value:E,writable:!0}):i[v]=E}function Md(i,v){for(var E=-1,H=v.length,K=Se(H),ne=i==null;++E<H;)K[E]=ne?e:ff(i,v[E]);return K}function Ps(i,v,E){return i===i&&(E!==e&&(i=i<=E?i:E),v!==e&&(i=i>=v?i:v)),i}function zi(i,v,E,H,K,ne){var de,fe=v&c,we=v&h,Me=v&o;if(E&&(de=K?E(i,H,K,ne):E(i)),de!==e)return de;if(!Pn(i))return i;var Le=Rt(i);if(Le){if(de=GM(i),!fe)return hi(i,de)}else{var Pe=zr(i),Je=Pe==tt||Pe==Xe;if(ns(i))return Pb(i,fe);if(Pe==At||Pe==ce||Je&&!K){if(de=we||Je?{}:n0(i),!fe)return we?DM(i,oM(de,i)):NM(i,fb(de,i))}else{if(!ct[Pe])return K?i:{};de=KM(i,Pe,fe)}}ne||(ne=new eo);var at=ne.get(i);if(at)return at;ne.set(i,de),M0(i)?i.forEach(function(gt){de.add(zi(gt,v,E,gt,i,ne))}):E0(i)&&i.forEach(function(gt,Bt){de.set(Bt,zi(gt,v,E,Bt,i,ne))});var vt=Me?we?Zd:Jd:we?fi:vr,Lt=Le?e:vt(i);return ur(Lt||i,function(gt,Bt){Lt&&(Bt=gt,gt=i[Bt]),gl(de,Bt,zi(gt,v,E,Bt,i,ne))}),de}function sM(i){var v=vr(i);return function(E){return pb(E,i,v)}}function pb(i,v,E){var H=E.length;if(i==null)return!H;for(i=Ft(i);H--;){var K=E[H],ne=v[K],de=i[K];if(de===e&&!(K in i)||!ne(de))return!1}return!0}function gb(i,v,E){if(typeof i!="function")throw new wn(g);return Cl(function(){i.apply(e,E)},v)}function ml(i,v,E,H){var K=-1,ne=ci,de=!0,fe=i.length,we=[],Me=v.length;if(!fe)return we;E&&(v=S(v,Kt(E))),H?(ne=y,de=!1):v.length>=m&&(ne=_t,de=!1,v=new Ds(v));e:for(;++K<fe;){var Le=i[K],Pe=E==null?Le:E(Le);if(Le=H||Le!==0?Le:0,de&&Pe===Pe){for(var Je=Me;Je--;)if(v[Je]===Pe)continue e;we.push(Le)}else ne(v,Pe,H)||we.push(Le)}return we}var Xo=jb(yo),mb=jb(Ld,!0);function aM(i,v){var E=!0;return Xo(i,function(H,K,ne){return E=!!v(H,K,ne),E}),E}function Hc(i,v,E){for(var H=-1,K=i.length;++H<K;){var ne=i[H],de=v(ne);if(de!=null&&(fe===e?de===de&&!Ai(de):E(de,fe)))var fe=de,we=ne}return we}function lM(i,v,E,H){var K=i.length;for(E=It(E),E<0&&(E=-E>K?0:K+E),H=H===e||H>K?K:It(H),H<0&&(H+=K),H=E>H?0:L0(H);E<H;)i[E++]=v;return i}function vb(i,v){var E=[];return Xo(i,function(H,K,ne){v(H,K,ne)&&E.push(H)}),E}function $r(i,v,E,H,K){var ne=-1,de=i.length;for(E||(E=JM),K||(K=[]);++ne<de;){var fe=i[ne];v>0&&E(fe)?v>1?$r(fe,v-1,E,H,K):k(K,fe):H||(K[K.length]=fe)}return K}var Id=Hb(),yb=Hb(!0);function yo(i,v){return i&&Id(i,v,vr)}function Ld(i,v){return i&&yb(i,v,vr)}function Uc(i,v){return kr(v,function(E){return Do(i[E])})}function Fs(i,v){v=es(v,i);for(var E=0,H=v.length;i!=null&&E<H;)i=i[to(v[E++])];return E&&E==H?i:e}function bb(i,v,E){var H=v(i);return Rt(i)?H:k(H,E(i))}function Xr(i){return i==null?i===e?Ke:br:Os&&Os in Ft(i)?UM(i):rI(i)}function Od(i,v){return i>v}function cM(i,v){return i!=null&&sn.call(i,v)}function uM(i,v){return i!=null&&v in Ft(i)}function hM(i,v,E){return i>=Fr(v,E)&&i<dr(v,E)}function Nd(i,v,E){for(var H=E?y:ci,K=i[0].length,ne=i.length,de=ne,fe=Se(ne),we=1/0,Me=[];de--;){var Le=i[de];de&&v&&(Le=S(Le,Kt(v))),we=Fr(Le.length,we),fe[de]=!E&&(v||K>=120&&Le.length>=120)?new Ds(de&&Le):e}Le=i[0];var Pe=-1,Je=fe[0];e:for(;++Pe<K&&Me.length<we;){var at=Le[Pe],vt=v?v(at):at;if(at=E||at!==0?at:0,!(Je?_t(Je,vt):H(Me,vt,E))){for(de=ne;--de;){var Lt=fe[de];if(!(Lt?_t(Lt,vt):H(i[de],vt,E)))continue e}Je&&Je.push(vt),Me.push(at)}}return Me}function dM(i,v,E,H){return yo(i,function(K,ne,de){v(H,E(K),ne,de)}),H}function vl(i,v,E){v=es(v,i),i=s0(i,v);var H=i==null?i:i[to(Bi(v))];return H==null?e:rn(H,i,E)}function wb(i){return jn(i)&&Xr(i)==ce}function fM(i){return jn(i)&&Xr(i)==In}function pM(i){return jn(i)&&Xr(i)==Ee}function yl(i,v,E,H,K){return i===v?!0:i==null||v==null||!jn(i)&&!jn(v)?i!==i&&v!==v:gM(i,v,E,H,yl,K)}function gM(i,v,E,H,K,ne){var de=Rt(i),fe=Rt(v),we=de?pe:zr(i),Me=fe?pe:zr(v);we=we==ce?At:we,Me=Me==ce?At:Me;var Le=we==At,Pe=Me==At,Je=we==Me;if(Je&&ns(i)){if(!ns(v))return!1;de=!0,Le=!1}if(Je&&!Le)return ne||(ne=new eo),de||$a(i)?Qb(i,v,E,H,K,ne):jM(i,v,we,E,H,K,ne);if(!(E&s)){var at=Le&&sn.call(i,"__wrapped__"),vt=Pe&&sn.call(v,"__wrapped__");if(at||vt){var Lt=at?i.value():i,gt=vt?v.value():v;return ne||(ne=new eo),K(Lt,gt,E,H,ne)}}return Je?(ne||(ne=new eo),HM(i,v,E,H,K,ne)):!1}function mM(i){return jn(i)&&zr(i)==it}function Dd(i,v,E,H){var K=E.length,ne=K,de=!H;if(i==null)return!ne;for(i=Ft(i);K--;){var fe=E[K];if(de&&fe[2]?fe[1]!==i[fe[0]]:!(fe[0]in i))return!1}for(;++K<ne;){fe=E[K];var we=fe[0],Me=i[we],Le=fe[1];if(de&&fe[2]){if(Me===e&&!(we in i))return!1}else{var Pe=new eo;if(H)var Je=H(Me,Le,we,i,v,Pe);if(!(Je===e?yl(Le,Me,s|p,H,Pe):Je))return!1}}return!0}function xb(i){if(!Pn(i)||XM(i))return!1;var v=Do(i)?mT:Sn;return v.test(Ws(i))}function vM(i){return jn(i)&&Xr(i)==wr}function yM(i){return jn(i)&&zr(i)==fn}function bM(i){return jn(i)&&au(i.length)&&!!en[Xr(i)]}function Cb(i){return typeof i=="function"?i:i==null?pi:typeof i=="object"?Rt(i)?Ab(i[0],i[1]):kb(i):V0(i)}function Pd(i){if(!xl(i))return CT(i);var v=[];for(var E in Ft(i))sn.call(i,E)&&E!="constructor"&&v.push(E);return v}function wM(i){if(!Pn(i))return nI(i);var v=xl(i),E=[];for(var H in i)H=="constructor"&&(v||!sn.call(i,H))||E.push(H);return E}function Fd(i,v){return i<v}function _b(i,v){var E=-1,H=di(i)?Se(i.length):[];return Xo(i,function(K,ne,de){H[++E]=v(K,ne,de)}),H}function kb(i){var v=Qd(i);return v.length==1&&v[0][2]?i0(v[0][0],v[0][1]):function(E){return E===i||Dd(E,i,v)}}function Ab(i,v){return tf(i)&&r0(v)?i0(to(i),v):function(E){var H=ff(E,i);return H===e&&H===v?pf(E,i):yl(v,H,s|p)}}function Vc(i,v,E,H,K){i!==v&&Id(v,function(ne,de){if(K||(K=new eo),Pn(ne))xM(i,v,de,E,Vc,H,K);else{var fe=H?H(rf(i,de),ne,de+"",i,v,K):e;fe===e&&(fe=ne),Td(i,de,fe)}},fi)}function xM(i,v,E,H,K,ne,de){var fe=rf(i,E),we=rf(v,E),Me=de.get(we);if(Me){Td(i,E,Me);return}var Le=ne?ne(fe,we,E+"",i,v,de):e,Pe=Le===e;if(Pe){var Je=Rt(we),at=!Je&&ns(we),vt=!Je&&!at&&$a(we);Le=we,Je||at||vt?Rt(fe)?Le=fe:qn(fe)?Le=hi(fe):at?(Pe=!1,Le=Pb(we,!0)):vt?(Pe=!1,Le=Fb(we,!0)):Le=[]:_l(we)||Bs(we)?(Le=fe,Bs(fe)?Le=O0(fe):(!Pn(fe)||Do(fe))&&(Le=n0(we))):Pe=!1}Pe&&(de.set(we,Le),K(Le,we,H,ne,de),de.delete(we)),Td(i,E,Le)}function Sb(i,v){var E=i.length;if(E)return v+=v<0?E:0,No(v,E)?i[v]:e}function $b(i,v,E){v.length?v=S(v,function(ne){return Rt(ne)?function(de){return Fs(de,ne.length===1?ne[0]:ne)}:ne}):v=[pi];var H=-1;v=S(v,Kt(mt()));var K=_b(i,function(ne,de,fe){var we=S(v,function(Me){return Me(ne)});return{criteria:we,index:++H,value:ne}});return ut(K,function(ne,de){return OM(ne,de,E)})}function CM(i,v){return Rb(i,v,function(E,H){return pf(i,H)})}function Rb(i,v,E){for(var H=-1,K=v.length,ne={};++H<K;){var de=v[H],fe=Fs(i,de);E(fe,de)&&bl(ne,es(de,i),fe)}return ne}function _M(i){return function(v){return Fs(v,i)}}function zd(i,v,E,H){var K=H?Ae:be,ne=-1,de=v.length,fe=i;for(i===v&&(v=hi(v)),E&&(fe=S(i,Kt(E)));++ne<de;)for(var we=0,Me=v[ne],Le=E?E(Me):Me;(we=K(fe,Le,we,H))>-1;)fe!==i&&Nc.call(fe,we,1),Nc.call(i,we,1);return i}function Eb(i,v){for(var E=i?v.length:0,H=E-1;E--;){var K=v[E];if(E==H||K!==ne){var ne=K;No(K)?Nc.call(i,K,1):Hd(i,K)}}return i}function Wd(i,v){return i+Fc(cb()*(v-i+1))}function kM(i,v,E,H){for(var K=-1,ne=dr(Pc((v-i)/(E||1)),0),de=Se(ne);ne--;)de[H?ne:++K]=i,i+=E;return de}function Bd(i,v){var E="";if(!i||v<1||v>G)return E;do v%2&&(E+=i),v=Fc(v/2),v&&(i+=i);while(v);return E}function zt(i,v){return of(o0(i,v,pi),i+"")}function AM(i){return db(Ra(i))}function SM(i,v){var E=Ra(i);return tu(E,Ps(v,0,E.length))}function bl(i,v,E,H){if(!Pn(i))return i;v=es(v,i);for(var K=-1,ne=v.length,de=ne-1,fe=i;fe!=null&&++K<ne;){var we=to(v[K]),Me=E;if(we==="__proto__"||we==="constructor"||we==="prototype")return i;if(K!=de){var Le=fe[we];Me=H?H(Le,we,fe):e,Me===e&&(Me=Pn(Le)?Le:No(v[K+1])?[]:{})}gl(fe,we,Me),fe=fe[we]}return i}var Tb=zc?function(i,v){return zc.set(i,v),i}:pi,$M=Dc?function(i,v){return Dc(i,"toString",{configurable:!0,enumerable:!1,value:mf(v),writable:!0})}:pi;function RM(i){return tu(Ra(i))}function Wi(i,v,E){var H=-1,K=i.length;v<0&&(v=-v>K?0:K+v),E=E>K?K:E,E<0&&(E+=K),K=v>E?0:E-v>>>0,v>>>=0;for(var ne=Se(K);++H<K;)ne[H]=i[H+v];return ne}function EM(i,v){var E;return Xo(i,function(H,K,ne){return E=v(H,K,ne),!E}),!!E}function qc(i,v,E){var H=0,K=i==null?H:i.length;if(typeof v=="number"&&v===v&&K<=le){for(;H<K;){var ne=H+K>>>1,de=i[ne];de!==null&&!Ai(de)&&(E?de<=v:de<v)?H=ne+1:K=ne}return K}return jd(i,v,pi,E)}function jd(i,v,E,H){var K=0,ne=i==null?0:i.length;if(ne===0)return 0;v=E(v);for(var de=v!==v,fe=v===null,we=Ai(v),Me=v===e;K<ne;){var Le=Fc((K+ne)/2),Pe=E(i[Le]),Je=Pe!==e,at=Pe===null,vt=Pe===Pe,Lt=Ai(Pe);if(de)var gt=H||vt;else Me?gt=vt&&(H||Je):fe?gt=vt&&Je&&(H||!at):we?gt=vt&&Je&&!at&&(H||!Lt):at||Lt?gt=!1:gt=H?Pe<=v:Pe<v;gt?K=Le+1:ne=Le}return Fr(ne,ee)}function Mb(i,v){for(var E=-1,H=i.length,K=0,ne=[];++E<H;){var de=i[E],fe=v?v(de):de;if(!E||!no(fe,we)){var we=fe;ne[K++]=de===0?0:de}}return ne}function Ib(i){return typeof i=="number"?i:Ai(i)?te:+i}function ki(i){if(typeof i=="string")return i;if(Rt(i))return S(i,ki)+"";if(Ai(i))return ub?ub.call(i):"";var v=i+"";return v=="0"&&1/i==-U?"-0":v}function Qo(i,v,E){var H=-1,K=ci,ne=i.length,de=!0,fe=[],we=fe;if(E)de=!1,K=y;else if(ne>=m){var Me=v?null:WM(i);if(Me)return Ye(Me);de=!1,K=_t,we=new Ds}else we=v?[]:fe;e:for(;++H<ne;){var Le=i[H],Pe=v?v(Le):Le;if(Le=E||Le!==0?Le:0,de&&Pe===Pe){for(var Je=we.length;Je--;)if(we[Je]===Pe)continue e;v&&we.push(Pe),fe.push(Le)}else K(we,Pe,E)||(we!==fe&&we.push(Pe),fe.push(Le))}return fe}function Hd(i,v){v=es(v,i);var E=-1,H=v.length;if(!H)return!0;for(;++E<H;){var K=to(v[E]);if(K==="__proto__"&&!sn.call(i,"__proto__")||(K==="constructor"||K==="prototype")&&E<H-1)return!1}var ne=s0(i,v);return ne==null||delete ne[to(Bi(v))]}function Lb(i,v,E,H){return bl(i,v,E(Fs(i,v)),H)}function Gc(i,v,E,H){for(var K=i.length,ne=H?K:-1;(H?ne--:++ne<K)&&v(i[ne],ne,i););return E?Wi(i,H?0:ne,H?ne+1:K):Wi(i,H?ne+1:0,H?K:ne)}function Ob(i,v){var E=i;return E instanceof Ut&&(E=E.value()),P(v,function(H,K){return K.func.apply(K.thisArg,k([H],K.args))},E)}function Ud(i,v,E){var H=i.length;if(H<2)return H?Qo(i[0]):[];for(var K=-1,ne=Se(H);++K<H;)for(var de=i[K],fe=-1;++fe<H;)fe!=K&&(ne[K]=ml(ne[K]||de,i[fe],v,E));return Qo($r(ne,1),v,E)}function Nb(i,v,E){for(var H=-1,K=i.length,ne=v.length,de={};++H<K;){var fe=H<ne?v[H]:e;E(de,i[H],fe)}return de}function Vd(i){return qn(i)?i:[]}function qd(i){return typeof i=="function"?i:pi}function es(i,v){return Rt(i)?i:tf(i,v)?[i]:u0(an(i))}var TM=zt;function ts(i,v,E){var H=i.length;return E=E===e?H:E,!v&&E>=H?i:Wi(i,v,E)}var Db=vT||function(i){return Dt.clearTimeout(i)};function Pb(i,v){if(v)return i.slice();var E=i.length,H=ib?ib(E):new i.constructor(E);return i.copy(H),H}function Gd(i){var v=new i.constructor(i.byteLength);return new Lc(v).set(new Lc(i)),v}function MM(i,v){var E=v?Gd(i.buffer):i.buffer;return new i.constructor(E,i.byteOffset,i.byteLength)}function IM(i){var v=new i.constructor(i.source,Nt.exec(i));return v.lastIndex=i.lastIndex,v}function LM(i){return pl?Ft(pl.call(i)):{}}function Fb(i,v){var E=v?Gd(i.buffer):i.buffer;return new i.constructor(E,i.byteOffset,i.length)}function zb(i,v){if(i!==v){var E=i!==e,H=i===null,K=i===i,ne=Ai(i),de=v!==e,fe=v===null,we=v===v,Me=Ai(v);if(!fe&&!Me&&!ne&&i>v||ne&&de&&we&&!fe&&!Me||H&&de&&we||!E&&we||!K)return 1;if(!H&&!ne&&!Me&&i<v||Me&&E&&K&&!H&&!ne||fe&&E&&K||!de&&K||!we)return-1}return 0}function OM(i,v,E){for(var H=-1,K=i.criteria,ne=v.criteria,de=K.length,fe=E.length;++H<de;){var we=zb(K[H],ne[H]);if(we){if(H>=fe)return we;var Me=E[H];return we*(Me=="desc"?-1:1)}}return i.index-v.index}function Wb(i,v,E,H){for(var K=-1,ne=i.length,de=E.length,fe=-1,we=v.length,Me=dr(ne-de,0),Le=Se(we+Me),Pe=!H;++fe<we;)Le[fe]=v[fe];for(;++K<de;)(Pe||K<ne)&&(Le[E[K]]=i[K]);for(;Me--;)Le[fe++]=i[K++];return Le}function Bb(i,v,E,H){for(var K=-1,ne=i.length,de=-1,fe=E.length,we=-1,Me=v.length,Le=dr(ne-fe,0),Pe=Se(Le+Me),Je=!H;++K<Le;)Pe[K]=i[K];for(var at=K;++we<Me;)Pe[at+we]=v[we];for(;++de<fe;)(Je||K<ne)&&(Pe[at+E[de]]=i[K++]);return Pe}function hi(i,v){var E=-1,H=i.length;for(v||(v=Se(H));++E<H;)v[E]=i[E];return v}function bo(i,v,E,H){var K=!E;E||(E={});for(var ne=-1,de=v.length;++ne<de;){var fe=v[ne],we=H?H(E[fe],i[fe],fe,E,i):e;we===e&&(we=i[fe]),K?vo(E,fe,we):gl(E,fe,we)}return E}function NM(i,v){return bo(i,ef(i),v)}function DM(i,v){return bo(i,e0(i),v)}function Kc(i,v){return function(E,H){var K=Rt(E)?wa:iM,ne=v?v():{};return K(E,i,mt(H,2),ne)}}function ka(i){return zt(function(v,E){var H=-1,K=E.length,ne=K>1?E[K-1]:e,de=K>2?E[2]:e;for(ne=i.length>3&&typeof ne=="function"?(K--,ne):e,de&&Qr(E[0],E[1],de)&&(ne=K<3?e:ne,K=1),v=Ft(v);++H<K;){var fe=E[H];fe&&i(v,fe,H,ne)}return v})}function jb(i,v){return function(E,H){if(E==null)return E;if(!di(E))return i(E,H);for(var K=E.length,ne=v?K:-1,de=Ft(E);(v?ne--:++ne<K)&&H(de[ne],ne,de)!==!1;);return E}}function Hb(i){return function(v,E,H){for(var K=-1,ne=Ft(v),de=H(v),fe=de.length;fe--;){var we=de[i?fe:++K];if(E(ne[we],we,ne)===!1)break}return v}}function PM(i,v,E){var H=v&b,K=wl(i);function ne(){var de=this&&this!==Dt&&this instanceof ne?K:i;return de.apply(H?E:this,arguments)}return ne}function Ub(i){return function(v){v=an(v);var E=ge(v)?bt(v):e,H=E?E[0]:v.charAt(0),K=E?ts(E,1).join(""):v.slice(1);return H[i]()+K}}function Aa(i){return function(v){return P(H0(j0(v).replace(Ro,"")),i,"")}}function wl(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var E=_a(i.prototype),H=i.apply(E,v);return Pn(H)?H:E}}function FM(i,v,E){var H=wl(i);function K(){for(var ne=arguments.length,de=Se(ne),fe=ne,we=Sa(K);fe--;)de[fe]=arguments[fe];var Me=ne<3&&de[0]!==we&&de[ne-1]!==we?[]:Ue(de,we);if(ne-=Me.length,ne<E)return Yb(i,v,Yc,K.placeholder,e,de,Me,e,e,E-ne);var Le=this&&this!==Dt&&this instanceof K?H:i;return rn(Le,this,de)}return K}function Vb(i){return function(v,E,H){var K=Ft(v);if(!di(v)){var ne=mt(E,3);v=vr(v),E=function(fe){return ne(K[fe],fe,K)}}var de=i(v,E,H);return de>-1?K[ne?v[de]:de]:e}}function qb(i){return Oo(function(v){var E=v.length,H=E,K=Fi.prototype.thru;for(i&&v.reverse();H--;){var ne=v[H];if(typeof ne!="function")throw new wn(g);if(K&&!de&&Qc(ne)=="wrapper")var de=new Fi([],!0)}for(H=de?H:E;++H<E;){ne=v[H];var fe=Qc(ne),we=fe=="wrapper"?Xd(ne):e;we&&nf(we[0])&&we[1]==(D|R|C|I)&&!we[4].length&&we[9]==1?de=de[Qc(we[0])].apply(de,we[3]):de=ne.length==1&&nf(ne)?de[fe]():de.thru(ne)}return function(){var Me=arguments,Le=Me[0];if(de&&Me.length==1&&Rt(Le))return de.plant(Le).value();for(var Pe=0,Je=E?v[Pe].apply(this,Me):Le;++Pe<E;)Je=v[Pe].call(this,Je);return Je}})}function Yc(i,v,E,H,K,ne,de,fe,we,Me){var Le=v&D,Pe=v&b,Je=v&x,at=v&(R|A),vt=v&T,Lt=Je?e:wl(i);function gt(){for(var Bt=arguments.length,qt=Se(Bt),Si=Bt;Si--;)qt[Si]=arguments[Si];if(at)var ei=Sa(gt),$i=Rn(qt,ei);if(H&&(qt=Wb(qt,H,K,at)),ne&&(qt=Bb(qt,ne,de,at)),Bt-=$i,at&&Bt<Me){var Gn=Ue(qt,ei);return Yb(i,v,Yc,gt.placeholder,E,qt,Gn,fe,we,Me-Bt)}var ro=Pe?E:this,Fo=Je?ro[i]:i;return Bt=qt.length,fe?qt=iI(qt,fe):vt&&Bt>1&&qt.reverse(),Le&&we<Bt&&(qt.length=we),this&&this!==Dt&&this instanceof gt&&(Fo=Lt||wl(Fo)),Fo.apply(ro,qt)}return gt}function Gb(i,v){return function(E,H){return dM(E,i,v(H),{})}}function Jc(i,v){return function(E,H){var K;if(E===e&&H===e)return v;if(E!==e&&(K=E),H!==e){if(K===e)return H;typeof E=="string"||typeof H=="string"?(E=ki(E),H=ki(H)):(E=Ib(E),H=Ib(H)),K=i(E,H)}return K}}function Kd(i){return Oo(function(v){return v=S(v,Kt(mt())),zt(function(E){var H=this;return i(v,function(K){return rn(K,H,E)})})})}function Zc(i,v){v=v===e?" ":ki(v);var E=v.length;if(E<2)return E?Bd(v,i):v;var H=Bd(v,Pc(i/Pt(v)));return ge(v)?ts(bt(H),0,i).join(""):H.slice(0,i)}function zM(i,v,E,H){var K=v&b,ne=wl(i);function de(){for(var fe=-1,we=arguments.length,Me=-1,Le=H.length,Pe=Se(Le+we),Je=this&&this!==Dt&&this instanceof de?ne:i;++Me<Le;)Pe[Me]=H[Me];for(;we--;)Pe[Me++]=arguments[++fe];return rn(Je,K?E:this,Pe)}return de}function Kb(i){return function(v,E,H){return H&&typeof H!="number"&&Qr(v,E,H)&&(E=H=e),v=Po(v),E===e?(E=v,v=0):E=Po(E),H=H===e?v<E?1:-1:Po(H),kM(v,E,H,i)}}function Xc(i){return function(v,E){return typeof v=="string"&&typeof E=="string"||(v=ji(v),E=ji(E)),i(v,E)}}function Yb(i,v,E,H,K,ne,de,fe,we,Me){var Le=v&R,Pe=Le?de:e,Je=Le?e:de,at=Le?ne:e,vt=Le?e:ne;v|=Le?C:O,v&=~(Le?O:C),v&M||(v&=-4);var Lt=[i,v,K,at,Pe,vt,Je,fe,we,Me],gt=E.apply(e,Lt);return nf(i)&&a0(gt,Lt),gt.placeholder=H,l0(gt,i,v)}function Yd(i){var v=Xt[i];return function(E,H){if(E=ji(E),H=H==null?0:Fr(It(H),292),H&&lb(E)){var K=(an(E)+"e").split("e"),ne=v(K[0]+"e"+(+K[1]+H));return K=(an(ne)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return v(E)}}var WM=xa&&1/Ye(new xa([,-0]))[1]==U?function(i){return new xa(i)}:bf;function Jb(i){return function(v){var E=zr(v);return E==it?Fe(v):E==fn?Qe(v):kn(v,i(v))}}function Lo(i,v,E,H,K,ne,de,fe){var we=v&x;if(!we&&typeof i!="function")throw new wn(g);var Me=H?H.length:0;if(Me||(v&=-97,H=K=e),de=de===e?de:dr(It(de),0),fe=fe===e?fe:It(fe),Me-=K?K.length:0,v&O){var Le=H,Pe=K;H=K=e}var Je=we?e:Xd(i),at=[i,v,E,H,K,Le,Pe,ne,de,fe];if(Je&&tI(at,Je),i=at[0],v=at[1],E=at[2],H=at[3],K=at[4],fe=at[9]=at[9]===e?we?0:i.length:dr(at[9]-Me,0),!fe&&v&(R|A)&&(v&=-25),!v||v==b)var vt=PM(i,v,E);else v==R||v==A?vt=FM(i,v,fe):(v==C||v==(b|C))&&!K.length?vt=zM(i,v,E,H):vt=Yc.apply(e,at);var Lt=Je?Tb:a0;return l0(Lt(vt,at),i,v)}function Zb(i,v,E,H){return i===e||no(i,To[E])&&!sn.call(H,E)?v:i}function Xb(i,v,E,H,K,ne){return Pn(i)&&Pn(v)&&(ne.set(v,i),Vc(i,v,e,Xb,ne),ne.delete(v)),i}function BM(i){return _l(i)?e:i}function Qb(i,v,E,H,K,ne){var de=E&s,fe=i.length,we=v.length;if(fe!=we&&!(de&&we>fe))return!1;var Me=ne.get(i),Le=ne.get(v);if(Me&&Le)return Me==v&&Le==i;var Pe=-1,Je=!0,at=E&p?new Ds:e;for(ne.set(i,v),ne.set(v,i);++Pe<fe;){var vt=i[Pe],Lt=v[Pe];if(H)var gt=de?H(Lt,vt,Pe,v,i,ne):H(vt,Lt,Pe,i,v,ne);if(gt!==e){if(gt)continue;Je=!1;break}if(at){if(!j(v,function(Bt,qt){if(!_t(at,qt)&&(vt===Bt||K(vt,Bt,E,H,ne)))return at.push(qt)})){Je=!1;break}}else if(!(vt===Lt||K(vt,Lt,E,H,ne))){Je=!1;break}}return ne.delete(i),ne.delete(v),Je}function jM(i,v,E,H,K,ne,de){switch(E){case Un:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case In:return!(i.byteLength!=v.byteLength||!ne(new Lc(i),new Lc(v)));case $e:case Ee:case Wt:return no(+i,+v);case He:return i.name==v.name&&i.message==v.message;case wr:case or:return i==v+"";case it:var fe=Fe;case fn:var we=H&s;if(fe||(fe=Ye),i.size!=v.size&&!we)return!1;var Me=de.get(i);if(Me)return Me==v;H|=p,de.set(i,v);var Le=Qb(fe(i),fe(v),H,K,ne,de);return de.delete(i),Le;case ft:if(pl)return pl.call(i)==pl.call(v)}return!1}function HM(i,v,E,H,K,ne){var de=E&s,fe=Jd(i),we=fe.length,Me=Jd(v),Le=Me.length;if(we!=Le&&!de)return!1;for(var Pe=we;Pe--;){var Je=fe[Pe];if(!(de?Je in v:sn.call(v,Je)))return!1}var at=ne.get(i),vt=ne.get(v);if(at&&vt)return at==v&&vt==i;var Lt=!0;ne.set(i,v),ne.set(v,i);for(var gt=de;++Pe<we;){Je=fe[Pe];var Bt=i[Je],qt=v[Je];if(H)var Si=de?H(qt,Bt,Je,v,i,ne):H(Bt,qt,Je,i,v,ne);if(!(Si===e?Bt===qt||K(Bt,qt,E,H,ne):Si)){Lt=!1;break}gt||(gt=Je=="constructor")}if(Lt&&!gt){var ei=i.constructor,$i=v.constructor;ei!=$i&&"constructor"in i&&"constructor"in v&&!(typeof ei=="function"&&ei instanceof ei&&typeof $i=="function"&&$i instanceof $i)&&(Lt=!1)}return ne.delete(i),ne.delete(v),Lt}function Oo(i){return of(o0(i,e,p0),i+"")}function Jd(i){return bb(i,vr,ef)}function Zd(i){return bb(i,fi,e0)}var Xd=zc?function(i){return zc.get(i)}:bf;function Qc(i){for(var v=i.name+"",E=Ca[v],H=sn.call(Ca,v)?E.length:0;H--;){var K=E[H],ne=K.func;if(ne==null||ne==i)return K.name}return v}function Sa(i){var v=sn.call(Q,"placeholder")?Q:i;return v.placeholder}function mt(){var i=Q.iteratee||vf;return i=i===vf?Cb:i,arguments.length?i(arguments[0],arguments[1]):i}function eu(i,v){var E=i.__data__;return ZM(v)?E[typeof v=="string"?"string":"hash"]:E.map}function Qd(i){for(var v=vr(i),E=v.length;E--;){var H=v[E],K=i[H];v[E]=[H,K,r0(K)]}return v}function zs(i,v){var E=ae(i,v);return xb(E)?E:e}function UM(i){var v=sn.call(i,Os),E=i[Os];try{i[Os]=e;var H=!0}catch{}var K=Mc.call(i);return H&&(v?i[Os]=E:delete i[Os]),K}var ef=$d?function(i){return i==null?[]:(i=Ft(i),kr($d(i),function(v){return sb.call(i,v)}))}:wf,e0=$d?function(i){for(var v=[];i;)k(v,ef(i)),i=Oc(i);return v}:wf,zr=Xr;(Rd&&zr(new Rd(new ArrayBuffer(1)))!=Un||hl&&zr(new hl)!=it||Ed&&zr(Ed.resolve())!=ir||xa&&zr(new xa)!=fn||dl&&zr(new dl)!=$t)&&(zr=function(i){var v=Xr(i),E=v==At?i.constructor:e,H=E?Ws(E):"";if(H)switch(H){case ST:return Un;case $T:return it;case RT:return ir;case ET:return fn;case TT:return $t}return v});function VM(i,v,E){for(var H=-1,K=E.length;++H<K;){var ne=E[H],de=ne.size;switch(ne.type){case"drop":i+=de;break;case"dropRight":v-=de;break;case"take":v=Fr(v,i+de);break;case"takeRight":i=dr(i,v-de);break}}return{start:i,end:v}}function qM(i){var v=i.match(ao);return v?v[1].split(lo):[]}function t0(i,v,E){v=es(v,i);for(var H=-1,K=v.length,ne=!1;++H<K;){var de=to(v[H]);if(!(ne=i!=null&&E(i,de)))break;i=i[de]}return ne||++H!=K?ne:(K=i==null?0:i.length,!!K&&au(K)&&No(de,K)&&(Rt(i)||Bs(i)))}function GM(i){var v=i.length,E=new i.constructor(v);return v&&typeof i[0]=="string"&&sn.call(i,"index")&&(E.index=i.index,E.input=i.input),E}function n0(i){return typeof i.constructor=="function"&&!xl(i)?_a(Oc(i)):{}}function KM(i,v,E){var H=i.constructor;switch(v){case In:return Gd(i);case $e:case Ee:return new H(+i);case Un:return MM(i,E);case sr:case pn:case zn:case Ln:case Gt:case nn:case Ir:case Gr:case xr:return Fb(i,E);case it:return new H;case Wt:case or:return new H(i);case wr:return IM(i);case fn:return new H;case ft:return LM(i)}}function YM(i,v){var E=v.length;if(!E)return i;var H=E-1;return v[H]=(E>1?"& ":"")+v[H],v=v.join(E>2?", ":" "),i.replace(ai,`{
1460
+ /* [wrapped with `+v+`] */
1461
+ `)}function JM(i){return Rt(i)||Bs(i)||!!(ab&&i&&i[ab])}function No(i,v){var E=typeof i;return v=v??G,!!v&&(E=="number"||E!="symbol"&&Ne.test(i))&&i>-1&&i%1==0&&i<v}function Qr(i,v,E){if(!Pn(E))return!1;var H=typeof v;return(H=="number"?di(E)&&No(v,E.length):H=="string"&&v in E)?no(E[v],i):!1}function tf(i,v){if(Rt(i))return!1;var E=typeof i;return E=="number"||E=="symbol"||E=="boolean"||i==null||Ai(i)?!0:_n.test(i)||!si.test(i)||v!=null&&i in Ft(v)}function ZM(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function nf(i){var v=Qc(i),E=Q[v];if(typeof E!="function"||!(v in Ut.prototype))return!1;if(i===E)return!0;var H=Xd(E);return!!H&&i===H[0]}function XM(i){return!!rb&&rb in i}var QM=Ec?Do:xf;function xl(i){var v=i&&i.constructor,E=typeof v=="function"&&v.prototype||To;return i===E}function r0(i){return i===i&&!Pn(i)}function i0(i,v){return function(E){return E==null?!1:E[i]===v&&(v!==e||i in Ft(E))}}function eI(i){var v=ou(i,function(H){return E.size===a&&E.clear(),H}),E=v.cache;return v}function tI(i,v){var E=i[1],H=v[1],K=E|H,ne=K<(b|x|D),de=H==D&&E==R||H==D&&E==I&&i[7].length<=v[8]||H==(D|I)&&v[7].length<=v[8]&&E==R;if(!(ne||de))return i;H&b&&(i[2]=v[2],K|=E&b?0:M);var fe=v[3];if(fe){var we=i[3];i[3]=we?Wb(we,fe,v[4]):fe,i[4]=we?Ue(i[3],l):v[4]}return fe=v[5],fe&&(we=i[5],i[5]=we?Bb(we,fe,v[6]):fe,i[6]=we?Ue(i[5],l):v[6]),fe=v[7],fe&&(i[7]=fe),H&D&&(i[8]=i[8]==null?v[8]:Fr(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=K,i}function nI(i){var v=[];if(i!=null)for(var E in Ft(i))v.push(E);return v}function rI(i){return Mc.call(i)}function o0(i,v,E){return v=dr(v===e?i.length-1:v,0),function(){for(var H=arguments,K=-1,ne=dr(H.length-v,0),de=Se(ne);++K<ne;)de[K]=H[v+K];K=-1;for(var fe=Se(v+1);++K<v;)fe[K]=H[K];return fe[v]=E(de),rn(i,this,fe)}}function s0(i,v){return v.length<2?i:Fs(i,Wi(v,0,-1))}function iI(i,v){for(var E=i.length,H=Fr(v.length,E),K=hi(i);H--;){var ne=v[H];i[H]=No(ne,E)?K[ne]:e}return i}function rf(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var a0=c0(Tb),Cl=bT||function(i,v){return Dt.setTimeout(i,v)},of=c0($M);function l0(i,v,E){var H=v+"";return of(i,YM(H,oI(qM(H),E)))}function c0(i){var v=0,E=0;return function(){var H=_T(),K=$-(H-E);if(E=H,K>0){if(++v>=L)return arguments[0]}else v=0;return i.apply(e,arguments)}}function tu(i,v){var E=-1,H=i.length,K=H-1;for(v=v===e?H:v;++E<v;){var ne=Wd(E,K),de=i[ne];i[ne]=i[E],i[E]=de}return i.length=v,i}var u0=eI(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Cr,function(E,H,K,ne){v.push(K?ne.replace(li,"$1"):H||E)}),v});function to(i){if(typeof i=="string"||Ai(i))return i;var v=i+"";return v=="0"&&1/i==-U?"-0":v}function Ws(i){if(i!=null){try{return Tc.call(i)}catch{}try{return i+""}catch{}}return""}function oI(i,v){return ur(se,function(E){var H="_."+E[0];v&E[1]&&!ci(i,H)&&i.push(H)}),i.sort()}function h0(i){if(i instanceof Ut)return i.clone();var v=new Fi(i.__wrapped__,i.__chain__);return v.__actions__=hi(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function sI(i,v,E){(E?Qr(i,v,E):v===e)?v=1:v=dr(It(v),0);var H=i==null?0:i.length;if(!H||v<1)return[];for(var K=0,ne=0,de=Se(Pc(H/v));K<H;)de[ne++]=Wi(i,K,K+=v);return de}function aI(i){for(var v=-1,E=i==null?0:i.length,H=0,K=[];++v<E;){var ne=i[v];ne&&(K[H++]=ne)}return K}function lI(){var i=arguments.length;if(!i)return[];for(var v=Se(i-1),E=arguments[0],H=i;H--;)v[H-1]=arguments[H];return k(Rt(E)?hi(E):[E],$r(v,1))}var cI=zt(function(i,v){return qn(i)?ml(i,$r(v,1,qn,!0)):[]}),uI=zt(function(i,v){var E=Bi(v);return qn(E)&&(E=e),qn(i)?ml(i,$r(v,1,qn,!0),mt(E,2)):[]}),hI=zt(function(i,v){var E=Bi(v);return qn(E)&&(E=e),qn(i)?ml(i,$r(v,1,qn,!0),e,E):[]});function dI(i,v,E){var H=i==null?0:i.length;return H?(v=E||v===e?1:It(v),Wi(i,v<0?0:v,H)):[]}function fI(i,v,E){var H=i==null?0:i.length;return H?(v=E||v===e?1:It(v),v=H-v,Wi(i,0,v<0?0:v)):[]}function pI(i,v){return i&&i.length?Gc(i,mt(v,3),!0,!0):[]}function gI(i,v){return i&&i.length?Gc(i,mt(v,3),!0):[]}function mI(i,v,E,H){var K=i==null?0:i.length;return K?(E&&typeof E!="number"&&Qr(i,v,E)&&(E=0,H=K),lM(i,v,E,H)):[]}function d0(i,v,E){var H=i==null?0:i.length;if(!H)return-1;var K=E==null?0:It(E);return K<0&&(K=dr(H+K,0)),ue(i,mt(v,3),K)}function f0(i,v,E){var H=i==null?0:i.length;if(!H)return-1;var K=H-1;return E!==e&&(K=It(E),K=E<0?dr(H+K,0):Fr(K,H-1)),ue(i,mt(v,3),K,!0)}function p0(i){var v=i==null?0:i.length;return v?$r(i,1):[]}function vI(i){var v=i==null?0:i.length;return v?$r(i,U):[]}function yI(i,v){var E=i==null?0:i.length;return E?(v=v===e?1:It(v),$r(i,v)):[]}function bI(i){for(var v=-1,E=i==null?0:i.length,H={};++v<E;){var K=i[v];vo(H,K[0],K[1])}return H}function g0(i){return i&&i.length?i[0]:e}function wI(i,v,E){var H=i==null?0:i.length;if(!H)return-1;var K=E==null?0:It(E);return K<0&&(K=dr(H+K,0)),be(i,v,K)}function xI(i){var v=i==null?0:i.length;return v?Wi(i,0,-1):[]}var CI=zt(function(i){var v=S(i,Vd);return v.length&&v[0]===i[0]?Nd(v):[]}),_I=zt(function(i){var v=Bi(i),E=S(i,Vd);return v===Bi(E)?v=e:E.pop(),E.length&&E[0]===i[0]?Nd(E,mt(v,2)):[]}),kI=zt(function(i){var v=Bi(i),E=S(i,Vd);return v=typeof v=="function"?v:e,v&&E.pop(),E.length&&E[0]===i[0]?Nd(E,e,v):[]});function AI(i,v){return i==null?"":xT.call(i,v)}function Bi(i){var v=i==null?0:i.length;return v?i[v-1]:e}function SI(i,v,E){var H=i==null?0:i.length;if(!H)return-1;var K=H;return E!==e&&(K=It(E),K=K<0?dr(H+K,0):Fr(K,H-1)),v===v?Yt(i,v,K):ue(i,ye,K,!0)}function $I(i,v){return i&&i.length?Sb(i,It(v)):e}var RI=zt(m0);function m0(i,v){return i&&i.length&&v&&v.length?zd(i,v):i}function EI(i,v,E){return i&&i.length&&v&&v.length?zd(i,v,mt(E,2)):i}function TI(i,v,E){return i&&i.length&&v&&v.length?zd(i,v,e,E):i}var MI=Oo(function(i,v){var E=i==null?0:i.length,H=Md(i,v);return Eb(i,S(v,function(K){return No(K,E)?+K:K}).sort(zb)),H});function II(i,v){var E=[];if(!(i&&i.length))return E;var H=-1,K=[],ne=i.length;for(v=mt(v,3);++H<ne;){var de=i[H];v(de,H,i)&&(E.push(de),K.push(H))}return Eb(i,K),E}function sf(i){return i==null?i:AT.call(i)}function LI(i,v,E){var H=i==null?0:i.length;return H?(E&&typeof E!="number"&&Qr(i,v,E)?(v=0,E=H):(v=v==null?0:It(v),E=E===e?H:It(E)),Wi(i,v,E)):[]}function OI(i,v){return qc(i,v)}function NI(i,v,E){return jd(i,v,mt(E,2))}function DI(i,v){var E=i==null?0:i.length;if(E){var H=qc(i,v);if(H<E&&no(i[H],v))return H}return-1}function PI(i,v){return qc(i,v,!0)}function FI(i,v,E){return jd(i,v,mt(E,2),!0)}function zI(i,v){var E=i==null?0:i.length;if(E){var H=qc(i,v,!0)-1;if(no(i[H],v))return H}return-1}function WI(i){return i&&i.length?Mb(i):[]}function BI(i,v){return i&&i.length?Mb(i,mt(v,2)):[]}function jI(i){var v=i==null?0:i.length;return v?Wi(i,1,v):[]}function HI(i,v,E){return i&&i.length?(v=E||v===e?1:It(v),Wi(i,0,v<0?0:v)):[]}function UI(i,v,E){var H=i==null?0:i.length;return H?(v=E||v===e?1:It(v),v=H-v,Wi(i,v<0?0:v,H)):[]}function VI(i,v){return i&&i.length?Gc(i,mt(v,3),!1,!0):[]}function qI(i,v){return i&&i.length?Gc(i,mt(v,3)):[]}var GI=zt(function(i){return Qo($r(i,1,qn,!0))}),KI=zt(function(i){var v=Bi(i);return qn(v)&&(v=e),Qo($r(i,1,qn,!0),mt(v,2))}),YI=zt(function(i){var v=Bi(i);return v=typeof v=="function"?v:e,Qo($r(i,1,qn,!0),e,v)});function JI(i){return i&&i.length?Qo(i):[]}function ZI(i,v){return i&&i.length?Qo(i,mt(v,2)):[]}function XI(i,v){return v=typeof v=="function"?v:e,i&&i.length?Qo(i,e,v):[]}function af(i){if(!(i&&i.length))return[];var v=0;return i=kr(i,function(E){if(qn(E))return v=dr(E.length,v),!0}),et(v,function(E){return S(i,Oe(E))})}function v0(i,v){if(!(i&&i.length))return[];var E=af(i);return v==null?E:S(E,function(H){return rn(v,e,H)})}var QI=zt(function(i,v){return qn(i)?ml(i,v):[]}),eL=zt(function(i){return Ud(kr(i,qn))}),tL=zt(function(i){var v=Bi(i);return qn(v)&&(v=e),Ud(kr(i,qn),mt(v,2))}),nL=zt(function(i){var v=Bi(i);return v=typeof v=="function"?v:e,Ud(kr(i,qn),e,v)}),rL=zt(af);function iL(i,v){return Nb(i||[],v||[],gl)}function oL(i,v){return Nb(i||[],v||[],bl)}var sL=zt(function(i){var v=i.length,E=v>1?i[v-1]:e;return E=typeof E=="function"?(i.pop(),E):e,v0(i,E)});function y0(i){var v=Q(i);return v.__chain__=!0,v}function aL(i,v){return v(i),i}function nu(i,v){return v(i)}var lL=Oo(function(i){var v=i.length,E=v?i[0]:0,H=this.__wrapped__,K=function(ne){return Md(ne,i)};return v>1||this.__actions__.length||!(H instanceof Ut)||!No(E)?this.thru(K):(H=H.slice(E,+E+(v?1:0)),H.__actions__.push({func:nu,args:[K],thisArg:e}),new Fi(H,this.__chain__).thru(function(ne){return v&&!ne.length&&ne.push(e),ne}))});function cL(){return y0(this)}function uL(){return new Fi(this.value(),this.__chain__)}function hL(){this.__values__===e&&(this.__values__=I0(this.value()));var i=this.__index__>=this.__values__.length,v=i?e:this.__values__[this.__index__++];return{done:i,value:v}}function dL(){return this}function fL(i){for(var v,E=this;E instanceof Bc;){var H=h0(E);H.__index__=0,H.__values__=e,v?K.__wrapped__=H:v=H;var K=H;E=E.__wrapped__}return K.__wrapped__=i,v}function pL(){var i=this.__wrapped__;if(i instanceof Ut){var v=i;return this.__actions__.length&&(v=new Ut(this)),v=v.reverse(),v.__actions__.push({func:nu,args:[sf],thisArg:e}),new Fi(v,this.__chain__)}return this.thru(sf)}function gL(){return Ob(this.__wrapped__,this.__actions__)}var mL=Kc(function(i,v,E){sn.call(i,E)?++i[E]:vo(i,E,1)});function vL(i,v,E){var H=Rt(i)?mo:aM;return E&&Qr(i,v,E)&&(v=e),H(i,mt(v,3))}function yL(i,v){var E=Rt(i)?kr:vb;return E(i,mt(v,3))}var bL=Vb(d0),wL=Vb(f0);function xL(i,v){return $r(ru(i,v),1)}function CL(i,v){return $r(ru(i,v),U)}function _L(i,v,E){return E=E===e?1:It(E),$r(ru(i,v),E)}function b0(i,v){var E=Rt(i)?ur:Xo;return E(i,mt(v,3))}function w0(i,v){var E=Rt(i)?Pr:mb;return E(i,mt(v,3))}var kL=Kc(function(i,v,E){sn.call(i,E)?i[E].push(v):vo(i,E,[v])});function AL(i,v,E,H){i=di(i)?i:Ra(i),E=E&&!H?It(E):0;var K=i.length;return E<0&&(E=dr(K+E,0)),lu(i)?E<=K&&i.indexOf(v,E)>-1:!!K&&be(i,v,E)>-1}var SL=zt(function(i,v,E){var H=-1,K=typeof v=="function",ne=di(i)?Se(i.length):[];return Xo(i,function(de){ne[++H]=K?rn(v,de,E):vl(de,v,E)}),ne}),$L=Kc(function(i,v,E){vo(i,E,v)});function ru(i,v){var E=Rt(i)?S:_b;return E(i,mt(v,3))}function RL(i,v,E,H){return i==null?[]:(Rt(v)||(v=v==null?[]:[v]),E=H?e:E,Rt(E)||(E=E==null?[]:[E]),$b(i,v,E))}var EL=Kc(function(i,v,E){i[E?0:1].push(v)},function(){return[[],[]]});function TL(i,v,E){var H=Rt(i)?P:Ge,K=arguments.length<3;return H(i,mt(v,4),E,K,Xo)}function ML(i,v,E){var H=Rt(i)?z:Ge,K=arguments.length<3;return H(i,mt(v,4),E,K,mb)}function IL(i,v){var E=Rt(i)?kr:vb;return E(i,su(mt(v,3)))}function LL(i){var v=Rt(i)?db:AM;return v(i)}function OL(i,v,E){(E?Qr(i,v,E):v===e)?v=1:v=It(v);var H=Rt(i)?nM:SM;return H(i,v)}function NL(i){var v=Rt(i)?rM:RM;return v(i)}function DL(i){if(i==null)return 0;if(di(i))return lu(i)?Pt(i):i.length;var v=zr(i);return v==it||v==fn?i.size:Pd(i).length}function PL(i,v,E){var H=Rt(i)?j:EM;return E&&Qr(i,v,E)&&(v=e),H(i,mt(v,3))}var FL=zt(function(i,v){if(i==null)return[];var E=v.length;return E>1&&Qr(i,v[0],v[1])?v=[]:E>2&&Qr(v[0],v[1],v[2])&&(v=[v[0]]),$b(i,$r(v,1),[])}),iu=yT||function(){return Dt.Date.now()};function zL(i,v){if(typeof v!="function")throw new wn(g);return i=It(i),function(){if(--i<1)return v.apply(this,arguments)}}function x0(i,v,E){return v=E?e:v,v=i&&v==null?i.length:v,Lo(i,D,e,e,e,e,v)}function C0(i,v){var E;if(typeof v!="function")throw new wn(g);return i=It(i),function(){return--i>0&&(E=v.apply(this,arguments)),i<=1&&(v=e),E}}var lf=zt(function(i,v,E){var H=b;if(E.length){var K=Ue(E,Sa(lf));H|=C}return Lo(i,H,v,E,K)}),_0=zt(function(i,v,E){var H=b|x;if(E.length){var K=Ue(E,Sa(_0));H|=C}return Lo(v,H,i,E,K)});function k0(i,v,E){v=E?e:v;var H=Lo(i,R,e,e,e,e,e,v);return H.placeholder=k0.placeholder,H}function A0(i,v,E){v=E?e:v;var H=Lo(i,A,e,e,e,e,e,v);return H.placeholder=A0.placeholder,H}function S0(i,v,E){var H,K,ne,de,fe,we,Me=0,Le=!1,Pe=!1,Je=!0;if(typeof i!="function")throw new wn(g);v=ji(v)||0,Pn(E)&&(Le=!!E.leading,Pe="maxWait"in E,ne=Pe?dr(ji(E.maxWait)||0,v):ne,Je="trailing"in E?!!E.trailing:Je);function at(Gn){var ro=H,Fo=K;return H=K=e,Me=Gn,de=i.apply(Fo,ro),de}function vt(Gn){return Me=Gn,fe=Cl(Bt,v),Le?at(Gn):de}function Lt(Gn){var ro=Gn-we,Fo=Gn-Me,q0=v-ro;return Pe?Fr(q0,ne-Fo):q0}function gt(Gn){var ro=Gn-we,Fo=Gn-Me;return we===e||ro>=v||ro<0||Pe&&Fo>=ne}function Bt(){var Gn=iu();if(gt(Gn))return qt(Gn);fe=Cl(Bt,Lt(Gn))}function qt(Gn){return fe=e,Je&&H?at(Gn):(H=K=e,de)}function Si(){fe!==e&&Db(fe),Me=0,H=we=K=fe=e}function ei(){return fe===e?de:qt(iu())}function $i(){var Gn=iu(),ro=gt(Gn);if(H=arguments,K=this,we=Gn,ro){if(fe===e)return vt(we);if(Pe)return Db(fe),fe=Cl(Bt,v),at(we)}return fe===e&&(fe=Cl(Bt,v)),de}return $i.cancel=Si,$i.flush=ei,$i}var WL=zt(function(i,v){return gb(i,1,v)}),BL=zt(function(i,v,E){return gb(i,ji(v)||0,E)});function jL(i){return Lo(i,T)}function ou(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new wn(g);var E=function(){var H=arguments,K=v?v.apply(this,H):H[0],ne=E.cache;if(ne.has(K))return ne.get(K);var de=i.apply(this,H);return E.cache=ne.set(K,de)||ne,de};return E.cache=new(ou.Cache||Io),E}ou.Cache=Io;function su(i){if(typeof i!="function")throw new wn(g);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function HL(i){return C0(2,i)}var UL=TM(function(i,v){v=v.length==1&&Rt(v[0])?S(v[0],Kt(mt())):S($r(v,1),Kt(mt()));var E=v.length;return zt(function(H){for(var K=-1,ne=Fr(H.length,E);++K<ne;)H[K]=v[K].call(this,H[K]);return rn(i,this,H)})}),cf=zt(function(i,v){var E=Ue(v,Sa(cf));return Lo(i,C,e,v,E)}),$0=zt(function(i,v){var E=Ue(v,Sa($0));return Lo(i,O,e,v,E)}),VL=Oo(function(i,v){return Lo(i,I,e,e,e,v)});function qL(i,v){if(typeof i!="function")throw new wn(g);return v=v===e?v:It(v),zt(i,v)}function GL(i,v){if(typeof i!="function")throw new wn(g);return v=v==null?0:dr(It(v),0),zt(function(E){var H=E[v],K=ts(E,0,v);return H&&k(K,H),rn(i,this,K)})}function KL(i,v,E){var H=!0,K=!0;if(typeof i!="function")throw new wn(g);return Pn(E)&&(H="leading"in E?!!E.leading:H,K="trailing"in E?!!E.trailing:K),S0(i,v,{leading:H,maxWait:v,trailing:K})}function YL(i){return x0(i,1)}function JL(i,v){return cf(qd(v),i)}function ZL(){if(!arguments.length)return[];var i=arguments[0];return Rt(i)?i:[i]}function XL(i){return zi(i,o)}function QL(i,v){return v=typeof v=="function"?v:e,zi(i,o,v)}function eO(i){return zi(i,c|o)}function tO(i,v){return v=typeof v=="function"?v:e,zi(i,c|o,v)}function nO(i,v){return v==null||pb(i,v,vr(v))}function no(i,v){return i===v||i!==i&&v!==v}var rO=Xc(Od),iO=Xc(function(i,v){return i>=v}),Bs=wb((function(){return arguments})())?wb:function(i){return jn(i)&&sn.call(i,"callee")&&!sb.call(i,"callee")},Rt=Se.isArray,oO=Jo?Kt(Jo):fM;function di(i){return i!=null&&au(i.length)&&!Do(i)}function qn(i){return jn(i)&&di(i)}function sO(i){return i===!0||i===!1||jn(i)&&Xr(i)==$e}var ns=wT||xf,aO=Bn?Kt(Bn):pM;function lO(i){return jn(i)&&i.nodeType===1&&!_l(i)}function cO(i){if(i==null)return!0;if(di(i)&&(Rt(i)||typeof i=="string"||typeof i.splice=="function"||ns(i)||$a(i)||Bs(i)))return!i.length;var v=zr(i);if(v==it||v==fn)return!i.size;if(xl(i))return!Pd(i).length;for(var E in i)if(sn.call(i,E))return!1;return!0}function uO(i,v){return yl(i,v)}function hO(i,v,E){E=typeof E=="function"?E:e;var H=E?E(i,v):e;return H===e?yl(i,v,e,E):!!H}function uf(i){if(!jn(i))return!1;var v=Xr(i);return v==He||v==qe||typeof i.message=="string"&&typeof i.name=="string"&&!_l(i)}function dO(i){return typeof i=="number"&&lb(i)}function Do(i){if(!Pn(i))return!1;var v=Xr(i);return v==tt||v==Xe||v==ve||v==An}function R0(i){return typeof i=="number"&&i==It(i)}function au(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=G}function Pn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function jn(i){return i!=null&&typeof i=="object"}var E0=Ci?Kt(Ci):mM;function fO(i,v){return i===v||Dd(i,v,Qd(v))}function pO(i,v,E){return E=typeof E=="function"?E:e,Dd(i,v,Qd(v),E)}function gO(i){return T0(i)&&i!=+i}function mO(i){if(QM(i))throw new ht(f);return xb(i)}function vO(i){return i===null}function yO(i){return i==null}function T0(i){return typeof i=="number"||jn(i)&&Xr(i)==Wt}function _l(i){if(!jn(i)||Xr(i)!=At)return!1;var v=Oc(i);if(v===null)return!0;var E=sn.call(v,"constructor")&&v.constructor;return typeof E=="function"&&E instanceof E&&Tc.call(E)==pT}var hf=_i?Kt(_i):vM;function bO(i){return R0(i)&&i>=-G&&i<=G}var M0=Di?Kt(Di):yM;function lu(i){return typeof i=="string"||!Rt(i)&&jn(i)&&Xr(i)==or}function Ai(i){return typeof i=="symbol"||jn(i)&&Xr(i)==ft}var $a=Ls?Kt(Ls):bM;function wO(i){return i===e}function xO(i){return jn(i)&&zr(i)==$t}function CO(i){return jn(i)&&Xr(i)==Zt}var _O=Xc(Fd),kO=Xc(function(i,v){return i<=v});function I0(i){if(!i)return[];if(di(i))return lu(i)?bt(i):hi(i);if(ul&&i[ul])return Te(i[ul]());var v=zr(i),E=v==it?Fe:v==fn?Ye:Ra;return E(i)}function Po(i){if(!i)return i===0?i:0;if(i=ji(i),i===U||i===-U){var v=i<0?-1:1;return v*J}return i===i?i:0}function It(i){var v=Po(i),E=v%1;return v===v?E?v-E:v:0}function L0(i){return i?Ps(It(i),0,he):0}function ji(i){if(typeof i=="number")return i;if(Ai(i))return te;if(Pn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Pn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=Ct(i);var E=ar.test(i);return E||oe.test(i)?wt(i.slice(2),E?2:8):Ao.test(i)?te:+i}function O0(i){return bo(i,fi(i))}function AO(i){return i?Ps(It(i),-G,G):i===0?i:0}function an(i){return i==null?"":ki(i)}var SO=ka(function(i,v){if(xl(v)||di(v)){bo(v,vr(v),i);return}for(var E in v)sn.call(v,E)&&gl(i,E,v[E])}),N0=ka(function(i,v){bo(v,fi(v),i)}),D0=ka(function(i,v,E,H){bo(v,fi(v),i,H)}),df=ka(function(i,v,E,H){bo(v,vr(v),i,H)}),$O=Oo(Md);function RO(i,v){var E=_a(i);return v==null?E:fb(E,v)}var EO=zt(function(i,v){i=Ft(i);var E=-1,H=v.length,K=H>2?v[2]:e;for(K&&Qr(v[0],v[1],K)&&(H=1);++E<H;)for(var ne=v[E],de=fi(ne),fe=-1,we=de.length;++fe<we;){var Me=de[fe],Le=i[Me];(Le===e||no(Le,To[Me])&&!sn.call(i,Me))&&(i[Me]=ne[Me])}return i}),TO=zt(function(i){return i.push(e,Xb),rn(P0,e,i)});function MO(i,v){return re(i,mt(v,3),yo)}function IO(i,v){return re(i,mt(v,3),Ld)}function LO(i,v){return i==null?i:Id(i,mt(v,3),fi)}function OO(i,v){return i==null?i:yb(i,mt(v,3),fi)}function NO(i,v){return i&&yo(i,mt(v,3))}function DO(i,v){return i&&Ld(i,mt(v,3))}function PO(i){return i==null?[]:Uc(i,vr(i))}function FO(i){return i==null?[]:Uc(i,fi(i))}function ff(i,v,E){var H=i==null?e:Fs(i,v);return H===e?E:H}function zO(i,v){return i!=null&&t0(i,v,cM)}function pf(i,v){return i!=null&&t0(i,v,uM)}var WO=Gb(function(i,v,E){v!=null&&typeof v.toString!="function"&&(v=Mc.call(v)),i[v]=E},mf(pi)),BO=Gb(function(i,v,E){v!=null&&typeof v.toString!="function"&&(v=Mc.call(v)),sn.call(i,v)?i[v].push(E):i[v]=[E]},mt),jO=zt(vl);function vr(i){return di(i)?hb(i):Pd(i)}function fi(i){return di(i)?hb(i,!0):wM(i)}function HO(i,v){var E={};return v=mt(v,3),yo(i,function(H,K,ne){vo(E,v(H,K,ne),H)}),E}function UO(i,v){var E={};return v=mt(v,3),yo(i,function(H,K,ne){vo(E,K,v(H,K,ne))}),E}var VO=ka(function(i,v,E){Vc(i,v,E)}),P0=ka(function(i,v,E,H){Vc(i,v,E,H)}),qO=Oo(function(i,v){var E={};if(i==null)return E;var H=!1;v=S(v,function(ne){return ne=es(ne,i),H||(H=ne.length>1),ne}),bo(i,Zd(i),E),H&&(E=zi(E,c|h|o,BM));for(var K=v.length;K--;)Hd(E,v[K]);return E});function GO(i,v){return F0(i,su(mt(v)))}var KO=Oo(function(i,v){return i==null?{}:CM(i,v)});function F0(i,v){if(i==null)return{};var E=S(Zd(i),function(H){return[H]});return v=mt(v),Rb(i,E,function(H,K){return v(H,K[0])})}function YO(i,v,E){v=es(v,i);var H=-1,K=v.length;for(K||(K=1,i=e);++H<K;){var ne=i==null?e:i[to(v[H])];ne===e&&(H=K,ne=E),i=Do(ne)?ne.call(i):ne}return i}function JO(i,v,E){return i==null?i:bl(i,v,E)}function ZO(i,v,E,H){return H=typeof H=="function"?H:e,i==null?i:bl(i,v,E,H)}var z0=Jb(vr),W0=Jb(fi);function XO(i,v,E){var H=Rt(i),K=H||ns(i)||$a(i);if(v=mt(v,4),E==null){var ne=i&&i.constructor;K?E=H?new ne:[]:Pn(i)?E=Do(ne)?_a(Oc(i)):{}:E={}}return(K?ur:yo)(i,function(de,fe,we){return v(E,de,fe,we)}),E}function QO(i,v){return i==null?!0:Hd(i,v)}function eN(i,v,E){return i==null?i:Lb(i,v,qd(E))}function tN(i,v,E,H){return H=typeof H=="function"?H:e,i==null?i:Lb(i,v,qd(E),H)}function Ra(i){return i==null?[]:Tt(i,vr(i))}function nN(i){return i==null?[]:Tt(i,fi(i))}function rN(i,v,E){return E===e&&(E=v,v=e),E!==e&&(E=ji(E),E=E===E?E:0),v!==e&&(v=ji(v),v=v===v?v:0),Ps(ji(i),v,E)}function iN(i,v,E){return v=Po(v),E===e?(E=v,v=0):E=Po(E),i=ji(i),hM(i,v,E)}function oN(i,v,E){if(E&&typeof E!="boolean"&&Qr(i,v,E)&&(v=E=e),E===e&&(typeof v=="boolean"?(E=v,v=e):typeof i=="boolean"&&(E=i,i=e)),i===e&&v===e?(i=0,v=1):(i=Po(i),v===e?(v=i,i=0):v=Po(v)),i>v){var H=i;i=v,v=H}if(E||i%1||v%1){var K=cb();return Fr(i+K*(v-i+bn("1e-"+((K+"").length-1))),v)}return Wd(i,v)}var sN=Aa(function(i,v,E){return v=v.toLowerCase(),i+(E?B0(v):v)});function B0(i){return gf(an(i).toLowerCase())}function j0(i){return i=an(i),i&&i.replace(Be,V).replace(Xi,"")}function aN(i,v,E){i=an(i),v=ki(v);var H=i.length;E=E===e?H:Ps(It(E),0,H);var K=E;return E-=v.length,E>=0&&i.slice(E,K)==v}function lN(i){return i=an(i),i&&Yr.test(i)?i.replace(Kr,Z):i}function cN(i){return i=an(i),i&&On.test(i)?i.replace(Lr,"\\$&"):i}var uN=Aa(function(i,v,E){return i+(E?"-":"")+v.toLowerCase()}),hN=Aa(function(i,v,E){return i+(E?" ":"")+v.toLowerCase()}),dN=Ub("toLowerCase");function fN(i,v,E){i=an(i),v=It(v);var H=v?Pt(i):0;if(!v||H>=v)return i;var K=(v-H)/2;return Zc(Fc(K),E)+i+Zc(Pc(K),E)}function pN(i,v,E){i=an(i),v=It(v);var H=v?Pt(i):0;return v&&H<v?i+Zc(v-H,E):i}function gN(i,v,E){i=an(i),v=It(v);var H=v?Pt(i):0;return v&&H<v?Zc(v-H,E)+i:i}function mN(i,v,E){return E||v==null?v=0:v&&(v=+v),kT(an(i).replace(yn,""),v||0)}function vN(i,v,E){return(E?Qr(i,v,E):v===e)?v=1:v=It(v),Bd(an(i),v)}function yN(){var i=arguments,v=an(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var bN=Aa(function(i,v,E){return i+(E?"_":"")+v.toLowerCase()});function wN(i,v,E){return E&&typeof E!="number"&&Qr(i,v,E)&&(v=E=e),E=E===e?he:E>>>0,E?(i=an(i),i&&(typeof v=="string"||v!=null&&!hf(v))&&(v=ki(v),!v&&ge(i))?ts(bt(i),0,E):i.split(v,E)):[]}var xN=Aa(function(i,v,E){return i+(E?" ":"")+gf(v)});function CN(i,v,E){return i=an(i),E=E==null?0:Ps(It(E),0,i.length),v=ki(v),i.slice(E,E+v.length)==v}function _N(i,v,E){var H=Q.templateSettings;E&&Qr(i,v,E)&&(v=e),i=an(i),v=df({},v,H,Zb);var K=df({},v.imports,H.imports,Zb),ne=vr(K),de=Tt(K,ne);ur(ne,function(gt){if(Or.test(gt))throw new ht(u)});var fe,we,Me=0,Le=v.interpolate||yt,Pe="__p += '",Je=ui((v.escape||yt).source+"|"+Le.source+"|"+(Le===_o?Jr:yt).source+"|"+(v.evaluate||yt).source+"|$","g"),at="//# sourceURL="+(sn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Is+"]")+`
1462
+ `;i.replace(Je,function(gt,Bt,qt,Si,ei,$i){return qt||(qt=Si),Pe+=i.slice(Me,$i).replace(gn,ie),Bt&&(fe=!0,Pe+=`' +
1463
+ __e(`+Bt+`) +
1464
+ '`),ei&&(we=!0,Pe+=`';
1465
+ `+ei+`;
1466
+ __p += '`),qt&&(Pe+=`' +
1467
+ ((__t = (`+qt+`)) == null ? '' : __t) +
1468
+ '`),Me=$i+gt.length,gt}),Pe+=`';
1469
+ `;var vt=sn.call(v,"variable")&&v.variable;if(!vt)Pe=`with (obj) {
1470
+ `+Pe+`
1471
+ }
1472
+ `;else if(Or.test(vt))throw new ht(w);Pe=(we?Pe.replace(yi,""):Pe).replace(bi,"$1").replace(Zn,"$1;"),Pe="function("+(vt||"obj")+`) {
1473
+ `+(vt?"":`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 Lt=U0(function(){return kt(ne,at+"return "+Pe).apply(e,de)});if(Lt.source=Pe,uf(Lt))throw Lt;return Lt}function kN(i){return an(i).toLowerCase()}function AN(i){return an(i).toUpperCase()}function SN(i,v,E){if(i=an(i),i&&(E||v===e))return Ct(i);if(!i||!(v=ki(v)))return i;var H=bt(i),K=bt(v),ne=Qn(H,K),de=hr(H,K)+1;return ts(H,ne,de).join("")}function $N(i,v,E){if(i=an(i),i&&(E||v===e))return i.slice(0,pt(i)+1);if(!i||!(v=ki(v)))return i;var H=bt(i),K=hr(H,bt(v))+1;return ts(H,0,K).join("")}function RN(i,v,E){if(i=an(i),i&&(E||v===e))return i.replace(yn,"");if(!i||!(v=ki(v)))return i;var H=bt(i),K=Qn(H,bt(v));return ts(H,K).join("")}function EN(i,v){var E=B,H=F;if(Pn(v)){var K="separator"in v?v.separator:K;E="length"in v?It(v.length):E,H="omission"in v?ki(v.omission):H}i=an(i);var ne=i.length;if(ge(i)){var de=bt(i);ne=de.length}if(E>=ne)return i;var fe=E-Pt(H);if(fe<1)return H;var we=de?ts(de,0,fe).join(""):i.slice(0,fe);if(K===e)return we+H;if(de&&(fe+=we.length-fe),hf(K)){if(i.slice(fe).search(K)){var Me,Le=we;for(K.global||(K=ui(K.source,an(Nt.exec(K))+"g")),K.lastIndex=0;Me=K.exec(Le);)var Pe=Me.index;we=we.slice(0,Pe===e?fe:Pe)}}else if(i.indexOf(ki(K),fe)!=fe){var Je=we.lastIndexOf(K);Je>-1&&(we=we.slice(0,Je))}return we+H}function TN(i){return i=an(i),i&&Cs.test(i)?i.replace(Yi,lt):i}var MN=Aa(function(i,v,E){return i+(E?" ":"")+v.toUpperCase()}),gf=Ub("toUpperCase");function H0(i,v,E){return i=an(i),v=E?e:v,v===e?ke(i)?er(i):X(i):i.match(v)||[]}var U0=zt(function(i,v){try{return rn(i,e,v)}catch(E){return uf(E)?E:new ht(E)}}),IN=Oo(function(i,v){return ur(v,function(E){E=to(E),vo(i,E,lf(i[E],i))}),i});function LN(i){var v=i==null?0:i.length,E=mt();return i=v?S(i,function(H){if(typeof H[1]!="function")throw new wn(g);return[E(H[0]),H[1]]}):[],zt(function(H){for(var K=-1;++K<v;){var ne=i[K];if(rn(ne[0],this,H))return rn(ne[1],this,H)}})}function ON(i){return sM(zi(i,c))}function mf(i){return function(){return i}}function NN(i,v){return i==null||i!==i?v:i}var DN=qb(),PN=qb(!0);function pi(i){return i}function vf(i){return Cb(typeof i=="function"?i:zi(i,c))}function FN(i){return kb(zi(i,c))}function zN(i,v){return Ab(i,zi(v,c))}var WN=zt(function(i,v){return function(E){return vl(E,i,v)}}),BN=zt(function(i,v){return function(E){return vl(i,E,v)}});function yf(i,v,E){var H=vr(v),K=Uc(v,H);E==null&&!(Pn(v)&&(K.length||!H.length))&&(E=v,v=i,i=this,K=Uc(v,vr(v)));var ne=!(Pn(E)&&"chain"in E)||!!E.chain,de=Do(i);return ur(K,function(fe){var we=v[fe];i[fe]=we,de&&(i.prototype[fe]=function(){var Me=this.__chain__;if(ne||Me){var Le=i(this.__wrapped__),Pe=Le.__actions__=hi(this.__actions__);return Pe.push({func:we,args:arguments,thisArg:i}),Le.__chain__=Me,Le}return we.apply(i,k([this.value()],arguments))})}),i}function jN(){return Dt._===this&&(Dt._=gT),this}function bf(){}function HN(i){return i=It(i),zt(function(v){return Sb(v,i)})}var UN=Kd(S),VN=Kd(mo),qN=Kd(j);function V0(i){return tf(i)?Oe(to(i)):_M(i)}function GN(i){return function(v){return i==null?e:Fs(i,v)}}var KN=Kb(),YN=Kb(!0);function wf(){return[]}function xf(){return!1}function JN(){return{}}function ZN(){return""}function XN(){return!0}function QN(i,v){if(i=It(i),i<1||i>G)return[];var E=he,H=Fr(i,he);v=mt(v),i-=he;for(var K=et(H,v);++E<i;)v(E);return K}function e2(i){return Rt(i)?S(i,to):Ai(i)?[i]:hi(u0(an(i)))}function t2(i){var v=++fT;return an(i)+v}var n2=Jc(function(i,v){return i+v},0),r2=Yd("ceil"),i2=Jc(function(i,v){return i/v},1),o2=Yd("floor");function s2(i){return i&&i.length?Hc(i,pi,Od):e}function a2(i,v){return i&&i.length?Hc(i,mt(v,2),Od):e}function l2(i){return xe(i,pi)}function c2(i,v){return xe(i,mt(v,2))}function u2(i){return i&&i.length?Hc(i,pi,Fd):e}function h2(i,v){return i&&i.length?Hc(i,mt(v,2),Fd):e}var d2=Jc(function(i,v){return i*v},1),f2=Yd("round"),p2=Jc(function(i,v){return i-v},0);function g2(i){return i&&i.length?Ze(i,pi):0}function m2(i,v){return i&&i.length?Ze(i,mt(v,2)):0}return Q.after=zL,Q.ary=x0,Q.assign=SO,Q.assignIn=N0,Q.assignInWith=D0,Q.assignWith=df,Q.at=$O,Q.before=C0,Q.bind=lf,Q.bindAll=IN,Q.bindKey=_0,Q.castArray=ZL,Q.chain=y0,Q.chunk=sI,Q.compact=aI,Q.concat=lI,Q.cond=LN,Q.conforms=ON,Q.constant=mf,Q.countBy=mL,Q.create=RO,Q.curry=k0,Q.curryRight=A0,Q.debounce=S0,Q.defaults=EO,Q.defaultsDeep=TO,Q.defer=WL,Q.delay=BL,Q.difference=cI,Q.differenceBy=uI,Q.differenceWith=hI,Q.drop=dI,Q.dropRight=fI,Q.dropRightWhile=pI,Q.dropWhile=gI,Q.fill=mI,Q.filter=yL,Q.flatMap=xL,Q.flatMapDeep=CL,Q.flatMapDepth=_L,Q.flatten=p0,Q.flattenDeep=vI,Q.flattenDepth=yI,Q.flip=jL,Q.flow=DN,Q.flowRight=PN,Q.fromPairs=bI,Q.functions=PO,Q.functionsIn=FO,Q.groupBy=kL,Q.initial=xI,Q.intersection=CI,Q.intersectionBy=_I,Q.intersectionWith=kI,Q.invert=WO,Q.invertBy=BO,Q.invokeMap=SL,Q.iteratee=vf,Q.keyBy=$L,Q.keys=vr,Q.keysIn=fi,Q.map=ru,Q.mapKeys=HO,Q.mapValues=UO,Q.matches=FN,Q.matchesProperty=zN,Q.memoize=ou,Q.merge=VO,Q.mergeWith=P0,Q.method=WN,Q.methodOf=BN,Q.mixin=yf,Q.negate=su,Q.nthArg=HN,Q.omit=qO,Q.omitBy=GO,Q.once=HL,Q.orderBy=RL,Q.over=UN,Q.overArgs=UL,Q.overEvery=VN,Q.overSome=qN,Q.partial=cf,Q.partialRight=$0,Q.partition=EL,Q.pick=KO,Q.pickBy=F0,Q.property=V0,Q.propertyOf=GN,Q.pull=RI,Q.pullAll=m0,Q.pullAllBy=EI,Q.pullAllWith=TI,Q.pullAt=MI,Q.range=KN,Q.rangeRight=YN,Q.rearg=VL,Q.reject=IL,Q.remove=II,Q.rest=qL,Q.reverse=sf,Q.sampleSize=OL,Q.set=JO,Q.setWith=ZO,Q.shuffle=NL,Q.slice=LI,Q.sortBy=FL,Q.sortedUniq=WI,Q.sortedUniqBy=BI,Q.split=wN,Q.spread=GL,Q.tail=jI,Q.take=HI,Q.takeRight=UI,Q.takeRightWhile=VI,Q.takeWhile=qI,Q.tap=aL,Q.throttle=KL,Q.thru=nu,Q.toArray=I0,Q.toPairs=z0,Q.toPairsIn=W0,Q.toPath=e2,Q.toPlainObject=O0,Q.transform=XO,Q.unary=YL,Q.union=GI,Q.unionBy=KI,Q.unionWith=YI,Q.uniq=JI,Q.uniqBy=ZI,Q.uniqWith=XI,Q.unset=QO,Q.unzip=af,Q.unzipWith=v0,Q.update=eN,Q.updateWith=tN,Q.values=Ra,Q.valuesIn=nN,Q.without=QI,Q.words=H0,Q.wrap=JL,Q.xor=eL,Q.xorBy=tL,Q.xorWith=nL,Q.zip=rL,Q.zipObject=iL,Q.zipObjectDeep=oL,Q.zipWith=sL,Q.entries=z0,Q.entriesIn=W0,Q.extend=N0,Q.extendWith=D0,yf(Q,Q),Q.add=n2,Q.attempt=U0,Q.camelCase=sN,Q.capitalize=B0,Q.ceil=r2,Q.clamp=rN,Q.clone=XL,Q.cloneDeep=eO,Q.cloneDeepWith=tO,Q.cloneWith=QL,Q.conformsTo=nO,Q.deburr=j0,Q.defaultTo=NN,Q.divide=i2,Q.endsWith=aN,Q.eq=no,Q.escape=lN,Q.escapeRegExp=cN,Q.every=vL,Q.find=bL,Q.findIndex=d0,Q.findKey=MO,Q.findLast=wL,Q.findLastIndex=f0,Q.findLastKey=IO,Q.floor=o2,Q.forEach=b0,Q.forEachRight=w0,Q.forIn=LO,Q.forInRight=OO,Q.forOwn=NO,Q.forOwnRight=DO,Q.get=ff,Q.gt=rO,Q.gte=iO,Q.has=zO,Q.hasIn=pf,Q.head=g0,Q.identity=pi,Q.includes=AL,Q.indexOf=wI,Q.inRange=iN,Q.invoke=jO,Q.isArguments=Bs,Q.isArray=Rt,Q.isArrayBuffer=oO,Q.isArrayLike=di,Q.isArrayLikeObject=qn,Q.isBoolean=sO,Q.isBuffer=ns,Q.isDate=aO,Q.isElement=lO,Q.isEmpty=cO,Q.isEqual=uO,Q.isEqualWith=hO,Q.isError=uf,Q.isFinite=dO,Q.isFunction=Do,Q.isInteger=R0,Q.isLength=au,Q.isMap=E0,Q.isMatch=fO,Q.isMatchWith=pO,Q.isNaN=gO,Q.isNative=mO,Q.isNil=yO,Q.isNull=vO,Q.isNumber=T0,Q.isObject=Pn,Q.isObjectLike=jn,Q.isPlainObject=_l,Q.isRegExp=hf,Q.isSafeInteger=bO,Q.isSet=M0,Q.isString=lu,Q.isSymbol=Ai,Q.isTypedArray=$a,Q.isUndefined=wO,Q.isWeakMap=xO,Q.isWeakSet=CO,Q.join=AI,Q.kebabCase=uN,Q.last=Bi,Q.lastIndexOf=SI,Q.lowerCase=hN,Q.lowerFirst=dN,Q.lt=_O,Q.lte=kO,Q.max=s2,Q.maxBy=a2,Q.mean=l2,Q.meanBy=c2,Q.min=u2,Q.minBy=h2,Q.stubArray=wf,Q.stubFalse=xf,Q.stubObject=JN,Q.stubString=ZN,Q.stubTrue=XN,Q.multiply=d2,Q.nth=$I,Q.noConflict=jN,Q.noop=bf,Q.now=iu,Q.pad=fN,Q.padEnd=pN,Q.padStart=gN,Q.parseInt=mN,Q.random=oN,Q.reduce=TL,Q.reduceRight=ML,Q.repeat=vN,Q.replace=yN,Q.result=YO,Q.round=f2,Q.runInContext=me,Q.sample=LL,Q.size=DL,Q.snakeCase=bN,Q.some=PL,Q.sortedIndex=OI,Q.sortedIndexBy=NI,Q.sortedIndexOf=DI,Q.sortedLastIndex=PI,Q.sortedLastIndexBy=FI,Q.sortedLastIndexOf=zI,Q.startCase=xN,Q.startsWith=CN,Q.subtract=p2,Q.sum=g2,Q.sumBy=m2,Q.template=_N,Q.times=QN,Q.toFinite=Po,Q.toInteger=It,Q.toLength=L0,Q.toLower=kN,Q.toNumber=ji,Q.toSafeInteger=AO,Q.toString=an,Q.toUpper=AN,Q.trim=SN,Q.trimEnd=$N,Q.trimStart=RN,Q.truncate=EN,Q.unescape=TN,Q.uniqueId=t2,Q.upperCase=MN,Q.upperFirst=gf,Q.each=b0,Q.eachRight=w0,Q.first=g0,yf(Q,(function(){var i={};return yo(Q,function(v,E){sn.call(Q.prototype,E)||(i[E]=v)}),i})(),{chain:!1}),Q.VERSION=r,ur(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){Q[i].placeholder=Q}),ur(["drop","take"],function(i,v){Ut.prototype[i]=function(E){E=E===e?1:dr(It(E),0);var H=this.__filtered__&&!v?new Ut(this):this.clone();return H.__filtered__?H.__takeCount__=Fr(E,H.__takeCount__):H.__views__.push({size:Fr(E,he),type:i+(H.__dir__<0?"Right":"")}),H},Ut.prototype[i+"Right"]=function(E){return this.reverse()[i](E).reverse()}}),ur(["filter","map","takeWhile"],function(i,v){var E=v+1,H=E==_||E==W;Ut.prototype[i]=function(K){var ne=this.clone();return ne.__iteratees__.push({iteratee:mt(K,3),type:E}),ne.__filtered__=ne.__filtered__||H,ne}}),ur(["head","last"],function(i,v){var E="take"+(v?"Right":"");Ut.prototype[i]=function(){return this[E](1).value()[0]}}),ur(["initial","tail"],function(i,v){var E="drop"+(v?"":"Right");Ut.prototype[i]=function(){return this.__filtered__?new Ut(this):this[E](1)}}),Ut.prototype.compact=function(){return this.filter(pi)},Ut.prototype.find=function(i){return this.filter(i).head()},Ut.prototype.findLast=function(i){return this.reverse().find(i)},Ut.prototype.invokeMap=zt(function(i,v){return typeof i=="function"?new Ut(this):this.map(function(E){return vl(E,i,v)})}),Ut.prototype.reject=function(i){return this.filter(su(mt(i)))},Ut.prototype.slice=function(i,v){i=It(i);var E=this;return E.__filtered__&&(i>0||v<0)?new Ut(E):(i<0?E=E.takeRight(-i):i&&(E=E.drop(i)),v!==e&&(v=It(v),E=v<0?E.dropRight(-v):E.take(v-i)),E)},Ut.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ut.prototype.toArray=function(){return this.take(he)},yo(Ut.prototype,function(i,v){var E=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),K=Q[H?"take"+(v=="last"?"Right":""):v],ne=H||/^find/.test(v);K&&(Q.prototype[v]=function(){var de=this.__wrapped__,fe=H?[1]:arguments,we=de instanceof Ut,Me=fe[0],Le=we||Rt(de),Pe=function(Bt){var qt=K.apply(Q,k([Bt],fe));return H&&Je?qt[0]:qt};Le&&E&&typeof Me=="function"&&Me.length!=1&&(we=Le=!1);var Je=this.__chain__,at=!!this.__actions__.length,vt=ne&&!Je,Lt=we&&!at;if(!ne&&Le){de=Lt?de:new Ut(this);var gt=i.apply(de,fe);return gt.__actions__.push({func:nu,args:[Pe],thisArg:e}),new Fi(gt,Je)}return vt&&Lt?i.apply(this,fe):(gt=this.thru(Pe),vt?H?gt.value()[0]:gt.value():gt)})}),ur(["pop","push","shift","sort","splice","unshift"],function(i){var v=Pi[i],E=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);Q.prototype[i]=function(){var K=arguments;if(H&&!this.__chain__){var ne=this.value();return v.apply(Rt(ne)?ne:[],K)}return this[E](function(de){return v.apply(Rt(de)?de:[],K)})}}),yo(Ut.prototype,function(i,v){var E=Q[v];if(E){var H=E.name+"";sn.call(Ca,H)||(Ca[H]=[]),Ca[H].push({name:v,func:E})}}),Ca[Yc(e,x).name]=[{name:"wrapper",func:e}],Ut.prototype.clone=MT,Ut.prototype.reverse=IT,Ut.prototype.value=LT,Q.prototype.at=lL,Q.prototype.chain=cL,Q.prototype.commit=uL,Q.prototype.next=hL,Q.prototype.plant=fL,Q.prototype.reverse=pL,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=gL,Q.prototype.first=Q.prototype.head,ul&&(Q.prototype[ul]=dL),Q}),un=on();Xn?((Xn.exports=un)._=un,Dr._=un):Dt._=un}).call(S_)})(ql,ql.exports)),ql.exports}var R_=$_();Tn("T",Vl(R_)).debounce(function(){this.rebuildDisplayText()},300);var kg={exports:{}},Ag;function E_(){return Ag||(Ag=1,(function(t,n){(function(){ace.require(["ace/mode/text"],function(e){t&&(t.exports=e)})})()})(kg)),kg.exports}E_();const T_=!0,tr="u-",M_="uplot",I_=tr+"hz",L_=tr+"vt",O_=tr+"title",N_=tr+"wrap",D_=tr+"under",P_=tr+"over",F_=tr+"axis",fs=tr+"off",z_=tr+"select",W_=tr+"cursor-x",B_=tr+"cursor-y",j_=tr+"cursor-pt",H_=tr+"legend",U_=tr+"live",V_=tr+"inline",q_=tr+"series",G_=tr+"marker",Sg=tr+"label",K_=tr+"value",Ha="width",Ua="height",Va="top",$g="bottom",Zs="left",zu="right",Wu="#000",Rg=Wu+"0",Bu="mousemove",Eg="mousedown",ju="mouseup",Tg="mouseenter",Mg="mouseleave",Ig="dblclick",Y_="resize",J_="scroll",Lg="change",Gl="dppxchange",Hu="--",Xs=typeof window<"u",Uu=Xs?document:null,Qs=Xs?window:null,Z_=Xs?navigator:null;let Qt,Kl;function Vu(){let t=devicePixelRatio;Qt!=t&&(Qt=t,Kl&&Ku(Lg,Kl,Vu),Kl=matchMedia(`(min-resolution: ${Qt-.001}dppx) and (max-resolution: ${Qt+.001}dppx)`),ps(Lg,Kl,Vu),Qs.dispatchEvent(new CustomEvent(Gl)))}function gi(t,n){if(n!=null){let e=t.classList;!e.contains(n)&&e.add(n)}}function qu(t,n){let e=t.classList;e.contains(n)&&e.remove(n)}function xn(t,n,e){t.style[n]=e+"px"}function Vi(t,n,e,r){let m=Uu.createElement(t);return n!=null&&gi(m,n),e?.insertBefore(m,r),m}function Ei(t,n){return Vi("div",t,n)}const Og=new WeakMap;function so(t,n,e,r,m){let f="translate("+n+"px,"+e+"px)",g=Og.get(t);f!=g&&(t.style.transform=f,Og.set(t,f),n<0||e<0||n>r||e>m?gi(t,fs):qu(t,fs))}const Ng=new WeakMap;function Dg(t,n,e){let r=n+e,m=Ng.get(t);r!=m&&(Ng.set(t,r),t.style.background=n,t.style.borderColor=e)}const Pg=new WeakMap;function Fg(t,n,e,r){let m=n+""+e,f=Pg.get(t);m!=f&&(Pg.set(t,m),t.style.height=e+"px",t.style.width=n+"px",t.style.marginLeft=r?-n/2+"px":0,t.style.marginTop=r?-e/2+"px":0)}const Gu={passive:!0},X_={...Gu,capture:!0};function ps(t,n,e,r){n.addEventListener(t,e,r?X_:Gu)}function Ku(t,n,e,r){n.removeEventListener(t,e,Gu)}Xs&&Vu();function qi(t,n,e,r){let m;e=e||0,r=r||n.length-1;let f=r<=2147483647;for(;r-e>1;)m=f?e+r>>1:vi((e+r)/2),n[m]<t?e=m:r=m;return t-n[e]<=n[r]-t?e:r}function zg(t){return(n,e,r)=>{let m=-1,f=-1;for(let g=e;g<=r;g++)if(t(n[g])){m=g;break}for(let g=r;g>=e;g--)if(t(n[g])){f=g;break}return[m,f]}}const Wg=t=>t!=null,Bg=t=>t!=null&&t>0,Yl=zg(Wg),Q_=zg(Bg);function ek(t,n,e,r=0,m=!1){let f=m?Q_:Yl,g=m?Bg:Wg;[n,e]=f(t,n,e);let w=t[n],u=t[n];if(n>-1)if(r==1)w=t[n],u=t[e];else if(r==-1)w=t[e],u=t[n];else for(let d=n;d<=e;d++){let a=t[d];g(a)&&(a<w?w=a:a>u&&(u=a))}return[w??hn,u??-hn]}function Jl(t,n,e,r){let m=Ug(t),f=Ug(n);t==n&&(m==-1?(t*=e,n/=e):(t/=e,n*=e));let g=e==10?xo:Vg,w=m==1?vi:Ti,u=f==1?Ti:vi,d=w(g(nr(t))),a=u(g(nr(n))),l=ea(e,d),c=ea(e,a);return e==10&&(d<0&&(l=dn(l,-d)),a<0&&(c=dn(c,-a))),r||e==2?(t=l*m,n=c*f):(t=Xg(t,l),n=Ql(n,c)),[t,n]}function Yu(t,n,e,r){let m=Jl(t,n,e,r);return t==0&&(m[0]=0),n==0&&(m[1]=0),m}const Ju=.1,jg={mode:3,pad:Ju},qa={pad:0,soft:null,mode:0},tk={min:qa,max:qa};function Zl(t,n,e,r){return ec(e)?Hg(t,n,e):(qa.pad=e,qa.soft=r?0:null,qa.mode=r?3:0,Hg(t,n,tk))}function Jt(t,n){return t??n}function nk(t,n,e){for(n=Jt(n,0),e=Jt(e,t.length-1);n<=e;){if(t[n]!=null)return!0;n++}return!1}function Hg(t,n,e){let r=e.min,m=e.max,f=Jt(r.pad,0),g=Jt(m.pad,0),w=Jt(r.hard,-hn),u=Jt(m.hard,hn),d=Jt(r.soft,hn),a=Jt(m.soft,-hn),l=Jt(r.mode,0),c=Jt(m.mode,0),h=n-t,o=xo(h),s=jr(nr(t),nr(n)),p=xo(s),b=nr(p-o);(h<1e-24||b>10)&&(h=0,(t==0||n==0)&&(h=1e-24,l==2&&d!=hn&&(f=0),c==2&&a!=-hn&&(g=0)));let x=h||s||1e3,M=xo(x),R=ea(10,vi(M)),A=x*(h==0?t==0?.1:1:f),C=dn(Xg(t-A,R/10),24),O=t>=d&&(l==1||l==3&&C<=d||l==2&&C>=d)?d:hn,D=jr(w,C<O&&t>=O?O:Gi(O,C)),I=x*(h==0?n==0?.1:1:g),T=dn(Ql(n+I,R/10),24),B=n<=a&&(c==1||c==3&&T>=a||c==2&&T<=a)?a:-hn,F=Gi(u,T>B&&n<=B?B:jr(B,T));return D==F&&D==0&&(F=100),[D,F]}const rk=new Intl.NumberFormat(Xs?Z_.language:"en-US"),Zu=t=>rk.format(t),mi=Math,Xl=mi.PI,nr=mi.abs,vi=mi.floor,rr=mi.round,Ti=mi.ceil,Gi=mi.min,jr=mi.max,ea=mi.pow,Ug=mi.sign,xo=mi.log10,Vg=mi.log2,ik=(t,n=1)=>mi.sinh(t)*n,Xu=(t,n=1)=>mi.asinh(t/n),hn=1/0;function qg(t){return(xo((t^t>>31)-(t>>31))|0)+1}function Qu(t,n,e){return Gi(jr(t,n),e)}function Gg(t){return typeof t=="function"}function jt(t){return Gg(t)?t:()=>t}const ok=()=>{},Kg=t=>t,Yg=(t,n)=>n,sk=t=>null,Jg=t=>!0,Zg=(t,n)=>t==n,ak=/\.\d*?(?=9{6,}|0{6,})/gm,gs=t=>{if(em(t)||jo.has(t))return t;const n=`${t}`,e=n.match(ak);if(e==null)return t;let r=e[0].length-1;if(n.indexOf("e-")!=-1){let[m,f]=n.split("e");return+`${gs(m)}e${f}`}return dn(t,r)};function ms(t,n){return gs(dn(gs(t/n))*n)}function Ql(t,n){return gs(Ti(gs(t/n))*n)}function Xg(t,n){return gs(vi(gs(t/n))*n)}function dn(t,n=0){if(em(t))return t;let e=10**n,r=t*e*(1+Number.EPSILON);return rr(r)/e}const jo=new Map;function Qg(t){return((""+t).split(".")[1]||"").length}function Ga(t,n,e,r){let m=[],f=r.map(Qg);for(let g=n;g<e;g++){let w=nr(g),u=dn(ea(t,g),w);for(let d=0;d<r.length;d++){let a=t==10?+`${r[d]}e${g}`:r[d]*u,l=(g>=0?0:w)+(g>=f[d]?0:f[d]),c=t==10?a:dn(a,l);m.push(c),jo.set(c,l)}}return m}const Ka={},eh=[],ta=[null,null],Ho=Array.isArray,em=Number.isInteger,lk=t=>t===void 0;function tm(t){return typeof t=="string"}function ec(t){let n=!1;if(t!=null){let e=t.constructor;n=e==null||e==Object}return n}function ck(t){return t!=null&&typeof t=="object"}const uk=Object.getPrototypeOf(Uint8Array),nm="__proto__";function na(t,n=ec){let e;if(Ho(t)){let r=t.find(m=>m!=null);if(Ho(r)||n(r)){e=Array(t.length);for(let m=0;m<t.length;m++)e[m]=na(t[m],n)}else e=t.slice()}else if(t instanceof uk)e=t.slice();else if(n(t)){e={};for(let r in t)r!=nm&&(e[r]=na(t[r],n))}else e=t;return e}function Kn(t){let n=arguments;for(let e=1;e<n.length;e++){let r=n[e];for(let m in r)m!=nm&&(ec(t[m])?Kn(t[m],na(r[m])):t[m]=na(r[m]))}return t}const hk=0,dk=1,fk=2;function pk(t,n,e){for(let r=0,m,f=-1;r<n.length;r++){let g=n[r];if(g>f){for(m=g-1;m>=0&&t[m]==null;)t[m--]=null;for(m=g+1;m<e&&t[m]==null;)t[f=m++]=null}}}function gk(t,n){if(yk(t)){let g=t[0].slice();for(let w=1;w<t.length;w++)g.push(...t[w].slice(1));return bk(g[0])||(g=vk(g)),g}let e=new Set;for(let g=0;g<t.length;g++){let w=t[g][0],u=w.length;for(let d=0;d<u;d++)e.add(w[d])}let r=[Array.from(e).sort((g,w)=>g-w)],m=r[0].length,f=new Map;for(let g=0;g<m;g++)f.set(r[0][g],g);for(let g=0;g<t.length;g++){let w=t[g],u=w[0];for(let d=1;d<w.length;d++){let a=w[d],l=Array(m).fill(void 0),c=n?n[g][d]:dk,h=[];for(let o=0;o<a.length;o++){let s=a[o],p=f.get(u[o]);s===null?c!=hk&&(l[p]=s,c==fk&&h.push(p)):l[p]=s}pk(l,h,m),r.push(l)}}return r}const mk=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function vk(t){let n=t[0],e=n.length,r=Array(e);for(let f=0;f<r.length;f++)r[f]=f;r.sort((f,g)=>n[f]-n[g]);let m=[];for(let f=0;f<t.length;f++){let g=t[f],w=Array(e);for(let u=0;u<e;u++)w[u]=g[r[u]];m.push(w)}return m}function yk(t){let n=t[0][0],e=n.length;for(let r=1;r<t.length;r++){let m=t[r][0];if(m.length!=e)return!1;if(m!=n){for(let f=0;f<e;f++)if(m[f]!=n[f])return!1}}return!0}function bk(t,n=100){const e=t.length;if(e<=1)return!0;let r=0,m=e-1;for(;r<=m&&t[r]==null;)r++;for(;m>=r&&t[m]==null;)m--;if(m<=r)return!0;const f=jr(1,vi((m-r+1)/n));for(let g=t[r],w=r+f;w<=m;w+=f){const u=t[w];if(u!=null){if(u<=g)return!1;g=u}}return!0}const rm=["January","February","March","April","May","June","July","August","September","October","November","December"],im=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function om(t){return t.slice(0,3)}const wk=im.map(om),xk=rm.map(om),Ck={MMMM:rm,MMM:xk,WWWW:im,WWW:wk};function Ya(t){return(t<10?"0":"")+t}function _k(t){return(t<10?"00":t<100?"0":"")+t}const kk={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,n)=>n.MMMM[t.getMonth()],MMM:(t,n)=>n.MMM[t.getMonth()],MM:t=>Ya(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ya(t.getDate()),D:t=>t.getDate(),WWWW:(t,n)=>n.WWWW[t.getDay()],WWW:(t,n)=>n.WWW[t.getDay()],HH:t=>Ya(t.getHours()),H:t=>t.getHours(),h:t=>{let n=t.getHours();return n==0?12:n>12?n-12:n},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ya(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ya(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>_k(t.getMilliseconds())};function th(t,n){n=n||Ck;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(t);)e.push(m[0][0]=="{"?kk[m[1]]:m[0]);return f=>{let g="";for(let w=0;w<e.length;w++)g+=typeof e[w]=="string"?e[w]:e[w](f,n);return g}}const Ak=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Sk(t,n){let e;return n=="UTC"||n=="Etc/UTC"?e=new Date(+t+t.getTimezoneOffset()*6e4):n==Ak?e=t:(e=new Date(t.toLocaleString("en-US",{timeZone:n})),e.setMilliseconds(t.getMilliseconds())),e}const sm=t=>t%1==0,tc=[1,2,2.5,5],$k=Ga(10,-32,0,tc),am=Ga(10,0,32,tc),Rk=am.filter(sm),vs=$k.concat(am),nh=`
1479
+ `,lm="{YYYY}",cm=nh+lm,um="{M}/{D}",Ja=nh+um,nc=Ja+"/{YY}",hm="{aa}",Ek="{h}:{mm}",ra=Ek+hm,dm=nh+ra,fm=":{ss}",tn=null;function pm(t){let n=t*1e3,e=n*60,r=e*60,m=r*24,f=m*30,g=m*365,w=(t==1?Ga(10,0,3,tc).filter(sm):Ga(10,-3,0,tc)).concat([n,n*5,n*10,n*15,n*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,m,m*2,m*3,m*4,m*5,m*6,m*7,m*8,m*9,m*10,m*15,f,f*2,f*3,f*4,f*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const u=[[g,lm,tn,tn,tn,tn,tn,tn,1],[m*28,"{MMM}",cm,tn,tn,tn,tn,tn,1],[m,um,cm,tn,tn,tn,tn,tn,1],[r,"{h}"+hm,nc,tn,Ja,tn,tn,tn,1],[e,ra,nc,tn,Ja,tn,tn,tn,1],[n,fm,nc+" "+ra,tn,Ja+" "+ra,tn,dm,tn,1],[t,fm+".{fff}",nc+" "+ra,tn,Ja+" "+ra,tn,dm,tn,1]];function d(a){return(l,c,h,o,s,p)=>{let b=[],x=s>=g,M=s>=f&&s<g,R=a(h),A=dn(R*t,3),C=rh(R.getFullYear(),x?0:R.getMonth(),M||x?1:R.getDate()),O=dn(C*t,3);if(M||x){let D=M?s/f:0,I=x?s/g:0,T=A==O?A:dn(rh(C.getFullYear()+I,C.getMonth()+D,1)*t,3),B=new Date(rr(T/t)),F=B.getFullYear(),L=B.getMonth();for(let $=0;T<=o;$++){let _=rh(F+I*$,L+D*$,1),N=_-a(dn(_*t,3));T=dn((+_+N)*t,3),T<=o&&b.push(T)}}else{let D=s>=m?m:s,I=vi(h)-vi(A),T=O+I+Ql(A-O,D);b.push(T);let B=a(T),F=B.getHours()+B.getMinutes()/e+B.getSeconds()/r,L=s/r,$=l.axes[c]._space,_=p/$;for(;T=dn(T+s,t==1?0:3),!(T>o);)if(L>1){let N=vi(dn(F+L,6))%24,W=a(T).getHours()-N;W>1&&(W=-1),T-=W*r,F=(F+L)%24;let U=b[b.length-1];dn((T-U)/s,3)*_>=.7&&b.push(T)}else b.push(T)}return b}}return[w,u,d]}const[Tk,Mk,Ik]=pm(1),[Lk,Ok,Nk]=pm(.001);Ga(2,-53,53,[1]);function gm(t,n){return t.map(e=>e.map((r,m)=>m==0||m==8||r==null?r:n(m==1||e[8]==0?r:e[1]+r)))}function mm(t,n){return(e,r,m,f,g)=>{let w=n.find(o=>g>=o[0])||n[n.length-1],u,d,a,l,c,h;return r.map(o=>{let s=t(o),p=s.getFullYear(),b=s.getMonth(),x=s.getDate(),M=s.getHours(),R=s.getMinutes(),A=s.getSeconds(),C=p!=u&&w[2]||b!=d&&w[3]||x!=a&&w[4]||M!=l&&w[5]||R!=c&&w[6]||A!=h&&w[7]||w[1];return u=p,d=b,a=x,l=M,c=R,h=A,C(s)})}}function Dk(t,n){let e=th(n);return(r,m,f,g,w)=>m.map(u=>e(t(u)))}function rh(t,n,e){return new Date(t,n,e)}function vm(t,n){return n(t)}const Pk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function ym(t,n){return(e,r,m,f)=>f==null?Hu:n(t(r))}function Fk(t,n){let e=t.series[n];return e.width?e.stroke(t,n):e.points.width?e.points.stroke(t,n):null}function zk(t,n){return t.series[n].fill(t,n)}const Wk={show:!0,live:!0,isolate:!1,mount:ok,markers:{show:!0,width:2,stroke:Fk,fill:zk,dash:"solid"},idx:null,idxs:null,values:[]};function Bk(t,n){let e=t.cursor.points,r=Ei(),m=e.size(t,n);xn(r,Ha,m),xn(r,Ua,m);let f=m/-2;xn(r,"marginLeft",f),xn(r,"marginTop",f);let g=e.width(t,n,m);return g&&xn(r,"borderWidth",g),r}function jk(t,n){let e=t.series[n].points;return e._fill||e._stroke}function Hk(t,n){let e=t.series[n].points;return e._stroke||e._fill}function Uk(t,n){return t.series[n].points.size}const ih=[0,0];function Vk(t,n,e){return ih[0]=n,ih[1]=e,ih}function rc(t,n,e,r=!0){return m=>{m.button==0&&(!r||m.target==n)&&e(m)}}function oh(t,n,e,r=!0){return m=>{(!r||m.target==n)&&e(m)}}const qk={show:!0,x:!0,y:!0,lock:!1,move:Vk,points:{one:!1,show:Bk,size:Uk,width:0,stroke:Hk,fill:jk},bind:{mousedown:rc,mouseup:rc,click:rc,dblclick:rc,mousemove:oh,mouseleave:oh,mouseenter:oh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,n,e,r,m)=>r-m,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},bm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},sh=Kn({},bm,{filter:Yg}),wm=Kn({},sh,{size:10}),xm=Kn({},bm,{show:!1}),ah='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"',Cm="bold "+ah,_m=1.5,km={show:!0,scale:"x",stroke:Wu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Cm,side:2,grid:sh,ticks:wm,border:xm,font:ah,lineGap:_m,rotate:0},Gk="Value",Kk="Time",Am={show:!0,scale:"x",auto:!1,sorted:1,min:hn,max:-hn,idxs:[]};function Yk(t,n,e,r,m){return n.map(f=>f==null?"":Zu(f))}function Jk(t,n,e,r,m,f,g){let w=[],u=jo.get(m)||0;e=g?e:dn(Ql(e,m),u);for(let d=e;d<=r;d=dn(d+m,u))w.push(Object.is(d,-0)?0:d);return w}function lh(t,n,e,r,m,f,g){const w=[],u=t.scales[t.axes[n].scale].log,d=u==10?xo:Vg,a=vi(d(e));m=ea(u,a),u==10&&(m=vs[qi(m,vs)]);let l=e,c=m*u;u==10&&(c=vs[qi(c,vs)]);do w.push(l),l=l+m,u==10&&!jo.has(l)&&(l=dn(l,jo.get(m))),l>=c&&(m=l,c=m*u,u==10&&(c=vs[qi(c,vs)]));while(l<=r);return w}function Zk(t,n,e,r,m,f,g){let w=t.scales[t.axes[n].scale].asinh,u=r>w?lh(t,n,jr(w,e),r,m):[w],d=r>=0&&e<=0?[0]:[];return(e<-w?lh(t,n,jr(w,-r),-e,m):[w]).reverse().map(a=>-a).concat(d,u)}const Sm=/./,Xk=/[12357]/,Qk=/[125]/,$m=/1/,ch=(t,n,e,r)=>t.map((m,f)=>n==4&&m==0||f%r==0&&e.test(m.toExponential()[m<0?1:0])?m:null);function eA(t,n,e,r,m){let f=t.axes[e],g=f.scale,w=t.scales[g],u=t.valToPos,d=f._space,a=u(10,g),l=u(9,g)-a>=d?Sm:u(7,g)-a>=d?Xk:u(5,g)-a>=d?Qk:$m;if(l==$m){let c=nr(u(1,g)-a);if(c<d)return ch(n.slice().reverse(),w.distr,l,Ti(d/c)).reverse()}return ch(n,w.distr,l,1)}function tA(t,n,e,r,m){let f=t.axes[e],g=f.scale,w=f._space,u=t.valToPos,d=nr(u(1,g)-u(2,g));return d<w?ch(n.slice().reverse(),3,Sm,Ti(w/d)).reverse():n}function nA(t,n,e,r){return r==null?Hu:n==null?"":Zu(n)}const Rm={show:!0,scale:"y",stroke:Wu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Cm,side:3,grid:sh,ticks:wm,border:xm,font:ah,lineGap:_m,rotate:0};function rA(t,n){let e=3+(t||1)*2;return dn(e*n,3)}function iA(t,n){let{scale:e,idxs:r}=t.series[0],m=t._data[0],f=t.valToPos(m[r[0]],e,!0),g=t.valToPos(m[r[1]],e,!0),w=nr(g-f),u=t.series[n],d=w/(u.points.space*Qt);return r[1]-r[0]<=d}const Em={scale:null,auto:!0,sorted:0,min:hn,max:-hn},Tm=(t,n,e,r,m)=>m,Mm={show:!0,auto:!0,sorted:0,gaps:Tm,alpha:1,facets:[Kn({},Em,{scale:"x"}),Kn({},Em,{scale:"y"})]},Im={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Tm,alpha:1,points:{show:iA,filter:null},values:null,min:hn,max:-hn,idxs:[],path:null,clip:null};function oA(t,n,e,r,m){return e/10}const Lm={time:T_,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},sA=Kn({},Lm,{time:!1,ori:1}),Om={};function Nm(t,n){let e=Om[t];return e||(e={key:t,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(m=>m!=r)},pub(r,m,f,g,w,u,d){for(let a=0;a<e.plots.length;a++)e.plots[a]!=m&&e.plots[a].pub(r,m,f,g,w,u,d)}},t!=null&&(Om[t]=e)),e}const ia=1,uh=2;function ys(t,n,e){const r=t.mode,m=t.series[n],f=r==2?t._data[n]:t._data,g=t.scales,w=t.bbox;let u=f[0],d=r==2?f[1]:f[n],a=r==2?g[m.facets[0].scale]:g[t.series[0].scale],l=r==2?g[m.facets[1].scale]:g[m.scale],c=w.left,h=w.top,o=w.width,s=w.height,p=t.valToPosH,b=t.valToPosV;return a.ori==0?e(m,u,d,a,l,p,b,c,h,o,s,oc,oa,ac,Fm,Wm):e(m,u,d,a,l,b,p,h,c,s,o,sc,sa,fh,zm,Bm)}function hh(t,n){let e=0,r=0,m=Jt(t.bands,eh);for(let f=0;f<m.length;f++){let g=m[f];g.series[0]==n?e=g.dir:g.series[1]==n&&(g.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function aA(t,n,e,r,m){let f=t.mode,g=t.series[n],w=f==2?g.facets[1].scale:g.scale,u=t.scales[w];return m==-1?u.min:m==1?u.max:u.distr==3?u.dir==1?u.min:u.max:0}function Co(t,n,e,r,m,f){return ys(t,n,(g,w,u,d,a,l,c,h,o,s,p)=>{let b=g.pxRound;const x=d.dir*(d.ori==0?1:-1),M=d.ori==0?oa:sa;let R,A;x==1?(R=e,A=r):(R=r,A=e);let C=b(l(w[R],d,s,h)),O=b(c(u[R],a,p,o)),D=b(l(w[A],d,s,h)),I=b(c(f==1?a.max:a.min,a,p,o)),T=new Path2D(m);return M(T,D,I),M(T,C,I),M(T,C,O),T})}function ic(t,n,e,r,m,f){let g=null;if(t.length>0){g=new Path2D;const w=n==0?ac:fh;let u=e;for(let l=0;l<t.length;l++){let c=t[l];if(c[1]>c[0]){let h=c[0]-u;h>0&&w(g,u,r,h,r+f),u=c[1]}}let d=e+m-u,a=10;d>0&&w(g,u,r-a/2,d,r+f+a)}return g}function lA(t,n,e){let r=t[t.length-1];r&&r[0]==n?r[1]=e:t.push([n,e])}function dh(t,n,e,r,m,f,g){let w=[],u=t.length;for(let d=m==1?e:r;d>=e&&d<=r;d+=m)if(n[d]===null){let a=d,l=d;if(m==1)for(;++d<=r&&n[d]===null;)l=d;else for(;--d>=e&&n[d]===null;)l=d;let c=f(t[a]),h=l==a?c:f(t[l]),o=a-m;c=g<=0&&o>=0&&o<u?f(t[o]):c;let s=l+m;h=g>=0&&s>=0&&s<u?f(t[s]):h,h>=c&&w.push([c,h])}return w}function Dm(t){return t==0?Kg:t==1?rr:n=>ms(n,t)}function Pm(t){let n=t==0?oc:sc,e=t==0?(m,f,g,w,u,d)=>{m.arcTo(f,g,w,u,d)}:(m,f,g,w,u,d)=>{m.arcTo(g,f,u,w,d)},r=t==0?(m,f,g,w,u)=>{m.rect(f,g,w,u)}:(m,f,g,w,u)=>{m.rect(g,f,u,w)};return(m,f,g,w,u,d=0,a=0)=>{d==0&&a==0?r(m,f,g,w,u):(d=Gi(d,w/2,u/2),a=Gi(a,w/2,u/2),n(m,f+d,g),e(m,f+w,g,f+w,g+u,d),e(m,f+w,g+u,f,g+u,a),e(m,f,g+u,f,g,a),e(m,f,g,f+w,g,d),m.closePath())}}const oc=(t,n,e)=>{t.moveTo(n,e)},sc=(t,n,e)=>{t.moveTo(e,n)},oa=(t,n,e)=>{t.lineTo(n,e)},sa=(t,n,e)=>{t.lineTo(e,n)},ac=Pm(0),fh=Pm(1),Fm=(t,n,e,r,m,f)=>{t.arc(n,e,r,m,f)},zm=(t,n,e,r,m,f)=>{t.arc(e,n,r,m,f)},Wm=(t,n,e,r,m,f,g)=>{t.bezierCurveTo(n,e,r,m,f,g)},Bm=(t,n,e,r,m,f,g)=>{t.bezierCurveTo(e,n,m,r,g,f)};function jm(t){return(n,e,r,m,f)=>ys(n,e,(g,w,u,d,a,l,c,h,o,s,p)=>{let{pxRound:b,points:x}=g,M,R;d.ori==0?(M=oc,R=Fm):(M=sc,R=zm);const A=dn(x.width*Qt,3);let C=(x.size-x.width)/2*Qt,O=dn(C*2,3),D=new Path2D,I=new Path2D,{left:T,top:B,width:F,height:L}=n.bbox;ac(I,T-O,B-O,F+O*2,L+O*2);const $=_=>{if(u[_]!=null){let N=b(l(w[_],d,s,h)),W=b(c(u[_],a,p,o));M(D,N+C,W),R(D,N,W,C,0,Xl*2)}};if(f)f.forEach($);else for(let _=r;_<=m;_++)$(_);return{stroke:A>0?D:null,fill:D,clip:I,flags:ia|uh}})}function Hm(t){return(n,e,r,m,f,g)=>{r!=m&&(f!=r&&g!=r&&t(n,e,r),f!=m&&g!=m&&t(n,e,m),t(n,e,g))}}const cA=Hm(oa),uA=Hm(sa);function Um(t){const n=Jt(t?.alignGaps,0);return(e,r,m,f)=>ys(e,r,(g,w,u,d,a,l,c,h,o,s,p)=>{[m,f]=Yl(u,m,f);let b=g.pxRound,x=F=>b(l(F,d,s,h)),M=F=>b(c(F,a,p,o)),R,A;d.ori==0?(R=oa,A=cA):(R=sa,A=uA);const C=d.dir*(d.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ia},D=O.stroke;let I=!1;if(f-m>=s*4){let F=he=>e.posToVal(he,d.key,!0),L=null,$=null,_,N,W,U=x(w[C==1?m:f]),G=x(w[m]),J=x(w[f]),te=F(C==1?G+1:J-1);for(let he=C==1?m:f;he>=m&&he<=f;he+=C){let ee=w[he],le=(C==1?ee<te:ee>te)?U:x(ee),se=u[he];le==U?se!=null?(N=se,L==null?(R(D,le,M(N)),_=L=$=N):N<L?L=N:N>$&&($=N)):se===null&&(I=!0):(L!=null&&A(D,U,M(L),M($),M(_),M(N)),se!=null?(N=se,R(D,le,M(N)),L=$=_=N):(L=$=null,se===null&&(I=!0)),U=le,te=F(U+C))}L!=null&&L!=$&&W!=U&&A(D,U,M(L),M($),M(_),M(N))}else for(let F=C==1?m:f;F>=m&&F<=f;F+=C){let L=u[F];L===null?I=!0:L!=null&&R(D,x(w[F]),M(L))}let[T,B]=hh(e,r);if(g.fill!=null||T!=0){let F=O.fill=new Path2D(D),L=g.fillTo(e,r,g.min,g.max,T),$=M(L),_=x(w[m]),N=x(w[f]);C==-1&&([N,_]=[_,N]),R(F,N,$),R(F,_,$)}if(!g.spanGaps){let F=[];I&&F.push(...dh(w,u,m,f,C,x,n)),O.gaps=F=g.gaps(e,r,m,f,F),O.clip=ic(F,d.ori,h,o,s,p)}return B!=0&&(O.band=B==2?[Co(e,r,m,f,D,-1),Co(e,r,m,f,D,1)]:Co(e,r,m,f,D,B)),O})}function hA(t){const n=Jt(t.align,1),e=Jt(t.ascDesc,!1),r=Jt(t.alignGaps,0),m=Jt(t.extend,!1);return(f,g,w,u)=>ys(f,g,(d,a,l,c,h,o,s,p,b,x,M)=>{[w,u]=Yl(l,w,u);let R=d.pxRound,{left:A,width:C}=f.bbox,O=J=>R(o(J,c,x,p)),D=J=>R(s(J,h,M,b)),I=c.ori==0?oa:sa;const T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ia},B=T.stroke,F=c.dir*(c.ori==0?1:-1);let L=D(l[F==1?w:u]),$=O(a[F==1?w:u]),_=$,N=$;m&&n==-1&&(N=A,I(B,N,L)),I(B,$,L);for(let J=F==1?w:u;J>=w&&J<=u;J+=F){let te=l[J];if(te==null)continue;let he=O(a[J]),ee=D(te);n==1?I(B,he,L):I(B,_,ee),I(B,he,ee),L=ee,_=he}let W=_;m&&n==1&&(W=A+C,I(B,W,L));let[U,G]=hh(f,g);if(d.fill!=null||U!=0){let J=T.fill=new Path2D(B),te=d.fillTo(f,g,d.min,d.max,U),he=D(te);I(J,W,he),I(J,N,he)}if(!d.spanGaps){let J=[];J.push(...dh(a,l,w,u,F,O,r));let te=d.width*Qt/2,he=e||n==1?te:-te,ee=e||n==-1?-te:te;J.forEach(le=>{le[0]+=he,le[1]+=ee}),T.gaps=J=d.gaps(f,g,w,u,J),T.clip=ic(J,c.ori,p,b,x,M)}return G!=0&&(T.band=G==2?[Co(f,g,w,u,B,-1),Co(f,g,w,u,B,1)]:Co(f,g,w,u,B,G)),T})}function Vm(t,n,e,r,m,f,g=hn){if(t.length>1){let w=null;for(let u=0,d=1/0;u<t.length;u++)if(n[u]!==void 0){if(w!=null){let a=nr(t[u]-t[w]);a<d&&(d=a,g=nr(e(t[u],r,m,f)-e(t[w],r,m,f)))}w=u}}return g}function dA(t){t=t||Ka;const n=Jt(t.size,[.6,hn,1]),e=t.align||0,r=t.gap||0;let m=t.radius;m=m==null?[0,0]:typeof m=="number"?[m,0]:m;const f=jt(m),g=1-n[0],w=Jt(n[1],hn),u=Jt(n[2],1),d=Jt(t.disp,Ka),a=Jt(t.each,h=>{}),{fill:l,stroke:c}=d;return(h,o,s,p)=>ys(h,o,(b,x,M,R,A,C,O,D,I,T,B)=>{let F=b.pxRound,L=e,$=r*Qt,_=w*Qt,N=u*Qt,W,U;R.ori==0?[W,U]=f(h,o):[U,W]=f(h,o);const G=R.dir*(R.ori==0?1:-1);let J=R.ori==0?ac:fh,te=R.ori==0?a:(Ke,$t,Zt,In,Un,sr,pn)=>{a(Ke,$t,Zt,Un,In,pn,sr)},he=Jt(h.bands,eh).find(Ke=>Ke.series[0]==o),ee=he!=null?he.dir:0,le=b.fillTo(h,o,b.min,b.max,ee),se=F(O(le,A,B,I)),ce,pe,ve,$e=T,Ee=F(b.width*Qt),qe=!1,He=null,tt=null,Xe=null,it=null;l!=null&&(Ee==0||c!=null)&&(qe=!0,He=l.values(h,o,s,p),tt=new Map,new Set(He).forEach(Ke=>{Ke!=null&&tt.set(Ke,new Path2D)}),Ee>0&&(Xe=c.values(h,o,s,p),it=new Map,new Set(Xe).forEach(Ke=>{Ke!=null&&it.set(Ke,new Path2D)})));let{x0:Wt,size:br}=d;if(Wt!=null&&br!=null){L=1,x=Wt.values(h,o,s,p),Wt.unit==2&&(x=x.map($t=>h.posToVal(D+$t*T,R.key,!0)));let Ke=br.values(h,o,s,p);br.unit==2?pe=Ke[0]*T:pe=C(Ke[0],R,T,D)-C(0,R,T,D),$e=Vm(x,M,C,R,T,D,$e),ve=$e-pe+$}else $e=Vm(x,M,C,R,T,D,$e),ve=$e*g+$,pe=$e-ve;ve<1&&(ve=0),Ee>=pe/2&&(Ee=0),ve<5&&(F=Kg);let At=ve>0,ir=$e-ve-(At?Ee:0);pe=F(Qu(ir,N,_)),ce=(L==0?pe/2:L==G?0:pe)-L*G*((L==0?$/2:0)+(At?Ee/2:0));const An={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},wr=qe?null:new Path2D;let fn=null;if(he!=null)fn=h.data[he.series[1]];else{let{y0:Ke,y1:$t}=d;Ke!=null&&$t!=null&&(M=$t.values(h,o,s,p),fn=Ke.values(h,o,s,p))}let or=W*pe,ft=U*pe;for(let Ke=G==1?s:p;Ke>=s&&Ke<=p;Ke+=G){let $t=M[Ke];if($t==null)continue;if(fn!=null){let Gt=fn[Ke]??0;if($t-Gt==0)continue;se=O(Gt,A,B,I)}let Zt=R.distr!=2||d!=null?x[Ke]:Ke,In=C(Zt,R,T,D),Un=O(Jt($t,le),A,B,I),sr=F(In-ce),pn=F(jr(Un,se)),zn=F(Gi(Un,se)),Ln=pn-zn;if($t!=null){let Gt=$t<0?ft:or,nn=$t<0?or:ft;qe?(Ee>0&&Xe[Ke]!=null&&J(it.get(Xe[Ke]),sr,zn+vi(Ee/2),pe,jr(0,Ln-Ee),Gt,nn),He[Ke]!=null&&J(tt.get(He[Ke]),sr,zn+vi(Ee/2),pe,jr(0,Ln-Ee),Gt,nn)):J(wr,sr,zn+vi(Ee/2),pe,jr(0,Ln-Ee),Gt,nn),te(h,o,Ke,sr-Ee/2,zn,pe+Ee,Ln)}}return Ee>0?An.stroke=qe?it:wr:qe||(An._fill=b.width==0?b._fill:b._stroke??b._fill,An.width=0),An.fill=qe?tt:wr,An})}function fA(t,n){const e=Jt(n?.alignGaps,0);return(r,m,f,g)=>ys(r,m,(w,u,d,a,l,c,h,o,s,p,b)=>{[f,g]=Yl(d,f,g);let x=w.pxRound,M=W=>x(c(W,a,p,o)),R=W=>x(h(W,l,b,s)),A,C,O;a.ori==0?(A=oc,O=oa,C=Wm):(A=sc,O=sa,C=Bm);const D=a.dir*(a.ori==0?1:-1);let I=M(u[D==1?f:g]),T=I,B=[],F=[];for(let W=D==1?f:g;W>=f&&W<=g;W+=D)if(d[W]!=null){let U=u[W],G=M(U);B.push(T=G),F.push(R(d[W]))}const L={stroke:t(B,F,A,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:ia},$=L.stroke;let[_,N]=hh(r,m);if(w.fill!=null||_!=0){let W=L.fill=new Path2D($),U=w.fillTo(r,m,w.min,w.max,_),G=R(U);O(W,T,G),O(W,I,G)}if(!w.spanGaps){let W=[];W.push(...dh(u,d,f,g,D,M,e)),L.gaps=W=w.gaps(r,m,f,g,W),L.clip=ic(W,a.ori,o,s,p,b)}return N!=0&&(L.band=N==2?[Co(r,m,f,g,$,-1),Co(r,m,f,g,$,1)]:Co(r,m,f,g,$,N)),L})}function pA(t){return fA(gA,t)}function gA(t,n,e,r,m,f){const g=t.length;if(g<2)return null;const w=new Path2D;if(e(w,t[0],n[0]),g==2)r(w,t[1],n[1]);else{let u=Array(g),d=Array(g-1),a=Array(g-1),l=Array(g-1);for(let c=0;c<g-1;c++)a[c]=n[c+1]-n[c],l[c]=t[c+1]-t[c],d[c]=a[c]/l[c];u[0]=d[0];for(let c=1;c<g-1;c++)d[c]===0||d[c-1]===0||d[c-1]>0!=d[c]>0?u[c]=0:(u[c]=3*(l[c-1]+l[c])/((2*l[c]+l[c-1])/d[c-1]+(l[c]+2*l[c-1])/d[c]),isFinite(u[c])||(u[c]=0));u[g-1]=d[g-2];for(let c=0;c<g-1;c++)m(w,t[c]+l[c]/3,n[c]+u[c]*l[c]/3,t[c+1]-l[c]/3,n[c+1]-u[c+1]*l[c]/3,t[c+1],n[c+1])}return w}const ph=new Set;function qm(){for(let t of ph)t.syncRect(!0)}Xs&&(ps(Y_,Qs,qm),ps(J_,Qs,qm,!0),ps(Gl,Qs,()=>{Tr.pxRatio=Qt}));const mA=Um(),vA=jm();function Gm(t,n,e,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((m,f)=>gh(m,f,n,e))}function yA(t,n){return t.map((e,r)=>r==0?{}:Kn({},n,e))}function gh(t,n,e,r){return Kn({},n==0?e:r,t)}function Km(t,n,e){return n==null?ta:[n,e]}const bA=Km;function wA(t,n,e){return n==null?ta:Zl(n,e,Ju,!0)}function Ym(t,n,e,r){return n==null?ta:Jl(n,e,t.scales[r].log,!1)}const xA=Ym;function Jm(t,n,e,r){return n==null?ta:Yu(n,e,t.scales[r].log,!1)}const CA=Jm;function _A(t,n,e,r,m){let f=jr(qg(t),qg(n)),g=n-t,w=qi(m/r*g,e);do{let u=e[w],d=r*u/g;if(d>=m&&f+(u<5?jo.get(u):0)<=17)return[u,d]}while(++w<e.length);return[0,0]}function Zm(t){let n,e;return t=t.replace(/(\d+)px/,(r,m)=>(n=rr((e=+m)*Qt))+"px"),[t,n,e]}function kA(t){t.show&&[t.font,t.labelFont].forEach(n=>{let e=dn(n[2]*Qt,1);n[0]=n[0].replace(/[0-9.]+px/,e+"px"),n[1]=e})}function Tr(t,n,e){const r={mode:Jt(t.mode,1)},m=r.mode;function f(V,Z,ie,ae){let ge=Z.valToPct(V);return ae+ie*(Z.dir==-1?1-ge:ge)}function g(V,Z,ie,ae){let ge=Z.valToPct(V);return ae+ie*(Z.dir==-1?ge:1-ge)}function w(V,Z,ie,ae){return Z.ori==0?f(V,Z,ie,ae):g(V,Z,ie,ae)}r.valToPosH=f,r.valToPosV=g;let u=!1;r.status=0;const d=r.root=Ei(M_);if(t.id!=null&&(d.id=t.id),gi(d,t.class),t.title){let V=Ei(O_,d);V.textContent=t.title}const a=Vi("canvas"),l=r.ctx=a.getContext("2d"),c=Ei(N_,d);ps("click",c,V=>{V.target===o&&(ct!=Li||Ht!=go)&&Wn.click(r,V)},!0);const h=r.under=Ei(D_,c);c.appendChild(a);const o=r.over=Ei(P_,c);t=na(t);const s=+Jt(t.pxAlign,1),p=Dm(s);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const b=t.ms||.001,x=r.series=m==1?Gm(t.series||[],Am,Im,!1):yA(t.series||[null],Mm),M=r.axes=Gm(t.axes||[],km,Rm,!0),R=r.scales={},A=r.bands=t.bands||[];A.forEach(V=>{V.fill=jt(V.fill||null),V.dir=Jt(V.dir,-1)});const C=m==2?x[1].facets[0].scale:x[0].scale,O={axes:Ko,series:Rs},D=(t.drawOrder||["axes","series"]).map(V=>O[V]);function I(V){const Z=V.distr==3?ie=>xo(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Xu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let ae=Z(ie),{_min:ge,_max:ke}=V,Te=ke-ge;return(ae-ge)/Te}}function T(V){let Z=R[V];if(Z==null){let ie=(t.scales||Ka)[V]||Ka;if(ie.from!=null){T(ie.from);let ae=Kn({},R[ie.from],ie,{key:V});ae.valToPct=I(ae),R[V]=ae}else{Z=R[V]=Kn({},V==C?Lm:sA,ie),Z.key=V;let ae=Z.time,ge=Z.range,ke=Ho(ge);if((V!=C||m==2&&!ae)&&(ke&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?jg:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?jg:{mode:1,hard:ge[1],soft:ge[1]}},ke=!1),!ke&&ec(ge))){let Te=ge;ge=(Fe,We,Ue)=>We==null?ta:Zl(We,Ue,Te)}Z.range=jt(ge||(ae?bA:V==C?Z.distr==3?xA:Z.distr==4?CA:Km:Z.distr==3?Ym:Z.distr==4?Jm:wA)),Z.auto=jt(ke?!1:Z.auto),Z.clamp=jt(Z.clamp||oA),Z._min=Z._max=null,Z.valToPct=I(Z)}}}T("x"),T("y"),m==1&&x.forEach(V=>{T(V.scale)}),M.forEach(V=>{T(V.scale)});for(let V in t.scales)T(V);const B=R[C],F=B.distr;let L,$;B.ori==0?(gi(d,I_),L=f,$=g):(gi(d,L_),L=g,$=f);const _={};for(let V in R){let Z=R[V];(Z.min!=null||Z.max!=null)&&(_[V]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const N=t.tzDate||(V=>new Date(rr(V/b))),W=t.fmtDate||th,U=b==1?Ik(N):Nk(N),G=mm(N,gm(b==1?Mk:Ok,W)),J=ym(N,vm(Pk,W)),te=[],he=r.legend=Kn({},Wk,t.legend),ee=r.cursor=Kn({},qk,{drag:{y:m==2}},t.cursor),le=he.show,se=ee.show,ce=he.markers;he.idxs=te,ce.width=jt(ce.width),ce.dash=jt(ce.dash),ce.stroke=jt(ce.stroke),ce.fill=jt(ce.fill);let pe,ve,$e,Ee=[],qe=[],He,tt=!1,Xe={};if(he.live){const V=x[1]?x[1].values:null;tt=V!=null,He=tt?V(r,1,0):{_:0};for(let Z in He)Xe[Z]=Hu}if(le)if(pe=Vi("table",H_,d),$e=Vi("tbody",null,pe),he.mount(r,pe),tt){ve=Vi("thead",null,pe,$e);let V=Vi("tr",null,ve);Vi("th",null,V);for(var it in He)Vi("th",Sg,V).textContent=it}else gi(pe,V_),he.live&&gi(pe,U_);const Wt={show:!0},br={show:!1};function At(V,Z){if(Z==0&&(tt||!he.live||m==2))return ta;let ie=[],ae=Vi("tr",q_,$e,$e.childNodes[Z]);gi(ae,V.class),V.show||gi(ae,fs);let ge=Vi("th",null,ae);if(ce.show){let Fe=Ei(G_,ge);if(Z>0){let We=ce.width(r,Z);We&&(Fe.style.border=We+"px "+ce.dash(r,Z)+" "+ce.stroke(r,Z)),Fe.style.background=ce.fill(r,Z)}}let ke=Ei(Sg,ge);V.label instanceof HTMLElement?ke.appendChild(V.label):ke.textContent=V.label,Z>0&&(ce.show||(ke.style.color=V.width>0?ce.stroke(r,Z):ce.fill(r,Z)),An("click",ge,Fe=>{if(ee._lock)return;si(Fe);let We=x.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ue=x.some((Ye,Qe)=>Qe>0&&Qe!=We&&Ye.show);x.forEach((Ye,Qe)=>{Qe>0&&Xn(Qe,Ue?Qe==We?Wt:br:Wt,!0,Ct.setSeries)})}else Xn(We,{show:!V.show},!0,Ct.setSeries)},!1),Lr&&An(Tg,ge,Fe=>{ee._lock||(si(Fe),Xn(x.indexOf(V),Di,!0,Ct.setSeries))},!1));for(var Te in He){let Fe=Vi("td",K_,ae);Fe.textContent="--",ie.push(Fe)}return[ae,ie]}const ir=new Map;function An(V,Z,ie,ae=!0){const ge=ir.get(Z)||{},ke=ee.bind[V](r,Z,ie,ae);ke&&(ps(V,Z,ge[V]=ke),ir.set(Z,ge))}function wr(V,Z,ie){const ae=ir.get(Z)||{};for(let ge in ae)(V==null||ge==V)&&(Ku(ge,Z,ae[ge]),delete ae[ge]);V==null&&ir.delete(Z)}let fn=0,or=0,ft=0,Ke=0,$t=0,Zt=0,In=$t,Un=Zt,sr=ft,pn=Ke,zn=0,Ln=0,Gt=0,nn=0;r.bbox={};let Ir=!1,Gr=!1,xr=!1,yi=!1,bi=!1,Zn=!1;function Yi(V,Z,ie){(ie||V!=r.width||Z!=r.height)&&Kr(V,Z),Zi(!1),xr=!0,Gr=!0,po()}function Kr(V,Z){r.width=fn=ft=V,r.height=or=Ke=Z,$t=Zt=0,wi(),_o();let ie=r.bbox;zn=ie.left=ms($t*Qt,.5),Ln=ie.top=ms(Zt*Qt,.5),Gt=ie.width=ms(ft*Qt,.5),nn=ie.height=ms(Ke*Qt,.5)}const Cs=3;function Yr(){let V=!1,Z=0;for(;!V;){Z++;let ie=ma(Z),ae=va(Z);V=Z==Cs||ie&&ae,V||(Kr(r.width,r.height),Gr=!0)}}function Cn({width:V,height:Z}){Yi(V,Z)}r.setSize=Cn;function wi(){let V=!1,Z=!1,ie=!1,ae=!1;M.forEach((ge,ke)=>{if(ge.show&&ge._show){let{side:Te,_size:Fe}=ge,We=Te%2,Ue=ge.label!=null?ge.labelSize:0,Ye=Fe+Ue;Ye>0&&(We?(ft-=Ye,Te==3?($t+=Ye,ae=!0):ie=!0):(Ke-=Ye,Te==0?(Zt+=Ye,V=!0):Z=!0))}}),li[0]=V,li[1]=ie,li[2]=Z,li[3]=ae,ft-=ar[1]+ar[3],$t+=ar[3],Ke-=ar[2]+ar[0],Zt+=ar[0]}function _o(){let V=$t+ft,Z=Zt+Ke,ie=$t,ae=Zt;function ge(ke,Te){switch(ke){case 1:return V+=Te,V-Te;case 2:return Z+=Te,Z-Te;case 3:return ie-=Te,ie+Te;case 0:return ae-=Te,ae+Te}}M.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(ee.dataIdx==null){let V=ee.hover,Z=V.skip=new Set(V.skip??[]);Z.add(void 0);let ie=V.prox=jt(V.prox),ae=V.bias??=0;ee.dataIdx=(ge,ke,Te,Fe)=>{if(ke==0)return Te;let We=Te,Ue=ie(ge,ke,Te,Fe)??hn,Ye=Ue>=0&&Ue<hn,Qe=B.ori==0?ft:Ke,xt=ee.left,Yt=n[0],Pt=n[ke];if(Z.has(Pt[Te])){We=null;let bt=null,pt=null,lt;if(ae==0||ae==-1)for(lt=Te;bt==null&&lt-- >0;)Z.has(Pt[lt])||(bt=lt);if(ae==0||ae==1)for(lt=Te;pt==null&&lt++<Pt.length;)Z.has(Pt[lt])||(pt=lt);if(bt!=null||pt!=null)if(Ye){let vn=bt==null?-1/0:L(Yt[bt],B,Qe,0),En=pt==null?1/0:L(Yt[pt],B,Qe,0),er=xt-vn,on=En-xt;er<=on?er<=Ue&&(We=bt):on<=Ue&&(We=pt)}else We=pt==null?bt:bt==null?pt:Te-bt<=pt-Te?bt:pt}else Ye&&nr(xt-L(Yt[Te],B,Qe,0))>Ue&&(We=null);return We}}const si=V=>{ee.event=V};ee.idxs=te,ee._lock=!1;let _n=ee.points;_n.show=jt(_n.show),_n.size=jt(_n.size),_n.stroke=jt(_n.stroke),_n.width=jt(_n.width),_n.fill=jt(_n.fill);const Cr=r.focus=Kn({},t.focus||{alpha:.3},ee.focus),Lr=Cr.prox>=0,On=Lr&&_n.one;let yn=[],pr=[],ai=[];function ao(V,Z){let ie=_n.show(r,Z);if(ie instanceof HTMLElement)return gi(ie,j_),gi(ie,V.class),so(ie,-10,-10,ft,Ke),o.insertBefore(ie,yn[Z]),ie}function lo(V,Z){if(m==1||Z>0){let ie=m==1&&R[V.scale].time,ae=V.value;V.value=ie?tm(ae)?ym(N,vm(ae,W)):ae||J:ae||nA,V.label=V.label||(ie?Kk:Gk)}if(On||Z>0){V.width=V.width==null?1:V.width,V.paths=V.paths||mA||sk,V.fillTo=jt(V.fillTo||aA),V.pxAlign=+Jt(V.pxAlign,s),V.pxRound=Dm(V.pxAlign),V.stroke=jt(V.stroke||null),V.fill=jt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=rA(jr(1,V.width),1),ae=V.points=Kn({},{size:ie,width:jr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:vA,_stroke:null,_fill:null},V.points);ae.show=jt(ae.show),ae.filter=jt(ae.filter),ae.fill=jt(ae.fill),ae.stroke=jt(ae.stroke),ae.paths=jt(ae.paths),ae.pxAlign=V.pxAlign}if(le){let ie=At(V,Z);Ee.splice(Z,0,ie[0]),qe.splice(Z,0,ie[1]),he.values.push(null)}if(se){te.splice(Z,0,null);let ie=null;On?Z==0&&(ie=ao(V,Z)):Z>0&&(ie=ao(V,Z)),yn.splice(Z,0,ie),pr.splice(Z,0,0),ai.splice(Z,0,0)}et("addSeries",Z)}function ko(V,Z){Z=Z??x.length,V=m==1?gh(V,Z,Am,Im):gh(V,Z,{},Mm),x.splice(Z,0,V),lo(x[Z],Z)}r.addSeries=ko;function Or(V){if(x.splice(V,1),le){he.values.splice(V,1),qe.splice(V,1);let Z=Ee.splice(V,1)[0];wr(null,Z.firstChild),Z.remove()}se&&(te.splice(V,1),yn.splice(V,1)[0].remove(),pr.splice(V,1),ai.splice(V,1)),et("delSeries",V)}r.delSeries=Or;const li=[!1,!1,!1,!1];function Jr(V,Z){if(V._show=V.show,V.show){let ie=V.side%2,ae=R[V.scale];ae==null&&(V.scale=ie?x[1].scale:C,ae=R[V.scale]);let ge=ae.time;V.size=jt(V.size),V.space=jt(V.space),V.rotate=jt(V.rotate),Ho(V.incrs)&&V.incrs.forEach(Te=>{!jo.has(Te)&&jo.set(Te,Qg(Te))}),V.incrs=jt(V.incrs||(ae.distr==2?Rk:ge?b==1?Tk:Lk:vs)),V.splits=jt(V.splits||(ge&&ae.distr==1?U:ae.distr==3?lh:ae.distr==4?Zk:Jk)),V.stroke=jt(V.stroke),V.grid.stroke=jt(V.grid.stroke),V.ticks.stroke=jt(V.ticks.stroke),V.border.stroke=jt(V.border.stroke);let ke=V.values;V.values=Ho(ke)&&!Ho(ke[0])?jt(ke):ge?Ho(ke)?mm(N,gm(ke,W)):tm(ke)?Dk(N,ke):ke||G:ke||Yk,V.filter=jt(V.filter||(ae.distr>=3&&ae.log==10?eA:ae.distr==3&&ae.log==2?tA:Yg)),V.font=Zm(V.font),V.labelFont=Zm(V.labelFont),V._size=V.size(r,null,Z,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(li[Z]=!0,V._el=Ei(F_,c))}}function Nt(V,Z,ie,ae){let[ge,ke,Te,Fe]=ie,We=Z%2,Ue=0;return We==0&&(Fe||ke)&&(Ue=Z==0&&!ge||Z==2&&!Te?rr(km.size/3):0),We==1&&(ge||Te)&&(Ue=Z==1&&!ke||Z==3&&!Fe?rr(Rm.size/2):0),Ue}const Ao=r.padding=(t.padding||[Nt,Nt,Nt,Nt]).map(V=>jt(Jt(V,Nt))),ar=r._padding=Ao.map((V,Z)=>V(r,Z,li,0));let Sn,oe=null,Ne=null;const Be=m==1?x[0].idxs:null;let yt=null,gn=!1;function Vt(V,Z){if(n=V??[],r.data=r._data=n,m==2){Sn=0;for(let ie=1;ie<x.length;ie++)Sn+=n[ie][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),yt=n[0],Sn=yt.length;let ie=n;if(F==2){ie=n.slice();let ae=ie[0]=Array(Sn);for(let ge=0;ge<Sn;ge++)ae[ge]=ge}r._data=n=ie}if(Zi(!0),et("setData"),F==2&&(xr=!0),Z!==!1){let ie=B;ie.auto(r,gn)?_r():Dr(C,ie.min,ie.max),yi=yi||ee.left>=0,Zn=!0,po()}}r.setData=Vt;function _r(){gn=!0;let V,Z;m==1&&(Sn>0?(oe=Be[0]=0,Ne=Be[1]=Sn-1,V=n[0][oe],Z=n[0][Ne],F==2?(V=oe,Z=Ne):V==Z&&(F==3?[V,Z]=Jl(V,V,B.log,!1):F==4?[V,Z]=Yu(V,V,B.log,!1):B.time?Z=V+rr(86400/b):[V,Z]=Zl(V,Z,Ju,!0))):(oe=Be[0]=V=null,Ne=Be[1]=Z=null)),Dr(C,V,Z)}let Vn,cn,gr,mn,mr,co,_s,ks,As,lr;function Ss(V,Z,ie,ae,ge,ke){V??=Rg,ie??=eh,ae??="butt",ge??=Rg,ke??="round",V!=Vn&&(l.strokeStyle=Vn=V),ge!=cn&&(l.fillStyle=cn=ge),Z!=gr&&(l.lineWidth=gr=Z),ke!=mr&&(l.lineJoin=mr=ke),ae!=co&&(l.lineCap=co=ae),ie!=mn&&l.setLineDash(mn=ie)}function Uo(V,Z,ie,ae){Z!=cn&&(l.fillStyle=cn=Z),V!=_s&&(l.font=_s=V),ie!=ks&&(l.textAlign=ks=ie),ae!=As&&(l.textBaseline=As=ae)}function uo(V,Z,ie,ae,ge=0){if(ae.length>0&&V.auto(r,gn)&&(Z==null||Z.min==null)){let ke=Jt(oe,0),Te=Jt(Ne,ae.length-1),Fe=ie.min==null?ek(ae,ke,Te,ge,V.distr==3):[ie.min,ie.max];V.min=Gi(V.min,ie.min=Fe[0]),V.max=jr(V.max,ie.max=Fe[1])}}const $s={min:null,max:null};function Vo(){for(let ae in R){let ge=R[ae];_[ae]==null&&(ge.min==null||_[C]!=null&&ge.auto(r,gn))&&(_[ae]=$s)}for(let ae in R){let ge=R[ae];_[ae]==null&&ge.from!=null&&_[ge.from]!=null&&(_[ae]=$s)}_[C]!=null&&Zi(!0);let V={};for(let ae in _){let ge=_[ae];if(ge!=null){let ke=V[ae]=na(R[ae],ck);if(ge.min!=null)Kn(ke,ge);else if(ae!=C||m==2)if(Sn==0&&ke.from==null){let Te=ke.range(r,null,null,ae);ke.min=Te[0],ke.max=Te[1]}else ke.min=hn,ke.max=-hn}}if(Sn>0){x.forEach((ae,ge)=>{if(m==1){let ke=ae.scale,Te=_[ke];if(Te==null)return;let Fe=V[ke];if(ge==0){let We=Fe.range(r,Fe.min,Fe.max,ke);Fe.min=We[0],Fe.max=We[1],oe=qi(Fe.min,n[0]),Ne=qi(Fe.max,n[0]),Ne-oe>1&&(n[0][oe]<Fe.min&&oe++,n[0][Ne]>Fe.max&&Ne--),ae.min=yt[oe],ae.max=yt[Ne]}else ae.show&&ae.auto&&uo(Fe,Te,ae,n[ge],ae.sorted);ae.idxs[0]=oe,ae.idxs[1]=Ne}else if(ge>0&&ae.show&&ae.auto){let[ke,Te]=ae.facets,Fe=ke.scale,We=Te.scale,[Ue,Ye]=n[ge],Qe=V[Fe],xt=V[We];Qe!=null&&uo(Qe,_[Fe],ke,Ue,ke.sorted),xt!=null&&uo(xt,_[We],Te,Ye,Te.sorted),ae.min=Te.min,ae.max=Te.max}});for(let ae in V){let ge=V[ae],ke=_[ae];if(ge.from==null&&(ke==null||ke.min==null)){let Te=ge.range(r,ge.min==hn?null:ge.min,ge.max==-hn?null:ge.max,ae);ge.min=Te[0],ge.max=Te[1]}}}for(let ae in V){let ge=V[ae];if(ge.from!=null){let ke=V[ge.from];if(ke.min==null)ge.min=ge.max=null;else{let Te=ge.range(r,ke.min,ke.max,ae);ge.min=Te[0],ge.max=Te[1]}}}let Z={},ie=!1;for(let ae in V){let ge=V[ae],ke=R[ae];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?xo(ke.min):Te==4?Xu(ke.min,ke.asinh):Te==100?ke.fwd(ke.min):ke.min,ke._max=Te==3?xo(ke.max):Te==4?Xu(ke.max,ke.asinh):Te==100?ke.fwd(ke.max):ke.max,Z[ae]=ie=!0}}if(ie){x.forEach((ae,ge)=>{m==2?ge>0&&Z.y&&(ae._paths=null):Z[ae.scale]&&(ae._paths=null)});for(let ae in Z)xr=!0,et("setScale",ae);se&&ee.left>=0&&(yi=Zn=!0)}for(let ae in _)_[ae]=null}function So(V){let Z=Qu(oe-1,0,Sn-1),ie=Qu(Ne+1,0,Sn-1);for(;V[Z]==null&&Z>0;)Z--;for(;V[ie]==null&&ie<Sn-1;)ie++;return[Z,ie]}function Rs(){if(Sn>0){let V=x.some(Z=>Z._focus)&&lr!=Cr.alpha;V&&(l.globalAlpha=lr=Cr.alpha),x.forEach((Z,ie)=>{if(ie>0&&Z.show&&(Es(ie,!1),Es(ie,!0),Z._paths==null)){let ae=lr;lr!=Z.alpha&&(l.globalAlpha=lr=Z.alpha);let ge=m==2?[0,n[ie][0].length-1]:So(n[ie]);Z._paths=Z.paths(r,ie,ge[0],ge[1]),lr!=ae&&(l.globalAlpha=lr=ae)}}),x.forEach((Z,ie)=>{if(ie>0&&Z.show){let ae=lr;lr!=Z.alpha&&(l.globalAlpha=lr=Z.alpha),Z._paths!=null&&qo(ie,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,ke=Z.points.show(r,ie,oe,Ne,ge),Te=Z.points.filter(r,ie,ke,ge);(ke||Te)&&(Z.points._paths=Z.points.paths(r,ie,oe,Ne,Te),qo(ie,!0))}lr!=ae&&(l.globalAlpha=lr=ae),et("drawSeries",ie)}}),V&&(l.globalAlpha=lr=1)}}function Es(V,Z){let ie=Z?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function qo(V,Z){let ie=Z?x[V].points:x[V],{stroke:ae,fill:ge,clip:ke,flags:Te,_stroke:Fe=ie._stroke,_fill:We=ie._fill,_width:Ue=ie.width}=ie._paths;Ue=dn(Ue*Qt,3);let Ye=null,Qe=Ue%2/2;Z&&We==null&&(We=Ue>0?"#fff":Fe);let xt=ie.pxAlign==1&&Qe>0;if(xt&&l.translate(Qe,Qe),!Z){let Yt=zn-Ue/2,Pt=Ln-Ue/2,bt=Gt+Ue,pt=nn+Ue;Ye=new Path2D,Ye.rect(Yt,Pt,bt,pt)}Z?Go(Fe,Ue,ie.dash,ie.cap,We,ae,ge,Te,ke):ga(V,Fe,Ue,ie.dash,ie.cap,We,ae,ge,Te,Ye,ke),xt&&l.translate(-Qe,-Qe)}function ga(V,Z,ie,ae,ge,ke,Te,Fe,We,Ue,Ye){let Qe=!1;We!=0&&A.forEach((xt,Yt)=>{if(xt.series[0]==V){let Pt=x[xt.series[1]],bt=n[xt.series[1]],pt=(Pt._paths||Ka).band;Ho(pt)&&(pt=xt.dir==1?pt[0]:pt[1]);let lt,vn=null;Pt.show&&pt&&nk(bt,oe,Ne)?(vn=xt.fill(r,Yt)||ke,lt=Pt._paths.clip):pt=null,Go(Z,ie,ae,ge,vn,Te,Fe,We,Ue,Ye,lt,pt),Qe=!0}}),Qe||Go(Z,ie,ae,ge,ke,Te,Fe,We,Ue,Ye)}const ho=ia|uh;function Go(V,Z,ie,ae,ge,ke,Te,Fe,We,Ue,Ye,Qe){Ss(V,Z,ie,ae,ge),(We||Ue||Qe)&&(l.save(),We&&l.clip(We),Ue&&l.clip(Ue)),Qe?(Fe&ho)==ho?(l.clip(Qe),Ye&&l.clip(Ye),cr(ge,Te),Ji(V,ke,Z)):Fe&uh?(cr(ge,Te),l.clip(Qe),Ji(V,ke,Z)):Fe&ia&&(l.save(),l.clip(Qe),Ye&&l.clip(Ye),cr(ge,Te),l.restore(),Ji(V,ke,Z)):(cr(ge,Te),Ji(V,ke,Z)),(We||Ue||Qe)&&l.restore()}function Ji(V,Z,ie){ie>0&&(Z instanceof Map?Z.forEach((ae,ge)=>{l.strokeStyle=Vn=ge,l.stroke(ae)}):Z!=null&&V&&l.stroke(Z))}function cr(V,Z){Z instanceof Map?Z.forEach((ie,ae)=>{l.fillStyle=cn=ae,l.fill(ie)}):Z!=null&&V&&l.fill(Z)}function Ts(V,Z,ie,ae){let ge=M[V],ke;if(ae<=0)ke=[0,0];else{let Te=ge._space=ge.space(r,V,Z,ie,ae),Fe=ge._incrs=ge.incrs(r,V,Z,ie,ae,Te);ke=_A(Z,ie,Fe,ae,Te)}return ge._found=ke}function Zr(V,Z,ie,ae,ge,ke,Te,Fe,We,Ue){let Ye=Te%2/2;s==1&&l.translate(Ye,Ye),Ss(Fe,Te,We,Ue,Fe),l.beginPath();let Qe,xt,Yt,Pt,bt=ge+(ae==0||ae==3?-ke:ke);ie==0?(xt=ge,Pt=bt):(Qe=ge,Yt=bt);for(let pt=0;pt<V.length;pt++)Z[pt]!=null&&(ie==0?Qe=Yt=V[pt]:xt=Pt=V[pt],l.moveTo(Qe,xt),l.lineTo(Yt,Pt));l.stroke(),s==1&&l.translate(-Ye,-Ye)}function ma(V){let Z=!0;return M.forEach((ie,ae)=>{if(!ie.show)return;let ge=R[ie.scale];if(ge.min==null){ie._show&&(Z=!1,ie._show=!1,Zi(!1));return}else ie._show||(Z=!1,ie._show=!0,Zi(!1));let ke=ie.side,Te=ke%2,{min:Fe,max:We}=ge,[Ue,Ye]=Ts(ae,Fe,We,Te==0?ft:Ke);if(Ye==0)return;let Qe=ge.distr==2,xt=ie._splits=ie.splits(r,ae,Fe,We,Ue,Ye,Qe),Yt=ge.distr==2?xt.map(lt=>yt[lt]):xt,Pt=ge.distr==2?yt[xt[1]]-yt[xt[0]]:Ue,bt=ie._values=ie.values(r,ie.filter(r,Yt,ae,Ye,Pt),ae,Ye,Pt);ie._rotate=ke==2?ie.rotate(r,bt,ae,Ye):0;let pt=ie._size;ie._size=Ti(ie.size(r,bt,ae,V)),pt!=null&&ie._size!=pt&&(Z=!1)}),Z}function va(V){let Z=!0;return Ao.forEach((ie,ae)=>{let ge=ie(r,ae,li,V);ge!=ar[ae]&&(Z=!1),ar[ae]=ge}),Z}function Ko(){for(let V=0;V<M.length;V++){let Z=M[V];if(!Z.show||!Z._show)continue;let ie=Z.side,ae=ie%2,ge,ke,Te=Z.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,Ue]=Z._found;if(Z.label!=null){let Ar=Z.labelGap*Fe,wn=rr((Z._lpos+Ar)*Qt);Uo(Z.labelFont[0],Te,"center",ie==2?Va:$g),l.save(),ae==1?(ge=ke=0,l.translate(wn,rr(Ln+nn/2)),l.rotate((ie==3?-Xl:Xl)/2)):(ge=rr(zn+Gt/2),ke=wn);let Pi=Gg(Z.label)?Z.label(r,V,We,Ue):Z.label;l.fillText(Pi,ge,ke),l.restore()}if(Ue==0)continue;let Ye=R[Z.scale],Qe=ae==0?Gt:nn,xt=ae==0?zn:Ln,Yt=Z._splits,Pt=Ye.distr==2?Yt.map(Ar=>yt[Ar]):Yt,bt=Ye.distr==2?yt[Yt[1]]-yt[Yt[0]]:We,pt=Z.ticks,lt=Z.border,vn=pt.show?pt.size:0,En=rr(vn*Qt),er=rr((Z.alignTo==2?Z._size-vn-Z.gap:Z.gap)*Qt),on=Z._rotate*-Xl/180,un=p(Z._pos*Qt),me=(En+er)*Fe,Re=un+me;ke=ae==0?Re:0,ge=ae==1?Re:0;let Se=Z.font[0],Ve=Z.align==1?Zs:Z.align==2?zu:on>0?Zs:on<0?zu:ae==0?"center":ie==3?zu:Zs,ht=on||ae==1?"middle":ie==2?Va:$g;Uo(Se,Te,Ve,ht);let kt=Z.font[1]*Z.lineGap,Xt=Yt.map(Ar=>p(w(Ar,Ye,Qe,xt))),Ft=Z._values;for(let Ar=0;Ar<Ft.length;Ar++){let wn=Ft[Ar];if(wn!=null){ae==0?ge=Xt[Ar]:ke=Xt[Ar],wn=""+wn;let Pi=wn.indexOf(`
1480
+ `)==-1?[wn]:wn.split(/\n/gm);for(let Sr=0;Sr<Pi.length;Sr++){let To=Pi[Sr];on?(l.save(),l.translate(ge,ke+Sr*kt),l.rotate(on),l.fillText(To,0,0),l.restore()):l.fillText(To,ge,ke+Sr*kt)}}}pt.show&&Zr(Xt,pt.filter(r,Pt,V,Ue,bt),ae,ie,un,En,dn(pt.width*Qt,3),pt.stroke(r,V),pt.dash,pt.cap);let ui=Z.grid;ui.show&&Zr(Xt,ui.filter(r,Pt,V,Ue,bt),ae,ae==0?2:1,ae==0?Ln:zn,ae==0?nn:Gt,dn(ui.width*Qt,3),ui.stroke(r,V),ui.dash,ui.cap),lt.show&&Zr([un],[1],ae==0?1:0,ae==0?1:2,ae==1?Ln:zn,ae==1?nn:Gt,dn(lt.width*Qt,3),lt.stroke(r,V),lt.dash,lt.cap)}et("drawAxes")}function Zi(V){x.forEach((Z,ie)=>{ie>0&&(Z._paths=null,V&&(m==1?(Z.min=null,Z.max=null):Z.facets.forEach(ae=>{ae.min=null,ae.max=null})))})}let $o=!1,Yo=!1,fo=[];function ya(){Yo=!1;for(let V=0;V<fo.length;V++)et(...fo[V]);fo.length=0}function po(){$o||(mk(Ms),$o=!0)}function ze(V,Z=!1){$o=!0,Yo=Z,V(r),Ms(),Z&&fo.length>0&&queueMicrotask(ya)}r.batch=ze;function Ms(){if(Ir&&(Vo(),Ir=!1),xr&&(Yr(),xr=!1),Gr){if(xn(h,Zs,$t),xn(h,Va,Zt),xn(h,Ha,ft),xn(h,Ua,Ke),xn(o,Zs,$t),xn(o,Va,Zt),xn(o,Ha,ft),xn(o,Ua,Ke),xn(c,Ha,fn),xn(c,Ua,or),a.width=rr(fn*Qt),a.height=rr(or*Qt),M.forEach(({_el:V,_show:Z,_size:ie,_pos:ae,side:ge})=>{if(V!=null)if(Z){let ke=ge===3||ge===0?ie:0,Te=ge%2==1;xn(V,Te?"left":"top",ae-ke),xn(V,Te?"width":"height",ie),xn(V,Te?"top":"left",Te?Zt:$t),xn(V,Te?"height":"width",Te?Ke:ft),qu(V,fs)}else gi(V,fs)}),Vn=cn=gr=mr=co=_s=ks=As=mn=null,lr=1,z(!0),$t!=In||Zt!=Un||ft!=sr||Ke!=pn){Zi(!1);let V=ft/sr,Z=Ke/pn;if(se&&!yi&&ee.left>=0){ee.left*=V,ee.top*=Z,Xi&&so(Xi,rr(ee.left),0,ft,Ke),Dn&&so(Dn,0,rr(ee.top),ft,Ke);for(let ie=0;ie<yn.length;ie++){let ae=yn[ie];ae!=null&&(pr[ie]*=V,ai[ie]*=Z,so(ae,Ti(pr[ie]),Ti(ai[ie]),ft,Ke))}}if(wt.show&&!bi&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=Z,wt.height*=Z;for(let ie in Y)xn(Nr,ie,wt[ie])}In=$t,Un=Zt,sr=ft,pn=Ke}et("setSize"),Gr=!1}fn>0&&or>0&&(l.clearRect(0,0,a.width,a.height),et("drawClear"),D.forEach(V=>V()),et("draw")),wt.show&&bi&&(Ni(wt),bi=!1),se&&yi&&(k(null,!0,!1),yi=!1),he.show&&he.live&&Zn&&(y(),Zn=!1),u||(u=!0,r.status=1,et("ready")),gn=!1,$o=!1}r.redraw=(V,Z)=>{xr=Z||!1,V!==!1?Dr(C,B.min,B.max):po()};function De(V,Z){let ie=R[V];if(ie.from==null){if(Sn==0){let ae=ie.range(r,Z.min,Z.max,V);Z.min=ae[0],Z.max=ae[1]}if(Z.min>Z.max){let ae=Z.min;Z.min=Z.max,Z.max=ae}if(Sn>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;V==C&&ie.distr==2&&Sn>0&&(Z.min=qi(Z.min,n[0]),Z.max=qi(Z.max,n[0]),Z.min==Z.max&&Z.max++),_[V]=Z,Ir=!0,po()}}r.setScale=De;let Nn,Ro,Xi,Dn,ba,Eo,Li,go,Is,en,ct,Ht,Oi=!1;const Wn=ee.drag;let je=Wn.x,bn=Wn.y;se&&(ee.x&&(Nn=Ei(W_,o)),ee.y&&(Ro=Ei(B_,o)),B.ori==0?(Xi=Nn,Dn=Ro):(Xi=Ro,Dn=Nn),ct=ee.left,Ht=ee.top);const wt=r.select=Kn({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Nr=wt.show?Ei(z_,wt.over?o:h):null;function Ni(V,Z){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&xn(Nr,ie,V[ie]);Z!==!1&&et("setSelect")}}r.setSelect=Ni;function Dt(V){if(x[V].show)le&&qu(Ee[V],fs);else if(le&&gi(Ee[V],fs),se){let Z=On?yn[0]:yn[V];Z!=null&&so(Z,-10,-10,ft,Ke)}}function Dr(V,Z,ie){De(V,{min:Z,max:ie})}function Xn(V,Z,ie,ae){Z.focus!=null&&Ls(V),Z.show!=null&&x.forEach((ge,ke)=>{ke>0&&(V==ke||V==null)&&(ge.show=Z.show,Dt(ke),m==2?(Dr(ge.facets[0].scale,null,null),Dr(ge.facets[1].scale,null,null)):Dr(ge.scale,null,null),po())}),ie!==!1&&et("setSeries",V,Z),ae&&_t("setSeries",r,V,Z)}r.setSeries=Xn;function Qi(V,Z){Kn(A[V],Z)}function xi(V,Z){V.fill=jt(V.fill||null),V.dir=Jt(V.dir,-1),Z=Z??A.length,A.splice(Z,0,V)}function $n(V){V==null?A.length=0:A.splice(V,1)}r.addBand=xi,r.setBand=Qi,r.delBand=$n;function Jo(V,Z){x[V].alpha=Z,se&&yn[V]!=null&&(yn[V].style.opacity=Z),le&&Ee[V]&&(Ee[V].style.opacity=Z)}let Bn,Ci,_i;const Di={focus:!0};function Ls(V){if(V!=_i){let Z=V==null,ie=Cr.alpha!=1;x.forEach((ae,ge)=>{if(m==1||ge>0){let ke=Z||ge==0||ge==V;ae._focus=Z?null:ke,ie&&Jo(ge,ke?1:Cr.alpha)}}),_i=V,ie&&po()}}le&&Lr&&An(Mg,pe,V=>{ee._lock||(si(V),_i!=null&&Xn(null,Di,!0,Ct.setSeries))});function rn(V,Z,ie){let ae=R[Z];ie&&(V=V/Qt-(ae.ori==1?Zt:$t));let ge=ft;ae.ori==1&&(ge=Ke,V=ge-V),ae.dir==-1&&(V=ge-V);let ke=ae._min,Te=ae._max,Fe=V/ge,We=ke+(Te-ke)*Fe,Ue=ae.distr;return Ue==3?ea(10,We):Ue==4?ik(We,ae.asinh):Ue==100?ae.bwd(We):We}function wa(V,Z){let ie=rn(V,C,Z);return qi(ie,n[0],oe,Ne)}r.valToIdx=V=>qi(V,n[0]),r.posToIdx=wa,r.posToVal=rn,r.valToPos=(V,Z,ie)=>R[Z].ori==0?f(V,R[Z],ie?Gt:ft,ie?zn:0):g(V,R[Z],ie?nn:Ke,ie?Ln:0),r.setCursor=(V,Z,ie)=>{ct=V.left,Ht=V.top,k(null,Z,ie)};function ur(V,Z){xn(Nr,Zs,wt.left=V),xn(Nr,Ha,wt.width=Z)}function Pr(V,Z){xn(Nr,Va,wt.top=V),xn(Nr,Ua,wt.height=Z)}let mo=B.ori==0?ur:Pr,kr=B.ori==1?ur:Pr;function ci(){if(le&&he.live)for(let V=m==2?1:0;V<x.length;V++){if(V==0&&tt)continue;let Z=he.values[V],ie=0;for(let ae in Z)qe[V][ie++].firstChild.nodeValue=Z[ae]}}function y(V,Z){if(V!=null&&(V.idxs?V.idxs.forEach((ie,ae)=>{te[ae]=ie}):lk(V.idx)||te.fill(V.idx),he.idx=te[0]),le&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||m==1&&!tt)&&S(ie,te[ie]);ci()}Zn=!1,Z!==!1&&et("setLegend")}r.setLegend=y;function S(V,Z){let ie=x[V],ae=V==0&&F==2?yt:n[V],ge;tt?ge=ie.values(r,V,Z)??Xe:(ge=ie.value(r,Z==null?null:ae[Z],V,Z),ge=ge==null?Xe:{_:ge}),he.values[V]=ge}function k(V,Z,ie){Is=ct,en=Ht,[ct,Ht]=ee.move(r,ct,Ht),ee.left=ct,ee.top=Ht,se&&(Xi&&so(Xi,rr(ct),0,ft,Ke),Dn&&so(Dn,0,rr(Ht),ft,Ke));let ae,ge=oe>Ne;Bn=hn,Ci=null;let ke=B.ori==0?ft:Ke,Te=B.ori==1?ft:Ke;if(ct<0||Sn==0||ge){ae=ee.idx=null;for(let Fe=0;Fe<x.length;Fe++){let We=yn[Fe];We!=null&&so(We,-10,-10,ft,Ke)}Lr&&Xn(null,Di,!0,V==null&&Ct.setSeries),he.live&&(te.fill(ae),Zn=!0)}else{let Fe,We,Ue;m==1&&(Fe=B.ori==0?ct:Ht,We=rn(Fe,C),ae=ee.idx=qi(We,n[0],oe,Ne),Ue=L(n[0][ae],B,ke,0));let Ye=-10,Qe=-10,xt=0,Yt=0,Pt=!0,bt="",pt="";for(let lt=m==2?1:0;lt<x.length;lt++){let vn=x[lt],En=te[lt],er=En==null?null:m==1?n[lt][En]:n[lt][1][En],on=ee.dataIdx(r,lt,ae,We),un=on==null?null:m==1?n[lt][on]:n[lt][1][on];if(Zn=Zn||un!=er||on!=En,te[lt]=on,lt>0&&vn.show){let me=on==null?-10:on==ae?Ue:L(m==1?n[0][on]:n[lt][0][on],B,ke,0),Re=un==null?-10:$(un,m==1?R[vn.scale]:R[vn.facets[1].scale],Te,0);if(Lr&&un!=null){let Se=B.ori==1?ct:Ht,Ve=nr(Cr.dist(r,lt,on,Re,Se));if(Ve<Bn){let ht=Cr.bias;if(ht!=0){let kt=rn(Se,vn.scale),Xt=un>=0?1:-1,Ft=kt>=0?1:-1;Ft==Xt&&(Ft==1?ht==1?un>=kt:un<=kt:ht==1?un<=kt:un>=kt)&&(Bn=Ve,Ci=lt)}else Bn=Ve,Ci=lt}}if(Zn||On){let Se,Ve;B.ori==0?(Se=me,Ve=Re):(Se=Re,Ve=me);let ht,kt,Xt,Ft,ui,Ar,wn=!0,Pi=_n.bbox;if(Pi!=null){wn=!1;let Sr=Pi(r,lt);Xt=Sr.left,Ft=Sr.top,ht=Sr.width,kt=Sr.height}else Xt=Se,Ft=Ve,ht=kt=_n.size(r,lt);if(Ar=_n.fill(r,lt),ui=_n.stroke(r,lt),On)lt==Ci&&Bn<=Cr.prox&&(Ye=Xt,Qe=Ft,xt=ht,Yt=kt,Pt=wn,bt=Ar,pt=ui);else{let Sr=yn[lt];Sr!=null&&(pr[lt]=Xt,ai[lt]=Ft,Fg(Sr,ht,kt,wn),Dg(Sr,Ar,ui),so(Sr,Ti(Xt),Ti(Ft),ft,Ke))}}}}if(On){let lt=Cr.prox,vn=_i==null?Bn<=lt:Bn>lt||Ci!=_i;if(Zn||vn){let En=yn[0];En!=null&&(pr[0]=Ye,ai[0]=Qe,Fg(En,xt,Yt,Pt),Dg(En,bt,pt),so(En,Ti(Ye),Ti(Qe),ft,Ke))}}}if(wt.show&&Oi)if(V!=null){let[Fe,We]=Ct.scales,[Ue,Ye]=Ct.match,[Qe,xt]=V.cursor.sync.scales,Yt=V.cursor.drag;if(je=Yt._x,bn=Yt._y,je||bn){let{left:Pt,top:bt,width:pt,height:lt}=V.select,vn=V.scales[Qe].ori,En=V.posToVal,er,on,un,me,Re,Se=Fe!=null&&Ue(Fe,Qe),Ve=We!=null&&Ye(We,xt);Se&&je?(vn==0?(er=Pt,on=pt):(er=bt,on=lt),un=R[Fe],me=L(En(er,Qe),un,ke,0),Re=L(En(er+on,Qe),un,ke,0),mo(Gi(me,Re),nr(Re-me))):mo(0,ke),Ve&&bn?(vn==1?(er=Pt,on=pt):(er=bt,on=lt),un=R[We],me=$(En(er,xt),un,Te,0),Re=$(En(er+on,xt),un,Te,0),kr(Gi(me,Re),nr(Re-me))):kr(0,Te)}else X()}else{let Fe=nr(Is-ba),We=nr(en-Eo);if(B.ori==1){let xt=Fe;Fe=We,We=xt}je=Wn.x&&Fe>=Wn.dist,bn=Wn.y&&We>=Wn.dist;let Ue=Wn.uni;Ue!=null?je&&bn&&(je=Fe>=Ue,bn=We>=Ue,!je&&!bn&&(We>Fe?bn=!0:je=!0)):Wn.x&&Wn.y&&(je||bn)&&(je=bn=!0);let Ye,Qe;je&&(B.ori==0?(Ye=Li,Qe=ct):(Ye=go,Qe=Ht),mo(Gi(Ye,Qe),nr(Qe-Ye)),bn||kr(0,Te)),bn&&(B.ori==1?(Ye=Li,Qe=ct):(Ye=go,Qe=Ht),kr(Gi(Ye,Qe),nr(Qe-Ye)),je||mo(0,ke)),!je&&!bn&&(mo(0,0),kr(0,0))}if(Wn._x=je,Wn._y=bn,V==null){if(ie){if(Kt!=null){let[Fe,We]=Ct.scales;Ct.values[0]=Fe!=null?rn(B.ori==0?ct:Ht,Fe):null,Ct.values[1]=We!=null?rn(B.ori==1?ct:Ht,We):null}_t(Bu,r,ct,Ht,ft,Ke,ae)}if(Lr){let Fe=ie&&Ct.setSeries,We=Cr.prox;_i==null?Bn<=We&&Xn(Ci,Di,!0,Fe):Bn>We?Xn(null,Di,!0,Fe):Ci!=_i&&Xn(Ci,Di,!0,Fe)}}Zn&&(he.idx=ae,y()),Z!==!1&&et("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&z(!1),P}});function z(V=!1){V?P=null:(P=o.getBoundingClientRect(),et("syncRect",P))}function j(V,Z,ie,ae,ge,ke,Te){ee._lock||Oi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,Z,ie,ae,ge,ke,Te,!1,V!=null),V!=null?k(null,!0,!0):k(Z,!0,!1))}function q(V,Z,ie,ae,ge,ke,Te,Fe,We){if(P==null&&z(!1),si(V),V!=null)ie=V.clientX-P.left,ae=V.clientY-P.top;else{if(ie<0||ae<0){ct=-10,Ht=-10;return}let[Ue,Ye]=Ct.scales,Qe=Z.cursor.sync,[xt,Yt]=Qe.values,[Pt,bt]=Qe.scales,[pt,lt]=Ct.match,vn=Z.axes[0].side%2==1,En=B.ori==0?ft:Ke,er=B.ori==1?ft:Ke,on=vn?ke:ge,un=vn?ge:ke,me=vn?ae:ie,Re=vn?ie:ae;if(Pt!=null?ie=pt(Ue,Pt)?w(xt,R[Ue],En,0):-10:ie=En*(me/on),bt!=null?ae=lt(Ye,bt)?w(Yt,R[Ye],er,0):-10:ae=er*(Re/un),B.ori==1){let Se=ie;ie=ae,ae=Se}}We&&(Z==null||Z.cursor.event.type==Bu)&&((ie<=1||ie>=ft-1)&&(ie=ms(ie,ft)),(ae<=1||ae>=Ke-1)&&(ae=ms(ae,Ke))),Fe?(ba=ie,Eo=ae,[Li,go]=ee.move(r,ie,ae)):(ct=ie,Ht=ae)}const Y={width:0,height:0,left:0,top:0};function X(){Ni(Y,!1)}let re,ue,be,Ae;function ye(V,Z,ie,ae,ge,ke,Te){Oi=!0,je=bn=Wn._x=Wn._y=!1,q(V,Z,ie,ae,ge,ke,Te,!0,!1),V!=null&&(An(ju,Uu,xe,!1),_t(Eg,r,Li,go,ft,Ke,null));let{left:Fe,top:We,width:Ue,height:Ye}=wt;re=Fe,ue=We,be=Ue,Ae=Ye}function xe(V,Z,ie,ae,ge,ke,Te){Oi=Wn._x=Wn._y=!1,q(V,Z,ie,ae,ge,ke,Te,!1,!0);let{left:Fe,top:We,width:Ue,height:Ye}=wt,Qe=Ue>0||Ye>0,xt=re!=Fe||ue!=We||be!=Ue||Ae!=Ye;if(Qe&&xt&&Ni(wt),Wn.setScale&&Qe&&xt){let Yt=Fe,Pt=Ue,bt=We,pt=Ye;if(B.ori==1&&(Yt=We,Pt=Ye,bt=Fe,pt=Ue),je&&Dr(C,rn(Yt,C),rn(Yt+Pt,C)),bn)for(let lt in R){let vn=R[lt];lt!=C&&vn.from==null&&vn.min!=hn&&Dr(lt,rn(bt+pt,lt),rn(bt,lt))}X()}else ee.lock&&(ee._lock=!ee._lock,k(Z,!0,V!=null));V!=null&&(wr(ju,Uu),_t(ju,r,ct,Ht,ft,Ke,null))}function Oe(V,Z,ie,ae,ge,ke,Te){if(ee._lock)return;si(V);let Fe=Oi;if(Oi){let We=!0,Ue=!0,Ye=10,Qe,xt;B.ori==0?(Qe=je,xt=bn):(Qe=bn,xt=je),Qe&&xt&&(We=ct<=Ye||ct>=ft-Ye,Ue=Ht<=Ye||Ht>=Ke-Ye),Qe&&We&&(ct=ct<Li?0:ft),xt&&Ue&&(Ht=Ht<go?0:Ke),k(null,!0,!0),Oi=!1}ct=-10,Ht=-10,te.fill(null),k(null,!0,!0),Fe&&(Oi=Fe)}function Ie(V,Z,ie,ae,ge,ke,Te){ee._lock||(si(V),_r(),X(),V!=null&&_t(Ig,r,ct,Ht,ft,Ke,null))}function Ge(){M.forEach(kA),Yi(r.width,r.height,!0)}ps(Gl,Qs,Ge);const ut={};ut.mousedown=ye,ut.mousemove=j,ut.mouseup=xe,ut.dblclick=Ie,ut.setSeries=(V,Z,ie,ae)=>{let ge=Ct.match[2];ie=ge(r,Z,ie),ie!=-1&&Xn(ie,ae,!0,!1)},se&&(An(Eg,o,ye),An(Bu,o,j),An(Tg,o,V=>{si(V),z(!1)}),An(Mg,o,Oe),An(Ig,o,Ie),ph.add(r),r.syncRect=z);const Ze=r.hooks=t.hooks||{};function et(V,Z,ie){Yo?fo.push([V,Z,ie]):V in Ze&&Ze[V].forEach(ae=>{ae.call(null,r,Z,ie)})}(t.plugins||[]).forEach(V=>{for(let Z in V.hooks)Ze[Z]=(Ze[Z]||[]).concat(V.hooks[Z])});const kn=(V,Z,ie)=>ie,Ct=Kn({key:null,setSeries:!1,filters:{pub:Jg,sub:Jg},scales:[C,x[1]?x[1].scale:null],match:[Zg,Zg,kn],values:[null,null]},ee.sync);Ct.match.length==2&&Ct.match.push(kn),ee.sync=Ct;const Kt=Ct.key,Tt=Nm(Kt);function _t(V,Z,ie,ae,ge,ke,Te){Ct.filters.pub(V,Z,ie,ae,ge,ke,Te)&&Tt.pub(V,Z,ie,ae,ge,ke,Te)}Tt.sub(r);function Qn(V,Z,ie,ae,ge,ke,Te){Ct.filters.sub(V,Z,ie,ae,ge,ke,Te)&&ut[V](null,Z,ie,ae,ge,ke,Te)}r.pub=Qn;function hr(){Tt.unsub(r),ph.delete(r),ir.clear(),Ku(Gl,Qs,Ge),d.remove(),pe?.remove(),et("destroy")}r.destroy=hr;function Rn(){et("init",t,n),Vt(n||t.data,!1),_[C]?De(C,_[C]):_r(),bi=wt.show&&(wt.width>0||wt.height>0),yi=Zn=!0,Yi(t.width,t.height)}return x.forEach(lo),M.forEach(Jr),e?e instanceof HTMLElement?(e.appendChild(d),Rn()):e(r,Rn):Rn(),r}Tr.assign=Kn,Tr.fmtNum=Zu,Tr.rangeNum=Zl,Tr.rangeLog=Jl,Tr.rangeAsinh=Yu,Tr.orient=ys,Tr.pxRatio=Qt,Tr.join=gk,Tr.fmtDate=th,Tr.tzDate=Sk,Tr.sync=Nm;{Tr.addGap=lA,Tr.clipGaps=ic;let t=Tr.paths={points:jm};t.linear=Um,t.stepped=hA,t.bars=dA,t.spline=pA}var Xm,Qm;function AA(){return Qm||(Qm=1,Xm=function(t,n,e,r,m){var f,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(m===void 0)m=t.length-1;else if(m=m|0,m<r||m>=t.length)throw new RangeError("invalid upper bound");for(;r<=m;)if(f=r+(m-r>>>1),g=+e(t[f],n,f,t),g<0)r=f+1;else if(g>0)m=f-1;else return f;return~r}),Xm}var SA=AA();const W2=Tn("y",Vl(SA));var mh,ev;function $A(){if(ev)return mh;ev=1;function t(n,e,r){var m=-1,f=n.length;e<0&&(e=-e>f?0:f+e),r=r>f?f:r,r<0&&(r+=f),f=e>r?0:r-e>>>0,e>>>=0;for(var g=Array(f);++m<f;)g[m]=n[m+e];return g}return mh=t,mh}var vh,tv;function RA(){if(tv)return vh;tv=1;var t=$A();function n(e,r,m){var f=e.length;return m=m===void 0?f:m,!r&&m>=f?e:t(e,r,m)}return vh=n,vh}var yh,nv;function rv(){if(nv)return yh;nv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,f="\\ufe0e\\ufe0f",g="\\u200d",w=RegExp("["+g+t+m+f+"]");function u(d){return w.test(d)}return yh=u,yh}var bh,iv;function EA(){if(iv)return bh;iv=1;function t(n){return n.split("")}return bh=t,bh}var wh,ov;function TA(){if(ov)return wh;ov=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,f="\\ufe0e\\ufe0f",g="["+t+"]",w="["+m+"]",u="\\ud83c[\\udffb-\\udfff]",d="(?:"+w+"|"+u+")",a="[^"+t+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",o=d+"?",s="["+f+"]?",p="(?:"+h+"(?:"+[a,l,c].join("|")+")"+s+o+")*",b=s+o+p,x="(?:"+[a+w+"?",w,l,c,g].join("|")+")",M=RegExp(u+"(?="+u+")|"+x+b,"g");function R(A){return A.match(M)||[]}return wh=R,wh}var xh,sv;function MA(){if(sv)return xh;sv=1;var t=EA(),n=rv(),e=TA();function r(m){return n(m)?e(m):t(m)}return xh=r,xh}var Ch,av;function IA(){if(av)return Ch;av=1;var t=typeof Bo=="object"&&Bo&&Bo.Object===Object&&Bo;return Ch=t,Ch}var _h,lv;function LA(){if(lv)return _h;lv=1;var t=IA(),n=typeof self=="object"&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return _h=e,_h}var kh,cv;function Ah(){if(cv)return kh;cv=1;var t=LA(),n=t.Symbol;return kh=n,kh}var Sh,uv;function OA(){if(uv)return Sh;uv=1;function t(n,e){for(var r=-1,m=n==null?0:n.length,f=Array(m);++r<m;)f[r]=e(n[r],r,n);return f}return Sh=t,Sh}var $h,hv;function NA(){if(hv)return $h;hv=1;var t=Array.isArray;return $h=t,$h}var Rh,dv;function DA(){if(dv)return Rh;dv=1;var t=Ah(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,m=t?t.toStringTag:void 0;function f(g){var w=e.call(g,m),u=g[m];try{g[m]=void 0;var d=!0}catch{}var a=r.call(g);return d&&(w?g[m]=u:delete g[m]),a}return Rh=f,Rh}var Eh,fv;function PA(){if(fv)return Eh;fv=1;var t=Object.prototype,n=t.toString;function e(r){return n.call(r)}return Eh=e,Eh}var Th,pv;function FA(){if(pv)return Th;pv=1;var t=Ah(),n=DA(),e=PA(),r="[object Null]",m="[object Undefined]",f=t?t.toStringTag:void 0;function g(w){return w==null?w===void 0?m:r:f&&f in Object(w)?n(w):e(w)}return Th=g,Th}var Mh,gv;function zA(){if(gv)return Mh;gv=1;function t(n){return n!=null&&typeof n=="object"}return Mh=t,Mh}var Ih,mv;function WA(){if(mv)return Ih;mv=1;var t=FA(),n=zA(),e="[object Symbol]";function r(m){return typeof m=="symbol"||n(m)&&t(m)==e}return Ih=r,Ih}var Lh,vv;function BA(){if(vv)return Lh;vv=1;var t=Ah(),n=OA(),e=NA(),r=WA(),m=t?t.prototype:void 0,f=m?m.toString:void 0;function g(w){if(typeof w=="string")return w;if(e(w))return n(w,g)+"";if(r(w))return f?f.call(w):"";var u=w+"";return u=="0"&&1/w==-1/0?"-0":u}return Lh=g,Lh}var Oh,yv;function lc(){if(yv)return Oh;yv=1;var t=BA();function n(e){return e==null?"":t(e)}return Oh=n,Oh}var Nh,bv;function jA(){if(bv)return Nh;bv=1;var t=RA(),n=rv(),e=MA(),r=lc();function m(f){return function(g){g=r(g);var w=n(g)?e(g):void 0,u=w?w[0]:g.charAt(0),d=w?t(w,1).join(""):g.slice(1);return u[f]()+d}}return Nh=m,Nh}var Dh,wv;function xv(){if(wv)return Dh;wv=1;var t=jA(),n=t("toUpperCase");return Dh=n,Dh}var HA=xv();const UA=Vl(HA);var Ph,Cv;function VA(){if(Cv)return Ph;Cv=1;var t=lc(),n=xv();function e(r){return n(t(r).toLowerCase())}return Ph=e,Ph}var Fh,_v;function qA(){if(_v)return Fh;_v=1;function t(n,e,r,m){var f=-1,g=n==null?0:n.length;for(m&&g&&(r=n[++f]);++f<g;)r=e(r,n[f],f,n);return r}return Fh=t,Fh}var zh,kv;function GA(){if(kv)return zh;kv=1;function t(n){return function(e){return n?.[e]}}return zh=t,zh}var Wh,Av;function KA(){if(Av)return Wh;Av=1;var t=GA(),n={À:"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=t(n);return Wh=e,Wh}var Bh,Sv;function YA(){if(Sv)return Bh;Sv=1;var t=KA(),n=lc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",m="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",g=r+m+f,w="["+g+"]",u=RegExp(w,"g");function d(a){return a=n(a),a&&a.replace(e,t).replace(u,"")}return Bh=d,Bh}var jh,$v;function JA(){if($v)return jh;$v=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(e){return e.match(t)||[]}return jh=n,jh}var Hh,Rv;function ZA(){if(Rv)return Hh;Rv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(e){return t.test(e)}return Hh=n,Hh}var Uh,Ev;function XA(){if(Ev)return Uh;Ev=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,f="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",a=" \\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",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",h=w+u+d+a,o="['’]",s="["+h+"]",p="["+m+"]",b="\\d+",x="["+f+"]",M="["+g+"]",R="[^"+t+h+b+f+g+l+"]",A="\\ud83c[\\udffb-\\udfff]",C="(?:"+p+"|"+A+")",O="[^"+t+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+l+"]",B="\\u200d",F="(?:"+M+"|"+R+")",L="(?:"+T+"|"+R+")",$="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",W="["+c+"]?",U="(?:"+B+"(?:"+[O,D,I].join("|")+")"+W+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",J="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=W+N+U,he="(?:"+[x,D,I].join("|")+")"+te,ee=RegExp([T+"?"+M+"+"+$+"(?="+[s,T,"$"].join("|")+")",L+"+"+_+"(?="+[s,T+F,"$"].join("|")+")",T+"?"+F+"+"+$,T+"+"+_,J,G,b,he].join("|"),"g");function le(se){return se.match(ee)||[]}return Uh=le,Uh}var Vh,Tv;function QA(){if(Tv)return Vh;Tv=1;var t=JA(),n=ZA(),e=lc(),r=XA();function m(f,g,w){return f=e(f),g=w?void 0:g,g===void 0?n(f)?r(f):t(f):f.match(g)||[]}return Vh=m,Vh}var qh,Mv;function eS(){if(Mv)return qh;Mv=1;var t=qA(),n=YA(),e=QA(),r="['’]",m=RegExp(r,"g");function f(g){return function(w){return t(e(n(w).replace(m,"")),g,"")}}return qh=f,qh}var Gh,Iv;function tS(){if(Iv)return Gh;Iv=1;var t=VA(),n=eS(),e=n(function(r,m,f){return m=m.toLowerCase(),r+(f?t(m):m)});return Gh=e,Gh}var nS=tS();const rS=Vl(nS),iS=Object.assign({"./ArrayWidget.vue":()=>st(()=>ot.import("./ArrayWidget-CmKZQfWB-316284df219381b9c608.js"),void 0),"./ArrayplotWidget.vue":()=>st(()=>ot.import("./ArrayplotWidget-D5McM1rY-84bbb4b36d873b94c8f9.js"),void 0),"./BlockWidget.vue":()=>st(()=>ot.import("./BlockWidget-BKMse4hP-8bdc0b11498302b95c1f.js"),void 0),"./ButtonWidget.vue":()=>st(()=>ot.import("./ButtonWidget-BLNVL46w-e577648e2665645edef7.js"),void 0),"./CanvasWidget.vue":()=>st(()=>ot.import("./CanvasWidget-1jy1JskS-112d32201ad2294cf975.js"),void 0),"./CanvasdotWidget.vue":()=>st(()=>ot.import("./CanvasdotWidget-DxuFGoWt-1e95745cf96436372a10.js"),void 0),"./CanvasimageWidget.vue":()=>st(()=>ot.import("./CanvasimageWidget-B_JxCI_f-4efa805404970348a383.js"),void 0),"./CanvasimagevalueWidget.vue":()=>st(()=>ot.import("./CanvasimagevalueWidget-DwHIZzWo-ce7dc4860d646547ca92.js"),void 0),"./CanvaslabelWidget.vue":()=>st(()=>ot.import("./CanvaslabelWidget-Tt4dmAOI-0791a8cb0d60b3e8652d.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>st(()=>ot.import("./CanvaslabelvalueWidget-D1-kZsi--eea1f7c137b58e94c46d.js"),void 0),"./CanvaslineWidget.vue":()=>st(()=>ot.import("./CanvaslineWidget-Din8LMyF-fc3a537b16766642b116.js"),void 0),"./CanvaslinevalueWidget.vue":()=>st(()=>ot.import("./CanvaslinevalueWidget-DOrasE2j-d8532b8ace8da01886b3.js"),void 0),"./CheckbuttonWidget.vue":()=>st(()=>ot.import("./CheckbuttonWidget-A07FryqU-461fef72d2635ff7c3d8.js"),void 0),"./ComboboxWidget.vue":()=>st(()=>ot.import("./ComboboxWidget-xayce-aY-7605f54bbaa22fd68569.js"),void 0),"./DateWidget.vue":()=>st(()=>ot.import("./DateWidget-DrYZJta_-418188177f795dd16514.js"),void 0),"./DynamicWidget.vue":()=>st(()=>ot.import("./DynamicWidget-BuSbQVhf-c06a8693b276fb5b5083.js"),void 0),"./FilechecksumWidget.vue":()=>st(()=>ot.import("./FilechecksumWidget-CTf0XGST-57da030df88bcae0840f.js"),void 0),"./FiledisplayWidget.vue":()=>st(()=>ot.import("./FiledisplayWidget-DLJuesmU-7a9c94d3f7db028b52b8.js"),void 0),"./FormatvalueWidget.vue":()=>st(()=>ot.import("./FormatvalueWidget-DODmUWPH-6b499827be47ec864d36.js"),void 0),"./HorizontalWidget.vue":()=>st(()=>ot.import("./HorizontalWidget-CZqN6UYp-3ffbc823163c6f336bbc.js"),void 0),"./HorizontalboxWidget.vue":()=>st(()=>ot.import("./HorizontalboxWidget-BV7cyhwN-01fb3d720ab9c0004ff1.js"),void 0),"./HorizontallineWidget.vue":()=>st(()=>ot.import("./HorizontallineWidget-ChDLR_8D-34c99e1ebe7cabde2cec.js"),void 0),"./IframeWidget.vue":()=>st(()=>ot.import("./IframeWidget-BdOS5sm_-830d369a6d746cc4ea70.js"),void 0),"./ImageviewerWidget.vue":()=>st(()=>ot.import("./ImageviewerWidget-DoJBe5eZ-e93fdee9a5de4d3e540f.js"),void 0),"./LabelWidget.vue":()=>st(()=>ot.import("./LabelWidget-DYwcB_S4-228ac374bdbaaf35fc94.js"),void 0),"./LabelledWidget.vue":()=>st(()=>ot.import("./LabelledWidget-D4N2gPxJ-627cb1272084c20e6ddd.js"),void 0),"./LabelprogressbarWidget.vue":()=>st(()=>ot.import("./LabelprogressbarWidget-CRnteLAo-8bb1c5ac4fefd5c5f93d.js"),void 0),"./LabelsparklineWidget.vue":()=>st(()=>ot.import("./LabelsparklineWidget-Bbjjio1S-3cb1052ea5432387b327.js"),void 0),"./LabelvalueWidget.vue":()=>st(()=>ot.import("./LabelvalueWidget-Bc6HtTMO-03e6935aea12be74b056.js"),void 0),"./LabelvaluedescWidget.vue":()=>st(()=>ot.import("./LabelvaluedescWidget-D5aDNr1o-b9941eda8fd09aeb8d5a.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>st(()=>ot.import("./LabelvaluelimitsbarWidget-CMnJoNKz-f1f138068e3c77abe3d6.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>st(()=>ot.import("./LabelvaluelimitscolumnWidget-R5ofG4q1-78da786e41b65ca740f2.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>st(()=>ot.import("./LabelvaluerangebarWidget-Qa3R2_4p-dcbaee45027629c6ede5.js"),void 0),"./LedWidget.vue":()=>st(()=>ot.import("./LedWidget-CL2dOxb7-3bbab87f88de3eada6df.js"),void 0),"./LimitsbarWidget.vue":()=>st(()=>ot.import("./LimitsbarWidget-C0N2611W-c9f1083a540f416bd609.js"),void 0),"./LimitscolorWidget.vue":()=>st(()=>ot.import("./LimitscolorWidget-GfNCPo3i-f888da188ac9d157fb04.js"),void 0),"./LimitscolumnWidget.vue":()=>st(()=>ot.import("./LimitscolumnWidget-ut6NX68S-edbe1ef81ec64412dba6.js"),void 0),"./LinegraphWidget.vue":()=>st(()=>ot.import("./LinegraphWidget-DaCyvdnI-567f1f90bbecc08449c1.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>st(()=>ot.import("./MatrixbycolumnsWidget-Cni63alW-21d337386672ee72b233.js"),void 0),"./ProgressbarWidget.vue":()=>st(()=>ot.import("./ProgressbarWidget-BWqCsk87-c7254b5a6b747c1721d0.js"),void 0),"./RadiobuttonWidget.vue":()=>st(()=>ot.import("./RadiobuttonWidget-Dza2r34f-1d7eef1843f1b2c63a33.js"),void 0),"./RadiogroupWidget.vue":()=>st(()=>ot.import("./RadiogroupWidget-DWmZMNmr-45df96c649488079d1dc.js"),void 0),"./RangebarWidget.vue":()=>st(()=>ot.import("./RangebarWidget-DsGCC1x7-1a79d953342f57177d52.js"),void 0),"./RollupWidget.vue":()=>st(()=>ot.import("./RollupWidget-DGElKXm3-26d24274fdcdc8b0f0d1.js"),void 0),"./ScrollwindowWidget.vue":()=>st(()=>ot.import("./ScrollwindowWidget-BvKT59rV-b1335c2891dd687cd82b.js"),void 0),"./SignalWidget.vue":()=>st(()=>ot.import("./SignalWidget-DRAFunW0-7dfe185f6a32704f4963.js"),void 0),"./SpacerWidget.vue":()=>st(()=>ot.import("./SpacerWidget-CUGpXBpA-4cf00997aa32318d0007.js"),void 0),"./SparklineWidget.vue":()=>st(()=>ot.import("./SparklineWidget-SBWjRrqq-e88851c1437b3c0091c1.js"),void 0),"./TabbookWidget.vue":()=>st(()=>ot.import("./TabbookWidget-7l6fPoRA-309a39ebc7060a289b55.js"),void 0),"./TextboxWidget.vue":()=>st(()=>ot.import("./TextboxWidget-Qb0TNt4Y-3ee0f155bb1a69f6087b.js"),void 0),"./TextfieldWidget.vue":()=>st(()=>ot.import("./TextfieldWidget-DcSGRfnF-0c9e29695e9c0a978059.js"),void 0),"./TimeWidget.vue":()=>st(()=>ot.import("./TimeWidget-aoMkDgRR-c2bdb71e979e1f3ded87.js"),void 0),"./TitleWidget.vue":()=>st(()=>ot.import("./TitleWidget-C8b9Vp5r-fefda26a56e5cfe6d28b.js"),void 0),"./ValueWidget.vue":()=>st(()=>ot.import("./ValueWidget-B1OvCmXK-09e4bc6504657c9b88e9.js"),void 0),"./ValuelimitsbarWidget.vue":()=>st(()=>ot.import("./ValuelimitsbarWidget-CUd9P_Xg-1b29e5d70333e68048fa.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>st(()=>ot.import("./ValuelimitscolumnWidget-CbThSMma-abe8e36e957d772236ce.js"),void 0),"./ValuerangebarWidget.vue":()=>st(()=>ot.import("./ValuerangebarWidget-DjL4ze3d-50409a8ea2bb90611d48.js"),void 0),"./VerticalWidget.vue":()=>st(()=>ot.import("./VerticalWidget-V5-vGq7l-d4d21b3cdc3044ddb3eb.js"),void 0),"./VerticalboxWidget.vue":()=>st(()=>ot.import("./VerticalboxWidget-OigMLjH8-c9332d7615a38507d88f.js"),void 0)}),oS=Object.entries(iS).reduce((t,[n,e])=>{n=n.split("/").pop();const r=UA(rS(n.replace(/\.\w+$/,"")));return{...t,[r]:_f(e)}},{}),B2=Tn("w",{components:oS});function Lv(t,n){return function(){return t.apply(n,arguments)}}const{toString:sS}=Object.prototype,{getPrototypeOf:cc}=Object,{iterator:uc,toStringTag:Ov}=Symbol,hc=(t=>n=>{const e=sS.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ki=t=>(t=t.toLowerCase(),n=>hc(n)===t),dc=t=>n=>typeof n===t,{isArray:aa}=Array,la=dc("undefined");function Za(t){return t!==null&&!la(t)&&t.constructor!==null&&!la(t.constructor)&&ii(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Nv=Ki("ArrayBuffer");function aS(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Nv(t.buffer),n}const lS=dc("string"),ii=dc("function"),Dv=dc("number"),Xa=t=>t!==null&&typeof t=="object",cS=t=>t===!0||t===!1,fc=t=>{if(hc(t)!=="object")return!1;const n=cc(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Ov in t)&&!(uc in t)},uS=t=>{if(!Xa(t)||Za(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},hS=Ki("Date"),dS=Ki("File"),fS=t=>!!(t&&typeof t.uri<"u"),pS=t=>t&&typeof t.getParts<"u",gS=Ki("Blob"),mS=Ki("FileList"),vS=t=>Xa(t)&&ii(t.pipe);function yS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Pv=yS(),Fv=typeof Pv.FormData<"u"?Pv.FormData:void 0,bS=t=>{if(!t)return!1;if(Fv&&t instanceof Fv)return!0;const n=cc(t);if(!n||n===Object.prototype||!ii(t.append))return!1;const e=hc(t);return e==="formdata"||e==="object"&&ii(t.toString)&&t.toString()==="[object FormData]"},wS=Ki("URLSearchParams"),[xS,CS,_S,kS]=["ReadableStream","Request","Response","Headers"].map(Ki),AS=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qa(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),aa(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(Za(t))return;const f=e?Object.getOwnPropertyNames(t):Object.keys(t),g=f.length;let w;for(r=0;r<g;r++)w=f[r],n.call(null,t[w],w,t)}}function zv(t,n){if(Za(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wv=t=>!la(t)&&t!==bs;function Kh(...t){const{caseless:n,skipUndefined:e}=Wv(this)&&this||{},r={},m=(f,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const w=n&&zv(r,g)||g,u=Yh(r,w)?r[w]:void 0;fc(u)&&fc(f)?r[w]=Kh(u,f):fc(f)?r[w]=Kh({},f):aa(f)?r[w]=f.slice():(!e||!la(f))&&(r[w]=f)};for(let f=0,g=t.length;f<g;f++)t[f]&&Qa(t[f],m);return r}const SS=(t,n,e,{allOwnKeys:r}={})=>(Qa(n,(m,f)=>{e&&ii(m)?Object.defineProperty(t,f,{__proto__:null,value:Lv(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,f,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),$S=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),RS=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),e&&Object.assign(t.prototype,e)},ES=(t,n,e,r)=>{let m,f,g;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),f=m.length;f-- >0;)g=m[f],(!r||r(g,t,n))&&!w[g]&&(n[g]=t[g],w[g]=!0);t=e!==!1&&cc(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},TS=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},MS=t=>{if(!t)return null;if(aa(t))return t;let n=t.length;if(!Dv(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},IS=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&cc(Uint8Array)),LS=(t,n)=>{const e=(t&&t[uc]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},OS=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},NS=Ki("HTMLFormElement"),DS=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),Yh=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),PS=Ki("RegExp"),Bv=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};Qa(e,(m,f)=>{let g;(g=n(m,f,t))!==!1&&(r[f]=g||m)}),Object.defineProperties(t,r)},FS=t=>{Bv(t,(n,e)=>{if(ii(t)&&["arguments","caller","callee"].includes(e))return!1;const r=t[e];if(ii(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},zS=(t,n)=>{const e={},r=m=>{m.forEach(f=>{e[f]=!0})};return aa(t)?r(t):r(String(t).split(n)),e},WS=()=>{},BS=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function jS(t){return!!(t&&ii(t.append)&&t[Ov]==="FormData"&&t[uc])}const HS=t=>{const n=new Array(10),e=(r,m)=>{if(Xa(r)){if(n.indexOf(r)>=0)return;if(Za(r))return r;if(!("toJSON"in r)){n[m]=r;const f=aa(r)?[]:{};return Qa(r,(g,w)=>{const u=e(g,m+1);!la(u)&&(f[w]=u)}),n[m]=void 0,f}}return r};return e(t,0)},US=Ki("AsyncFunction"),VS=t=>t&&(Xa(t)||ii(t))&&ii(t.then)&&ii(t.catch),jv=((t,n)=>t?setImmediate:n?((e,r)=>(bs.addEventListener("message",({source:m,data:f})=>{m===bs&&f===e&&r.length&&r.shift()()},!1),m=>{r.push(m),bs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ii(bs.postMessage)),qS=typeof queueMicrotask<"u"?queueMicrotask.bind(bs):typeof process<"u"&&process.nextTick||jv,GS=t=>t!=null&&ii(t[uc]),_e={isArray:aa,isArrayBuffer:Nv,isBuffer:Za,isFormData:bS,isArrayBufferView:aS,isString:lS,isNumber:Dv,isBoolean:cS,isObject:Xa,isPlainObject:fc,isEmptyObject:uS,isReadableStream:xS,isRequest:CS,isResponse:_S,isHeaders:kS,isUndefined:la,isDate:hS,isFile:dS,isReactNativeBlob:fS,isReactNative:pS,isBlob:gS,isRegExp:PS,isFunction:ii,isStream:vS,isURLSearchParams:wS,isTypedArray:IS,isFileList:mS,forEach:Qa,merge:Kh,extend:SS,trim:AS,stripBOM:$S,inherits:RS,toFlatObject:ES,kindOf:hc,kindOfTest:Ki,endsWith:TS,toArray:MS,forEachEntry:LS,matchAll:OS,isHTMLForm:NS,hasOwnProperty:Yh,hasOwnProp:Yh,reduceDescriptors:Bv,freezeMethods:FS,toObjectSet:zS,toCamelCase:DS,noop:WS,toFiniteNumber:BS,findKey:zv,global:bs,isContextDefined:Wv,isSpecCompliantForm:jS,toJSONObject:HS,isAsyncFn:US,isThenable:VS,setImmediate:jv,asap:qS,isIterable:GS},KS=_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"]),YS=t=>{const n={};let e,r,m;return t&&t.split(`
1481
+ `).forEach(function(f){m=f.indexOf(":"),e=f.substring(0,m).trim().toLowerCase(),r=f.substring(m+1).trim(),!(!e||n[e]&&KS[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n},Hv=Symbol("internals"),JS=/[^\x09\x20-\x7E\x80-\xFF]/g;function ZS(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}function el(t){return t&&String(t).trim().toLowerCase()}function XS(t){return ZS(t.replace(JS,""))}function pc(t){return t===!1||t==null?t:_e.isArray(t)?t.map(pc):XS(String(t))}function QS(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const e$=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Jh(t,n,e,r,m){if(_e.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!_e.isString(n)){if(_e.isString(r))return n.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(n)}}function t$(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function n$(t,n){const e=_e.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{__proto__:null,value:function(m,f,g){return this[r].call(this,n,m,f,g)},configurable:!0})})}let Hr=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function f(w,u,d){const a=el(u);if(!a)throw new Error("header name must be a non-empty string");const l=_e.findKey(m,a);(!l||m[l]===void 0||d===!0||d===void 0&&m[l]!==!1)&&(m[l||u]=pc(w))}const g=(w,u)=>_e.forEach(w,(d,a)=>f(d,a,u));if(_e.isPlainObject(n)||n instanceof this.constructor)g(n,e);else if(_e.isString(n)&&(n=n.trim())&&!e$(n))g(YS(n),e);else if(_e.isObject(n)&&_e.isIterable(n)){let w={},u,d;for(const a of n){if(!_e.isArray(a))throw TypeError("Object iterator must return a key-value pair");w[d=a[0]]=(u=w[d])?_e.isArray(u)?[...u,a[1]]:[u,a[1]]:a[1]}g(w,e)}else n!=null&&f(e,n,r);return this}get(n,e){if(n=el(n),n){const r=_e.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return QS(m);if(_e.isFunction(e))return e.call(this,m,r);if(_e.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=el(n),n){const r=_e.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||Jh(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function f(g){if(g=el(g),g){const w=_e.findKey(r,g);w&&(!e||Jh(r,r[w],w,e))&&(delete r[w],m=!0)}}return _e.isArray(n)?n.forEach(f):f(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const f=e[r];(!n||Jh(this,this[f],f,n,!0))&&(delete this[f],m=!0)}return m}normalize(n){const e=this,r={};return _e.forEach(this,(m,f)=>{const g=_e.findKey(r,f);if(g){e[g]=pc(m),delete e[f];return}const w=n?t$(f):String(f).trim();w!==f&&delete e[f],e[w]=pc(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return _e.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&_e.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
1482
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[Hv]=this[Hv]={accessors:{}}).accessors,r=this.prototype;function m(f){const g=el(f);e[g]||(n$(r,f),e[g]=!0)}return _e.isArray(n)?n.forEach(m):m(n),this}};Hr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Hr.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),_e.freezeMethods(Hr);const r$="[REDACTED ****]";function i$(t){if(_e.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(_e.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function o$(t,n){const e=new Set(n.map(f=>String(f).toLowerCase())),r=[],m=f=>{if(f===null||typeof f!="object"||_e.isBuffer(f))return f;if(r.indexOf(f)!==-1)return;f instanceof Hr&&(f=f.toJSON()),r.push(f);let g;if(_e.isArray(f))g=[],f.forEach((w,u)=>{const d=m(w);_e.isUndefined(d)||(g[u]=d)});else{if(!_e.isPlainObject(f)&&i$(f))return r.pop(),f;g=Object.create(null);for(const[w,u]of Object.entries(f)){const d=e.has(w.toLowerCase())?r$:m(u);_e.isUndefined(d)||(g[w]=d)}}return r.pop(),g};return m(t)}let rt=class Y0 extends Error{static from(n,e,r,m,f,g){const w=new Y0(n.message,e||n.code,r,m,f);return w.cause=n,w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),g&&Object.assign(w,g),w}constructor(n,e,r,m,f){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),f&&(this.response=f,this.status=f.status)}toJSON(){const n=this.config,e=n&&_e.hasOwnProp(n,"redact")?n.redact:void 0,r=_e.isArray(e)&&e.length>0?o$(n,e):_e.toJSONObject(n);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}}};rt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",rt.ERR_BAD_OPTION="ERR_BAD_OPTION",rt.ECONNABORTED="ECONNABORTED",rt.ETIMEDOUT="ETIMEDOUT",rt.ECONNREFUSED="ECONNREFUSED",rt.ERR_NETWORK="ERR_NETWORK",rt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",rt.ERR_DEPRECATED="ERR_DEPRECATED",rt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",rt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",rt.ERR_CANCELED="ERR_CANCELED",rt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",rt.ERR_INVALID_URL="ERR_INVALID_URL",rt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const s$=null;function Zh(t){return _e.isPlainObject(t)||_e.isArray(t)}function Uv(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function Xh(t,n,e){return t?t.concat(n).map(function(r,m){return r=Uv(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function a$(t){return _e.isArray(t)&&!t.some(Zh)}const l$=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function gc(t,n,e){if(!_e.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=_e.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(s,p){return!_e.isUndefined(p[s])});const r=e.metaTokens,m=e.visitor||l,f=e.dots,g=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,u=e.maxDepth===void 0?100:e.maxDepth,d=w&&_e.isSpecCompliantForm(n);if(!_e.isFunction(m))throw new TypeError("visitor must be a function");function a(s){if(s===null)return"";if(_e.isDate(s))return s.toISOString();if(_e.isBoolean(s))return s.toString();if(!d&&_e.isBlob(s))throw new rt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(s)||_e.isTypedArray(s)?d&&typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function l(s,p,b){let x=s;if(_e.isReactNative(n)&&_e.isReactNativeBlob(s))return n.append(Xh(b,p,f),a(s)),!1;if(s&&!b&&typeof s=="object"){if(_e.endsWith(p,"{}"))p=r?p:p.slice(0,-2),s=JSON.stringify(s);else if(_e.isArray(s)&&a$(s)||(_e.isFileList(s)||_e.endsWith(p,"[]"))&&(x=_e.toArray(s)))return p=Uv(p),x.forEach(function(M,R){!(_e.isUndefined(M)||M===null)&&n.append(g===!0?Xh([p],R,f):g===null?p:p+"[]",a(M))}),!1}return Zh(s)?!0:(n.append(Xh(b,p,f),a(s)),!1)}const c=[],h=Object.assign(l$,{defaultVisitor:l,convertValue:a,isVisitable:Zh});function o(s,p,b=0){if(!_e.isUndefined(s)){if(b>u)throw new rt("Object is too deeply nested ("+b+" levels). Max depth: "+u,rt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(c.indexOf(s)!==-1)throw Error("Circular reference detected in "+p.join("."));c.push(s),_e.forEach(s,function(x,M){(!(_e.isUndefined(x)||x===null)&&m.call(n,x,_e.isString(M)?M.trim():M,p,h))===!0&&o(x,p?p.concat(M):[M],b+1)}),c.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return o(t),n}function Vv(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function Qh(t,n){this._pairs=[],t&&gc(t,this,n)}const qv=Qh.prototype;qv.append=function(t,n){this._pairs.push([t,n])},qv.toString=function(t){const n=t?function(e){return t.call(this,e,Vv)}:Vv;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function c$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gv(t,n,e){if(!n)return t;const r=e&&e.encode||c$,m=_e.isFunction(e)?{serialize:e}:e,f=m&&m.serialize;let g;if(f?g=f(n,m):g=_e.isURLSearchParams(n)?n.toString():new Qh(n,m).toString(r),g){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+g}return t}class Kv{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){_e.forEach(this.handlers,function(e){e!==null&&n(e)})}}const ed={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},u$=typeof URLSearchParams<"u"?URLSearchParams:Qh,h$=typeof FormData<"u"?FormData:null,d$=typeof Blob<"u"?Blob:null,f$={isBrowser:!0,classes:{URLSearchParams:u$,FormData:h$,Blob:d$},protocols:["http","https","file","blob","url","data"]},td=typeof window<"u"&&typeof document<"u",nd=typeof navigator=="object"&&navigator||void 0,p$=td&&(!nd||["ReactNative","NativeScript","NS"].indexOf(nd.product)<0),g$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",m$=td&&window.location.href||"http://localhost",v$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:td,hasStandardBrowserEnv:p$,hasStandardBrowserWebWorkerEnv:g$,navigator:nd,origin:m$},Symbol.toStringTag,{value:"Module"})),Mr={...v$,...f$};function y$(t,n){return gc(t,new Mr.classes.URLSearchParams,{visitor:function(e,r,m,f){return Mr.isNode&&_e.isBuffer(e)?(this.append(r,e.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...n})}function b$(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function w$(t){const n={},e=Object.keys(t);let r;const m=e.length;let f;for(r=0;r<m;r++)f=e[r],n[f]=t[f];return n}function Yv(t){function n(e,r,m,f){let g=e[f++];if(g==="__proto__")return!0;const w=Number.isFinite(+g),u=f>=e.length;return g=!g&&_e.isArray(m)?m.length:g,u?(_e.hasOwnProp(m,g)?m[g]=_e.isArray(m[g])?m[g].concat(r):[m[g],r]:m[g]=r,!w):((!m[g]||!_e.isObject(m[g]))&&(m[g]=[]),n(e,r,m[g],f)&&_e.isArray(m[g])&&(m[g]=w$(m[g])),!w)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const e={};return _e.forEachEntry(t,(r,m)=>{n(b$(r),m,e,0)}),e}return null}const ca=(t,n)=>t!=null&&_e.hasOwnProp(t,n)?t[n]:void 0;function x$(t,n,e){if(_e.isString(t))try{return(n||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const tl={transitional:ed,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=_e.isObject(t);if(m&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return r?JSON.stringify(Yv(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(m){const g=ca(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return y$(t,g).toString();if((f=_e.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=ca(this,"env"),u=w&&w.FormData;return gc(f?{"files[]":t}:t,u&&new u,g)}}return m||r?(n.setContentType("application/json",!1),x$(t)):t}],transformResponse:[function(t){const n=ca(this,"transitional")||tl.transitional,e=n&&n.forcedJSONParsing,r=ca(this,"responseType"),m=r==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(e&&!r||m)){const f=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,ca(this,"parseReviver"))}catch(g){if(f)throw g.name==="SyntaxError"?rt.from(g,rt.ERR_BAD_RESPONSE,this,null,ca(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mr.classes.FormData,Blob:Mr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch","query"],t=>{tl.headers[t]={}});function rd(t,n){const e=this||tl,r=n||e,m=Hr.from(r.headers);let f=r.data;return _e.forEach(t,function(g){f=g.call(e,f,m.normalize(),n?n.status:void 0)}),m.normalize(),f}function Jv(t){return!!(t&&t.__CANCEL__)}let nl=class extends rt{constructor(n,e,r){super(n??"canceled",rt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Zv(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new rt("Request failed with status code "+e.status,e.status>=400&&e.status<500?rt.ERR_BAD_REQUEST:rt.ERR_BAD_RESPONSE,e.config,e.request,e))}function C$(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function _$(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,f=0,g;return n=n!==void 0?n:1e3,function(w){const u=Date.now(),d=r[f];g||(g=u),e[m]=w,r[m]=u;let a=f,l=0;for(;a!==m;)l+=e[a++],a=a%t;if(m=(m+1)%t,m===f&&(f=(f+1)%t),u-g<n)return;const c=d&&u-d;return c?Math.round(l*1e3/c):void 0}}function k$(t,n){let e=0,r=1e3/n,m,f;const g=(w,u=Date.now())=>{e=u,m=null,f&&(clearTimeout(f),f=null),t(...w)};return[(...w)=>{const u=Date.now(),d=u-e;d>=r?g(w,u):(m=w,f||(f=setTimeout(()=>{f=null,g(m)},r-d)))},()=>m&&g(m)]}const mc=(t,n,e=3)=>{let r=0;const m=_$(50,250);return k$(f=>{const g=f.loaded,w=f.lengthComputable?f.total:void 0,u=w!=null?Math.min(g,w):g,d=Math.max(0,u-r),a=m(d);r=Math.max(r,u);const l={loaded:u,total:w,progress:w?u/w:void 0,bytes:d,rate:a||void 0,estimated:a&&w?(w-u)/a:void 0,event:f,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(l)},e)},Xv=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},Qv=t=>(...n)=>_e.asap(()=>t(...n)),A$=Mr.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,Mr.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(Mr.origin),Mr.navigator&&/(msie|trident)/i.test(Mr.navigator.userAgent)):()=>!0,S$=Mr.hasStandardBrowserEnv?{write(t,n,e,r,m,f,g){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];_e.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),_e.isString(r)&&w.push(`path=${r}`),_e.isString(m)&&w.push(`domain=${m}`),f===!0&&w.push("secure"),_e.isString(g)&&w.push(`SameSite=${g}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let e=0;e<n.length;e++){const r=n[e].replace(/^\s+/,""),m=r.indexOf("=");if(m!==-1&&r.slice(0,m)===t)return decodeURIComponent(r.slice(m+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $$(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function R$(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function ey(t,n,e){let r=!$$(n);return t&&(r||e===!1)?R$(t,n):n}const ty=t=>t instanceof Hr?{...t}:t;function ws(t,n){n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,a,l,c){return _e.isPlainObject(d)&&_e.isPlainObject(a)?_e.merge.call({caseless:c},d,a):_e.isPlainObject(a)?_e.merge({},a):_e.isArray(a)?a.slice():a}function m(d,a,l,c){if(_e.isUndefined(a)){if(!_e.isUndefined(d))return r(void 0,d,l,c)}else return r(d,a,l,c)}function f(d,a){if(!_e.isUndefined(a))return r(void 0,a)}function g(d,a){if(_e.isUndefined(a)){if(!_e.isUndefined(d))return r(void 0,d)}else return r(void 0,a)}function w(d,a,l){if(_e.hasOwnProp(n,l))return r(d,a);if(_e.hasOwnProp(t,l))return r(void 0,d)}const u={url:f,method:f,data:f,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:w,headers:(d,a,l)=>m(ty(d),ty(a),l,!0)};return _e.forEach(Object.keys({...t,...n}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const a=_e.hasOwnProp(u,d)?u[d]:m,l=_e.hasOwnProp(t,d)?t[d]:void 0,c=_e.hasOwnProp(n,d)?n[d]:void 0,h=a(l,c,d);_e.isUndefined(h)&&a!==w||(e[d]=h)}),e}const E$=["content-type","content-length"];function T$(t,n,e){if(e!=="content-only"){t.set(n);return}Object.entries(n).forEach(([r,m])=>{E$.includes(r.toLowerCase())&&t.set(r,m)})}const M$=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16))),ny=t=>{const n=ws({},t),e=c=>_e.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const f=e("xsrfHeaderName"),g=e("xsrfCookieName");let w=e("headers");const u=e("auth"),d=e("baseURL"),a=e("allowAbsoluteUrls"),l=e("url");if(n.headers=w=Hr.from(w),n.url=Gv(ey(d,l,a),t.params,t.paramsSerializer),u&&w.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?M$(u.password):""))),_e.isFormData(r)&&(Mr.hasStandardBrowserEnv||Mr.hasStandardBrowserWebWorkerEnv?w.setContentType(void 0):_e.isFunction(r.getHeaders)&&T$(w,r.getHeaders(),e("formDataHeaderPolicy"))),Mr.hasStandardBrowserEnv&&(_e.isFunction(m)&&(m=m(n)),m===!0||m==null&&A$(n.url))){const c=f&&g&&S$.read(g);c&&w.set(f,c)}return n},I$=typeof XMLHttpRequest<"u",L$=I$&&function(t){return new Promise(function(n,e){const r=ny(t);let m=r.data;const f=Hr.from(r.headers).normalize();let{responseType:g,onUploadProgress:w,onDownloadProgress:u}=r,d,a,l,c,h;function o(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function p(){if(!s)return;const x=Hr.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),M={data:!g||g==="text"||g==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:t,request:s};Zv(function(R){n(R),o()},function(R){e(R),o()},M),s=null}"onloadend"in s?s.onloadend=p:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.startsWith("file:"))||setTimeout(p)},s.onabort=function(){s&&(e(new rt("Request aborted",rt.ECONNABORTED,t,s)),o(),s=null)},s.onerror=function(x){const M=x&&x.message?x.message:"Network Error",R=new rt(M,rt.ERR_NETWORK,t,s);R.event=x||null,e(R),o(),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||ed;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new rt(x,M.clarifyTimeoutError?rt.ETIMEDOUT:rt.ECONNABORTED,t,s)),o(),s=null},m===void 0&&f.setContentType(null),"setRequestHeader"in s&&_e.forEach(f.toJSON(),function(x,M){s.setRequestHeader(M,x)}),_e.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),g&&g!=="json"&&(s.responseType=r.responseType),u&&([l,h]=mc(u,!0),s.addEventListener("progress",l)),w&&s.upload&&([a,c]=mc(w),s.upload.addEventListener("progress",a),s.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new nl(null,t,s):x),s.abort(),o(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const b=C$(r.url);if(b&&!Mr.protocols.includes(b)){e(new rt("Unsupported protocol "+b+":",rt.ERR_BAD_REQUEST,t));return}s.send(m||null)})},O$=(t,n)=>{const{length:e}=t=t?t.filter(Boolean):[];if(n||e){let r=new AbortController,m;const f=function(d){if(!m){m=!0,w();const a=d instanceof Error?d:this.reason;r.abort(a instanceof rt?a:new nl(a instanceof Error?a.message:a))}};let g=n&&setTimeout(()=>{g=null,f(new rt(`timeout of ${n}ms exceeded`,rt.ETIMEDOUT))},n);const w=()=>{t&&(g&&clearTimeout(g),g=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(f):d.removeEventListener("abort",f)}),t=null)};t.forEach(d=>d.addEventListener("abort",f));const{signal:u}=r;return u.unsubscribe=()=>_e.asap(w),u}},N$=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},D$=async function*(t,n){for await(const e of P$(t))yield*N$(e,n)},P$=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},ry=(t,n,e,r)=>{const m=D$(t,n);let f=0,g,w=u=>{g||(g=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:a}=await m.next();if(d){w(),u.close();return}let l=a.byteLength;if(e){let c=f+=l;e(c)}u.enqueue(new Uint8Array(a))}catch(d){throw w(d),d}},cancel(u){return w(u),m.return()}},{highWaterMark:2})};function F$(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const e=t.slice(5,n),r=t.slice(n+1);if(/;base64/i.test(e)){let f=r.length;const g=r.length;for(let l=0;l<g;l++)if(r.charCodeAt(l)===37&&l+2<g){const c=r.charCodeAt(l+1),h=r.charCodeAt(l+2);(c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102)&&(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102)&&(f-=2,l+=2)}let w=0,u=g-1;const d=l=>l>=2&&r.charCodeAt(l-2)===37&&r.charCodeAt(l-1)===51&&(r.charCodeAt(l)===68||r.charCodeAt(l)===100);u>=0&&(r.charCodeAt(u)===61?(w++,u--):d(u)&&(w++,u-=3)),w===1&&u>=0&&(r.charCodeAt(u)===61||d(u))&&w++;const a=Math.floor(f/4)*3-(w||0);return a>0?a:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let m=0;for(let f=0,g=r.length;f<g;f++){const w=r.charCodeAt(f);if(w<128)m+=1;else if(w<2048)m+=2;else if(w>=55296&&w<=56319&&f+1<g){const u=r.charCodeAt(f+1);u>=56320&&u<=57343?(m+=4,f++):m+=3}else m+=3}return m}const id="1.16.0",iy=64*1024,{isFunction:vc}=_e,oy=(t,...n)=>{try{return!!t(...n)}catch{return!1}},z$=t=>{const n=_e.global??globalThis,{ReadableStream:e,TextEncoder:r}=n;t=_e.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:m,Request:f,Response:g}=t,w=m?vc(m):typeof fetch=="function",u=vc(f),d=vc(g);if(!w)return!1;const a=w&&vc(e),l=w&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new f(b).arrayBuffer())),c=u&&a&&oy(()=>{let b=!1;const x=new f(Mr.origin,{body:new e,method:"POST",get duplex(){return b=!0,"half"}}),M=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!M}),h=d&&a&&oy(()=>_e.isReadableStream(new g("").body)),o={stream:h&&(b=>b.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!o[b]&&(o[b]=(x,M)=>{let R=x&&x[b];if(R)return R.call(x);throw new rt(`Response type '${b}' is not supported`,rt.ERR_NOT_SUPPORT,M)})});const s=async b=>{if(b==null)return 0;if(_e.isBlob(b))return b.size;if(_e.isSpecCompliantForm(b))return(await new f(Mr.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(b)||_e.isArrayBuffer(b))return b.byteLength;if(_e.isURLSearchParams(b)&&(b=b+""),_e.isString(b))return(await l(b)).byteLength},p=async(b,x)=>_e.toFiniteNumber(b.getContentLength())??s(x);return async b=>{let{url:x,method:M,data:R,signal:A,cancelToken:C,timeout:O,onDownloadProgress:D,onUploadProgress:I,responseType:T,headers:B,withCredentials:F="same-origin",fetchOptions:L,maxContentLength:$,maxBodyLength:_}=ny(b);const N=_e.isNumber($)&&$>-1,W=_e.isNumber(_)&&_>-1;let U=m||fetch;T=T?(T+"").toLowerCase():"text";let G=O$([A,C&&C.toAbortSignal()],O),J=null;const te=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let he;try{if(N&&typeof x=="string"&&x.startsWith("data:")&&F$(x)>$)throw new rt("maxContentLength size of "+$+" exceeded",rt.ERR_BAD_RESPONSE,b,J);if(W&&M!=="get"&&M!=="head"){const ve=await p(B,R);if(typeof ve=="number"&&isFinite(ve)&&ve>_)throw new rt("Request body larger than maxBodyLength limit",rt.ERR_BAD_REQUEST,b,J)}if(I&&c&&M!=="get"&&M!=="head"&&(he=await p(B,R))!==0){let ve=new f(x,{method:"POST",body:R,duplex:"half"}),$e;if(_e.isFormData(R)&&($e=ve.headers.get("content-type"))&&B.setContentType($e),ve.body){const[Ee,qe]=Xv(he,mc(Qv(I)));R=ry(ve.body,iy,Ee,qe)}}_e.isString(F)||(F=F?"include":"omit");const ee=u&&"credentials"in f.prototype;if(_e.isFormData(R)){const ve=B.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&B.delete("content-type")}B.set("User-Agent","axios/"+id,!1);const le={...L,signal:G,method:M.toUpperCase(),headers:B.normalize().toJSON(),body:R,duplex:"half",credentials:ee?F:void 0};J=u&&new f(x,le);let se=await(u?U(J,L):U(x,le));if(N){const ve=_e.toFiniteNumber(se.headers.get("content-length"));if(ve!=null&&ve>$)throw new rt("maxContentLength size of "+$+" exceeded",rt.ERR_BAD_RESPONSE,b,J)}const ce=h&&(T==="stream"||T==="response");if(h&&se.body&&(D||N||ce&&te)){const ve={};["status","statusText","headers"].forEach(Xe=>{ve[Xe]=se[Xe]});const $e=_e.toFiniteNumber(se.headers.get("content-length")),[Ee,qe]=D&&Xv($e,mc(Qv(D),!0))||[];let He=0;const tt=Xe=>{if(N&&(He=Xe,He>$))throw new rt("maxContentLength size of "+$+" exceeded",rt.ERR_BAD_RESPONSE,b,J);Ee&&Ee(Xe)};se=new g(ry(se.body,iy,tt,()=>{qe&&qe(),te&&te()}),ve)}T=T||"text";let pe=await o[_e.findKey(o,T)||"text"](se,b);if(N&&!h&&!ce){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>$)throw new rt("maxContentLength size of "+$+" exceeded",rt.ERR_BAD_RESPONSE,b,J)}return!ce&&te&&te(),await new Promise((ve,$e)=>{Zv(ve,$e,{data:pe,headers:Hr.from(se.headers),status:se.status,statusText:se.statusText,config:b,request:J})})}catch(ee){if(te&&te(),G&&G.aborted&&G.reason instanceof rt){const le=G.reason;throw le.config=b,J&&(le.request=J),ee!==le&&(le.cause=ee),le}throw ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new rt("Network Error",rt.ERR_NETWORK,b,J,ee&&ee.response),{cause:ee.cause||ee}):rt.from(ee,ee&&ee.code,b,J,ee&&ee.response)}}},W$=new Map,sy=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,f=[r,m,e];let g=f.length,w=g,u,d,a=W$;for(;w--;)u=f[w],d=a.get(u),d===void 0&&a.set(u,d=w?new Map:z$(n)),a=d;return d};sy();const od={http:s$,xhr:L$,fetch:{get:sy}};_e.forEach(od,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const ay=t=>`- ${t}`,B$=t=>_e.isFunction(t)||t===null||t===!1;function j$(t,n){t=_e.isArray(t)?t:[t];const{length:e}=t;let r,m;const f={};for(let g=0;g<e;g++){r=t[g];let w;if(m=r,!B$(r)&&(m=od[(w=String(r)).toLowerCase()],m===void 0))throw new rt(`Unknown adapter '${w}'`);if(m&&(_e.isFunction(m)||(m=m.get(n))))break;f[w||"#"+g]=m}if(!m){const g=Object.entries(f).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let w=e?g.length>1?`since :
1483
+ `+g.map(ay).join(`
1484
+ `):" "+ay(g[0]):"as no adapter specified";throw new rt("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return m}const ly={getAdapter:j$,adapters:od};function sd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new nl(null,t)}function cy(t){return sd(t),t.headers=Hr.from(t.headers),t.data=rd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ly.getAdapter(t.adapter||tl.adapter,t)(t).then(function(n){sd(t),t.response=n;try{n.data=rd.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=Hr.from(n.headers),n},function(n){if(!Jv(n)&&(sd(t),n&&n.response)){t.response=n.response;try{n.response.data=rd.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=Hr.from(n.response.headers)}return Promise.reject(n)})}const yc={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{yc[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const uy={};yc.transitional=function(t,n,e){function r(m,f){return"[Axios v"+id+"] Transitional option '"+m+"'"+f+(e?". "+e:"")}return(m,f,g)=>{if(t===!1)throw new rt(r(f," has been removed"+(n?" in "+n:"")),rt.ERR_DEPRECATED);return n&&!uy[f]&&(uy[f]=!0,console.warn(r(f," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,f,g):!0}},yc.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function H$(t,n,e){if(typeof t!="object")throw new rt("options must be an object",rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const f=r[m],g=Object.prototype.hasOwnProperty.call(n,f)?n[f]:void 0;if(g){const w=t[f],u=w===void 0||g(w,f,t);if(u!==!0)throw new rt("option "+f+" must be "+u,rt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new rt("Unknown option "+f,rt.ERR_BAD_OPTION)}}const bc={assertOptions:H$,validators:yc},Mi=bc.validators;let xs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Kv,response:new Kv}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const f=(()=>{if(!m.stack)return"";const g=m.stack.indexOf(`
1485
+ `);return g===-1?"":m.stack.slice(g+1)})();try{if(!r.stack)r.stack=f;else if(f){const g=f.indexOf(`
1486
+ `),w=g===-1?-1:f.indexOf(`
1487
+ `,g+1),u=w===-1?"":f.slice(w+1);String(r.stack).endsWith(u)||(r.stack+=`
1488
+ `+f)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=ws(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:f}=e;r!==void 0&&bc.assertOptions(r,{silentJSONParsing:Mi.transitional(Mi.boolean),forcedJSONParsing:Mi.transitional(Mi.boolean),clarifyTimeoutError:Mi.transitional(Mi.boolean),legacyInterceptorReqResOrdering:Mi.transitional(Mi.boolean)},!1),m!=null&&(_e.isFunction(m)?e.paramsSerializer={serialize:m}:bc.assertOptions(m,{encode:Mi.function,serialize:Mi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),bc.assertOptions(e,{baseUrl:Mi.spelling("baseURL"),withXsrfToken:Mi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=f&&_e.merge(f.common,f[e.method]);f&&_e.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete f[o]}),e.headers=Hr.concat(g,f);const w=[];let u=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;u=u&&o.synchronous;const s=e.transitional||ed;s&&s.legacyInterceptorReqResOrdering?w.unshift(o.fulfilled,o.rejected):w.push(o.fulfilled,o.rejected)});const d=[];this.interceptors.response.forEach(function(o){d.push(o.fulfilled,o.rejected)});let a,l=0,c;if(!u){const o=[cy.bind(this),void 0];for(o.unshift(...w),o.push(...d),c=o.length,a=Promise.resolve(e);l<c;)a=a.then(o[l++],o[l++]);return a}c=w.length;let h=e;for(;l<c;){const o=w[l++],s=w[l++];try{h=o(h)}catch(p){s.call(this,p);break}}try{a=cy.call(this,h)}catch(o){return Promise.reject(o)}for(l=0,c=d.length;l<c;)a=a.then(d[l++],d[l++]);return a}getUri(n){n=ws(this.defaults,n);const e=ey(n.baseURL,n.url,n.allowAbsoluteUrls);return Gv(e,n.params,n.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){xs.prototype[t]=function(n,e){return this.request(ws(e||{},{method:t,url:n,data:(e||{}).data}))}}),_e.forEach(["post","put","patch","query"],function(t){function n(e){return function(r,m,f){return this.request(ws(f||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}xs.prototype[t]=n(),t!=="query"&&(xs.prototype[t+"Form"]=n(!0))});let U$=class J0{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](m);r._listeners=null}),this.promise.then=m=>{let f;const g=new Promise(w=>{r.subscribe(w),f=w}).then(m);return g.cancel=function(){r.unsubscribe(f)},g},n(function(m,f,g){r.reason||(r.reason=new nl(m,f,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new J0(function(e){n=e}),cancel:n}}};function V$(t){return function(n){return t.apply(null,n)}}function q$(t){return _e.isObject(t)&&t.isAxiosError===!0}const ad={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(ad).forEach(([t,n])=>{ad[n]=t});function hy(t){const n=new xs(t),e=Lv(xs.prototype.request,n);return _e.extend(e,xs.prototype,n,{allOwnKeys:!0}),_e.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return hy(ws(t,r))},e}const Yn=Tn("A",hy(tl));Yn.Axios=xs,Yn.CanceledError=nl,Yn.CancelToken=U$,Yn.isCancel=Jv,Yn.VERSION=id,Yn.toFormData=gc,Yn.AxiosError=rt,Yn.Cancel=Yn.CanceledError,Yn.all=function(t){return Promise.all(t)},Yn.spread=V$,Yn.isAxiosError=q$,Yn.mergeConfig=ws,Yn.AxiosHeaders=Hr,Yn.formToJSON=t=>Yv(_e.isHTMLForm(t)?new FormData(t):t),Yn.getAdapter=ly.getAdapter,Yn.HttpStatusCode=ad,Yn.default=Yn;const{Axios:j2,AxiosError:H2,CanceledError:U2,isCancel:V2,CancelToken:q2,VERSION:G2,all:K2,Cancel:Y2,isAxiosError:J2,spread:Z2,toFormData:X2,AxiosHeaders:Q2,HttpStatusCode:eD,formToJSON:tD,getAdapter:nD,mergeConfig:rD,create:iD}=Yn;function dy(){return Object.assign({},Ks())}function G$(t,n,e){const r=Br(t,e?.in);return r.setTime(r.getTime()+n*Ul),r}function K$(t,n){const e=()=>oo(n?.in,NaN),r=X$(t);let m;if(r.date){const u=Q$(r.date,2);m=eR(u.restDateString,u.year)}if(!m||isNaN(+m))return e();const f=+m;let g=0,w;if(r.time&&(g=tR(r.time),isNaN(g)))return e();if(r.timezone){if(w=nR(r.timezone),isNaN(w))return e()}else{const u=new Date(f+g),d=Br(0,n?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return Br(f+g+w,n?.in)}const wc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Y$=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,J$=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Z$=/^([+-])(\d{2})(?::?(\d{2}))?$/;function X$(t){const n={},e=t.split(wc.dateTimeDelimiter);let r;if(e.length>2)return n;if(/:/.test(e[0])?r=e[0]:(n.date=e[0],r=e[1],wc.timeZoneDelimiter.test(n.date)&&(n.date=t.split(wc.timeZoneDelimiter)[0],r=t.substr(n.date.length,t.length))),r){const m=wc.timezone.exec(r);m?(n.time=r.replace(m[1],""),n.timezone=m[1]):n.time=r}return n}function Q$(t,n){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=t.match(e);if(!r)return{year:NaN,restDateString:""};const m=r[1]?parseInt(r[1]):null,f=r[2]?parseInt(r[2]):null;return{year:f===null?m:f*100,restDateString:t.slice((r[1]||r[2]).length)}}function eR(t,n){if(n===null)return new Date(NaN);const e=t.match(Y$);if(!e)return new Date(NaN);const r=!!e[4],m=rl(e[1]),f=rl(e[2])-1,g=rl(e[3]),w=rl(e[4]),u=rl(e[5])-1;if(r)return aR(n,w,u)?rR(n,w,u):new Date(NaN);{const d=new Date(0);return!oR(n,f,g)||!sR(n,m)?new Date(NaN):(d.setUTCFullYear(n,f,Math.max(m,g)),d)}}function rl(t){return t?parseInt(t):1}function tR(t){const n=t.match(J$);if(!n)return NaN;const e=ld(n[1]),r=ld(n[2]),m=ld(n[3]);return lR(e,r,m)?e*Nu+r*Ul+m*1e3:NaN}function ld(t){return t&&parseFloat(t.replace(",","."))||0}function nR(t){if(t==="Z")return 0;const n=t.match(Z$);if(!n)return 0;const e=n[1]==="+"?-1:1,r=parseInt(n[2]),m=n[3]&&parseInt(n[3])||0;return cR(r,m)?e*(r*Nu+m*Ul):NaN}function rR(t,n,e){const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,f=(n-1)*7+e+1-m;return r.setUTCDate(r.getUTCDate()+f),r}const iR=[31,null,31,30,31,30,31,31,30,31,30,31];function fy(t){return t%400===0||t%4===0&&t%100!==0}function oR(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(iR[n]||(fy(t)?29:28))}function sR(t,n){return n>=1&&n<=(fy(t)?366:365)}function aR(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}function lR(t,n,e){return t===24?n===0&&e===0:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}function cR(t,n){return n>=0&&n<=59}function uR(t,n,e){return G$(t,-n,e)}function py(t,n,e){const r=dy(),m=fR(t,e.timeZone,e.locale??r.locale);return"formatToParts"in m?hR(m,n):dR(m,n)}function hR(t,n){const e=t.formatToParts(n);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function dR(t,n){const e=t.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function fR(t,n,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:n,timeZoneName:t})}function pR(t,n){const e=bR(n);return"formatToParts"in e?mR(e,t):vR(e,t)}const gR={year:0,month:1,day:2,hour:3,minute:4,second:5};function mR(t,n){try{const e=t.formatToParts(n),r=[];for(let m=0;m<e.length;m++){const f=gR[e[m].type];f!==void 0&&(r[f]=parseInt(e[m].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function vR(t,n){const e=t.format(n),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 cd={},gy=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")),yR=gy==="06/25/2014, 00:00:00"||gy==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function bR(t){return cd[t]||(cd[t]=yR?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),cd[t]}function my(t,n,e,r,m,f,g){const w=new Date(0);return w.setUTCFullYear(t,n,e),w.setUTCHours(r,m,f,g),w}const vy=36e5,wR=6e4,ud={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function hd(t,n,e){if(!t)return 0;let r=ud.timezoneZ.exec(t);if(r)return 0;let m,f;if(r=ud.timezoneHH.exec(t),r)return m=parseInt(r[1],10),yy(m)?-(m*vy):NaN;if(r=ud.timezoneHHMM.exec(t),r){m=parseInt(r[2],10);const g=parseInt(r[3],10);return yy(m,g)?(f=Math.abs(m)*vy+g*wR,r[1]==="+"?-f:f):NaN}if(_R(t)){n=new Date(n||Date.now());const g=e?n:xR(n),w=dd(g,t);return-(e?w:CR(n,w,t))}return NaN}function xR(t){return my(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function dd(t,n){const e=pR(t,n),r=my(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let m=t.getTime();const f=m%1e3;return m-=f>=0?f:1e3+f,r-m}function CR(t,n,e){let r=t.getTime()-n;const m=dd(new Date(r),e);if(n===m)return n;r-=m-n;const f=dd(new Date(r),e);return m===f?m:Math.max(m,f)}function yy(t,n){return-23<=t&&t<=23&&(n==null||0<=n&&n<=59)}const by={};function _R(t){if(by[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),by[t]=!0,!0}catch{return!1}}const kR=60*1e3,AR={X:function(t,n,e){const r=fd(e.timeZone,t);if(r===0)return"Z";switch(n){case"X":return wy(r);case"XXXX":case"XX":return ua(r);default:return ua(r,":")}},x:function(t,n,e){const r=fd(e.timeZone,t);switch(n){case"x":return wy(r);case"xxxx":case"xx":return ua(r);default:return ua(r,":")}},O:function(t,n,e){const r=fd(e.timeZone,t);switch(n){case"O":case"OO":case"OOO":return"GMT"+SR(r,":");default:return"GMT"+ua(r,":")}},z:function(t,n,e){switch(n){case"z":case"zz":case"zzz":return py("short",t,e);default:return py("long",t,e)}}};function fd(t,n){const e=t?hd(t,n,!0)/kR:n?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+t);return e}function xc(t,n){const e=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<n;)r="0"+r;return e+r}function ua(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=xc(Math.floor(r/60),2),f=xc(Math.floor(r%60),2);return e+m+n+f}function wy(t,n){return t%60===0?(t>0?"-":"+")+xc(Math.abs(t)/60,2):ua(t,n)}function SR(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.floor(r/60),f=r%60;return f===0?e+String(m):e+String(m)+n+xc(f,2)}function xy(t){const n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+t-+n}const $R=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,pd=36e5,Cy=6e4,RR=2,Ur={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:$R};function _y(t,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const e=n.additionalDigits==null?RR:Number(n.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=ER(t),{year:m,restDateString:f}=TR(r.date,e),g=MR(f,m);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const w=g.getTime();let u=0,d;if(r.time&&(u=IR(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=hd(r.timeZone||n.timeZone,new Date(w+u)),isNaN(d))return new Date(NaN)}else d=xy(new Date(w+u)),d=xy(new Date(w+u+d));return new Date(w+u+d)}else return new Date(NaN)}function ER(t){const n={};let e=Ur.dateTimePattern.exec(t),r;if(e?(n.date=e[1],r=e[3]):(e=Ur.datePattern.exec(t),e?(n.date=e[1],r=e[2]):(n.date=null,r=t)),r){const m=Ur.timeZone.exec(r);m?(n.time=r.replace(m[1],""),n.timeZone=m[1].trim()):n.time=r}return n}function TR(t,n){if(t){const e=Ur.YYY[n],r=Ur.YYYYY[n];let m=Ur.YYYY.exec(t)||r.exec(t);if(m){const f=m[1];return{year:parseInt(f,10),restDateString:t.slice(f.length)}}if(m=Ur.YY.exec(t)||e.exec(t),m){const f=m[1];return{year:parseInt(f,10)*100,restDateString:t.slice(f.length)}}}return{year:null}}function MR(t,n){if(n===null)return null;let e,r,m;if(!t||!t.length)return e=new Date(0),e.setUTCFullYear(n),e;let f=Ur.MM.exec(t);if(f)return e=new Date(0),r=parseInt(f[1],10)-1,Sy(n,r)?(e.setUTCFullYear(n,r),e):new Date(NaN);if(f=Ur.DDD.exec(t),f){e=new Date(0);const g=parseInt(f[1],10);return NR(n,g)?(e.setUTCFullYear(n,0,g),e):new Date(NaN)}if(f=Ur.MMDD.exec(t),f){e=new Date(0),r=parseInt(f[1],10)-1;const g=parseInt(f[2],10);return Sy(n,r,g)?(e.setUTCFullYear(n,r,g),e):new Date(NaN)}if(f=Ur.Www.exec(t),f)return m=parseInt(f[1],10)-1,$y(m)?ky(n,m):new Date(NaN);if(f=Ur.WwwD.exec(t),f){m=parseInt(f[1],10)-1;const g=parseInt(f[2],10)-1;return $y(m,g)?ky(n,m,g):new Date(NaN)}return null}function IR(t){let n,e,r=Ur.HH.exec(t);if(r)return n=parseFloat(r[1].replace(",",".")),gd(n)?n%24*pd:NaN;if(r=Ur.HHMM.exec(t),r)return n=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),gd(n,e)?n%24*pd+e*Cy:NaN;if(r=Ur.HHMMSS.exec(t),r){n=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return gd(n,e,m)?n%24*pd+e*Cy+m*1e3:NaN}return null}function ky(t,n,e){n=n||0,e=e||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,f=n*7+e+1-m;return r.setUTCDate(r.getUTCDate()+f),r}const LR=[31,28,31,30,31,30,31,31,30,31,30,31],OR=[31,29,31,30,31,30,31,31,30,31,30,31];function Ay(t){return t%400===0||t%4===0&&t%100!==0}function Sy(t,n,e){if(n<0||n>11)return!1;if(e!=null){if(e<1)return!1;const r=Ay(t);if(r&&e>OR[n]||!r&&e>LR[n])return!1}return!0}function NR(t,n){if(n<1)return!1;const e=Ay(t);return!(e&&n>366||!e&&n>365)}function $y(t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function gd(t,n,e){return!(t<0||t>=25||n!=null&&(n<0||n>=60)||e!=null&&(e<0||e>=60))}const DR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function PR(t,n,e={}){n=String(n);const r=n.match(DR);if(r){const m=_y(e.originalDate||t,e);n=r.reduce(function(f,g){if(g[0]==="'")return f;const w=f.indexOf(g),u=f[w-1]==="'",d=f.replace(g,"'"+AR[g[0]](m,g,e)+"'");return u?d.substring(0,w-1)+d.substring(w+1):d},n)}return ds(t,n,e)}function FR(t,n,e){t=_y(t,e);const r=hd(n,t,!0),m=new Date(t.getTime()-r),f=new Date(0);return f.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),f.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),f}function Cc(t,n,e,r){return r={...r,timeZone:n,originalDate:t},PR(FR(t,n,{timeZone:r.timeZone}),e,r)}const _c="yyyy-MM-dd",Ry="HH:mm:ss.SSS",Ey="HH:mm:ss",kc=`${_c} ${Ry}`,Ty=`${_c} ${Ey}`,oD=Tn("R",{methods:{parseDateTime(t,n){return t.includes(" ")&&(t=t.replace(" ","T")),n&&n==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,n){return ds(!n||n==="local"?uR(t,t.getTimezoneOffset()):t,kc)},formatDateTime(t,n){return!n||n==="local"?ds(t,kc):Cc(t,n,kc)},formatDateTimeHMS(t,n){return!n||n==="local"?ds(t,Ty):Cc(t,n,Ty)},formatDate:function(t,n){return!n||n==="local"?ds(t,_c):Cc(t,this.timeZone,_c)},formatTime:function(t,n,e=Ry){return!n||n==="local"?ds(t,e):Cc(t,this.timeZone,e)},formatTimeHMS:function(t,n){return this.formatTime(t,n,Ey)},formatTimestamp(t,n){return this.formatDateTime(K$(t),n)},formatSeconds(t,n){return this.formatDateTime(new Date(t*1e3),n)},formatNanoseconds(t,n){return this.formatDateTime(new Date(parseInt(t)/1e6),n)}}}),My=100,Iy=Tn("b",Nf("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:t=>n=>t.namedWidgets[n]},actions:{notifyAddHistory(t){this.notifyHistory.length>=My&&(this.notifyHistory.length=My-1),this.notifyHistory.unshift(t)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(t){Object.assign(this.namedWidgets,t)},clearNamedWidget(t){delete this.namedWidgets[t]},updatePlayback(t){Object.assign(this.playback,t)}}})),ha=Df();ha.use(({store:t})=>{t.commit=(n,e)=>{typeof t[n]=="function"&&t[n](e)},t.dispatch=(n,e)=>{if(typeof t[n]=="function")return t[n](e)}});const zR=ha.install.bind(ha);ha.install=t=>{zR(t);const n=Iy(ha);t.config.globalProperties.$store={state:new Proxy({},{get(e,r){return n.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,m]=r.split("/");return n[m]}return n[r]}}),commit(e,r){if(e.includes("/")){const[,m]=e.split("/");n[m]?.(r)}else n[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,m]=e.split("/");return n[m]?.(r)}else return n[e]?.(r)}}};const WR="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=",BR={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return WR},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=KR.indexOf(Ly[this.status]),n=1-(t-1)*.05,e=224*this.scaleFactor*n,r=32*this.scaleFactor*n,m=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${t*m}px;`,`background-size: ${e}px ${r}px;`,`height: ${m}px;`,`width: ${m}px;`,`padding-top: ${t-1}px;`].join("")}}};function jR(t,n,e,r,m,f){return Mn(),ti("div",{style:Ea(f.iconStyle)},null,4)}const HR=zo(BR,[["render",jR]]),UR={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function VR(t,n,e,r,m,f){const g=St("rux-icon");return Mn(),io(g,{size:e.size,icon:e.icon,style:Ea(f.colorStyle)},null,8,["size","icon","style"])}const qR=zo(UR,[["render",VR],["__scopeId","data-v-bb4cd487"]]),Ly={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"},md={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},GR=function(t){const n="#000000",e="#ffffff",r=md[Ly[t]];if(r){const m=+`0x${r.slice(1,3)}`,f=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((m*299+f*587+g*114)/1e3>128)return n}return e},KR=Object.keys(md),YR={astro:{component:t=>js(qR,{...t})},"astro-status":{component:t=>js(HR,{...t,status:t.icon})}},JR={extras:{component:t=>js(fw,{...t})}},sD=Tn("k",{data:{configKey:"",dontSaveDefaultConfig:!1},methods:{loadDefaultConfig:function(){return localStorage[`${this.configKey}__default`]?JSON.parse(localStorage[`${this.configKey}__default`]):{}},saveDefaultConfig:function(t){this.dontSaveDefaultConfig!==!0&&(localStorage[`${this.configKey}__default`]=JSON.stringify(t))},openConfigBase:function(t,n=!1,e=null){new us().load_config(this.configKey,t).then(r=>{r?(this.$notify.normal({title:"Loading configuration",body:t}),e&&e(JSON.parse(r)),n||this.$route.fullPath.includes(t)||this.$router.push({query:{config:t}})):this.$notify.caution({title:"Unknown configuration",body:t})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${t}`,body:r})})},saveConfigBase:function(t,n){new us().save_config(this.configKey,t,JSON.stringify(n)).then(()=>{this.$notify.normal({title:"Saved configuration",body:t})}).catch(e=>{e&&this.$notify.serious({title:`Error saving configuration: ${t}`,body:e})})},resetConfigBase:function(){localStorage.removeItem(`${this.configKey}__default`);const t={...this.$route.query};delete t.config,this.$router.replace({query:t})}}}),ZR={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(t=>t.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){let t=-1;new us().list_configs(this.configKey).then(n=>{this.configs=n.map(e=>(t+=1,{configId:t,config:e}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(t){this.selectedRows=[t.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===t.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(t),1),new us().delete_config(this.configKey,t.config)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${t.config} Error: ${n}`)})}}},XR={class:"mt-4 pa-3"},QR=["textContent"];function eE(t,n,e,r,m,f){const g=St("v-spacer"),w=St("v-toolbar"),u=St("v-text-field"),d=St("v-row"),a=St("v-btn"),l=St("v-data-table"),c=St("v-card-text"),h=St("v-card-actions"),o=St("v-card"),s=St("v-dialog");return Mn(),io(s,{modelValue:f.show,"onUpdate:modelValue":n[4]||(n[4]=p=>f.show=p),persistent:"",width:"600",onKeydown:Al(f.cancel,["esc"])},{default:Ot(()=>[dt(o,null,{default:Ot(()=>[fr("form",{onSubmit:n[3]||(n[3]=Hs((...p)=>f.success&&f.success(...p),["prevent"]))},[dt(w,{height:"24"},{default:Ot(()=>[dt(g),n[5]||(n[5]=fr("span",null,"Open Configuration",-1)),dt(g)]),_:1}),dt(c,null,{default:Ot(()=>[fr("div",XR,[dt(d,{dense:""},{default:Ot(()=>[dt(u,{modelValue:m.search,"onUpdate:modelValue":n[0]||(n[0]=p=>m.search=p),label:"Search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),dt(l,{modelValue:m.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=p=>m.selectedRows=p),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(p,b)=>f.selectRow(b))},{"item.actions":Ot(({item:p})=>[dt(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:b=>f.deleteConfig(p)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),dt(d,{dense:""},{default:Ot(()=>[Sl(fr("span",{class:"ma-2 text-red",textContent:ni(f.error)},null,8,QR),[[$l,f.error]])]),_:1})])]),_:1}),dt(h,{class:"px-2"},{default:Ot(()=>[dt(g),dt(a,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:f.cancel},{default:Ot(()=>[...n[6]||(n[6]=[Rr(" Cancel ",-1)])]),_:1},8,["onClick"]),dt(a,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!f.error,onClick:Hs(f.success,["prevent"])},{default:Ot(()=>[...n[7]||(n[7]=[Rr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const aD=Tn("I",zo(ZR,[["render",eE]])),tE={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(t=>t.configId===this.selectedRows[0]):null},error:function(){return this.configName?/^[A-Za-z0-9_\-. ]+$/.test(this.configName)?null:"Config name must only contain letters, numbers, hyphens, underscores, spaces, and periods":"Config must have a name"},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{selectedItem:function(t){t&&(this.configName=t.config)}},mounted(){let t=-1;new us().list_configs(this.configKey).then(n=>{this.configs=n.map(e=>(t+=1,{configId:t,config:e}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(t){this.selectedRows=[t.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===t.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(t),1),new us().delete_config(this.configKey,t.config)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${t.config} Error: ${n}`)})}}},nE={class:"mt-4 pa-3"},rE=["textContent"];function iE(t,n,e,r,m,f){const g=St("v-spacer"),w=St("v-toolbar"),u=St("v-text-field"),d=St("v-row"),a=St("v-btn"),l=St("v-data-table"),c=St("v-card-text"),h=St("v-card-actions"),o=St("v-card"),s=St("v-dialog");return Mn(),io(s,{modelValue:f.show,"onUpdate:modelValue":n[5]||(n[5]=p=>f.show=p),persistent:"",width:"600",onKeydown:Al(f.cancel,["esc"])},{default:Ot(()=>[dt(o,null,{default:Ot(()=>[fr("form",{onSubmit:n[4]||(n[4]=Hs((...p)=>f.success&&f.success(...p),["prevent"]))},[dt(w,{height:"24"},{default:Ot(()=>[dt(g),n[6]||(n[6]=fr("span",null,"Save Configuration",-1)),dt(g)]),_:1}),dt(c,null,{default:Ot(()=>[fr("div",nE,[dt(d,{dense:""},{default:Ot(()=>[dt(u,{modelValue:m.search,"onUpdate:modelValue":n[0]||(n[0]=p=>m.search=p),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),dt(l,{modelValue:m.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=p=>m.selectedRows=p),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(p,b)=>f.selectRow(b))},{"item.actions":Ot(({item:p})=>[dt(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:b=>f.deleteConfig(p)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),dt(d,{dense:""},{default:Ot(()=>[dt(u,{modelValue:m.configName,"onUpdate:modelValue":n[3]||(n[3]=p=>m.configName=p),"hide-details":"",autofocus:"",disabled:!!f.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),dt(d,{dense:""},{default:Ot(()=>[Sl(fr("span",{class:"ma-2 text-red",textContent:ni(f.error)},null,8,rE),[[$l,f.error]])]),_:1})])]),_:1}),dt(h,{class:"px-2"},{default:Ot(()=>[dt(g),dt(a,{variant:"outlined",onClick:f.cancel},{default:Ot(()=>[...n[7]||(n[7]=[Rr(" Cancel ",-1)])]),_:1},8,["onClick"]),dt(a,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!f.error,onClick:Hs(f.success,["prevent"])},{default:Ot(()=>[...n[8]||(n[8]=[Rr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const lD=Tn("M",zo(tE,[["render",iE]])),oE=50,sE=2e3,Oy="single-spa:app-change",aE={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Oy,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},sE)},unmounted(){window.removeEventListener(Oy,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=hu().length>0,hu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},oE)}}},lE={class:"mx-1"},cE={key:1,class:"d-flex justify-center align-center"};function uE(t,n,e,r,m,f){const g=St("v-card-title"),w=St("v-card-text"),u=St("v-card"),d=St("v-progress-circular");return Mn(),ti(kl,null,[m.show?(Mn(),io(u,{key:0},{default:Ot(()=>[dt(g,null,{default:Ot(()=>[...n[0]||(n[0]=[Rr(" 404 Not Found ",-1)])]),_:1}),dt(w,{class:"d-flex align-center mt-3"},{default:Ot(()=>[n[1]||(n[1]=Rr(" The requested URL ",-1)),fr("code",lE,ni(t.$route.fullPath),1),n[2]||(n[2]=Rr(" was not routable. ",-1)),n[3]||(n[3]=fr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):wo("",!0),f.showSpinner?(Mn(),ti("div",cE,[dt(d,{indeterminate:""})])):wo("",!0)],64)}const Ny=[{path:"/",name:"DataExtractor",component:()=>st(()=>ot.import("./DataExtractor-006ab46fdfac042cf003.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:zo(aE,[["render",uE]])}];Ny.forEach(t=>zf(t));const hE=Lf({history:Of(),routes:Ny}),{entries:Dy,setPrototypeOf:Py,isFrozen:dE,getPrototypeOf:fE,getOwnPropertyDescriptor:pE}=Object;let{freeze:Vr,seal:Ii,create:da}=Object,{apply:vd,construct:yd}=typeof Reflect<"u"&&Reflect;Vr||(Vr=function(t){return t}),Ii||(Ii=function(t){return t}),vd||(vd=function(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),m=2;m<e;m++)r[m-2]=arguments[m];return t.apply(n,r)}),yd||(yd=function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return new t(...e)});const il=Jn(Array.prototype.forEach),gE=Jn(Array.prototype.lastIndexOf),Fy=Jn(Array.prototype.pop),ol=Jn(Array.prototype.push),mE=Jn(Array.prototype.splice),qr=Array.isArray,sl=Jn(String.prototype.toLowerCase),bd=Jn(String.prototype.toString),zy=Jn(String.prototype.match),fa=Jn(String.prototype.replace),Wy=Jn(String.prototype.indexOf),vE=Jn(String.prototype.trim),yE=Jn(Number.prototype.toString),bE=Jn(Boolean.prototype.toString),By=typeof BigInt>"u"?null:Jn(BigInt.prototype.toString),jy=typeof Symbol>"u"?null:Jn(Symbol.prototype.toString),Fn=Jn(Object.prototype.hasOwnProperty),al=Jn(Object.prototype.toString),yr=Jn(RegExp.prototype.test),Ac=wE(TypeError);function Jn(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),m=1;m<e;m++)r[m-1]=arguments[m];return vd(t,n,r)}}function wE(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return yd(t,e)}}function Mt(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sl;if(Py&&Py(t,null),!qr(n))return t;let r=n.length;for(;r--;){let m=n[r];if(typeof m=="string"){const f=e(m);f!==m&&(dE(n)||(n[r]=f),m=f)}t[m]=!0}return t}function xE(t){for(let n=0;n<t.length;n++)Fn(t,n)||(t[n]=null);return t}function oi(t){const n=da(null);for(const[e,r]of Dy(t))Fn(t,e)&&(qr(r)?n[e]=xE(r):r&&typeof r=="object"&&r.constructor===Object?n[e]=oi(r):n[e]=r);return n}function CE(t){switch(typeof t){case"string":return t;case"number":return yE(t);case"boolean":return bE(t);case"bigint":return By?By(t):"0";case"symbol":return jy?jy(t):"Symbol()";case"undefined":return al(t);case"function":case"object":{if(t===null)return al(t);const n=t,e=pa(n,"toString");if(typeof e=="function"){const r=e(n);return typeof r=="string"?r:al(r)}return al(t)}default:return al(t)}}function pa(t,n){for(;t!==null;){const r=pE(t,n);if(r){if(r.get)return Jn(r.get);if(typeof r.value=="function")return Jn(r.value)}t=fE(t)}function e(){return null}return e}function _E(t){try{return yr(t,""),!0}catch{return!1}}const Hy=Vr(["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"]),wd=Vr(["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"]),xd=Vr(["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"]),kE=Vr(["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"]),Cd=Vr(["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"]),AE=Vr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uy=Vr(["#text"]),Vy=Vr(["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"]),_d=Vr(["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"]),qy=Vr(["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"]),Sc=Vr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),SE=Ii(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$E=Ii(/<%[\w\W]*|[\w\W]*%>/gm),RE=Ii(/\$\{[\w\W]*/gm),EE=Ii(/^data-[\-\w.\u00B7-\uFFFF]+$/),TE=Ii(/^aria-[\-\w]+$/),Gy=Ii(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ME=Ii(/^(?:\w+script|data):/i),IE=Ii(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ky=Ii(/^html$/i),LE=Ii(/^[a-z][.\w]*(-[.\w]+)+$/i);var Yy=Object.freeze({__proto__:null,ARIA_ATTR:TE,ATTR_WHITESPACE:IE,CUSTOM_ELEMENT:LE,DATA_ATTR:EE,DOCTYPE_NAME:Ky,ERB_EXPR:$E,IS_ALLOWED_URI:Gy,IS_SCRIPT_OR_DATA:ME,MUSTACHE_EXPR:SE,TMPLIT_EXPR:RE});const ll={element:1,text:3,progressingInstruction:7,comment:8,document:9},OE=function(){return typeof window>"u"?null:window},NE=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(e=n.getAttribute(r));const m="dompurify"+(e?"#"+e:"");try{return t.createPolicy(m,{createHTML(f){return f},createScriptURL(f){return f}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},Jy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Zy(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:OE();const n=oe=>Zy(oe);if(n.version="3.4.2",n.removed=[],!t||!t.document||t.document.nodeType!==ll.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t;const r=e,m=r.currentScript,{DocumentFragment:f,HTMLTemplateElement:g,Node:w,Element:u,NodeFilter:d,NamedNodeMap:a=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:l,DOMParser:c,trustedTypes:h}=t,o=u.prototype,s=pa(o,"cloneNode"),p=pa(o,"remove"),b=pa(o,"nextSibling"),x=pa(o,"childNodes"),M=pa(o,"parentNode");if(typeof g=="function"){const oe=e.createElement("template");oe.content&&oe.content.ownerDocument&&(e=oe.content.ownerDocument)}let R,A="";const{implementation:C,createNodeIterator:O,createDocumentFragment:D,getElementsByTagName:I}=e,{importNode:T}=r;let B=Jy();n.isSupported=typeof Dy=="function"&&typeof M=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:L,TMPLIT_EXPR:$,DATA_ATTR:_,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:G}=Yy;let{IS_ALLOWED_URI:J}=Yy,te=null;const he=Mt({},[...Hy,...wd,...xd,...Cd,...Uy]);let ee=null;const le=Mt({},[...Vy,..._d,...qy,...Sc]);let se=Object.seal(da(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}})),ce=null,pe=null;const ve=Object.seal(da(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $e=!0,Ee=!0,qe=!1,He=!0,tt=!1,Xe=!0,it=!1,Wt=!1,br=!1,At=!1,ir=!1,An=!1,wr=!0,fn=!1;const or="user-content-";let ft=!0,Ke=!1,$t={},Zt=null;const In=Mt({},["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 Un=null;const sr=Mt({},["audio","video","img","source","image","track"]);let pn=null;const zn=Mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ln="http://www.w3.org/1998/Math/MathML",Gt="http://www.w3.org/2000/svg",nn="http://www.w3.org/1999/xhtml";let Ir=nn,Gr=!1,xr=null;const yi=Mt({},[Ln,Gt,nn],bd);let bi=Mt({},["mi","mo","mn","ms","mtext"]),Zn=Mt({},["annotation-xml"]);const Yi=Mt({},["title","style","font","a","script"]);let Kr=null;const Cs=["application/xhtml+xml","text/html"],Yr="text/html";let Cn=null,wi=null;const _o=e.createElement("form"),si=function(oe){return oe instanceof RegExp||oe instanceof Function},_n=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wi&&wi===oe)return;(!oe||typeof oe!="object")&&(oe={}),oe=oi(oe),Kr=Cs.indexOf(oe.PARSER_MEDIA_TYPE)===-1?Yr:oe.PARSER_MEDIA_TYPE,Cn=Kr==="application/xhtml+xml"?bd:sl,te=Fn(oe,"ALLOWED_TAGS")&&qr(oe.ALLOWED_TAGS)?Mt({},oe.ALLOWED_TAGS,Cn):he,ee=Fn(oe,"ALLOWED_ATTR")&&qr(oe.ALLOWED_ATTR)?Mt({},oe.ALLOWED_ATTR,Cn):le,xr=Fn(oe,"ALLOWED_NAMESPACES")&&qr(oe.ALLOWED_NAMESPACES)?Mt({},oe.ALLOWED_NAMESPACES,bd):yi,pn=Fn(oe,"ADD_URI_SAFE_ATTR")&&qr(oe.ADD_URI_SAFE_ATTR)?Mt(oi(zn),oe.ADD_URI_SAFE_ATTR,Cn):zn,Un=Fn(oe,"ADD_DATA_URI_TAGS")&&qr(oe.ADD_DATA_URI_TAGS)?Mt(oi(sr),oe.ADD_DATA_URI_TAGS,Cn):sr,Zt=Fn(oe,"FORBID_CONTENTS")&&qr(oe.FORBID_CONTENTS)?Mt({},oe.FORBID_CONTENTS,Cn):In,ce=Fn(oe,"FORBID_TAGS")&&qr(oe.FORBID_TAGS)?Mt({},oe.FORBID_TAGS,Cn):oi({}),pe=Fn(oe,"FORBID_ATTR")&&qr(oe.FORBID_ATTR)?Mt({},oe.FORBID_ATTR,Cn):oi({}),$t=Fn(oe,"USE_PROFILES")?oe.USE_PROFILES&&typeof oe.USE_PROFILES=="object"?oi(oe.USE_PROFILES):oe.USE_PROFILES:!1,$e=oe.ALLOW_ARIA_ATTR!==!1,Ee=oe.ALLOW_DATA_ATTR!==!1,qe=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,He=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tt=oe.SAFE_FOR_TEMPLATES||!1,Xe=oe.SAFE_FOR_XML!==!1,it=oe.WHOLE_DOCUMENT||!1,At=oe.RETURN_DOM||!1,ir=oe.RETURN_DOM_FRAGMENT||!1,An=oe.RETURN_TRUSTED_TYPE||!1,br=oe.FORCE_BODY||!1,wr=oe.SANITIZE_DOM!==!1,fn=oe.SANITIZE_NAMED_PROPS||!1,ft=oe.KEEP_CONTENT!==!1,Ke=oe.IN_PLACE||!1,J=_E(oe.ALLOWED_URI_REGEXP)?oe.ALLOWED_URI_REGEXP:Gy,Ir=typeof oe.NAMESPACE=="string"?oe.NAMESPACE:nn,bi=Fn(oe,"MATHML_TEXT_INTEGRATION_POINTS")&&oe.MATHML_TEXT_INTEGRATION_POINTS&&typeof oe.MATHML_TEXT_INTEGRATION_POINTS=="object"?oi(oe.MATHML_TEXT_INTEGRATION_POINTS):Mt({},["mi","mo","mn","ms","mtext"]),Zn=Fn(oe,"HTML_INTEGRATION_POINTS")&&oe.HTML_INTEGRATION_POINTS&&typeof oe.HTML_INTEGRATION_POINTS=="object"?oi(oe.HTML_INTEGRATION_POINTS):Mt({},["annotation-xml"]);const Ne=Fn(oe,"CUSTOM_ELEMENT_HANDLING")&&oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING=="object"?oi(oe.CUSTOM_ELEMENT_HANDLING):da(null);if(se=da(null),Fn(Ne,"tagNameCheck")&&si(Ne.tagNameCheck)&&(se.tagNameCheck=Ne.tagNameCheck),Fn(Ne,"attributeNameCheck")&&si(Ne.attributeNameCheck)&&(se.attributeNameCheck=Ne.attributeNameCheck),Fn(Ne,"allowCustomizedBuiltInElements")&&typeof Ne.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=Ne.allowCustomizedBuiltInElements),tt&&(Ee=!1),ir&&(At=!0),$t&&(te=Mt({},Uy),ee=da(null),$t.html===!0&&(Mt(te,Hy),Mt(ee,Vy)),$t.svg===!0&&(Mt(te,wd),Mt(ee,_d),Mt(ee,Sc)),$t.svgFilters===!0&&(Mt(te,xd),Mt(ee,_d),Mt(ee,Sc)),$t.mathMl===!0&&(Mt(te,Cd),Mt(ee,qy),Mt(ee,Sc))),ve.tagCheck=null,ve.attributeCheck=null,Fn(oe,"ADD_TAGS")&&(typeof oe.ADD_TAGS=="function"?ve.tagCheck=oe.ADD_TAGS:qr(oe.ADD_TAGS)&&(te===he&&(te=oi(te)),Mt(te,oe.ADD_TAGS,Cn))),Fn(oe,"ADD_ATTR")&&(typeof oe.ADD_ATTR=="function"?ve.attributeCheck=oe.ADD_ATTR:qr(oe.ADD_ATTR)&&(ee===le&&(ee=oi(ee)),Mt(ee,oe.ADD_ATTR,Cn))),Fn(oe,"ADD_URI_SAFE_ATTR")&&qr(oe.ADD_URI_SAFE_ATTR)&&Mt(pn,oe.ADD_URI_SAFE_ATTR,Cn),Fn(oe,"FORBID_CONTENTS")&&qr(oe.FORBID_CONTENTS)&&(Zt===In&&(Zt=oi(Zt)),Mt(Zt,oe.FORBID_CONTENTS,Cn)),Fn(oe,"ADD_FORBID_CONTENTS")&&qr(oe.ADD_FORBID_CONTENTS)&&(Zt===In&&(Zt=oi(Zt)),Mt(Zt,oe.ADD_FORBID_CONTENTS,Cn)),ft&&(te["#text"]=!0),it&&Mt(te,["html","head","body"]),te.table&&(Mt(te,["tbody"]),delete ce.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ac('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ac('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');R=oe.TRUSTED_TYPES_POLICY,A=R.createHTML("")}else R===void 0&&(R=NE(h,m)),R!==null&&typeof A=="string"&&(A=R.createHTML(""));Vr&&Vr(oe),wi=oe},Cr=Mt({},[...wd,...xd,...kE]),Lr=Mt({},[...Cd,...AE]),On=function(oe){let Ne=M(oe);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:Ir,tagName:"template"});const Be=sl(oe.tagName),yt=sl(Ne.tagName);return xr[oe.namespaceURI]?oe.namespaceURI===Gt?Ne.namespaceURI===nn?Be==="svg":Ne.namespaceURI===Ln?Be==="svg"&&(yt==="annotation-xml"||bi[yt]):!!Cr[Be]:oe.namespaceURI===Ln?Ne.namespaceURI===nn?Be==="math":Ne.namespaceURI===Gt?Be==="math"&&Zn[yt]:!!Lr[Be]:oe.namespaceURI===nn?Ne.namespaceURI===Gt&&!Zn[yt]||Ne.namespaceURI===Ln&&!bi[yt]?!1:!Lr[Be]&&(Yi[Be]||!Cr[Be]):!!(Kr==="application/xhtml+xml"&&xr[oe.namespaceURI]):!1},yn=function(oe){ol(n.removed,{element:oe});try{M(oe).removeChild(oe)}catch{p(oe)}},pr=function(oe,Ne){try{ol(n.removed,{attribute:Ne.getAttributeNode(oe),from:Ne})}catch{ol(n.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(oe),oe==="is")if(At||ir)try{yn(Ne)}catch{}else try{Ne.setAttribute(oe,"")}catch{}},ai=function(oe){let Ne=null,Be=null;if(br)oe="<remove></remove>"+oe;else{const Vt=zy(oe,/^[\r\n\t ]+/);Be=Vt&&Vt[0]}Kr==="application/xhtml+xml"&&Ir===nn&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");const yt=R?R.createHTML(oe):oe;if(Ir===nn)try{Ne=new c().parseFromString(yt,Kr)}catch{}if(!Ne||!Ne.documentElement){Ne=C.createDocument(Ir,"template",null);try{Ne.documentElement.innerHTML=Gr?A:yt}catch{}}const gn=Ne.body||Ne.documentElement;return oe&&Be&&gn.insertBefore(e.createTextNode(Be),gn.childNodes[0]||null),Ir===nn?I.call(Ne,it?"html":"body")[0]:it?Ne.documentElement:gn},ao=function(oe){return O.call(oe.ownerDocument||oe,oe,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},lo=function(oe){return oe instanceof l&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof a)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},ko=function(oe){return typeof w=="function"&&oe instanceof w};function Or(oe,Ne,Be){il(oe,yt=>{yt.call(n,Ne,Be,wi)})}const li=function(oe){let Ne=null;if(Or(B.beforeSanitizeElements,oe,null),lo(oe))return yn(oe),!0;const Be=Cn(oe.nodeName);if(Or(B.uponSanitizeElement,oe,{tagName:Be,allowedTags:te}),Xe&&oe.hasChildNodes()&&!ko(oe.firstElementChild)&&yr(/<[/\w!]/g,oe.innerHTML)&&yr(/<[/\w!]/g,oe.textContent)||Xe&&oe.namespaceURI===nn&&Be==="style"&&ko(oe.firstElementChild)||oe.nodeType===ll.progressingInstruction||Xe&&oe.nodeType===ll.comment&&yr(/<[/\w]/g,oe.data))return yn(oe),!0;if(ce[Be]||!(ve.tagCheck instanceof Function&&ve.tagCheck(Be))&&!te[Be]){if(!ce[Be]&&Ao(Be)&&(se.tagNameCheck instanceof RegExp&&yr(se.tagNameCheck,Be)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Be)))return!1;if(ft&&!Zt[Be]){const yt=M(oe)||oe.parentNode,gn=x(oe)||oe.childNodes;if(gn&&yt){const Vt=gn.length;for(let _r=Vt-1;_r>=0;--_r){const Vn=s(gn[_r],!0);yt.insertBefore(Vn,b(oe))}}}return yn(oe),!0}return oe instanceof u&&!On(oe)||(Be==="noscript"||Be==="noembed"||Be==="noframes")&&yr(/<\/no(script|embed|frames)/i,oe.innerHTML)?(yn(oe),!0):(tt&&oe.nodeType===ll.text&&(Ne=oe.textContent,il([F,L,$],yt=>{Ne=fa(Ne,yt," ")}),oe.textContent!==Ne&&(ol(n.removed,{element:oe.cloneNode()}),oe.textContent=Ne)),Or(B.afterSanitizeElements,oe,null),!1)},Jr=function(oe,Ne,Be){if(pe[Ne]||wr&&(Ne==="id"||Ne==="name")&&(Be in e||Be in _o))return!1;const yt=ee[Ne]||ve.attributeCheck instanceof Function&&ve.attributeCheck(Ne,oe);if(!(Ee&&!pe[Ne]&&yr(_,Ne))&&!($e&&yr(N,Ne))){if(!yt||pe[Ne]){if(!(Ao(oe)&&(se.tagNameCheck instanceof RegExp&&yr(se.tagNameCheck,oe)||se.tagNameCheck instanceof Function&&se.tagNameCheck(oe))&&(se.attributeNameCheck instanceof RegExp&&yr(se.attributeNameCheck,Ne)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(Ne,oe))||Ne==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&yr(se.tagNameCheck,Be)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Be))))return!1}else if(!pn[Ne]&&!yr(J,fa(Be,U,""))&&!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&oe!=="script"&&Wy(Be,"data:")===0&&Un[oe])&&!(qe&&!yr(W,fa(Be,U,"")))&&Be)return!1}return!0},Nt=Mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ao=function(oe){return!Nt[sl(oe)]&&yr(G,oe)},ar=function(oe){Or(B.beforeSanitizeAttributes,oe,null);const{attributes:Ne}=oe;if(!Ne||lo(oe))return;const Be={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let yt=Ne.length;for(;yt--;){const gn=Ne[yt],{name:Vt,namespaceURI:_r,value:Vn}=gn,cn=Cn(Vt),gr=Vn;let mn=Vt==="value"?gr:vE(gr);if(Be.attrName=cn,Be.attrValue=mn,Be.keepAttr=!0,Be.forceKeepAttr=void 0,Or(B.uponSanitizeAttribute,oe,Be),mn=Be.attrValue,fn&&(cn==="id"||cn==="name")&&Wy(mn,or)!==0&&(pr(Vt,oe),mn=or+mn),Xe&&yr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mn)){pr(Vt,oe);continue}if(cn==="attributename"&&zy(mn,"href")){pr(Vt,oe);continue}if(Be.forceKeepAttr)continue;if(!Be.keepAttr){pr(Vt,oe);continue}if(!He&&yr(/\/>/i,mn)){pr(Vt,oe);continue}tt&&il([F,L,$],co=>{mn=fa(mn,co," ")});const mr=Cn(oe.nodeName);if(!Jr(mr,cn,mn)){pr(Vt,oe);continue}if(R&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!_r)switch(h.getAttributeType(mr,cn)){case"TrustedHTML":{mn=R.createHTML(mn);break}case"TrustedScriptURL":{mn=R.createScriptURL(mn);break}}if(mn!==gr)try{_r?oe.setAttributeNS(_r,Vt,mn):oe.setAttribute(Vt,mn),lo(oe)?yn(oe):Fy(n.removed)}catch{pr(Vt,oe)}}Or(B.afterSanitizeAttributes,oe,null)},Sn=function(oe){let Ne=null;const Be=ao(oe);for(Or(B.beforeSanitizeShadowDOM,oe,null);Ne=Be.nextNode();)Or(B.uponSanitizeShadowNode,Ne,null),li(Ne),ar(Ne),Ne.content instanceof f&&Sn(Ne.content);Or(B.afterSanitizeShadowDOM,oe,null)};return n.sanitize=function(oe){let Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,yt=null,gn=null,Vt=null;if(Gr=!oe,Gr&&(oe="<!-->"),typeof oe!="string"&&!ko(oe)&&(oe=CE(oe),typeof oe!="string"))throw Ac("dirty is not a string, aborting");if(!n.isSupported)return oe;if(Wt||_n(Ne),n.removed=[],typeof oe=="string"&&(Ke=!1),Ke){const cn=oe.nodeName;if(typeof cn=="string"){const gr=Cn(cn);if(!te[gr]||ce[gr])throw Ac("root node is forbidden and cannot be sanitized in-place")}}else if(oe instanceof w)Be=ai("<!---->"),yt=Be.ownerDocument.importNode(oe,!0),yt.nodeType===ll.element&&yt.nodeName==="BODY"||yt.nodeName==="HTML"?Be=yt:Be.appendChild(yt);else{if(!At&&!tt&&!it&&oe.indexOf("<")===-1)return R&&An?R.createHTML(oe):oe;if(Be=ai(oe),!Be)return At?null:An?A:""}Be&&br&&yn(Be.firstChild);const _r=ao(Ke?oe:Be);for(;gn=_r.nextNode();)li(gn),ar(gn),gn.content instanceof f&&Sn(gn.content);if(Ke)return oe;if(At){if(tt){Be.normalize();let cn=Be.innerHTML;il([F,L,$],gr=>{cn=fa(cn,gr," ")}),Be.innerHTML=cn}if(ir)for(Vt=D.call(Be.ownerDocument);Be.firstChild;)Vt.appendChild(Be.firstChild);else Vt=Be;return(ee.shadowroot||ee.shadowrootmode)&&(Vt=T.call(r,Vt,!0)),Vt}let Vn=it?Be.outerHTML:Be.innerHTML;return it&&te["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&yr(Ky,Be.ownerDocument.doctype.name)&&(Vn="<!DOCTYPE "+Be.ownerDocument.doctype.name+`>
1489
+ `+Vn),tt&&il([F,L,$],cn=>{Vn=fa(Vn,cn," ")}),R&&An?R.createHTML(Vn):Vn},n.setConfig=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_n(oe),Wt=!0},n.clearConfig=function(){wi=null,Wt=!1},n.isValidAttribute=function(oe,Ne,Be){wi||_n({});const yt=Cn(oe),gn=Cn(Ne);return Jr(yt,gn,Be)},n.addHook=function(oe,Ne){typeof Ne=="function"&&ol(B[oe],Ne)},n.removeHook=function(oe,Ne){if(Ne!==void 0){const Be=gE(B[oe],Ne);return Be===-1?void 0:mE(B[oe],Be,1)[0]}return Fy(B[oe])},n.removeHooks=function(oe){B[oe]=[]},n.removeAllHooks=function(){B=Jy()},n}var DE=Zy();const PE={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"}},FE={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:t=>!!t||"Required.",match:t=>t===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 DE.sanitize(this.params.text)}},methods:{dialog:function(t,n,e){this.params=t,this.show=!0,this.resolve=n,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=""}}},zE=["innerHTML"],WE={key:2},BE={key:3,class:"validate mt-4"};function jE(t,n,e,r,m,f){const g=St("v-spacer"),w=St("v-toolbar"),u=St("v-icon"),d=St("v-text-field"),a=St("v-card-text"),l=St("v-btn"),c=St("v-card-actions"),h=St("v-card"),o=St("v-dialog"),s=St("v-app");return Mn(),io(s,null,{default:Ot(()=>[dt(o,{modelValue:t.show,"onUpdate:modelValue":n[1]||(n[1]=p=>t.show=p),persistent:"",width:"600",onKeydown:Al(f.cancel,["esc"])},{default:Ot(()=>[dt(h,null,{default:Ot(()=>[dt(w,{height:"24"},{default:Ot(()=>[dt(g),fr("span",null,ni(t.params.title),1),dt(g)]),_:1}),dt(a,{class:"mt-4 pa-3"},{default:Ot(()=>[t.params.validateText?(Mn(),io(u,{key:0,class:"mr-2"},{default:Ot(()=>[...n[2]||(n[2]=[Rr(" mdi-alert ",-1)])]),_:1})):wo("",!0),t.params.html?(Mn(),ti("span",{key:1,innerHTML:f.sanitizedText},null,8,zE)):(Mn(),ti("span",WE,ni(f.sanitizedText),1)),t.params.validateText?(Mn(),ti("div",BE,[Rr(" Enter "+ni(t.params.validateText)+" to confirm! ",1),dt(d,{modelValue:t.validationText,"onUpdate:modelValue":n[0]||(n[0]=p=>t.validationText=p),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):wo("",!0)]),_:1}),dt(c,{class:"px-2"},{default:Ot(()=>[dt(g),t.params.cancelText?(Mn(),io(l,{key:0,variant:"outlined","data-test":f.dataTestCancel,onClick:f.cancel},{default:Ot(()=>[Rr(ni(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):wo("",!0),dt(l,{variant:"flat",color:t.params.okClass,"data-test":f.dataTestOk,onClick:f.ok},{default:Ot(()=>[Rr(ni(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const HE=zo(FE,[["render",jE],["__scopeId","data-v-53691296"]]);class UE{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(HE);n.use(Ad);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({title:n,text:e,okText:r,okClass:m,validateText:f,cancelText:g,html:w}){return this.mount(),new Promise((u,d)=>{this.$root.dialog({title:n,text:e,okText:r,okClass:m,validateText:f,cancelText:g,html:w},u,d)})}confirm(n,{okText:e="Ok",cancelText:r="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:m,validateText:null,cancelText:r,html:!1})}alert(n,{okText:e="Ok",html:r=!1,okClass:m="primary"}){return this.open({title:"Alert",text:n,okText:e,okClass:m,validateText:null,cancelText:null,html:r})}validate(n,{okText:e="Ok",validateText:r="CONFIRM",cancelText:m="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:f,validateText:r,cancelText:m,html:!1})}}const VE={install(t,n){const e=new UE;t.provide("dialog",e),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=e)}},qE={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`
1490
+ --toast-bg-color:${md[this.toastNotification.level]};
1491
+ --toast-fg-color:${GR(this.toastNotification.level)};
1492
+ `},contentStyle:function(){return`
1493
+ white-space: ${this.expanded?"normal":"nowrap"};
1494
+ overflow-x: ${this.expanded?"visible":"hidden"};
1495
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1496
+ `}},methods:{toast:function(t,n){this.noToastPaths.includes(window.location.pathname)||(n===void 0&&(n=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),n&&(this.timeout=setTimeout(()=>{this.hide()},n)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},GE={key:0,class:"text-subtitle-1 mr-1 notification-text"},KE={key:1,class:"text-body-2 notification-text"},YE={key:2,class:"text-body-2 notification-text"};function JE(t,n,e,r,m,f){const g=St("v-icon"),w=St("v-spacer"),u=St("v-btn"),d=St("v-sheet"),a=St("v-slide-y-transition");return Mn(),io(a,null,{default:Ot(()=>[Sl(dt(d,{style:Ea(f.toastStyle),class:"toast-notification",onClick:f.expand},{default:Ot(()=>[dt(g,{class:"mr-1 notification-text"},{default:Ot(()=>[Rr(ni(f.toastNotificationIcon),1)]),_:1}),fr("div",{class:"toast-content",style:Ea(f.contentStyle)},[t.toastNotification.title?(Mn(),ti("span",GE,[t.toastNotification.body||t.toastNotification.message?(Mn(),ti(kl,{key:0},[Rr(ni(t.toastNotification.title)+": ",1)],64)):(Mn(),ti(kl,{key:1},[Rr(ni(t.toastNotification.title),1)],64))])):wo("",!0),t.toastNotification.body?(Mn(),ti("span",KE,ni(t.toastNotification.body),1)):wo("",!0),t.toastNotification.message?(Mn(),ti("span",YE,ni(t.toastNotification.message),1)):wo("",!0)],4),dt(w),dt(u,{variant:"text",class:"notification-text",onClick:Hs(f.hide,["stop"])},{default:Ot(()=>[...n[0]||(n[0]=[Rr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[$l,t.showToast]])]),_:1})}const ZE=zo(qE,[["render",JE],["__scopeId","data-v-ef96840d"]]);class XE{constructor(n={}){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=Iy()),this.store}mount(){if(this.mounted)return;const n=uu(ZE);n.use(Ad);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({method:n,title:e,body:r,message:m,level:f,duration:g,type:w="alert",logToConsole:u=!1,saveToHistory:d=!0}){this.mount(),u&&console.log(m?`${f.toUpperCase()} - ${m}`:`${f.toUpperCase()} - ${e}: ${r}`),d&&this.getStore().notifyAddHistory({title:e,body:r,message:m,level:f}),this[n]({title:e,body:r,message:m,level:f,duration:g,type:w})}toast({title:n,body:e,message:r,level:m,duration:f,type:g}){this.$root.toast({title:n,body:e,message:r,level:m,type:g},f)}critical({title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"critical",title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious({title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"serious",title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w})}caution({title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"caution",title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w})}WARN(n){this.caution(n)}normal({title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"normal",title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby({title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"standby",title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w})}off({title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"off",title:n,body:e,message:r,type:m,duration:f,logToConsole:g,saveToHistory:w})}}const QE={install(t,n){const e=new XE(n);t.provide("notify",e),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=e)}};function eT(t){Af(`Vuetify: ${t}`)}function Xy(t){let n;return t!==null&&typeof t=="object"&&((n=Object.getPrototypeOf(t))===Object.prototype||n===null)}function tT(t,n){const e={};for(const r of n)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Qy(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const m in t)r[m]=t[m];for(const m in n){const f=t[m],g=n[m];if(Xy(f)&&Xy(g)){r[m]=Qy(f,g,e);continue}if(e&&Array.isArray(f)&&Array.isArray(g)){r[m]=e(f,g);continue}r[m]=g}return r}function cl(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(cl.cache.has(t))return cl.cache.get(t);const n=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return cl.cache.set(t,n),n}cl.cache=new Map;function eb(t,n){return e=>Object.keys(t).reduce((r,m)=>{const f=typeof t[m]=="object"&&t[m]!=null&&!Array.isArray(t[m])?t[m]:{type:t[m]};return e&&m in e?r[m]={...f,default:e[m]}:r[m]=f,n&&!r[m].source&&(r[m].source=n),r},{})}function tb(t,n){const e=Tf();if(!e)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return e}function nT(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tb("injectSelf");const{provides:e}=n;if(e&&t in e)return e[t]}const kd=Symbol.for("vuetify:defaults");function nb(){const t=Sf(kd);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function rT(t,n){return t.props&&(typeof t.props[n]<"u"||typeof t.props[cl(n)]<"u")}function iT(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nb();const r=tb("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const m=cu(()=>e.value?.[t._as??n]),f=new Proxy(t,{get(u,d){const a=Reflect.get(u,d);if(d==="class"||d==="style")return[m.value?.[d],a].filter(h=>h!=null);if(rT(r.vnode,d))return a;const l=m.value?.[d];if(l!==void 0)return l;const c=e.value?.global?.[d];return c!==void 0?c:a}}),g=$f();Rf(()=>{if(m.value){const u=Object.entries(m.value).filter(d=>{let[a]=d;return a.startsWith(a[0].toUpperCase())});g.value=u.length?Object.fromEntries(u):void 0}else g.value=void 0});function w(){const u=nT(kd,r);Mf(kd,cu(()=>g.value?Qy(u?.value??{},g.value):u?.value))}return{props:f,provideSubDefaults:w}}function $c(t){if(t._setup=t._setup??t.setup,!t.name)return eT("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=eb(t.props??{},t.name)();const n=Object.keys(t.props).filter(e=>e!=="class"&&e!=="style");t.filterProps=function(e){return tT(e,n)},t.props._as=String,t.setup=function(e,r){const m=nb();if(!m.value)return t._setup(e,r);const{props:f,provideSubDefaults:g}=iT(e,e._as??t.name,m),w=t._setup(f,r);return g(),w}}return t}function oT(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(t?$c:kf)(n)}const sT=[String,Function,Object,Array],Rc=eb({icon:{type:sT},tag:{type:[String,Object,Function],required:!0}},"icon");oT()({name:"VComponentIcon",props:Rc(),setup(t,n){let{slots:e}=n;return()=>{const r=t.icon;return dt(t.tag,null,{default:()=>[t.icon?dt(r,null,null):e.default?.()]})}}}),$c({name:"VSvgIcon",inheritAttrs:!1,props:Rc(),setup(t,n){let{attrs:e}=n;return()=>dt(t.tag,If(e,{style:null}),{default:()=>[fr("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?fr("path",{d:r[0],"fill-opacity":r[1]},null):fr("path",{d:r},null)):fr("path",{d:t.icon},null)])]})}}),$c({name:"VLigatureIcon",props:Rc(),setup(t){return()=>dt(t.tag,null,{default:()=>[t.icon]})}});const aT=$c({name:"VClassIcon",props:Rc(),setup(t){return()=>dt(t.tag,{class:Ef(t.icon)},null)}}),lT={component:t=>js(aT,{...t,class:"mdi"})},cT={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"}},uT={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"}},hT={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"}},dT={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"}},Ad=Pf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:PE,cosmosDarkCobalt:cT,cosmosDarkIndigo:uT,cosmosDarkSlate:hT,cosmosDarkEmerald:dT}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:lT,...YR,...JR}}}),Sd=Q0({createApp:uu,appOptions:{render(){return js(aw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(hE),t.use(ha),t.use(Ad),t.use(VE),t.use(QE)}}),uD=Tn("p",Sd.bootstrap),hD=Tn("q",Sd.mount),dD=Tn("r",Sd.unmount)})}}));