openc3-cosmos-tool-cmdtlmserver 7.2.0 → 7.3.0

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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdtlmserver/{ArrayWidget-D1PArcGr-1cb78ca7cb83e47908ee.js → ArrayWidget-5XQXgMtp-a1cacc906ac370efa514.js} +2 -2
  3. data/tools/cmdtlmserver/{ArrayplotWidget-DPUPy0qM-9c5325ed3b6e0c89df8f.js → ArrayplotWidget-pk7OINvA-33210225b3c4431d6f33.js} +1 -1
  4. data/tools/cmdtlmserver/{BarColumn-BpdscDQf-2d19bc70f89b83debf2b.js → BarColumn-JQ552zb0-e17d595e7ac2fedab92d.js} +1 -1
  5. data/tools/cmdtlmserver/{BlockWidget-_VUsK5T9-87cecde84ec9eee53d78.js → BlockWidget-B_5TnoG_-4917a3006731d930dcdd.js} +2 -2
  6. data/tools/cmdtlmserver/ButtonWidget-CiZGNEls-dd9c48d4c0e919b0c57c.js +1 -0
  7. data/tools/cmdtlmserver/CanvasWidget-CzLQAoHY-4af75346e21d0d3331bc.js +1 -0
  8. data/tools/cmdtlmserver/CanvasdotWidget-CcI1HwAp-f0e921fbede93d96bb17.js +1 -0
  9. data/tools/cmdtlmserver/{CanvasimageWidget-COv_Qnc8-53c8b97c1eff0cb369be.js → CanvasimageWidget-CYg1rKr_-39afd3add27b4d447626.js} +1 -1
  10. data/tools/cmdtlmserver/{CanvasimagevalueWidget-BhuUqLOo-388fa33a3da2d971b05b.js → CanvasimagevalueWidget-e0p2honY-57cf09c62360d64ff9c1.js} +1 -1
  11. data/tools/cmdtlmserver/CanvaslabelWidget-CgECf4wH-fef8dafccaa229773720.js +1 -0
  12. data/tools/cmdtlmserver/CanvaslabelvalueWidget-bCIPWE4c-08b3d8971b85e410007d.js +1 -0
  13. data/tools/cmdtlmserver/CanvaslineWidget-Tw1B6RTA-4182a23eb3b4901d5006.js +1 -0
  14. data/tools/cmdtlmserver/{CanvaslinevalueWidget-D4eaxWhR-488c1eb347eb93f3db22.js → CanvaslinevalueWidget-GvTic9rq-b0f032ce88445cb0c895.js} +1 -1
  15. data/tools/cmdtlmserver/CheckbuttonWidget-DV6xeneq-86726035ada344b7e26c.js +1 -0
  16. data/tools/cmdtlmserver/{CmdPacketsTab-5213fff88faeff8c2bf0.js → CmdPacketsTab-0e324d15546779b36cbe.js} +1 -1
  17. data/tools/cmdtlmserver/CmdTlmServer-be4dac6eeb7a6b184fd0.js +2 -0
  18. data/tools/cmdtlmserver/ComboboxWidget-BO31bWzg-a8f50b8d6656deb1ce0a.js +1 -0
  19. data/tools/cmdtlmserver/DataFlowsTab-88fea14a23c13f784f4e.js +1 -0
  20. data/tools/cmdtlmserver/{DateWidget-DkNWx28s-7f519b2f30faeb9fe3fd.js → DateWidget-DYviZFhJ-ed0e06de6fb4dc83dade.js} +1 -1
  21. data/tools/cmdtlmserver/{DetailsDialog-F4KgYM6m-df810d02cfb5e0198172.js → DetailsDialog-DHi4t3xd-4dbbbe18b115be58dea3.js} +1 -1
  22. data/tools/cmdtlmserver/{DynamicWidget-BuSbQVhf-18179cf5a61cbc723d72.js → DynamicWidget-BuSbQVhf-50da98367e5f44445d64.js} +1 -1
  23. data/tools/cmdtlmserver/{FilechecksumWidget-DSfNEnDJ-b6d7f28b678c6b571db9.js → FilechecksumWidget-rJe1KvzY-705def22db12f6e1158f.js} +1 -1
  24. data/tools/cmdtlmserver/{FiledisplayWidget-D2cxMmrP-91c627968612f56bef53.js → FiledisplayWidget-CbTWgtBy-e893d89bca5e32862cca.js} +1 -1
  25. data/tools/cmdtlmserver/{FormatvalueWidget-6-bj_PJO-5621420fe3506d1932e4.js → FormatvalueWidget-B9Giwzaz-e5b15c689305bbdc6138.js} +1 -1
  26. data/tools/cmdtlmserver/Graph-xc7TNnsk-fba27e65875cd99573f3.js +1 -0
  27. data/tools/cmdtlmserver/{GraphWidget-COXK3Dab-3f26903e4d5da289ab20.js → GraphWidget-COvVOlEn-a0d704d0f01317149056.js} +1 -1
  28. data/tools/cmdtlmserver/{HorizontalWidget-C9UFBPsk-84c81a59fc34282ffe71.js → HorizontalWidget-BfdjRLGe-c62ae940f92c44a7eadb.js} +1 -1
  29. data/tools/cmdtlmserver/{HorizontalboxWidget-CWLfmRtr-09493eb27796c1b12919.js → HorizontalboxWidget-B1b9uNaB-283855166e8f6be80aa3.js} +1 -1
  30. data/tools/cmdtlmserver/HorizontallineWidget-CHz4o6Gi-144da9f65a08a273e22c.js +1 -0
  31. data/tools/cmdtlmserver/{IframeWidget-Bn9eGzrq-fdd10b58ac32de3de437.js → IframeWidget-BCtrIgD1-2cc07ddcb93de83d426b.js} +1 -1
  32. data/tools/cmdtlmserver/{ImageLoader-_gAudhVo-003969d31d1c3d9e5b32.js → ImageLoader-BzE4VsHW-b822713b7f721dd17a29.js} +1 -1
  33. data/tools/cmdtlmserver/{ImageviewerWidget-BUWhF32Z-751c45f6392ccbe675d5.js → ImageviewerWidget-DKMBE3tQ-0b274f194175b3f6f708.js} +1 -1
  34. data/tools/cmdtlmserver/InterfaceFlowChart-2293ad5a69524f8faaad.js +27 -0
  35. data/tools/cmdtlmserver/{InterfacesTab-dca6d7668848c4078e8d.js → InterfacesTab-0950a7dc993d1ae87cf5.js} +1 -1
  36. data/tools/cmdtlmserver/{LabelWidget-BhzkN06D-4209a141ff664143bb0f.js → LabelWidget-B0nE0ImW-999c37cd748bfc5ca350.js} +1 -1
  37. data/tools/cmdtlmserver/LabelledWidget-DrZHj_lR-c3f0ca0f29f8d1826cfa.js +1 -0
  38. data/tools/cmdtlmserver/LabelprogressbarWidget-K9NphQp0-005aa442ae92ec5e6195.js +1 -0
  39. data/tools/cmdtlmserver/LabelsparklineWidget-cn1OJvL3-9ad770dac6482cfe7084.js +1 -0
  40. data/tools/cmdtlmserver/LabelvalueWidget-DxJbd9nR-94970a1cc88b1da754d2.js +1 -0
  41. data/tools/cmdtlmserver/LabelvaluedescWidget-B-RiUnpl-fcb69cfc6baf57e6d2c8.js +1 -0
  42. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-BF94rtl8-c4fd4c7721f15451d97a.js +1 -0
  43. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-UOfPu8D1-dafe079eee8d7fbe6259.js +1 -0
  44. data/tools/cmdtlmserver/LabelvaluerangebarWidget-EVON-Tv8-cd0b204f545690c17be8.js +1 -0
  45. data/tools/cmdtlmserver/{Layout-CKmC50QZ-85f8ef7d9d4b778fc3f8.js → Layout-BLS4Yi3m-463747ca904cd4ff6c37.js} +1 -1
  46. data/tools/cmdtlmserver/{LedWidget-D1lmNXpi-3a5b364ce2a97685e9dd.js → LedWidget-DqVfh3zJ-78303742fb462fb51a83.js} +1 -1
  47. data/tools/cmdtlmserver/{LimitsBar-D5IZu7eX-07cdd7c4da705a5b2cac.js → LimitsBar-BqpvMpXM-88386f80850feaa6b865.js} +1 -1
  48. data/tools/cmdtlmserver/{LimitsbarWidget-VpxQXE-e-a756975fa42f4776712f.js → LimitsbarWidget-rEJIGKCx-2261d23989cc84a8d6f7.js} +1 -1
  49. data/tools/cmdtlmserver/{LimitscolorWidget-79P41CX7-ad179ada10464166cfb2.js → LimitscolorWidget-DVXho9Mm-16a9b9e86dda203630c7.js} +1 -1
  50. data/tools/cmdtlmserver/{LimitscolumnWidget-BFDXhJeZ-ded4fac25cb92257eb32.js → LimitscolumnWidget-DSQAdlZS-f7be960c2a12ab481f6d.js} +1 -1
  51. data/tools/cmdtlmserver/LinegraphWidget-CQRwZ0N6-e14cfd73c7976088c1f1.js +1 -0
  52. data/tools/cmdtlmserver/{MatrixbycolumnsWidget--ihvirDP-13588dfd9e05a20284cf.js → MatrixbycolumnsWidget-CJJ7SugT-cdb25088226a82895af3.js} +1 -1
  53. data/tools/cmdtlmserver/{OpenC3TimePicker-B0lAIU91-1d7cb9e69fdb3e2d19db.js → OpenC3TimePicker-Cww9L2Ij-002972617330ac39b4db.js} +1 -1
  54. data/tools/cmdtlmserver/{ProgressbarWidget-BIB3r9SL-89623753647970ec01f0.js → ProgressbarWidget-VTd49uhi-4de5cacfe2dc76b2ab1c.js} +1 -1
  55. data/tools/cmdtlmserver/RadiobuttonWidget-DqsantxO-2112f35825b3072a7b0a.js +1 -0
  56. data/tools/cmdtlmserver/{RadiogroupWidget-CciTCv1U-ebc68de8edecb013d87d.js → RadiogroupWidget-Bht6RZPH-8f7c530485bd7760772e.js} +1 -1
  57. data/tools/cmdtlmserver/{RangebarWidget-MPQYi2Km-6b2b3f2e820d4e5ce633.js → RangebarWidget-CN11Oqws-2c2edef9a9eb9ef4892c.js} +1 -1
  58. data/tools/cmdtlmserver/{RawBuffer-ebb6aadc11fa84048a7f.js → RawBuffer-90a2abdee24debc5b537.js} +1 -1
  59. data/tools/cmdtlmserver/{RawDialog-4383b630959e2310610e.js → RawDialog-3b36f1e5ab5cdf44f650.js} +1 -1
  60. data/tools/cmdtlmserver/{RollupWidget-CfjGAhzg-6b1de39f95e298a21e0f.js → RollupWidget-cgl9Ghle-e2934ddfe4117fb13a53.js} +1 -1
  61. data/tools/cmdtlmserver/{RoutersTab-7438fce73b7c2c45c9c7.js → RoutersTab-542302486cd961ede002.js} +1 -1
  62. data/tools/cmdtlmserver/ScrollwindowWidget-BFK-ihvZ-90c8fb32873df4b31339.js +1 -0
  63. data/tools/cmdtlmserver/{SignalWidget-C-qecoTO-b31583be1fe1a7a01769.js → SignalWidget-Be7Z5pJD-10eb7a0ca46a327184f3.js} +1 -1
  64. data/tools/cmdtlmserver/SpacerWidget-uKPA-f_0-18ddf6aff97bc3aa2eed.js +1 -0
  65. data/tools/cmdtlmserver/SparklineWidget-Wu5iFbly-9336eea1201b5e702e22.js +1 -0
  66. data/tools/cmdtlmserver/{StatusTab-7f111deb77c4a2bc05b0.js → StatusTab-0dbcf0b1411d44f21f50.js} +1 -1
  67. data/tools/cmdtlmserver/TabbookWidget-D3FrIoV4-e06adf708de31869bff4.js +1 -0
  68. data/tools/cmdtlmserver/TargetsTab-8def00628316dacb10b9.js +1 -0
  69. data/tools/cmdtlmserver/TextboxWidget-f6wEcoI0-40e18e2c50ee31ccd381.js +1 -0
  70. data/tools/cmdtlmserver/TextfieldWidget-D72Sey-h-91a2aac704f5a971cb37.js +1 -0
  71. data/tools/cmdtlmserver/TimeWidget-BBuxr7Db-4478ed91a6bda559bcd5.js +1 -0
  72. data/tools/cmdtlmserver/TitleWidget-Dfp5mPH2-cbf4ea6dbac6faf880ca.js +1 -0
  73. data/tools/cmdtlmserver/{TlmPacketsTab-6453f72e7567b78bb979.js → TlmPacketsTab-348ca696bec8218d392e.js} +1 -1
  74. data/tools/cmdtlmserver/{Updater-d97ddec520bea4a73d3f.js → Updater-ddbf71ef8b261678632b.js} +1 -1
  75. data/tools/cmdtlmserver/{VWidget-oMbywhLA-03a02aaf028be7a3c9c0.js → VWidget-5FjwlURU-ccd0da88597b1fe24b9f.js} +1 -1
  76. data/tools/cmdtlmserver/ValueWidget-CpptSOvJ-c79b03e200fceaed3b72.js +1 -0
  77. data/tools/cmdtlmserver/ValuelimitsbarWidget-AgeOlPAV-5ecbdfb993465212a981.js +1 -0
  78. data/tools/cmdtlmserver/ValuelimitscolumnWidget-CfTt7Q8a-5f88ad7096c065616966.js +1 -0
  79. data/tools/cmdtlmserver/ValuerangebarWidget-E3CtttJk-e1f7f4f4d4deb9b59e1d.js +1 -0
  80. data/tools/cmdtlmserver/VerticalWidget-B_eheXmK-caf636d80032bd7d00de.js +1 -0
  81. data/tools/cmdtlmserver/{VerticalboxWidget-C7RrkfY0-f0cc6f904b80b09e5ba7.js → VerticalboxWidget-Bf8XJiY9-482c288cf9bc399495ad.js} +1 -1
  82. data/tools/cmdtlmserver/{Widget-D_HaosJK-e286c8e7e2106d81e87c.js → Widget-CSgnvwEG-342dae6e23faa53d97f8.js} +1 -1
  83. data/tools/cmdtlmserver/main-1e301797925648810014.js +1493 -0
  84. data/tools/cmdtlmserver/main.js +1 -1
  85. data/tools/cmdtlmserver/services-57f41ec24ff307cc14a2.js +10 -0
  86. metadata +84 -84
  87. data/tools/cmdtlmserver/ButtonWidget-DE41o-cg-c5cd6e74dbabd0420d0e.js +0 -2
  88. data/tools/cmdtlmserver/CanvasWidget-BEi8h3Mq-e35c5a9baa7ecd914bcf.js +0 -1
  89. data/tools/cmdtlmserver/CanvasdotWidget-eZuMgkhL-fda5d43523fafb058839.js +0 -1
  90. data/tools/cmdtlmserver/CanvaslabelWidget-DtvbgeYH-6e001a64a4a18263f0ee.js +0 -1
  91. data/tools/cmdtlmserver/CanvaslabelvalueWidget-C_FRIeNb-4134766817f8dcab10e9.js +0 -1
  92. data/tools/cmdtlmserver/CanvaslineWidget-D1K_6mAY-957ef26c77ffcf3c26aa.js +0 -1
  93. data/tools/cmdtlmserver/CheckbuttonWidget-ByxMDkiS-6e069bf3ea2500374efe.js +0 -1
  94. data/tools/cmdtlmserver/CmdTlmServer-db96cc7a37046fc23e08.js +0 -2
  95. data/tools/cmdtlmserver/ComboboxWidget-CAGxGv2r-d17c3e9aaa2b1b02ab46.js +0 -1
  96. data/tools/cmdtlmserver/DataFlowsTab-324bc5957f403e4d2794.js +0 -1
  97. data/tools/cmdtlmserver/Graph-Cz0Ns1FD-0efdbbd522a909650069.js +0 -1
  98. data/tools/cmdtlmserver/HorizontallineWidget-DeFkOaYO-257ec3426ecc547ca94f.js +0 -1
  99. data/tools/cmdtlmserver/InterfaceFlowChart-cfadd36d819b485a73ef.js +0 -27
  100. data/tools/cmdtlmserver/LabelledWidget-vx8NvW1b-a9879fd6ddfc57fa36b9.js +0 -1
  101. data/tools/cmdtlmserver/LabelprogressbarWidget-t5PvKuS4-feb53cc1f8715b39f864.js +0 -1
  102. data/tools/cmdtlmserver/LabelsparklineWidget-CebbEH-j-f503f09d02fa4f3918c1.js +0 -1
  103. data/tools/cmdtlmserver/LabelvalueWidget-Cbs1DBK2-ce888769e60d2e4aad2c.js +0 -1
  104. data/tools/cmdtlmserver/LabelvaluedescWidget-B7OIOGc0-878e5a0b12c95f9dc732.js +0 -1
  105. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C57kf-oQ-0be9055fc642dd213441.js +0 -1
  106. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BRlNDEqp-e812057ca64792e7caed.js +0 -1
  107. data/tools/cmdtlmserver/LabelvaluerangebarWidget-Pt_evm3v-77436cdf1233d55bfb62.js +0 -1
  108. data/tools/cmdtlmserver/LinegraphWidget-VqkpOlws-fdf5639852f6b641d75f.js +0 -1
  109. data/tools/cmdtlmserver/RadiobuttonWidget-C5rxLM7K-572c4d7c32c43b82c96b.js +0 -1
  110. data/tools/cmdtlmserver/ScrollwindowWidget-CupaygNN-1554ccfbbfa2766e4301.js +0 -1
  111. data/tools/cmdtlmserver/SpacerWidget-VVkOCb6N-dbdf2c2f889a818d027b.js +0 -1
  112. data/tools/cmdtlmserver/SparklineWidget-Dsmn38z_-1d9eba2ef6ba778585cd.js +0 -1
  113. data/tools/cmdtlmserver/TabbookWidget-CXklff-l-8ad144458fb01c903478.js +0 -1
  114. data/tools/cmdtlmserver/TargetsTab-29f400440b894771ad34.js +0 -1
  115. data/tools/cmdtlmserver/TextboxWidget-CHs2VYIv-939d75e16d4590c1f1f8.js +0 -1
  116. data/tools/cmdtlmserver/TextfieldWidget-CdANAW-6-6a6919e7eb62ef86954f.js +0 -1
  117. data/tools/cmdtlmserver/TimeWidget-D0xT1wXR-19f76febd2f5779fae7a.js +0 -1
  118. data/tools/cmdtlmserver/TitleWidget-68NWCcXB-7507be046b0a9b3c127c.js +0 -1
  119. data/tools/cmdtlmserver/ValueWidget-B1aGUBP7-af6d1d1a57943374ee79.js +0 -1
  120. data/tools/cmdtlmserver/ValuelimitsbarWidget-B7KcRjLS-de09e4004f70b97b84bc.js +0 -1
  121. data/tools/cmdtlmserver/ValuelimitscolumnWidget-BVt6nLXq-ca32b86e6abfcdcca7df.js +0 -1
  122. data/tools/cmdtlmserver/ValuerangebarWidget-uVZEI32U-d5bd219c6bc362dc1229.js +0 -1
  123. data/tools/cmdtlmserver/VerticalWidget-DlftYBjH-7f2f1e45111c6a438cd3.js +0 -1
  124. data/tools/cmdtlmserver/main-ae88870307d629b1ce0e.js +0 -1499
  125. data/tools/cmdtlmserver/services-a7fe7e9b036652e7b4b1.js +0 -10
@@ -0,0 +1,1493 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(ar,at){"use strict";var kn,gt,qn,on,He,Zt,ht,$g,Tg,Eo,Pn,Pr,ji,_r,ni,Eg,Wi,tn,dt,Ti,Rg,Tl,Vs,Lt,mi,Oa,Lc,El,$s,Ft,Na,Oc,Ig,qs,Rl,Da,Mg,as,Mh,Lg,Og,Ng,Gs,Lh,Dg,Pg,Bg,dr,zg,sn,Oh,Fg,Ei,jg,Il,Nc,Pa,Wg,Nh,Hg,Ug,Vg,qg,Dh,Gg;return{setters:[it=>{kn=it.resolveComponent,gt=it.openBlock,qn=it.createBlock,on=it.withCtx,He=it.createVNode,Zt=it.createElementBlock,ht=it.createElementVNode,$g=it.useCssVars,Tg=it.defineAsyncComponent,Eo=it.h,Pn=it.normalizeStyle,Pr=it.Fragment,ji=it.createTextVNode,_r=it.toDisplayString,ni=it.createCommentVNode,Eg=it.toRefs,Wi=it.shallowRef,tn=it.ref,dt=it.computed,Ti=it.watch,Rg=it.onBeforeMount,Tl=it.nextTick,Vs=it.onBeforeUnmount,Lt=it.toRef,mi=it.watchEffect,Oa=it.isVNode,Lc=it.TransitionGroup,El=it.Transition,$s=it.defineComponent,Ft=it.unref,Na=it.provide,Oc=it.isRef,Ig=it.getCurrentInstance,qs=it.inject,Rl=it.reactive,Da=it.onMounted,Mg=it.onUpdated,as=it.toValue,Mh=it.onScopeDispose,Lg=it.readonly,Og=it.toRaw,Ng=it.useId,Gs=it.resolveDynamicComponent,Lh=it.capitalize,Dg=it.camelize,Pg=it.markRaw,Bg=it.warn,dr=it.mergeProps,zg=it.effectScope,sn=it.normalizeClass,Oh=it.createApp,Fg=it.withKeys,Ei=it.renderSlot,jg=it.useAttrs,Il=it.renderList,Nc=it.normalizeProps,Pa=it.withDirectives,Wg=it.Text,Nh=it.vShow},it=>{Hg=it.createRouter,Ug=it.createWebHistory},it=>{Vg=it.defineStore,qg=it.createPinia},it=>{Dh=it.getMountedApps},it=>{Gg=it.createVuetify}],execute:(function(){ar({C:jh,D:zh,F:um,I:tm,M:za,O:Ba,P:Ml,W:rm,b:hm,e:nm,h:cm,l:Zo,m:vi,q:Wb,r:ri});var it=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kg(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable}))),t.push.apply(t,r)}return t}function Ks(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Kg(Object(t),!0).forEach((function(r){SC(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kg(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function SC(e,n,t){return(n=(function(r){var h=(function(d,g){if(Ys(d)!=="object"||d===null)return d;var v=d[Symbol.toPrimitive];if(v!==void 0){var l=v.call(d,g);if(Ys(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(d)})(r,"string");return Ys(h)==="symbol"?h:String(h)})(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ys(e){return Ys=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},Ys(e)}(function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var n=function(t){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,h=String(t),d=h.length,g=-1,v="",l=h.charCodeAt(0);++g<d;)(r=h.charCodeAt(g))!=0?v+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&l==45?"\\"+r.toString(16)+" ":g==0&&d==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+h.charAt(g):h.charAt(g):v+="�";return v};e.CSS||(e.CSS={}),e.CSS.escape=n})(it);var $C={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function TC(e){if(Ys(e)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=Ks(Ks({},$C),e);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(Ys(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var t={};return{bootstrap:EC.bind(null,n,t),mount:RC.bind(null,n,t),unmount:MC.bind(null,n,t),update:IC.bind(null,n,t)}}function EC(e){return e.loadRootComponent?e.loadRootComponent().then((function(n){return e.rootComponent=n})):Promise.resolve()}function RC(e,n,t){var r={};return Promise.resolve().then((function(){return(function(h,d){return typeof h.appOptions=="function"?h.appOptions(d):Promise.resolve(Ks({},h.appOptions))})(e,t).then((function(h){var d;if(t.domElement&&!h.el&&(h.el=t.domElement),h.el)if(typeof h.el=="string"){if(!(d=document.querySelector(h.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(h.el))}else(d=h.el).id||(d.id="single-spa-application:".concat(t.name)),h.el="#".concat(CSS.escape(d.id));else{var g="single-spa-application:".concat(t.name);h.el="#".concat(CSS.escape(g)),(d=document.getElementById(g))||((d=document.createElement("div")).id=g,document.body.appendChild(d))}if(!e.replaceMode&&(h.el=h.el+" .single-spa-container",!d.querySelector(".single-spa-container"))){var v=document.createElement("div");v.className="single-spa-container",d.appendChild(v)}r.domEl=d,h.render||h.template||!e.rootComponent||(h.render=function(f){return f(e.rootComponent)}),h.data||(h.data={});var l=h.data;if(h.data=function(){return Ks(Ks({},typeof l=="function"?l.call(this,this):l),t)},e.createApp){if(r.vueInstance=e.createApp(h),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,t)).then((function(){return r.root=r.vueInstance.mount(h.el),n[t.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(h.el)}else if(r.vueInstance=new e.Vue(h),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,t)).then((function(){return n[t.name]=r,r.vueInstance}));return n[t.name]=r,r.vueInstance}))}))}function IC(e,n,t){return Promise.resolve().then((function(){var r=n[t.name],h=Ks(Ks({},e.appOptions.data||{}),t),d=r.root||r.vueInstance;for(var g in h)d[g]=h[g]}))}function MC(e,n,t){return Promise.resolve().then((function(){var r=n[t.name];e.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 LC=ar("_",(e,n)=>{const t=e.__vccOpts||e;for(const[r,h]of n)t[r]=h;return t}),OC={};function NC(e,n){const t=kn("router-view"),r=kn("v-app");return gt(),qn(r,{id:"innerapp"},{default:on(()=>[He(t)]),_:1})}const DC=LC(OC,[["render",NC]]),a3="modulepreload",l3=function(e){return"/"+e},c3={},lt=function(n,t,r){let h=Promise.resolve();function d(g){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=g,window.dispatchEvent(v),!v.defaultPrevented)throw g}return h.then(g=>{for(const v of g||[])v.status==="rejected"&&d(v.reason);return n().catch(d)})},Yg=function(e){!e.name!=="NotFound"&&(e.path=`/tools/cmdtlmserver/${e.path.replace(/^\//,"")}`),e.children?.forEach(Yg)},Js=ar("k",(e,n)=>{const t=e.__vccOpts||e;for(const[r,h]of n)t[r]=h;return t}),PC="/icons/customIcons.svg",Ph={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return PC+"#"+this.icon}}},Jg=()=>{$g(e=>({v4ccb3d08:e.color}))},Zg=Ph.setup;Ph.setup=Zg?(e,n)=>(Jg(),Zg(e,n)):Jg;const BC={class:"cosmos-custom-icon"},zC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},FC=["href"];function jC(e,n,t,r,h,d){return gt(),Zt("span",BC,[(gt(),Zt("svg",zC,[ht("use",{href:d.iconSrc},null,8,FC)]))])}const WC=Js(Ph,[["render",jC],["__scopeId","data-v-54b83b01"]]),Dc=6e4,Bh=36e5,HC=1e3,Xg=Symbol.for("constructDateFrom");ar({c:Dc,n:Bh,L:HC});function Zo(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&Xg in e?e[Xg](n):e instanceof Date?new e.constructor(n):new Date(n)}function vi(e,n){return Zo(n||e,e)}let UC={};function Ba(){return UC}function za(e,n){const t=Ba(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,h=vi(e,n?.in),d=h.getDay(),g=(d<r?7:0)+d-r;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function Ml(e,n){return za(e,{...n,weekStartsOn:1})}function Qg(e,n){const t=vi(e,n?.in),r=t.getFullYear(),h=Zo(t,0);h.setFullYear(r+1,0,4),h.setHours(0,0,0,0);const d=Ml(h),g=Zo(t,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const v=Ml(g);return t.getTime()>=d.getTime()?r+1:t.getTime()>=v.getTime()?r:r-1}function zh(e){const n=vi(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function VC(e,...n){const t=Zo.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function em(e,n){const t=vi(e,n?.in);return t.setHours(0,0,0,0),t}function qC(e,n,t){const[r,h]=VC(t?.in,e,n),d=em(r),g=em(h),v=+d-zh(d),l=+g-zh(g);return Math.round((v-l)/864e5)}function GC(e,n){const t=Qg(e,n),r=Zo(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Ml(r)}function KC(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function tm(e){return!(!KC(e)&&typeof e!="number"||isNaN(+vi(e)))}function YC(e,n){const t=vi(e,n?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const JC={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"}},ZC=(e,n,t)=>{let r;const h=JC[e];return typeof h=="string"?r=h:n===1?r=h.one:r=h.other.replace("{{count}}",n.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function Fh(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const XC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},QC={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},e_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},t_={date:Fh({formats:XC,defaultWidth:"full"}),time:Fh({formats:QC,defaultWidth:"full"}),dateTime:Fh({formats:e_,defaultWidth:"full"})},n_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r_=(e,n,t,r)=>n_[e];function Ll(e){return(n,t)=>{const r=t?.context?String(t.context):"standalone";let h;if(r==="formatting"&&e.formattingValues){const g=e.defaultFormattingWidth||e.defaultWidth,v=t?.width?String(t.width):g;h=e.formattingValues[v]||e.formattingValues[g]}else{const g=e.defaultWidth,v=t?.width?String(t.width):e.defaultWidth;h=e.values[v]||e.values[g]}const d=e.argumentCallback?e.argumentCallback(n):n;return h[d]}}const i_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},o_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s_={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"]},a_={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"]},l_={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"}},c_={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"}},u_=(e,n)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},h_={ordinalNumber:u_,era:Ll({values:i_,defaultWidth:"wide"}),quarter:Ll({values:o_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ll({values:s_,defaultWidth:"wide"}),day:Ll({values:a_,defaultWidth:"wide"}),dayPeriod:Ll({values:l_,defaultWidth:"wide",formattingValues:c_,defaultFormattingWidth:"wide"})};function Ol(e){return(n,t={})=>{const r=t.width,h=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],d=n.match(h);if(!d)return null;const g=d[0],v=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(v)?p_(v,a=>a.test(g)):d_(v,a=>a.test(g));let f;f=e.valueCallback?e.valueCallback(l):l,f=t.valueCallback?t.valueCallback(f):f;const s=n.slice(g.length);return{value:f,rest:s}}}function d_(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function p_(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return t}function f_(e){return(n,t={})=>{const r=n.match(e.matchPattern);if(!r)return null;const h=r[0],d=n.match(e.parsePattern);if(!d)return null;let g=e.valueCallback?e.valueCallback(d[0]):d[0];g=t.valueCallback?t.valueCallback(g):g;const v=n.slice(h.length);return{value:g,rest:v}}}const g_=/^(\d+)(th|st|nd|rd)?/i,m_=/\d+/i,v_={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},y_={any:[/^b/i,/^(a|c)/i]},b_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},w_={any:[/1/i,/2/i,/3/i,/4/i]},x_={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},C_={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]},__={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},k_={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]},A_={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},S_={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}},$_={ordinalNumber:f_({matchPattern:g_,parsePattern:m_,valueCallback:e=>parseInt(e,10)}),era:Ol({matchPatterns:v_,defaultMatchWidth:"wide",parsePatterns:y_,defaultParseWidth:"any"}),quarter:Ol({matchPatterns:b_,defaultMatchWidth:"wide",parsePatterns:w_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ol({matchPatterns:x_,defaultMatchWidth:"wide",parsePatterns:C_,defaultParseWidth:"any"}),day:Ol({matchPatterns:__,defaultMatchWidth:"wide",parsePatterns:k_,defaultParseWidth:"any"}),dayPeriod:Ol({matchPatterns:A_,defaultMatchWidth:"any",parsePatterns:S_,defaultParseWidth:"any"})},T_=ar("d",{code:"en-US",formatDistance:ZC,formatLong:t_,formatRelative:r_,localize:h_,match:$_,options:{weekStartsOn:0,firstWeekContainsDate:1}});function E_(e,n){const t=vi(e,n?.in);return qC(t,YC(t))+1}function nm(e,n){const t=vi(e,n?.in),r=+Ml(t)-+GC(t);return Math.round(r/6048e5)+1}function jh(e,n){const t=vi(e,n?.in),r=t.getFullYear(),h=Ba(),d=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??h.firstWeekContainsDate??h.locale?.options?.firstWeekContainsDate??1,g=Zo(n?.in||e,0);g.setFullYear(r+1,0,d),g.setHours(0,0,0,0);const v=za(g,n),l=Zo(n?.in||e,0);l.setFullYear(r,0,d),l.setHours(0,0,0,0);const f=za(l,n);return+t>=+v?r+1:+t>=+f?r:r-1}function R_(e,n){const t=Ba(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,h=jh(e,n),d=Zo(n?.in||e,0);return d.setFullYear(h,0,r),d.setHours(0,0,0,0),za(d,n)}function rm(e,n){const t=vi(e,n?.in),r=+za(t,n)-+R_(t,n);return Math.round(r/6048e5)+1}function xn(e,n){const t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}const Ts={y(e,n){const t=e.getFullYear(),r=t>0?t:1-t;return xn(n==="yy"?r%100:r,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):xn(t+1,2)},d(e,n){return xn(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(e,n){return xn(e.getHours()%12||12,n.length)},H(e,n){return xn(e.getHours(),n.length)},m(e,n){return xn(e.getMinutes(),n.length)},s(e,n){return xn(e.getSeconds(),n.length)},S(e,n){const t=n.length,r=e.getMilliseconds(),h=Math.trunc(r*Math.pow(10,t-3));return xn(h,n.length)}},Fa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},im={G:function(e,n,t){const r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const r=e.getFullYear(),h=r>0?r:1-r;return t.ordinalNumber(h,{unit:"year"})}return Ts.y(e,n)},Y:function(e,n,t,r){const h=jh(e,r),d=h>0?h:1-h;if(n==="YY"){const g=d%100;return xn(g,2)}return n==="Yo"?t.ordinalNumber(d,{unit:"year"}):xn(d,n.length)},R:function(e,n){const t=Qg(e);return xn(t,n.length)},u:function(e,n){const t=e.getFullYear();return xn(t,n.length)},Q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return xn(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return xn(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){const r=e.getMonth();switch(n){case"M":case"MM":return Ts.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){const r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return xn(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){const h=rm(e,r);return n==="wo"?t.ordinalNumber(h,{unit:"week"}):xn(h,n.length)},I:function(e,n,t){const r=nm(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):xn(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):Ts.d(e,n)},D:function(e,n,t){const r=E_(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):xn(r,n.length)},E:function(e,n,t){const r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){const h=e.getDay(),d=(h-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(d);case"ee":return xn(d,2);case"eo":return t.ordinalNumber(d,{unit:"day"});case"eee":return t.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(h,{width:"short",context:"formatting"});default:return t.day(h,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){const h=e.getDay(),d=(h-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(d);case"cc":return xn(d,n.length);case"co":return t.ordinalNumber(d,{unit:"day"});case"ccc":return t.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(h,{width:"narrow",context:"standalone"});case"cccccc":return t.day(h,{width:"short",context:"standalone"});default:return t.day(h,{width:"wide",context:"standalone"})}},i:function(e,n,t){const r=e.getDay(),h=r===0?7:r;switch(n){case"i":return String(h);case"ii":return xn(h,n.length);case"io":return t.ordinalNumber(h,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){const r=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,n,t){const r=e.getHours();let h;switch(r===12?h=Fa.noon:r===0?h=Fa.midnight:h=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(h,{width:"narrow",context:"formatting"});default:return t.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(e,n,t){const r=e.getHours();let h;switch(r>=17?h=Fa.evening:r>=12?h=Fa.afternoon:r>=4?h=Fa.morning:h=Fa.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(h,{width:"narrow",context:"formatting"});default:return t.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Ts.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):Ts.H(e,n)},K:function(e,n,t){const r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):xn(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):xn(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ts.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):Ts.s(e,n)},S:function(e,n){return Ts.S(e,n)},X:function(e,n,t){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return sm(r);case"XXXX":case"XX":return Zs(r);default:return Zs(r,":")}},x:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"x":return sm(r);case"xxxx":case"xx":return Zs(r);default:return Zs(r,":")}},O:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+om(r,":");default:return"GMT"+Zs(r,":")}},z:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+om(r,":");default:return"GMT"+Zs(r,":")}},t:function(e,n,t){const r=Math.trunc(+e/1e3);return xn(r,n.length)},T:function(e,n,t){return xn(+e,n.length)}};function om(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),h=Math.trunc(r/60),d=r%60;return d===0?t+String(h):t+String(h)+n+xn(d,2)}function sm(e,n){return e%60===0?(e>0?"-":"+")+xn(Math.abs(e)/60,2):Zs(e,n)}function Zs(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),h=xn(Math.trunc(r/60),2),d=xn(r%60,2);return t+h+n+d}const am=(e,n)=>{switch(e){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"})}},lm=(e,n)=>{switch(e){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_=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],r=t[1],h=t[2];if(!h)return am(e,n);let d;switch(r){case"P":d=n.dateTime({width:"short"});break;case"PP":d=n.dateTime({width:"medium"});break;case"PPP":d=n.dateTime({width:"long"});break;default:d=n.dateTime({width:"full"});break}return d.replace("{{date}}",am(r,n)).replace("{{time}}",lm(h,n))},M_=ar("a",{p:lm,P:I_}),L_=/^D+$/,O_=/^Y+$/,N_=["D","DD","YY","YYYY"];function cm(e){return L_.test(e)}function um(e){return O_.test(e)}function hm(e,n,t){const r=D_(e,n,t);if(console.warn(r),N_.includes(e))throw new RangeError(r)}function D_(e,n,t){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const P_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,B_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z_=/^'([^]*?)'?$/,F_=/''/g,j_=/[a-zA-Z]/;function Es(e,n,t){const r=Ba(),h=t?.locale??r.locale??T_,d=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,v=vi(e,t?.in);if(!tm(v))throw new RangeError("Invalid time value");let l=n.match(B_).map(s=>{const a=s[0];if(a==="p"||a==="P"){const u=M_[a];return u(s,h.formatLong)}return s}).join("").match(P_).map(s=>{if(s==="''")return{isToken:!1,value:"'"};const a=s[0];if(a==="'")return{isToken:!1,value:W_(s)};if(im[a])return{isToken:!0,value:s};if(a.match(j_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return{isToken:!1,value:s}});h.localize.preprocessor&&(l=h.localize.preprocessor(v,l));const f={firstWeekContainsDate:d,weekStartsOn:g,locale:h};return l.map(s=>{if(!s.isToken)return s.value;const a=s.value;(!t?.useAdditionalWeekYearTokens&&um(a)||!t?.useAdditionalDayOfYearTokens&&cm(a))&&hm(a,n,String(e));const u=im[a[0]];return u(v,a,h.localize,f)}).join("")}function W_(e){const n=e.match(z_);return n?n[1].replace(F_,"'"):e}var Rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dm={exports:{}},pm;function H_(){return pm||(pm=1,(function(e,n){(function(){var t="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var h=function(s,a,u){if(typeof s!="string"){h.original?h.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),h.modules[s]||(h.payloads[s]=u,h.modules[s]=null)};h.modules={},h.payloads={};var d=function(s,a,u){if(typeof a=="string"){var p=l(s,a);if(p!=null)return u&&u(),p}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var i=[],c=0,m=a.length;c<m;++c){var b=l(s,a[c]);if(b==null&&g.original)return;i.push(b)}return u&&u.apply(null,i)||!0}},g=function(s,a){var u=d("",s,a);return u==null&&g.original?g.original.apply(this,arguments):u},v=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return v(s,u[0])+"!"+v(s,u[1])}if(a.charAt(0)=="."){var p=s.split("/").slice(0,-1).join("/");for(a=p+"/"+a;a.indexOf(".")!==-1&&i!=a;){var i=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},l=function(s,a){a=v(s,a);var u=h.modules[a];if(!u){if(u=h.payloads[a],typeof u=="function"){var p={},i={id:a,uri:"",exports:p,packaged:!0},c=function(b,x){return d(a,b,x)},m=u(c,p,i);p=m||i.exports,h.modules[a]=p,delete h.payloads[a]}u=h.modules[a]=p||u}return u};function f(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(h.original=a.define,a.define=h,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(g.original=a.require,a.require=g,a.require.packaged=!0)}f(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,r,h){function d(g,v,l){Object.defineProperty(g,v,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(g,v){return v=v||0,this.lastIndexOf(g,v)===v}),String.prototype.endsWith||d(String.prototype,"endsWith",function(g,v){var l=this;(v===void 0||v>l.length)&&(v=l.length),v-=g.length;var f=l.indexOf(g,v);return f!==-1&&f===v}),String.prototype.repeat||d(String.prototype,"repeat",function(g){for(var v="",l=this;g>0;)g&1&&(v+=l),(g>>=1)&&(l+=l);return v}),String.prototype.includes||d(String.prototype,"includes",function(g,v){return this.indexOf(g,v)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var v=Object(g),l=1;l<arguments.length;l++){var f=arguments[l];f!=null&&Object.keys(f).forEach(function(s){v[s]=f[s]})}return v}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(v){return g[v]})}),Array.prototype.find||d(Array.prototype,"find",function(g){for(var v=this.length,l=arguments[1],f=0;f<v;f++){var s=this[f];if(g.call(l,s,f,this))return s}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(g){for(var v=this.length,l=arguments[1],f=0;f<v;f++){var s=this[f];if(g.call(l,s,f,this))return f}}),Array.prototype.includes||d(Array.prototype,"includes",function(g,v){return this.indexOf(g,v)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(g){for(var v=this,l=v.length>>>0,f=arguments[1],s=f>>0,a=s<0?Math.max(l+s,0):Math.min(s,l),u=arguments[2],p=u===void 0?l:u>>0,i=p<0?Math.max(l+p,0):Math.min(p,l);a<i;)v[a]=g,a++;return v}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,r,h){t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,r,h){r.deepCopy=function d(g){if(typeof g!="object"||!g)return g;var v;if(Array.isArray(g)){v=[];for(var l=0;l<g.length;l++)v[l]=d(g[l]);return v}if(Object.prototype.toString.call(g)!=="[object Object]")return g;v={};for(var l in g)v[l]=d(g[l]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,r,h){r.last=function(v){return v[v.length-1]},r.stringReverse=function(v){return v.split("").reverse().join("")},r.stringRepeat=function(v,l){for(var f="";l>0;)l&1&&(f+=v),(l>>=1)&&(v+=v);return f};var d=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(v){return v.replace(d,"")},r.stringTrimRight=function(v){return v.replace(g,"")},r.copyObject=function(v){var l={};for(var f in v)l[f]=v[f];return l},r.copyArray=function(v){for(var l=[],f=0,s=v.length;f<s;f++)v[f]&&typeof v[f]=="object"?l[f]=this.copyObject(v[f]):l[f]=v[f];return l},r.deepCopy=t("./deep_copy").deepCopy,r.arrayToMap=function(v){for(var l={},f=0;f<v.length;f++)l[v[f]]=1;return l},r.createMap=function(v){var l=Object.create(null);for(var f in v)l[f]=v[f];return l},r.arrayRemove=function(v,l){for(var f=0;f<=v.length;f++)l===v[f]&&v.splice(f,1)},r.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(v){return(""+v).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(v,l){var f=[];return v.replace(l,function(s){f.push({offset:arguments[arguments.length-2],length:s.length})}),f},r.deferredCall=function(v){var l=null,f=function(){l=null,v()},s=function(a){return s.cancel(),l=setTimeout(f,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),v(),s},s.cancel=function(){return clearTimeout(l),l=null,s},s.isPending=function(){return l},s},r.delayedCall=function(v,l){var f=null,s=function(){f=null,v()},a=function(u){f==null&&(f=setTimeout(s,u||l))};return a.delay=function(u){f&&clearTimeout(f),f=setTimeout(s,u||l)},a.schedule=a,a.call=function(){this.cancel(),v()},a.cancel=function(){f&&clearTimeout(f),f=null},a.isPending=function(){return f},a},r.sleep=function(v){return new Promise(function(l){setTimeout(l,v)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(v,l,f){return f&&v.codePointAt(l)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,r,h){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 d=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),v=d.userAgent||"",l=d.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((v.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((v.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=v.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(v.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,r.isAIR=v.indexOf("AdobeAIR")>=0,r.isAndroid=v.indexOf("Android")>=0,r.isChromeOS=v.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(v)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,r,h){var d=t("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function u(p,i,c){if(typeof p=="string"&&p){var m=document.createTextNode(p);return i&&i.appendChild(m),m}if(!Array.isArray(p))return p&&p.appendChild&&i&&i.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var b=[],x=0;x<p.length;x++){var I=u(p[x],i,c);I&&b.push(I)}return b}var $=document.createElement(p[0]),_=p[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<p.length;x++)u(p[x],$,c);return C==2&&Object.keys(_).forEach(function(O){var P=_[O];O==="class"?$.className=Array.isArray(P)?P.join(" "):P:typeof P=="function"||O=="value"||O[0]=="$"?$[O]=P:O==="ref"?c&&(c[P]=$):O==="style"?typeof P=="string"&&($.style.cssText=P):P!=null&&$.setAttribute(O,P)}),i&&i.appendChild($),$},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,p){return document.createElementNS?document.createElementNS(p||g,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,p){var i=p?p.ownerDocument:document;return i.createTextNode(u)},r.createFragment=function(u){var p=u?u.ownerDocument:document;return p.createDocumentFragment()},r.hasCssClass=function(u,p){var i=(u.className+"").split(/\s+/g);return i.indexOf(p)!==-1},r.addCssClass=function(u,p){r.hasCssClass(u,p)||(u.className+=" "+p)},r.removeCssClass=function(u,p){for(var i=u.className.split(/\s+/g);;){var c=i.indexOf(p);if(c==-1)break;i.splice(c,1)}u.className=i.join(" ")},r.toggleCssClass=function(u,p){for(var i=u.className.split(/\s+/g),c=!0;;){var m=i.indexOf(p);if(m==-1)break;c=!1,i.splice(m,1)}return c&&i.push(p),u.className=i.join(" "),c},r.setCssClass=function(u,p,i){i?r.addCssClass(u,p):r.removeCssClass(u,p)},r.hasCssString=function(u,p){var i=0,c;if(p=p||document,c=p.querySelectorAll("style")){for(;i<c.length;)if(c[i++].id===u)return!0}},r.removeElementById=function(u,p){p=p||document,p.getElementById(u)&&p.getElementById(u).remove()};var v,l=[];r.useStrictCSP=function(u){v=u,u==!1?f():l||(l=[])};function f(){var u=l;l=null,u&&u.forEach(function(p){s(p[0],p[1])})}function s(u,p,i){if(!(typeof document>"u")){if(l){if(i)f();else if(i===!1)return l.push([u,p])}if(!v){var c=i;!i||!i.getRootNode?c=document:(c=i.getRootNode(),(!c||c==i)&&(c=document));var m=c.ownerDocument||c;if(p&&r.hasCssString(p,c))return null;p&&(u+=`
2
+ /*# sourceURL=ace/css/`+p+" */");var b=r.createElement("style");b.appendChild(m.createTextNode(u)),p&&(b.id=p),c==m&&(c=r.getDocumentHead(m)),c.insertBefore(b,c.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,p){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(p))},r.$fixPositionBug=function(u){var p=u.getBoundingClientRect();if(u.style.left){var i=parseFloat(u.style.left),c=+p.left;Math.abs(i-c)>1&&(u.style.left=2*i-c+"px")}if(u.style.right){var i=parseFloat(u.style.right),c=window.innerWidth-p.right;Math.abs(i-c)>1&&(u.style.right=2*i-c+"px")}if(u.style.top){var i=parseFloat(u.style.top),c=+p.top;Math.abs(i-c)>1&&(u.style.top=2*i-c+"px")}if(u.style.bottom){var i=parseFloat(u.style.bottom),c=window.innerHeight-p.bottom;Math.abs(i-c)>1&&(u.style.bottom=2*i-c+"px")}},r.scrollbarWidth=function(u){var p=r.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var i=r.createElement("ace_outer"),c=i.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",i.appendChild(p);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(i);var b=p.offsetWidth;c.overflow="scroll";var x=p.offsetWidth;return b===x&&(x=i.clientWidth),m.removeChild(i),b-x},r.computedStyle=function(u,p){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,p,i){u[p]!==i&&(u[p]=i)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,p,i){u.style.transform="translate("+Math.round(p)+"px, "+Math.round(i)+"px)"}:r.translate=function(u,p,i){u.style.top=Math.round(i)+"px",u.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,r,h){var d=t("./dom");r.get=function(g,v){var l=new XMLHttpRequest;l.open("GET",g,!0),l.onreadystatechange=function(){l.readyState===4&&v(l.responseText)},l.send(null)},r.loadScript=function(g,v){var l=d.getDocumentHead(),f=document.createElement("script");f.src=g,l.appendChild(f),f.onload=f.onreadystatechange=function(s,a){(a||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,a||v())}},r.qualifyURL=function(g){var v=document.createElement("a");return v.href=g,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,r,h){r.inherits=function(d,g){d.super_=g,d.prototype=Object.create(g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,g){for(var v in g)d[v]=g[v];return d},r.implement=function(d,g){r.mixin(d,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,r,h){var d={},g=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(l,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[l]||[],a=this._defaultHandlers[l];if(!(!s.length&&!a)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=l),f.stopPropagation||(f.stopPropagation=g),f.preventDefault||(f.preventDefault=v),s=s.slice();for(var u=0;u<s.length&&(s[u](f,this),!f.propagationStopped);u++);if(a&&!f.defaultPrevented)return a(f,this)}},d._signal=function(l,f){var s=(this._eventRegistry||{})[l];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](f,this)}},d.once=function(l,f){var s=this;if(this.on(l,function a(){s.off(l,a),f.apply(null,arguments)}),!f)return new Promise(function(a){f=a})},d.setDefaultHandler=function(l,f){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[l]){var a=s[l],u=s._disabled_[l];u||(s._disabled_[l]=u=[]),u.push(a);var p=u.indexOf(f);p!=-1&&u.splice(p,1)}s[l]=f},d.removeDefaultHandler=function(l,f){var s=this._defaultHandlers;if(s){var a=s._disabled_[l];if(s[l]==f)a&&this.setDefaultHandler(l,a.pop());else if(a){var u=a.indexOf(f);u!=-1&&a.splice(u,1)}}},d.on=d.addEventListener=function(l,f,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[l];return a||(a=this._eventRegistry[l]=[]),a.indexOf(f)==-1&&a[s?"unshift":"push"](f),f},d.off=d.removeListener=d.removeEventListener=function(l,f){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[l];if(s){var a=s.indexOf(f);a!==-1&&s.splice(a,1)}},d.removeAllListeners=function(l){l||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[l]=void 0),this._defaultHandlers&&(this._defaultHandlers[l]=void 0)},r.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,r,h){r.reportError=function(d,g){var v=new Error(d);v.data=g,typeof console=="object"&&console.error&&console.error(v),setTimeout(function(){throw v})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,r,h){var d={"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=d}),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(t,r,h){"no use strict";var d=t("./oop"),g=t("./event_emitter").EventEmitter,v=t("./report_error").reportError,l=t("./default_english_messages").defaultEnglishMessages,f={setOptions:function(i){Object.keys(i).forEach(function(c){this.setOption(c,i[c])},this)},getOptions:function(i){var c={};if(i)Array.isArray(i)||(i=Object.keys(i));else{var m=this.$options;i=Object.keys(m).filter(function(b){return!m[b].hidden})}return i.forEach(function(b){c[b]=this.getOption(b)},this),c},setOption:function(i,c){if(this["$"+i]!==c){var m=this.$options[i];if(!m)return s('misspelled option "'+i+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(i,c);m.handlesSet||(this["$"+i]=c),m&&m.set&&m.set.call(this,c)}},getOption:function(i){var c=this.$options[i];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(i):c&&c.get?c.get.call(this):this["$"+i]:s('misspelled option "'+i+'"')}};function s(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,p=(function(){function i(){this.$defaultOptions={},a=l,u="dollarSigns"}return i.prototype.defineOptions=function(c,m,b){return c.$options||(this.$defaultOptions[m]=c.$options={}),Object.keys(b).forEach(function(x){var I=b[x];typeof I=="string"&&(I={forwardTo:I}),I.name||(I.name=x),c.$options[I.name]=I,"initialValue"in I&&(c["$"+I.name]=I.initialValue)}),d.implement(c,f),this},i.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(m){var b=c.$options[m];"value"in b&&c.setOption(m,b.value)})},i.prototype.setDefaultValue=function(c,m,b){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][m])break;if(!this.$defaultOptions[c][m])return!1}var x=this.$defaultOptions[c]||(this.$defaultOptions[c]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,b):x[m].value=b)},i.prototype.setDefaultValues=function(c,m){Object.keys(m).forEach(function(b){this.setDefaultValue(c,b,m[b])},this)},i.prototype.setMessages=function(c,m){a=c,m&&m.placeholders&&(u=m.placeholders)},i.prototype.nls=function(c,m,b){a[c]||(s("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||s("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=a[c]||a[m]||m;return b&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(I,$){return $=="$"?"$":b[$]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(I,$){return b[$]}))),x},i})();p.prototype.warn=s,p.prototype.reportError=v,d.implement(p.prototype,g),r.AppConfig=p}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,r,h){h.exports=`.ace-tm .ace_gutter {
3
+ background: #f0f0f0;
4
+ color: #333;
5
+ }
6
+
7
+ .ace-tm .ace_print-margin {
8
+ width: 1px;
9
+ background: #e8e8e8;
10
+ }
11
+
12
+ .ace-tm .ace_fold {
13
+ background-color: #6B72E6;
14
+ }
15
+
16
+ .ace-tm {
17
+ background-color: #FFFFFF;
18
+ color: black;
19
+ }
20
+
21
+ .ace-tm .ace_cursor {
22
+ color: black;
23
+ }
24
+
25
+ .ace-tm .ace_invisible {
26
+ color: rgb(191, 191, 191);
27
+ }
28
+
29
+ .ace-tm .ace_storage,
30
+ .ace-tm .ace_keyword {
31
+ color: blue;
32
+ }
33
+
34
+ .ace-tm .ace_constant {
35
+ color: rgb(197, 6, 11);
36
+ }
37
+
38
+ .ace-tm .ace_constant.ace_buildin {
39
+ color: rgb(88, 72, 246);
40
+ }
41
+
42
+ .ace-tm .ace_constant.ace_language {
43
+ color: rgb(88, 92, 246);
44
+ }
45
+
46
+ .ace-tm .ace_constant.ace_library {
47
+ color: rgb(6, 150, 14);
48
+ }
49
+
50
+ .ace-tm .ace_invalid {
51
+ background-color: rgba(255, 0, 0, 0.1);
52
+ color: red;
53
+ }
54
+
55
+ .ace-tm .ace_support.ace_function {
56
+ color: rgb(60, 76, 114);
57
+ }
58
+
59
+ .ace-tm .ace_support.ace_constant {
60
+ color: rgb(6, 150, 14);
61
+ }
62
+
63
+ .ace-tm .ace_support.ace_type,
64
+ .ace-tm .ace_support.ace_class {
65
+ color: rgb(109, 121, 222);
66
+ }
67
+
68
+ .ace-tm .ace_keyword.ace_operator {
69
+ color: rgb(104, 118, 135);
70
+ }
71
+
72
+ .ace-tm .ace_string {
73
+ color: rgb(3, 106, 7);
74
+ }
75
+
76
+ .ace-tm .ace_comment {
77
+ color: rgb(76, 136, 107);
78
+ }
79
+
80
+ .ace-tm .ace_comment.ace_doc {
81
+ color: rgb(0, 102, 255);
82
+ }
83
+
84
+ .ace-tm .ace_comment.ace_doc.ace_tag {
85
+ color: rgb(128, 159, 191);
86
+ }
87
+
88
+ .ace-tm .ace_constant.ace_numeric {
89
+ color: rgb(0, 0, 205);
90
+ }
91
+
92
+ .ace-tm .ace_variable {
93
+ color: rgb(49, 132, 149);
94
+ }
95
+
96
+ .ace-tm .ace_xml-pe {
97
+ color: rgb(104, 104, 91);
98
+ }
99
+
100
+ .ace-tm .ace_entity.ace_name.ace_function {
101
+ color: #0000A2;
102
+ }
103
+
104
+
105
+ .ace-tm .ace_heading {
106
+ color: rgb(12, 7, 255);
107
+ }
108
+
109
+ .ace-tm .ace_list {
110
+ color:rgb(185, 6, 144);
111
+ }
112
+
113
+ .ace-tm .ace_meta.ace_tag {
114
+ color:rgb(0, 22, 142);
115
+ }
116
+
117
+ .ace-tm .ace_string.ace_regex {
118
+ color: rgb(255, 0, 0)
119
+ }
120
+
121
+ .ace-tm .ace_marker-layer .ace_selection {
122
+ background: rgb(181, 213, 255);
123
+ }
124
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
125
+ box-shadow: 0 0 3px 0px white;
126
+ }
127
+ .ace-tm .ace_marker-layer .ace_step {
128
+ background: rgb(252, 255, 0);
129
+ }
130
+
131
+ .ace-tm .ace_marker-layer .ace_stack {
132
+ background: rgb(164, 229, 101);
133
+ }
134
+
135
+ .ace-tm .ace_marker-layer .ace_bracket {
136
+ margin: -1px 0 0 -1px;
137
+ border: 1px solid rgb(192, 192, 192);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_active-line {
141
+ background: rgba(0, 0, 0, 0.07);
142
+ }
143
+
144
+ .ace-tm .ace_gutter-active-line {
145
+ background-color : #dcdcdc;
146
+ }
147
+
148
+ .ace-tm .ace_marker-layer .ace_selected-word {
149
+ background: rgb(250, 250, 255);
150
+ border: 1px solid rgb(200, 200, 250);
151
+ }
152
+
153
+ .ace-tm .ace_indent-guide {
154
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
155
+ }
156
+
157
+ .ace-tm .ace_indent-guide-active {
158
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
159
+ }
160
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,r,h){r.isDark=!1,r.cssClass="ace-tm",r.cssText=t("./textmate-css"),r.$id="ace/theme/textmate";var d=t("../lib/dom");d.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(t,r,h){"no use strict";var d=t("./lib/lang"),g=t("./lib/net"),v=t("./lib/dom"),l=t("./lib/app_config").AppConfig;h.exports=r=new l;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(p){if(!f.hasOwnProperty(p))throw new Error("Unknown config key: "+p);return f[p]},r.set=function(p,i){if(f.hasOwnProperty(p))f[p]=i;else if(this.setDefaultValue("",p,i)==!1)throw new Error("Unknown config key: "+p);p=="useStrictCSP"&&v.useStrictCSP(i)},r.all=function(){return d.copyObject(f)},r.$modes={},r.moduleUrl=function(p,i){if(f.$moduleUrls[p])return f.$moduleUrls[p];var c=p.split("/");i=i||c[c.length-2]||"";var m=i=="snippets"?"/":"-",b=c[c.length-1];if(i=="worker"&&m=="-"){var x=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");b=b.replace(x,"")}(!b||b==i)&&c.length>1&&(b=c[c.length-2]);var I=f[i+"Path"];return I==null?I=f.basePath:m=="/"&&(i=m=""),I&&I.slice(-1)!="/"&&(I+="/"),I+i+m+b+this.get("suffix")},r.setModuleUrl=function(p,i){return f.$moduleUrls[p]=i};var s=function(p,i){if(p==="ace/theme/textmate"||p==="./theme/textmate")return i(null,t("./theme/textmate"));if(a)return a(p,i);console.error("loader is not configured")},a;r.setLoader=function(p){a=p},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(p,i){var c;if(Array.isArray(p))var m=p[0],b=p[1];else if(typeof p=="string")var b=p;var x=function(I){if(I&&!r.$loading[b])return i&&i(I);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(i),!(r.$loading[b].length>1)){var $=function(){s(b,function(_,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(P){P&&P(C)})})};if(!r.get("packaged"))return $();g.loadScript(r.moduleUrl(b,m),$),u()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(I){I.default?x(I.default):x(I)});else{try{c=this.$require(b)}catch{}x(c||r.$loaded[b])}},r.$require=function(p){if(typeof h.require=="function"){var i="require";return h[i](p)}},r.setModuleLoader=function(p,i){r.dynamicModules[p]=i};var u=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,r,h){t("./lib/fixoldbrowsers");var d=t("./config");d.setLoader(function(f,s){t([f],function(a){s(null,a)})});var g=(function(){return this||typeof window<"u"&&window})();h.exports=function(f){d.init=v,d.$require=t,f.require=t},v(!0);function v(f){if(!(!g||!g.document)){d.set("packaged",f||t.packaged||h.packaged||g.define&&(void 0).packaged);var s={},a="",u=document.currentScript||document._currentScript,p=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=p.getElementsByTagName("script"),c=0;c<i.length;c++){var m=i[c],b=m.src||m.getAttribute("src");if(b){for(var x=m.attributes,I=0,$=x.length;I<$;I++){var _=x[I];_.name.indexOf("data-ace-")===0&&(s[l(_.name.replace(/^data-ace-/,""))]=_.value)}var C=b.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var O in s)typeof s[O]<"u"&&d.set(O,s[O])}}function l(f){return f.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,r,h){var d=(function(){function g(v,l,f,s){this.start={row:v,column:l},this.end={row:f,column:s}}return g.prototype.isEqual=function(v){return this.start.row===v.start.row&&this.end.row===v.end.row&&this.start.column===v.start.column&&this.end.column===v.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(v,l){return this.compare(v,l)==0},g.prototype.compareRange=function(v){var l,f=v.end,s=v.start;return l=this.compare(f.row,f.column),l==1?(l=this.compare(s.row,s.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(s.row,s.column),l==-1?-1:l==1?42:0)},g.prototype.comparePoint=function(v){return this.compare(v.row,v.column)},g.prototype.containsRange=function(v){return this.comparePoint(v.start)==0&&this.comparePoint(v.end)==0},g.prototype.intersects=function(v){var l=this.compareRange(v);return l==-1||l==0||l==1},g.prototype.isEnd=function(v,l){return this.end.row==v&&this.end.column==l},g.prototype.isStart=function(v,l){return this.start.row==v&&this.start.column==l},g.prototype.setStart=function(v,l){typeof v=="object"?(this.start.column=v.column,this.start.row=v.row):(this.start.row=v,this.start.column=l)},g.prototype.setEnd=function(v,l){typeof v=="object"?(this.end.column=v.column,this.end.row=v.row):(this.end.row=v,this.end.column=l)},g.prototype.inside=function(v,l){return this.compare(v,l)==0?!(this.isEnd(v,l)||this.isStart(v,l)):!1},g.prototype.insideStart=function(v,l){return this.compare(v,l)==0?!this.isEnd(v,l):!1},g.prototype.insideEnd=function(v,l){return this.compare(v,l)==0?!this.isStart(v,l):!1},g.prototype.compare=function(v,l){return!this.isMultiLine()&&v===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:v<this.start.row?-1:v>this.end.row?1:this.start.row===v?l>=this.start.column?0:-1:this.end.row===v?l<=this.end.column?0:1:0},g.prototype.compareStart=function(v,l){return this.start.row==v&&this.start.column==l?-1:this.compare(v,l)},g.prototype.compareEnd=function(v,l){return this.end.row==v&&this.end.column==l?1:this.compare(v,l)},g.prototype.compareInside=function(v,l){return this.end.row==v&&this.end.column==l?1:this.start.row==v&&this.start.column==l?-1:this.compare(v,l)},g.prototype.clipRows=function(v,l){if(this.end.row>l)var f={row:l+1,column:0};else if(this.end.row<v)var f={row:v,column:0};if(this.start.row>l)var s={row:l+1,column:0};else if(this.start.row<v)var s={row:v,column:0};return g.fromPoints(s||this.start,f||this.end)},g.prototype.extend=function(v,l){var f=this.compare(v,l);if(f==0)return this;if(f==-1)var s={row:v,column:l};else var a={row:v,column:l};return g.fromPoints(s||this.start,a||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(v){var l=v.documentToScreenPosition(this.start),f=v.documentToScreenPosition(this.end);return new g(l.row,l.column,f.row,f.column)},g.prototype.moveBy=function(v,l){this.start.row+=v,this.start.column+=l,this.end.row+=v,this.end.column+=l},g})();d.fromPoints=function(g,v){return new d(g.row,g.column,v.row,v.column)},d.comparePoints=function(g,v){return g.row-v.row||g.column-v.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,r,h){for(var d=t("./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:"*"}},v={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},l=0;l<10;l++)v["Digit"+l]=48+l,v["Numpad"+l]=96+l,g.PRINTABLE_KEYS[48+l]=""+l,g.FUNCTION_KEYS[96+l]="Numpad"+l;for(var l=65;l<91;l++){var f=String.fromCharCode(l+32);v["Key"+f.toUpperCase()]=l,g.PRINTABLE_KEYS[l]=f}for(var l=1;l<13;l++)v["F"+l]=111+l,g.FUNCTION_KEYS[111+l]="F"+l;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var a in s)v[a]=v[a+"Left"]=v[a+"Right"]=s[a];r.$codeToKeyCode=v,g.PRINTABLE_KEYS[173]="-";for(var u in g.FUNCTION_KEYS){var p=g.FUNCTION_KEYS[u].toLowerCase();g[p]=parseInt(u,10)}for(var u in g.PRINTABLE_KEYS){var p=g.PRINTABLE_KEYS[u].toLowerCase();g[p]=parseInt(u,10)}d.mixin(g,g.MODIFIER_KEYS),d.mixin(g,g.PRINTABLE_KEYS),d.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var i=["cmd","ctrl","alt","shift"],c=Math.pow(2,i.length);c--;)g.KEY_MODS[c]=i.filter(function(m){return c&g.KEY_MODS[m]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",d.mixin(r,g),r.default=r,r.keyCodeToString=function(i){var c=g[i];return typeof c!="string"&&(c=String.fromCharCode(i)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,h){var d=t("./keys"),g=t("./useragent"),v=null,l=0,f;function s(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function a(){return f==null&&s(),f}function u(I,$,_){this.elem=I,this.type=$,this.callback=_}u.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=r.addListener=function(I,$,_,C){I.addEventListener($,_,a()),C&&C.$toDestroy.push(new u(I,$,_))},i=r.removeListener=function(I,$,_){I.removeEventListener($,_,a())};r.stopEvent=function(I){return r.stopPropagation(I),r.preventDefault(I),!1},r.stopPropagation=function(I){I.stopPropagation&&I.stopPropagation()},r.preventDefault=function(I){I.preventDefault&&I.preventDefault()},r.getButton=function(I){return I.type=="dblclick"?0:I.type=="contextmenu"||g.isMac&&I.ctrlKey&&!I.altKey&&!I.shiftKey?2:I.button},r.capture=function(I,$,_){var C=I&&I.ownerDocument||document;function O(P){$&&$(P),_&&_(P),i(C,"mousemove",$),i(C,"mouseup",O),i(C,"dragstart",O)}return p(C,"mousemove",$),p(C,"mouseup",O),p(C,"dragstart",O),O},r.addMouseWheelListener=function(I,$,_){p(I,"wheel",function(C){var O=.15,P=C.deltaX||0,L=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=P*O,C.wheelY=L*O;break;case C.DOM_DELTA_LINE:var T=15;C.wheelX=P*T,C.wheelY=L*T;break;case C.DOM_DELTA_PAGE:var F=150;C.wheelX=P*F,C.wheelY=L*F;break}$(C)},_)},r.addMultiMouseDownListener=function(I,$,_,C,O){var P=0,L,T,F,D={2:"dblclick",3:"tripleclick",4:"quadclick"};function M(S){if(r.getButton(S)!==0?P=0:S.detail>1?(P++,P>4&&(P=1)):P=1,g.isIE){var k=Math.abs(S.clientX-L)>5||Math.abs(S.clientY-T)>5;(!F||k)&&(P=1),F&&clearTimeout(F),F=setTimeout(function(){F=null},$[P-1]||600),P==1&&(L=S.clientX,T=S.clientY)}if(S._clicks=P,_[C]("mousedown",S),P>4)P=0;else if(P>1)return _[C](D[P],S)}Array.isArray(I)||(I=[I]),I.forEach(function(S){p(S,"mousedown",M,O)})};function c(I){return 0|(I.ctrlKey?1:0)|(I.altKey?2:0)|(I.shiftKey?4:0)|(I.metaKey?8:0)}r.getModifierString=function(I){return d.KEY_MODS[c(I)]};function m(I,$,_){var C=c($);if(!_&&$.code&&(_=d.$codeToKeyCode[$.code]||_),!g.isMac&&v){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),v.altGr)if((3&C)!=3)v.altGr=0;else return;if(_===18||_===17){var O=$.location;if(_===17&&O===1)v[_]==1&&(l=$.timeStamp);else if(_===18&&C===3&&O===2){var P=$.timeStamp-l;P<50&&(v.altGr=!0)}}}if(_ in d.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&$.location===3&&(I($,C,-_),$.defaultPrevented))){if(g.isChromeOS&&C&8){if(I($,C,_),$.defaultPrevented)return;C&=-9}return!C&&!(_ in d.FUNCTION_KEYS)&&!(_ in d.PRINTABLE_KEYS)?!1:I($,C,_)}}r.addCommandKeyListener=function(I,$,_){var C=null;p(I,"keydown",function(O){v[O.keyCode]=(v[O.keyCode]||0)+1;var P=m($,O,O.keyCode);return C=O.defaultPrevented,P},_),p(I,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(r.stopEvent(O),C=null)},_),p(I,"keyup",function(O){v[O.keyCode]=null},_),v||(b(),p(window,"focus",b))};function b(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(I,$){$=$||window;var _="zero-timeout-message-"+x++,C=function(O){O.data==_&&(r.stopPropagation(O),i($,"message",C),I())};p($,"message",C),$.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(I,$){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):I()},$)},r.$idleBlockId=null,r.blockIdle=function(I){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},I||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(I){setTimeout(I,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,r,h){var d;h.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=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(t,r,h){var d=t("../lib/event"),g=t("../config").nls,v=t("../lib/useragent"),l=t("../lib/dom"),f=t("../lib/lang"),s=t("../clipboard"),a=v.isChrome<18,u=v.isIE,p=v.isChrome>63,i=400,c=t("../lib/keys"),m=c.KEY_MODS,b=v.isIOS,x=b?/\s/:/\n/,I=v.isMobile,$=(function(){function _(C,O){var P=this;this.host=O,this.text=l.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="",I||(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"}),d.addListener(this.text,"blur",function(L){P.ignoreFocusEvents||(O.onBlur(L),P.$isFocused=!1)},O),d.addListener(this.text,"focus",function(L){if(!P.ignoreFocusEvents){if(P.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(L),v.isEdge?setTimeout(P.resetSelection.bind(P)):P.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var L=O.curOp,T=L&&L.command&&L.command.name;if(T!="insertstring"){var F=T&&(L.docChanged||L.selectionChanged);P.inComposition&&F&&(P.lastValue=P.text.value="",P.onCompositionEnd()),P.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,d.addCommandKeyListener(this.text,function(L,T,F){if(!P.inComposition)return O.onCommandKey(L,T,F)},O),d.addListener(this.text,"select",this.onSelect.bind(this),O),d.addListener(this.text,"input",this.onInput.bind(this),O),d.addListener(this.text,"cut",this.onCut.bind(this),O),d.addListener(this.text,"copy",this.onCopy.bind(this),O),d.addListener(this.text,"paste",this.onPaste.bind(this),O),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&d.addListener(C,"keydown",function(L){if(!(v.isMac&&!L.metaKey||!L.ctrlKey))switch(L.keyCode){case 67:P.onCopy(L);break;case 86:P.onPaste(L);break;case 88:P.onCut(L);break}},O),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),d.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),O),d.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),O),d.addListener(this.text,"keyup",this.onKeyup.bind(this),O),d.addListener(this.text,"keydown",this.syncComposition.bind(this),O),d.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),O),this.closeTimeout,d.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),O),d.addListener(this.text,"mousedown",function(L){L.preventDefault(),P.onContextMenuClose()},O),d.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),d.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),b&&this.addIosSelectionHandler(C,O,this.text)}return _.prototype.addIosSelectionHandler=function(C,O,P){var L=this,T=null,F=!1;P.addEventListener("keydown",function(M){T&&clearTimeout(T),F=!0},!0),P.addEventListener("keyup",function(M){T=setTimeout(function(){F=!1},100)},!0);var D=function(M){if(document.activeElement===P&&!(F||L.inComposition||O.$mouseHandler.isMousePressed)&&!L.copied){var S=P.selectionStart,k=P.selectionEnd,N=null,j=0;if(S==0?N=c.up:S==1?N=c.home:k>L.lastSelectionEnd&&L.lastValue[k]==`
161
+ `?N=c.end:S<L.lastSelectionStart&&L.lastValue[S-1]==" "?(N=c.left,j=m.option):S<L.lastSelectionStart||S==L.lastSelectionStart&&L.lastSelectionEnd!=L.lastSelectionStart&&S==k?N=c.left:k>L.lastSelectionEnd&&L.lastValue.slice(0,k).split(`
162
+ `).length>2?N=c.down:k>L.lastSelectionEnd&&L.lastValue[k-1]==" "?(N=c.right,j=m.option):(k>L.lastSelectionEnd||k==L.lastSelectionEnd&&L.lastSelectionEnd!=L.lastSelectionStart&&S==k)&&(N=c.right),S!==k&&(j|=m.shift),N){var U=O.onCommandKey({},j,N);if(!U&&O.commands){N=c.keyCodeToString(N);var G=O.commands.findKeyCommand(j,N);G&&O.execCommand(G)}L.lastSelectionStart=S,L.lastSelectionEnd=k,L.resetSelection("")}}};document.addEventListener("selectionchange",D),O.on("destroy",function(){document.removeEventListener("selectionchange",D)})},_.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)},_.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},_.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()},_.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},_.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()))}},_.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)}}},_.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())},_.prototype.onCut=function(C){this.doCopy(C,!0)},_.prototype.onCopy=function(C){this.doCopy(C,!1)},_.prototype.onPaste=function(C){var O=this.handleClipboardData(C);s.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),v.isIE&&setTimeout(this.resetSelection),d.preventDefault(C)):(this.text.value="",this.pasted=!0))},_.prototype.doCopy=function(C,O){var P=this,L=this.host.getCopyText();if(!L)return d.preventDefault(C);this.handleClipboardData(C,L)?(b&&(this.resetSelection(L),this.copied=L,setTimeout(function(){P.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),d.preventDefault(C)):(this.copied=!0,this.text.value=L,this.text.select(),setTimeout(function(){P.copied=!1,P.resetSelection(),O?P.host.onCut():P.host.onCopy()}))},_.prototype.handleClipboardData=function(C,O,P){var L=C.clipboardData||window.clipboardData;if(!(!L||a)){var T=u||P?"Text":"text/plain";try{return O?L.setData(T,O)!==!1:L.getData(T)}catch(F){if(!P)return this.handleClipboardData(F,O,!0)}}},_.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,P=this.sendText(O,!0);(O.length>i+100||x.test(P)||I&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},_.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 P=this.text.selectionStart,L=this.text.selectionEnd,T=this.lastSelectionStart,F=this.lastValue.length-this.lastSelectionEnd,D=C,M=C.length-P,S=C.length-L,k=0;T>0&&this.lastValue[k]==C[k];)k++,T--;for(D=D.slice(k),k=1;F>0&&this.lastValue.length-k>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-k]==C[C.length-k];)k++,F--;M-=k-1,S-=k-1;var N=D.length-k+1;if(N<0&&(T=-N,N=0),D=D.slice(0,N),!O&&!D&&!M&&!T&&!F&&!S)return"";this.sendingText=!0;var j=!1;return v.isAndroid&&D==". "&&(D=" ",j=!0),D&&!T&&!F&&!M&&!S||this.commandMode?this.host.onTextInput(D):this.host.onTextInput(D,{extendLeft:T,extendRight:F,restoreStart:M,restoreEnd:S}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=P,this.lastSelectionEnd=L,this.lastRestoreEnd=S,j?`
163
+ `:D},_.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var P=function(L){return L.selectionStart===0&&L.selectionEnd>=O.lastValue.length&&L.value===O.lastValue&&O.lastValue&&L.selectionEnd!==O.lastSelectionEnd};this.copied?this.copied=!1:P(this.text)?(this.host.selectAll(),this.resetSelection()):I&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},_.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var O=`
164
+ ab`+C+`cde fg
165
+ `;O!=this.text.value&&(this.text.value=this.lastValue=O);var P=4,L=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=P||this.lastSelectionEnd!=L)&&this.text.setSelectionRange(P,L),this.lastSelectionStart=P,this.lastSelectionEnd=L}},_.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,P=0,L="",T=function(G,J){for(var Q=J,le=1;le<=G-C.rowStart&&le<2*C.numberOfExtraLines+1;le++)Q+=C.host.session.getLine(G-le).length+1;return Q};if(this.host.session){var F=this.host.selection,D=F.getRange(),M=F.cursor.row;M===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):M===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(M<this.rowStart-1||M>this.rowEnd+1)&&(this.rowStart=M>this.numberOfExtraLines?M-this.numberOfExtraLines:0,this.rowEnd=M>this.numberOfExtraLines?M+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var S=[],k=this.rowStart;k<=this.rowEnd;k++)S.push(this.host.session.getLine(k));if(L=S.join(`
166
+ `),O=T(D.start.row,D.start.column),P=T(D.end.row,D.end.column),D.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);O=D.start.row<this.rowStart-1?0:O,P+=N.length+1,L=N+`
167
+ `+L}else if(D.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);P=D.end.row>this.rowEnd+1?j.length:D.end.column,P+=L.length+1,L=L+`
168
+ `+j}else I&&M>0&&(L=`
169
+ `+L,P+=1,O+=1);L.length>i&&(O<i&&P<i?L=L.slice(0,i):(L=`
170
+ `,O==P?O=P=0:(O=0,P=1)));var U=L+`
171
+
172
+ `;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!=P||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,P),this.lastSelectionStart=O,this.lastSelectionEnd=P}catch{}this.inComposition=!1}},_.prototype.setHost=function(C){this.host=C},_.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},_.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)},_.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())},_.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||p||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 P=this.text.getBoundingClientRect().top!=0}catch{return}var L=[];if(P)for(var T=this.text.parentElement;T&&T.nodeType==1;)L.push(T),T.setAttribute("ace_nocontext","true"),!T.parentElement&&T.getRootNode?T=T.getRootNode().host:T=T.parentElement;this.text.focus({preventScroll:!0}),P&&L.forEach(function(F){F.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},_.prototype.blur=function(){this.text.blur()},_.prototype.isFocused=function(){return this.$isFocused},_.prototype.setInputHandler=function(C){this.inputHandler=C},_.prototype.getInputHandler=function(){return this.inputHandler},_.prototype.getElement=function(){return this.text},_.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},_.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},_.prototype.setCopyWithEmptySelection=function(C){},_.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},_.prototype.moveToMouse=function(C,O){var P=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var L=this.host.container.getBoundingClientRect(),T=l.computedStyle(this.host.container),F=L.top+(parseInt(T.borderTopWidth)||0),D=L.left+(parseInt(T.borderLeftWidth)||0),M=L.bottom-F-this.text.clientHeight-2,S=function(k){l.translate(P.text,k.clientX-D-2,Math.min(k.clientY-F-2,M))};S(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&d.capture(this.host.container,S,this.onContextMenuClose.bind(this)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_})();r.TextInput=$,r.$setUserAgentForTests=function(_,C){I=_,b=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,h){var d=t("../lib/useragent"),g=0,v=550,l=(function(){function a(u){u.$clickSelection=null;var p=u.editor;p.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),p.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),p.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),p.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),p.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var p=u.inSelection(),i=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,m=u.getButton();if(m!==0){var b=c.getSelectionRange(),x=b.isEmpty();(x||m==1)&&c.selection.moveToPosition(i),m==2&&(c.textInput.onContextMenu(u.domEvent),d.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),p&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(i,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,p){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(u):p||i.selection.moveToPosition(u),p||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,p=this.editor,i=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(i);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var m=s(this.$clickSelection,i,p.session);i=m.cursor,u=m.anchor}p.selection.setSelectionAnchor(u.row,u.column)}p.selection.selectToPosition(i),p.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var p,i=this.editor,c=i.renderer.screenToTextCoordinates(this.x,this.y),m=i.selection[u](c.row,c.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(b==-1&&x<=0)p=this.$clickSelection.end,(m.end.row!=c.row||m.end.column!=c.column)&&(c=m.start);else if(x==1&&b>=0)p=this.$clickSelection.start,(m.start.row!=c.row||m.start.column!=c.column)&&(c=m.end);else if(b==-1&&x==1)c=m.end,p=m.start;else{var I=s(this.$clickSelection,c,i.session);c=I.cursor,p=I.anchor}i.selection.setSelectionAnchor(p.row,p.column)}i.selection.selectToPosition(c),i.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(u>g||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var p=u.getDocumentPosition(),i=this.editor,c=i.session,m=c.getBracketRange(p);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=i.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(u){var p=u.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var c=i.getSelectionRange();c.isMultiLine()&&c.contains(p.row,p.column)?(this.$clickSelection=i.selection.getLineRange(c.start.row),this.$clickSelection.end=i.selection.getLineRange(c.end.row).end):this.$clickSelection=i.selection.getLineRange(p.row),this.select()},a.prototype.onQuadClick=function(u){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,c=u.domEvent.timeStamp,m=c-i.t,b=m?u.wheelX/m:i.vx,x=m?u.wheelY/m:i.vy;m<v&&(b=(b+i.vx)/2,x=(x+i.vy)/2);var I=Math.abs(b/x),$=!1;if(I>=1&&p.renderer.isScrollableBy(u.wheelX*u.speed,0)&&($=!0),I<=1&&p.renderer.isScrollableBy(0,u.wheelY*u.speed)&&($=!0),$)i.allowed=c;else if(c-i.allowed<v){var _=Math.abs(b)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);_?($=!0,i.allowed=c):i.allowed=0}if(i.t=c,i.vx=b,i.vy=x,$)return p.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();l.prototype.selectEnd=l.prototype.selectByLinesEnd,l.prototype.selectAllEnd=l.prototype.selectByLinesEnd,l.prototype.selectByWordsEnd=l.prototype.selectByLinesEnd,r.DefaultHandlers=l;function f(a,u,p,i){return Math.sqrt(Math.pow(p-a,2)+Math.pow(i-u,2))}function s(a,u,p){if(a.start.row==a.end.row)var i=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var i=3*u.column-2*p.getLine(a.start.row).length;else var i=2*u.row-a.start.row-a.end.row;return i<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,h){var d=t("../lib/event"),g=t("../lib/useragent"),v=(function(){function l(f,s){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=s,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return l.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},l.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},l.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},l.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},l.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(f,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},l.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,s=f.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},l.prototype.getButton=function(){return d.getButton(this.domEvent)},l.prototype.getShiftKey=function(){return this.domEvent.shiftKey},l.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},l})();r.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,h){r.preventParentScroll=function(d){d.stopPropagation();var g=d.currentTarget,v=g.scrollHeight>g.clientHeight;v||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,h){var d=this&&this.__extends||(function(){var c=function(m,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,I){x.__proto__=I}||function(x,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(x[$]=I[$])},c(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");c(m,b);function x(){this.constructor=m}m.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}})(),g=this&&this.__values||function(c){var m=typeof Symbol=="function"&&Symbol.iterator,b=m&&c[m],x=0;if(b)return b.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},v=t("./lib/dom");t("./lib/event");var l=t("./range").Range,f=t("./lib/scroll").preventParentScroll,s="ace_tooltip",a=(function(){function c(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return c.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(m){this.getElement().textContent=m},c.prototype.setHtml=function(m){this.getElement().innerHTML=m},c.prototype.setPosition=function(m,b){this.getElement().style.left=m+"px",this.getElement().style.top=b+"px"},c.prototype.setClassName=function(m){v.addCssClass(this.getElement(),m)},c.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&v.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&v.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},c.prototype.show=function(m,b,x){m!=null&&this.setText(m),b!=null&&x!=null&&this.setPosition(b,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c})(),u=(function(){function c(){this.popups=[]}return c.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},c.prototype.removePopup=function(m){var b=this.popups.indexOf(m);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},c.prototype.updatePopups=function(){var m,b,x,I;this.popups.sort(function(D,M){return M.priority-D.priority});var $=[];try{for(var _=g(this.popups),C=_.next();!C.done;C=_.next()){var O=C.value,P=!0;try{for(var L=(x=void 0,g($)),T=L.next();!T.done;T=L.next()){var F=T.value;if(this.doPopupsOverlap(F,O)){P=!1;break}}}catch(D){x={error:D}}finally{try{T&&!T.done&&(I=L.return)&&I.call(L)}finally{if(x)throw x.error}}P?$.push(O):O.hide()}}catch(D){m={error:D}}finally{try{C&&!C.done&&(b=_.return)&&b.call(_)}finally{if(m)throw m.error}}},c.prototype.doPopupsOverlap=function(m,b){var x=m.getElement().getBoundingClientRect(),I=b.getElement().getBoundingClientRect();return x.left<I.right&&x.right>I.left&&x.top<I.bottom&&x.bottom>I.top},c})(),p=new u;r.popupManager=p,r.Tooltip=a;var i=(function(c){d(m,c);function m(b){b===void 0&&(b=document.body);var x=c.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 I=x.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",x.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(x)),I.addEventListener("wheel",f),x}return m.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)},m.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)},m.prototype.onMouseMove=function(b,x){this.lastEvent=b,this.lastT=Date.now();var I=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.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)},m.prototype.isOutsideOfText=function(b){var x=b.editor,I=b.getDocumentPosition(),$=x.session.getLine(I.row);if(I.column==$.length){var _=x.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),C=x.session.documentToScreenPosition(I.row,I.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},m.prototype.setDataProvider=function(b){this.$gatherData=b},m.prototype.showForRange=function(b,x,I,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=b.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.range=l.fromPoints(x.start,x.end);var C=_.textToScreenCoordinates(x.start.row,x.start.column),O=_.scroller.getBoundingClientRect();C.pageX<O.left&&(C.pageX=O.left);var P=this.getElement();P.innerHTML="",P.appendChild(I),P.style.maxHeight="",P.style.display="block",this.$setPosition(b,C,!0,x),v.$fixPositionBug(P)}},m.prototype.$setPosition=function(b,x,I,$){var _=10;I&&this.addMarker($,b.session);var C=b.renderer,O=this.getElement(),P=O.offsetHeight,L=O.offsetWidth,T=x.pageY,F=x.pageX,D=window.innerHeight-T-C.lineHeight,M=this.$shouldPlaceAbove(P,T,D-_);O.style.maxHeight=(M?T:D)-_+"px",O.style.top=M?"":T+C.lineHeight+"px",O.style.bottom=M?window.innerHeight-T+"px":"",O.style.left=Math.min(F,window.innerWidth-L-_)+"px"},m.prototype.$shouldPlaceAbove=function(b,x,I){return!(x-b<0&&x<I)},m.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")},m.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,p.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(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())},m})(a);r.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,r,h){var d=this&&this.__extends||(function(){var i=function(c,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&(b[I]=x[I])},i(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(c,m);function b(){this.constructor=c}c.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})(),g=this&&this.__values||function(i){var c=typeof Symbol=="function"&&Symbol.iterator,m=c&&i[c],b=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&b>=i.length&&(i=void 0),{value:i&&i[b++],done:!i}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},v=t("../lib/dom"),l=t("./mouse_event").MouseEvent,f=t("../tooltip").HoverTooltip,s=t("../config").nls,a=t("../range").Range;function u(i){var c=i.editor,m=c.renderer.$gutterLayer;i.$tooltip=new p(c),i.$tooltip.addToEditor(c),i.$tooltip.setDataProvider(function(b,x){var I=b.getDocumentPosition().row;i.$tooltip.showTooltip(I)}),i.editor.setDefaultHandler("guttermousedown",function(b){if(!(!c.isFocused()||b.getButton()!=0)){var x=m.getRegion(b);if(x!="foldWidgets"){var I=b.getDocumentPosition().row,$=c.session.selection;if(b.getShiftKey())$.selectTo(I,0);else{if(b.domEvent.detail==2)return c.selectAll(),b.preventDefault();i.$clickSelection=c.selection.getLineRange(I)}return i.setState("selectByLines"),i.captureMouse(b),b.preventDefault()}}})}r.GutterHandler=u;var p=(function(i){d(c,i);function c(m){var b=i.call(this,m.container)||this;b.id="gt"+ ++c.$uid,b.editor=m,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 c.prototype.onDomMouseMove=function(m){var b=new l(m,this.editor);this.onMouseMove(b,this.editor)},c.prototype.onDomMouseOut=function(m){var b=new l(m,this.editor);this.onMouseOut(b)},c.prototype.addToEditor=function(m){var b=m.renderer.$gutter;b.addEventListener("mousemove",this.onDomMouseMove),b.addEventListener("mouseout",this.onDomMouseOut),i.prototype.addToEditor.call(this,m)},c.prototype.removeFromEditor=function(m){var b=m.renderer.$gutter;b.removeEventListener("mousemove",this.onDomMouseMove),b.removeEventListener("mouseout",this.onDomMouseOut),i.prototype.removeFromEditor.call(this,m)},c.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),i.prototype.destroy.call(this)},Object.defineProperty(c,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),c.prototype.showTooltip=function(m){var b,x=this.editor.renderer.$gutterLayer,I=x.$annotations[m],$;I?$={displayText:Array.from(I.displayText),type:Array.from(I.type)}:$={displayText:[],type:[]};var _=x.session.getFoldLine(m);if(_&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},P,L=m+1;L<=_.end.row;L++)if(x.$annotations[L])for(var T=0;T<x.$annotations[L].text.length;T++){var F=x.$annotations[L].type[T];C[F].push(x.$annotations[L].text[T]),(!P||O[F]<O[P])&&(P=F)}if(["error","security","warning"].includes(P)){var D="".concat(c.annotationsToSummaryString(C)," in folded code.");$.displayText.push(D),$.type.push(P+"_fold")}}if($.displayText.length===0)return this.hide();for(var M={error:[],security:[],warning:[],info:[],hint:[]},S=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<$.displayText.length;L++){var k=v.createElement("span"),N=v.createElement("span");(b=N.classList).add.apply(b,["ace_".concat($.type[L]),S]),N.setAttribute("aria-label","".concat(c.annotationLabels[$.type[L].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(v.createTextNode(" ")),k.appendChild(N),k.appendChild(v.createTextNode($.displayText[L])),k.appendChild(v.createElement("br")),M[$.type[L].replace("_fold","")].push(k)}var j=v.createElement("span");M.error.forEach(function(J){return j.appendChild(J)}),M.security.forEach(function(J){return j.appendChild(J)}),M.warning.forEach(function(J){return j.appendChild(J)}),M.info.forEach(function(J){return j.appendChild(J)}),M.hint.forEach(function(J){return j.appendChild(J)}),j.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var G=a.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,G,j),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},c.prototype.$setPosition=function(m,b,x,I){var $=this.$findCellByRow(I.start.row);if($){var _=$&&$.element,C=_&&_.querySelector(".ace_gutter_annotation");if(C){var O=C.getBoundingClientRect();if(O){var P={pageX:O.right,pageY:O.top};return i.prototype.$setPosition.call(this,m,P,!1,I)}}}},c.prototype.$shouldPlaceAbove=function(m,b,x){return x<m},c.prototype.$findLinkedAnnotationNode=function(m){var b=this.$findCellByRow(m);if(b){var x=b.element;if(x.childNodes.length>2)return x.childNodes[2]}},c.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===m})},c.prototype.hide=function(m){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),i.prototype.hide.call(this,m)}},c.annotationsToSummaryString=function(m){var b,x,I=[],$=["error","security","warning","info","hint"];try{for(var _=g($),C=_.next();!C.done;C=_.next()){var O=C.value;if(m[O].length){var P=m[O].length===1?c.annotationLabels[O].singular:c.annotationLabels[O].plural;I.push("".concat(m[O].length," ").concat(P))}}}catch(L){b={error:L}}finally{try{C&&!C.done&&(x=_.return)&&x.call(_)}finally{if(b)throw b.error}}return I.join(", ")},c.prototype.isOutsideOfText=function(m){var b=m.editor,x=b.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},c})(f);p.$uid=0,r.GutterTooltip=p}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,r,h){var d=t("../lib/dom"),g=t("../lib/event"),v=t("../lib/useragent"),l=200,f=200,s=5;function a(p){var i=p.editor,c=d.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ie){p[ie]=this[ie]},this),i.on("mousedown",this.onMouseDown.bind(p));var b=i.container,x,I,$,_,C,O,P=0,L,T,F,D,M;this.onDragStart=function(ie){if(this.cancelDrag||!b.draggable){var ue=this;return setTimeout(function(){ue.startSelect(),ue.captureMouse(ie)},0),ie.preventDefault()}C=i.getSelectionRange();var pe=ie.dataTransfer;pe.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(c),pe.setDragImage&&pe.setDragImage(c,0,0),setTimeout(function(){i.container.removeChild(c)}),pe.clearData(),pe.setData("Text",i.session.getTextRange()),T=!0,this.setState("drag")},this.onDragEnd=function(ie){if(b.draggable=!1,T=!1,this.setState(null),!i.getReadOnly()){var ue=ie.dataTransfer.dropEffect;!L&&ue=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ie){if(!(i.getReadOnly()||!Q(ie.dataTransfer)))return I=ie.clientX,$=ie.clientY,x||j(),P++,ie.dataTransfer.dropEffect=L=le(ie),g.preventDefault(ie)},this.onDragOver=function(ie){if(!(i.getReadOnly()||!Q(ie.dataTransfer)))return I=ie.clientX,$=ie.clientY,x||(j(),P++),G!==null&&(G=null),ie.dataTransfer.dropEffect=L=le(ie),g.preventDefault(ie)},this.onDragLeave=function(ie){if(P--,P<=0&&x)return U(),L=null,g.preventDefault(ie)},this.onDrop=function(ie){if(O){var ue=ie.dataTransfer;if(T)switch(L){case"move":C.contains(O.row,O.column)?C={start:O,end:O}:C=i.moveText(C,O);break;case"copy":C=i.moveText(C,O,!0);break}else{var pe=ue.getData("Text");C={start:O,end:i.session.insert(O,pe)},i.focus(),L=null}return U(),g.preventDefault(ie)}},g.addListener(b,"dragstart",this.onDragStart.bind(p),i),g.addListener(b,"dragend",this.onDragEnd.bind(p),i),g.addListener(b,"dragenter",this.onDragEnter.bind(p),i),g.addListener(b,"dragover",this.onDragOver.bind(p),i),g.addListener(b,"dragleave",this.onDragLeave.bind(p),i),g.addListener(b,"drop",this.onDrop.bind(p),i);function S(ie,ue){var pe=Date.now(),oe=!ue||ie.row!=ue.row,re=!ue||ie.column!=ue.column;if(!D||oe||re)i.moveCursorToPosition(ie),D=pe,M={x:I,y:$};else{var Ce=u(M.x,M.y,I,$);Ce>s?D=null:pe-D>=f&&(i.renderer.scrollCursorIntoView(),D=null)}}function k(ie,ue){var pe=Date.now(),oe=i.renderer.layerConfig.lineHeight,re=i.renderer.layerConfig.characterWidth,Ce=i.renderer.scroller.getBoundingClientRect(),ke={x:{left:I-Ce.left,right:Ce.right-I},y:{top:$-Ce.top,bottom:Ce.bottom-$}},Ee=Math.min(ke.x.left,ke.x.right),Ve=Math.min(ke.y.top,ke.y.bottom),Me={row:ie.row,column:ie.column};Ee/re<=2&&(Me.column+=ke.x.left<ke.x.right?-3:2),Ve/oe<=1&&(Me.row+=ke.y.top<ke.y.bottom?-1:1);var ot=ie.row!=Me.row,Ge=ie.column!=Me.column,Ze=!ue||ie.row!=ue.row;ot||Ge&&!Ze?F?pe-F>=l&&i.renderer.scrollCursorIntoView(Me):F=pe:F=null}function N(){var ie=O;O=i.renderer.screenToTextCoordinates(I,$),S(O,ie),k(O,ie)}function j(){C=i.selection.toOrientedRange(),x=i.session.addMarker(C,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),N(),_=setInterval(N,20),P=0,g.addListener(document,"mousemove",J)}function U(){clearInterval(_),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(C),i.isFocused()&&!T&&i.$resetCursorStyle(),C=null,O=null,P=0,F=null,D=null,g.removeListener(document,"mousemove",J)}var G=null;function J(){G==null&&(G=setTimeout(function(){G!=null&&x&&U()},20))}function Q(ie){var ue=ie.types;return!ue||Array.prototype.some.call(ue,function(pe){return pe=="text/plain"||pe=="Text"})}function le(ie){var ue=["copy","copymove","all","uninitialized"],pe=["move","copymove","linkmove","all","uninitialized"],oe=v.isMac?ie.altKey:ie.ctrlKey,re="uninitialized";try{re=ie.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ce="none";return oe&&ue.indexOf(re)>=0?Ce="copy":pe.indexOf(re)>=0?Ce="move":ue.indexOf(re)>=0&&(Ce="copy"),Ce}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,i=p.container;i.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var c=v.isWin?"default":"move";p.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(p){var i=this.editor.container;if(v.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&i.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var i=this.editor,c=p.inSelection(),m=p.getButton(),b=p.domEvent.detail||1;if(b===1&&m===0&&c){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var I=i.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(a.prototype);function u(p,i,c,m){return Math.sqrt(Math.pow(c-p,2)+Math.pow(m-i,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,r,h){var d=t("./mouse_event").MouseEvent,g=t("../lib/event"),v=t("../lib/dom");r.addTouchListeners=function(l,f){var s="scroll",a,u,p,i,c,m,b=0,x,I=0,$=0,_=0,C,O;function P(){var S=window.navigator&&window.navigator.clipboard,k=!1,N=function(){var G=f.getCopyText(),J=f.session.getUndoManager().hasUndo();O.replaceChild(v.buildDom(k?["span",!G&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],J&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),O.firstChild)},j=function(G){return f.commands.canExecute(G,f)},U=function(G){var J=G.target.getAttribute("action");if(J=="more"||!k)return k=!k,N();J=="paste"?S.readText().then(function(Q){f.execCommand(J,Q)}):J&&((J=="cut"||J=="copy")&&(S?S.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(J)),O.firstChild.style.display="none",k=!1,J!="openCommandPalette"&&f.focus()};O=v.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container),O.addEventListener("touchstart",function(G){s="menu",G.stopPropagation(),G.preventDefault(),f.textInput.focus()}),O.addEventListener("touchend",function(G){G.stopPropagation(),G.preventDefault(),U(G)})}function L(){if(!f.getOption("enableMobileMenu")){O&&T();return}O||P();var S=f.selection.cursor,k=f.renderer.textToScreenCoordinates(S.row,S.column),N=f.renderer.textToScreenCoordinates(0,0).pageX,j=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();O.style.top=k.pageY-U.top-3+"px",k.pageX-U.left<U.width-70?(O.style.left="",O.style.right="10px"):(O.style.right="",O.style.left=N+j-U.left+"px"),O.style.display="",O.firstChild.style.display="none",f.on("input",T)}function T(S){O&&(O.style.display="none"),f.off("input",T)}function F(){c=null,clearTimeout(c);var S=f.selection.getRange(),k=S.contains(x.row,x.column);(S.isEmpty()||!k)&&(f.selection.moveToPosition(x),f.selection.selectWord()),s="wait",L()}function D(){c=null,clearTimeout(c),f.selection.moveToPosition(x);var S=I>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);S&&!S.isEmpty()?f.selection.setRange(S):f.selection.selectWord(),s="wait"}g.addListener(l,"contextmenu",function(S){if(C){var k=f.textInput.getElement();k.focus()}},f),g.addListener(l,"touchstart",function(S){var k=S.touches;if(c||k.length>1){clearTimeout(c),c=null,p=-1,s="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var N=f.renderer.layerConfig.lineHeight,j=f.renderer.layerConfig.lineHeight,U=S.timeStamp;i=U;var G=k[0],J=G.clientX,Q=G.clientY;Math.abs(a-J)+Math.abs(u-Q)>N&&(p=-1),a=S.clientX=J,u=S.clientY=Q,$=_=0;var le=new d(S,f);if(x=le.getDocumentPosition(),U-p<500&&k.length==1&&!b)I++,S.preventDefault(),S.button=0,D();else{I=0;var ie=f.selection.cursor,ue=f.selection.isEmpty()?ie:f.selection.anchor,pe=f.renderer.$cursorLayer.getPixelPosition(ie,!0),oe=f.renderer.$cursorLayer.getPixelPosition(ue,!0),re=f.renderer.scroller.getBoundingClientRect(),Ce=f.renderer.layerConfig.offset,ke=f.renderer.scrollLeft,Ee=function(ot,Ge){return ot=ot/j,Ge=Ge/N-.75,ot*ot+Ge*Ge};if(S.clientX<re.left){s="zoom";return}var Ve=Ee(S.clientX-re.left-pe.left+ke,S.clientY-re.top-pe.top+Ce),Me=Ee(S.clientX-re.left-oe.left+ke,S.clientY-re.top-oe.top+Ce);Ve<3.5&&Me<3.5&&(s=Ve>Me?"cursor":"anchor"),Me<3.5?s="anchor":Ve<3.5?s="cursor":s="scroll",c=setTimeout(F,450)}p=U},f),g.addListener(l,"touchend",function(S){C=f.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",b=0):c?(f.selection.moveToPosition(x),b=0,L()):s=="scroll"?(M(),T()):L(),clearTimeout(c),c=null},f),g.addListener(l,"touchmove",function(S){c&&(clearTimeout(c),c=null);var k=S.touches;if(!(k.length>1||s=="zoom")){var N=k[0],j=a-N.clientX,U=u-N.clientY;if(s=="wait")if(j*j+U*U>4)s="cursor";else return S.preventDefault();a=N.clientX,u=N.clientY,S.clientX=N.clientX,S.clientY=N.clientY;var G=S.timeStamp,J=G-i;if(i=G,s=="scroll"){var Q=new d(S,f);Q.speed=1,Q.wheelX=j,Q.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),J!=0&&($=j/J,_=U/J),f._emit("mousewheel",Q),Q.propagationStopped||($=_=0)}else{var le=new d(S,f),ie=le.getDocumentPosition();s=="cursor"?f.selection.moveCursorToPosition(ie):s=="anchor"&&f.selection.setSelectionAnchor(ie.row,ie.column),f.renderer.scrollCursorIntoView(ie),S.preventDefault()}}},f);function M(){b+=60,m=setInterval(function(){b--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(_)<.01&&(_=0),b<20&&($=.9*$),b<20&&(_=.9*_);var S=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*_),S==f.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(t,r,h){var d=t("../lib/event"),g=t("../lib/useragent"),v=t("./default_handlers").DefaultHandlers,l=t("./default_gutter_handler").GutterHandler,f=t("./mouse_event").MouseEvent,s=t("./dragdrop_handler").DragdropHandler,a=t("./touch_handler").addTouchListeners,u=t("../config"),p=(function(){function i(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=c,new v(this),new l(this),new s(this);var b=function($){var _=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());_&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},x=c.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),c),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),d.addMultiMouseDownListener([x,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),d.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var I=c.renderer.$gutter;d.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),d.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),c),d.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),d.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),d.addListener(x,"mousedown",b,c),d.addListener(I,"mousedown",b,c),g.isIE&&c.renderer.scrollBarV&&(d.addListener(c.renderer.scrollBarV.element,"mousedown",b,c),d.addListener(c.renderer.scrollBarH.element,"mousedown",b,c)),c.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=c.renderer.screenToTextCoordinates($.x,$.y),C=c.session.selection.getRange(),O=c.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},c)}return i.prototype.onMouseEvent=function(c,m){this.editor.session&&this.editor._emit(c,new f(m,this.editor))},i.prototype.onMouseMove=function(c,m){var b=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!b||!b.length||this.editor._emit(c,new f(m,this.editor))},i.prototype.onMouseWheel=function(c,m){var b=new f(m,this.editor);b.speed=this.$scrollSpeed*2,b.wheelX=m.wheelX,b.wheelY=m.wheelY,this.editor._emit(c,b)},i.prototype.setState=function(c){this.state=c},i.prototype.captureMouse=function(c,m){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var b=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var I=this,$=!0,_=function(T){if(T){if(g.isWebKit&&!T.which&&I.releaseMouse)return I.releaseMouse();I.x=T.clientX,I.y=T.clientY,m&&m(T),I.mouseEvent=new f(T,I.editor),I.$mouseMoved=!0}},C=function(T){b.off("beforeEndOperation",L),$=!1,b.session&&O(),I[I.state+"End"]&&I[I.state+"End"](T),I.state="",I.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,T&&I.onMouseEvent("mouseup",T),b.endOperation()},O=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1},P=function(){$&&(O(),d.nextFrame(P))};if(g.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){C(c)});var L=function(T){I.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};b.on("beforeEndOperation",L),b.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=_,I.releaseMouse=d.capture(this.editor.container,_,C),P()},i.prototype.cancelContextMenu=function(){var c=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},i})();p.prototype.releaseMouse=null,u.defineOptions(p.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=p}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,h){var d=t("../lib/dom"),g=(function(){function v(l){l.on("click",function(f){var s=f.getDocumentPosition(),a=l.session,u=a.getFoldAt(s.row,s.column,1);u&&(f.getAccelKey()?a.removeFold(u):a.expandFold(u),f.stop());var p=f.domEvent&&f.domEvent.target;p&&d.hasCssClass(p,"ace_inline_button")&&d.hasCssClass(p,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),l.renderer.scrollCursorIntoView())}),l.on("gutterclick",function(f){var s=l.renderer.$gutterLayer.getRegion(f);if(s=="foldWidgets"){var a=f.getDocumentPosition().row,u=l.session;u.foldWidgets&&u.foldWidgets[a]&&l.session.onFoldWidgetClick(a,f),l.isFocused()||l.focus(),f.stop()}}),l.on("gutterdblclick",function(f){var s=l.renderer.$gutterLayer.getRegion(f);if(s=="foldWidgets"){var a=f.getDocumentPosition().row,u=l.session,p=u.getParentFoldRangeData(a,!0),i=p.range||p.firstRange;if(i){a=i.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",i),l.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}f.stop()}})}return v})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,h){var d=t("../lib/keys"),g=t("../lib/event"),v=(function(){function l(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return l.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},l.prototype.setKeyboardHandler=function(f){var s=this.$handlers;if(s[s.length-1]!=f){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(f,1)}},l.prototype.addKeyboardHandler=function(f,s){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var a=this.$handlers.indexOf(f);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(f):this.$handlers.splice(s,0,f),a==-1&&f.attach&&f.attach(this.$editor)}},l.prototype.removeKeyboardHandler=function(f){var s=this.$handlers.indexOf(f);return s==-1?!1:(this.$handlers.splice(s,1),f.detach&&f.detach(this.$editor),!0)},l.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},l.prototype.getStatusText=function(){var f=this.$data,s=f.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,f)||""}).filter(Boolean).join(" ")},l.prototype.$callKeyboardHandlers=function(f,s,a,u){for(var p,i=!1,c=this.$editor.commands,m=this.$handlers.length;m--&&(p=this.$handlers[m].handleKeyboard(this.$data,f,s,a,u),!(!(!p||!p.command)&&(p.command=="null"?i=!0:i=c.exec(p.command,this.$editor,p.args,u),i&&u&&f!=-1&&p.passEvent!=!0&&p.command.passEvent!=!0&&g.stopEvent(u),i))););return!i&&f==-1&&(p={command:"insertstring"},i=c.exec("insertstring",this.$editor,s)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",p),i},l.prototype.onCommandKey=function(f,s,a){var u=d.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,a,f)},l.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},l})();r.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,r,h){var d=0,g=0,v=!1,l=!1,f=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,p=1,i=0,c=1,m=2,b=3,x=4,I=5,$=6,_=7,C=8,O=9,P=10,L=11,T=12,F=13,D=14,M=15,S=16,k=17,N=18,j=[N,N,N,N,N,N,N,N,N,$,I,$,C,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,I,I,I,$,C,x,x,L,L,L,x,x,x,x,x,P,O,P,O,O,m,m,m,m,m,m,m,m,m,m,O,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,N,N,N,N,N,N,I,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,L,L,L,L,x,x,x,x,i,x,x,N,x,x,L,L,m,m,x,i,x,x,x,m,i,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,i,c,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,I,F,D,M,S,k,O,L,L,L,L,L,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(ie,ue,pe,oe){var re=d?a:s,Ce=null,ke=null,Ee=null,Ve=0,Me=null,ot=null,Ge=-1,Ze=null,Ie=null,Tt=[];if(!oe)for(Ze=0,oe=[];Ze<pe;Ze++)oe[Ze]=le(ie[Ze]);for(g=d,v=!1,l=!1,f=!1,Ie=0;Ie<pe;Ie++){if(Ce=Ve,Tt[Ie]=ke=Q(ie,oe,Tt,Ie),Ve=re[Ce][ke],Me=Ve&240,Ve&=15,ue[Ie]=Ee=re[Ve][5],Me>0)if(Me==16){for(Ze=Ge;Ze<Ie;Ze++)ue[Ze]=1;Ge=-1}else Ge=-1;if(ot=re[Ve][6],ot)Ge==-1&&(Ge=Ie);else if(Ge>-1){for(Ze=Ge;Ze<Ie;Ze++)ue[Ze]=Ee;Ge=-1}oe[Ie]==I&&(ue[Ie]=0),g|=Ee}if(f){for(Ze=0;Ze<pe;Ze++)if(oe[Ze]==$){ue[Ze]=d;for(var mt=Ze-1;mt>=0&&oe[mt]==C;mt--)ue[mt]=d}}}function J(ie,ue,pe){if(!(g<ie)){if(ie==1&&d==p&&!l){pe.reverse();return}for(var oe=pe.length,re=0,Ce,ke,Ee,Ve;re<oe;){if(ue[re]>=ie){for(Ce=re+1;Ce<oe&&ue[Ce]>=ie;)Ce++;for(ke=re,Ee=Ce-1;ke<Ee;ke++,Ee--)Ve=pe[ke],pe[ke]=pe[Ee],pe[Ee]=Ve;re=Ce}re++}}}function Q(ie,ue,pe,oe){var re=ue[oe],Ce,ke,Ee,Ve;switch(re){case i:case c:v=!1;case x:case b:return re;case m:return v?b:m;case _:return v=!0,c;case C:return x;case O:return oe<1||oe+1>=ue.length||(Ce=pe[oe-1])!=m&&Ce!=b||(ke=ue[oe+1])!=m&&ke!=b?x:(v&&(ke=b),ke==Ce?ke:x);case P:return Ce=oe>0?pe[oe-1]:I,Ce==m&&oe+1<ue.length&&ue[oe+1]==m?m:x;case L:if(oe>0&&pe[oe-1]==m)return m;if(v)return x;for(Ve=oe+1,Ee=ue.length;Ve<Ee&&ue[Ve]==L;)Ve++;return Ve<Ee&&ue[Ve]==m?m:x;case T:for(Ee=ue.length,Ve=oe+1;Ve<Ee&&ue[Ve]==T;)Ve++;if(Ve<Ee){var Me=ie[oe],ot=Me>=1425&&Me<=2303||Me==64286;if(Ce=ue[Ve],ot&&(Ce==c||Ce==_))return c}return oe<1||(Ce=ue[oe-1])==I?x:pe[oe-1];case I:return v=!1,l=!0,d;case $:return f=!0,x;case F:case D:case S:case k:case M:v=!1;case N:return x}}function le(ie){var ue=ie.charCodeAt(0),pe=ue>>8;return pe==0?ue>191?i:j[ue]:pe==5?/[\u0591-\u05f4]/.test(ie)?c:i:pe==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ie)?T:/[\u0660-\u0669\u066b-\u066c]/.test(ie)?b:ue==1642?L:/[\u06f0-\u06f9]/.test(ie)?m:_:pe==32&&ue<=8287?U[ue&255]:pe==254&&ue>=65136?_:x}r.L=i,r.R=c,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ie,ue,pe){if(ie.length<2)return{};var oe=ie.split(""),re=new Array(oe.length),Ce=new Array(oe.length),ke=[];d=pe?p:u,G(oe,ke,oe.length,ue);for(var Ee=0;Ee<re.length;re[Ee]=Ee,Ee++);J(2,ke,re),J(1,ke,re);for(var Ee=0;Ee<re.length-1;Ee++)ue[Ee]===b?ke[Ee]=r.AN:ke[Ee]===c&&(ue[Ee]>_&&ue[Ee]<F||ue[Ee]===x||ue[Ee]===N)?ke[Ee]=r.ON_R:Ee>0&&oe[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(oe[Ee])&&(ke[Ee-1]=ke[Ee]=r.R_H,Ee++);oe[oe.length-1]===r.DOT&&(ke[oe.length-1]=r.B),oe[0]==="‫"&&(ke[0]=r.RLE);for(var Ee=0;Ee<re.length;Ee++)Ce[Ee]=ke[re[Ee]];return{logicalFromVisual:re,bidiLevels:Ce}},r.hasBidiCharacters=function(ie,ue){for(var pe=!1,oe=0;oe<ie.length;oe++)ue[oe]=le(ie.charAt(oe)),!pe&&(ue[oe]==c||ue[oe]==_||ue[oe]==b)&&(pe=!0);return pe},r.getVisualFromLogicalIdx=function(ie,ue){for(var pe=0;pe<ue.logicalFromVisual.length;pe++)if(ue.logicalFromVisual[pe]==ie)return pe;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,r,h){var d=t("./lib/bidiutil"),g=t("./lib/lang"),v=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,l=(function(){function f(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=v.test(s.getValue())}return f.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&v.test(s.lines.join(`
173
+ `))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(s=this.session.$docRowCache[u])}return s},f.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var u,p=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===p);)p=u,s++;else s=this.currentRow;return s},f.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,p=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[s];i&&(a===void 0&&(a=this.getSplitIndex()),a>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=a<i.length?this.line.substring(i[a-1],i[a]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[a]),a==i.length&&(this.line+=this.showInvisibles?p:d.DOT))}else this.line+=this.showInvisibles?p:d.DOT;var c=this.session,m=0,b;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,I){return x===" "||c.isFullWidth(x.charCodeAt(0))?(b=x===" "?c.getScreenTabSize(I+m):2,m+=b-1,g.stringRepeat(d.DOT,b)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},f.prototype.updateBidiMap=function(){var s=[];d.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=a,this.charWidths[d.R]=this.charWidths[d.AN]=u,this.charWidths[d.R_H]=u*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},f.prototype.setEolChar=function(s){this.EOL=s},f.prototype.setContentWidth=function(s){this.contentWidth=s},f.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(s,a){for(var u=s.getCursorPosition(),p=s.selection.getSelectionAnchor().row;p<=u.row;p++)!a&&s.session.getLine(p).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(p,0,1):a&&s.session.getLine(p).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:p},s.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=s>a?this.session.getOverwrite()?s:s-1:a,p=d.getVisualFromLogicalIdx(u,this.bidiMap),i=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&s<=a&&i[p]%2!==0&&p++;for(var m=0;m<p;m++)c+=this.charWidths[i[m]];return!this.session.getOverwrite()&&s>a&&i[p]%2===0&&(c+=this.charWidths[i[p]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},f.prototype.getSelections=function(s,a){var u=this.bidiMap,p=u.bidiLevels,i,c=[],m=0,b=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,I=!1,$=!1,_=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<p.length;O++)C=u.logicalFromVisual[O],i=p[O],I=C>=b&&C<x,I&&!$?_=m:!I&&$&&c.push({left:_,width:m-_}),m+=this.charWidths[i],$=I;if(I&&O===p.length&&c.push({left:_,width:m-_}),this.isRtlDir)for(var P=0;P<c.length;P++)c[P].left+=this.rtlLineOffset;return c},f.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),p=0,i=0,c=this.bidiMap.bidiLevels,m=this.charWidths[c[i]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>p+m/2;){if(p+=m,i===c.length-1){m=0;break}m=this.charWidths[c[++i]]}return i>0&&c[i-1]%2!==0&&c[i]%2===0?(u<p&&i--,a=this.bidiMap.logicalFromVisual[i]):i>0&&c[i-1]%2===0&&c[i]%2!==0?a=1+(u>p?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===c.length-1&&m===0&&c[i-1]%2===0||!this.isRtlDir&&i===0&&c[i]%2!==0?a=1+this.bidiMap.logicalFromVisual[i]:(i>0&&c[i-1]%2!==0&&m!==0&&i--,a=this.bidiMap.logicalFromVisual[i]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},f})();r.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,r,h){var d=t("./lib/oop"),g=t("./lib/lang"),v=t("./lib/event_emitter").EventEmitter,l=t("./range").Range,f=(function(){function s(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(p){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},s.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?l.fromPoints(u,u):this.isBackwards()?l.fromPoints(u,a):l.fromPoints(a,u)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,u){var p=u?a.end:a.start,i=u?a.start:a.end;this.$setSelection(p.row,p.column,i.row,i.column)},s.prototype.$setSelection=function(a,u,p,i){if(!this.$silent){var c=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(p,i),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||m)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},s.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,u){if(typeof u>"u"){var p=a||this.lead;a=p.row,u=p.column}return this.session.getWordRange(a,u)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},s.prototype.getLineRange=function(a,u){var p=typeof a=="number"?a:this.lead.row,i,c=this.session.getFoldLine(p);return c?(p=c.start.row,i=c.end.row):i=p,u===!0?new l(p,0,i,this.session.getLine(i).length):new l(p,0,i+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,u,p){var i=a.column,c=a.column+u;return p<0&&(i=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(i,c).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var p=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,p,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,p):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,p=this.session.documentToScreenRow(a,u),i=this.session.screenToDocumentPosition(p,0),c=this.session.getDisplayLine(a,null,i.row,i.column),m=c.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(i.column+=m[0].length),this.moveCursorToPosition(i)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var p=this.session.getLine(u.row);if(u.column==p.length){var i=p.search(/\s+$/);i>0&&(u.column=i)}}this.moveCursorTo(u.row,u.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,p=this.doc.getLine(a),i=p.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(i)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=p.substring(u)),u>=p.length){this.moveCursorTo(a,p.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,p;if(p=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(p.start.row,p.start.column);return}var i=this.session.getFoldStringAt(a,u,-1);i==null&&(i=this.doc.getLine(a).substring(0,u));var c=g.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,p,i=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(p=a[u])&&i.test(p);)u++;if(u<1){for(c.lastIndex=0;(p=a[u])&&!c.test(p);)if(c.lastIndex=0,u++,i.test(p))if(u>2){u--;break}else{for(;(p=a[u])&&i.test(p);)u++;if(u>2)break}}}return c.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,p=this.doc.getLine(a),i=p.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==p.length){var m=this.doc.getLength();do a++,i=this.doc.getLine(a);while(a<m&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),u=0}var b=this.$shortWordEndIndex(i);this.moveCursorTo(a,u+b)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,p;if(p=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(p.start.row,p.start.column);var i=this.session.getLine(a).substring(0,u);if(u===0){do a--,i=this.doc.getLine(a);while(a>0&&/^\s*$/.test(i));u=i.length,/\s+$/.test(i)||(i="")}var c=g.stringReverse(i),m=this.$shortWordEndIndex(c);return this.moveCursorTo(a,u-m)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,u){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(p.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(p.column),p.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=p.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var m=this.session.screenToDocumentPosition(p.row+a,p.column,i);a!==0&&u===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+u,u===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,u,p){var i=this.session.getFoldAt(a,u,1);i&&(a=i.start.row,u=i.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,p){var i=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(i.row,i.column,p)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var p=this.getCursor();return l.fromPoints(u,p)}catch{return l.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var p=u.clone();return p.isBackwards=u.cursor==u.start,p});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var p=l.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},s})();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,d.implement(f.prototype,v),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,r,h){var d=t("./lib/report_error").reportError,g=2e3,v=(function(){function l(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],u=[],p=0,i=this.matchMappings[s]={defaultToken:"text"},c="g",m=[],b=0;b<a.length;b++){var x=a[b];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),x.unicode&&c.indexOf("u")===-1&&(c+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var I=x.regex,$=new RegExp("(?:("+I+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?I=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+p+1)}):($=1,I=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),i[p]=b,p+=$,u.push(I),x.onMatch||(x.onMatch=null)}}u.length||(i[0]=0,u.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,c)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",c)}}return l.prototype.$setMaxTokenCount=function(f){g=f|0},l.prototype.$applyToken=function(f){var s=this.splitRegex.exec(f).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:f}];for(var u=[],p=0,i=a.length;p<i;p++)s[p]&&(u[u.length]={type:a[p],value:s[p]});return u},l.prototype.$arrayTokens=function(f){if(!f)return[];var s=this.splitRegex.exec(f);if(!s)return"text";for(var a=[],u=this.tokenArray,p=0,i=u.length;p<i;p++)s[p+1]&&(a[a.length]={type:u[p],value:s[p+1]});return a},l.prototype.removeCapturingGroups=function(f){var s=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return s},l.prototype.createSplitterRegexp=function(f,s){if(f.indexOf("(?=")!=-1){var a=0,u=!1,p={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,c,m,b,x,I){return u?u=x!="]":x?u=!0:b?(a==p.stack&&(p.end=I+1,p.stack=-1),a--):m&&(a++,m.length!=1&&(p.stack=a,p.start=I)),i}),p.end!=null&&/^\)*$/.test(f.substr(p.end))&&(f=f.substring(0,p.start)+f.substr(p.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(s||"").replace("g",""))},l.prototype.getLineTokens=function(f,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var u=s||"start",p=this.states[u];p||(u="start",p=this.states[u]);var i=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var m,b=[],x=0,I=0,$={type:null,value:""};m=c.exec(f);){var _=i.defaultToken,C=null,O=m[0],P=c.lastIndex;if(P-O.length>x){var L=f.substring(x,P-O.length);$.type==_?$.value+=L:($.type&&b.push($),$={type:_,value:L})}for(var T=0;T<m.length-2;T++)if(m[T+1]!==void 0){C=p[i[T]],C.onMatch?_=C.onMatch(O,u,a,f):_=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),p=this.states[u],p||(this.reportError("state doesn't exist",u),u="start",p=this.states[u]),i=this.matchMappings[u],x=P,c=this.regExps[u],c.lastIndex=P),C.consumeLineEnd&&(x=P);break}if(O){if(typeof _=="string")(!C||C.merge!==!1)&&$.type===_?$.value+=O:($.type&&b.push($),$={type:_,value:O});else if(_){$.type&&b.push($),$={type:null,value:""};for(var T=0;T<_.length;T++)b.push(_[T])}}if(x==f.length)break;if(x=P,I++>g){for(I>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:f});x<f.length;)$.type&&b.push($),$={value:f.substring(x,x+=500),type:"overflow"};u="start",a=[];break}}return $.type&&b.push($),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:b,state:a.length?a:u}},l})();v.prototype.reportError=d,r.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,r,h){var d=t("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,s){if(!s){for(var a in f)this.$rules[a]=f[a];return}for(var a in f){for(var u=f[a],p=0;p<u.length;p++){var i=u[p];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(s)!==0&&(i.next=s+i.next),i.nextState&&i.nextState.indexOf(s)!==0&&(i.nextState=s+i.nextState))}this.$rules[s+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(f,s,a,u,p){var i=typeof f=="function"?new f().getRules():f;if(u)for(var c=0;c<u.length;c++)u[c]=s+u[c];else{u=[];for(var m in i)u.push(s+m)}if(this.addRules(i,s),a)for(var b=Array.prototype[p?"push":"unshift"],c=0;c<u.length;c++)b.apply(this.$rules[u[c]],d(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var v=function(f,s){return(f!="start"||s.length)&&s.unshift(this.nextState,f),this.nextState},l=function(f,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var f=0,s=this.$rules;function a(u){var p=s[u];p.processed=!0;for(var i=0;i<p.length;i++){var c=p[i],m=null;Array.isArray(c)&&(m=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var b=c.next||c.push;if(b&&Array.isArray(b)){var x=c.stateName;x||(x=c.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=f++)),s[x]=b,c.next=x,a(x)}else b=="pop"&&(c.next=l);if(c.push&&(c.nextState=c.next||c.push,c.next=v,delete c.push),c.rules)for(var I in c.rules)s[I]?s[I].push&&s[I].push.apply(s[I],c.rules[I]):s[I]=c.rules[I];var $=typeof c=="string"?c:c.include;if($&&($==="$self"&&($="start"),Array.isArray($)?m=$.map(function(C){return s[C]}):m=s[$]),m){var _=[i,1].concat(m);c.noEscape&&(_=_.filter(function(C){return!C.next})),p.splice.apply(p,_),i--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(f,s,a,u){var p=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(i){for(var c=f[i],m=c.split(u||"|"),b=m.length;b--;){var x=m[b];this.$keywordList.push(x),a&&(x=x.toLowerCase()),p[x]=i}},this),f=null,a?function(i){return p[i.toLowerCase()]||s}:function(i){return p[i]||s}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,r,h){var d;d=function(){this.$behaviours={}},(function(){this.add=function(g,v,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][v]=l},this.addBehaviours=function(g){for(var v in g)for(var l in g[v])this.add(v,l,g[v][l])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,v){if(typeof g=="function")var l=new g().getBehaviours(v);else var l=g.getBehaviours(v);this.addBehaviours(l)},this.getBehaviours=function(g){if(g){for(var v={},l=0;l<g.length;l++)this.$behaviours[g[l]]&&(v[g[l]]=this.$behaviours[g[l]]);return v}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,r,h){var d=t("./range").Range,g=(function(){function v(l,f,s){this.$session=l,this.$row=f,this.$rowTokens=l.getTokens(f);var a=l.getTokenAt(f,s);this.$tokenIndex=a?a.index:-1}return v.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},v.prototype.stepForward=function(){this.$tokenIndex+=1;for(var l;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentTokenRow=function(){return this.$row},v.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,f=this.$tokenIndex,s=l[f].start;if(s!==void 0)return s;for(s=0;f>0;)f-=1,s+=l[f].value.length;return s},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new d(this.$row,f,this.$row,f+l.value.length)},v})();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(t,r,h){var d=t("../../lib/oop"),g=t("../behaviour").Behaviour,v=t("../../token_iterator").TokenIterator,l=t("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},p={'"':'"',"'":"'"},i=function(b){var x=-1;if(b.multiSelect&&(x=b.selection.index,u.rangeCount!=b.multiSelect.rangeCount&&(u={rangeCount:b.multiSelect.rangeCount})),u[x])return a=u[x];a=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(b,x,I,$){var _=b.end.row-b.start.row;return{text:I+x+$,selection:[0,b.start.column+1,_,b.end.column+(_?0:1)]}},m;m=function(b){b=b||{},this.add("braces","insertion",function(x,I,$,_,C){var O=$.getCursorPosition(),P=_.doc.getLine(O.row);if(C=="{"){i($);var L=$.getSelectionRange(),T=_.doc.getTextRange(L),F=_.getTokenAt(O.row,O.column);if(T!==""&&T!=="{"&&$.getWrapBehavioursEnabled())return c(L,T,"{","}");if(F&&/(?:string)\.quasi|\.xml/.test(F.type)){var D=[/tag\-(?:open|name)/,/attribute\-name/];return D.some(function(G){return G.test(F.type)})||/(string)\.quasi/.test(F.type)&&F.value[O.column-F.start-1]!=="$"?void 0:(m.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion($,_))return/[\]\}\)]/.test(P[O.column])||$.inMultiSelectMode||b.braces?(m.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert($,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){i($);var M=P.substring(O.column,O.column+1);if(M=="}"){var S=_.$findOpeningBracket("}",{column:O.column+1,row:O.row});if(S!==null&&m.isAutoInsertedClosing(O,P,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
174
+ `||C==`\r
175
+ `){i($);var k="";m.isMaybeInsertedClosing(O,P)&&(k=l.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var M=P.substring(O.column,O.column+1);if(M==="}"){var N=_.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!N)return null;var j=this.$getIndent(_.getLine(N.row))}else if(k)var j=this.$getIndent(P);else{m.clearMaybeInsertedClosing();return}var U=j+_.getTabString();return{text:`
176
+ `+U+`
177
+ `+j+k,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,I,$,_,C){var O=_.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){i($);var P=_.doc.getLine(C.start.row),L=P.substring(C.end.column,C.end.column+1);if(L=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,I,$,_,C){if(C=="("){i($);var O=$.getSelectionRange(),P=_.doc.getTextRange(O);if(P!==""&&$.getWrapBehavioursEnabled())return c(O,P,"(",")");if(m.isSaneInsertion($,_))return m.recordAutoInsert($,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){i($);var L=$.getCursorPosition(),T=_.doc.getLine(L.row),F=T.substring(L.column,L.column+1);if(F==")"){var D=_.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(D!==null&&m.isAutoInsertedClosing(L,T,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,I,$,_,C){var O=_.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){i($);var P=_.doc.getLine(C.start.row),L=P.substring(C.start.column+1,C.start.column+2);if(L==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,I,$,_,C){if(C=="["){i($);var O=$.getSelectionRange(),P=_.doc.getTextRange(O);if(P!==""&&$.getWrapBehavioursEnabled())return c(O,P,"[","]");if(m.isSaneInsertion($,_))return m.recordAutoInsert($,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){i($);var L=$.getCursorPosition(),T=_.doc.getLine(L.row),F=T.substring(L.column,L.column+1);if(F=="]"){var D=_.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(D!==null&&m.isAutoInsertedClosing(L,T,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,I,$,_,C){var O=_.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){i($);var P=_.doc.getLine(C.start.row),L=P.substring(C.start.column+1,C.start.column+2);if(L=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,I,$,_,C){var O=_.$mode.$quotes||p;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;i($);var P=C,L=$.getSelectionRange(),T=_.doc.getTextRange(L);if(T!==""&&(T.length!=1||!O[T])&&$.getWrapBehavioursEnabled())return c(L,T,P,P);if(!T){var F=$.getCursorPosition(),D=_.doc.getLine(F.row),M=D.substring(F.column-1,F.column),S=D.substring(F.column,F.column+1),k=_.getTokenAt(F.row,F.column),N=_.getTokenAt(F.row,F.column+1);if(M=="\\"&&k&&/escape/.test(k.type))return null;var j=k&&/string|escape/.test(k.type),U=!N||/string|escape/.test(N.type),G;if(S==P)G=j!==U,G&&/string\.end/.test(N.type)&&(G=!1);else{if(j&&!U||j&&U)return null;var J=_.$mode.tokenRe;J.lastIndex=0;var Q=J.test(M);J.lastIndex=0;var le=J.test(S),ie=_.$mode.$pairQuotesAfter,ue=ie&&ie[P]&&ie[P].test(M);if(!ue&&Q||le||S&&!/[\s;,.})\]\\]/.test(S))return null;var pe=D[F.column-2];if(M==P&&(pe==P||J.test(pe)))return null;G=!0}return{text:G?P+P:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,I,$,_,C){var O=_.$mode.$quotes||p,P=_.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(P)){i($);var L=_.doc.getLine(C.start.row),T=L.substring(C.start.column+1,C.start.column+2);if(T==P)return C.end.column++,C}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,I,$,_,C){if(x==="doc-start"&&(C===`
178
+ `||C===`\r
179
+ `)&&$.selection.isEmpty()){var O=$.getCursorPosition();if(O.column===0)return;for(var P=_.doc.getLine(O.row),L=_.doc.getLine(O.row+1),T=_.getTokens(O.row),F=0,D=0;D<T.length;D++){F+=T[D].value.length;var M=T[D];if(F>=O.column){if(F===O.column){if(!/\.doc/.test(M.type))return;if(/\*\//.test(M.value)){var S=T[D+1];if(!S||!/\.doc/.test(S.type))return}}var k=O.column-(F-M.value.length),N=M.value.indexOf("*/"),j=M.value.indexOf("/**",N>-1?N+2:0);if(j!==-1&&k>j&&k<j+3||N!==-1&&j!==-1&&k>=N&&k<=j||!/\.doc/.test(M.type))return;break}}var U=this.$getIndent(P);if(/\s*\*/.test(L))return/^\s*\*/.test(P)?{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(P.substring(0,O.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(b,x){var I=b.getCursorPosition(),$=new v(x,I.row,I.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(b.session.getLine(I.row)[I.column]))return!0;var _=new v(x,I.row,I.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==I.row||this.$matchTokenType($.getCurrentToken()||"text",s)},m.$matchTokenType=function(b,x){return x.indexOf(b.type||b)>-1},m.recordAutoInsert=function(b,x,I){var $=b.getCursorPosition(),_=x.doc.getLine($.row);this.isAutoInsertedClosing($,_,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=$.row,a.autoInsertedLineEnd=I+_.substr($.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(b,x,I){var $=b.getCursorPosition(),_=x.doc.getLine($.row);this.isMaybeInsertedClosing($,_)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=$.row,a.maybeInsertedLineStart=_.substr(0,$.column)+I,a.maybeInsertedLineEnd=_.substr($.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(b,x,I){return a.autoInsertedBrackets>0&&b.row===a.autoInsertedRow&&I===a.autoInsertedLineEnd[0]&&x.substr(b.column)===a.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(b,x){return a.maybeInsertedBrackets>0&&b.row===a.maybeInsertedRow&&x.substr(b.column)===a.maybeInsertedLineEnd&&x.substr(0,b.column)==a.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},d.inherits(m,g),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(t,r,h){for(var d=[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,v=[],l=0;l<d.length;l+=2)v.push(g+=d[l]),d[l+1]&&v.push(45,g+=d[l+1]);r.wordChars=String.fromCharCode.apply(null,v)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(t,r,h){var d=t("../config"),g=t("../tokenizer").Tokenizer,v=t("./text_highlight_rules").TextHighlightRules,l=t("./behaviour/cstyle").CstyleBehaviour,f=t("../unicode"),s=t("../lib/lang"),a=t("../token_iterator").TokenIterator,u=t("../range").Range,p;p=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new l,this.tokenRe=new RegExp("^["+f.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,c,m,b){var x=c.doc,I=!0,$=!0,_=1/0,C=c.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var P=this.lineCommentStart.map(s.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var P=s.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;P=new RegExp("^(\\s*)(?:"+P+") ?"),O=c.getUseSoftTabs();var T=function(G,J){var Q=G.match(P);if(Q){var le=Q[1].length,ie=Q[0].length;!S(G,le,ie)&&Q[0][ie-1]==" "&&ie--,x.removeInLine(J,le,ie)}},F=L+" ",D=function(G,J){(!I||/\S/.test(G))&&(S(G,_,_)?x.insertInLine({row:J,column:_},F):x.insertInLine({row:J,column:_},L))},M=function(G,J){return P.test(G)},S=function(G,J,Q){for(var le=0;J--&&G.charAt(J)==" ";)le++;if(le%C!=0)return!1;for(var le=0;G.charAt(Q++)==" ";)le++;return C>2?le%C!=C-1:le%C==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,k=this.blockComment.end,P=new RegExp("^(\\s*)(?:"+s.escapeRegExp(L)+")"),N=new RegExp("(?:"+s.escapeRegExp(k)+")\\s*$"),D=function(ue,pe){M(ue,pe)||(!I||/\S/.test(ue))&&(x.insertInLine({row:pe,column:ue.length},k),x.insertInLine({row:pe,column:_},L))},T=function(ue,pe){var oe;(oe=ue.match(N))&&x.removeInLine(pe,ue.length-oe[0].length,ue.length),(oe=ue.match(P))&&x.removeInLine(pe,oe[1].length,oe[0].length)},M=function(ue,pe){if(P.test(ue))return!0;for(var oe=c.getTokens(pe),re=0;re<oe.length;re++)if(oe[re].type==="comment")return!0}}function j(G){for(var J=m;J<=b;J++)G(x.getLine(J),J)}var U=1/0;j(function(G,J){var Q=G.search(/\S/);Q!==-1?(Q<_&&(_=Q),$&&!M(G,J)&&($=!1)):U>G.length&&(U=G.length)}),_==1/0&&(_=U,I=!1,$=!1),O&&_%C!=0&&(_=Math.floor(_/C)*C),j($?T:D)},this.toggleBlockComment=function(i,c,m,b){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var I=new a(c,b.row,b.column),$=I.getCurrentToken();c.selection;var _=c.selection.toOrientedRange(),C,O;if($&&/comment/.test($.type)){for(var P,L;$&&/comment/.test($.type);){var T=$.value.indexOf(x.start);if(T!=-1){var F=I.getCurrentTokenRow(),D=I.getCurrentTokenColumn()+T;P=new u(F,D,F,D+x.start.length);break}$=I.stepBackward()}for(var I=new a(c,b.row,b.column),$=I.getCurrentToken();$&&/comment/.test($.type);){var T=$.value.indexOf(x.end);if(T!=-1){var F=I.getCurrentTokenRow(),D=I.getCurrentTokenColumn()+T;L=new u(F,D,F,D+x.end.length);break}$=I.stepForward()}L&&c.remove(L),P&&(c.remove(P),C=P.start.row,O=-x.start.length)}else O=x.start.length,C=m.start.row,c.insert(m.end,x.end),c.insert(m.start,x.start);_.start.row==C&&(_.start.column+=O),_.end.row==C&&(_.end.column+=O),c.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(i,c,m){return this.$getIndent(c)},this.checkOutdent=function(i,c,m){return!1},this.autoOutdent=function(i,c,m){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var c in i)if(i[c]){var m=i[c],b=m.prototype.$id,x=d.$modes[b];x||(d.$modes[b]=x=new m),d.$modes[c]||(d.$modes[c]=x),this.$embeds.push(c),this.$modes[c]=x}for(var I=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(O){(function(P){var L=I[O],T=P[L];P[I[O]]=function(){return this.$delegator(L,arguments,T)}})(_)},_=this,c=0;c<I.length;c++)$(c)},this.$delegator=function(i,c,m){var b=c[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var x=b[2][b[2].length-1],I=this.$modes[x];if(I)return I[i].apply(I,[b[1]].concat([].slice.call(c,1)))}b=b[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var _=b.split(this.$embeds[$]);if(!_[0]&&_[1]){c[0]=_[1];var I=this.$modes[this.$embeds[$]];return I[i].apply(I,c)}}var C=m.apply(this,c);return m?C:void 0},this.transformAction=function(i,c,m,b,x){if(this.$behaviour){var I=this.$behaviour.getBehaviours();for(var $ in I)if(I[$][c]){var _=I[$][c].apply(this,arguments);if(_)return _}}},this.getKeywords=function(i){if(!this.completionKeywords){var c=this.$tokenizer.rules,m=[];for(var b in c)for(var x=c[b],I=0,$=x.length;I<$;I++)if(typeof x[I].token=="string")/keyword|support|storage/.test(x[I].token)&&m.push(x[I].regex);else if(typeof x[I].token=="object"){for(var _=0,C=x[I].token.length;_<C;_++)if(/keyword|support|storage/.test(x[I].token[_])){var b=x[I].regex.match(/\(.+?\)/g)[_];m.push(b.substr(1,b.length-2))}}this.completionKeywords=m}return i?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,c,m,b){var x=this.$keywordList||this.$createKeywordList();return x.map(function(I){return{name:I,value:I,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(p.prototype),r.Mode=p}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,r,h){var d=t("./lib/dom"),g=(function(){function v(l){this.session=l,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return v.prototype.getRowLength=function(l){var f;return this.lineWidgets?f=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[l]?1+f:this.$wrapData[l].length+1+f},v.prototype.$getWidgetScreenLength=function(){var l=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(l+=f.rowCount)}),l},v.prototype.$onChangeEditor=function(l){this.attach(l.editor)},v.prototype.attach=function(l){l&&l.widgetManager&&l.widgetManager!=this&&l.widgetManager.detach(),this.editor!=l&&(this.detach(),this.editor=l,l&&(l.widgetManager=this,l.renderer.on("beforeRender",this.measureWidgets),l.renderer.on("afterRender",this.renderWidgets)))},v.prototype.detach=function(l){var f=this.editor;if(f){this.editor=null,f.widgetManager=null,f.renderer.off("beforeRender",this.measureWidgets),f.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},v.prototype.updateOnFold=function(l,f){var s=f.lineWidgets;if(!(!s||!l.action)){for(var a=l.data,u=a.start.row,p=a.end.row,i=l.action=="add",c=u+1;c<p;c++)s[c]&&(s[c].hidden=i);s[p]&&(i?s[u]?s[p].hidden=i:s[u]=s[p]:(s[u]==s[p]&&(s[u]=void 0),s[p].hidden=i))}},v.prototype.updateOnChange=function(l){var f=this.session.lineWidgets;if(f){var s=l.start.row,a=l.end.row-s;if(a!==0)if(l.action=="remove"){var u=f.splice(s+1,a);!f[s]&&u[u.length-1]&&(f[s]=u.pop()),u.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var p=new Array(a);f[s]&&f[s].column!=null&&l.start.column>f[s].column&&s++,p.unshift(s,0),f.splice.apply(f,p),this.$updateRows()}}},v.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var f=!0;l.forEach(function(s,a){if(s)for(f=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),f&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[l.row];return f&&(l.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},v.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var f=this.editor.renderer;l.html&&!l.el&&(l.el=d.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=d.createElement("div"),l.el.textContent=l.text),l.el&&(d.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&d.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",f.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/f.layerConfig.lineHeight);var s=this.session.getFoldAt(l.row,0);if(l.$fold=s,s){var a=this.session.lineWidgets;l.row==s.end.row&&!a[s.start.row]?a[s.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(l),l},v.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[l.row];if(f==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;f;){if(f.$oldWidget==l){f.$oldWidget=l.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(l){for(var f=this.session.lineWidgets,s=f&&f[l],a=[];s;)a.push(s),s=s.$oldWidget;return a},v.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(l,f){var s=this.session._changedWidgets,a=f.layerConfig;if(!(!s||!s.length)){for(var u=1/0,p=0;p<s.length;p++){var i=s[p];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,f.container.appendChild(i.el)}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/a.characterWidth));var c=i.h/a.lineHeight;i.coverLine&&(c-=this.session.getRowLineCount(i.row),c<0&&(c=0)),i.rowCount!=c&&(i.rowCount=c,i.row<u&&(u=i.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(l,f){var s=f.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,s.firstRow),p=Math.max(this.lastRow,s.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,f.$cursorLayer.config=s;for(var i=u;i<=p;i++){var c=a[i];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,f.container.appendChild(c.el));var m=f.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;c.coverLine||(m+=s.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=m-s.offset+"px";var b=c.coverGutter?0:f.gutterWidth;c.fixedWidth||(b-=f.scrollLeft),c.el.style.left=b+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=s.width+2*s.padding+"px"),c.fixedWidth?c.el.style.right=f.scrollBar.getWidth()+"px":c.el.style.right=""}}}},v})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(t,r,h){r.applyDelta=function(d,g,v){var l=g.start.row,f=g.start.column,s=d[l]||"";switch(g.action){case"insert":var a=g.lines;if(a.length===1)d[l]=s.substring(0,f)+g.lines[0]+s.substring(f);else{var u=[l,1].concat(g.lines);d.splice.apply(d,u),d[l]=s.substring(0,f)+d[l],d[l+g.lines.length-1]+=s.substring(f)}break;case"remove":var p=g.end.column,i=g.end.row;l===i?d[l]=s.substring(0,f)+s.substring(p):d.splice(l,i-l+1,s.substring(0,f)+d[i].substring(p));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,h){var d=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,v=(function(){function s(a,u,p){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,p)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=f(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},s.prototype.setPosition=function(a,u,p){var i;if(p?i={row:a,column:u}:i=this.$clipPositionToDocument(a,u),!(this.row==i.row&&this.column==i.column)){var c={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:c,value:i})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(a,u){var p={};return a>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):a<0?(p.row=0,p.column=0):(p.row=a,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,u))),u<0&&(p.column=0),p},s})();v.prototype.$insertRight=!1,d.implement(v.prototype,g);function l(s,a,u){var p=u?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&p}function f(s,a,u){var p=s.action=="insert",i=(p?1:-1)*(s.end.row-s.start.row),c=(p?1:-1)*(s.end.column-s.start.column),m=s.start,b=p?m:s.end;return l(a,m,u)?{row:a.row,column:a.column}:l(b,a,!u)?{row:a.row+i,column:a.column+(a.row==b.row?c:0)}:{row:m.row,column:m.column}}r.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,r,h){var d=t("./lib/oop"),g=t("./apply_delta").applyDelta,v=t("./lib/event_emitter").EventEmitter,l=t("./range").Range,f=t("./anchor").Anchor,s=(function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var p=this.getLength()-1;this.remove(new l(0,0,p,this.getLine(p).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,p){return new f(this,u,p)},a.prototype.$detectNewLine=function(u){var p=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=p?p[1]:`
180
+ `,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
181
+ `;case"unix":return`
182
+ `;default:return this.$autoNewLine||`
183
+ `}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
184
+ `||u=="\r"||u==`
185
+ `},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,p){return this.$lines.slice(u,p+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var p;if(u.start.row===u.end.row)p=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{p=this.getLines(u.start.row,u.end.row),p[0]=(p[0]||"").substring(u.start.column);var i=p.length-1;u.end.row-u.start.row==i&&(p[i]=p[i].substring(0,u.end.column))}return p},a.prototype.insertLines=function(u,p){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,p)},a.prototype.removeLines=function(u,p){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,p)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,p){return this.getLength()<=1&&this.$detectNewLine(p),this.insertMergedLines(u,this.$split(p))},a.prototype.insertInLine=function(u,p){var i=this.clippedPos(u.row,u.column),c=this.pos(u.row,u.column+p.length);return this.applyDelta({start:i,end:c,action:"insert",lines:[p]},!0),this.clonePos(c)},a.prototype.clippedPos=function(u,p){var i=this.getLength();u===void 0?u=i:u<0?u=0:u>=i&&(u=i-1,p=void 0);var c=this.getLine(u);return p==null&&(p=c.length),p=Math.min(Math.max(p,0),c.length),{row:u,column:p}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,p){return{row:u,column:p}},a.prototype.$clipPosition=function(u){var p=this.getLength();return u.row>=p?(u.row=Math.max(0,p-1),u.column=this.getLine(p-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,p){u=Math.min(Math.max(u,0),this.getLength());var i=0;u<this.getLength()?(p=p.concat([""]),i=0):(p=[""].concat(p),u--,i=this.$lines[u].length),this.insertMergedLines({row:u,column:i},p)},a.prototype.insertMergedLines=function(u,p){var i=this.clippedPos(u.row,u.column),c={row:i.row+p.length-1,column:(p.length==1?i.column:0)+p[p.length-1].length};return this.applyDelta({start:i,end:c,action:"insert",lines:p}),this.clonePos(c)},a.prototype.remove=function(u){var p=this.clippedPos(u.start.row,u.start.column),i=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:p,end:i,action:"remove",lines:this.getLinesForRange({start:p,end:i})}),this.clonePos(p)},a.prototype.removeInLine=function(u,p,i){var c=this.clippedPos(u,p),m=this.clippedPos(u,i);return this.applyDelta({start:c,end:m,action:"remove",lines:this.getLinesForRange({start:c,end:m})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(u,p){u=Math.min(Math.max(0,u),this.getLength()-1),p=Math.min(Math.max(0,p),this.getLength()-1);var i=p==this.getLength()-1&&u>0,c=p<this.getLength()-1,m=i?u-1:u,b=i?this.getLine(m).length:0,x=c?p+1:p,I=c?0:this.getLine(x).length,$=new l(m,b,x,I),_=this.$lines.slice(u,p+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),_},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,p){if(u instanceof l||(u=l.fromPoints(u.start,u.end)),p.length===0&&u.isEmpty())return u.start;if(p==this.getTextRange(u))return u.end;this.remove(u);var i;return p?i=this.insert(u.start,p):i=u.start,i},a.prototype.applyDeltas=function(u){for(var p=0;p<u.length;p++)this.applyDelta(u[p])},a.prototype.revertDeltas=function(u){for(var p=u.length-1;p>=0;p--)this.revertDelta(u[p])},a.prototype.applyDelta=function(u,p){var i=u.action=="insert";(i?u.lines.length<=1&&!u.lines[0]:!l.comparePoints(u.start,u.end))||(i&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(g(this.$lines,u,p),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var p=this.$lines.length;(u.action=="remove"&&u.start.row<p&&u.end.row<p||u.action=="insert"&&u.start.row<=p)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,p){for(var i=u.lines,c=i.length-p+1,m=u.start.row,b=u.start.column,x=0,I=0;x<c;x=I){I+=p-1;var $=i.slice(x,I);$.push(""),this.applyDelta({start:this.pos(m+x,b),end:this.pos(m+I,b=0),action:u.action,lines:$},!0)}u.lines=i.slice(x),u.start.row=m+x,u.start.column=b,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,p){for(var i=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=p||0,b=i.length;m<b;m++)if(u-=i[m].length+c,u<0)return{row:m,column:u+i[m].length+c};return{row:b-1,column:u+i[b-1].length+c}},a.prototype.positionToIndex=function(u,p){for(var i=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=0,b=Math.min(u.row,i.length),x=p||0;x<b;++x)m+=i[x].length+c;return m+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",d.implement(s.prototype,v),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,h){var d=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,v=(function(){function l(f,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,p=a.currentLine,i=-1,c=a.doc,m=p;a.lines[p];)p++;var b=c.getLength(),x=0;for(a.running=!1;p<b;){a.$tokenizeRow(p),i=p;do p++;while(a.lines[p]);if(x++,x%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=p,i==-1&&(i=p),m<=i&&a.fireUpdateEvent(m,i)}}}return l.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(f,s){var a={first:f,last:s};this._signal("update",{data:a})},l.prototype.start=function(f){this.currentLine=Math.min(f||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(f){var s=f.start.row,a=f.end.row-s;if(a===0)this.lines[s]=null;else if(f.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var u=Array(a+1);u.unshift(s,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},l.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},l.prototype.$tokenizeRow=function(f){var s=this.doc.getLine(f),a=this.states[f-1],u=this.tokenizer.getLineTokens(s,a,f);return this.states[f]+""!=u.state+""?(this.states[f]=u.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=u.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l})();d.implement(v.prototype,g),r.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,r,h){var d=t("./lib/lang"),g=t("./range").Range,v=(function(){function l(f,s,a){a===void 0&&(a="text"),this.setRegexp(f),this.clazz=s,this.type=a,this.docLen=0}return l.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},l.prototype.update=function(f,s,a,u){if(this.regExp){for(var p=u.firstRow,i=u.lastRow,c={},m=a.$editor&&a.$editor.$search,b=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=p;x<=i;x++){var I=this.cache[x];if(I==null||a.getValue().length!=this.docLen){if(b){I=[];var $=m.$multiLineForward(a,this.regExp,x,i);if($){var _=$.endRow<=i?$.endRow-1:i;_>x&&(x=_),I.push(new g($.startRow,$.startCol,$.endRow,$.endCol))}I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES))}else I=d.getMatchOffsets(a.getLine(x),this.regExp),I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES)),I=I.map(function(L){return new g(x,L.offset,x,L.offset+L.length)});this.cache[x]=I.length?I:""}if(I.length!==0)for(var C=I.length;C--;){var O=I[C].toScreenRange(a),P=O.toString();c[P]||(c[P]=!0,s.drawSingleLineMarker(f,O,this.clazz,u))}}this.docLen=a.getValue().length}},l})();v.prototype.MAX_RANGES=500,r.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,r,h){var d=(function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,O,P){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),O===!1||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-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)}},_.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var P=this.$undoStack,L=P.length;L--;){var T=P[L][0];if(T.id<=C)break;T.id<O&&(T.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,O){for(var P=this.selections,L=P.length;L--;){var T=P[L];if(T.rev<C)return O&&(T=P[L+1]),T}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var P=this.$undoStack,L=null,T=0,F=P.length;F--;){var D=P[F][0];if(D.id<O&&!L&&(L=F+1),D.id<=C){T=F+1;break}}return P.slice(T,L)},_.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},_.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},_.prototype.undo=function(C,O){this.lastDeltas=null;var P=this.$undoStack;if(g(P,P.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var L=P.pop(),T=null;return L&&(T=C.undoChanges(L,O),this.$redoStack.push(L),this.$syncRev()),this.$fromUndo=!1,T}},_.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var P=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,P),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(F){F[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),T=null;return L&&(T=C.redoChanges(L,O),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,T},_.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],P=O&&O[0].id||0;this.$redoStackBaseRev=P,this.$rev=P},_.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=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},_.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
186
+ ---
187
+ `+a(this.$redoStack)},_})();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function g(_,C){for(var O=C;O--;){var P=_[O];if(P&&!P[0].ignore){for(;O<C-1;){var L=i(_[O],_[O+1]);_[O]=L[0],_[O+1]=L[1],O++}return!0}}}var v=t("./range").Range,l=v.comparePoints;v.comparePoints;function f(_){return{row:_.row,column:_.column}}function s(_){return{start:f(_.start),end:f(_.end),action:_.action,lines:_.lines.slice()}}function a(_){if(_=_||this,Array.isArray(_))return _.map(a).join(`
188
+ `);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(u).join(`
189
+ `):C=u(_.value)),_.start&&(C+=u(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function u(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function p(_,C){var O=_.action=="insert",P=C.action=="insert";if(O&&P)if(l(C.start,_.end)>=0)m(C,_,-1);else if(l(C.start,_.start)<=0)m(_,C,1);else return null;else if(O&&!P)if(l(C.start,_.end)>=0)m(C,_,-1);else if(l(C.end,_.start)<=0)m(_,C,-1);else return null;else if(!O&&P)if(l(C.start,_.start)>=0)m(C,_,1);else if(l(C.start,_.start)<=0)m(_,C,1);else return null;else if(!O&&!P)if(l(C.start,_.start)>=0)m(C,_,1);else if(l(C.end,_.start)<=0)m(_,C,-1);else return null;return[C,_]}function i(_,C){for(var O=_.length;O--;)for(var P=0;P<C.length;P++)if(!p(_[O],C[P])){for(;O<_.length;){for(;P--;)p(C[P],_[O]);P=C.length,O++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function c(_,C){var O=_.action=="insert",P=C.action=="insert";if(O&&P)l(_.start,C.start)<0?m(C,_,1):m(_,C,1);else if(O&&!P)l(_.start,C.end)>=0?m(_,C,-1):(l(_.start,C.start)<=0||m(_,v.fromPoints(C.start,_.start),-1),m(C,_,1));else if(!O&&P)l(C.start,_.end)>=0?m(C,_,-1):(l(C.start,_.start)<=0||m(C,v.fromPoints(_.start,C.start),-1),m(_,C,1));else if(!O&&!P)if(l(C.start,_.end)>=0)m(C,_,-1);else if(l(C.end,_.start)<=0)m(_,C,-1);else{var L,T;return l(_.start,C.start)<0&&(L=_,_=x(_,C.start)),l(_.end,C.end)>0&&(T=x(_,C.end)),b(C.end,_.start,_.end,-1),T&&!L&&(_.lines=T.lines,_.start=T.start,_.end=T.end,T=_),[C,L,T].filter(Boolean)}return[C,_]}function m(_,C,O){b(_.start,C.start,C.end,O),b(_.end,C.start,C.end,O)}function b(_,C,O,P){_.row==(P==1?C:O).row&&(_.column+=P*(O.column-C.column)),_.row+=P*(O.row-C.row)}function x(_,C){var O=_.lines,P=_.end;_.end=f(C);var L=_.end.row-_.start.row,T=O.splice(L,O.length),F=L?C.column:C.column-_.start.column;O.push(T[0].substring(0,F)),T[0]=T[0].substr(F);var D={start:f(C),end:P,lines:T,action:_.action};return D}function I(_,C){C=s(C);for(var O=_.length;O--;){for(var P=_[O],L=0;L<P.length;L++){var T=P[L],F=c(T,C);C=F[0],F.length!=2&&(F[2]?(P.splice(L+1,1,F[1],F[2]),L++):F[1]||(P.splice(L,1),L--))}P.length||_.splice(O,1)}return _}function $(_,C){for(var O=0;O<C.length;O++)for(var P=C[O],L=0;L<P.length;L++)I(_,P[L])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,r,h){var d=t("../range").Range,g=(function(){function v(l,f){this.foldData=l,Array.isArray(f)?this.folds=f:f=this.folds=[f];var s=f[f.length-1];this.range=new d(f[0].start.row,f[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return v.prototype.shiftRow=function(l){this.start.row+=l,this.end.row+=l,this.folds.forEach(function(f){f.start.row+=l,f.end.row+=l})},v.prototype.addFold=function(l){if(l.sameRow){if(l.start.row<this.startRow||l.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(f,s){return-f.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},v.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},v.prototype.walk=function(l,f,s){var a=0,u=this.folds,p,i,c,m=!0;f==null&&(f=this.end.row,s=this.end.column);for(var b=0;b<u.length;b++){if(p=u[b],i=p.range.compareStart(f,s),i==-1){l(null,f,s,a,m);return}if(c=l(null,p.start.row,p.start.column,a,m),c=!c&&l(p.placeholder,p.start.row,p.start.column,a),c||i===0)return;m=!p.sameRow,a=p.end.column}l(null,f,s,a,m)},v.prototype.getNextFoldTo=function(l,f){for(var s,a,u=0;u<this.folds.length;u++){if(s=this.folds[u],a=s.range.compareEnd(l,f),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},v.prototype.addRemoveChars=function(l,f,s){var a=this.getNextFoldTo(l,f),u,p;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=f&&u.start.row!=l)window.console&&window.console.log(l,f,u);else if(u.start.row==l){p=this.folds;var i=p.indexOf(u);for(i===0&&(this.start.column+=s),i;i<p.length;i++){if(u=p[i],u.start.column+=s,!u.sameRow)return;u.end.column+=s}this.end.column+=s}}},v.prototype.split=function(l,f){var s=this.getNextFoldTo(l,f);if(!s||s.kind=="inside")return null;var a=s.fold,u=this.folds,p=this.foldData,i=u.indexOf(a),c=u[i-1];this.end.row=c.end.row,this.end.column=c.end.column,u=u.splice(i,u.length-i);var m=new v(p,u);return p.splice(p.indexOf(this)+1,0,m),m},v.prototype.merge=function(l){for(var f=l.folds,s=0;s<f.length;s++)this.addFold(f[s]);var a=this.foldData;a.splice(a.indexOf(l),1)},v.prototype.toString=function(){var l=[this.range.toString()+": ["];return this.folds.forEach(function(f){l.push(" "+f.toString())}),l.push("]"),l.join(`
190
+ `)},v.prototype.idxToPosition=function(l){for(var f=0,s=0;s<this.folds.length;s++){var a=this.folds[s];if(l-=a.start.column-f,l<0)return{row:a.start.row,column:a.start.column+l};if(l-=a.placeholder.length,l<0)return a.start;f=a.end.column}return{row:this.end.row,column:this.end.column+l}},v})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,r,h){var d=t("./range").Range,g=d.comparePoints,v=(function(){function l(){this.ranges=[],this.$bias=1}return l.prototype.pointIndex=function(f,s,a){for(var u=this.ranges,p=a||0;p<u.length;p++){var i=u[p],c=g(f,i.end);if(!(c>0)){var m=g(f,i.start);return c===0?s&&m!==0?-p-2:p:m>0||m===0&&!s?p:-p-1}}return-p-1},l.prototype.add=function(f){var s=!f.isEmpty(),a=this.pointIndex(f.start,s);a<0&&(a=-a-1);var u=this.pointIndex(f.end,s,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,f)},l.prototype.addList=function(f){for(var s=[],a=f.length;a--;)s.push.apply(s,this.add(f[a]));return s},l.prototype.substractPoint=function(f){var s=this.pointIndex(f);if(s>=0)return this.ranges.splice(s,1)},l.prototype.merge=function(){var f=[],s=this.ranges;s=s.sort(function(c,m){return g(c.start,m.start)});for(var a=s[0],u,p=1;p<s.length;p++){u=a,a=s[p];var i=g(u.end,a.start);i<0||i==0&&!u.isEmpty()&&!a.isEmpty()||(g(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),s.splice(p,1),f.push(a),a=u,p--)}return this.ranges=s,f},l.prototype.contains=function(f,s){return this.pointIndex({row:f,column:s})>=0},l.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},l.prototype.rangeAtPoint=function(f){var s=this.pointIndex(f);if(s>=0)return this.ranges[s]},l.prototype.clipRows=function(f,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<f)return[];var u=this.pointIndex({row:f,column:0});u<0&&(u=-u-1);var p=this.pointIndex({row:s,column:0},u);p<0&&(p=-p-1);for(var i=[],c=u;c<p;c++)i.push(a[c]);return i},l.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},l.prototype.attach=function(f){this.session&&this.detach(),this.session=f,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},l.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},l.prototype.$onChange=function(f){for(var s=f.start,a=f.end,u=s.row,p=a.row,i=this.ranges,c=0,m=i.length;c<m;c++){var b=i[c];if(b.end.row>=u)break}if(f.action=="insert")for(var x=p-u,I=-s.column+a.column;c<m;c++){var b=i[c];if(b.start.row>u)break;if(b.start.row==u&&b.start.column>=s.column&&(b.start.column==s.column&&this.$bias<=0||(b.start.column+=I,b.start.row+=x)),b.end.row==u&&b.end.column>=s.column){if(b.end.column==s.column&&this.$bias<0)continue;b.end.column==s.column&&I>0&&c<m-1&&b.end.column>b.start.column&&b.end.column==i[c+1].start.column&&(b.end.column-=I),b.end.column+=I,b.end.row+=x}}else for(var x=u-p,I=s.column-a.column;c<m;c++){var b=i[c];if(b.start.row>p)break;b.end.row<p&&(u<b.end.row||u==b.end.row&&s.column<b.end.column)?(b.end.row=u,b.end.column=s.column):b.end.row==p?b.end.column<=a.column?(x||b.end.column>s.column)&&(b.end.column=s.column,b.end.row=s.row):(b.end.column+=I,b.end.row+=x):b.end.row>p&&(b.end.row+=x),b.start.row<p&&(u<b.start.row||u==b.start.row&&s.column<b.start.column)?(b.start.row=u,b.start.column=s.column):b.start.row==p?b.start.column<=a.column?(x||b.start.column>s.column)&&(b.start.column=s.column,b.start.row=s.row):(b.start.column+=I,b.start.row+=x):b.start.row>p&&(b.start.row+=x)}if(x!=0&&c<m)for(;c<m;c++){var b=i[c];b.start.row+=x,b.end.row+=x}},l})();v.prototype.comparePoints=g,r.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,r,h){var d=this&&this.__extends||(function(){var u=function(p,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(c[b]=m[b])},u(p,i)};return function(p,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(p,i);function c(){this.constructor=p}p.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}})(),g=t("../range_list").RangeList,v=(function(u){d(p,u);function p(i,c){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=c,m.range=i,m.start=i.start,m.end=i.end,m.sameRow=i.start.row==i.end.row,m.subFolds=m.ranges=[],m}return p.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},p.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(c){c.setFoldLine(i)})},p.prototype.clone=function(){var i=this.range.clone(),c=new p(i,this.placeholder);return this.subFolds.forEach(function(m){c.subFolds.push(m.clone())}),c.collapseChildren=this.collapseChildren,c},p.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){f(i,this.start);for(var c=i.start.row,m=i.start.column,b=0,x=-1;b<this.subFolds.length&&(x=this.subFolds[b].range.compare(c,m),x==1);b++);var I=this.subFolds[b],$=0;if(x==0){if(I.range.containsRange(i))return I.addSubFold(i);$=1}for(var c=i.range.end.row,m=i.range.end.column,_=b,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(c,m),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(b,_-b,i),O=x==0?C.length-1:C.length,P=$;P<O;P++)i.addSubFold(C[P]);return i.setFoldLine(this.foldLine),i}},p.prototype.restoreRange=function(i){return a(i,this.start)},p})(g);function l(u,p){u.row-=p.row,u.row==0&&(u.column-=p.column)}function f(u,p){l(u.start,p),l(u.end,p)}function s(u,p){u.row==0&&(u.column+=p.column),u.row+=p.row}function a(u,p){s(u.start,p),s(u.end,p)}r.Fold=v}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(t,r,h){var d=t("../range").Range,g=t("./fold_line").FoldLine,v=t("./fold").Fold,l=t("../token_iterator").TokenIterator,f=t("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,u,p){var i=this.getFoldLine(a);if(!i)return null;for(var c=i.folds,m=0;m<c.length;m++){var b=c[m].range;if(b.contains(a,u)){if(p==1&&b.isEnd(a,u)&&!b.isEmpty()||p==-1&&b.isStart(a,u)&&!b.isEmpty())continue;return c[m]}}},this.getFoldsInRange=function(a){var u=a.start,p=a.end,i=this.$foldData,c=[];u.column+=1,p.column-=1;for(var m=0;m<i.length;m++){var b=i[m].range.compareRange(a);if(b!=2){if(b==-2)break;for(var x=i[m].folds,I=0;I<x.length;I++){var $=x[I];if(b=$.range.compareRange(a),b==-2)break;if(b!=2){if(b==42)break;c.push($)}}}}return u.column-=1,p.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(i){u=u.concat(this.getFoldsInRange(i))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,p=0;p<u.length;p++)for(var i=0;i<u[p].folds.length;i++)a.push(u[p].folds[i]);return a},this.getFoldStringAt=function(a,u,p,i){if(i=i||this.getFoldLine(a),!i)return null;for(var c={end:{column:0}},m,b,x=0;x<i.folds.length;x++){b=i.folds[x];var I=b.range.compareEnd(a,u);if(I==-1){m=this.getLine(b.start.row).substring(c.end.column,b.start.column);break}else if(I===0)return null;c=b}return m||(m=this.getLine(b.start.row).substring(c.end.column)),p==-1?m.substring(0,u-c.end.column):p==1?m.substring(u-c.end.column):m},this.getFoldLine=function(a,u){var p=this.$foldData,i=0;for(u&&(i=p.indexOf(u)),i==-1&&(i=0),i;i<p.length;i++){var c=p[i];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var p=this.$foldData,i=0;for(u&&(i=p.indexOf(u)),i==-1&&(i=0),i;i<p.length;i++){var c=p[i];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,u){for(var p=this.$foldData,i=u-a+1,c=0;c<p.length;c++){var m=p[c],b=m.end.row,x=m.start.row;if(b>=u){x<u&&(x>=a?i-=u-x:i=0);break}else b>=a&&(x>=a?i-=b-x:i-=b-a+1)}return i},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,p){return u.start.row-p.start.row}),a},this.addFold=function(a,u){var p=this.$foldData,i=!1,c;a instanceof v?c=a:(c=new v(u,a),c.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(c.range);var m=c.start.row,b=c.start.column,x=c.end.row,I=c.end.column,$=this.getFoldAt(m,b,1),_=this.getFoldAt(x,I,-1);if($&&_==$)return $.addSubFold(c);$&&!$.range.isStart(m,b)&&this.removeFold($),_&&!_.range.isEnd(x,I)&&this.removeFold(_);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(T){c.addSubFold(T)}));for(var O=0;O<p.length;O++){var P=p[O];if(x==P.start.row){P.addFold(c),i=!0;break}else if(m==P.end.row){if(P.addFold(c),i=!0,!c.sameRow){var L=p[O+1];if(L&&L.start.row==x){P.merge(L);break}}break}else if(x<=P.start.row)break}return i||(P=this.$addFoldLine(new g(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(P.start.row,P.start.row):this.$updateRowLengthCache(P.start.row,P.start.row),this.$modified=!0,this._signal("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,p=u.start.row,i=u.end.row,c=this.$foldData,m=u.folds;if(m.length==1)c.splice(c.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var b=u.split(a.start.row,a.start.column);m=b.folds,m.shift(),b.start.row=m[0].start.row,b.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(p,i):this.$updateRowLengthCache(p,i)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],p=0;p<a.length;p++)u.push(a[p]);u.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var p,i;if(a==null)p=new d(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")p=new d(a,0,a,this.getLine(a).length);else if("row"in a)p=d.fromPoints(a,a);else{if(Array.isArray(a))return i=[],a.forEach(function(m){i=i.concat(this.unfold(m))},this),i;p=a}i=this.getFoldsInRangeList(p);for(var c=i;i.length==1&&d.comparePoints(i[0].start,p.start)<0&&d.comparePoints(i[0].end,p.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(p);if(u!=!1?this.removeFolds(i):this.expandFolds(i),c.length)return c},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var p=this.getFoldLine(a,u);return p?p.end.row:a},this.getRowFoldStart=function(a,u){var p=this.getFoldLine(a,u);return p?p.start.row:a},this.getFoldDisplayLine=function(a,u,p,i,c){i==null&&(i=a.start.row),c==null&&(c=0),u==null&&(u=a.end.row),p==null&&(p=this.getLine(u).length);var m=this.doc,b="";return a.walk(function(x,I,$,_){if(!(I<i)){if(I==i){if($<c)return;_=Math.max(c,_)}x!=null?b+=x:b+=m.getLine(I).substring(_,$)}},u,p),b},this.getDisplayLine=function(a,u,p,i){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,u,p,i);var m;return m=this.doc.getLine(a),m.substring(i||0,u||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var p=u.folds.map(function(i){return i.clone()});return new g(a,p)}),a},this.toggleFold=function(a){var u=this.selection,p=u.getRange(),i,c;if(p.isEmpty()){var m=p.start;if(i=this.getFoldAt(m.row,m.column),i){this.expandFold(i);return}else if(a){var b=this.getFoldLine(m.row);b&&this.expandFolds(b.folds);return}else(c=this.findMatchingBracket(m))?p.comparePoint(c)==1?p.end=c:(p.start=c,p.start.column++,p.end.column--):(c=this.findMatchingBracket({row:m.row,column:m.column+1}))?(p.comparePoint(c)==1?p.end=c:p.start=c,p.start.column++):p=this.getCommentFoldRange(m.row,m.column)||p}else{var x=this.getFoldsInRange(p);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(i=x[0])}if(i||(i=this.getFoldAt(p.start.row,p.start.column)),i&&i.range.toString()==p.toString()){this.expandFold(i);return}var I="...";if(!p.isMultiLine()){if(I=this.getTextRange(p),I.length<4)return;I=I.trim().substring(0,2)+".."}this.addFold(I,p)},this.getCommentFoldRange=function(a,u,p){var i=new l(this,a,u),c=i.getCurrentToken(),m=c&&c.type;if(c&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var b=new RegExp(m),x=new d;if(p!=1){do c=i.stepBackward();while(c&&b.test(c.type));c=i.stepForward()}x.start.row=i.getCurrentTokenRow(),x.start.column=i.getCurrentTokenColumn()+c.value.length,i=new l(this,a,u);var I=this.getState(i.$row);if(p!=-1){var $=-1;do if(c=i.stepForward(),$==-1){var _=this.getState(i.$row);I.toString()!==_.toString()&&($=i.$row)}else if(i.$row>$)break;while(c&&b.test(c.type));c=i.stepBackward()}else c=i.getCurrentToken();return x.end.row=i.getCurrentTokenRow(),x.end.column=i.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,u,p,i){p==null&&(p=1e5);var c=this.foldWidgets;if(c){u=u||this.getLength(),a=a||0;for(var m=a;m<u;m++)if(c[m]==null&&(c[m]=this.getFoldWidget(m)),c[m]=="start"&&!(i&&!i(m))){var b=this.getFoldWidgetRange(m);b&&b.isMultiLine()&&b.end.row<=u&&b.start.row>=a&&(m=b.end.row,b.collapseChildren=p,this.addFold("...",b))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var p=a.getTokens(u),i=0;i<p.length;i++){var c=p[i];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,u){var p=this.foldWidgets;if(!p||u&&p[a])return{};for(var i=a-1,c;i>=0;){var m=p[i];if(m==null&&(m=p[i]=this.getFoldWidget(i)),m=="start"){var b=this.getFoldWidgetRange(i);if(c||(c=b),b&&b.end.row>=a)break}i--}return{range:i!==-1&&b,firstRange:c}},this.onFoldWidgetClick=function(a,u){u instanceof f&&(u=u.domEvent);var p={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},i=this.$toggleFoldWidget(a,p);if(!i){var c=u.target||u.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var p=this.getFoldWidget(a),i=this.getLine(a),c=p==="end"?-1:1,m=this.getFoldAt(a,c===-1?0:i.length,c);if(m)return u.children||u.all?this.removeFold(m):this.expandFold(m),m;var b=this.getFoldWidgetRange(a,!0);if(b&&!b.isMultiLine()&&(m=this.getFoldAt(b.start.row,b.start.column,1),m&&b.isEqual(m.range)))return this.removeFold(m),m;if(u.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var I=x.range.start.row+1,$=x.range.end.row;this.foldAll(I,$,u.all?1e4:0)}else u.children?($=b?b.end.row:this.getLength(),this.foldAll(a+1,$,u.all?1e4:0)):b&&(u.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var p=this.$toggleFoldWidget(u,{});if(!p){var i=this.getParentFoldRangeData(u,!0);if(p=i.range||i.firstRange,p){u=p.start.row;var c=this.getFoldAt(u,this.getLine(u).length,1);c?this.removeFold(c):this.addFold("...",p)}}},this.updateFoldWidgets=function(a){var u=a.start.row,p=a.end.row-u;if(p===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,p+1,null);else{var i=Array(p+1);i.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,r,h){var d=t("../token_iterator").TokenIterator,g=t("../range").Range;function v(){this.findMatchingBracket=function(l,f){if(l.column==0)return null;var s=f||this.getLine(l.row).charAt(l.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],l):this.$findOpeningBracket(a[2],l):null},this.getBracketRange=function(l){var f=this.getLine(l.row),s=!0,a,u=f.charAt(l.column-1),p=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(p||(u=f.charAt(l.column),l={row:l.row,column:l.column+1},p=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!p)return null;if(p[1]){var i=this.$findClosingBracket(p[1],l);if(!i)return null;a=g.fromPoints(l,i),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var i=this.$findOpeningBracket(p[2],l);if(!i)return null;a=g.fromPoints(i,l),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(l,f){var s=this.getLine(l.row),a=/([\(\[\{])|([\)\]\}])/,u=!f&&s.charAt(l.column-1),p=u&&u.match(a);if(p||(u=(f===void 0||f)&&s.charAt(l.column),l={row:l.row,column:l.column+1},p=u&&u.match(a)),!p)return null;var i=new g(l.row,l.column-1,l.row,l.column),c=p[1]?this.$findClosingBracket(p[1],l):this.$findOpeningBracket(p[2],l);if(!c)return[i];var m=new g(c.row,c.column,c.row,c.column+1);return[i,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,f,s){var a=this.$brackets[l],u=1,p=new d(this,f.row,f.column),i=p.getCurrentToken();if(i||(i=p.stepForward()),!!i){s||(s=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=f.column-p.getCurrentTokenColumn()-2,m=i.value;;){for(;c>=0;){var b=m.charAt(c);if(b==a){if(u-=1,u==0)return{row:p.getCurrentTokenRow(),column:c+p.getCurrentTokenColumn()}}else b==l&&(u+=1);c-=1}do i=p.stepBackward();while(i&&!s.test(i.type));if(i==null)break;m=i.value,c=m.length-1}return null}},this.$findClosingBracket=function(l,f,s){var a=this.$brackets[l],u=1,p=new d(this,f.row,f.column),i=p.getCurrentToken();if(i||(i=p.stepForward()),!!i){s||(s=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=f.column-p.getCurrentTokenColumn();;){for(var m=i.value,b=m.length;c<b;){var x=m.charAt(c);if(x==a){if(u-=1,u==0)return{row:p.getCurrentTokenRow(),column:c+p.getCurrentTokenColumn()}}else x==l&&(u+=1);c+=1}do i=p.stepForward();while(i&&!s.test(i.type));if(i==null)break;c=0}return null}},this.getMatchingTags=function(l){var f=new d(this,l.row,l.column),s=this.$findTagName(f);if(s){var a=f.stepBackward();return a.value==="<"?this.$findClosingTag(f,s):this.$findOpeningTag(f,s)}},this.$findTagName=function(l){var f=l.getCurrentToken(),s=!1,a=!1;if(f&&f.type.indexOf("tag-name")===-1)do a?f=l.stepBackward():f=l.stepForward(),f&&(f.value==="/>"?a=!0:f.type.indexOf("tag-name")!==-1&&(s=!0));while(f&&!s);return f},this.$findClosingTag=function(l,f){var s,a=f.value,u=f.value,p=0,i=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);f=l.stepForward();var c=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+f.value.length),m=!1;do{if(s=f,s.type.indexOf("tag-close")!==-1&&!m){var b=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);m=!0}if(f=l.stepForward(),f){if(f.value===">"&&!m){var b=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);m=!0}if(f.type.indexOf("tag-name")!==-1){if(a=f.value,u===a){if(s.value==="<")p++;else if(s.value==="</"&&(p--,p<0)){l.stepBackward();var x=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2);f=l.stepForward();var I=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=l.stepForward()),f&&f.value===">")var $=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(u===a&&f.value==="/>"&&(p--,p<0))var x=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),I=x,$=I,b=new g(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(f&&p>=0);if(i&&b&&x&&$&&c&&I)return{openTag:new g(i.start.row,i.start.column,b.end.row,b.end.column),closeTag:new g(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:c,closeTagName:I}},this.$findOpeningTag=function(l,f){var s=l.getCurrentToken(),a=f.value,u=0,p=l.getCurrentTokenRow(),i=l.getCurrentTokenColumn(),c=i+2,m=new g(p,i,p,c);l.stepForward();var b=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=l.stepForward()),!(!f||f.value!==">")){var x=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(f=s,p=l.getCurrentTokenRow(),i=l.getCurrentTokenColumn(),c=i+f.value.length,s=l.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(a===f.value)if(s.value==="<"){if(u++,u>0){var I=new g(p,i,p,c),$=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do f=l.stepForward();while(f&&f.value!==">");var _=new g(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else s.value==="</"&&u--}else if(f.value==="/>"){for(var C=0,O=s;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===a){u--;break}else if(O.value==="<")break;O=l.stepBackward(),C++}for(var P=0;P<C;P++)l.stepForward()}}while(s&&u<=0);if($&&_&&m&&x&&I&&b)return{openTag:new g($.start.row,$.start.column,_.end.row,_.end.column),closeTag:new g(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:I,closeTagName:b}}}}r.BracketMatch=v}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(t,r,h){var d=t("./lib/oop"),g=t("./lib/lang"),v=t("./bidihandler").BidiHandler,l=t("./config"),f=t("./lib/event_emitter").EventEmitter,s=t("./selection").Selection,a=t("./mode/text").Mode,u=t("./range").Range,p=t("./line_widgets").LineWidgets,i=t("./document").Document,c=t("./background_tokenizer").BackgroundTokenizer,m=t("./search_highlight").SearchHighlight,b=t("./undomanager").UndoManager,x=(function(){function D(M,S){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"+ ++D.$uid,this.$foldData.toString=function(){return this.join(`
191
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new c(new a().getTokenizer(),this);var k=this;this.bgTokenizer.on("update",function(N){k._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof M!="object"||!M.getLine)&&(M=new i(M)),this.setDocument(M),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new v(this),l.resetOptions(this),this.setMode(S),l._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return D.prototype.$initOperationListeners=function(){var M=this;this.curOp=null,this.on("change",function(){M.curOp||(M.startOperation(),M.curOp.selectionBefore=M.$lastSel),M.curOp.docChanged=!0},!0),this.on("changeSelection",function(){M.curOp||(M.startOperation(),M.curOp.selectionBefore=M.$lastSel),M.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},D.prototype.startOperation=function(M){if(this.curOp){if(!M||this.curOp.command)return;this.prevOp=this.curOp}M||(M={}),this.$operationResetTimer.schedule(),this.curOp={command:M.command||{},args:M.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",M)},D.prototype.endOperation=function(M){if(this.curOp){if(M&&M.returnValue===!1){this.curOp=null,this._signal("endOperation",M);return}if(M==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var S=this.selection.toJSON();this.curOp.selectionAfter=S,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(S),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",M)}},D.prototype.setDocument=function(M){this.doc&&this.doc.off("change",this.$onChange),this.doc=M,M.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},D.prototype.getDocument=function(){return this.doc},Object.defineProperty(D.prototype,"widgetManager",{get:function(){var M=new p(this);return this.widgetManager=M,this.$editor&&M.attach(this.$editor),M},set:function(M){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:M})},enumerable:!1,configurable:!0}),D.prototype.$resetRowCache=function(M){if(!M){this.$docRowCache=[],this.$screenRowCache=[];return}var S=this.$docRowCache.length,k=this.$getRowCacheIndex(this.$docRowCache,M)+1;S>k&&(this.$docRowCache.splice(k,S),this.$screenRowCache.splice(k,S))},D.prototype.$getRowCacheIndex=function(M,S){for(var k=0,N=M.length-1;k<=N;){var j=k+N>>1,U=M[j];if(S>U)k=j+1;else if(S<U)N=j-1;else return j}return k-1},D.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},D.prototype.onChangeFold=function(M){var S=M.data;this.$resetRowCache(S.start.row)},D.prototype.onChange=function(M){this.$modified=!0,this.$bidiHandler.onChange(M),this.$resetRowCache(M.start.row);var S=this.$updateInternalDataOnChange(M);!this.$fromUndo&&this.$undoManager&&(S&&S.length&&(this.$undoManager.add({action:"removeFolds",folds:S},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(M,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(M),this._signal("change",M)},D.prototype.onSelectionChange=function(){this._signal("changeSelection")},D.prototype.setValue=function(M){this.doc.setValue(M),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},D.fromJSON=function(M){typeof M=="string"&&(M=JSON.parse(M));var S=new b;S.$undoStack=M.history.$undoStack,S.$redoStack=M.history.$redoStack,S.mark=M.history.mark,S.$rev=M.history.rev;var k=new D(M.value);return M.folds.forEach(function(N){k.addFold("...",u.fromPoints(N.start,N.end))}),k.setAnnotations(M.annotations),k.setBreakpoints(M.breakpoints),k.setMode(M.mode),k.setScrollLeft(M.scrollLeft),k.setScrollTop(M.scrollTop),k.setUndoManager(S),k.selection.fromJSON(M.selection),k},D.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(M){return M.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},D.prototype.toString=function(){return this.doc.getValue()},D.prototype.getSelection=function(){return this.selection},D.prototype.getState=function(M){return this.bgTokenizer.getState(M)},D.prototype.getTokens=function(M){return this.bgTokenizer.getTokens(M)},D.prototype.getTokenAt=function(M,S){var k=this.bgTokenizer.getTokens(M),N,j=0;if(S==null){var U=k.length-1;j=this.getLine(M).length}else for(var U=0;U<k.length&&(j+=k[U].value.length,!(j>=S));U++);return N=k[U],N?(N.index=U,N.start=j-N.value.length,N):null},D.prototype.setUndoManager=function(M){if(this.$undoManager=M,this.$informUndoManager&&this.$informUndoManager.cancel(),M){var S=this;M.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},D.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},D.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},D.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},D.prototype.setUseSoftTabs=function(M){this.setOption("useSoftTabs",M)},D.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},D.prototype.setTabSize=function(M){this.setOption("tabSize",M)},D.prototype.getTabSize=function(){return this.$tabSize},D.prototype.isTabStop=function(M){return this.$useSoftTabs&&M.column%this.$tabSize===0},D.prototype.setNavigateWithinSoftTabs=function(M){this.setOption("navigateWithinSoftTabs",M)},D.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},D.prototype.setOverwrite=function(M){this.setOption("overwrite",M)},D.prototype.getOverwrite=function(){return this.$overwrite},D.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},D.prototype.addGutterDecoration=function(M,S){this.$decorations[M]||(this.$decorations[M]=""),this.$decorations[M]+=" "+S,this._signal("changeBreakpoint",{})},D.prototype.removeGutterCustomWidget=function(M){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(M)},D.prototype.addGutterCustomWidget=function(M,S){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(M,S)},D.prototype.removeGutterDecoration=function(M,S){this.$decorations[M]=(this.$decorations[M]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},D.prototype.getBreakpoints=function(){return this.$breakpoints},D.prototype.setBreakpoints=function(M){this.$breakpoints=[];for(var S=0;S<M.length;S++)this.$breakpoints[M[S]]="ace_breakpoint";this._signal("changeBreakpoint",{})},D.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},D.prototype.setBreakpoint=function(M,S){S===void 0&&(S="ace_breakpoint"),S?this.$breakpoints[M]=S:delete this.$breakpoints[M],this._signal("changeBreakpoint",{})},D.prototype.clearBreakpoint=function(M){delete this.$breakpoints[M],this._signal("changeBreakpoint",{})},D.prototype.addMarker=function(M,S,k,N){var j=this.$markerId++,U={range:M,type:k||"line",renderer:typeof k=="function"?k:null,clazz:S,inFront:!!N,id:j};return N?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},D.prototype.addDynamicMarker=function(M,S){if(M.update){var k=this.$markerId++;return M.id=k,M.inFront=!!S,S?(this.$frontMarkers[k]=M,this._signal("changeFrontMarker")):(this.$backMarkers[k]=M,this._signal("changeBackMarker")),M}},D.prototype.removeMarker=function(M){var S=this.$frontMarkers[M]||this.$backMarkers[M];if(S){var k=S.inFront?this.$frontMarkers:this.$backMarkers;delete k[M],this._signal(S.inFront?"changeFrontMarker":"changeBackMarker")}},D.prototype.getMarkers=function(M){return M?this.$frontMarkers:this.$backMarkers},D.prototype.highlight=function(M){if(!this.$searchHighlight){var S=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(S)}this.$searchHighlight.setRegexp(M)},D.prototype.highlightLines=function(M,S,k,N){typeof S!="number"&&(k=S,S=M),k||(k="ace_step");var j=new u(M,0,S,1/0);return j.id=this.addMarker(j,k,"fullLine",N),j},D.prototype.setAnnotations=function(M){this.$annotations=M,this._signal("changeAnnotation",{})},D.prototype.getAnnotations=function(){return this.$annotations||[]},D.prototype.clearAnnotations=function(){this.setAnnotations([])},D.prototype.$detectNewLine=function(M){var S=M.match(/^.*?(\r?\n)/m);S?this.$autoNewLine=S[1]:this.$autoNewLine=`
192
+ `},D.prototype.getWordRange=function(M,S){var k=this.getLine(M),N=!1;if(S>0&&(N=!!k.charAt(S-1).match(this.tokenRe)),N||(N=!!k.charAt(S).match(this.tokenRe)),N)var j=this.tokenRe;else if(/^\s+$/.test(k.slice(S-1,S+1)))var j=/\s/;else var j=this.nonTokenRe;var U=S;if(U>0){do U--;while(U>=0&&k.charAt(U).match(j));U++}for(var G=S;G<k.length&&k.charAt(G).match(j);)G++;return new u(M,U,M,G)},D.prototype.getAWordRange=function(M,S){for(var k=this.getWordRange(M,S),N=this.getLine(k.end.row);N.charAt(k.end.column).match(/[ \t]/);)k.end.column+=1;return k},D.prototype.setNewLineMode=function(M){this.doc.setNewLineMode(M)},D.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},D.prototype.setUseWorker=function(M){this.setOption("useWorker",M)},D.prototype.getUseWorker=function(){return this.$useWorker},D.prototype.onReloadTokenizer=function(M){var S=M.data;this.bgTokenizer.start(S.first),this._signal("tokenizerUpdate",M)},D.prototype.setMode=function(M,S){if(M&&typeof M=="object"){if(M.getTokenizer)return this.$onChangeMode(M);var k=M,N=k.path}else N=M||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!k){this.$onChangeMode(this.$modes[N]),S&&S();return}this.$modeId=N,l.loadModule(["mode",N],(function(j){if(!this.destroyed){if(this.$modeId!==N)return S&&S();this.$modes[N]&&!k?this.$onChangeMode(this.$modes[N]):j&&j.Mode&&(j=new j.Mode(k),k||(this.$modes[N]=j,j.$id=N),this.$onChangeMode(j)),S&&S()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},D.prototype.$onChangeMode=function(M,S){if(S||(this.$modeId=M.$id),this.$mode!==M){var k=this.$mode;this.$mode=M,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=M.getTokenizer();if(N.on!==void 0){var j=this.onReloadTokenizer.bind(this);N.on("update",j)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=M.tokenRe,this.nonTokenRe=M.nonTokenRe,S||(M.attachToSession&&M.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(M.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:k,mode:M}))}},D.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},D.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(M){l.warn("Could not load worker",M),this.$worker=null}},D.prototype.getMode=function(){return this.$mode},D.prototype.setScrollTop=function(M){this.$scrollTop===M||isNaN(M)||(this.$scrollTop=M,this._signal("changeScrollTop",M))},D.prototype.getScrollTop=function(){return this.$scrollTop},D.prototype.setScrollLeft=function(M){this.$scrollLeft===M||isNaN(M)||(this.$scrollLeft=M,this._signal("changeScrollLeft",M))},D.prototype.getScrollLeft=function(){return this.$scrollLeft},D.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},D.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var M=0;return this.lineWidgets.forEach(function(S){S&&S.screenWidth>M&&(M=S.screenWidth)}),this.lineWidgetWidth=M},D.prototype.$computeWidth=function(M){if(this.$modified||M){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),k=this.$rowLengthCache,N=0,j=0,U=this.$foldData[j],G=U?U.start.row:1/0,J=S.length,Q=0;Q<J;Q++){if(Q>G){if(Q=U.end.row+1,Q>=J)break;U=this.$foldData[j++],G=U?U.start.row:1/0}k[Q]==null&&(k[Q]=this.$getStringScreenWidth(S[Q])[0]),k[Q]>N&&(N=k[Q])}this.screenWidth=N}},D.prototype.getLine=function(M){return this.doc.getLine(M)},D.prototype.getLines=function(M,S){return this.doc.getLines(M,S)},D.prototype.getLength=function(){return this.doc.getLength()},D.prototype.getTextRange=function(M){return this.doc.getTextRange(M||this.selection.getRange())},D.prototype.insert=function(M,S){return this.doc.insert(M,S)},D.prototype.remove=function(M){return this.doc.remove(M)},D.prototype.removeFullLines=function(M,S){return this.doc.removeFullLines(M,S)},D.prototype.undoChanges=function(M,S){if(M.length){this.$fromUndo=!0;for(var k=M.length-1;k!=-1;k--){var N=M[k];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!S&&this.$undoSelect&&(M.selectionBefore?this.selection.fromJSON(M.selectionBefore):this.selection.setRange(this.$getUndoSelection(M,!0))),this.$fromUndo=!1}},D.prototype.redoChanges=function(M,S){if(M.length){this.$fromUndo=!0;for(var k=0;k<M.length;k++){var N=M[k];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!S&&this.$undoSelect&&(M.selectionAfter?this.selection.fromJSON(M.selectionAfter):this.selection.setRange(this.$getUndoSelection(M,!1))),this.$fromUndo=!1}},D.prototype.setUndoSelect=function(M){this.$undoSelect=M},D.prototype.$getUndoSelection=function(M,S){function k(J){return S?J.action!=="insert":J.action==="insert"}for(var N,j,U=0;U<M.length;U++){var G=M[U];if(G.start){if(!N){k(G)?N=u.fromPoints(G.start,G.end):N=u.fromPoints(G.start,G.start);continue}k(G)?(j=G.start,N.compare(j.row,j.column)==-1&&N.setStart(j),j=G.end,N.compare(j.row,j.column)==1&&N.setEnd(j)):(j=G.start,N.compare(j.row,j.column)==-1&&(N=u.fromPoints(G.start,G.start)))}}return N},D.prototype.replace=function(M,S){return this.doc.replace(M,S)},D.prototype.moveText=function(M,S,k){var N=this.getTextRange(M),j=this.getFoldsInRange(M),U=u.fromPoints(S,S);if(!k){this.remove(M);var G=M.start.row-M.end.row,J=G?-M.end.column:M.start.column-M.end.column;J&&(U.start.row==M.end.row&&U.start.column>M.end.column&&(U.start.column+=J),U.end.row==M.end.row&&U.end.column>M.end.column&&(U.end.column+=J)),G&&U.start.row>=M.end.row&&(U.start.row+=G,U.end.row+=G)}if(U.end=this.insert(U.start,N),j.length){var Q=M.start,le=U.start,G=le.row-Q.row,J=le.column-Q.column;this.addFolds(j.map(function(pe){return pe=pe.clone(),pe.start.row==Q.row&&(pe.start.column+=J),pe.end.row==Q.row&&(pe.end.column+=J),pe.start.row+=G,pe.end.row+=G,pe}))}return U},D.prototype.indentRows=function(M,S,k){k=k.replace(/\t/g,this.getTabString());for(var N=M;N<=S;N++)this.doc.insertInLine({row:N,column:0},k)},D.prototype.outdentRows=function(M){for(var S=M.collapseRows(),k=new u(0,0,0,0),N=this.getTabSize(),j=S.start.row;j<=S.end.row;++j){var U=this.getLine(j);k.start.row=j,k.end.row=j;for(var G=0;G<N&&U.charAt(G)==" ";++G);G<N&&U.charAt(G)==" "?(k.start.column=G,k.end.column=G+1):(k.start.column=0,k.end.column=G),this.remove(k)}},D.prototype.$moveLines=function(M,S,k){if(M=this.getRowFoldStart(M),S=this.getRowFoldEnd(S),k<0){var N=this.getRowFoldStart(M+k);if(N<0)return 0;var j=N-M}else if(k>0){var N=this.getRowFoldEnd(S+k);if(N>this.doc.getLength()-1)return 0;var j=N-S}else{M=this.$clipRowToDocument(M),S=this.$clipRowToDocument(S);var j=S-M+1}var U=new u(M,0,S,Number.MAX_VALUE),G=this.getFoldsInRange(U).map(function(Q){return Q=Q.clone(),Q.start.row+=j,Q.end.row+=j,Q}),J=k==0?this.doc.getLines(M,S):this.doc.removeFullLines(M,S);return this.doc.insertFullLines(M+j,J),G.length&&this.addFolds(G),j},D.prototype.moveLinesUp=function(M,S){return this.$moveLines(M,S,-1)},D.prototype.moveLinesDown=function(M,S){return this.$moveLines(M,S,1)},D.prototype.duplicateLines=function(M,S){return this.$moveLines(M,S,0)},D.prototype.$clipRowToDocument=function(M){return Math.max(0,Math.min(M,this.doc.getLength()-1))},D.prototype.$clipColumnToRow=function(M,S){return S<0?0:Math.min(this.doc.getLine(M).length,S)},D.prototype.$clipPositionToDocument=function(M,S){if(S=Math.max(0,S),M<0)M=0,S=0;else{var k=this.doc.getLength();M>=k?(M=k-1,S=this.doc.getLine(k-1).length):S=Math.min(this.doc.getLine(M).length,S)}return{row:M,column:S}},D.prototype.$clipRangeToDocument=function(M){M.start.row<0?(M.start.row=0,M.start.column=0):M.start.column=this.$clipColumnToRow(M.start.row,M.start.column);var S=this.doc.getLength()-1;return M.end.row>S?(M.end.row=S,M.end.column=this.doc.getLine(S).length):M.end.column=this.$clipColumnToRow(M.end.row,M.end.column),M},D.prototype.setUseWrapMode=function(M){if(M!=this.$useWrapMode){if(this.$useWrapMode=M,this.$modified=!0,this.$resetRowCache(0),M){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},D.prototype.getUseWrapMode=function(){return this.$useWrapMode},D.prototype.setWrapLimitRange=function(M,S){(this.$wrapLimitRange.min!==M||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:M,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},D.prototype.adjustWrapLimit=function(M,S){var k=this.$wrapLimitRange;k.max<0&&(k={min:S,max:S});var N=this.$constrainWrapLimit(M,k.min,k.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},D.prototype.$constrainWrapLimit=function(M,S,k){return S&&(M=Math.max(S,M)),k&&(M=Math.min(k,M)),M},D.prototype.getWrapLimit=function(){return this.$wrapLimit},D.prototype.setWrapLimit=function(M){this.setWrapLimitRange(M,M)},D.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},D.prototype.$updateInternalDataOnChange=function(M){var S=this.$useWrapMode,k=M.action,N=M.start,j=M.end,U=N.row,G=j.row,J=G-U,Q=null;if(this.$updating=!0,J!=0)if(k==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(U,J);var le=this.$foldData;Q=this.getFoldsInRange(M),this.removeFolds(Q);var ie=this.getFoldLine(j.row),ue=0;if(ie){ie.addRemoveChars(j.row,j.column,N.column-j.column),ie.shiftRow(-J);var pe=this.getFoldLine(U);pe&&pe!==ie&&(pe.merge(ie),ie=pe),ue=le.indexOf(ie)+1}for(ue;ue<le.length;ue++){var ie=le[ue];ie.start.row>=j.row&&ie.shiftRow(-J)}G=U}else{var oe=Array(J);oe.unshift(U,0);var re=S?this.$wrapData:this.$rowLengthCache;re.splice.apply(re,oe);var le=this.$foldData,ie=this.getFoldLine(U),ue=0;if(ie){var Ce=ie.range.compareInside(N.row,N.column);Ce==0?(ie=ie.split(N.row,N.column),ie&&(ie.shiftRow(J),ie.addRemoveChars(G,0,j.column-N.column))):Ce==-1&&(ie.addRemoveChars(U,0,j.column-N.column),ie.shiftRow(J)),ue=le.indexOf(ie)+1}for(ue;ue<le.length;ue++){var ie=le[ue];ie.start.row>=U&&ie.shiftRow(J)}}else{J=Math.abs(M.start.column-M.end.column),k==="remove"&&(Q=this.getFoldsInRange(M),this.removeFolds(Q),J=-J);var ie=this.getFoldLine(U);ie&&ie.addRemoveChars(U,N.column,J)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(U,G):this.$updateRowLengthCache(U,G),Q},D.prototype.$updateRowLengthCache=function(M,S){this.$rowLengthCache[M]=null,this.$rowLengthCache[S]=null},D.prototype.$updateWrapData=function(M,S){var k=this.doc.getAllLines(),N=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,G,J,Q=M;for(S=Math.min(S,k.length-1);Q<=S;)J=this.getFoldLine(Q,J),J?(G=[],J.walk((function(le,ie,ue,pe){var oe;if(le!=null){oe=this.$getDisplayTokens(le,G.length),oe[0]=_;for(var re=1;re<oe.length;re++)oe[re]=C}else oe=this.$getDisplayTokens(k[ie].substring(pe,ue),G.length);G=G.concat(oe)}).bind(this),J.end.row,k[J.end.row].length+1),j[J.start.row]=this.$computeWrapSplits(G,U,N),Q=J.end.row+1):(G=this.$getDisplayTokens(k[Q]),j[Q]=this.$computeWrapSplits(G,U,N),Q++)},D.prototype.$computeWrapSplits=function(M,S,k){if(M.length==0)return[];var N=[],j=M.length,U=0,G=0,J=this.$wrapAsCode,Q=this.$indentedSoftWrap,le=S<=Math.max(2*k,8)||Q===!1?0:Math.floor(S/2);function ie(){var Ce=0;if(le===0)return Ce;if(Q)for(var ke=0;ke<M.length;ke++){var Ee=M[ke];if(Ee==P)Ce+=1;else if(Ee==L)Ce+=k;else{if(Ee==T)continue;break}}return J&&Q!==!1&&(Ce+=k),Math.min(Ce,le)}function ue(Ce){for(var ke=Ce-U,Ee=U;Ee<Ce;Ee++){var Ve=M[Ee];(Ve===12||Ve===2)&&(ke-=1)}N.length||(pe=ie(),N.indent=pe),G+=ke,N.push(G),U=Ce}for(var pe=0;j-U>S-pe;){var oe=U+S-pe;if(M[oe-1]>=P&&M[oe]>=P){ue(oe);continue}if(M[oe]==_||M[oe]==C){for(oe;oe!=U-1&&M[oe]!=_;oe--);if(oe>U){ue(oe);continue}for(oe=U+S,oe;oe<M.length&&M[oe]==C;oe++);if(oe==M.length)break;ue(oe);continue}for(var re=Math.max(oe-(S-(S>>2)),U-1);oe>re&&M[oe]<_;)oe--;if(J){for(;oe>re&&M[oe]<_;)oe--;for(;oe>re&&M[oe]==O;)oe--}else for(;oe>re&&M[oe]<P;)oe--;if(oe>re){ue(++oe);continue}oe=U+S,M[oe]==$&&oe--,ue(oe-pe)}return N},D.prototype.$getDisplayTokens=function(M,S){var k=[],N;S=S||0;for(var j=0;j<M.length;j++){var U=M.charCodeAt(j);if(U==9){N=this.getScreenTabSize(k.length+S),k.push(L);for(var G=1;G<N;G++)k.push(T)}else U==32?k.push(P):U>39&&U<48||U>57&&U<64?k.push(O):U>=4352&&F(U)?k.push(I,$):k.push(I)}return k},D.prototype.$getStringScreenWidth=function(M,S,k){if(S==0)return[0,0];S==null&&(S=1/0),k=k||0;var N,j;for(j=0;j<M.length&&(N=M.charCodeAt(j),N==9?k+=this.getScreenTabSize(k):N>=4352&&F(N)?k+=2:k+=1,!(k>S));j++);return[k,j]},D.prototype.getRowLength=function(M){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[M]&&this.lineWidgets[M].rowCount||0),!this.$useWrapMode||!this.$wrapData[M]?S:this.$wrapData[M].length+S},D.prototype.getRowLineCount=function(M){return!this.$useWrapMode||!this.$wrapData[M]?1:this.$wrapData[M].length+1},D.prototype.getRowWrapIndent=function(M){if(this.$useWrapMode){var S=this.screenToDocumentPosition(M,Number.MAX_VALUE),k=this.$wrapData[S.row];return k.length&&k[0]<S.column?k.indent:0}else return 0},D.prototype.getScreenLastRowColumn=function(M){var S=this.screenToDocumentPosition(M,Number.MAX_VALUE);return this.documentToScreenColumn(S.row,S.column)},D.prototype.getDocumentLastRowColumn=function(M,S){var k=this.documentToScreenRow(M,S);return this.getScreenLastRowColumn(k)},D.prototype.getDocumentLastRowColumnPosition=function(M,S){var k=this.documentToScreenRow(M,S);return this.screenToDocumentPosition(k,Number.MAX_VALUE/10)},D.prototype.getRowSplitData=function(M){if(this.$useWrapMode)return this.$wrapData[M]},D.prototype.getScreenTabSize=function(M){return this.$tabSize-(M%this.$tabSize|0)},D.prototype.screenToDocumentRow=function(M,S){return this.screenToDocumentPosition(M,S).row},D.prototype.screenToDocumentColumn=function(M,S){return this.screenToDocumentPosition(M,S).column},D.prototype.screenToDocumentPosition=function(M,S,k){if(M<0)return{row:0,column:0};var N,ue=0,j=0,U,ie=0,G=0,J=this.$screenRowCache,Q=this.$getRowCacheIndex(J,M),le=J.length;if(le&&Q>=0)var ie=J[Q],ue=this.$docRowCache[Q],pe=M>J[le-1];else var pe=!le;for(var oe=this.getLength()-1,re=this.getNextFoldLine(ue),Ce=re?re.start.row:1/0;ie<=M&&(G=this.getRowLength(ue),!(ie+G>M||ue>=oe));)ie+=G,ue++,ue>Ce&&(ue=re.end.row+1,re=this.getNextFoldLine(ue,re),Ce=re?re.start.row:1/0),pe&&(this.$docRowCache.push(ue),this.$screenRowCache.push(ie));if(re&&re.start.row<=ue)N=this.getFoldDisplayLine(re),ue=re.start.row;else{if(ie+G<=M||ue>oe)return{row:oe,column:this.getLine(oe).length};N=this.getLine(ue),re=null}var ke=0,Ee=Math.floor(M-ie);if(this.$useWrapMode){var Ve=this.$wrapData[ue];Ve&&(U=Ve[Ee],Ee>0&&Ve.length&&(ke=Ve.indent,j=Ve[Ee-1]||Ve[Ve.length-1],N=N.substring(j)))}return k!==void 0&&this.$bidiHandler.isBidiRow(ie+Ee,ue,Ee)&&(S=this.$bidiHandler.offsetToCol(k)),j+=this.$getStringScreenWidth(N,S-ke)[1],this.$useWrapMode&&j>=U&&(j=U-1),re?re.idxToPosition(j):{row:ue,column:j}},D.prototype.documentToScreenPosition=function(M,S){if(typeof S>"u")var k=this.$clipPositionToDocument(M.row,M.column);else k=this.$clipPositionToDocument(M,S);M=k.row,S=k.column;var ie=0,N=null,j=null;j=this.getFoldAt(M,S,1),j&&(M=j.start.row,S=j.start.column);var U,le=0,G=this.$docRowCache,J=this.$getRowCacheIndex(G,M),Q=G.length;if(Q&&J>=0)var le=G[J],ie=this.$screenRowCache[J],ue=M>G[Q-1];else var ue=!Q;for(var pe=this.getNextFoldLine(le),oe=pe?pe.start.row:1/0;le<M;){if(le>=oe){if(U=pe.end.row+1,U>M)break;pe=this.getNextFoldLine(U,pe),oe=pe?pe.start.row:1/0}else U=le+1;ie+=this.getRowLength(le),le=U,ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ie))}var re="";pe&&le>=oe?(re=this.getFoldDisplayLine(pe,M,S),N=pe.start.row):(re=this.getLine(M).substring(0,S),N=M);var Ce=0;if(this.$useWrapMode){var ke=this.$wrapData[N];if(ke){for(var Ee=0;re.length>=ke[Ee];)ie++,Ee++;re=re.substring(ke[Ee-1]||0,re.length),Ce=Ee>0?ke.indent:0}}return this.lineWidgets&&this.lineWidgets[le]&&this.lineWidgets[le].rowsAbove&&(ie+=this.lineWidgets[le].rowsAbove),{row:ie,column:Ce+this.$getStringScreenWidth(re)[0]}},D.prototype.documentToScreenColumn=function(M,S){return this.documentToScreenPosition(M,S).column},D.prototype.documentToScreenRow=function(M,S){return this.documentToScreenPosition(M,S).row},D.prototype.getScreenLength=function(){var M=0,S=null;if(this.$useWrapMode)for(var k=this.$wrapData.length,N=0,j=0,S=this.$foldData[j++],U=S?S.start.row:1/0;N<k;){var G=this.$wrapData[N];M+=G?G.length+1:1,N++,N>U&&(N=S.end.row+1,S=this.$foldData[j++],U=S?S.start.row:1/0)}else{M=this.getLength();for(var J=this.$foldData,j=0;j<J.length;j++)S=J[j],M-=S.end.row-S.start.row}return this.lineWidgets&&(M+=this.$getWidgetScreenLength()),M},D.prototype.$setFontMetrics=function(M){this.$enableVarChar&&(this.$getStringScreenWidth=function(S,k,N){if(k===0)return[0,0];k||(k=1/0),N=N||0;var j,U;for(U=0;U<S.length&&(j=S.charAt(U),j===" "?N+=this.getScreenTabSize(N):N+=M.getCharacterWidth(j),!(N>k));U++);return[N,U]})},D.prototype.getPrecedingCharacter=function(){var M=this.selection.getCursor();if(M.column===0)return M.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(M.row);return S[M.column-1]},D.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()},D})();x.$uid=0,x.prototype.$modes=l.$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=F,d.implement(x.prototype,f);var I=1,$=2,_=3,C=4,O=9,P=10,L=11,T=12;function F(D){return D<4352?!1:D>=4352&&D<=4447||D>=4515&&D<=4519||D>=4602&&D<=4607||D>=9001&&D<=9002||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12283||D>=12288&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12589||D>=12593&&D<=12686||D>=12688&&D<=12730||D>=12736&&D<=12771||D>=12784&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=13054||D>=13056&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=55216&&D<=55238||D>=55243&&D<=55291||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=65281&&D<=65376||D>=65504&&D<=65510}t("./edit_session/folding").Folding.call(x.prototype),t("./edit_session/bracket_match").BracketMatch.call(x.prototype),l.defineOptions(x.prototype,"session",{wrap:{set:function(D){if(!D||D=="off"?D=!1:D=="free"?D=!0:D=="printMargin"?D=-1:typeof D=="string"&&(D=parseInt(D,10)||!1),this.$wrap!=D)if(this.$wrap=D,!D)this.setUseWrapMode(!1);else{var M=typeof D=="number"?D:null;this.setWrapLimitRange(M,M),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(D){D=D=="auto"?this.$mode.type!="text":D!="text",D!=this.$wrapAsCode&&(this.$wrapAsCode=D,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(D){this.$useWorker=D,this.$stopWorker(),D&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(D){D=parseInt(D),D>0&&this.$tabSize!==D&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=D,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(D){this.setFoldStyle(D)},handlesSet:!0},overwrite:{set:function(D){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(D){this.doc.setNewLineMode(D)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(D){this.setMode(D)},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(t,r,h){var d=t("./lib/lang"),g=t("./lib/oop"),v=t("./range").Range,l=(function(){function u(){this.$options={}}return u.prototype.set=function(p){return g.mixin(this.$options,p),this},u.prototype.getOptions=function(){return d.copyObject(this.$options)},u.prototype.setOptions=function(p){this.$options=p},u.prototype.find=function(p){var i=this.$options,c=this.$matchIterator(p,i);if(!c)return!1;var m=null;return c.forEach(function(b,x,I,$){return m=new v(b,x,I,$),x==$&&i.start&&i.start.start&&i.skipCurrent!=!1&&m.isEqual(i.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(p){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var c=i.range,m=c?p.getLines(c.start.row,c.end.row):p.doc.getAllLines(),b=[],x=i.re;if(i.$isMultiLine){var I=x.length,$=m.length-I,_;e:for(var C=x.offset||0;C<=$;C++){for(var O=0;O<I;O++)if(m[C+O].search(x[O])==-1)continue e;var P=m[C],L=m[C+I-1],T=P.length-P.match(x[0])[0].length,F=L.match(x[I-1])[0].length;_&&_.end.row===C&&_.end.column>T||(b.push(_=new v(C,T,C+I-1,F)),I>2&&(C=C+I-2))}}else for(var D,M=0;M<m.length;M++)if(this.$isMultilineSearch(i)){var S=m.length-1;if(D=this.$multiLineForward(p,x,M,S),D){var k=D.endRow<=S?D.endRow-1:S;k>M&&(M=k),b.push(new v(D.startRow,D.startCol,D.endRow,D.endCol))}}else{D=d.getMatchOffsets(m[M],x);for(var O=0;O<D.length;O++){var N=D[O];b.push(new v(M,N.offset,M,N.offset+N.length))}}if(c){for(var j=c.start.column,U=c.end.column,M=0,O=b.length-1;M<O&&b[M].start.column<j&&b[M].start.row==0;)M++;for(var G=c.end.row-c.start.row;M<O&&b[O].end.column>U&&b[O].end.row==G;)O--;for(b=b.slice(M,O+1),M=0,O=b.length;M<O;M++)b[M].start.row+=c.start.row,b[M].end.row+=c.start.row}return b},u.prototype.parseReplaceString=function(p){for(var i={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",m=0,b=p.length;m<b;m++){var x=p.charCodeAt(m);if(x===i.Backslash){if(m++,m>=b){c+="\\";break}var I=p.charCodeAt(m);switch(I){case i.Backslash:c+="\\";break;case i.n:c+=`
193
+ `;break;case i.t:c+=" ";break}continue}if(x===i.DollarSign){if(m++,m>=b){c+="$";break}var $=p.charCodeAt(m);if($===i.DollarSign){c+="$$";continue}if($===i.Digit0||$===i.Ampersand){c+="$&";continue}if(i.Digit1<=$&&$<=i.Digit9){c+="$"+p[m];continue}}c+=p[m]}return c||p},u.prototype.replace=function(p,i){var c=this.$options,m=this.$assembleRegExp(c);if(c.$isMultiLine)return i;if(m){var b=this.$isMultilineSearch(c);b&&(p=p.replace(/\r\n|\r|\n/g,`
194
+ `));var x=m.exec(p);if(!x||!b&&x[0].length!=p.length)return null;if(i=c.regExp?this.parseReplaceString(i):i.replace(/\$/g,"$$$$"),i=p.replace(m,i),c.preserveCase){i=i.split("");for(var I=Math.min(p.length,p.length);I--;){var $=p[I];$&&$.toLowerCase()!=$?i[I]=i[I].toUpperCase():i[I]=i[I].toLowerCase()}i=i.join("")}return i}},u.prototype.$assembleRegExp=function(p,i){if(p.needle instanceof RegExp)return p.re=p.needle;var c=p.needle;if(!p.needle)return p.re=!1;p.regExp||(c=d.escapeRegExp(c));var m=p.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),p.$supportsUnicodeFlag=!0,m+="u"}catch{p.$supportsUnicodeFlag=!1}if(p.wholeWord&&(c=f(c,p)),p.$isMultiLine=!i&&/[\n\r]/.test(c),p.$isMultiLine)return p.re=this.$assembleMultilineRegExp(c,m);try{var b=new RegExp(c,m)}catch{b=!1}return p.re=b},u.prototype.$assembleMultilineRegExp=function(p,i){for(var c=p.replace(/\r\n|\r|\n/g,`$
195
+ ^`).split(`
196
+ `),m=[],b=0;b<c.length;b++)try{m.push(new RegExp(c[b],i))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(p){return p.re&&/\\r\\n|\\r|\\n/.test(p.re.source)&&p.regExp&&!p.$isMultiLine},u.prototype.$multiLineForward=function(p,i,c,m){for(var b,x=a(p,c),I=c;I<=m;){for(var $=0;$<x&&!(I>m);$++){var _=p.getLine(I++);b=b==null?_:b+`
197
+ `+_}var C=i.exec(b);if(i.lastIndex=0,C){var O=b.slice(0,C.index).split(`
198
+ `),P=C[0].split(`
199
+ `),L=c+O.length-1,T=O[O.length-1].length,F=L+P.length-1,D=P.length==1?T+P[0].length:P[P.length-1].length;return{startRow:L,startCol:T,endRow:F,endCol:D}}}return null},u.prototype.$multiLineBackward=function(p,i,c,m,b){for(var x,I=a(p,m),$=p.getLine(m).length-c,_=m;_>=b;){for(var C=0;C<I&&_>=b;C++){var O=p.getLine(_--);x=x==null?O:O+`
200
+ `+x}var P=s(x,i,$);if(P){var L=x.slice(0,P.index).split(`
201
+ `),T=P[0].split(`
202
+ `),F=_+L.length,D=L[L.length-1].length,M=F+T.length-1,S=T.length==1?D+T[0].length:T[T.length-1].length;return{startRow:F,startCol:D,endRow:M,endCol:S}}}return null},u.prototype.$matchIterator=function(p,i){var c=this.$assembleRegExp(i);if(!c)return!1;var m=this.$isMultilineSearch(i),b=this.$multiLineForward,x=this.$multiLineBackward,I=i.backwards==!0,$=i.skipCurrent!=!1,_=c.unicode,C=i.range,O=i.start;O||(O=C?C[I?"end":"start"]:p.selection.getRange()),O.start&&(O=O[$!=I?"end":"start"]);var P=C?C.start.row:0,L=C?C.end.row:p.getLength()-1;if(I)var T=function(M){var S=O.row;if(!D(S,O.column,M)){for(S--;S>=P;S--)if(D(S,Number.MAX_VALUE,M))return;if(i.wrap!=!1){for(S=L,P=O.row;S>=P;S--)if(D(S,Number.MAX_VALUE,M))return}}};else var T=function(M){var S=O.row;if(!D(S,O.column,M)){for(S=S+1;S<=L;S++)if(D(S,0,M))return;if(i.wrap!=!1){for(S=P,L=O.row;S<=L;S++)if(D(S,0,M))return}}};if(i.$isMultiLine)var F=c.length,D=function(M,S,k){var N=I?M-F+1:M;if(!(N<0||N+F>p.getLength())){var j=p.getLine(N),U=j.search(c[0]);if(!(!I&&U<S||U===-1)){for(var G=1;G<F;G++)if(j=p.getLine(N+G),j.search(c[G])==-1)return;var J=j.match(c[F-1])[0].length;if(!(I&&J>S)&&k(N,U,N+F-1,J))return!0}}};else if(I)var D=function(M,S,k){if(m){var N=x(p,c,S,M,P);if(!N)return!1;if(k(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var j=p.getLine(M),U=[],G,J=0;for(c.lastIndex=0;G=c.exec(j);){var Q=G[0].length;if(J=G.index,!Q){if(J>=j.length)break;c.lastIndex=J+=d.skipEmptyMatch(j,J,_)}if(G.index+Q>S)break;U.push(G.index,Q)}for(var le=U.length-1;le>=0;le-=2){var ie=U[le-1],Q=U[le];if(k(M,ie,M,ie+Q))return!0}}};else var D=function(M,S,k){if(c.lastIndex=S,m){var N=b(p,c,M,L);if(N){var j=N.endRow<=L?N.endRow-1:L;j>M&&(M=j)}if(!N)return!1;if(k(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=p.getLine(M),G,J;J=c.exec(U);){var Q=J[0].length;if(G=J.index,k(M,G,M,G+Q))return!0;if(!Q&&(c.lastIndex=G+=d.skipEmptyMatch(U,G,_),G>=U.length))return!1}};return{forEach:T}},u})();function f(u,p){var i=d.supportsLookbehind();function c(I,$){$===void 0&&($=!0);var _=i&&p.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(I)||p.regExp?i&&p.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),b=m[0],x=m[m.length-1];return c(b)+u+c(x,!1)}function s(u,p,i){for(var c=null,m=0;m<=u.length;){p.lastIndex=m;var b=p.exec(u);if(!b)break;var x=b.index+b[0].length;if(x>u.length-i)break;(!c||x>c.index+c[0].length)&&(c=b),m=b.index+1}return c}function a(u,p){var i=5e3,c={row:p,column:0},m=u.doc.positionToIndex(c),b=m+i,x=u.doc.indexToPosition(b),I=x.row;return I+1}r.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,h){var d=this&&this.__extends||(function(){var u=function(p,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(c[b]=m[b])},u(p,i)};return function(p,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(p,i);function c(){this.constructor=p}p.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}})(),g=t("../lib/keys"),v=t("../lib/useragent"),l=g.KEY_MODS,f=(function(){function u(p,i){this.$init(p,i,!1)}return u.prototype.$init=function(p,i,c){this.platform=i||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=c},u.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},u.prototype.removeCommand=function(p,i){var c=p&&(typeof p=="string"?p:p.name);p=this.commands[c],i||delete this.commands[c];var m=this.commandKeyBinding;for(var b in m){var x=m[b];if(x==p)delete m[b];else if(Array.isArray(x)){var I=x.indexOf(p);I!=-1&&(x.splice(I,1),x.length==1&&(m[b]=x[0]))}}},u.prototype.bindKey=function(p,i,c){if(typeof p=="object"&&p&&(c==null&&(c=p.position),p=p[this.platform]),!!p){if(typeof i=="function")return this.addCommand({exec:i,bindKey:p,name:i.name||p});p.split("|").forEach(function(m){var b="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),O=l[C.hashId]+C.key;b+=(b?" ":"")+O,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var I=this.parseKeys(m),$=l[I.hashId]+I.key;this._addCommandToBinding(b+$,i,c)},this)}},u.prototype._addCommandToBinding=function(p,i,c){var m=this.commandKeyBinding,b;if(!i)delete m[p];else if(!m[p]||this.$singleCommand)m[p]=i;else{Array.isArray(m[p])?(b=m[p].indexOf(i))!=-1&&m[p].splice(b,1):m[p]=[m[p]],typeof c!="number"&&(c=s(i));var x=m[p];for(b=0;b<x.length;b++){var I=x[b],$=s(I);if($>c)break}x.splice(b,0,i)}},u.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(i){var c=p[i];if(c){if(typeof c=="string")return this.bindKey(c,i);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=i),this.addCommand(c))}},this)},u.prototype.removeCommands=function(p){Object.keys(p).forEach(function(i){this.removeCommand(p[i])},this)},u.prototype.bindKeys=function(p){Object.keys(p).forEach(function(i){this.bindKey(i,p[i])},this)},u.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},u.prototype.parseKeys=function(p){var i=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),c=i.pop(),m=g[c];if(g.FUNCTION_KEYS[m])c=g.FUNCTION_KEYS[m].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var b=0,x=i.length;x--;){var I=g.KEY_MODS[i[x]];if(I==null)return typeof console<"u"&&console.error("invalid modifier "+i[x]+" in "+p),!1;b|=I}return{key:c,hashId:b}},u.prototype.findKeyCommand=function(p,i){var c=l[p]+i;return this.commandKeyBinding[c]},u.prototype.handleKeyboard=function(p,i,c,m){if(!(m<0)){var b=l[i]+c,x=this.commandKeyBinding[b];return p.$keyChain&&(p.$keyChain+=" "+b,x=this.commandKeyBinding[p.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||b,{command:"null"}):(p.$keyChain&&((!i||i==4)&&c.length==1?p.$keyChain=p.$keyChain.slice(0,-b.length-1):(i==-1||m>0)&&(p.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(p,i){return i.$keyChain||""},u})();function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){d(p,u);function p(i,c){var m=u.call(this,i,c)||this;return m.$singleCommand=!0,m}return p})(f);a.call=function(u,p,i){f.prototype.$init.call(u,p,i,!0)},f.call=function(u,p,i){f.prototype.$init.call(u,p,i,!1)},r.HashHandler=a,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,r,h){var d=this&&this.__extends||(function(){var s=function(a,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(p[c]=i[c])},s(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(a,u);function p(){this.constructor=a}a.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)}})(),g=t("../lib/oop"),v=t("../keyboard/hash_handler").MultiHashHandler,l=t("../lib/event_emitter").EventEmitter,f=(function(s){d(a,s);function a(u,p){var i=s.call(this,p,u)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),i}return a.prototype.exec=function(u,p,i){if(Array.isArray(u)){for(var c=u.length;c--;)if(this.exec(u[c],p,i))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:p,command:u,args:i};return this.canExecute(u,p)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(u,p){return typeof u=="string"&&(u=this.commands[u]),!(!u||p&&p.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(p))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(p){this.macro.push([p.command,p.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,u):this.exec(p[0],u,p[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},a})(v);g.implement(f.prototype,l),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,r,h){var d=t("../lib/lang"),g=t("../config"),v=t("../range").Range;function l(s,a){return{win:s,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(s){g.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(s){g.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(s){g.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(s,a){typeof a=="number"&&!isNaN(a)&&s.gotoLine(a),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(s){g.loadModule("ace/ext/searchbox",function(a){a.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(s,a){s.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(s,a){s.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(s,a){s.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(s,a){s.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var a=s.$copyWithEmptySelection&&s.selection.isEmpty(),u=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",u),u.isEmpty()||s.session.remove(u),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,a){s.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(s){g.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(s){var a=s.selection.getRange();a.start.column=0,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(s){var a=s.selection.getRange();a.end.column=Number.MAX_VALUE,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,a){s.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,a){s.insert(d.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var a=s.selection.getRange();a.start.column=a.end.column=0,a.end.row++,s.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(s){for(var a=s.selection.isBackwards(),u=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),p=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),i=s.session.doc.getLine(u.row).length,c=s.session.doc.getTextRange(s.selection.getRange()),m=c.replace(/\n\s*/," ").length,b=s.session.doc.getLine(u.row),x=u.row+1;x<=p.row+1;x++){var I=d.stringTrimLeft(d.stringTrimRight(s.session.doc.getLine(x)));I.length!==0&&(I=" "+I),b+=I}p.row+1<s.session.doc.getLength()-1&&(b+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new v(u.row,0,p.row+2,0),b),m>0?(s.selection.moveCursorTo(u.row,u.column),s.selection.selectTo(u.row,u.column+m)):(i=s.session.doc.getLine(u.row).length>i?i+1:i,s.selection.moveCursorTo(u.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(s){var a=s.session.doc.getLength()-1,u=s.session.doc.getLine(a).length,p=s.selection.rangeList.ranges,i=[];p.length<1&&(p=[s.selection.getRange()]);for(var c=0;c<p.length;c++)c==p.length-1&&(p[c].end.row===a&&p[c].end.column===u||i.push(new v(p[c].end.row,p[c].end.column,a,u))),c===0?p[c].start.row===0&&p[c].start.column===0||i.push(new v(0,0,p[c].start.row,p[c].start.column)):i.push(new v(p[c-1].end.row,p[c-1].end.column,p[c].start.row,p[c].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var c=0;c<i.length;c++)s.selection.addRange(i[c],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
203
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var a=s.getCursorPosition();s.selection.moveTo(a.row-1,Number.MAX_VALUE),s.insert(`
204
+ `),a.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:l("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:l(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(t,r,h){var d=t("../lib/keys"),g=(function(){function l(f){this.editor=f,this.gutterLayer=f.renderer.$gutterLayer,this.element=f.renderer.$gutter,this.lines=f.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return l.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))},l.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))},l.prototype.$onGutterKeyDown=function(f){if(this.annotationTooltip.isOpen){f.preventDefault(),f.keyCode===d.escape&&this.annotationTooltip.hide();return}if(f.target===this.element){if(f.keyCode!=d.enter)return;f.preventDefault();var s=this.editor.getCursorPosition().row;this.editor.isRowVisible(s)||this.editor.scrollToLine(s,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(a),p=this.$findNearestAnnotation(a);if(!(u===null&&p===null)){var i=this.$findClosestNumber(u,p,a);if(i===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(f),setTimeout((function(){this.editor._signal("gutterkeydown",new v(f,this))}).bind(this),10)},l.prototype.$handleGutterKeyboardInteraction=function(f){if(f.keyCode===d.tab){f.preventDefault();return}if(f.keyCode===d.escape){f.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(f.keyCode===d.up){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(f.keyCode===d.down){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(f.keyCode===d.left){f.preventDefault(),this.$switchLane("annotation");return}if(f.keyCode===d.right){f.preventDefault(),this.$switchLane("fold");return}if(f.keyCode===d.enter||f.keyCode===d.space){switch(f.preventDefault(),this.activeLane){case"fold":var s=this.$rowIndexToRow(this.activeRowIndex),a=this.editor.session.$gutterCustomWidgets[s];if(a)a.callbacks&&a.callbacks.onClick&&a.callbacks.onClick(f,s);else if(this.gutterLayer.session.foldWidgets[s]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),f),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==s&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(s),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},l.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()},l.prototype.$isFoldWidgetVisible=function(f){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=this.$getFoldWidget(f).style.display!=="none";return s&&a},l.prototype.$isCustomWidgetVisible=function(f){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=!!this.$getCustomWidget(f);return s&&a},l.prototype.$isAnnotationVisible=function(f){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=this.$getAnnotation(f).style.display!=="none";return s&&a},l.prototype.$getFoldWidget=function(f){var s=this.lines.get(f),a=s.element;return a.childNodes[1]},l.prototype.$getCustomWidget=function(f){var s=this.lines.get(f),a=s.element;return a.childNodes[3]},l.prototype.$getAnnotation=function(f){var s=this.lines.get(f),a=s.element;return a.childNodes[2]},l.prototype.$findNearestFoldLaneWidget=function(f){if(this.$isCustomWidgetVisible(f)||this.$isFoldWidgetVisible(f))return f;for(var s=0;f-s>0||f+s<this.lines.getLength()-1;){if(s++,f-s>=0&&this.$isCustomWidgetVisible(f-s))return f-s;if(f+s<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(f+s))return f+s;if(f-s>=0&&this.$isFoldWidgetVisible(f-s))return f-s;if(f+s<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(f+s))return f+s}return null},l.prototype.$findNearestAnnotation=function(f){if(this.$isAnnotationVisible(f))return f;for(var s=0;f-s>0||f+s<this.lines.getLength()-1;){if(s++,f-s>=0&&this.$isAnnotationVisible(f-s))return f-s;if(f+s<=this.lines.getLength()-1&&this.$isAnnotationVisible(f+s))return f+s}return null},l.prototype.$focusFoldWidget=function(f){if(f!=null){var s=this.$getFoldWidget(f);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},l.prototype.$focusCustomWidget=function(f){if(f!=null){var s=this.$getCustomWidget(f);s&&(s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus())}},l.prototype.$focusAnnotation=function(f){if(f!=null){var s=this.$getAnnotation(f);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},l.prototype.$blurFoldWidget=function(f){var s=this.$getFoldWidget(f);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},l.prototype.$blurCustomWidget=function(f){var s=this.$getCustomWidget(f);s&&(s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur())},l.prototype.$blurAnnotation=function(f){var s=this.$getAnnotation(f);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},l.prototype.$moveFoldWidgetUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},l.prototype.$moveFoldWidgetDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},l.prototype.$moveAnnotationUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$moveAnnotationDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$findClosestNumber=function(f,s,a){return f===null?s:s===null||Math.abs(a-f)<=Math.abs(a-s)?f:s},l.prototype.$switchLane=function(f){switch(f){case"annotation":if(this.activeLane==="annotation")break;var s=this.$findNearestAnnotation(this.activeRowIndex);if(s==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(a===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$isCustomWidgetVisible(a)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},l.prototype.$rowIndexToRow=function(f){var s=this.lines.get(f);return s?s.row:null},l.prototype.$rowToRowIndex=function(f){for(var s=0;s<this.lines.getLength();s++){var a=this.lines.get(s);if(a.row==f)return s}return null},l})();r.GutterKeyboardHandler=g;var v=(function(){function l(f,s){this.gutterKeyboardHandler=s,this.domEvent=f}return l.prototype.getKey=function(){return d.keyCodeToString(this.domEvent.keyCode)},l.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},l.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},l.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},l})();r.GutterKeyboardEvent=v}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(t,r,h){var d=this&&this.__values||function(S){var k=typeof Symbol=="function"&&Symbol.iterator,N=k&&S[k],j=0;if(N)return N.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&j>=S.length&&(S=void 0),{value:S&&S[j++],done:!S}}};throw new TypeError(k?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),v=t("./lib/dom"),l=t("./lib/lang"),f=t("./lib/useragent"),s=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,u=t("./mouse/fold_handler").FoldHandler,p=t("./keyboard/keybinding").KeyBinding,i=t("./edit_session").EditSession,c=t("./search").Search,m=t("./range").Range,b=t("./lib/event_emitter").EventEmitter,x=t("./commands/command_manager").CommandManager,I=t("./commands/default_commands").commands,$=t("./config"),_=t("./token_iterator").TokenIterator,C=t("./keyboard/gutter_handler").GutterKeyboardHandler,O=t("./config").nls,P=t("./clipboard"),L=t("./lib/keys"),T=t("./lib/event"),F=t("./tooltip").HoverTooltip,D=(function(){function S(k,N,j){this.id="editor"+ ++S.$uid,this.session,this.$toDestroy=[];var U=k.getContainerElement();this.container=U,this.renderer=k,this.commands=new x(f.isMac?"mac":"win",I),typeof document=="object"&&(this.textInput=new s(k.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new p(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.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||j&&j.session||new i("")),$.resetOptions(this),j&&this.setOptions(j),$._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(k){this.session.startOperation(k)},S.prototype.endOperation=function(k){this.session.endOperation(k)},S.prototype.onStartOperation=function(k){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,k||(this.previousCommand=null)},S.prototype.onEndOperation=function(k){if(this.curOp&&this.session){if(k&&k.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,j=N&&N.scrollIntoView;if(j){switch(j){case"center-animate":j="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}j=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(k){if(this.$mergeUndoDeltas){var N=this.prevOp,j=this.$mergeableCommands,U=N.command&&k.command.name==N.command.name;if(k.command.name=="insertstring"){var G=k.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&&j.indexOf(k.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(k.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(k,N){if(k&&typeof k=="string"&&k!="ace"){this.$keybindingId=k;var j=this;$.loadModule(["keybinding",k],function(U){j.$keybindingId==k&&j.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(k),N&&N()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(k){if(this.session!=k){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 j=this.session.getSelection();j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=k,k?(this.$onDocumentChange=this.onDocumentChange.bind(this),k.on("change",this.$onDocumentChange),this.renderer.setSession(k),this.$onChangeMode=this.onChangeMode.bind(this),k.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),k.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),k.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),k.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),k.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),k.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=k.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(k)),this._signal("changeSession",{session:k,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),k&&k._signal("changeEditor",{editor:this}),k&&(k.$editor=this),k&&!k.destroyed&&k.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(k,N){return this.session.doc.setValue(k),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),k},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(k){this.renderer.onResize(k)},S.prototype.setTheme=function(k,N){this.renderer.setTheme(k,N)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(k,N){this.renderer.setStyle(k,N)},S.prototype.unsetStyle=function(k){this.renderer.unsetStyle(k)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||v.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(k){this.setOption("fontSize",k)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var k=this;this.$highlightPending=!0,setTimeout(function(){k.$highlightPending=!1;var N=k.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(pe){N.removeMarker(pe)}),N.$bracketHighlight=null);var j=k.getCursorPosition(),U=k.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(k),J=N.getMatchingBracketRanges(j,G);if(!J){var Q=new _(N,j.row,j.column),le=Q.getCurrentToken();if(le&&/\b(?:tag-open|tag-name)/.test(le.type)){var ie=N.getMatchingTags(j);ie&&(J=[ie.openTagName.isEmpty()?ie.openTag:ie.openTagName,ie.closeTagName.isEmpty()?ie.closeTag:ie.closeTagName])}}if(!J&&N.$mode.getMatching&&(J=N.$mode.getMatching(k.session)),!J){k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide();return}var ue="ace_bracket";Array.isArray(J)?J.length==1&&(ue="ace_error_bracket"):J=[J],J.length==2&&(m.comparePoints(J[0].end,J[1].start)==0?J=[m.fromPoints(J[0].start,J[1].end)]:m.comparePoints(J[0].start,J[1].end)==0&&(J=[m.fromPoints(J[1].start,J[0].end)])),N.$bracketHighlight={ranges:J,markerIds:J.map(function(pe){return N.addMarker(pe,ue,"text")})},k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(k){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",k))},S.prototype.onBlur=function(k){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",k))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(k){var N=this.session.$useWrapMode,j=k.start.row==k.end.row?k.end.row:1/0;this.renderer.updateLines(k.start.row,j,N),this._signal("change",k),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(k){var N=k.data;this.renderer.updateLines(N.first,N.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var k=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)),k.$highlightLineMarker&&!N)k.removeMarker(k.$highlightLineMarker.id),k.$highlightLineMarker=null;else if(!k.$highlightLineMarker&&N){var j=new m(N.row,N.column,N.row,1/0);j.id=k.addMarker(j,"ace_active-line","screenLine"),k.$highlightLineMarker=j}else N&&(k.$highlightLineMarker.start.row=N.row,k.$highlightLineMarker.end.row=N.row,k.$highlightLineMarker.start.column=N.column,k._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(k){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(j,"ace_selection",U)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var k=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var j=N.start.column,U=N.end.column,G=k.getLine(N.start.row),J=G.substring(j,U);if(!(J.length>5e3||!/[\w\d]/.test(J))){var Q=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:J}),le=G.substring(j-1,U+1);if(Q.test(le))return Q}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(k){this.renderer.updateText(),this._emit("changeMode",k)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var k=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),j=!1;if(!k&&this.$copyWithEmptySelection){j=!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||(k+=this.session.getLine(J.start.row)+N)}}var Q={text:k};return this._signal("copy",Q),P.lineMode=j?Q.text:!1,Q.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(k,N){var j={text:k,event:N};this.commands.exec("paste",this,j)},S.prototype.$handlePaste=function(k){typeof k=="string"&&(k={text:k}),this._signal("paste",k);var N=k.text,j=N===P.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(j)this.selection.rangeList.ranges.forEach(function(ue){U.insert({row:ue.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),J=this.selection.rangeList.ranges,Q=G.length==2&&(!G[0]||!G[1]);if(G.length!=J.length||Q)return this.commands.exec("insertstring",this,N);for(var le=J.length;le--;){var ie=J[le];ie.isEmpty()||U.remove(ie),U.insert(ie.start,G[le])}}},S.prototype.execCommand=function(k,N){return this.commands.exec(k,this,N)},S.prototype.insert=function(k,N){var j=this.session,U=j.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var J=U.transformAction(j.getState(G.row),"insertion",this,j,k);J&&(k!==J.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),k=J.text)}if(k==" "&&(k=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&k.indexOf(`
205
+ `)==-1){var Q=m.fromPoints(G,G);Q.end.column+=k.length,this.session.remove(Q)}}else{var Q=this.getSelectionRange();G=this.session.remove(Q),this.clearSelection()}if(k==`
206
+ `||k==`\r
207
+ `){var pe=j.getLine(G.row);if(G.column>pe.search(/\S|$/)){var le=pe.substr(G.column).search(/\S|$/);j.doc.removeInLine(G.row,G.column,G.column+le)}}this.clearSelection();var ie=G.column,ue=j.getState(G.row),pe=j.getLine(G.row),oe=U.checkOutdent(ue,pe,k);if(j.insert(G,k),J&&J.selection&&(J.selection.length==2?this.selection.setSelectionRange(new m(G.row,ie+J.selection[0],G.row,ie+J.selection[1])):this.selection.setSelectionRange(new m(G.row+J.selection[0],J.selection[1],G.row+J.selection[2],J.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(k)){var re=U.getNextLineIndent(ue,pe.slice(0,G.column),j.getTabString());j.insert({row:G.row+1,column:0},re)}oe&&U.autoOutdent(ue,j,G.row)}},S.prototype.autoIndent=function(){for(var k=this.session,N=k.getMode(),j=this.selection.isEmpty()?[new m(0,0,k.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",J="",Q=k.getTabString(),le=0;le<j.length;le++)for(var ie=j[le].start.row,ue=j[le].end.row,pe=ie;pe<=ue;pe++){pe>0&&(U=k.getState(pe-1),G=k.getLine(pe-1),J=N.getNextLineIndent(U,G,Q));var oe=k.getLine(pe),re=N.$getIndent(oe);if(J!==re){if(re.length>0){var Ce=new m(pe,0,pe,re.length);k.remove(Ce)}J.length>0&&k.insert({row:pe,column:0},J)}N.autoOutdent(U,k,pe)}},S.prototype.onTextInput=function(k,N){if(!N)return this.keyBinding.onTextInput(k);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,k,N);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},S.prototype.applyComposition=function(k,N){if(N.extendLeft||N.extendRight){var j=this.selection.getRange();j.start.column-=N.extendLeft,j.end.column+=N.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!k&&!j.isEmpty()&&this.remove()}if((k||!this.selection.isEmpty())&&this.insert(k,!0),N.restoreStart||N.restoreEnd){var j=this.selection.getRange();j.start.column-=N.restoreStart,j.end.column-=N.restoreEnd,this.selection.setRange(j)}},S.prototype.onCommandKey=function(k,N,j){return this.keyBinding.onCommandKey(k,N,j)},S.prototype.setOverwrite=function(k){this.session.setOverwrite(k)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(k){this.setOption("scrollSpeed",k)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(k){this.setOption("dragDelay",k)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(k){this.setOption("selectionStyle",k)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(k){this.setOption("highlightActiveLine",k)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(k){this.setOption("highlightSelectedWord",k)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(k){this.renderer.setAnimatedScroll(k)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(k){this.renderer.setShowInvisibles(k)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(k){this.renderer.setDisplayIndentGuides(k)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(k){this.renderer.setHighlightIndentGuides(k)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(k){this.renderer.setShowPrintMargin(k)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(k){this.renderer.setPrintMarginColumn(k)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(k){this.setOption("readOnly",k)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(k){this.setOption("behavioursEnabled",k)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(k){this.setOption("wrapBehavioursEnabled",k)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(k){this.setOption("showFoldWidgets",k)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(k){this.selection.isEmpty()&&(k=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(N.start.row),G=j.getMode().transformAction(U,"deletion",this,j,N);if(N.end.column===0){var J=j.getTextRange(N);if(J[J.length-1]==`
208
+ `){var Q=j.getLine(N.end.row);/^\s+$/.test(Q)&&(N.end.column=Q.length)}}G&&(N=G)}this.session.remove(N),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var k=this.getSelectionRange();k.start.column==k.end.column&&k.start.row==k.end.row&&(k.end.column=0,k.end.row++),this.session.remove(k),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var k=this.getCursorPosition();this.insert(`
209
+ `),this.moveCursorToPosition(k)},S.prototype.setGhostText=function(k,N){this.renderer.setGhostText(k,N)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var k=this.getCursorPosition(),N=k.column;if(N!==0){var j=this.session.getLine(k.row),U,G;N<j.length?(U=j.charAt(N)+j.charAt(N-1),G=new m(k.row,N-1,k.row,N+1)):(U=j.charAt(N-1)+j.charAt(N-2),G=new m(k.row,N-2,k.row,N)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},S.prototype.toLowerCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),j=this.session.getTextRange(N);this.session.replace(N,j.toLowerCase()),this.selection.setSelectionRange(k)},S.prototype.toUpperCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),j=this.session.getTextRange(N);this.session.replace(N,j.toUpperCase()),this.selection.setSelectionRange(k)},S.prototype.indent=function(){var k=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var j=this.$getSelectedRows();k.indentRows(j.first,j.last," ");return}else if(N.start.column<N.end.column){var U=k.getTextRange(N);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();k.indentRows(j.first,j.last," ");return}}var G=k.getLine(N.start.row),J=N.start,Q=k.getTabSize(),le=k.documentToScreenColumn(J.row,J.column);if(this.session.getUseSoftTabs())var ie=Q-le%Q,ue=l.stringRepeat(" ",ie);else{for(var ie=le%Q;G[N.start.column-1]==" "&&ie;)N.start.column--,ie--;this.selection.setSelectionRange(N),ue=" "}return this.insert(ue)},S.prototype.blockIndent=function(){var k=this.$getSelectedRows();this.session.indentRows(k.first,k.last," ")},S.prototype.blockOutdent=function(){var k=this.session.getSelection();this.session.outdentRows(k.getRange())},S.prototype.sortLines=function(){for(var k=this.$getSelectedRows(),N=this.session,j=[],U=k.first;U<=k.last;U++)j.push(N.getLine(U));j.sort(function(Q,le){return Q.toLowerCase()<le.toLowerCase()?-1:Q.toLowerCase()>le.toLowerCase()?1:0});for(var G=new m(0,0,0,0),U=k.first;U<=k.last;U++){var J=N.getLine(U);G.start.row=U,G.end.row=U,G.end.column=J.length,N.replace(G,j[U-k.first])}},S.prototype.toggleCommentLines=function(){var k=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(k,this.session,N.first,N.last)},S.prototype.toggleBlockComment=function(){var k=this.getCursorPosition(),N=this.session.getState(k.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,j,k)},S.prototype.getNumberAt=function(k,N){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(k);j.lastIndex<N;){var G=j.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},S.prototype.modifyNumber=function(k){var N=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new m(N,j-1,N,j),G=this.session.getTextRange(U);if(!isNaN(parseFloat(G))&&isFinite(G)){var J=this.getNumberAt(N,j);if(J){var Q=J.value.indexOf(".")>=0?J.start+J.value.indexOf(".")+1:J.end,le=J.start+J.value.length-Q,ie=parseFloat(J.value);ie*=Math.pow(10,le),Q!==J.end&&j<Q?k*=Math.pow(10,J.end-j-1):k*=Math.pow(10,J.end-j),ie+=k,ie/=Math.pow(10,le);var ue=ie.toFixed(le),pe=new m(N,J.start,N,J.end);this.session.replace(pe,ue),this.moveCursorTo(N,Math.max(J.start+1,j+ue.length-J.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var k=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),U=this.selection.getWordRange().start.column,G=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),J=N-U-1;J<0&&(J=0);var Q=0,le=0,ie=this;j.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Me,ot){le=Q+Me.length,J>=Q&&J<=le&&(j=Me,ie.selection.clearSelection(),ie.moveCursorTo(k,Q+U),ie.selection.selectTo(k,le+U)),Q=le});for(var ue=this.$toggleWordPairs,pe,oe=0;oe<ue.length;oe++)for(var re=ue[oe],Ce=0;Ce<=1;Ce++){var ke=+!Ce,Ee=j.match(new RegExp("^\\s?_?("+l.escapeRegExp(re[Ce])+")\\s?$","i"));if(Ee){var Ve=j.match(new RegExp("([_]|^|\\s)("+l.escapeRegExp(Ee[1])+")($|\\s)","g"));Ve&&(pe=j.replace(new RegExp(l.escapeRegExp(re[Ce]),"i"),function(Me){var ot=re[ke];return Me.toUpperCase()==Me?ot=ot.toUpperCase():Me.charAt(0).toUpperCase()==Me.charAt(0)&&(ot=ot.substr(0,0)+re[ke].charAt(0).toUpperCase()+ot.substr(1)),ot}),this.insert(pe),pe="")}}},S.prototype.findLinkAt=function(k,N){var j,U,G=this.session.getLine(k),J=G.split(/((?:https?|ftp):\/\/[\S]+)/),Q=N;Q<0&&(Q=0);var le=0,ie=0,ue;try{for(var pe=d(J),oe=pe.next();!oe.done;oe=pe.next()){var re=oe.value;if(ie=le+re.length,Q>=le&&Q<=ie&&re.match(/((?:https?|ftp):\/\/[\S]+)/)){ue=re.replace(/[\s:.,'";}\]]+$/,"");break}le=ie}}catch(Ce){j={error:Ce}}finally{try{oe&&!oe.done&&(U=pe.return)&&U.call(pe)}finally{if(j)throw j.error}}return ue},S.prototype.openLink=function(){var k=this.selection.getCursor(),N=this.findLinkAt(k.row,k.column);return N&&window.open(N,"_blank"),N!=null},S.prototype.removeLines=function(){var k=this.$getSelectedRows();this.session.removeFullLines(k.first,k.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var k=this.selection,N=this.session,j=k.getRange(),U=k.isBackwards();if(j.isEmpty()){var G=j.start.row;N.duplicateLines(G,G)}else{var J=U?j.start:j.end,Q=N.insert(J,N.getTextRange(j));j.start=J,j.end=Q,k.setSelectionRange(j,U)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(k,N,j){return this.session.moveText(k,N,j)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(k,N){var j,U,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var J=G.toOrientedRange();j=this.$getSelectedRows(J),U=this.session.$moveLines(j.first,j.last,N?0:k),N&&k==-1&&(U=0),J.moveBy(U,0),G.fromOrientedRange(J)}else{var Q=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var le=0,ie=0,ue=Q.length,pe=0;pe<ue;pe++){var oe=pe;Q[pe].moveBy(le,0),j=this.$getSelectedRows(Q[pe]);for(var re=j.first,Ce=j.last;++pe<ue;){ie&&Q[pe].moveBy(ie,0);var ke=this.$getSelectedRows(Q[pe]);if(N&&ke.first!=Ce||!N&&ke.first>Ce+1)break;Ce=ke.last}for(pe--,le=this.session.$moveLines(re,Ce,N?0:k),N&&k==-1&&(oe=pe+1);oe<=pe;)Q[oe].moveBy(le,0),oe++;N||(le=0),ie+=le}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(k){return k=(k||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(k.start.row),last:this.session.getRowFoldEnd(k.end.row)}},S.prototype.onCompositionStart=function(k){this.renderer.showComposition(k)},S.prototype.onCompositionUpdate=function(k){this.renderer.setCompositionText(k)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(k){return k>=this.getFirstVisibleRow()&&k<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(k){return k>=this.renderer.getFirstFullyVisibleRow()&&k<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(k,N){var j=this.renderer,U=this.renderer.layerConfig,G=k*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=j.scrollTop;j.scrollBy(0,G*U.lineHeight),N!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(J)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(k){this.renderer.scrollToRow(k)},S.prototype.scrollToLine=function(k,N,j,U){this.renderer.scrollToLine(k,N,j,U)},S.prototype.centerSelection=function(){var k=this.getSelectionRange(),N={row:Math.floor(k.start.row+(k.end.row-k.start.row)/2),column:Math.floor(k.start.column+(k.end.column-k.start.column)/2)};this.renderer.alignCursor(N,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(k,N){this.selection.moveCursorTo(k,N)},S.prototype.moveCursorToPosition=function(k){this.selection.moveCursorToPosition(k)},S.prototype.jumpToMatching=function(k,N){var j=this.getCursorPosition(),U=new _(this.session,j.row,j.column),G=U.getCurrentToken(),J=0;G&&G.type.indexOf("tag-name")!==-1&&(G=U.stepBackward());var Q=G||U.stepForward();if(Q){var le,ie=!1,ue={},pe=j.column-Q.start,oe,re={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Q.value.match(/[{}()\[\]]/g)){for(;pe<Q.value.length&&!ie;pe++)if(re[Q.value[pe]])switch(oe=re[Q.value[pe]]+"."+Q.type.replace("rparen","lparen"),isNaN(ue[oe])&&(ue[oe]=0),Q.value[pe]){case"(":case"[":case"{":ue[oe]++;break;case")":case"]":case"}":ue[oe]--,ue[oe]===-1&&(le="bracket",ie=!0);break}}else Q.type.indexOf("tag-name")!==-1&&(isNaN(ue[Q.value])&&(ue[Q.value]=0),G.value==="<"&&J>1?ue[Q.value]++:G.value==="</"&&ue[Q.value]--,ue[Q.value]===-1&&(le="tag",ie=!0));ie||(G=Q,J++,Q=U.stepForward(),pe=0)}while(Q&&!ie);if(le){var Ce,ke;if(le==="bracket")Ce=this.session.getBracketRange(j),Ce||(Ce=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+pe-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+pe-1),ke=Ce.start,(N||ke.row===j.row&&Math.abs(ke.column-j.column)<2)&&(Ce=this.session.getBracketRange(ke)));else if(le==="tag"){if(!Q||Q.type.indexOf("tag-name")===-1)return;if(Ce=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ce.compare(j.row,j.column)===0){var Ee=this.session.getMatchingTags(j);Ee&&(Ee.openTag.contains(j.row,j.column)?(Ce=Ee.closeTag,ke=Ce.start):(Ce=Ee.openTag,Ee.closeTag.start.row===j.row&&Ee.closeTag.start.column===j.column?ke=Ce.end:ke=Ce.start))}ke=ke||Ce.start}ke=Ce&&Ce.cursor||ke,ke&&(k?Ce&&N?this.selection.setRange(Ce):Ce&&Ce.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(ke.row,ke.column):this.selection.moveTo(ke.row,ke.column))}}},S.prototype.gotoLine=function(k,N,j){this.selection.clearSelection(),this.session.unfold({row:k-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(k-1,N||0),this.isRowFullyVisible(k-1)||this.scrollToLine(k-1,!0,j)},S.prototype.navigateTo=function(k,N){this.selection.moveTo(k,N)},S.prototype.navigateUp=function(k){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-k||-1,0)},S.prototype.navigateDown=function(k){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(k||1,0)},S.prototype.navigateLeft=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateRight=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(k,N){N&&this.$search.set(N);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,k)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},S.prototype.replaceAll=function(k,N){N&&this.$search.set(N);var j=this.$search.findAll(this.session),U=0;if(!j.length)return U;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var J=j.length-1;J>=0;--J)this.$tryReplace(j[J],k)&&U++;return this.selection.setSelectionRange(G),U},S.prototype.$tryReplace=function(k,N){var j=this.session.getTextRange(k);return N=this.$search.replace(j,N),N!==null?(k.end=this.session.replace(k,N),k):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(k,N,j){N||(N={}),typeof k=="string"||k instanceof RegExp?N.needle=k:typeof k=="object"&&g.mixin(N,k);var U=this.selection.getRange();N.needle==null&&(k=this.session.getTextRange(U)||this.$search.$options.needle,k||(U=this.session.getWordRange(U.start.row,U.start.column),k=this.session.getTextRange(U)),this.$search.set({needle:k})),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,j),G;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},S.prototype.findNext=function(k,N){this.find({skipCurrent:!0,backwards:!1},k,N)},S.prototype.findPrevious=function(k,N){this.find(k,{skipCurrent:!0,backwards:!0},N)},S.prototype.revealRange=function(k,N){this.session.unfold(k),this.selection.setSelectionRange(k);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(k.start,k.end,.5),N!==!1&&this.renderer.animateScrolling(j)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(k){k.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()},S.prototype.setAutoScrollEditorIntoView=function(k){if(k){var N,j=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}),Q=this.renderer.on("beforeRender",function(){U&&(N=j.renderer.container.getBoundingClientRect())}),le=this.renderer.on("afterRender",function(){if(U&&N&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ie=j.renderer,ue=ie.$cursorLayer.$pixelPos,pe=ie.layerConfig,oe=ue.top-pe.offset;ue.top>=0&&oe+N.top<0?U=!0:ue.top<pe.height&&ue.top+N.top+pe.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(G.style.top=oe+"px",G.style.left=ue.left+"px",G.style.height=pe.lineHeight+"px",G.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(ie){ie||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",J),this.renderer.off("afterRender",le),this.renderer.off("beforeRender",Q))}}},S.prototype.$resetCursorStyle=function(){var k=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(k)),N.isBlinking=!this.$readOnly&&k!="wide",v.setCssClass(N.element,"ace_slim-cursors",/slim/.test(k)))},S.prototype.prompt=function(k,N,j){var U=this;$.loadModule("ace/ext/prompt",function(G){G.prompt(U,k,N,j)})},Object.defineProperty(S.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new F(this.container))},set:function(k){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=k},enumerable:!1,configurable:!0}),S})();D.$uid=0,D.prototype.curOp=null,D.prototype.prevOp={},D.prototype.$mergeableCommands=["backspace","del","insertstring"],D.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(D.prototype,b),$.defineOptions(D.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var k=this;if(this.textInput.setReadOnly(S),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(j){var U=!1;if(j&&j.type=="keydown"){if(j&&j.key&&!j.ctrlKey&&!j.metaKey&&(j.key==" "&&j.preventDefault(),U=j.key.length==1),!U)return}else j&&j.type!=="exec"&&(U=!0);if(U){var G=v.createElement("div");G.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),k.hoverTooltip.isOpen||k.hoverTooltip.showForRange(k,k.getSelectionRange(),G)}else k.hoverTooltip&&k.hoverTooltip.isOpen&&k.hoverTooltip.hide()});var N=this.textInput.getElement();S?(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(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){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(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?M.attach(this):M.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?M.attach(this):M.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var k=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(k&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),v.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!k&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),v.addCssClass(this.container,"ace_hasPlaceholder");var N=v.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!k&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var k={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===L.enter){U.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},j;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",O("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(k),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),j||(j=new C(this)),j.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(k),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),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},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 M={getText:function(S,k){return(Math.abs(S.selection.lead.row-k)||k+1+(k<9?"·":""))+""},getWidth:function(S,k,N){return Math.max(k.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(S,k){k.renderer.$loop.schedule(k.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};r.Editor=D}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,r,h){var d=t("../lib/dom"),g=(function(){function v(l,f){this.element=l,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(l){d.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(l,f){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(l,f,s){var a=f.firstRowScreen*f.lineHeight,u=Math.floor(a/this.canvasHeight),p=s.documentToScreenRow(l,0)*f.lineHeight;return p-u*this.canvasHeight},v.prototype.computeLineHeight=function(l,f,s){return f.lineHeight*s.getRowLineCount(l)},v.prototype.getLength=function(){return this.cells.length},v.prototype.get=function(l){return this.cells[l]},v.prototype.shift=function(){this.$cacheCell(this.cells.shift())},v.prototype.pop=function(){this.$cacheCell(this.cells.pop())},v.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var f=d.createFragment(this.element),s=0;s<l.length;s++)f.appendChild(l[s].element);this.element.appendChild(f)}else this.cells.push(l),this.element.appendChild(l.element)},v.prototype.unshift=function(l){if(Array.isArray(l)){this.cells.unshift.apply(this.cells,l);for(var f=d.createFragment(this.element),s=0;s<l.length;s++)f.appendChild(l[s].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}else this.cells.unshift(l),this.element.insertAdjacentElement("afterbegin",l.element)},v.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},v.prototype.$cacheCell=function(l){l&&(l.element.remove(),this.cellCache.push(l))},v.prototype.createCell=function(l,f,s,a){var u=this.cellCache.pop();if(!u){var p=d.createElement("div");a&&a(p),this.element.appendChild(p),u={element:p,text:"",row:l}}return u.row=l,u},v})();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(t,r,h){var d=t("../lib/dom"),g=t("../lib/oop"),v=t("../lib/lang"),l=t("../lib/event_emitter").EventEmitter,f=t("./lines").Lines,s=t("../config").nls,a=(function(){function p(i){this.$showCursorMarker=null,this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return p.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},p.prototype.addGutterDecoration=function(i,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,c)},p.prototype.removeGutterDecoration=function(i,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,c)},p.prototype.setAnnotations=function(i){this.$annotations=[];for(var c=0;c<i.length;c++){var m=i[c],b=m.row,x=this.$annotations[b];x||(x=this.$annotations[b]={text:[],type:[],displayText:[]});var I=m.text,$=m.text,_=m.type;I=I?v.escapeHTML(I):m.html||"",$=$||m.html||"",x.text.indexOf(I)===-1&&(x.text.push(I),x.type.push(_),x.displayText.push($));var C=m.className;C?x.className=C:_==="error"?x.className=" ace_error":_==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":_==="info"&&!x.className?x.className=" ace_info":_==="hint"&&!x.className&&(x.className=" ace_hint")}},p.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var c=i.start.row,m=i.end.row-c;if(m!==0)if(i.action=="remove")this.$annotations.splice(c,m+1,null);else{var b=new Array(m+1);b.unshift(c,1),this.$annotations.splice.apply(this.$annotations,b)}}},p.prototype.update=function(i){this.config=i;var c=this.session,m=i.firstRow,b=Math.min(i.lastRow+i.gutterOffset,c.getLength()-1);this.oldLastRow=b,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var x=c.getNextFoldLine(m),I=x?x.start.row:1/0,$=null,_=-1,C=m;;){if(C>I&&(C=x.end.row+1,x=c.getNextFoldLine(C,x),I=x?x.start.row:1/0),C>b){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}$=this.$lines.get(++_),$?$.row=C:($=this.$lines.createCell(C,i,this.session,u),this.$lines.push($)),this.$renderCell($,i,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},p.prototype.$updateGutterWidth=function(i){var c=this.session,m=c.gutterRenderer||this.$renderer,b=c.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(x=c.getLength()+b-1);var I=m?m.getWidth(c,x,i):x.toString().length*i.characterWidth,$=this.$padding||this.$computePadding();I+=$.left+$.right,I!==this.gutterWidth&&!isNaN(I)&&(this.gutterWidth=I,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",I))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},p.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<c.length;m++){var b=c[m];if(b.row>=this.$cursorRow){if(b.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==c[m-1].row)b=c[m-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},p.prototype.$updateCursorMarker=function(){if(this.session){var i=this.session;this.$highlightElement||(this.$highlightElement=d.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var c=i.selection.cursor,m=this.config,b=this.$lines,x=m.firstRowScreen*m.lineHeight,I=Math.floor(x/b.canvasHeight),$=i.documentToScreenRow(c)*m.lineHeight,_=$-I*b.canvasHeight;d.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),d.setStyle(this.$highlightElement.style,"top",_+"px")}},p.prototype.scrollLines=function(i){var c=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(c,i))return this.update(i);this.$lines.moveContainer(i);var m=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=m,!c||b<i.firstRow)return this.update(i);if(m<c.firstRow)return this.update(i);if(c.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(b>m)for(var x=this.session.getFoldedRowCount(m+1,b);x>0;x--)this.$lines.pop();i.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,c.firstRow-1)),m>b&&this.$lines.push(this.$renderLines(i,b+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},p.prototype.$renderLines=function(i,c,m){for(var b=[],x=c,I=this.session.getNextFoldLine(x),$=I?I.start.row:1/0;x>$&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),$=I?I.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,i,this.session,u);this.$renderCell(_,i,I,x),b.push(_),x++}return b},p.prototype.$renderCell=function(i,c,m,b){var x=i.element,I=this.session,$=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],P=C.firstChild,L=I.$firstLineNumber,T=I.$breakpoints,F=I.$decorations,D=I.gutterRenderer||this.$renderer,M=this.$showFoldWidgets&&I.foldWidgets,S=m?m.start.row:Number.MAX_VALUE,k=c.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(D?D.getText(I,b):b+L).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||m&&b<this.$cursorRow&&b>=S&&this.$cursorRow<=m.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),T[b]&&(N+=T[b]),F[b]&&(N+=F[b]),this.$annotations[b]&&b!==S&&(N+=this.$annotations[b].className),M){var G=M[b];G==null&&(G=M[b]=I.getFoldWidget(b))}if(G){var J="ace_fold-widget ace_"+G,Q=G=="start"&&b==S&&b<m.end.row;if(Q){J+=" ace_closed";for(var le="",ie=!1,ue=b+1;ue<=m.end.row;ue++)if(this.$annotations[ue]){if(this.$annotations[ue].className===" ace_error"){ie=!0,le=" ace_error_fold";break}this.$annotations[ue].className===" ace_security"?(ie=!0,le=" ace_security_fold"):this.$annotations[ue].className===" ace_warning"&&le!==" ace_security_fold"&&(ie=!0,le=" ace_warning_fold")}N+=le}else J+=" ace_open";_.className!=J&&(_.className=J),d.setStyle(_.style,"height",k),d.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var pe=I.getFoldWidgetRange(b);pe?_.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[pe.start.row+1,pe.end.row+1])):m?_.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):_.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),Q?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else _&&(d.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));var oe=this.session.$gutterCustomWidgets[b];if(oe?this.$addCustomWidget(b,oe,i):O&&this.$removeCustomWidget(b,i),ie&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",P.className=j,P.className+=le,d.setStyle(P.style,"height",k),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",k);var re;switch(le){case" ace_error_fold":re=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":re=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":re=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",re),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[b]){C.className="ace_gutter_annotation",P.className=j,this.$useSvgGutterIcons?P.className+=this.$annotations[b].className:x.classList.add(this.$annotations[b].className.replace(" ","")),d.setStyle(P.style,"height",k),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",k);var re;switch(this.$annotations[b].className){case" ace_error":re=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":re=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":re=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":re=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":re=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",re),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else d.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=N&&(x.className=N),d.setStyle(i.element.style,"height",this.$lines.computeLineHeight(b,c,I)+"px"),d.setStyle(i.element.style,"top",this.$lines.computeLineTop(b,c,I)+"px"),i.text=U,C.style.display==="none"&&_.style.display==="none"&&!oe?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},p.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i,!i&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},p.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},p.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},p.prototype.setShowFoldWidgets=function(i){i?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},p.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},p.prototype.$hideFoldWidget=function(i,c){var m=c||this.$getGutterCell(i);if(m&&m.element){var b=m.element.childNodes[1];b&&d.setStyle(b.style,"display","none")}},p.prototype.$showFoldWidget=function(i,c){var m=c||this.$getGutterCell(i);if(m&&m.element){var b=m.element.childNodes[1];b&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&d.setStyle(b.style,"display","inline-block")}},p.prototype.$getGutterCell=function(i){var c=this.$lines.cells,m=0,b=c.length-1;if(!(i<c[0].row||i>c[b].row)){for(;m<=b;){var x=Math.floor((m+b)/2),I=c[x];if(I.row>i)b=x-1;else if(I.row<i)m=x+1;else return I}return I}},p.prototype.$addCustomWidget=function(i,c,m){var b=c.className,x=c.label,I=c.title,$=c.callbacks;this.session.$gutterCustomWidgets[i]={className:b,label:x,title:I,callbacks:$},this.$hideFoldWidget(i,m);var _=m||this.$getGutterCell(i);if(_&&_.element){var C=_.element.querySelector(".ace_custom-widget");C&&C.remove(),C=d.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",I),d.setStyle(C.style,"display","inline-block"),d.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(O){$.onClick(O,i),O.stopPropagation()}),_.element.appendChild(C)}},p.prototype.$removeCustomWidget=function(i,c){delete this.session.$gutterCustomWidgets[i],this.$showFoldWidget(i,c);var m=c||this.$getGutterCell(i);if(m&&m.element){var b=m.element.querySelector(".ace_custom-widget");b&&m.element.removeChild(b)}},p.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=d.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},p.prototype.getRegion=function(i){var c=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(i.x<c.left+m.left)return"markers";if(this.$showFoldWidgets&&i.x>m.right-c.right)return"foldWidgets"},p})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,g.implement(a.prototype,l);function u(p){var i=document.createTextNode("");p.appendChild(i);var c=d.createElement("span");p.appendChild(c);var m=d.createElement("span");p.appendChild(m);var b=d.createElement("span");return m.appendChild(b),p}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,r,h){var d=t("../range").Range,g=t("../lib/dom"),v=(function(){function f(s){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return f.prototype.setPadding=function(s){this.$padding=s},f.prototype.setSession=function(s){this.session=s},f.prototype.setMarkers=function(s){this.markers=s},f.prototype.elt=function(s,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=s},f.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var u in this.markers){var p=this.markers[u];if(!p.range){p.update(a,this,this.session,s);continue}var i=p.range.clipRows(s.firstRow,s.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),p.renderer){var c=this.$getTop(i.start.row,s),m=this.$padding+i.start.column*s.characterWidth;p.renderer(a,i,m,c,s)}else p.type=="fullLine"?this.drawFullLineMarker(a,i,p.clazz,s):p.type=="screenLine"?this.drawScreenLineMarker(a,i,p.clazz,s):i.isMultiLine()?p.type=="text"?this.drawTextMarker(a,i,p.clazz,s):this.drawMultiLineMarker(a,i,p.clazz,s):this.drawSingleLineMarker(a,i,p.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},f.prototype.drawTextMarker=function(s,a,u,p,i){for(var c=this.session,m=a.start.row,b=a.end.row,x=m,I=0,$=0,_=c.getScreenLastRowColumn(x),C=new d(x,a.start.column,x,$);x<=b;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:c.getRowWrapIndent(x),C.end.column=_,I=$,$=_,_=x+1<b?c.getScreenLastRowColumn(x+1):x==b?0:a.end.column,this.drawSingleLineMarker(s,C,u+(x==m?" ace_start":"")+" ace_br"+l(x==m||x==m+1&&a.start.column,I<$,$>_,x==b),p,x==b?0:1,i)},f.prototype.drawMultiLineMarker=function(s,a,u,p,i){var c=this.$padding,m=p.lineHeight,b=this.$getTop(a.start.row,p),x=c+a.start.column*p.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var I=a.clone();I.end.row=I.start.row,I.end.column=this.session.getLine(I.start.row).length,this.drawBidiSingleLineMarker(s,I,u+" ace_br1 ace_start",p,null,i)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+c+"px;top:"+b+"px;left:"+x+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var I=a.clone();I.start.row=I.end.row,I.start.column=0,this.drawBidiSingleLineMarker(s,I,u+" ace_br12",p,null,i)}else{b=this.$getTop(a.end.row,p);var $=a.end.column*p.characterWidth;this.elt(u+" ace_br12","height:"+m+"px;width:"+$+"px;top:"+b+"px;left:"+c+"px;"+(i||""))}if(m=(a.end.row-a.start.row-1)*p.lineHeight,!(m<=0)){b=this.$getTop(a.start.row+1,p);var _=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(_?" ace_br"+_:""),"height:"+m+"px;right:"+c+"px;top:"+b+"px;left:"+c+"px;"+(i||""))}},f.prototype.drawSingleLineMarker=function(s,a,u,p,i,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,u,p,i,c);var m=p.lineHeight,b=(a.end.column+(i||0)-a.start.column)*p.characterWidth,x=this.$getTop(a.start.row,p),I=this.$padding+a.start.column*p.characterWidth;this.elt(u,"height:"+m+"px;width:"+b+"px;top:"+x+"px;left:"+I+"px;"+(c||""))},f.prototype.drawBidiSingleLineMarker=function(s,a,u,p,i,c){var m=p.lineHeight,b=this.$getTop(a.start.row,p),x=this.$padding,I=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);I.forEach(function($){this.elt(u,"height:"+m+"px;width:"+($.width+(i||0))+"px;top:"+b+"px;left:"+(x+$.left)+"px;"+(c||""))},this)},f.prototype.drawFullLineMarker=function(s,a,u,p,i){var c=this.$getTop(a.start.row,p),m=p.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,p)-c),this.elt(u,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(i||""))},f.prototype.drawScreenLineMarker=function(s,a,u,p,i){var c=this.$getTop(a.start.row,p),m=p.lineHeight;this.elt(u,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(i||""))},f})();v.prototype.$padding=0;function l(f,s,a,u){return(f?1:0)|(s?2:0)|(a?4:0)|(u?8:0)}r.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,r,h){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return d.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(t,r,h){var d=t("../lib/oop"),g=t("../lib/dom"),v=t("../lib/lang"),l=t("./lines").Lines,f=t("../lib/event_emitter").EventEmitter,s=t("../config").nls,a=t("./text_util").isTextToken,u=(function(){function p(i){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return p.prototype.$updateEolChar=function(){var i=this.session.doc,c=i.getNewLineCharacter()==`
210
+ `&&i.getNewLineMode()!="windows",m=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},p.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},p.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},p.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},p.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var c=this.$tabStrings=[0],m=1;m<i+1;m++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=v.stringRepeat(this.TAB_CHAR,m),c.push(b)}else c.push(this.dom.createTextNode(v.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",I=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):$,b=this.dom.createElement("span");b.className=x+I,b.textContent=$,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=x+_,b.textContent=C,this.$tabStrings[" "]=b}},p.prototype.updateLines=function(i,c,m){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var b=Math.max(c,i.firstRow),x=Math.min(m,i.lastRow),I=this.element.childNodes,$=0,_=i.firstRow;_<b;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(b)){b=C.start.row;break}else _=C.end.row;$++}for(var O=!1,_=b,C=this.session.getNextFoldLine(_),P=C?C.start.row:1/0;_>P&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),P=C?C.start.row:1/0),!(_>x);){var L=I[$++];if(L){this.dom.removeChildren(L),this.$renderLine(L,_,_==P?C:!1),O&&(L.style.top=this.$lines.computeLineTop(_,i,this.session)+"px");var T=i.lineHeight*this.session.getRowLength(_)+"px";L.style.height!=T&&(O=!0,L.style.height=T)}_++}if(O)for(;$<this.$lines.cells.length;){var F=this.$lines.cells[$++];F.element.style.top=this.$lines.computeLineTop(F.row,i,this.session)+"px"}},p.prototype.scrollLines=function(i){var c=this.config;if(this.config=i,this.$lines.pageChanged(c,i))return this.update(i);this.$lines.moveContainer(i);var m=i.lastRow,b=c?c.lastRow:-1;if(!c||b<i.firstRow)return this.update(i);if(m<c.firstRow)return this.update(i);if(!c||c.lastRow<i.firstRow)return this.update(i);if(i.lastRow<c.firstRow)return this.update(i);if(c.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(c.lastRow>i.lastRow)for(var x=this.session.getFoldedRowCount(i.lastRow+1,c.lastRow);x>0;x--)this.$lines.pop();i.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,c.firstRow-1)),i.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(i,c.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(i,c,m){for(var b=[],x=c,I=this.session.getNextFoldLine(x),$=I?I.start.row:1/0;x>$&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),$=I?I.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,i,this.session),C=_.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,i,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,i,this.session)+"px"),this.$renderLine(C,x,x==$?I:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",b.push(_),x++}return b},p.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var c=i.firstRow,m=i.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(i,c,m))},p.prototype.$renderToken=function(i,c,m,b){for(var x=this,I=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),_,C=0;_=I.exec(b);){var O=_[1],P=_[2],L=_[3],T=_[4],F=_[5];if(!(!x.showSpaces&&P)){var D=C!=_.index?b.slice(C,_.index):"";if(C=_.index+_[0].length,D&&$.appendChild(this.dom.createTextNode(D,this.element)),O){var M=x.session.getScreenTabSize(c+_.index),S=x.$tabStrings[M].cloneNode(!0);S.charCount=1,$.appendChild(S),c+=M-1}else if(P)if(x.showSpaces){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space",k.textContent=v.stringRepeat(x.SPACE_CHAR,P.length),$.appendChild(k)}else $.appendChild(this.dom.createTextNode(P,this.element));else if(L){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space ace_invalid",k.textContent=v.stringRepeat(x.SPACE_CHAR,L.length),$.appendChild(k)}else if(T){c+=1;var k=this.dom.createElement("span");k.style.width=x.config.characterWidth*2+"px",k.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k.textContent=x.showSpaces?x.SPACE_CHAR:T,$.appendChild(k)}else if(F){c+=1;var k=this.dom.createElement("span");k.style.width=x.config.characterWidth*2+"px",k.className="ace_cjk",k.textContent=F,$.appendChild(k)}}}if($.appendChild(this.dom.createTextNode(C?b.slice(C):b,this.element)),a(m.type))i.appendChild($);else{var N="ace_"+m.type.replace(/\./g," ace_"),k=this.dom.createElement("span");m.type=="fold"&&(k.style.width=m.value.length*this.config.characterWidth+"px",k.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),k.className=N,k.appendChild($),i.appendChild(k)}return c+b.length},p.prototype.renderIndentGuide=function(i,c,m){var b=c.search(this.$indentGuideRe);if(b<=0||b>=m)return c;if(c[0]==" "){b-=b%this.tabSize;for(var x=b/this.tabSize,I=0;I<x;I++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(b)}else if(c[0]==" "){for(var I=0;I<b;I++){var $=this.$tabStrings[" "].cloneNode(!0);$.charCount=1,i.appendChild($)}return this.$highlightIndentGuide(),c.substr(b)}return this.$highlightIndentGuide(),c},p.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var c=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,b=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:c.row};var x=this.session.$bracketHighlight;if(x){for(var I=this.session.$bracketHighlight.ranges,$=0;$<I.length;$++)if(c.row!==I[$].start.row){this.$highlightIndentGuideMarker.end=I[$].start.row+1,c.row>I[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[c.row]!==""&&c.column===i[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=c.row+1;$<i.length;$++){var _=i[$],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=$,C<=m))break}}this.$renderHighlightIndentGuide()}}},p.prototype.$clearActiveIndentGuide=function(){for(var i=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<i.length;c++)i[c].classList.remove("ace_indent-guide-active")},p.prototype.$setIndentGuideActive=function(i,c){var m=this.session.doc.getLine(i.row);if(m!==""){var b=i.element;if(i.element.classList&&i.element.classList.contains("ace_line_group"))if(i.element.childNodes.length>0)b=i.element.childNodes[0];else return;var x=b.childNodes;if(x){var I=x[c-1];I&&I.classList&&I.classList.contains("ace_indent-guide")&&I.classList.add("ace_indent-guide-active")}}},p.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<i.length;m++){var b=i[m];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,c)}}else for(var m=i.length-1;m>=0;m--){var b=i[m];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,c)}}}},p.prototype.$createLineElement=function(i){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},p.prototype.$renderWrappedLine=function(i,c,m){var b=0,x=0,I=m[0],$=0,_=this.$createLineElement();i.appendChild(_);for(var C=0;C<c.length;C++){var O=c[C],P=O.value;if(C==0&&this.displayIndentGuides){if(b=P.length,P=this.renderIndentGuide(_,P,I),!P)continue;b-=P.length}if(b+P.length<I)$=this.$renderToken(_,$,O,P),b+=P.length;else{for(;b+P.length>=I;){$=this.$renderToken(_,$,O,P.substring(0,I-b)),P=P.substring(I-b),b=I,_=this.$createLineElement(),i.appendChild(_);var L=this.dom.createTextNode(v.stringRepeat(" ",m.indent),this.element);L.charCount=0,_.appendChild(L),x++,$=0,I=m[x]||Number.MAX_VALUE}P.length!=0&&(b+=P.length,$=this.$renderToken(_,$,O,P))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,$,null,"",!0)},p.prototype.$renderSimpleLine=function(i,c){for(var m=0,b=0;b<c.length;b++){var x=c[b],I=x.value;if(!(b==0&&this.displayIndentGuides&&(I=this.renderIndentGuide(i,I),!I))){if(m+I.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,m,x,I);m=this.$renderToken(i,m,x,I)}}},p.prototype.$renderOverflowMessage=function(i,c,m,b,x){m&&this.$renderToken(i,c,m,b.slice(0,this.MAX_LINE_LENGTH-c));var I=this.dom.createElement("span");I.className="ace_inline_button ace_keyword ace_toggle_wrap",I.textContent=x?"<hide>":"<click to see more...>",i.appendChild(I)},p.prototype.$renderLine=function(i,c,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(c)),m)var b=this.$getFoldLineTokens(c,m);else var b=this.session.getTokens(c);var x=i;if(b.length){var I=this.session.getRowSplitData(c);if(I&&I.length){this.$renderWrappedLine(i,b,I);var x=i.lastChild}else{var x=i;this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x)),this.$renderSimpleLine(x,b)}}else this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x));if(this.showEOL&&x){m&&(c=m.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},p.prototype.$getFoldLineTokens=function(i,c){var m=this.session,b=[];function x($,_,C){for(var O=0,P=0;P+$[O].value.length<_;)if(P+=$[O].value.length,O++,O==$.length)return;if(P!=_){var L=$[O].value.substring(_-P);L.length>C-_&&(L=L.substring(0,C-_)),b.push({type:$[O].type,value:L}),P=_+L.length,O+=1}for(;P<C&&O<$.length;){var L=$[O].value;L.length+P>C?b.push({type:$[O].type,value:L.substring(0,C-P)}):b.push($[O]),P+=L.length,O+=1}}var I=m.getTokens(i);return c.walk(function($,_,C,O,P){$!=null?b.push({type:"fold",value:$}):(P&&(I=m.getTokens(_)),I.length&&x(I,O,C))},c.end.row,this.session.getLine(c.end.row).length),b},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,d.implement(u.prototype,f),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,r,h){var d=t("../lib/dom"),g=(function(){function v(l){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return v.prototype.$updateOpacity=function(l){for(var f=this.cursors,s=f.length;s--;)d.setStyle(f[s].style,"opacity",l?"":"0")},v.prototype.$startCssAnimation=function(){for(var l=this.cursors,f=l.length;f--;)l[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.removeCssClass(this.element,"ace_animate-blinking")},v.prototype.setPadding=function(l){this.$padding=l},v.prototype.setSession=function(l){this.session=l},v.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},v.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},v.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,d.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var l=d.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},v.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},v.prototype.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&d.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),f()},this.blinkInterval),f()}},v.prototype.getPixelPosition=function(l,f){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(l),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,l.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),u=(s.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},v.prototype.isCursorInView=function(l,f){return l.top>=0&&l.top<f.maxHeight},v.prototype.update=function(l){this.config=l;var f=this.session.$selectionMarkers,s=0,a=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var s=0,u=f.length;s<u;s++){var p=this.getPixelPosition(f[s].cursor,!0);if(!((p.top>l.height+l.offset||p.top<0)&&s>1)){var i=this.cursors[a++]||this.addCursor(),c=i.style;this.drawCursor?this.drawCursor(i,p,l,f[s],this.session):this.isCursorInView(p,l)?(d.setStyle(c,"display","block"),d.translate(i,p.left,p.top),d.setStyle(c,"width",Math.round(l.characterWidth)+"px"),d.setStyle(c,"height",l.lineHeight+"px")):d.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=p,this.restartTimer()},v.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},v.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},v})();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(t,r,h){var d=this&&this.__extends||(function(){var i=function(c,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&(b[I]=x[I])},i(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(c,m);function b(){this.constructor=c}c.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})(),g=t("./lib/oop"),v=t("./lib/dom"),l=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter,s=32768,a=(function(){function i(c,m){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return i.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},i})();g.implement(a.prototype,f);var u=(function(i){d(c,i);function c(m,b){var x=i.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,b.$scrollbarWidth=x.width=v.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(m){this.element.style.height=m+"px"},c.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>s?(this.coeff=s/m,m=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},c.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},c})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var p=(function(i){d(c,i);function c(m,b){var x=i.call(this,m,"-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 c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(m){this.element.style.width=m+"px"},c.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},c})(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=p,r.VScrollBar=u,r.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,h){var d=this&&this.__extends||(function(){var p=function(i,c){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(m[x]=b[x])},p(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");p(i,c);function m(){this.constructor=i}i.prototype=c===null?Object.create(c):(m.prototype=c.prototype,new m)}})(),g=t("./lib/oop"),v=t("./lib/dom"),l=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter;v.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
211
+ position: absolute;
212
+ background: rgba(128, 128, 128, 0.6);
213
+ -moz-box-sizing: border-box;
214
+ box-sizing: border-box;
215
+ border: 1px solid #bbb;
216
+ border-radius: 2px;
217
+ z-index: 8;
218
+ }
219
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
220
+ position: absolute;
221
+ z-index: 6;
222
+ background: none;
223
+ overflow: hidden!important;
224
+ }
225
+ .ace_editor>.ace_sb-v {
226
+ z-index: 6;
227
+ right: 0;
228
+ top: 0;
229
+ width: 12px;
230
+ }
231
+ .ace_editor>.ace_sb-v div {
232
+ z-index: 8;
233
+ right: 0;
234
+ width: 100%;
235
+ }
236
+ .ace_editor>.ace_sb-h {
237
+ bottom: 0;
238
+ left: 0;
239
+ height: 12px;
240
+ }
241
+ .ace_editor>.ace_sb-h div {
242
+ bottom: 0;
243
+ height: 100%;
244
+ }
245
+ .ace_editor>.ace_sb_grabbed {
246
+ z-index: 8;
247
+ background: #000;
248
+ }`,"ace_scrollbar.css",!1);var s=(function(){function p(i,c){this.element=v.createElement("div"),this.element.className="ace_sb"+c,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},p})();g.implement(s.prototype,f);var a=(function(p){d(i,p);function i(c,m){var b=p.call(this,c,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=c,b.width=b.VScrollWidth,b.renderer=m,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return i.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(l.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var b=this,x=m.clientY,I=function(T){x=T.clientY},$=function(){clearInterval(P)},_=m.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var T=b.scrollTopFromThumbTop(C+x-_);T!==b.scrollTop&&b._emit("scroll",{data:T})}};l.capture(this.inner,I,$);var P=setInterval(O,20);return l.preventDefault(m)}var L=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),l.preventDefault(m)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(c){var m=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(c,m){this.pageHeight===c&&!m||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},i.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i})(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(p){d(i,p);function i(c,m){var b=p.call(this,c,"-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=m,b}return i.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(l.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var b=this,x=m.clientX,I=function(T){x=T.clientX},$=function(){clearInterval(P)},_=m.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var T=b.scrollLeftFromThumbLeft(C+x-_);T!==b.scrollLeft&&b._emit("scroll",{data:T})}};l.capture(this.inner,I,$);var P=setInterval(O,20);return l.preventDefault(m)}var L=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),l.preventDefault(m)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(c){var m=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},i.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(c,m){this.pageWidth===c&&!m||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},i.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i})(s);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,r,h){var d=t("./lib/event"),g=(function(){function v(l,f){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var s=this;this._flush=function(a){s.pending=!1;var u=s.changes;if(u&&(d.blockIdle(100),s.changes=0,s.onRender(u)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return v.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(l){var f=this.changes;return this.changes=0,f},v})();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(t,r,h){var d=t("../lib/oop"),g=t("../lib/dom"),v=t("../lib/lang"),l=t("../lib/event"),f=t("../lib/useragent"),s=t("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",p=200,i=(function(){function c(m){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),m.appendChild(this.el),this.$measureNode.textContent=v.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(m,b){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",f.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=b?"hidden":"visible"},c.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===m.width&&b.height===m.height,this._emit("changeCharacterSize",{data:m})}},c.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(b){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=l.onIdle(function b(){m.checkForSizeChanges(),l.onIdle(b,500)},500)},c.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(m){var b={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/a};return b.width===0||b.height===0?null:b},c.prototype.$measureCharWidth=function(m){this.$main.textContent=v.stringRepeat(m,a);var b=this.$main.getBoundingClientRect();return b.width/a},c.prototype.getCharacterWidth=function(m){var b=this.charSizes[m];return b===void 0&&(b=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),b},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var m=function(b,x){return["div",{style:"position: absolute;top:"+b+"px;left:"+x+"px;"}]};this.els=g.buildDom([m(0,0),m(p,0),m(0,p),m(p,p)],this.el)},c.prototype.transformCoordinates=function(m,b){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function I(J,Q,le){var ie=J[1]*Q[0]-J[0]*Q[1];return[(-Q[1]*le[0]+Q[0]*le[1])/ie,(+J[1]*le[0]-J[0]*le[1])/ie]}function $(J,Q){return[J[0]-Q[0],J[1]-Q[1]]}function _(J,Q){return[J[0]+Q[0],J[1]+Q[1]]}function C(J,Q){return[J*Q[0],J*Q[1]]}this.els||this.$initTransformMeasureNodes();function O(J){var Q=J.getBoundingClientRect();return[Q.left,Q.top]}var P=O(this.els[0]),L=O(this.els[1]),T=O(this.els[2]),F=O(this.els[3]),D=I($(F,L),$(F,T),$(_(L,T),_(F,P))),M=C(1+D[0],$(L,P)),S=C(1+D[1],$(T,P));if(b){var k=b,N=D[0]*k[0]/p+D[1]*k[1]/p+1,j=_(C(k[0],M),C(k[1],S));return _(C(1/N/p,j),P)}var U=$(m,P),G=I($(M,C(D[0],U)),$(S,C(D[1],U)),U);return C(p,G)},c})();i.prototype.$characterSize={width:0,height:0},d.implement(i.prototype,s),r.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,r,h){h.exports=`
249
+ .ace_br1 {border-top-left-radius : 3px;}
250
+ .ace_br2 {border-top-right-radius : 3px;}
251
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
252
+ .ace_br4 {border-bottom-right-radius: 3px;}
253
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
254
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
255
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
256
+ .ace_br8 {border-bottom-left-radius : 3px;}
257
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
258
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
259
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
260
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
261
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
262
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
263
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
264
+
265
+
266
+ .ace_editor {
267
+ position: relative;
268
+ overflow: hidden;
269
+ padding: 0;
270
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
271
+ direction: ltr;
272
+ text-align: left;
273
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
274
+ forced-color-adjust: none;
275
+ }
276
+
277
+ .ace_scroller {
278
+ position: absolute;
279
+ overflow: hidden;
280
+ top: 0;
281
+ bottom: 0;
282
+ background-color: inherit;
283
+ -ms-user-select: none;
284
+ -moz-user-select: none;
285
+ -webkit-user-select: none;
286
+ user-select: none;
287
+ cursor: text;
288
+ }
289
+
290
+ .ace_content {
291
+ position: absolute;
292
+ box-sizing: border-box;
293
+ min-width: 100%;
294
+ contain: style size layout;
295
+ font-variant-ligatures: no-common-ligatures;
296
+ }
297
+ .ace_invisible {
298
+ font-variant-ligatures: none;
299
+ }
300
+
301
+ .ace_keyboard-focus:focus {
302
+ box-shadow: inset 0 0 0 2px #5E9ED6;
303
+ outline: none;
304
+ }
305
+
306
+ .ace_dragging .ace_scroller:before{
307
+ position: absolute;
308
+ top: 0;
309
+ left: 0;
310
+ right: 0;
311
+ bottom: 0;
312
+ content: '';
313
+ background: rgba(250, 250, 250, 0.01);
314
+ z-index: 1000;
315
+ }
316
+ .ace_dragging.ace_dark .ace_scroller:before{
317
+ background: rgba(0, 0, 0, 0.01);
318
+ }
319
+
320
+ .ace_gutter {
321
+ position: absolute;
322
+ overflow : hidden;
323
+ width: auto;
324
+ top: 0;
325
+ bottom: 0;
326
+ left: 0;
327
+ cursor: default;
328
+ z-index: 4;
329
+ -ms-user-select: none;
330
+ -moz-user-select: none;
331
+ -webkit-user-select: none;
332
+ user-select: none;
333
+ contain: style size layout;
334
+ }
335
+
336
+ .ace_gutter-active-line {
337
+ position: absolute;
338
+ left: 0;
339
+ right: 0;
340
+ }
341
+
342
+ .ace_scroller.ace_scroll-left:after {
343
+ content: "";
344
+ position: absolute;
345
+ top: 0;
346
+ right: 0;
347
+ bottom: 0;
348
+ left: 0;
349
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
350
+ pointer-events: none;
351
+ }
352
+
353
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
354
+ position: absolute;
355
+ top: 0;
356
+ left: 0;
357
+ right: 0;
358
+ padding-left: 19px;
359
+ padding-right: 6px;
360
+ background-repeat: no-repeat;
361
+ }
362
+
363
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
364
+ margin-left: -14px;
365
+ float: left;
366
+ }
367
+
368
+ .ace_gutter-cell .ace_gutter_annotation {
369
+ margin-left: -19px;
370
+ float: left;
371
+ }
372
+
373
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
374
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
375
+ background-repeat: no-repeat;
376
+ background-position: 2px center;
377
+ }
378
+
379
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
380
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
381
+ background-repeat: no-repeat;
382
+ background-position: 2px center;
383
+ }
384
+
385
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
386
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
387
+ background-repeat: no-repeat;
388
+ background-position: 2px center;
389
+ }
390
+
391
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
392
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
393
+ }
394
+
395
+ .ace_icon_svg.ace_error {
396
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
397
+ background-color: crimson;
398
+ }
399
+ .ace_icon_svg.ace_security {
400
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
401
+ background-color: crimson;
402
+ }
403
+ .ace_icon_svg.ace_warning {
404
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
405
+ background-color: darkorange;
406
+ }
407
+ .ace_icon_svg.ace_info {
408
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
409
+ background-color: royalblue;
410
+ }
411
+ .ace_icon_svg.ace_hint {
412
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
413
+ background-color: silver;
414
+ }
415
+
416
+ .ace_icon_svg.ace_error_fold {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
418
+ background-color: crimson;
419
+ }
420
+ .ace_icon_svg.ace_security_fold {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
422
+ background-color: crimson;
423
+ }
424
+ .ace_icon_svg.ace_warning_fold {
425
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
426
+ background-color: darkorange;
427
+ }
428
+
429
+ .ace_scrollbar {
430
+ contain: strict;
431
+ position: absolute;
432
+ right: 0;
433
+ bottom: 0;
434
+ z-index: 6;
435
+ }
436
+
437
+ .ace_scrollbar-inner {
438
+ position: absolute;
439
+ cursor: text;
440
+ left: 0;
441
+ top: 0;
442
+ }
443
+
444
+ .ace_scrollbar-v{
445
+ overflow-x: hidden;
446
+ overflow-y: scroll;
447
+ top: 0;
448
+ }
449
+
450
+ .ace_scrollbar-h {
451
+ overflow-x: scroll;
452
+ overflow-y: hidden;
453
+ left: 0;
454
+ }
455
+
456
+ .ace_print-margin {
457
+ position: absolute;
458
+ height: 100%;
459
+ }
460
+
461
+ .ace_text-input {
462
+ position: absolute;
463
+ z-index: 0;
464
+ width: 0.5em;
465
+ height: 1em;
466
+ opacity: 0;
467
+ background: transparent;
468
+ -moz-appearance: none;
469
+ appearance: none;
470
+ border: none;
471
+ resize: none;
472
+ outline: none;
473
+ overflow: hidden;
474
+ font: inherit;
475
+ padding: 0 1px;
476
+ margin: 0 -1px;
477
+ contain: strict;
478
+ -ms-user-select: text;
479
+ -moz-user-select: text;
480
+ -webkit-user-select: text;
481
+ user-select: text;
482
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
483
+ white-space: pre!important;
484
+ }
485
+ .ace_text-input.ace_composition {
486
+ background: transparent;
487
+ color: inherit;
488
+ z-index: 1000;
489
+ opacity: 1;
490
+ }
491
+ .ace_composition_placeholder { color: transparent }
492
+ .ace_composition_marker {
493
+ border-bottom: 1px solid;
494
+ position: absolute;
495
+ border-radius: 0;
496
+ margin-top: 1px;
497
+ }
498
+
499
+ [ace_nocontext=true] {
500
+ transform: none!important;
501
+ filter: none!important;
502
+ clip-path: none!important;
503
+ mask : none!important;
504
+ contain: none!important;
505
+ perspective: none!important;
506
+ mix-blend-mode: initial!important;
507
+ z-index: auto;
508
+ }
509
+
510
+ .ace_layer {
511
+ z-index: 1;
512
+ position: absolute;
513
+ overflow: hidden;
514
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
515
+ word-wrap: normal;
516
+ white-space: pre;
517
+ height: 100%;
518
+ width: 100%;
519
+ box-sizing: border-box;
520
+ /* setting pointer-events: auto; on node under the mouse, which changes
521
+ during scroll, will break mouse wheel scrolling in Safari */
522
+ pointer-events: none;
523
+ }
524
+
525
+ .ace_gutter-layer {
526
+ position: relative;
527
+ width: auto;
528
+ text-align: right;
529
+ pointer-events: auto;
530
+ height: 1000000px;
531
+ contain: style size layout;
532
+ }
533
+
534
+ .ace_text-layer {
535
+ font: inherit !important;
536
+ position: absolute;
537
+ height: 1000000px;
538
+ width: 1000000px;
539
+ contain: style size layout;
540
+ }
541
+
542
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
543
+ contain: style size layout;
544
+ position: absolute;
545
+ top: 0;
546
+ left: 0;
547
+ right: 0;
548
+ }
549
+
550
+ .ace_hidpi .ace_text-layer,
551
+ .ace_hidpi .ace_gutter-layer,
552
+ .ace_hidpi .ace_content,
553
+ .ace_hidpi .ace_gutter {
554
+ contain: strict;
555
+ }
556
+ .ace_hidpi .ace_text-layer > .ace_line,
557
+ .ace_hidpi .ace_text-layer > .ace_line_group {
558
+ contain: strict;
559
+ }
560
+
561
+ .ace_cjk {
562
+ display: inline-block;
563
+ text-align: center;
564
+ }
565
+
566
+ .ace_cursor-layer {
567
+ z-index: 4;
568
+ }
569
+
570
+ .ace_cursor {
571
+ z-index: 4;
572
+ position: absolute;
573
+ box-sizing: border-box;
574
+ border-left: 2px solid;
575
+ /* workaround for smooth cursor repaintng whole screen in chrome */
576
+ transform: translatez(0);
577
+ }
578
+
579
+ .ace_multiselect .ace_cursor {
580
+ border-left-width: 1px;
581
+ }
582
+
583
+ .ace_slim-cursors .ace_cursor {
584
+ border-left-width: 1px;
585
+ }
586
+
587
+ .ace_overwrite-cursors .ace_cursor {
588
+ border-left-width: 0;
589
+ border-bottom: 1px solid;
590
+ }
591
+
592
+ .ace_hidden-cursors .ace_cursor {
593
+ opacity: 0.2;
594
+ }
595
+
596
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
597
+ opacity: 0;
598
+ }
599
+
600
+ .ace_smooth-blinking .ace_cursor {
601
+ transition: opacity 0.18s;
602
+ }
603
+
604
+ .ace_animate-blinking .ace_cursor {
605
+ animation-duration: 1000ms;
606
+ animation-timing-function: step-end;
607
+ animation-name: blink-ace-animate;
608
+ animation-iteration-count: infinite;
609
+ }
610
+
611
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
612
+ animation-duration: 1000ms;
613
+ animation-timing-function: ease-in-out;
614
+ animation-name: blink-ace-animate-smooth;
615
+ }
616
+
617
+ @keyframes blink-ace-animate {
618
+ from, to { opacity: 1; }
619
+ 60% { opacity: 0; }
620
+ }
621
+
622
+ @keyframes blink-ace-animate-smooth {
623
+ from, to { opacity: 1; }
624
+ 45% { opacity: 1; }
625
+ 60% { opacity: 0; }
626
+ 85% { opacity: 0; }
627
+ }
628
+
629
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
630
+ position: absolute;
631
+ z-index: 3;
632
+ }
633
+
634
+ .ace_marker-layer .ace_selection {
635
+ position: absolute;
636
+ z-index: 5;
637
+ }
638
+
639
+ .ace_marker-layer .ace_bracket {
640
+ position: absolute;
641
+ z-index: 6;
642
+ }
643
+
644
+ .ace_marker-layer .ace_error_bracket {
645
+ position: absolute;
646
+ border-bottom: 1px solid #DE5555;
647
+ border-radius: 0;
648
+ }
649
+
650
+ .ace_marker-layer .ace_active-line {
651
+ position: absolute;
652
+ z-index: 2;
653
+ }
654
+
655
+ .ace_marker-layer .ace_selected-word {
656
+ position: absolute;
657
+ z-index: 4;
658
+ box-sizing: border-box;
659
+ }
660
+
661
+ .ace_line .ace_fold {
662
+ box-sizing: border-box;
663
+
664
+ display: inline-block;
665
+ height: 11px;
666
+ margin-top: -2px;
667
+ vertical-align: middle;
668
+
669
+ background-image:
670
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
671
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
672
+ background-repeat: no-repeat, repeat-x;
673
+ background-position: center center, top left;
674
+ color: transparent;
675
+
676
+ border: 1px solid black;
677
+ border-radius: 2px;
678
+
679
+ cursor: pointer;
680
+ pointer-events: auto;
681
+ }
682
+
683
+ .ace_dark .ace_fold {
684
+ }
685
+
686
+ .ace_fold:hover{
687
+ background-image:
688
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
689
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
690
+ }
691
+
692
+ .ace_tooltip {
693
+ background-color: #f5f5f5;
694
+ border: 1px solid gray;
695
+ border-radius: 1px;
696
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
697
+ color: black;
698
+ padding: 3px 4px;
699
+ position: fixed;
700
+ z-index: 999999;
701
+ box-sizing: border-box;
702
+ cursor: default;
703
+ white-space: pre-wrap;
704
+ word-wrap: break-word;
705
+ line-height: normal;
706
+ font-style: normal;
707
+ font-weight: normal;
708
+ letter-spacing: normal;
709
+ pointer-events: none;
710
+ overflow: auto;
711
+ max-width: min(33em, 66vw);
712
+ overscroll-behavior: contain;
713
+ }
714
+ .ace_tooltip pre {
715
+ white-space: pre-wrap;
716
+ }
717
+
718
+ .ace_tooltip.ace_dark {
719
+ background-color: #636363;
720
+ color: #fff;
721
+ }
722
+
723
+ .ace_tooltip:focus {
724
+ outline: 1px solid #5E9ED6;
725
+ }
726
+
727
+ .ace_icon {
728
+ display: inline-block;
729
+ width: 18px;
730
+ vertical-align: top;
731
+ }
732
+
733
+ .ace_icon_svg {
734
+ display: inline-block;
735
+ width: 12px;
736
+ vertical-align: top;
737
+ -webkit-mask-repeat: no-repeat;
738
+ -webkit-mask-size: 12px;
739
+ -webkit-mask-position: center;
740
+ }
741
+
742
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
743
+ padding-right: 13px;
744
+ }
745
+
746
+ .ace_fold-widget, .ace_custom-widget {
747
+ box-sizing: border-box;
748
+
749
+ margin: 0 -12px 0 1px;
750
+ display: none;
751
+ width: 11px;
752
+ vertical-align: top;
753
+
754
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
755
+ background-repeat: no-repeat;
756
+ background-position: center;
757
+
758
+ border-radius: 3px;
759
+
760
+ border: 1px solid transparent;
761
+ cursor: pointer;
762
+ pointer-events: auto;
763
+ }
764
+
765
+ .ace_custom-widget {
766
+ background: none;
767
+ }
768
+
769
+ .ace_folding-enabled .ace_fold-widget {
770
+ display: inline-block;
771
+ }
772
+
773
+ .ace_fold-widget.ace_end {
774
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
775
+ }
776
+
777
+ .ace_fold-widget.ace_closed {
778
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
779
+ }
780
+
781
+ .ace_fold-widget:hover {
782
+ border: 1px solid rgba(0, 0, 0, 0.3);
783
+ background-color: rgba(255, 255, 255, 0.2);
784
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
785
+ }
786
+
787
+ .ace_fold-widget:active {
788
+ border: 1px solid rgba(0, 0, 0, 0.4);
789
+ background-color: rgba(0, 0, 0, 0.05);
790
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
791
+ }
792
+ /**
793
+ * Dark version for fold widgets
794
+ */
795
+ .ace_dark .ace_fold-widget {
796
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
797
+ }
798
+ .ace_dark .ace_fold-widget.ace_end {
799
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
800
+ }
801
+ .ace_dark .ace_fold-widget.ace_closed {
802
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
803
+ }
804
+ .ace_dark .ace_fold-widget:hover {
805
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
806
+ background-color: rgba(255, 255, 255, 0.1);
807
+ }
808
+ .ace_dark .ace_fold-widget:active {
809
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
810
+ }
811
+
812
+ .ace_inline_button {
813
+ border: 1px solid lightgray;
814
+ display: inline-block;
815
+ margin: -1px 8px;
816
+ padding: 0 5px;
817
+ pointer-events: auto;
818
+ cursor: pointer;
819
+ }
820
+ .ace_inline_button:hover {
821
+ border-color: gray;
822
+ background: rgba(200,200,200,0.2);
823
+ display: inline-block;
824
+ pointer-events: auto;
825
+ }
826
+
827
+ .ace_fold-widget.ace_invalid {
828
+ background-color: #FFB4B4;
829
+ border-color: #DE5555;
830
+ }
831
+
832
+ .ace_fade-fold-widgets .ace_fold-widget {
833
+ transition: opacity 0.4s ease 0.05s;
834
+ opacity: 0;
835
+ }
836
+
837
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
838
+ transition: opacity 0.05s ease 0.05s;
839
+ opacity:1;
840
+ }
841
+
842
+ .ace_underline {
843
+ text-decoration: underline;
844
+ }
845
+
846
+ .ace_bold {
847
+ font-weight: bold;
848
+ }
849
+
850
+ .ace_nobold .ace_bold {
851
+ font-weight: normal;
852
+ }
853
+
854
+ .ace_italic {
855
+ font-style: italic;
856
+ }
857
+
858
+
859
+ .ace_error-marker {
860
+ background-color: rgba(255, 0, 0,0.2);
861
+ position: absolute;
862
+ z-index: 9;
863
+ }
864
+
865
+ .ace_highlight-marker {
866
+ background-color: rgba(255, 255, 0,0.2);
867
+ position: absolute;
868
+ z-index: 8;
869
+ }
870
+
871
+ .ace_mobile-menu {
872
+ position: absolute;
873
+ line-height: 1.5;
874
+ border-radius: 4px;
875
+ -ms-user-select: none;
876
+ -moz-user-select: none;
877
+ -webkit-user-select: none;
878
+ user-select: none;
879
+ background: white;
880
+ box-shadow: 1px 3px 2px grey;
881
+ border: 1px solid #dcdcdc;
882
+ color: black;
883
+ }
884
+ .ace_dark > .ace_mobile-menu {
885
+ background: #333;
886
+ color: #ccc;
887
+ box-shadow: 1px 3px 2px grey;
888
+ border: 1px solid #444;
889
+
890
+ }
891
+ .ace_mobile-button {
892
+ padding: 2px;
893
+ cursor: pointer;
894
+ overflow: hidden;
895
+ }
896
+ .ace_mobile-button:hover {
897
+ background-color: #eee;
898
+ opacity:1;
899
+ }
900
+ .ace_mobile-button:active {
901
+ background-color: #ddd;
902
+ }
903
+
904
+ .ace_placeholder {
905
+ position: relative;
906
+ font-family: arial;
907
+ transform: scale(0.9);
908
+ transform-origin: left;
909
+ white-space: pre;
910
+ opacity: 0.7;
911
+ margin: 0 10px;
912
+ z-index: 1;
913
+ }
914
+
915
+ .ace_ghost_text {
916
+ opacity: 0.5;
917
+ font-style: italic;
918
+ }
919
+
920
+ .ace_ghost_text_container > div {
921
+ white-space: pre;
922
+ }
923
+
924
+ .ghost_text_line_wrapped::after {
925
+ content: "↩";
926
+ position: absolute;
927
+ }
928
+
929
+ .ace_lineWidgetContainer.ace_ghost_text {
930
+ margin: 0px 4px
931
+ }
932
+
933
+ .ace_screenreader-only {
934
+ position:absolute;
935
+ left:-10000px;
936
+ top:auto;
937
+ width:1px;
938
+ height:1px;
939
+ overflow:hidden;
940
+ }
941
+
942
+ .ace_hidden_token {
943
+ display: none;
944
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,r,h){var d=t("../lib/dom"),g=t("../lib/oop"),v=t("../lib/event_emitter").EventEmitter,l=(function(){function f(s,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(s)}return f.prototype.$createCanvas=function(){this.canvas=d.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},f.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var u=this.canvas.getContext("2d");function p(M,S){return M.priority<S.priority?-1:M.priority>S.priority?1:0}var i=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),i){var c={info:1,warning:2,error:3};i.forEach(function(M){M.priority=c[M.type]||null}),i=i.sort(p);for(var m=0;m<i.length;m++){var b=i[m].row,x=this.getVerticalOffsetForRow(b),I=x+this.lineHeight,$=Math.round(this.heightRatio*x),_=Math.round(this.heightRatio*I),C=Math.round(($+_)/2),O=_-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var P=C-O,L=C+O,T=L-P;u.fillStyle=a[i[m].type]||null,u.fillRect(0,P,Math.round(this.oneZoneWidth-1),T)}}var F=this.renderer.session.selection.getCursor();if(F){var D=Math.round(this.getVerticalOffsetForRow(F.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,D,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(s){s=s|0;var a=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return a},f.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},f.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},f.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},f})();g.implement(l.prototype,v),r.Decorator=l}),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(t,r,h){var d=t("./lib/oop"),g=t("./lib/dom"),v=t("./lib/lang"),l=t("./config"),f=t("./layer/gutter").Gutter,s=t("./layer/marker").Marker,a=t("./layer/text").Text,u=t("./layer/cursor").Cursor,p=t("./scrollbar").HScrollBar,i=t("./scrollbar").VScrollBar,c=t("./scrollbar_custom").HScrollBar,m=t("./scrollbar_custom").VScrollBar,b=t("./renderloop").RenderLoop,x=t("./layer/font_metrics").FontMetrics,I=t("./lib/event_emitter").EventEmitter,$=t("./css/editor-css"),_=t("./layer/decorators").Decorator,C=t("./lib/useragent"),O=t("./layer/text_util").isTextToken;g.importCssString($,"ace_editor.css",!1);var P=(function(){function L(T,F){var D=this;this.container=T||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(F),l.get("useStrictCSP")==null&&l.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 f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var M=this.$textLayer=new a(this.content);this.canvas=M.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function(S){D.$scrollAnimation||D.session.setScrollTop(S.data-D.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){D.$scrollAnimation||D.session.setScrollLeft(S.data-D.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(S){D.updateCharacterSize(),D.onResize(!0,D.gutterWidth,D.$size.width,D.$size.height),D._signal("changeCharacterSize",S)}),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(),l.resetOptions(this),l._signal("renderer",this)}return L.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")},L.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))},L.prototype.updateLines=function(T,F,D){if(F===void 0&&(F=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRow<F&&(this.$changedLines.lastRow=F)):this.$changedLines={firstRow:T,lastRow:F},this.$changedLines.lastRow<this.layerConfig.firstRow)if(D)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(T){T?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(T,F,D,M){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var S=this.container;M||(M=S.clientHeight||S.scrollHeight),!M&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",M=S.clientHeight||S.scrollHeight),D||(D=S.clientWidth||S.scrollWidth);var k=this.$updateCachedSize(T,F,D,M);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!D&&!M)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(k|this.$changes,!0):this.$loop.schedule(k|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(T,F,D,M){M-=this.$extraHeight||0;var S=0,k=this.$size,N={width:k.width,height:k.height,scrollerHeight:k.scrollerHeight,scrollerWidth:k.scrollerWidth};if(M&&(T||k.height!=M)&&(k.height=M,S|=this.CHANGE_SIZE,k.scrollerHeight=k.height,this.$horizScroll&&(k.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(k.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),D&&(T||k.width!=D)){S|=this.CHANGE_SIZE,k.width=D,F==null&&(F=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=F,g.setStyle(this.scrollBarH.element.style,"left",F+"px"),g.setStyle(this.scroller.style,"left",F+this.margin.left+"px"),k.scrollerWidth=Math.max(0,D-F-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",j),g.setStyle(this.scroller.style,"right",j),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(k.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&(S|=this.CHANGE_FULL)}return k.$dirty=!D||!M,S&&this._signal("resize",N),S},L.prototype.onGutterResize=function(T){var F=this.$showGutter?T:0;F!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,F,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()},L.prototype.adjustWrapLimit=function(){var T=this.$size.scrollerWidth-this.$padding*2,F=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(F,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},L.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},L.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.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 F=this.$printMarginEl.style;F.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",F.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var T=this.textarea.style,F=this.$composition;if(!this.$keepTextAreaAtCursor&&!F){g.translate(this.textarea,-100,0);return}var D=this.$cursorLayer.$pixelPos;if(D){F&&F.markerRange&&(D=this.$cursorLayer.getPixelPosition(F.markerRange.start,!0));var M=this.layerConfig,S=D.top,k=D.left;S-=M.offset;var N=F&&F.useTextareaForIME||C.isMobile?this.lineHeight:1;if(S<0||S>M.height-N){g.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-N;if(!F)S+=this.lineHeight;else if(F.useTextareaForIME){var G=this.textarea.value;j=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else S+=this.lineHeight+2;k-=this.scrollLeft,k>this.$size.scrollerWidth-j&&(k=this.$size.scrollerWidth-j),k+=this.gutterWidth+this.margin.left,g.setStyle(T,"height",N+"px"),g.setStyle(T,"width",j+"px"),g.translate(this.textarea,Math.min(k,this.$size.scrollerWidth-j),Math.min(S,U))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var T=this.layerConfig,F=T.lastRow,D=this.session.documentToScreenRow(F,0)*T.lineHeight;return D-this.session.getScrollTop()>T.height-T.lineHeight?F-1:F},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.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()},L.prototype.setScrollMargin=function(T,F,D,M){var S=this.scrollMargin;S.top=T|0,S.bottom=F|0,S.right=M|0,S.left=D|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},L.prototype.setMargin=function(T,F,D,M){var S=this.margin;S.top=T|0,S.bottom=F|0,S.right=M|0,S.left=D|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},L.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,F=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(F-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-F&&(T=this.scrollTop+F,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.prototype.$renderChanges=function(T,F){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!F){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 D=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(),D.firstRow!=this.layerConfig.firstRow&&D.firstRowScreen==this.layerConfig.firstRowScreen){var M=this.scrollTop+(D.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;M>0&&(this.scrollTop=M,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}D=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-D.offset);var S=D.width+2*this.$padding+"px",k=D.minHeight+"px";g.setStyle(this.content.style,"width",S),g.setStyle(this.content.style,"height",k)}if(T&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-D.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(D),this.$showGutter&&this.$gutterLayer.update(D),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(D),this.$markerBack.update(D),this.$markerFront.update(D),this.$cursorLayer.update(D),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(D):this.$textLayer.scrollLines(D),this.$showGutter&&(T&this.CHANGE_GUTTER||T&this.CHANGE_LINES?this.$gutterLayer.update(D):this.$gutterLayer.scrollLines(D)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(D),this.$markerBack.update(D),this.$markerFront.update(D),this.$cursorLayer.update(D),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(D),this.$showGutter&&this.$gutterLayer.update(D),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(D)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(D),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(D)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(D),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(D)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(D),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(D)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(D),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(D),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(D),this._signal("afterRender",T)},L.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,F=this.$maxLines*this.lineHeight,D=Math.min(F,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(D+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&D>this.$maxPixelHeight&&(D=this.$maxPixelHeight);var M=D<=2*this.lineHeight,S=!M&&T>F;if(D!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var k=this.container.clientWidth;this.container.style.height=D+"px",this.$updateCachedSize(!0,this.$gutterWidth,k,D),this.desiredHeight=D,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var T=this.session,F=this.$size,D=F.height<=2*this.lineHeight,M=this.session.getScreenLength(),S=M*this.lineHeight,k=this.$getLongestLine(),N=!D&&(this.$hScrollBarAlwaysVisible||F.scrollerWidth-k-2*this.$padding<0),j=this.$horizScroll!==N;j&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),D=F.height<=2*this.lineHeight);var G=F.scrollerHeight+this.lineHeight,J=!this.$maxLines&&this.$scrollPastEnd?(F.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=J;var Q=this.scrollMargin;this.session.setScrollTop(Math.max(-Q.top,Math.min(this.scrollTop,S-F.scrollerHeight+Q.bottom))),this.session.setScrollLeft(Math.max(-Q.left,Math.min(this.scrollLeft,k+2*this.$padding-F.scrollerWidth+Q.right)));var le=!D&&(this.$vScrollBarAlwaysVisible||F.scrollerHeight-S+J<0||this.scrollTop>Q.top),ie=U!==le;ie&&(this.$vScroll=le,this.scrollBarV.setVisible(le));var ue=this.scrollTop%this.lineHeight,pe=Math.ceil(G/this.lineHeight)-1,oe=Math.max(0,Math.round((this.scrollTop-ue)/this.lineHeight)),re=oe+pe,Ce,ke,Ee=this.lineHeight;oe=T.screenToDocumentRow(oe,0);var Ve=T.getFoldLine(oe);Ve&&(oe=Ve.start.row),Ce=T.documentToScreenRow(oe,0),ke=T.getRowLength(oe)*Ee,re=Math.min(T.screenToDocumentRow(re,0),T.getLength()-1),G=F.scrollerHeight+T.getRowLength(re)*Ee+ke,ue=this.scrollTop-Ce*Ee,ue<0&&Ce>0&&(Ce=Math.max(0,Ce+Math.floor(ue/Ee)),ue=this.scrollTop-Ce*Ee);var Me=0;return(this.layerConfig.width!=k||j)&&(Me=this.CHANGE_H_SCROLL),(j||ie)&&(Me|=this.$updateCachedSize(!0,this.gutterWidth,F.width,F.height),this._signal("scrollbarVisibilityChanged"),ie&&(k=this.$getLongestLine())),this.layerConfig={width:k,padding:this.$padding,firstRow:oe,firstRowScreen:Ce,lastRow:re,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:G,maxHeight:S,offset:ue,gutterOffset:Ee?Math.max(0,Math.ceil((ue+F.height-F.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(k-this.$padding),Me},L.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,F=this.$changedLines.lastRow;this.$changedLines=null;var D=this.layerConfig;if(!(T>D.lastRow+1)&&!(F<D.firstRow)){if(F===1/0){this.$showGutter&&this.$gutterLayer.update(D),this.$textLayer.update(D);return}return this.$textLayer.updateLines(D,T,F),!0}}},L.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))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(T,F){this.$gutterLayer.addGutterDecoration(T,F)},L.prototype.removeGutterDecoration=function(T,F){this.$gutterLayer.removeGutterDecoration(T,F)},L.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(T,F,D){this.scrollCursorIntoView(T,D),this.scrollCursorIntoView(F,D)},L.prototype.scrollCursorIntoView=function(T,F,D){if(this.$size.scrollerHeight!==0){var M=this.$cursorLayer.getPixelPosition(T),S=M.left,k=M.top,N=D&&D.top||0,j=D&&D.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>k?(F&&U+N>k+this.lineHeight&&(k-=F*this.$size.scrollerHeight),k===0&&(k=-this.scrollMargin.top),this.session.setScrollTop(k)):U+this.$size.scrollerHeight-j<k+this.lineHeight&&(F&&U+this.$size.scrollerHeight-j<k-this.lineHeight&&(k+=F*this.$size.scrollerHeight),this.session.setScrollTop(k+this.lineHeight+j-this.$size.scrollerHeight));var G=this.scrollLeft,J=2*this.layerConfig.characterWidth;S-J<G?(S-=J,S<this.$padding+J&&(S=-this.scrollMargin.left),this.session.setScrollLeft(S)):(S+=J,G+this.$size.scrollerWidth<S+this.characterWidth?this.session.setScrollLeft(Math.round(S+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&S-G<this.characterWidth&&this.session.setScrollLeft(0))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(T){this.session.setScrollTop(T*this.lineHeight)},L.prototype.alignCursor=function(T,F){typeof T=="number"&&(T={row:T,column:0});var D=this.$cursorLayer.getPixelPosition(T),M=this.$size.scrollerHeight-this.lineHeight,S=D.top-M*(F||0);return this.session.setScrollTop(S),S},L.prototype.$calcSteps=function(T,F){var D=0,M=this.STEPS,S=[],k=function(N,j,U){return U*(Math.pow(N-1,3)+1)+j};for(D=0;D<M;++D)S.push(k(D/this.STEPS,T,F-T));return S},L.prototype.scrollToLine=function(T,F,D,M){var S=this.$cursorLayer.getPixelPosition({row:T,column:0}),k=S.top;F&&(k-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(k),D!==!1&&this.animateScrolling(N,M)},L.prototype.animateScrolling=function(T,F){var D=this.scrollTop;if(!this.$animatedScroll)return;var M=this;if(T==D)return;if(this.$scrollAnimation){var S=this.$scrollAnimation.steps;if(S.length&&(T=S[0],T==D))return}var k=M.$calcSteps(T,D);this.$scrollAnimation={from:T,to:D,steps:k},clearInterval(this.$timer),M.session.setScrollTop(k.shift()),M.session.$scrollTop=D;function N(){M.$timer=clearInterval(M.$timer),M.$scrollAnimation=null,M.$stopAnimation=!1,F&&F()}this.$timer=setInterval(function(){if(M.$stopAnimation){N();return}if(!M.session)return clearInterval(M.$timer);k.length?(M.session.setScrollTop(k.shift()),M.session.$scrollTop=D):D!=null?(M.session.$scrollTop=-1,M.session.setScrollTop(D),D=null):N()},10)},L.prototype.scrollToY=function(T){this.scrollTop!==T&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=T)},L.prototype.scrollToX=function(T){this.scrollLeft!==T&&(this.scrollLeft=T),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(T,F){this.session.setScrollTop(F),this.session.setScrollLeft(T)},L.prototype.scrollBy=function(T,F){F&&this.session.setScrollTop(this.session.getScrollTop()+F),T&&this.session.setScrollLeft(this.session.getScrollLeft()+T)},L.prototype.isScrollableBy=function(T,F){if(F<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||F>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},L.prototype.pixelToScreenCoordinates=function(T,F){var D;if(this.$hasCssTransforms){D={top:0,left:0};var M=this.$fontMetrics.transformCoordinates([T,F]);T=M[1]-this.gutterWidth-this.margin.left,F=M[0]}else D=this.scroller.getBoundingClientRect();var S=T+this.scrollLeft-D.left-this.$padding,k=S/this.characterWidth,N=Math.floor((F+this.scrollTop-D.top)/this.lineHeight),j=this.$blockCursor?Math.floor(k):Math.round(k);return{row:N,column:j,side:k-j>0?1:-1,offsetX:S}},L.prototype.screenToTextCoordinates=function(T,F){var D;if(this.$hasCssTransforms){D={top:0,left:0};var M=this.$fontMetrics.transformCoordinates([T,F]);T=M[1]-this.gutterWidth-this.margin.left,F=M[0]}else D=this.scroller.getBoundingClientRect();var S=T+this.scrollLeft-D.left-this.$padding,k=S/this.characterWidth,N=this.$blockCursor?Math.floor(k):Math.round(k),j=(F+this.scrollTop-D.top)/this.lineHeight;return this.session.screenToDocumentPosition(j,Math.max(N,0),S)},L.prototype.textToScreenCoordinates=function(T,F){var D=this.scroller.getBoundingClientRect(),M=this.session.documentToScreenPosition(T,F),S=this.$padding+(this.session.$bidiHandler.isBidiRow(M.row,T)?this.session.$bidiHandler.getPosLeft(M.column):Math.round(M.column*this.characterWidth)),k=M.row*this.lineHeight;return{pageX:D.left+S-this.scrollLeft,pageY:D.top+k-this.scrollTop}},L.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},L.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")},L.prototype.setCompositionText=function(T){var F=this.session.selection.cursor;this.addToken(T,"composition_placeholder",F.row,F.column),this.$moveTextAreaToCursor()},L.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=""}},L.prototype.setGhostText=function(T,F){var D=this.session.selection.cursor,M=F||{row:D.row,column:D.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(T,M);this.addToken(S[0].text,"ghost_text",M.row,M.column),this.$ghostText={text:T,position:{row:M.row,column:M.column}};var k=g.createElement("div");if(S.length>1){var N=this.hideTokensAfterPosition(M.row,M.column),j;S.slice(1).forEach(function(ie){var ue=g.createElement("div"),pe=g.createElement("span");pe.className="ace_ghost_text",ie.wrapped&&(ue.className="ghost_text_line_wrapped"),ie.text.length===0&&(ie.text=" "),pe.appendChild(g.createTextNode(ie.text)),ue.appendChild(pe),k.appendChild(ue),j=ue}),N.forEach(function(ie){var ue=g.createElement("span");O(ie.type)||(ue.className="ace_"+ie.type.replace(/\./g," ace_")),ue.appendChild(g.createTextNode(ie.value)),j.appendChild(ue)}),this.$ghostTextWidget={el:k,row:M.row,column:M.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(M,!0),G=this.container,J=G.getBoundingClientRect().height,Q=S.length*this.lineHeight,le=Q<J-U.top;if(le)return;Q<J?this.scrollBy(0,(S.length-1)*this.lineHeight):this.scrollToRow(M.row)}},L.prototype.$calculateWrappedTextChunks=function(T,F){var D=this.$size.scrollerWidth-this.$padding*2,M=Math.floor(D/this.characterWidth)-2;M=M<=0?60:M;for(var S=T.split(/\r?\n/),k=[],N=0;N<S.length;N++){var j=this.session.$getDisplayTokens(S[N],F.column),U=this.session.$computeWrapSplits(j,M,this.session.$tabSize);if(U.length>0){var G=0;U.push(S[N].length);for(var J=0;J<U.length;J++){var Q=S[N].slice(G,U[J]);k.push({text:Q,wrapped:!0}),G=U[J]}}else k.push({text:S[N],wrapped:!1})}return k},L.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}},L.prototype.addToken=function(T,F,D,M){var S=this.session;S.bgTokenizer.lines[D]=null;var k={type:F,value:T},N=S.getTokens(D);if(M==null||!N.length)N.push(k);else for(var j=0,U=0;U<N.length;U++){var G=N[U];if(j+=G.value.length,M<=j){var J=G.value.length-(j-M),Q=G.value.slice(0,J),le=G.value.slice(J);N.splice(U,1,{type:G.type,value:Q},k,{type:G.type,value:le});break}}this.updateLines(D,D)},L.prototype.hideTokensAfterPosition=function(T,F){for(var D=this.session.getTokens(T),M=0,S=!1,k=[],N=0;N<D.length;N++){var j=D[N];if(M+=j.value.length,j.type!=="ghost_text"){if(S){k.push({type:j.type,value:j.value}),j.type="hidden_token";continue}M===F&&(S=!0)}}return this.updateLines(T,T),k},L.prototype.removeExtraToken=function(T,F){this.session.bgTokenizer.lines[T]=null,this.updateLines(T,T)},L.prototype.setTheme=function(T,F){var D=this;if(this.$themeId=T,D._dispatchEvent("themeChange",{theme:T}),!T||typeof T=="string"){var M=T||this.$options.theme.initialValue;l.loadModule(["theme",M],S)}else S(T);function S(k){if(D.$themeId!=T)return F&&F();if(!k||!k.cssClass)throw new Error("couldn't load module "+T+" or it didn't call define");k.$id&&(D.$themeId=k.$id),g.importCssString(k.cssText,k.cssClass,D.container),D.theme&&g.removeCssClass(D.container,D.theme.cssClass);var N="padding"in k?k.padding:"padding"in(D.theme||{})?4:D.$padding;if(D.$padding&&N!=D.$padding&&D.setPadding(N),D.$gutterLayer){var j=k.$showGutterCursorMarker;j&&!D.$gutterLayer.$showCursorMarker?D.$gutterLayer.$showCursorMarker="theme":!j&&D.$gutterLayer.$showCursorMarker=="theme"&&(D.$gutterLayer.$showCursorMarker=null)}D.$theme=k.cssClass,D.theme=k,g.addCssClass(D.container,k.cssClass),g.setCssClass(D.container,"ace_dark",k.isDark),D.$size&&(D.$size.width=0,D.$updateSizeAsync()),D._dispatchEvent("themeLoaded",{theme:k}),F&&F(),C.isSafari&&D.scroller&&(D.scroller.style.background="red",D.scroller.style.background="")}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(T,F){g.setCssClass(this.container,T,F!==!1)},L.prototype.unsetStyle=function(T){g.removeCssClass(this.container,T)},L.prototype.setCursorStyle=function(T){g.setStyle(this.scroller.style,"cursor",T)},L.prototype.setMouseCursor=function(T){g.setStyle(this.scroller.style,"cursor",T)},L.prototype.attachToShadowRoot=function(){g.importCssString($,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(T){var F=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),T===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(D){F.$scrollAnimation||F.session.setScrollTop(D.data-F.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(D){F.$scrollAnimation||F.session.setScrollLeft(D.data-F.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.addEventListener("scroll",function(D){F.$scrollAnimation||F.session.setScrollTop(D.data-F.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(D){F.$scrollAnimation||F.session.setScrollLeft(D.data-F.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var T=this;this.$resizeTimer=v.delayedCall(function(){T.destroyed||T.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(F){var D=F[0].contentRect.width,M=F[0].contentRect.height;Math.abs(T.$size.width-D)>1||Math.abs(T.$size.height-M)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L})();P.prototype.CHANGE_CURSOR=1,P.prototype.CHANGE_MARKER=2,P.prototype.CHANGE_GUTTER=4,P.prototype.CHANGE_SCROLL=8,P.prototype.CHANGE_LINES=16,P.prototype.CHANGE_TEXT=32,P.prototype.CHANGE_SIZE=64,P.prototype.CHANGE_MARKER_BACK=128,P.prototype.CHANGE_MARKER_FRONT=256,P.prototype.CHANGE_FULL=512,P.prototype.CHANGE_H_SCROLL=1024,P.prototype.$changes=0,P.prototype.$padding=null,P.prototype.$frozen=!1,P.prototype.STEPS=8,d.implement(P.prototype,I),l.defineOptions(P.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&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(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=P}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,r,h){var d=t("../lib/oop"),g=t("../lib/net"),v=t("../lib/event_emitter").EventEmitter,l=t("../config");function f(p){var i="importScripts('"+g.qualifyURL(p)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new c;return m.append(i),m.getBlob("application/javascript")}}function s(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var i=f(p),c=window.URL||window.webkitURL,m=c.createObjectURL(i);return new Worker(m)}return new Worker(p)}var a=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,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(){d.implement(this,v),this.$createWorkerFromOldConfig=function(p,i,c,m,b){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),l.get("packaged")||!t.toUrl)m=m||l.moduleUrl(i,"worker");else{var x=this.$normalizePath;m=m||x(t.toUrl("ace/worker/worker.js",null,"_"));var I={};p.forEach(function($){I[$]=x(t.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(m),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:I,module:i,classname:c}),this.$worker},this.onMessage=function(p){var i=p.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var c=this.callbacks[i.id];c&&(c(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return g.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,i){this.$worker.postMessage({command:p,args:i})},this.call=function(p,i,c){if(c){var m=this.callbackId++;this.callbacks[m]=c,i.push(m)}this.send(p,i)},this.emit=function(p,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:p,data:{data:i.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(a.prototype);var u=function(p,i,c){var m=null,b=!1,x=Object.create(v),I=[],$=new a({messageBuffer:I,terminate:function(){},postMessage:function(C){I.push(C),m&&(b?setTimeout(_):_())}});$.setEmitSync=function(C){b=C};var _=function(){var C=I.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,O){this.postMessage({type:"call",id:O,data:C})},x.emit=function(C,O){this.postMessage({type:"event",name:C,data:O})},l.loadModule(["worker",i],function(C){for(m=new C[c](x);I.length;)_()}),$};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,r,h){var d=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,v=t("./lib/oop"),l=(function(){function f(s,a,u,p,i,c){var m=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=i,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var b=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var s=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=u.addMarker(new d(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var c=a.createAnchor(i.row,i.column);c.$insertRight=!0,c.detach(),s.others.push(c)}),u.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=s.addMarker(new d(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},f.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var a=s;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,p=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,i=a.start.column-this.pos.column;if(this.updateAnchors(s),p&&(this.length+=u),p&&!this.session.$fromUndo){if(s.action==="insert")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],b={row:m.row,column:m.column+i};this.doc.insertMergedLines(b,s.lines)}else if(s.action==="remove")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],b={row:m.row,column:m.column+i};this.doc.remove(new d(b.row,b.column,b.row,b.column-u))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,u=function(i,c){a.removeMarker(i.markerId),i.markerId=a.addMarker(new d(i.row,i.column,i.row,i.column+s.length),c,null,!1)};u(this.pos,this.mainClass);for(var p=this.others.length;p--;)u(this.others[p],this.othersClass)}},f.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},f.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f})();v.implement(l.prototype,g),r.PlaceHolder=l}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,h){var d=t("../lib/event"),g=t("../lib/useragent");function v(f,s){return f.row==s.row&&f.column==s.column}function l(f){var s=f.domEvent,a=s.altKey,u=s.shiftKey,p=s.ctrlKey,i=f.getAccelKey(),c=f.getButton();if(p&&g.isMac&&(c=s.button),f.editor.inMultiSelectMode&&c==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!p&&!a&&!i){c===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(c===0){var m=f.editor,b=m.selection,x=m.inMultiSelectMode,I=f.getDocumentPosition(),$=b.getCursor(),_=f.inSelection()||b.isEmpty()&&v(I,$),C=f.x,O=f.y,P=function(Q){C=Q.clientX,O=Q.clientY},L=m.session,T=m.renderer.pixelToScreenCoordinates(C,O),F=T,D;if(m.$mouseHandler.$enableJumpToDef)p&&a||i&&a?D=u?"block":"add":a&&m.$blockSelectEnabled&&(D="block");else if(i&&!a){if(D="add",!x&&u)return}else a&&m.$blockSelectEnabled&&(D="block");if(D&&g.isMac&&s.ctrlKey&&m.$mouseHandler.cancelContextMenu(),D=="add"){if(!x&&_)return;if(!x){var M=b.toOrientedRange();m.addSelectionMarker(M)}var S=b.rangeList.rangeAtPoint(I);m.inVirtualSelectionMode=!0,u&&(S=null,M=b.ranges[0]||M,m.removeSelectionMarker(M)),m.once("mouseup",function(){var Q=b.toOrientedRange();S&&Q.isEmpty()&&v(S.cursor,Q.cursor)?b.substractPoint(Q.cursor):(u?b.substractPoint(M.cursor):M&&(m.removeSelectionMarker(M),b.addRange(M)),b.addRange(Q)),m.inVirtualSelectionMode=!1})}else if(D=="block"){f.stop(),m.inVirtualSelectionMode=!0;var k,N=[],j=function(){var Q=m.renderer.pixelToScreenCoordinates(C,O),le=L.screenToDocumentPosition(Q.row,Q.column,Q.offsetX);v(F,Q)&&v(le,b.lead)||(F=Q,m.selection.moveToPosition(le),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(N),N=b.rectangularRangeBlock(F,T),m.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=m.$mouseHandler.$clickSelection.clone()),N.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!i?b.toSingleRange():!x&&i&&(k=b.toOrientedRange(),m.addSelectionMarker(k)),u?T=L.documentToScreenPosition(b.lead):b.moveToPosition(I),F={row:-1,column:-1};var U=function(Q){j(),clearInterval(J),m.removeSelectionMarkers(N),N.length||(N=[b.toOrientedRange()]),k&&(m.removeSelectionMarker(k),b.toSingleRange(k));for(var le=0;le<N.length;le++)b.addRange(N[le]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},G=j;d.capture(m.container,P,U);var J=setInterval(function(){G()},20);return f.preventDefault()}}}r.onMouseDown=l}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,r,h){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 d=t("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new d(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(t,r,h){var d=t("./range_list").RangeList,g=t("./range").Range,v=t("./selection").Selection,l=t("./mouse/multi_select_handler").onMouseDown,f=t("./lib/event"),s=t("./lib/lang"),a=t("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=t("./search").Search,p=new u;function i($,_,C){return p.$options.wrap=!0,p.$options.needle=_,p.$options.backwards=C==-1,p.find($)}var c=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,_){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var O=this.rangeList.add($);return this.$onAddRange($),O.length&&this.$onRemoveRange(O),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),$&&this.fromOrientedRange($)},this.substractPoint=function($){var _=this.rangeList.substractPoint($);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();$.push(_),this.rangeCount=0}for(var C=$.length;C--;){var O=this.ranges.indexOf($[C]);this.ranges.splice(O,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<$.length;C++){var O=$[C],P=O.start.row,L=O.end.row;if(P===L)_.push(O.clone());else{for(_.push(new g(P,O.start.column,P,this.session.getLine(P).length));++P<L;)_.push(this.getLineRange(P,!0));_.push(new g(L,0,L,O.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var $=this.rangeList.ranges,_=$[$.length-1],C=g.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,_=$[$.length-1],C=g.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var O=this.session.documentToScreenPosition(this.cursor),P=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(O,P);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,_,C){var O=[],P=$.column<_.column;if(P)var L=$.column,T=_.column,F=$.offsetX,D=_.offsetX;else var L=_.column,T=$.column,F=_.offsetX,D=$.offsetX;var M=$.row<_.row;if(M)var S=$.row,k=_.row;else var S=_.row,k=$.row;L<0&&(L=0),S<0&&(S=0),S==k&&(C=!0);for(var N,j=S;j<=k;j++){var U=g.fromPoints(this.session.screenToDocumentPosition(j,L,F),this.session.screenToDocumentPosition(j,T,D));if(U.isEmpty()){if(N&&b(U.end,N))break;N=U.end}U.cursor=P?U.start:U.end,O.push(U)}if(M&&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 Q=G;Q>=J;Q--)O[Q].isEmpty()&&O.splice(Q,1)}return O}}).call(v.prototype);var m=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var _=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",_),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var _=this.session.$selectionMarkers.indexOf($);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var _=this.session.$selectionMarkers,C=$.length;C--;){var O=$[C];if(O.marker){this.session.removeMarker(O.marker);var P=_.indexOf(O);P!=-1&&_.splice(P,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var _=$.command,C=$.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?O=C.forEachSelection(_,$.args):_.multiSelectAction=="forEachLine"?O=C.forEachSelection(_,$.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=_.exec(C,$.args||{})):O=_.multiSelectAction(C,$.args||{});else{var O=_.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function($,_,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,P=C==!0||C&&C.$byLines,L=this.session,T=this.selection,F=T.rangeList,D=(O?T:F).ranges,M;if(!D.length)return $.exec?$.exec(this,_||{}):$(this,_||{});var S=T._eventRegistry;T._eventRegistry={};var k=new v(L);this.inVirtualSelectionMode=!0;for(var N=D.length;N--;){if(P)for(;N>0&&D[N].start.row==D[N-1].end.row;)N--;k.fromOrientedRange(D[N]),k.index=N,this.selection=L.selection=k;var j=$.exec?$.exec(this,_||{}):$(this,_||{});!M&&j!==void 0&&(M=j),k.toOrientedRange(D[N])}k.detach(),this.selection=L.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=S,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),M}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],O=0;O<_.length;O++)C.push(this.session.getTextRange(_[O]));var P=this.session.getDocument().getNewLineCharacter();$=C.join(P),$.length==(C.length-1)*P.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var O=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=_.row||this.session.$clipPositionToDocument(O.row,O.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,_,C){if(_=_||{},_.needle=$||_.needle,_.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(O)}this.$search.set(_);var P=this.$search.findAll(this.session);if(!P.length)return 0;var L=this.multiSelect;C||L.toSingleRange(P[0]);for(var T=P.length;T--;)L.addRange(P[T],!0);return O&&L.rangeList.rangeAtPoint(O.start)&&L.addRange(O,!0),P.length},this.selectMoreLines=function($,_){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,P=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(P.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(P.row+$,P.column);if(C.isEmpty())var F=L;else var T=this.session.documentToScreenPosition(O?C.end:C.start),F=this.session.screenToDocumentPosition(T.row+$,T.column);if(O){var D=g.fromPoints(L,F);D.cursor=D.start}else{var D=g.fromPoints(F,L);D.cursor=D.end}if(D.desiredColumn=P.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var M=C.cursor;this.selection.addRange(D),M&&this.selection.substractPoint(M)},this.transposeSelections=function($){for(var _=this.session,C=_.multiSelect,O=C.ranges,P=O.length;P--;){var L=O[P];if(L.isEmpty()){var T=_.getWordRange(L.start.row,L.start.column);L.start.row=T.start.row,L.start.column=T.start.column,L.end.row=T.end.row,L.end.column=T.end.column}}C.mergeOverlappingRanges();for(var F=[],P=O.length;P--;){var L=O[P];F.unshift(_.getTextRange(L))}$<0?F.unshift(F.pop()):F.push(F.shift());for(var P=O.length;P--;){var L=O[P],D=L.clone();_.replace(L,F[P]),L.start.row=D.start.row,L.start.column=D.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,_,C){var O=this.session,P=O.multiSelect,L=P.toOrientedRange();if(!(L.isEmpty()&&(L=O.getWordRange(L.start.row,L.start.column),L.cursor=$==-1?L.start:L.end,this.multiSelect.addRange(L),C))){var T=O.getTextRange(L),F=i(O,T,$);F&&(F.cursor=$==-1?F.start:F.end,this.session.unfold(F),this.multiSelect.addRange(F),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(L.cursor)}},this.alignCursors=function(){var $=this.session,_=$.multiSelect,C=_.ranges,O=-1,P=C.filter(function(G){if(G.cursor.row==O)return!0;O=G.cursor.row});if(!C.length||P.length==C.length-1){var L=this.selection.getRange(),T=L.start.row,F=L.end.row,D=T==F;if(D){var M=this.session.getLength(),S;do S=this.session.getLine(F);while(/[=:]/.test(S)&&++F<M);do S=this.session.getLine(T);while(/[=:]/.test(S)&&--T>0);T<0&&(T=0),F>=M&&(F=M-1)}var k=this.session.removeFullLines(T,F);k=this.$reAlignText(k,D),this.session.insert({row:T,column:0},k.join(`
945
+ `)+`
946
+ `),D||(L.start.column=0,L.end.column=k[k.length-1].length),this.selection.setRange(L)}else{P.forEach(function(G){_.substractPoint(G.cursor)});var N=0,j=1/0,U=C.map(function(G){var J=G.cursor,Q=$.getLine(J.row),le=Q.substr(J.column).search(/\S/g);return le==-1&&(le=0),J.column>N&&(N=J.column),le<j&&(j=le),le});C.forEach(function(G,J){var Q=G.cursor,le=N-Q.column,ie=U[J]-j;le>ie?$.insert(Q,s.stringRepeat(" ",le-ie)):$.remove(new g(Q.row,Q.column,Q.row,Q.column-le+ie)),G.start.column=G.end.column=N,G.start.row=G.end.row=Q.row,G.cursor=G.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,_){var C=!0,O=!0,P,L,T;return $.map(function(k){var N=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?P==null?(P=N[1].length,L=N[2].length,T=N[3].length,N):(P+L+T!=N[1].length+N[2].length+N[3].length&&(O=!1),P!=N[1].length&&(C=!1),P>N[1].length&&(P=N[1].length),L<N[2].length&&(L=N[2].length),T>N[3].length&&(T=N[3].length),N):[k]}).map(_?D:C?O?M:D:S);function F(k){return s.stringRepeat(" ",k)}function D(k){return k[2]?F(P)+k[2]+F(L-k[2].length+T)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function M(k){return k[2]?F(P+L-k[2].length)+k[2]+F(T)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function S(k){return k[2]?F(P)+k[2]+F(T)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(m.prototype);function b($,_){return $.row==_.row&&$.column==_.column}r.onSessionChange=function($){var _=$.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",l),$.commands.addCommands(a.defaultCommands),I($))}function I($){if(!$.textInput)return;var _=$.textInput.getElement(),C=!1;f.addListener(_,"keydown",function(P){var L=P.keyCode==18&&!(P.ctrlKey||P.shiftKey||P.metaKey);$.$blockSelectEnabled&&L?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},$),f.addListener(_,"keyup",O,$),f.addListener(_,"blur",O,$);function O(P){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,t("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function($){x(this),$?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,r,h){var d=t("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,l,f){var s=v.getLine(f);return this.foldingStartMarker.test(s)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(v,l,f){return null},this.indentationBlock=function(v,l,f){var s=/\S/,a=v.getLine(l),u=a.search(s);if(u!=-1){for(var p=f||a.length,i=v.getLength(),c=l,m=l;++l<i;){var b=v.getLine(l).search(s);if(b!=-1){if(b<=u){var x=v.getTokenAt(l,0);if(!x||x.type!=="string")break}m=l}}if(m>c){var I=v.getLine(m).length;return new d(c,p,m,I)}}},this.openingBracketBlock=function(v,l,f,s,a){var u={row:f,column:s+1},p=v.$findClosingBracket(l,u,a);if(p){var i=v.foldWidgets[p.row];return i==null&&(i=v.getFoldWidget(p.row)),i=="start"&&p.row>u.row&&(p.row--,p.column=v.getLine(p.row).length),d.fromPoints(u,p)}},this.closingBracketBlock=function(v,l,f,s,a){var u={row:f,column:s},p=v.$findOpeningBracket(l,u);if(p)return p.column++,u.column--,d.fromPoints(p,u)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,r,h){var d=t("../lib/dom"),g=t("../range").Range,v=t("../config").nls;function l(s,a,u){for(var p=0,i=s.length-1;p<=i;){var c=p+i>>1,m=u(a,s[c]);if(m>0)p=c+1;else if(m<0)i=c-1;else return c}return-(p+1)}function f(s,a,u){var p=s.getAnnotations().sort(g.comparePoints);if(p.length){var i=l(p,{row:a,column:-1},g.comparePoints);i<0&&(i=-i-1),i>=p.length?i=u>0?0:p.length-1:i===0&&u<0&&(i=p.length-1);var c=p[i];if(!(!c||!u)){if(c.row===a){do c=p[i+=u];while(c&&c.row===a);if(!c)return p.slice()}var m=[];a=c.row;do m[u<0?"unshift":"push"](c),c=p[i+=u];while(c&&c.row==a);return m.length&&m}}}r.showErrorMarker=function(s,a){var u=s.session,p=s.getCursorPosition(),i=p.row,c=u.widgetManager.getWidgetsAtRow(i).filter(function(P){return P.type=="errorMarker"})[0];c?c.destroy():i-=a;var m=f(u,i,a),b;if(m){var x=m[0];p.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,p.row=x.row,b=s.renderer.$gutterLayer.$annotations[p.row]}else{if(c)return;b={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(p.row),s.selection.moveToPosition(p);var I={row:p.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},$=I.el.appendChild(d.createElement("div")),_=I.el.appendChild(d.createElement("div"));_.className="error_widget_arrow "+b.className;var C=s.renderer.$cursorLayer.getPixelPosition(p).left;_.style.left=C+s.renderer.gutterWidth-5+"px",I.el.className="error_widget_wrapper",$.className="error_widget "+b.className,b.displayText.forEach(function(P,L){$.appendChild(d.createTextNode(P)),L<b.displayText.length-1&&$.appendChild(d.createElement("br"))}),$.appendChild(d.createElement("div"));var O=function(P,L,T){if(L===0&&(T==="esc"||T==="return"))return I.destroy(),{command:"null"}};I.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(O),u.widgetManager.removeLineWidget(I),s.off("changeSelection",I.destroy),s.off("changeSession",I.destroy),s.off("mouseup",I.destroy),s.off("change",I.destroy))},s.keyBinding.addKeyboardHandler(O),s.on("changeSelection",I.destroy),s.on("changeSession",I.destroy),s.on("mouseup",I.destroy),s.on("change",I.destroy),s.session.widgetManager.addLineWidget(I),I.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:I.el.offsetHeight})},d.importCssString(`
947
+ .error_widget_wrapper {
948
+ background: inherit;
949
+ color: inherit;
950
+ border:none
951
+ }
952
+ .error_widget {
953
+ border-top: solid 2px;
954
+ border-bottom: solid 2px;
955
+ margin: 5px 0;
956
+ padding: 10px 40px;
957
+ white-space: pre-wrap;
958
+ }
959
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
960
+ border-color: #ff5a5a
961
+ }
962
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
963
+ border-color: #F1D817
964
+ }
965
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
966
+ border-color: #5a5a5a
967
+ }
968
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
969
+ border-color: #5aaa5a
970
+ }
971
+ .error_widget_arrow {
972
+ position: absolute;
973
+ border: solid 5px;
974
+ border-top-color: transparent!important;
975
+ border-right-color: transparent!important;
976
+ border-left-color: transparent!important;
977
+ top: -5px;
978
+ }
979
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(t,r,h){t("./loader_build")(r);var d=t("./lib/dom"),g=t("./range").Range,v=t("./editor").Editor,l=t("./edit_session").EditSession,f=t("./undomanager").UndoManager,s=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(u,p){if(typeof u=="string"){var i=u;if(u=document.getElementById(i),!u)throw new Error("ace.edit can't find div #"+i)}if(u&&u.env&&u.env.editor instanceof v)return u.env.editor;var c="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;c=m.value,u=d.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(c=u.textContent,u.innerHTML="");var b=r.createEditSession(c),x=new v(new s(u),b,p),I={document:b,editor:x,onResize:x.resize.bind(x,null)};return m&&(I.textarea=m),x.on("destroy",function(){I.editor.container.env=null}),x.container.env=x.env=I,x},r.createEditSession=function(u,p){var i=new l(u,p);return i.setUndoManager(new f),i},r.Range=g,r.Editor=v,r.EditSession=l,r.UndoManager=f,r.VirtualRenderer=s;var a=r.config.version;r.version=a}),(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var h in t)t.hasOwnProperty(h)&&(r.ace[h]=t[h]);r.ace.default=r.ace,e&&(e.exports=r.ace)})})()})(dm)),dm.exports}var u3=ar("o",H_()),fm={exports:{}},gm;function U_(){return gm||(gm=1,(function(e,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,h){var d=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var l=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},p=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},c=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var 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",I="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":I,"variable.language":$,"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(P,L,T){T.length&&(T=[]);var F=P[P.length-1];return T.unshift(F,L),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(P,L,T){T.length&&(T=[]);var F=P[P.length-1];return T.unshift(F,L),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(P,L,T){T.length&&(T=[]);var F=P[P.length-1];return T.unshift(F,L),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(P,L,T){T.length&&(T=[]);var F=P[P.length-1];return T.unshift(F,L),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(P,L,T){T.length&&(T=[]);var F=P[P.length-1];return T.unshift(F,L),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,p,v,l,i,f,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(P,L,T){var F=P[2]=="-"||P[2]=="~"?"indentedHeredoc":"heredoc",D=P.split(this.splitRegex);return T.push(F,D[3]),[{type:"constant",value:D[1]},{type:"string",value:D[2]},{type:"support.class",value:D[3]},{type:"string",value:D[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(P,L,T){return P===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(P,L,T){return P===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(P,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:P}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(P,L,T){return this.next="",P=="}"&&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(P,L,T){return T.length&&P===T[0]?(T.unshift(P,L),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(P,L,T){return T.length&&P===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(P,L,T){return T.length&&P===T[0]?(T.unshift(P,L),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(P,L,T){return T.length&&P===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(P,L,T){return T.length&&P===T[0]?(T.unshift(P,L),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(P,L,T){return T.length&&P===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(P,L,T){return T.length&&P===T[0]?(T.unshift(P,L),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(P,L,T){return T.length&&P===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(P,L,T){return T.length&&P===T[0]?(T.unshift(P,L),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(P,L,T){return T.length&&P[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()};d.inherits(m,g),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,h){var d=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,l){return/^\s+$/.test(v)?/^\s*\}/.test(l):!1},this.autoOutdent=function(v,l){var f=v.getLine(l),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=v.findMatchingBracket({row:l,column:a});if(!u||u.row==l)return 0;var p=this.$getIndent(v.getLine(u.row));v.replace(new d(l,0,l,a-1),p)},this.$getIndent=function(v){return v.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(t,r,h){var d=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=t("../../range").Range,l=t("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};d.inherits(f,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(s,a,u){var p=s.getLine(u),i=this.foldingStartMarker.test(p),c=this.foldingStopMarker.test(p);if(i&&!c){var m=p.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(p)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(p)===!1)||m[1]=="when"&&/\sthen\s/.test(p)===!0)return;if(s.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||s.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!c||i&&c)return"";var m=p.match(this.foldingStopMarker);if(m[3]==="end"){if(s.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||s.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,u){var p=s.doc.getLine(u),i=this.foldingStartMarker.exec(p);if(i)return i[1]||i[3]?this.rubyBlock(s,u,i.index+2):this.openingBracketBlock(s,"{",u,i.index);var i=this.foldingStopMarker.exec(p);if(i)return i[3]==="end"&&s.getTokenAt(u,i.index+1).type==="keyword"?this.rubyBlock(s,u,i.index+1):i[1]==="=end"&&s.getTokenAt(u,i.index+1).type==="comment.multiline"?this.rubyBlock(s,u,i.index+1):this.closingBracketBlock(s,"}",u,i.index+i[0].length)},this.rubyBlock=function(s,a,u,p){var i=new l(s,a,u),c=i.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var m=c.value,b=s.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);if(!x.test(b))return;var I=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var I=1;break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");if(!x.test(b))return;var I=1;break;default:var I=this.indentKeywords[m]}var $=[m];if(I){var _=I===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,O=[];if(O.push(i.getCurrentTokenRange()),i.step=I===-1?i.stepBackward:i.stepForward,c.type=="comment.multiline"){for(;c=i.step();)if(c.type==="comment.multiline"){if(I==1){if(_=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=i.step();){var P=!1;if(c.type==="keyword"){var L=I*this.indentKeywords[c.value];switch(b=s.getLine(i.getCurrentTokenRow()),c.value){case"do":for(var T=i.$tokenIndex-1;T>=0;T--){var F=i.$rowTokens[T];if(F&&(F.value=="while"||F.value=="until"||F.value=="for")){L=0;break}}break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");(!x.test(b)||m=="case")&&(L=0,P=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);x.test(b)||(L=0,P=!0);break;case"when":(/\sthen\s/.test(b)||m=="case")&&(L=0,P=!0)}if(L>0)$.unshift(c.value);else if(L<=0&&P===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&c.value!="do"||c.value=="do"&&I==-1&&L!=0||c.value!="do"))break;L===0&&$.unshift(c.value)}}}if(!c)return null;if(p)return O.push(i.getCurrentTokenRange()),O;var a=i.getCurrentTokenRow();if(I===-1){if(c.type==="comment.multiline")var D=6;else var D=s.getLine(a).length;return new v(a,D,C-1,_)}return new v(C,_,a-1,s.getLine(a-1).length)}}}}).call(f.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(t,r,h){var d=t("../lib/oop"),g=t("./text").Mode,v=t("./ruby_highlight_rules").RubyHighlightRules,l=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../range").Range,s=t("./folding/ruby").FoldMode,a=function(){this.HighlightRules=v,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,p,i){var c=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,u),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return c;if(u=="start"){var x=p.match(/^.*[\{\(\[]\s*$/),I=p.match(/^\s*(class|def|module)\s.*$/),$=p.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=p.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||I||$||_)&&(c+=i)}return c},this.checkOutdent=function(u,p,i){return/^\s+(end|else|rescue|ensure)$/.test(p+i)||this.$outdent.checkOutdent(p,i)},this.autoOutdent=function(u,p,i){var c=p.getLine(i);if(/}/.test(c))return this.$outdent.autoOutdent(p,i);var m=this.$getIndent(c),b=p.getLine(i-1),x=this.$getIndent(b),I=p.getTabString();x.length<=m.length&&m.slice(-I.length)==I&&p.remove(new f(i,m.length-I.length,i,m.length))},this.getMatching=function(u,p,i){if(p==null){var c=u.selection.lead;i=c.column,p=c.row}var m=u.getTokenAt(p,i);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,p,i,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(t){e&&(e.exports=t)})})()})(fm)),fm.exports}U_();var mm={exports:{}},vm;function V_(){return vm||(vm=1,(function(e,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,h){var d=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){var l="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",f="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":f,keyword:l},"identifier"),u="[uU]?",p="[rR]",i="[fF]",c="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",I="(?:0[bB][01]+)",$="(?:"+m+"|"+b+"|"+x+"|"+I+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",P="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",L="(?:(?:"+P+"|"+O+")"+_+")",T="(?:"+L+"|"+P+")",F=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:p+'"{3}',next:"rawqqstring3"},{token:"string",regex:p+'"(?=.)',next:"rawqqstring"},{token:"string",regex:p+"'{3}",next:"rawqstring3"},{token:"string",regex:p+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:F},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:F},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:F},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:F},{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:F},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:F},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:F},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:F},{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:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(v,g),r.PythonHighlightRules=v}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,h){var d=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=r.FoldMode=function(l){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+l+")(?:\\s*)(?:#.*)?$")};d.inherits(v,g),(function(){this.getFoldWidgetRange=function(l,f,s){var a=l.getLine(s),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(l,u[1],s,u.index):u[2]?this.indentationBlock(l,s,u.index+u[2].length):this.indentationBlock(l,s)}}).call(v.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(t,r,h){var d=t("../lib/oop"),g=t("./text").Mode,v=t("./python_highlight_rules").PythonHighlightRules,l=t("./folding/pythonic").FoldMode,f=t("../range").Range,s=function(){this.HighlightRules=v,this.foldingRules=new l("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(s,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,p,i){var c=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,u),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return c;if(u=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(c+=i)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,p,i){if(i!==`\r
980
+ `&&i!=="\r"&&i!==`
981
+ `)return!1;var c=this.getTokenizer().getLineTokens(p.trim(),u).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,p,i){i+=1;var c=this.$getIndent(p.getLine(i)),m=p.getTabString();c.slice(-m.length)==m&&p.remove(new f(i,c.length-m.length,i,c.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/python"],function(t){e&&(e.exports=t)})})()})(mm)),mm.exports}V_();var ym={exports:{}},bm;function q_(){return bm||(bm=1,(function(e,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,h){var d=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};d.inherits(v,g),r.JsonHighlightRules=v}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,h){var d=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,l){return/^\s+$/.test(v)?/^\s*\}/.test(l):!1},this.autoOutdent=function(v,l){var f=v.getLine(l),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=v.findMatchingBracket({row:l,column:a});if(!u||u.row==l)return 0;var p=this.$getIndent(v.getLine(u.row));v.replace(new d(l,0,l,a-1),p)},this.$getIndent=function(v){return v.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(t,r,h){var d=t("../../lib/oop"),g=t("../../range").Range,v=t("./fold_mode").FoldMode,l=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};d.inherits(l,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,s,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var p=this._getFoldWidgetBase(f,s,a);return!p&&this.startRegionRe.test(u)?"start":p},this.getFoldWidgetRange=function(f,s,a,u){var p=f.getLine(a);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(f,p,a);var i=p.match(this.foldingStartMarker);if(i){var c=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,c);var m=f.getCommentFoldRange(a,c+i[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var i=p.match(this.foldingStopMarker);if(i){var c=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,c):f.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),u=a.search(/\S/),p=s,i=a.length;s+=1;for(var c=s,m=f.getLength();++s<m;){a=f.getLine(s);var b=a.search(/\S/);if(b!==-1){if(u>b)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=p)break;if(x.isMultiLine())s=x.end.row;else if(u==b)break}c=s}}return new g(p,i,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,s,a){for(var u=s.search(/\s*$/),p=f.getLength(),i=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<p;){s=f.getLine(a);var b=c.exec(s);if(b&&(b[1]?m--:m++,!m))break}var x=a;if(x>i)return new g(i,u,x,s.length)}}).call(l.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(t,r,h){var d=t("../lib/oop"),g=t("./text").Mode,v=t("./json_highlight_rules").JsonHighlightRules,l=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("./folding/cstyle").FoldMode,s=t("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=v,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};d.inherits(a,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,p,i){var c=this.$getIndent(p);if(u=="start"){var m=p.match(/^.*[\{\(\[]\s*$/);m&&(c+=i)}return c},this.checkOutdent=function(u,p,i){return this.$outdent.checkOutdent(p,i)},this.autoOutdent=function(u,p,i){this.$outdent.autoOutdent(p,i)},this.createWorker=function(u){var p=new s(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(u.getDocument()),p.on("annotate",function(i){u.setAnnotations(i.data)}),p.on("terminate",function(){u.clearAnnotations()}),p},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/json"],function(t){e&&(e.exports=t)})})()})(ym)),ym.exports}q_();var wm={exports:{}},xm;function G_(){return xm||(xm=1,(function(e,n){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(t,r,h){var d=t("../lib/oop");t("../lib/lang");var g=t("./text_highlight_rules").TextHighlightRules,v=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",l=r.supportFunction="rgb|rgba|url|attr|counter|counters",f=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",s=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var m=this.createKeywordMapper({"support.function":l,"support.constant":f,"support.type":v,"support.constant.color":s,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};d.inherits(c,g),r.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,h){var d=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},v.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};d.inherits(v,g),v.getTagRule=function(l){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},v.getStartRule=function(l){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:l}},v.getEndRule=function(l){return{token:"comment.doc",regex:"\\*\\/",next:l}},r.JsDocCommentHighlightRules=v}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(t,r,h){function d(){var u=s.replace("\\d","\\d\\-"),p={onMatch:function(c,m,b){var x=c.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):x==2&&m==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:c.slice(0,x)},{type:"meta.tag.tag-name.xml",value:c.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(p);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,p,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,m,b){return m==b[0]&&b.shift(),c.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:c}]},nextState:"jsx"},i,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(u){return[{token:"comment",regex:/\/\*/,next:[l.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[l.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var v=t("../lib/oop"),l=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=t("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(u){var p={"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"},i=this.createKeywordMapper(p,"identifier"),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",b="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(p).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[l.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:"("+s+")(\\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+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+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:"(?:"+c+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:i,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex: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:s},{regex:"",token:"empty",next:"no_regex"}],start:[l.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:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(I,$,_){if(this.next=I=="{"?this.nextState:"",I=="{"&&_.length)_.unshift("start",$);else if(I=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return I=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&d.call(this)),this.embedRules(l,"doc-",[l.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(a,f),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,h){var d=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(l){var f="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+f+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:f},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+f+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+f+":)?"+f+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===v&&this.normalizeRules()};(function(){this.embedTagRules=function(l,f,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,p){return p.splice(0),this.token}}],this.embedRules(l,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),d.inherits(v,g),r.XmlHighlightRules=v}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(t,r,h){var d=t("../lib/oop"),g=t("../lib/lang"),v=t("./css_highlight_rules").CssHighlightRules,l=t("./javascript_highlight_rules").JavaScriptHighlightRules,f=t("./xml_highlight_rules").XmlHighlightRules,s=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"}),a=function(){f.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,p){var i=s[p];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(i?"."+i:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(v,"css-","style"),this.embedTagRules(new l({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};d.inherits(a,f),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(t,r,h){var d=t("../config").$modes,g=t("../lib/oop"),v=t("../lib/lang"),l=t("./text_highlight_rules").TextHighlightRules,f=t("./html_highlight_rules").HtmlHighlightRules,s=function(u){return"(?:[^"+v.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){f.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,c,m,b){var x=i.match(/^(\s*)([`~]+)(.*)/),I=/[\w-]+|$/.exec(x[3])[0];return d[I]||(I=""),m.unshift("githubblock",[],[x[1],x[2],I],c),this.token},next:"githubblock"},p=[{token:"support.function",regex:".*",onMatch:function(i,c,m,b){var x=m[1],I=m[2][0],$=m[2][1],_=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(i);if(C&&C[1].length<I.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&d[_]){var O=d[_].getTokenizer().getLineTokens(i,x.slice(0));return m[1]=O.state,O.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(i){return"markup.heading."+i.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:p}),this.normalizeRules()};g.inherits(a,l),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,r,h){var d=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=t("../../range").Range,l=r.FoldMode=function(){};d.inherits(l,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,s,a){var u=f.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&f.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,s,a){function u(P){return I=f.getTokens(P)[0],I&&I.type.lastIndexOf($,0)===0}function p(){var P=I.value[0];return P=="="?6:P=="-"?5:7-I.value.search(/[^#]|$/)}var i=f.getLine(a),c=i.length,m=f.getLength(),b=a,x=a;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(f.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new v(b,c,a,0)}for(;a-- >0&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new v(a,i.length,b,0)}var I,$="markup.heading";if(u(a)){for(var _=p();++a<m;)if(u(a)){var C=p();if(C>=_)break}if(x=a-(!I||["=","-"].indexOf(I.value[0])==-1?1:2),x>b)for(;x>b&&/^\s*$/.test(f.getLine(x));)x--;if(x>b){var O=f.getLine(x).length;return new v(b,c,x,O)}}}}}).call(l.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,h){var d=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,l){return/^\s+$/.test(v)?/^\s*\}/.test(l):!1},this.autoOutdent=function(v,l){var f=v.getLine(l),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=v.findMatchingBracket({row:l,column:a});if(!u||u.row==l)return 0;var p=this.$getIndent(v.getLine(u.row));v.replace(new d(l,0,l,a-1),p)},this.$getIndent=function(v){return v.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(t,r,h){function d(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var g=t("../../lib/oop"),v=t("../behaviour").Behaviour,l=t("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(s,a,u,p,i){if(i=='"'||i=="'"){var c=i,m=p.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:c+m+c,selection:!1};var b=u.getCursorPosition(),x=p.doc.getLine(b.row),I=x.substring(b.column,b.column+1),$=new l(p,b.row,b.column),_=$.getCurrentToken();if(I==c&&(d(_,"attribute-value")||d(_,"string")))return{text:"",selection:[1,1]};if(_||(_=$.stepBackward()),!_)return;for(;d(_,"tag-whitespace")||d(_,"whitespace");)_=$.stepBackward();var C=!I||I.match(/\s/);if(d(_,"attribute-equals")&&(C||I==">")||d(_,"decl-attribute-equals")&&(C||I=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,u,p,i){var c=p.doc.getTextRange(i);if(!i.isMultiLine()&&(c=='"'||c=="'")){var m=p.doc.getLine(i.start.row),b=m.substring(i.start.column+1,i.start.column+2);if(b==c)return i.end.column++,i}}),this.add("autoclosing","insertion",function(s,a,u,p,i){if(i==">"){var c=u.getSelectionRange().start,m=new l(p,c.row,c.column),b=m.getCurrentToken()||m.stepBackward();if(!b||!(d(b,"tag-name")||d(b,"tag-whitespace")||d(b,"attribute-name")||d(b,"attribute-equals")||d(b,"attribute-value"))||d(b,"reference.attribute-value"))return;if(d(b,"attribute-value")){var x=m.getCurrentTokenColumn()+b.value.length;if(c.column<x)return;if(c.column==x){var I=m.stepForward();if(I&&d(I,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(p.getLine(c.row).slice(c.column)))return;for(;!d(b,"tag-name");)if(b=m.stepBackward(),b.value=="<"){b=m.stepForward();break}var $=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(d(m.stepBackward(),"end-tag-open"))return;var C=b.value;return $==c.row&&(C=C.substring(0,c.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,u,p,i){if(i==`
982
+ `){var c=u.getCursorPosition(),m=p.getLine(c.row),b=new l(p,c.row,c.column),x=b.getCurrentToken();if(d(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 I=x.value,$=b.getCurrentTokenRow();if(x=b.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[I]||!this.voidElements){var _=p.getTokenAt(c.row,c.column+1),m=p.getLine($),C=this.$getIndent(m),O=C+p.getTabString();return _&&_.value==="</"?{text:`
983
+ `+O+`
984
+ `+C,selection:[1,O.length,1,O.length]}:{text:`
985
+ `+O}}}}})};g.inherits(f,v),r.XmlBehaviour=f}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(t,r,h){var d=t("../../lib/oop"),g=t("../../token_iterator").TokenIterator,v=t("../behaviour/cstyle").CstyleBehaviour,l=t("../behaviour/xml").XmlBehaviour,f=function(){var s=new l({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(v),this.add("autoclosing-fragment","insertion",function(a,u,p,i,c){if(c==">"){var m=p.getSelectionRange().start,b=new g(i,m.row,m.column),x=b.getCurrentToken()||b.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};d.inherits(f,v),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,h){function d(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var g=t("../../lib/oop"),v=t("../../range").Range,l=t("./fold_mode").FoldMode,f=r.FoldMode=function(a,u){l.call(this),this.voidElements=a||{},this.optionalEndTags=g.mixin({},this.voidElements),u&&g.mixin(this.optionalEndTags,u)};g.inherits(f,l);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,p){var i=this._getFirstTagInLine(a,p);return i?i.closing||!i.tagName&&i.selfClosing?u==="markbeginend"?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(a,p,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(a,p)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var p=a.getTokens(u),i=new s,c=0;c<p.length;c++){var m=p[c];if(d(m,"tag-open")){if(i.end.column=i.start.column+m.value.length,i.closing=d(m,"end-tag-open"),m=p[++c],!m)return null;if(i.tagName=m.value,m.value===""){if(m=p[++c],!m)return null;i.tagName=m.value}for(i.end.column+=m.value.length,c++;c<p.length;c++)if(m=p[c],i.end.column+=m.value.length,d(m,"tag-close")){i.selfClosing=m.value=="/>";break}return i}if(d(m,"tag-close"))return i.selfClosing=m.value=="/>",i;i.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,u,p,i){for(var c=a.getTokens(u),m=0,b=0;b<c.length;b++){var x=c[b];if(m+=x.value.length,!(m<i-1)&&d(x,"end-tag-open")&&(x=c[b+1],d(x,"tag-name")&&x.value===""&&(x=c[b+2]),x&&x.value==p))return!0}return!1},this.getFoldWidgetRange=function(a,u,p){var i=this._getFirstTagInLine(a,p);if(!i)return this.getCommentFoldWidget(a,p)&&a.getCommentFoldRange(p,a.getLine(p).length);var c=a.getMatchingTags({row:p,column:0});if(c)return new v(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.closeTag.start.column)}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,h){var d=t("../../lib/oop"),g=t("../../range").Range,v=t("./fold_mode").FoldMode,l=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};d.inherits(l,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,s,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var p=this._getFoldWidgetBase(f,s,a);return!p&&this.startRegionRe.test(u)?"start":p},this.getFoldWidgetRange=function(f,s,a,u){var p=f.getLine(a);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(f,p,a);var i=p.match(this.foldingStartMarker);if(i){var c=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,c);var m=f.getCommentFoldRange(a,c+i[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var i=p.match(this.foldingStopMarker);if(i){var c=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,c):f.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),u=a.search(/\S/),p=s,i=a.length;s+=1;for(var c=s,m=f.getLength();++s<m;){a=f.getLine(s);var b=a.search(/\S/);if(b!==-1){if(u>b)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=p)break;if(x.isMultiLine())s=x.end.row;else if(u==b)break}c=s}}return new g(p,i,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,s,a){for(var u=s.search(/\s*$/),p=f.getLength(),i=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<p;){s=f.getLine(a);var b=c.exec(s);if(b&&(b[1]?m--:m++,!m))break}var x=a;if(x>i)return new g(i,u,x,s.length)}}).call(l.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,h){var d=t("../../lib/oop"),g=t("./xml").FoldMode,v=t("./cstyle").FoldMode,l=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new g};d.inherits(l,v),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,s,a){var u=this.getFoldWidgetBase(f,s,a);return u||this.xmlFoldMode.getFoldWidget(f,s,a)},this.getFoldWidgetRange=function(f,s,a,u){var p=this.getFoldWidgetRangeBase(f,s,a,u);return p||this.xmlFoldMode.getFoldWidgetRange(f,s,a)}}).call(l.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(t,r,h){var d=t("../lib/oop"),g=t("./text").Mode,v=t("./javascript_highlight_rules").JavaScriptHighlightRules,l=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,s=t("./behaviour/javascript").JavaScriptBehaviour,a=t("./folding/javascript").FoldMode,u=function(){this.HighlightRules=v,this.$outdent=new l,this.$behaviour=new s,this.foldingRules=new a};d.inherits(u,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,i,c){var m=this.$getIndent(i),b=this.getTokenizer().getLineTokens(i,p),x=b.tokens,I=b.state;if(x.length&&x[x.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var $=i.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(m+=c)}else if(p=="doc-start"&&(I=="start"||I=="no_regex"))return"";return m},this.checkOutdent=function(p,i,c){return this.$outdent.checkOutdent(i,c)},this.autoOutdent=function(p,i,c){this.$outdent.autoOutdent(i,c)},this.createWorker=function(p){var i=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return i.attachToDocument(p.getDocument()),i.on("annotate",function(c){p.setAnnotations(c.data)}),i.on("terminate",function(){p.clearAnnotations()}),i},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(t,r,h){var d={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 v=document.createElement("c").style;for(var l in v)if(typeof v[l]=="string"){var f=l.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});d.hasOwnProperty(f)||(d[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(v,l,f,s){if(this.completionsDefined||this.defineCompletions(),v==="ruleset"||l.$mode.$id=="ace/mode/scss"){var a=l.getLine(f.row).substr(0,f.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(v,l,f,s):this.getPropertyCompletions(v,l,f,s,u)}return[]},this.getPropertyCompletions=function(v,l,f,s,a){a=a||!1;var u=Object.keys(d);return u.map(function(p){return{caption:p,snippet:p+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(v,l,f,s){var a=l.getLine(f.row).substr(0,f.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var p=[];return u in d&&typeof d[u]=="object"&&(p=Object.keys(d[u])),p.map(function(i){return{caption:i,snippet:i,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(t,r,h){var d=t("../../lib/oop");t("../behaviour").Behaviour;var g=t("./cstyle").CstyleBehaviour,v=t("../../token_iterator").TokenIterator,l=function(){this.inherit(g),this.add("colon","insertion",function(f,s,a,u,p){if(p===":"&&a.selection.isEmpty()){var i=a.getCursorPosition(),c=new v(u,i.row,i.column),m=c.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=c.stepBackward()),m&&m.type==="support.type"){var b=u.doc.getLine(i.row),x=b.substring(i.column,i.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(i.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,s,a,u,p){var i=u.doc.getTextRange(p);if(!p.isMultiLine()&&i===":"){var c=a.getCursorPosition(),m=new v(u,c.row,c.column),b=m.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=m.stepBackward()),b&&b.type==="support.type"){var x=u.doc.getLine(p.start.row),I=x.substring(p.end.column,p.end.column+1);if(I===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(f,s,a,u,p){if(p===";"&&a.selection.isEmpty()){var i=a.getCursorPosition(),c=u.doc.getLine(i.row),m=c.substring(i.column,i.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,s,a,u,p){if(p==="!"&&a.selection.isEmpty()){var i=a.getCursorPosition(),c=u.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(c.substring(i.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(l,g),r.CssBehaviour=l}),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(t,r,h){var d=t("../lib/oop"),g=t("./text").Mode,v=t("./css_highlight_rules").CssHighlightRules,l=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,s=t("./css_completions").CssCompletions,a=t("./behaviour/css").CssBehaviour,u=t("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=v,this.$outdent=new l,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new u};d.inherits(p,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,c,m){var b=this.$getIndent(c),x=this.getTokenizer().getLineTokens(c,i).tokens;if(x.length&&x[x.length-1].type=="comment")return b;var I=c.match(/^.*\{\s*$/);return I&&(b+=m),b},this.checkOutdent=function(i,c,m){return this.$outdent.checkOutdent(c,m)},this.autoOutdent=function(i,c,m){this.$outdent.autoOutdent(c,m)},this.getCompletions=function(i,c,m,b){return this.$completer.getCompletions(i,c,m,b)},this.createWorker=function(i){var c=new f(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(i.getDocument()),c.on("annotate",function(m){i.setAnnotations(m.data)}),c.on("terminate",function(){i.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,h){var d=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=r.FoldMode=function(l,f){this.defaultMode=l,this.subModes=f};d.inherits(v,g),(function(){this.$getMode=function(l){typeof l!="string"&&(l=l[0]);for(var f in this.subModes)if(l.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(l,f,s,a){var u=this.$getMode(l);return u?u.getFoldWidget(f,s,a):""},this.getFoldWidget=function(l,f,s){return this.$tryMode(l.getState(s-1),l,f,s)||this.$tryMode(l.getState(s),l,f,s)||this.defaultMode.getFoldWidget(l,f,s)},this.getFoldWidgetRange=function(l,f,s){var a=this.$getMode(l.getState(s-1));return(!a||!a.getFoldWidget(l,f,s))&&(a=this.$getMode(l.getState(s))),(!a||!a.getFoldWidget(l,f,s))&&(a=this.defaultMode),a.getFoldWidgetRange(l,f,s)}}).call(v.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,h){var d=t("../../lib/oop"),g=t("./mixed").FoldMode,v=t("./xml").FoldMode,l=t("./cstyle").FoldMode,f=r.FoldMode=function(s,a){g.call(this,new v(s,a),{"js-":new l,"css-":new l})};d.inherits(f,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(t,r,h){function d(c,m){return c.type.lastIndexOf(m+".xml")>-1}function g(c,m){for(var b=new l(c,m.row,m.column),x=b.getCurrentToken();x&&!d(x,"tag-name");)x=b.stepBackward();if(x)return x.value}function v(c,m){for(var b=new l(c,m.row,m.column),x=b.getCurrentToken();x&&!d(x,"attribute-name");)x=b.stepBackward();if(x)return x.value}var l=t("../token_iterator").TokenIterator,f=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=f.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},p=Object.keys(u),i=function(){};(function(){this.getCompletions=function(c,m,b,x){var I=m.getTokenAt(b.row,b.column);if(!I)return[];if(d(I,"tag-name")||d(I,"tag-open")||d(I,"end-tag-open"))return this.getTagCompletions(c,m,b,x);if(d(I,"tag-whitespace")||d(I,"attribute-name"))return this.getAttributeCompletions(c,m,b,x);if(d(I,"attribute-value"))return this.getAttributeValueCompletions(c,m,b,x);var $=m.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(c,m,b,x):[]},this.getTagCompletions=function(c,m,b,x){return p.map(function(I){return{value:I,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,m,b,x){var I=g(m,b);if(!I)return[];var $=a;return I in u&&($=$.concat(Object.keys(u[I]))),$.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,m,b,x){var I=g(m,b),$=v(m,b);if(!I)return[];var _=[];return I in u&&$ in u[I]&&typeof u[I][$]=="object"&&(_=Object.keys(u[I][$])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,m,b,x){var I=["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 I.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(i.prototype),r.HtmlCompletions=i}),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(t,r,h){var d=t("../lib/oop"),g=t("../lib/lang"),v=t("./text").Mode,l=t("./javascript").Mode,f=t("./css").Mode,s=t("./html_highlight_rules").HtmlHighlightRules,a=t("./behaviour/xml").XmlBehaviour,u=t("./folding/html").FoldMode,p=t("./html_completions").HtmlCompletions,i=t("../worker/worker_client").WorkerClient,c=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=s,this.$behaviour=new a,this.$completer=new p,this.createModeDelegates({"js-":l,"css-":f}),this.foldingRules=new u(this.voidElements,g.arrayToMap(m))};d.inherits(b,v),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(c),this.getNextLineIndent=function(x,I,$){return this.$getIndent(I)},this.checkOutdent=function(x,I,$){return!1},this.getCompletions=function(x,I,$,_){return this.$completer.getCompletions(x,I,$,_)},this.createWorker=function(x){if(this.constructor==b){var I=new i(["ace"],"ace/mode/html_worker","Worker");return I.attachToDocument(x.getDocument()),this.fragmentContext&&I.call("setOptions",[{context:this.fragmentContext}]),I.on("error",function($){x.setAnnotations($.data)}),I.on("terminate",function(){x.clearAnnotations()}),I}},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(t,r,h){var d=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",l=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",f=function(){var s=this.createKeywordMapper({keyword:v,"support.function.builtin":l,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",p="(?:\\d+)",i="(?:(?:"+p+"?"+u+")|(?:"+p+"\\.))",c="(?:(?:"+i+"|"+p+"))",m="(?:"+c+"|"+i+")",b="(?:&"+p+")",x="[a-zA-Z_][a-zA-Z0-9_]*",I="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+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,P){var L=C[2]=="-"?"indentedHeredoc":"heredoc",T=C.split(this.splitRegex);return P.push(L,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,P){return C===P[1]?(P.shift(),P.shift(),this.next=P[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,P){return C===P[1]?(P.shift(),P.shift(),this.next=P[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,O){return O[0]==="heredoc"||O[0]==="indentedHeredoc"?O[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:I},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:b},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:a+"\\b"},{token:s,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};d.inherits(f,g),r.ShHighlightRules=f}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(t,r,h){var d=t("../lib/oop"),g=t("./text").Mode,v=t("./sh_highlight_rules").ShHighlightRules,l=t("../range").Range,f=t("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=v,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};d.inherits(s,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,p,i){var c=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,u),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return c;if(u=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(c+=i)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,p,i){if(i!==`\r
986
+ `&&i!=="\r"&&i!==`
987
+ `)return!1;var c=this.getTokenizer().getLineTokens(p.trim(),u).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,p,i){i+=1;var c=this.$getIndent(p.getLine(i)),m=p.getTabString();c.slice(-m.length)==m&&p.remove(new l(i,c.length-m.length,i,c.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),r.Mode=s}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(t,r,h){var d=t("../lib/oop"),g=t("../lib/lang"),v=t("./text").Mode,l=t("./xml_highlight_rules").XmlHighlightRules,f=t("./behaviour/xml").XmlBehaviour,s=t("./folding/xml").FoldMode,a=t("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=l,this.$behaviour=new f,this.foldingRules=new s};d.inherits(u,v),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(p){var i=new a(["ace"],"ace/mode/xml_worker","Worker");return i.attachToDocument(p.getDocument()),i.on("error",function(c){p.setAnnotations(c.data)}),i.on("terminate",function(){p.clearAnnotations()}),i},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(t,r,h){var d=t("../lib/oop"),g=t("./behaviour/cstyle").CstyleBehaviour,v=t("./text").Mode,l=t("./markdown_highlight_rules").MarkdownHighlightRules,f=t("./folding/markdown").FoldMode,s=function(){this.HighlightRules=l,this.createModeDelegates({javascript:t("./javascript").Mode,html:t("./html").Mode,bash:t("./sh").Mode,sh:t("./sh").Mode,xml:t("./xml").Mode,css:t("./css").Mode}),this.foldingRules=new f,this.$behaviour=new g({braces:!0})};d.inherits(s,v),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,p){if(a=="listblock"){var i=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!i)return"";var c=i[2];return c||(c=parseInt(i[3],10)+1+"."),i[1]+c+i[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/markdown"],function(t){e&&(e.exports=t)})})()})(wm)),wm.exports}G_();var Cm={exports:{}},_m;function K_(){return _m||(_m=1,(function(e,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(t,r,h){h.exports=`.ace-twilight .ace_gutter {
988
+ background: #232323;
989
+ color: #E2E2E2
990
+ }
991
+
992
+ .ace-twilight .ace_print-margin {
993
+ width: 1px;
994
+ background: #232323
995
+ }
996
+
997
+ .ace-twilight {
998
+ background-color: #141414;
999
+ color: #F8F8F8
1000
+ }
1001
+
1002
+ .ace-twilight .ace_cursor {
1003
+ color: #A7A7A7
1004
+ }
1005
+
1006
+ .ace-twilight .ace_marker-layer .ace_selection {
1007
+ background: rgba(221, 240, 255, 0.20)
1008
+ }
1009
+
1010
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1011
+ box-shadow: 0 0 3px 0px #141414;
1012
+ }
1013
+
1014
+ .ace-twilight .ace_marker-layer .ace_step {
1015
+ background: rgb(102, 82, 0)
1016
+ }
1017
+
1018
+ .ace-twilight .ace_marker-layer .ace_bracket {
1019
+ margin: -1px 0 0 -1px;
1020
+ border: 1px solid rgba(255, 255, 255, 0.25)
1021
+ }
1022
+
1023
+ .ace-twilight .ace_marker-layer .ace_active-line {
1024
+ background: rgba(255, 255, 255, 0.031)
1025
+ }
1026
+
1027
+ .ace-twilight .ace_gutter-active-line {
1028
+ background-color: rgba(255, 255, 255, 0.031)
1029
+ }
1030
+
1031
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1032
+ border: 1px solid rgba(221, 240, 255, 0.20)
1033
+ }
1034
+
1035
+ .ace-twilight .ace_invisible {
1036
+ color: rgba(255, 255, 255, 0.25)
1037
+ }
1038
+
1039
+ .ace-twilight .ace_keyword,
1040
+ .ace-twilight .ace_meta {
1041
+ color: #CDA869
1042
+ }
1043
+
1044
+ .ace-twilight .ace_constant,
1045
+ .ace-twilight .ace_constant.ace_character,
1046
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1047
+ .ace-twilight .ace_constant.ace_other,
1048
+ .ace-twilight .ace_heading,
1049
+ .ace-twilight .ace_markup.ace_heading,
1050
+ .ace-twilight .ace_support.ace_constant {
1051
+ color: #CF6A4C
1052
+ }
1053
+
1054
+ .ace-twilight .ace_invalid.ace_illegal {
1055
+ color: #F8F8F8;
1056
+ background-color: rgba(86, 45, 86, 0.75)
1057
+ }
1058
+
1059
+ .ace-twilight .ace_invalid.ace_deprecated {
1060
+ text-decoration: underline;
1061
+ font-style: italic;
1062
+ color: #D2A8A1
1063
+ }
1064
+
1065
+ .ace-twilight .ace_support {
1066
+ color: #9B859D
1067
+ }
1068
+
1069
+ .ace-twilight .ace_fold {
1070
+ background-color: #AC885B;
1071
+ border-color: #F8F8F8
1072
+ }
1073
+
1074
+ .ace-twilight .ace_support.ace_function {
1075
+ color: #DAD085
1076
+ }
1077
+
1078
+ .ace-twilight .ace_list,
1079
+ .ace-twilight .ace_markup.ace_list,
1080
+ .ace-twilight .ace_storage {
1081
+ color: #F9EE98
1082
+ }
1083
+
1084
+ .ace-twilight .ace_entity.ace_name.ace_function,
1085
+ .ace-twilight .ace_meta.ace_tag {
1086
+ color: #AC885B
1087
+ }
1088
+
1089
+ .ace-twilight .ace_string {
1090
+ color: #8F9D6A
1091
+ }
1092
+
1093
+ .ace-twilight .ace_string.ace_regexp {
1094
+ color: #E9C062
1095
+ }
1096
+
1097
+ .ace-twilight .ace_comment {
1098
+ font-style: italic;
1099
+ color: #5F5A60
1100
+ }
1101
+
1102
+ .ace-twilight .ace_variable {
1103
+ color: #7587A6
1104
+ }
1105
+
1106
+ .ace-twilight .ace_xml-pe {
1107
+ color: #494949
1108
+ }
1109
+
1110
+ .ace-twilight .ace_indent-guide {
1111
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1112
+ }
1113
+
1114
+ .ace-twilight .ace_indent-guide-active {
1115
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1116
+ }
1117
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(t,r,h){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=t("./twilight-css");var d=t("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(t){e&&(e.exports=t)})})()})(Cm)),Cm.exports}K_();var km={exports:{}},Am;function Y_(){return Am||(Am=1,(function(e,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(t,r,h){function d(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var g=t("./lib/dom"),v=t("./lib/oop"),l=t("./lib/event_emitter").EventEmitter,f=t("./lib/lang"),s=t("./range").Range,a=t("./range_list").RangeList,u=t("./keyboard/hash_handler").HashHandler,p=t("./tokenizer").Tokenizer,i=t("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,P){var L=C.session.getTextRange();return P?L.replace(/\n\r?([ \t]*\S)/g,`
1118
+ `+P+"$1"):L},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 i.getText&&i.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:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(T){return T=T.substr(1),/^\d+$/.test(T)?[{tabstopId:parseInt(T,10)}]:[{text:T}]}function P(T){return"(?:[^\\\\"+T+"]|\\\\.)"}var L={regex:"/("+P("/")+"+)/",onMatch:function(T,F,D){var M=D[0];return M.fmtString=!0,M.guard=T.slice(1,-1),M.flag="",""},next:"formatString"};return C.$tokenizer=new p({start:[{regex:/\\./,onMatch:function(T,F,D){var M=T[1];return(M=="}"&&D.length||"`$\\".indexOf(M)!=-1)&&(T=M),[T]}},{regex:/}/,onMatch:function(T,F,D){return[D.length?D.shift():T]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(T,F,D){var M=O(T.substr(1));return D.unshift(M[0]),M},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+P("\\|")+"*\\|",onMatch:function(T,F,D){var M=T.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return D[0].choices=M,[M[0]]},next:"start"},L,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(T,F,D){return D.length&&D[0].expectElse?(D[0].expectElse=!1,D[0].ifEnd={elseEnd:D[0]},[D[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(T,F,D){var M=T[1];return M=="}"&&D.length||"`$\\".indexOf(M)!=-1?T=M:M=="n"?T=`
1119
+ `:M=="t"?T=" ":"ulULE".indexOf(M)!=-1&&(T={changeCase:M,local:M>"a"}),[T]}},{regex:"/\\w*}",onMatch:function(T,F,D){var M=D.shift();return M&&(M.flag=T.slice(1,-1)),this.next=M&&M.tabstopId?"start":"",[M||T]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(T,F,D){return[{text:T.slice(1)}]}},{regex:/\${\w+/,onMatch:function(T,F,D){var M={text:T.slice(2)};return D.unshift(M),[M]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(T,F,D){var M=D.shift();return this.next=M&&M.tabstopId?"start":"",[M||T]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(T,F,D){var M=D[0];return M.formatFunction=T.slice(2,-1),[D.shift()]},next:"formatString"},L,{regex:/:[\?\-+]?/,onMatch:function(T,F,D){T[1]=="+"&&(D[0].ifEnd=D[0]),T[1]=="?"&&(D[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,P){return this.getTokenizer().getLineTokens(O,P).tokens.map(function(L){return L.value||L})},C.prototype.getVariableValue=function(O,P,L){if(/^\d+$/.test(P))return(this.variables.__||{})[P]||"";if(/^[A-Z]\d+$/.test(P))return(this.variables[P[0]+"__"]||{})[P.substr(1)]||"";if(P=P.replace(/^TM_/,""),!this.variables.hasOwnProperty(P))return"";var T=this.variables[P];return typeof T=="function"&&(T=this.variables[P](O,P,L)),T??""},C.prototype.tmStrFormat=function(O,P,L){if(!P.fmt)return O;var T=P.flag||"",F=P.guard;F=new RegExp(F,T.replace(/[^gim]/g,""));var D=typeof P.fmt=="string"?this.tokenizeTmSnippet(P.fmt,"formatString"):P.fmt,M=this,S=O.replace(F,function(){var k=M.variables.__;M.variables.__=[].slice.call(arguments);for(var N=M.resolveVariables(D,L),j="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&&(j=G.changeCase);else j=="U"?N[U]=G.toUpperCase():j=="L"&&(N[U]=G.toLowerCase())}return M.variables.__=k,N.join("")});return S},C.prototype.tmFormatFunction=function(O,P,L){return P.formatFunction=="upcase"?O.toUpperCase():P.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,P){function L(j){var U=O.indexOf(j,M+1);U!=-1&&(M=U)}for(var T=[],F="",D=!0,M=0;M<O.length;M++){var S=O[M];if(typeof S=="string"){T.push(S),S==`
1120
+ `?(D=!0,F=""):D&&(F=/^\t*/.exec(S)[0],D=/\S/.test(S));continue}if(S){if(D=!1,S.fmtString){var k=O.indexOf(S,M+1);k==-1&&(k=O.length),S.fmt=O.slice(M+1,k),M=k}if(S.text){var N=this.getVariableValue(P,S.text,F)+"";S.fmtString&&(N=this.tmStrFormat(N,S,P)),S.formatFunction&&(N=this.tmFormatFunction(N,S,P)),N&&!S.ifEnd?(T.push(N),L(S)):!N&&S.ifEnd&&L(S.ifEnd)}else S.elseEnd?L(S.elseEnd):(S.tabstopId!=null||S.changeCase!=null)&&T.push(S)}}return T},C.prototype.getDisplayTextForSnippet=function(O,P){var L=b.call(this,O,P);return L.text},C.prototype.insertSnippetForSelection=function(O,P,L){L===void 0&&(L={});var T=b.call(this,O,P,L),F=O.getSelectionRange(),D=O.session.replace(F,T.text),M=new x(O),S=O.inVirtualSelectionMode&&O.selection.index;M.addTabstops(T.tabstops,F.start,D,S)},C.prototype.insertSnippet=function(O,P,L){L===void 0&&(L={});var T=this;if(O.inVirtualSelectionMode)return T.insertSnippetForSelection(O,P,L);O.forEachSelection(function(){T.insertSnippetForSelection(O,P,L)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var P=O.session.$mode.$id||"";if(P=P.split("/").pop(),P==="html"||P==="php"){P==="php"&&!O.session.$mode.inlinePhp&&(P="html");var L=O.getCursorPosition(),T=O.session.getState(L.row);typeof T=="object"&&(T=T[0]),T.substring&&(T.substring(0,3)=="js-"?P="javascript":T.substring(0,4)=="css-"?P="css":T.substring(0,4)=="php-"&&(P="php"))}return P},C.prototype.getActiveScopes=function(O){var P=this.$getScope(O),L=[P],T=this.snippetMap;return T[P]&&T[P].includeScopes&&L.push.apply(L,T[P].includeScopes),L.push("_"),L},C.prototype.expandWithTab=function(O,P){var L=this,T=O.forEachSelection(function(){return L.expandSnippetForSelection(O,P)},null,{keepOrder:!0});return T&&O.tabstopManager&&O.tabstopManager.tabNext(),T},C.prototype.expandSnippetForSelection=function(O,P){var L=O.getCursorPosition(),T=O.session.getLine(L.row),F=T.substring(0,L.column),D=T.substr(L.column),M=this.snippetMap,S;return this.getActiveScopes(O).some(function(k){var N=M[k];return N&&(S=this.findMatchingSnippet(N,F,D)),!!S},this),S?(P&&P.dryRun||(O.session.doc.removeInLine(L.row,L.column-S.replaceBefore.length,L.column+S.replaceAfter.length),this.variables.M__=S.matchBefore,this.variables.T__=S.matchAfter,this.insertSnippetForSelection(O,S.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,P,L){for(var T=O.length;T--;){var F=O[T];if(!(F.startRe&&!F.startRe.test(P))&&!(F.endRe&&!F.endRe.test(L))&&!(!F.startRe&&!F.endRe))return F.matchBefore=F.startRe?F.startRe.exec(P):[""],F.matchAfter=F.endRe?F.endRe.exec(L):[""],F.replaceBefore=F.triggerRe?F.triggerRe.exec(P)[0]:"",F.replaceAfter=F.endTriggerRe?F.endTriggerRe.exec(L)[0]:"",F}},C.prototype.register=function(O,P){function L(k){return k&&!/^\^?\(.*\)\$?$|^\\b$/.test(k)&&(k="(?:"+k+")"),k||""}function T(k,N,j){return k=L(k),N=L(N),k=N+k,k&&k[k.length-1]!="$"&&(k+="$"),new RegExp(k)}function F(k){k.scope||(k.scope=P||"_"),P=k.scope,D[P]||(D[P]=[],M[P]={});var N=M[P];if(k.name){var j=N[k.name];j&&S.unregister(j),N[k.name]=k}D[P].push(k),k.prefix&&(k.tabTrigger=k.prefix),!k.content&&k.body&&(k.content=Array.isArray(k.body)?k.body.join(`
1121
+ `):k.body),k.tabTrigger&&!k.trigger&&(!k.guard&&/^\w/.test(k.tabTrigger)&&(k.guard="\\b"),k.trigger=f.escapeRegExp(k.tabTrigger)),!(!k.trigger&&!k.guard&&!k.endTrigger&&!k.endGuard)&&(k.startRe=T(k.trigger,k.guard),k.triggerRe=new RegExp(k.trigger),k.endRe=T(k.endTrigger,k.endGuard),k.endTriggerRe=new RegExp(k.endTrigger))}var D=this.snippetMap,M=this.snippetNameMap,S=this;O||(O=[]),Array.isArray(O)?O.forEach(F):Object.keys(O).forEach(function(k){F(O[k])}),this._signal("registerSnippets",{scope:P})},C.prototype.unregister=function(O,P){function L(D){var M=F[D.scope||P];if(M&&M[D.name]){delete M[D.name];var S=T[D.scope||P],k=S&&S.indexOf(D);k>=0&&S.splice(k,1)}}var T=this.snippetMap,F=this.snippetNameMap;O.content?L(O):Array.isArray(O)&&O.forEach(L)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var P=[],L={},T=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,F;F=T.exec(O);){if(F[1])try{L=JSON.parse(F[1]),P.push(L)}catch{}if(F[4])L.content=F[4].replace(/^\t/gm,""),P.push(L),L={};else{var D=F[2],M=F[3];if(D=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;L.guard=S.exec(M)[1],L.trigger=S.exec(M)[1],L.endTrigger=S.exec(M)[1],L.endGuard=S.exec(M)[1]}else D=="snippet"?(L.tabTrigger=M.match(/^\S*/)[0],L.name||(L.name=M)):D&&(L[D]=M)}}return P},C.prototype.getSnippetByName=function(O,P){var L=this.snippetNameMap,T;return this.getActiveScopes(P).some(function(F){var D=L[F];return D&&(T=D[O]),!!T},this),T},C})();v.implement(m.prototype,l);var b=function(C,O,P){function L(oe){for(var re=[],Ce=0;Ce<oe.length;Ce++){var ke=oe[Ce];if(typeof ke=="object"){if(N[ke.tabstopId])continue;var Ee=oe.lastIndexOf(ke,Ce-1);ke=re[Ee]||{tabstopId:ke.tabstopId}}re[Ce]=ke}return re}P===void 0&&(P={});var T=C.getCursorPosition(),F=C.session.getLine(T.row),D=C.session.getTabString(),M=F.match(/^\s*/)[0];T.column<M.length&&(M=M.slice(0,T.column)),O=O.replace(/\r/g,"");var S=this.tokenizeTmSnippet(O);S=this.resolveVariables(S,C),S=S.map(function(oe){return oe==`
1122
+ `&&!P.excludeExtraIndent?oe+M:typeof oe=="string"?oe.replace(/\t/g,D):oe});var k=[];S.forEach(function(oe,re){if(typeof oe=="object"){var Ce=oe.tabstopId,ke=k[Ce];if(ke||(ke=k[Ce]=[],ke.index=Ce,ke.value="",ke.parents={}),ke.indexOf(oe)===-1){oe.choices&&!ke.choices&&(ke.choices=oe.choices),ke.push(oe);var Ee=S.indexOf(oe,re+1);if(Ee!==-1){var Ve=S.slice(re+1,Ee),Me=Ve.some(function(ot){return typeof ot=="object"});Me&&!ke.value?ke.value=Ve:Ve.length&&(!ke.value||typeof ke.value!="string")&&(ke.value=Ve.join(""))}}}}),k.forEach(function(oe){oe.length=0});for(var N={},j=0;j<S.length;j++){var U=S[j];if(typeof U=="object"){var G=U.tabstopId,J=k[G],Q=S.indexOf(U,j+1);if(N[G]){N[G]===U&&(delete N[G],Object.keys(N).forEach(function(oe){J.parents[oe]=!0}));continue}N[G]=U;var le=J.value;typeof le!="string"?le=L(le):U.fmt&&(le=this.tmStrFormat(le,U,C)),S.splice.apply(S,[j+1,Math.max(0,Q-j)].concat(le,U)),J.indexOf(U)===-1&&J.push(U)}}var ie=0,ue=0,pe="";return S.forEach(function(oe){if(typeof oe=="string"){var re=oe.split(`
1123
+ `);re.length>1?(ue=re[re.length-1].length,ie+=re.length-1):ue+=oe.length,pe+=oe}else oe&&(oe.start?oe.end={row:ie,column:ue}:oe.start={row:ie,column:ue})}),{text:pe,tabstops:k,tokens:S}},x=(function(){function C(O){if(this.index=0,this.ranges=[],this.tabstops=[],O.tabstopManager)return O.tabstopManager;O.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(O)}return C.prototype.attach=function(O){this.$openTabstops=null,this.selectedTabstop=null,this.editor=O,this.session=O.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(O){for(var P=O.action[0]=="r",L=this.selectedTabstop||{},T=L.parents||{},F=this.tabstops.slice(),D=0;D<F.length;D++){var M=F[D],S=M==L||T[M.index];if(M.rangeList.$bias=S?0:1,O.action=="remove"&&M!==L){var k=M.parents&&M.parents[L.index],N=M.rangeList.pointIndex(O.start,k);N=N<0?-N-1:N+1;var j=M.rangeList.pointIndex(O.end,k);j=j<0?-j-1:j-1;for(var U=M.rangeList.ranges.slice(N,j),G=0;G<U.length;G++)this.removeRange(U[G])}M.rangeList.$onChange(O)}var J=this.session;!this.$inChange&&P&&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 P=this.session,L=P.getTextRange(O.firstNonLinked),T=0;T<O.length;T++){var F=O[T];if(F.linked){var D=F.original,M=r.snippetManager.tmStrFormat(L,D,this.editor);P.replace(F,M)}}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,P=this.editor.selection.anchor,L=this.editor.selection.isEmpty(),T=0;T<this.ranges.length;T++)if(!this.ranges[T].linked){var F=this.ranges[T].contains(O.row,O.column),D=L||this.ranges[T].contains(P.row,P.column);if(F&&D)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var P=this.tabstops.length,L=this.index+(O||1);L=Math.min(Math.max(L,1),P),L==P&&(L=0),this.selectTabstop(L),this.updateTabstopMarkers(),L===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var P=this.tabstops[this.index];if(P&&this.addTabstopMarkers(P),this.index=O,P=this.tabstops[this.index],!(!P||!P.length)){this.selectedTabstop=P;var L=P.firstNonLinked||P;if(P.choices&&(L.cursor=L.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(L);else{var T=this.editor.multiSelect;T.toSingleRange(L);for(var F=0;F<P.length;F++)P.hasLinkedRanges&&P[F].linked||T.addRange(P[F].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,P,L){var T=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var F=s.fromPoints(L,L);$(F.start,P),$(F.end,P),O[0]=[F],O[0].index=0}var D=this.index,M=[D+1,0],S=this.ranges,k=this.snippetId=(this.snippetId||0)+1;O.forEach(function(N,j){var U=this.$openTabstops[j]||N;U.snippetId=k;for(var G=0;G<N.length;G++){var J=N[G],Q=s.fromPoints(J.start,J.end||J.start);I(Q.start,P),I(Q.end,P),Q.original=J,Q.tabstop=U,S.push(Q),U!=N?U.unshift(Q):U[G]=Q,J.fmtString||U.firstNonLinked&&T?(Q.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=Q)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(M.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),M.length>2&&(this.tabstops.length&&M.push(M.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,M))},C.prototype.addTabstopMarkers=function(O){var P=this.session;O.forEach(function(L){L.markerId||(L.markerId=P.addMarker(L,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var P=this.session;O.forEach(function(L){P.removeMarker(L.markerId),L.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var O=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&O--,this.tabstops.forEach(function(P){P.snippetId===O?this.addTabstopMarkers(P):this.removeTabstopMarkers(P)},this)}},C.prototype.removeRange=function(O){var P=O.tabstop.indexOf(O);P!=-1&&O.tabstop.splice(P,1),P=this.ranges.indexOf(O),P!=-1&&this.ranges.splice(P,1),P=O.tabstop.rangeList.ranges.indexOf(O),P!=-1&&O.tabstop.splice(P,1),this.session.removeMarker(O.markerId),O.tabstop.length||(P=this.tabstops.indexOf(O.tabstop),P!=-1&&this.tabstops.splice(P,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new u,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var I=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},$=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};g.importCssString(`
1124
+ .ace_snippet-marker {
1125
+ -moz-box-sizing: border-box;
1126
+ box-sizing: border-box;
1127
+ background: rgba(194, 193, 208, 0.09);
1128
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1129
+ position: absolute;
1130
+ }`,"snippets.css",!1),r.snippetManager=new m;var _=t("./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(_.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(t,r,h){var d=t("../virtual_renderer").VirtualRenderer,g=t("../editor").Editor,v=t("../range").Range,l=t("../lib/event"),f=t("../lib/lang"),s=t("../lib/dom"),a=t("../config").nls,u=t("./../lib/useragent"),p=function(I){return"suggest-aria-id:".concat(I)},i=u.isSafari?"menu":"listbox",c=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",b=function(I){var $=new d(I);$.$maxLines=4;var _=new g($);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=(function(){function I($){var _=s.createElement("div"),C=b(_);$&&$.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",i),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var O=function(){};C.focus=O,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=O,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(S){var k=S.getDocumentPosition();C.selection.moveToPosition(k),T.start.row=T.end.row=k.row,S.stop()});var P,L=new v(-1,0,-1,1/0),T=new v(-1,0,-1,1/0);T.id=C.session.addMarker(T,"ace_active-line","fullLine"),C.setSelectOnHover=function(S){S?L.id&&(C.session.removeMarker(L.id),L.id=null):L.id=C.session.addMarker(L,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(S){if(!P){P=S;return}if(!(P.x==S.x&&P.y==S.y)){P=S,P.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var k=P.getDocumentPosition().row;L.start.row!=k&&(L.id||C.setRow(k),D(k))}}),C.renderer.on("beforeRender",function(){if(P&&L.start.row!=-1){P.$pos=null;var S=P.getDocumentPosition().row;L.id||C.setRow(S),D(S,!0)}}),C.renderer.on("afterRender",function(){for(var S=C.renderer.$textLayer,k=S.config.firstRow,N=S.config.lastRow;k<=N;k++){var j=S.element.childNodes[k-S.config.firstRow];j.setAttribute("role",c),j.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",C.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",k+1);var U=C.getData(k);if(U){var G="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",G)}var J=j.querySelectorAll(".ace_completion-highlight");J.forEach(function(Q){Q.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var S=C.getRow(),k=C.renderer.$textLayer,N=k.element.childNodes[S-k.config.firstRow],j=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=p(S);s.addCssClass(N,"ace_selected"),N.id=U,k.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),N.setAttribute(m,"true")}});var F=function(){D(-1)},D=function(S,k){S!==L.start.row&&(L.start.row=L.end.row=S,k||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return L.start.row},l.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,F()}),C.on("hide",F),C.on("changeSelection",F),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(S){var k=C.data[S];return typeof k=="string"?k:k&&k.value||""};var M=C.session.bgTokenizer;return M.$tokenizeRow=function(S){function k(oe,re){oe&&j.push({type:(N.className||"")+(re||""),value:oe})}var N=C.data[S],j=[];if(!N)return j;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,G=U.toLowerCase(),J=(C.filterText||"").toLowerCase(),Q=0,le=0,ie=0;ie<=J.length;ie++)if(ie!=le&&(N.matchMask&1<<ie||ie==J.length)){var ue=J.slice(le,ie);le=ie;var pe=G.indexOf(ue,Q);if(pe==-1)continue;k(U.slice(Q,pe),""),Q=pe+ue.length,k(U.slice(pe,Q),"completion-highlight")}return k(U.slice(Q,U.length),""),j.push({type:"completion-spacer",value:" "}),N.meta&&j.push({type:"completion-meta",value:N.meta}),N.message&&j.push({type:"completion-message",value:N.message}),j},M.$updateOnChange=O,M.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(S,k){C.filterText=k||"",C.setValue(f.stringRepeat(`
1131
+ `,S.length),-1),C.data=S||[],C.setRow(0)},C.getData=function(S){return C.data[S]},C.getRow=function(){return T.start.row},C.setRow=function(S){S=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,S)),T.start.row!=S&&(C.selection.clearSelection(),T.start.row=T.end.row=S||0,C.session._emit("changeBackMarker"),C.moveCursorTo(S||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(S,k,N,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===S.top&&C.anchorPos.left===S.left&&C.anchor===N)return!0;var U=this.container,G=this.renderer.scrollBar.width||10,J=window.innerHeight-G,Q=window.innerWidth-G,le=this.renderer,ie=le.$maxLines*k*1.4,ue={top:0,bottom:0},pe=J-S.top-3*this.$borderSize-k,oe=S.top-3*this.$borderSize;N||(oe<=pe||pe>=ie?N="bottom":N="top"),N==="top"?(ue.bottom=S.top-this.$borderSize,ue.top=ue.bottom-ie):N==="bottom"&&(ue.top=S.top+k+this.$borderSize,ue.bottom=ue.top+ie);var re=ue.top>=0&&ue.bottom<=J;if(!j&&!re)return!1;re?le.$maxPixelHeight=null:N==="top"?le.$maxPixelHeight=oe:le.$maxPixelHeight=pe,N==="top"?(U.style.top="",U.style.bottom=J+G-ue.bottom+"px",C.isTopdown=!1):(U.style.top=ue.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var Ce=S.left;return Ce+U.offsetWidth>Q&&(Ce=Q-U.offsetWidth),U.style.left=Ce+"px",U.style.right="",s.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),P=null),C.anchorPos=S,C.anchor=N,!0},C.show=function(S,k,N){this.tryShow(S,k,N?"bottom":void 0,!0)},C.goTo=function(S){var k=this.getRow(),N=this.session.getLength()-1;switch(S){case"up":k=k<=0?N:k-1;break;case"down":k=k>=N?-1:k+1;break;case"start":k=0;break;case"end":k=N}this.setRow(k)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return I})();s.importCssString(`
1132
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1133
+ background-color: #CAD6FA;
1134
+ z-index: 1;
1135
+ }
1136
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1137
+ background-color: #3a674e;
1138
+ }
1139
+ .ace_editor.ace_autocomplete .ace_line-hover {
1140
+ border: 1px solid #abbffe;
1141
+ margin-top: -1px;
1142
+ background: rgba(233,233,253,0.4);
1143
+ position: absolute;
1144
+ z-index: 2;
1145
+ }
1146
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1147
+ border: 1px solid rgba(109, 150, 13, 0.8);
1148
+ background: rgba(58, 103, 78, 0.62);
1149
+ }
1150
+ .ace_completion-meta {
1151
+ opacity: 0.5;
1152
+ margin-left: 0.9em;
1153
+ }
1154
+ .ace_completion-message {
1155
+ margin-left: 0.9em;
1156
+ color: blue;
1157
+ }
1158
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1159
+ color: #2d69c7;
1160
+ }
1161
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1162
+ color: #93ca12;
1163
+ }
1164
+ .ace_editor.ace_autocomplete {
1165
+ width: 300px;
1166
+ z-index: 200000;
1167
+ border: 1px lightgray solid;
1168
+ position: fixed;
1169
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1170
+ line-height: 1.4;
1171
+ background: #fefefe;
1172
+ color: #111;
1173
+ }
1174
+ .ace_dark.ace_editor.ace_autocomplete {
1175
+ border: 1px #484747 solid;
1176
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1177
+ line-height: 1.4;
1178
+ background: #25282c;
1179
+ color: #c1c1c1;
1180
+ }
1181
+ .ace_autocomplete .ace_text-layer {
1182
+ width: calc(100% - 8px);
1183
+ }
1184
+ .ace_autocomplete .ace_line {
1185
+ display: flex;
1186
+ align-items: center;
1187
+ }
1188
+ .ace_autocomplete .ace_line > * {
1189
+ min-width: 0;
1190
+ flex: 0 0 auto;
1191
+ }
1192
+ .ace_autocomplete .ace_line .ace_ {
1193
+ flex: 0 1 auto;
1194
+ overflow: hidden;
1195
+ text-overflow: ellipsis;
1196
+ }
1197
+ .ace_autocomplete .ace_completion-spacer {
1198
+ flex: 1;
1199
+ }
1200
+ .ace_autocomplete.ace_loading:after {
1201
+ content: "";
1202
+ position: absolute;
1203
+ top: 0px;
1204
+ height: 2px;
1205
+ width: 8%;
1206
+ background: blue;
1207
+ z-index: 100;
1208
+ animation: ace_progress 3s infinite linear;
1209
+ animation-delay: 300ms;
1210
+ transform: translateX(-100%) scaleX(1);
1211
+ }
1212
+ @keyframes ace_progress {
1213
+ 0% { transform: translateX(-100%) scaleX(1) }
1214
+ 50% { transform: translateX(625%) scaleX(2) }
1215
+ 100% { transform: translateX(1500%) scaleX(3) }
1216
+ }
1217
+ @media (prefers-reduced-motion) {
1218
+ .ace_autocomplete.ace_loading:after {
1219
+ transform: translateX(625%) scaleX(2);
1220
+ animation: none;
1221
+ }
1222
+ }
1223
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=b,r.getAriaId=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,r,h){var d=(function(){function g(v){this.editor=v,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(v){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var f=this.popup.getRow(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[f-s.config.firstRow];if(a){for(var u="doc-tooltip ",p=0;p<this._lines.length;p++)u+="ace-inline-screenreader-line-".concat(p," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=v.split(/\r\n|\r|\n/);var l=this.createCodeBlock();this.screenReaderDiv.appendChild(l)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var v=document.createElement("pre");v.setAttribute("id","ace-inline-screenreader");for(var l=0;l<this._lines.length;l++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(l));var s=document.createTextNode(this._lines[l]);f.appendChild(s),v.appendChild(f)}return v},g})();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(t,r,h){var d=t("../snippets").snippetManager,g=t("./inline_screenreader").AceInlineScreenReader,v=(function(){function l(){this.editor=null}return l.prototype.show=function(f,s,a){if(a=a||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(f));var u=s.snippet?d.getDisplayTextForSnippet(f,s.snippet):s.value;return s.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?f.removeGhostText():f.setGhostText(u),!0)},l.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},l.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},l.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},l})();r.AceInline=v}),ace.define("ace/autocomplete/util",["require","exports","module"],function(t,r,h){r.parForEach=function(g,v,l){var f=0,s=g.length;s===0&&l();for(var a=0;a<s;a++)v(g[a],function(u,p){f++,f===s&&l(u,p)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,v,l){l=l||d;for(var f=[],s=v-1;s>=0&&l.test(g[s]);s--)f.push(g[s]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(g,v,l){l=l||d;for(var f=[],s=v;s<g.length&&l.test(g[s]);s++)f.push(g[s]);return f},r.getCompletionPrefix=function(g){var v=g.getCursorPosition(),l=g.session.getLine(v.row),f;return g.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(a){!f&&a&&(f=this.retrievePrecedingIdentifier(l,v.column,a))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(l,v.column)},r.triggerAutocomplete=function(g,l){var l=l??g.session.getPrecedingCharacter();return g.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(l)})}}),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(t,r,h){var d=t("./keyboard/hash_handler").HashHandler,g=t("./autocomplete/popup").AcePopup,v=t("./autocomplete/inline").AceInline,l=t("./autocomplete/popup").getAriaId,f=t("./autocomplete/util"),s=t("./lib/lang"),a=t("./lib/dom"),u=t("./snippets").snippetManager,p=t("./config"),i=t("./lib/event"),c=t("./lib/scroll").preventParentScroll,m=function($,_){_.completer&&_.completer.destroy()},b=(function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new d,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new I($.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:p.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.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)),i.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new v,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},$.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(_){var C=this.base.row,O=this.base.column,P=this.editor.getCursorPosition().column,L=this.editor.session.getLine(C).slice(O,P);this.inlineRenderer.show(this.editor,_,L)?this.$seen(_):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var _=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&&(!_||O.hideInlinePreview)&&this.$seen(O)}},$.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,O=C.layerConfig.lineHeight,P=C.$cursorLayer.getPixelPosition(this.base,!0);P.left-=this.popup.getTextLeftOffset();var L=_.container.getBoundingClientRect();P.top+=L.top-C.layerConfig.offset,P.left+=L.left-_.renderer.scrollLeft,P.left+=C.gutterWidth;var T={top:P.top,left:P.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(T.top+=C.$ghostTextWidget.el.offsetHeight);var F=_.container.getBoundingClientRect().bottom-O,D=F<T.top?{top:F,left:T.left}:T;this.popup.tryShow(D,O,"bottom")||this.popup.tryShow(P,O,"top")||this.popup.show(P,O)},$.prototype.openPopup=function(_,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 P=this.popup.getRow(),L=this.popup.data[P];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:l(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var T;this.stickySelection&&(T=this.popup.data.indexOf(L)),(!T||T===-1)&&(T=0),this.popup.setRow(this.autoSelect?T:-1),T===P&&L!==this.completions.filtered[T]&&this.$onPopupChange();var F=this.inlineRenderer&&this.inlineEnabled;if(T===P&&F){var D=this.popup.getData(this.popup.getRow());this.$updateGhostText(D)}O||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(_){var C=document.activeElement,O=this.editor.textInput.getElement(),P=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),L=this.popup&&this.popup.container;C!=O&&C.parentNode!=L&&!P&&C!=this.tooltipNode&&_.relatedTarget!=O&&this.detach()},$.prototype.mousedownListener=function(_){this.detach()},$.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(_){this.popup.goTo(_)},$.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var O=this.completions,P=this.getCompletionProvider().insertMatch(this.editor,_,O.filterText,C);return this.completions==O&&this.detach(),P},$.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},$.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},$.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var P=this.editor.getCursorPosition(),L=this.editor.session.getTextRange({start:this.base,end:P});if(L==this.completions.filterText)return;if(this.completions.setFilter(L),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==L&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,L,_);return}if(C&&C.matches){var P=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(P.row,P.column),this.base.$insertRight=!0,this.completions=new I(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var O=this.editor.getSession(),P=this.editor.getCursorPosition(),L=f.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(P.row,P.column-L.length),this.base.$insertRight=!0;var T={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:L,pos:P}).provideCompletions(this.editor,T,(function(F,D,M){var S=D.filtered,k=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),M){if(!S.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(k)),N){var j=[{caption:N,value:""}];this.completions=new I(j),this.openPopup(this.editor,k,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(S.length==1&&S[0].value==k&&!S[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&S.length==1)return this.insertMatch(S[0])}this.completions=!M&&this.showLoadingState?new I($.completionsForLoading.concat(S),D.filterText):D,this.openPopup(this.editor,k,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!M)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[_.getHoveredRow()]||C[_.getRow()]),P=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var L=this.editor.completers.length,T=0;T<L;T++){var F=this.editor.completers[T];if(F.getDocTooltip&&O.completerId===F.id){P=F.getDocTooltip(O);break}}if(!P&&typeof O!="string"&&(P=O),typeof P=="string"&&(P={docText:P}),!P||!P.docHTML&&!P.docText)return this.hideDocTooltip();this.showDocTooltip(P)},$.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;_.docHTML?O.innerHTML=_.docHTML:_.docText&&(O.textContent=_.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var P=this.popup,L=P.container.getBoundingClientRect(),T=400,F=300,D=P.renderer.scrollBar.width||10,M=L.left,S=window.innerWidth-L.right-D,k=P.isTopdown?window.innerHeight-D-L.bottom:L.top,N=[Math.min(S/T,1),Math.min(M/T,1),Math.min(k/F,1)*.9],j=Math.max.apply(Math,N),U=O.style;U.display="block",j==N[0]||N[0]>=1?(U.left=L.right+1+"px",U.right="",U.maxWidth=T*j+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-D-L.top,F)+"px"):j==N[1]||N[1]>=1?(U.right=window.innerWidth-L.left+"px",U.left="",U.maxWidth=T*j+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-D-L.top,F)+"px"):j==N[2]&&(U.left=L.left+"px",U.right="",U.maxWidth=Math.min(T,window.innerWidth-L.left)+"px",P.isTopdown?(U.top=L.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-D-L.bottom,F)+"px"):(U.top="",U.bottom=window.innerHeight-L.top+"px",U.maxHeight=Math.min(L.top,F)+"px")),a.$fixPositionBug(O)},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},$.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(_){return _.completer instanceof $||(_.completer&&(_.completer.destroy(),_.completer=null),p.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),_.completer=$.$sharedInstance):(_.completer=new $,_.once("destroy",m))),_.completer},$})();b.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var _=$.completer.insertMatch();if(_||$.tabstopManager)return _;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var _=f.getCompletionPrefix($);!_&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function($,_){var C=b.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function $(_){this.initialPosition=_,this.active=!0}return $.prototype.insertByIndex=function(_,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],O)},$.prototype.insertMatch=function(_,C,O){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var P=this.completions.filterText.length,L=0;if(C.range&&C.range.start.row===C.range.end.row&&(P-=this.initialPosition.prefix.length,P+=this.initialPosition.pos.column-C.range.start.column,L+=C.range.end.column-this.initialPosition.pos.column),P||L){var T;_.selection.getAllRanges?T=_.selection.getAllRanges():T=[_.getSelectionRange()];for(var F=0,D;D=T[F];F++)D.start.column-=P,D.end.column+=L,_.session.remove(D)}C.snippet?u.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},$.prototype.$insertString=function(_,C){var O=C.value||C;_.execCommand("insertstring",O)},$.prototype.gatherCompletions=function(_,C){var O=_.getSession(),P=_.getCursorPosition(),L=f.getCompletionPrefix(_),T=[];this.completers=_.completers;var F=_.completers.length;return _.completers.forEach(function(D,M){D.getCompletions(_,O,P,L,function(S,k){D.hideInlinePreview&&(k=k.map(function(N){return Object.assign(N,{hideInlinePreview:D.hideInlinePreview})})),!S&&k&&(T=T.concat(k)),C(null,{prefix:f.getCompletionPrefix(_),matches:T,finished:--F===0})})}),!0},$.prototype.provideCompletions=function(_,C,O){var P=(function(D){var M=D.prefix,S=D.matches;this.completions=new I(S),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(M),(D.finished||this.completions.filtered.length)&&O(null,this.completions,D.finished)}).bind(this),L=!0,T=null;if(this.gatherCompletions(_,(function(D,M){if(this.active){D&&(O(D,[],!0),this.detach());var S=M.prefix;if(S.indexOf(M.prefix)===0){if(L){T=M;return}P(M)}}}).bind(this)),L=!1,T){var F=T;T=null,P(F)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},$})(),I=(function(){function $(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(P,L){return L.exactMatch-P.exactMatch||L.$score-P.$score||(P.caption||P.value).localeCompare(L.caption||L.value)});var O=null;C=C.filter(function(P){var L=P.snippet||P.caption||P.value;return L===O?!1:(O=L,!0)}),this.filtered=C},$.prototype.filterCompletions=function(_,C){var O=[],P=C.toUpperCase(),L=C.toLowerCase();e:for(var T=0,F;F=_[T];T++){if(F.skipFilter){F.$score=F.score,O.push(F);continue}var D=!this.ignoreCaption&&F.caption||F.value||F.snippet;if(D){var M=-1,S=0,k=0,N,j;if(this.exactMatch){if(C!==D.substr(0,C.length))continue e}else{var U=D.toLowerCase().indexOf(L);if(U>-1)k=U;else for(var G=0;G<C.length;G++){var J=D.indexOf(L[G],M+1),Q=D.indexOf(P[G],M+1);if(N=J>=0&&(Q<0||J<Q)?J:Q,N<0)continue e;j=N-M-1,j>0&&(M===-1&&(k+=10),k+=j,S|=1<<G),M=N}}F.matchMask=S,F.exactMatch=k?0:1,F.$score=(F.score||0)-k,O.push(F)}}return O},$})();r.Autocomplete=b,r.CompletionProvider=x,r.FilteredList=I}),ace.define("ace/marker_group",["require","exports","module"],function(t,r,h){var d=(function(){function g(v,l){l&&(this.markerType=l.markerType),this.markers=[],this.session=v,v.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(v){return this.markers.find(function(l){return l.range.contains(v.row,v.column)})},g.prototype.markersComparator=function(v,l){return v.range.start.row-l.range.start.row},g.prototype.setMarkers=function(v){this.markers=v.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(v,l,f,s){if(!(!this.markers||!this.markers.length))for(var a=s.firstRow,u=s.lastRow,p,i=0,c=0,m=0;m<this.markers.length;m++){var b=this.markers[m];if(!(b.range.end.row<a)&&!(b.range.start.row>u)&&(b.range.start.row===c?i++:(c=b.range.start.row,i=0),!(i>200))){var x=b.range.clipRows(a,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var I=x.toScreenRange(f);if(I.isEmpty()){p=f.getNextFoldLine(x.end.row,p),p&&p.end.row>x.end.row&&(a=p.end.row);continue}this.markerType==="fullLine"?l.drawFullLineMarker(v,I,b.className,s):I.isMultiLine()?this.markerType==="line"?l.drawMultiLineMarker(v,I,b.className,s):l.drawTextMarker(v,I,b.className,s):l.drawSingleLineMarker(v,I,b.className+" ace_br15",s)}}}},g})();d.prototype.MAX_MARKERS=1e4,r.MarkerGroup=d}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,r,h){function d(f,s){var a=f.getTextRange(v.fromPoints({row:0,column:0},s));return a.split(l).length-1}function g(f,s){var a=d(f,s),u=f.getValue().split(l),p=Object.create(null),i=u[a];return u.forEach(function(c,m){if(!(!c||c===i)){var b=Math.abs(a-m),x=u.length-b;p[c]?p[c]=Math.max(x,p[c]):p[c]=x}}),p}var v=t("../range").Range,l=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(f,s,a,u,p){var i=g(s,a),c=Object.keys(i);p(null,c.map(function(m){return{caption:m,value:m,score:i[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(t,r,h){var d=t("../snippets").snippetManager,g=t("../autocomplete").Autocomplete,v=t("../config"),l=t("../lib/lang"),f=t("../autocomplete/util"),s=t("../marker_group").MarkerGroup,a=t("../autocomplete/text_completer"),u={getCompletions:function(L,T,F,D,M){if(T.$mode.completer)return T.$mode.completer.getCompletions(L,T,F,D,M);var S=L.session.getState(F.row),k=T.$mode.getCompletions(S,T,F,D);k=k.map(function(N){return N.completerId=u.id,N}),M(null,k)},id:"keywordCompleter"},p=function(L){var T={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(F,D,M,S){return T[D]=S||""}).replace(/\$(\d+?)/g,function(F,D){return T[D]})},i={getCompletions:function(L,T,F,D,M){var S=[],k=T.getTokenAt(F.row,F.column);k&&k.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?S.push("html-tag"):S=d.getActiveScopes(L);var N=d.snippetMap,j=[];S.forEach(function(U){for(var G=N[U]||[],J=G.length;J--;){var Q=G[J],le=Q.name||Q.tabTrigger;le&&j.push({caption:le,snippet:Q.content,meta:Q.tabTrigger&&!Q.name?Q.tabTrigger+"⇥ ":"snippet",completerId:i.id})}},this),M(null,j)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",l.escapeHTML(L.caption),"</b>","<hr></hr>",l.escapeHTML(p(L.snippet))].join(""))},id:"snippetCompleter"},c=[i,a,u];r.setCompleters=function(L){c.length=0,L&&c.push.apply(c,L)},r.addCompleter=function(L){c.push(L)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=i;var m={name:"expandSnippet",exec:function(L){return d.expandWithTab(L)},bindKey:"Tab"},b=function(L,T){x(T.session.$mode)},x=function(L){typeof L=="string"&&(L=v.$modes[L]),L&&(d.files||(d.files={}),I(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(x))},I=function(L,T){!T||!L||d.files[L]||(d.files[L]={},v.loadModule(T,function(F){F&&(d.files[L]=F,!F.snippets&&F.snippetText&&(F.snippets=d.parseSnippetFile(F.snippetText)),d.register(F.snippets||[],F.scope),F.includeScopes&&(d.snippetMap[F.scope].includeScopes=F.includeScopes,F.includeScopes.forEach(function(D){x("ace/mode/"+D)})))}))},$=function(L){var T=L.editor,F=T.completer&&T.completer.activated;if(L.command.name==="backspace")F&&!f.getCompletionPrefix(T)&&T.completer.detach();else if(L.command.name==="insertstring"&&!F){_=L;var D=L.editor.$liveAutocompletionDelay;D?C.delay(D):O(L)}},_,C=l.delayedCall(function(){O(_)},0),O=function(L){var T=L.editor,F=f.getCompletionPrefix(T),D=L.args,M=f.triggerAutocomplete(T,D);if(F&&F.length>=T.$liveAutocompletionThreshold||M){var S=g.for(T);S.autoShown=!0,S.showPopup(T)}},P=t("../editor").Editor;t("../config").defineOptions(P.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(g.for(this),this.completers||(this.completers=Array.isArray(L)?L:c),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:c),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(m),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(m),this.off("changeMode",b))},value:!1}}),r.MarkerGroup=s}),(function(){ace.require(["ace/ext/language_tools"],function(t){e&&(e.exports=t)})})()})(km)),km.exports}Y_();var Sm={exports:{}},$m;function J_(){return $m||($m=1,(function(e,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(t,r,h){h.exports=`
1224
+
1225
+ /* ------------------------------------------------------------------------------------------
1226
+ * Editor Search Form
1227
+ * --------------------------------------------------------------------------------------- */
1228
+ .ace_search {
1229
+ background-color: #ddd;
1230
+ color: #666;
1231
+ border: 1px solid #cbcbcb;
1232
+ border-top: 0 none;
1233
+ overflow: hidden;
1234
+ margin: 0;
1235
+ padding: 4px 6px 0 4px;
1236
+ position: absolute;
1237
+ top: 0;
1238
+ z-index: 99;
1239
+ white-space: normal;
1240
+ }
1241
+ .ace_search.left {
1242
+ border-left: 0 none;
1243
+ border-radius: 0px 0px 5px 0px;
1244
+ left: 0;
1245
+ }
1246
+ .ace_search.right {
1247
+ border-radius: 0px 0px 0px 5px;
1248
+ border-right: 0 none;
1249
+ right: 0;
1250
+ }
1251
+
1252
+ .ace_search_form, .ace_replace_form {
1253
+ margin: 0 20px 4px 0;
1254
+ overflow: hidden;
1255
+ line-height: 1.9;
1256
+ }
1257
+ .ace_replace_form {
1258
+ margin-right: 0;
1259
+ }
1260
+ .ace_search_form.ace_nomatch {
1261
+ outline: 1px solid red;
1262
+ }
1263
+
1264
+ .ace_search_field {
1265
+ border-radius: 3px 0 0 3px;
1266
+ background-color: white;
1267
+ color: black;
1268
+ border: 1px solid #cbcbcb;
1269
+ border-right: 0 none;
1270
+ outline: 0;
1271
+ padding: 0;
1272
+ font-size: inherit;
1273
+ margin: 0;
1274
+ line-height: inherit;
1275
+ padding: 0 6px;
1276
+ min-width: 17em;
1277
+ vertical-align: top;
1278
+ min-height: 1.8em;
1279
+ box-sizing: content-box;
1280
+ }
1281
+ .ace_searchbtn {
1282
+ border: 1px solid #cbcbcb;
1283
+ line-height: inherit;
1284
+ display: inline-block;
1285
+ padding: 0 6px;
1286
+ background: #fff;
1287
+ border-right: 0 none;
1288
+ border-left: 1px solid #dcdcdc;
1289
+ cursor: pointer;
1290
+ margin: 0;
1291
+ position: relative;
1292
+ color: #666;
1293
+ }
1294
+ .ace_searchbtn:last-child {
1295
+ border-radius: 0 3px 3px 0;
1296
+ border-right: 1px solid #cbcbcb;
1297
+ }
1298
+ .ace_searchbtn:disabled {
1299
+ background: none;
1300
+ cursor: default;
1301
+ }
1302
+ .ace_searchbtn:hover {
1303
+ background-color: #eef1f6;
1304
+ }
1305
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1306
+ padding: 0px 0.7em
1307
+ }
1308
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1309
+ content: "";
1310
+ border: solid 2px #888;
1311
+ width: 0.5em;
1312
+ height: 0.5em;
1313
+ border-width: 2px 0 0 2px;
1314
+ display:inline-block;
1315
+ transform: rotate(-45deg);
1316
+ }
1317
+ .ace_searchbtn.next:after {
1318
+ border-width: 0 2px 2px 0 ;
1319
+ }
1320
+ .ace_searchbtn_close {
1321
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1322
+ border-radius: 50%;
1323
+ border: 0 none;
1324
+ color: #656565;
1325
+ cursor: pointer;
1326
+ font: 16px/16px Arial;
1327
+ padding: 0;
1328
+ height: 14px;
1329
+ width: 14px;
1330
+ top: 9px;
1331
+ right: 7px;
1332
+ position: absolute;
1333
+ }
1334
+ .ace_searchbtn_close:hover {
1335
+ background-color: #656565;
1336
+ background-position: 50% 100%;
1337
+ color: white;
1338
+ }
1339
+
1340
+ .ace_button {
1341
+ margin-left: 2px;
1342
+ cursor: pointer;
1343
+ -webkit-user-select: none;
1344
+ -moz-user-select: none;
1345
+ -o-user-select: none;
1346
+ -ms-user-select: none;
1347
+ user-select: none;
1348
+ overflow: hidden;
1349
+ opacity: 0.7;
1350
+ border: 1px solid rgba(100,100,100,0.23);
1351
+ padding: 1px;
1352
+ box-sizing: border-box!important;
1353
+ color: black;
1354
+ }
1355
+
1356
+ .ace_button:hover {
1357
+ background-color: #eee;
1358
+ opacity:1;
1359
+ }
1360
+ .ace_button:active {
1361
+ background-color: #ddd;
1362
+ }
1363
+
1364
+ .ace_button.checked {
1365
+ border-color: #3399ff;
1366
+ opacity:1;
1367
+ }
1368
+
1369
+ .ace_search_options{
1370
+ margin-bottom: 3px;
1371
+ text-align: right;
1372
+ -webkit-user-select: none;
1373
+ -moz-user-select: none;
1374
+ -o-user-select: none;
1375
+ -ms-user-select: none;
1376
+ user-select: none;
1377
+ clear: both;
1378
+ }
1379
+
1380
+ .ace_search_counter {
1381
+ float: left;
1382
+ font-family: arial;
1383
+ padding: 0 8px;
1384
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(t,r,h){var d=t("../lib/dom"),g=t("../lib/lang"),v=t("../lib/event"),l=t("./searchbox-css"),f=t("../keyboard/hash_handler").HashHandler,s=t("../lib/keys"),a=t("../config").nls,u=999;d.importCssString(l,"ace_searchbox",!1);var p=(function(){function m(b,x,I){this.activeInput,this.element=d.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(b),d.importCssString(l,"ace_searchbox",b.container),v.addListener(this.element,"touchstart",function($){$.stopPropagation()},b)}return m.prototype.setEditor=function(b){b.searchBox=this,b.renderer.scroller.appendChild(this.element),this.editor=b},m.prototype.setSession=function(b){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.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")},m.prototype.$init=function(){var b=this.element;this.$initElements(b);var x=this;v.addListener(b,"mousedown",function(I){setTimeout(function(){x.activeInput.focus()},0),v.stopPropagation(I)}),v.addListener(b,"click",function(I){var $=I.target||I.srcElement,_=$.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),v.stopPropagation(I)}),v.addCommandKeyListener(b,function(I,$,_){var C=s.keyCodeToString(_),O=x.$searchBarKb.findKeyCommand($,C);O&&O.exec&&(O.exec(x),v.stopEvent(I))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),v.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),v.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),v.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(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)},m.prototype.$syncOptions=function(b){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.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)},m.prototype.highlight=function(b){this.editor.session.highlight(b||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(b,x,I){if(this.editor.session){var $=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:I,range:this.searchRange}),_=!$&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var b=this.editor,x=b.$search.$options.re,I=x.unicode,$=0,_=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,`
1385
+ `),b.session.doc.$autoNewLine=`
1386
+ `);var O=b.session.doc.positionToIndex(b.selection.anchor);this.searchRange&&(O-=b.session.doc.positionToIndex(this.searchRange.start));for(var P=x.lastIndex=0,L;(L=x.exec(C))&&($++,P=L.index,P<=O&&_++,!($>u||!L[0]&&(x.lastIndex=P+=g.skipEmptyMatch(C,P,I),P>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[_,$>u?u+"+":$])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.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;d.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(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)},m.prototype.isFocused=function(){var b=document.activeElement;return b==this.searchInput||b==this.replaceInput},m})(),i=new f;i.bindKeys({"Ctrl-f|Command-f":function(m){var b=m.isReplace=!m.isReplace;m.replaceBox.style.display=b?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},"Tab|Shift-Tab":function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),i.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var c=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);p.prototype.$searchBarKb=i,p.prototype.$closeSearchBarKb=c,r.SearchBox=p,r.Search=function(m,b){var x=m.searchBox||new p(m),I=m.session.selection.getRange(),$=I.isMultiLine()?"":m.session.getTextRange(I);x.show($,b)}}),(function(){ace.require(["ace/ext/searchbox"],function(t){e&&(e.exports=t)})})()})(Sm)),Sm.exports}J_();var Tm={exports:{}},Em;function Z_(){return Em||(Em=1,(function(e,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,h){function d(f,s){function a(L,T,F){if(!(L.length<T)){var D=L.slice(0,T),M=L.slice(T),S=/^(?:(\s+)|(\S+)(\s+))/.exec(M),k=/(?:(\s+)|(\s+)(\S+))$/.exec(D),N=0,j=0;if(k&&!k[2]&&(N=T-k[1].length,j=T),S&&!S[2]&&(N||(N=T),j=T+S[1].length),N)return{start:N,end:j};if(k&&k[2]&&k.index>F)return{start:k.index,end:k.index+k[2].length};if(S&&S[2])return N=T+S[2].length,{start:N,end:N+S[3].length}}}for(var u=s.column||f.getOption("printMarginColumn"),p=s.allowMerge!=0,i=Math.min(s.startRow,s.endRow),c=Math.max(s.startRow,s.endRow),m=f.session;i<=c;){var b=m.getLine(i);if(b.length>u){var x=a(b,u,5);if(x){var I=/^\s*/.exec(b)[0];m.replace(new v(i,x.start,i,x.end),`
1387
+ `+I)}c++}else if(p&&/\S/.test(b)&&i!=c){var $=m.getLine(i+1);if($&&/\S/.test($)){var _=b.replace(/\s+$/,""),C=$.replace(/^\s+/,""),O=_+" "+C,x=a(O,u,5);if(x&&x.start>_.length||O.length<u){var P=new v(i,_.length,i+1,$.length-C.length);m.replace(P," "),i--,c--}else _.length<b.length&&m.remove(new v(i,_.length,i,b.length))}}i++}}function g(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var s=f.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;d(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var v=t("../range").Range,l=t("../editor").Editor;t("../config").defineOptions(l.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=d}),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(t,r,h){function d(w){return{row:w.line,column:w.ch}}function g(w){return new Fe(w.row,w.column)}function v(w,E,A){if(E.line===A.line&&E.ch>=A.ch-1){var B=w.getLine(E.line),z=B.charCodeAt(E.ch);55296<=z&&z<=55551&&(A.ch+=1)}return{start:E,end:A}}function l(w){w.setOption("disableInput",!0),w.setOption("showCursorWhenSelecting",!1),Be.signal(w,"vim-mode-change",{mode:"normal"}),w.on("cursorActivity",mo),O(w),Be.on(w.getInputField(),"paste",s(w))}function f(w){w.setOption("disableInput",!1),w.off("cursorActivity",mo),Be.off(w.getInputField(),"paste",s(w)),w.state.vim=null,vn&&clearTimeout(vn)}function s(w){var E=w.state.vim;return E.onPasteFn||(E.onPasteFn=function(){E.insertMode||(w.setCursor(re(w.getCursor(),0,1)),or.enterInsertMode(w,{},E))}),E.onPasteFn}function a(w,E){return E>=w.firstLine()&&E<=w.lastLine()}function u(w){return/^[a-z]$/.test(w)}function p(w){return"()[]{}".indexOf(w)!=-1}function i(w){return yl.test(w)}function c(w){return yt.test(w)}function m(w){return/^\s*$/.test(w)}function b(w){return".?!".indexOf(w)!=-1}function x(w,E){for(var A=0;A<E.length;A++)if(E[A]==w)return!0;return!1}function I(w,E,A,B,z){if(E===void 0&&!z)throw Error("defaultValue is required unless callback is provided");if(A||(A="string"),Qt[w]={type:A,defaultValue:E,callback:z},B)for(var W=0;W<B.length;W++)Qt[B[W]]=Qt[w];E&&$(w,E)}function $(w,E,A,B){var z=Qt[w];B=B||{};var W=B.scope;if(!z)return new Error("Unknown option: "+w);if(z.type=="boolean"){if(E&&E!==!0)return new Error("Invalid argument: "+w+"="+E);E!==!1&&(E=!0)}z.callback?(W!=="local"&&z.callback(E,void 0),W!=="global"&&A&&z.callback(E,A)):(W!=="local"&&(z.value=z.type=="boolean"?!!E:E),W!=="global"&&A&&(A.state.vim.options[w]={value:E}))}function _(w,E,A){var B=Qt[w];A=A||{};var z=A.scope;if(!B)return new Error("Unknown option: "+w);if(B.callback){var W=E&&B.callback(void 0,E);return z!=="global"&&W!==void 0?W:z!=="local"?B.callback():void 0}var W=z!=="global"&&E&&E.state.vim.options[w];return(W||z!=="local"&&B||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=ir()}function O(w){return w.state.vim||(w.state.vim={inputState:new S,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}),w.state.vim}function P(){qe={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:wo(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new J,exCommandHistoryController:new J};for(var w in Qt){var E=Qt[w];E.value=E.defaultValue}}function L(w){function E(Y){typeof Y=="string"?Vt.value=Y:Vt=null}if(w[0]=="<"){var A=w.toLowerCase().slice(1,-1),B=A.split("-");if(A=B.pop()||"",A=="lt")w="<";else if(A=="space")w=" ";else if(A=="cr")w=`
1388
+ `;else if(qo[A]){var z=Vt.value,W={key:qo[A],target:{value:z,selectionEnd:z.length,selectionStart:z.length}};Vt.onKeyDown&&Vt.onKeyDown(W,Vt.value,E),Vt&&Vt.onKeyUp&&Vt.onKeyUp(W,Vt.value,E);return}}if(w==`
1389
+ `){var q=Vt;Vt=null,q.onClose&&q.onClose(q.value)}else Vt.value=(Vt.value||"")+w}function T(w,E,A){var B=xo;if(A){if(hi.indexOf(A)!=-1)return;hi.push(A),xo=A.noremap!=0}try{for(var z=O(w),W=/<(?:[CSMA]-)*\w+>|./gi,q;q=W.exec(E);){var Y=q[0],X=z.insertMode;if(Vt){L(Y);continue}var se=Et.handleKey(w,Y,"mapping");if(!se&&X&&z.insertMode){if(Y[0]=="<"){var he=Y.toLowerCase().slice(1,-1),we=he.split("-");if(he=we.pop()||"",he=="lt")Y="<";else if(he=="space")Y=" ";else if(he=="cr")Y=`
1390
+ `;else{if(qo.hasOwnProperty(he)){Y=qo[he],gs(w,Y);continue}Y=Y[0],W.lastIndex=q.index+1}}w.replaceSelection(Y)}}}finally{if(hi.pop(),xo=hi.length?B:!1,!hi.length&&Vt){var $e=Vt;Vt=null,br(w,$e)}}}function F(w,E){var A=w.key;if(!wr[A]){A.length>1&&A[0]=="n"&&(A=A.replace("Numpad","")),A=di[A]||A;var B="";if(w.ctrlKey&&(B+="C-"),w.altKey&&(B+="A-"),w.metaKey&&(B+="M-"),Be.isMac&&w.altKey&&!w.metaKey&&!w.ctrlKey&&(B=B.slice(2)),(B||A.length>1)&&w.shiftKey&&(B+="S-"),E&&!E.expectLiteralNext&&A.length==1){if(Xn.keymap&&A in Xn.keymap)(Xn.remapCtrl!=0||!B)&&(A=Xn.keymap[A]);else if(A.charCodeAt(0)>255){var z=w.code&&w.code.slice(-1)||"";w.shiftKey||(z=z.toLowerCase()),z&&(A=z)}}return B+=A,B.length>1&&(B="<"+B+">"),B}}function D(w,E){Xn.string!==w&&(Xn=M(w)),Xn.remapCtrl=E}function M(w){function E(B){return B.split(/\\?(.)/).filter(Boolean)}var A={};return w?(w.split(/((?:[^\\,]|\\.)+),/).map(function(B){if(B){var z=B.split(/((?:[^\\;]|\\.)+);/);if(z.length==3){var W=E(z[1]),q=E(z[2]);if(W.length!==q.length)return;for(var Y=0;Y<W.length;++Y)A[W[Y]]=q[Y]}else if(z.length==1){var X=E(B);if(X.length%2!==0)return;for(var Y=0;Y<X.length;Y+=2)A[X[Y]]=X[Y+1]}}}),{keymap:A,string:w}):{keymap:A,string:""}}function S(){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 k(w,E){w.state.vim.inputState=new S,w.state.vim.expectLiteralNext=!1,Be.signal(w,"vim-command-done",E)}function N(){this.removed=[],this.inserted=""}function j(w,E,A){this.clear(),this.keyBuffer=[w||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!E,this.blockwise=!!A}function U(w,E){var A=qe.registerController.registers;if(!w||w.length!=1)throw Error("Register name must be 1 character");A[w]=E,ka.push(w)}function G(w){this.registers=w,this.unnamedRegister=w['"']=new j,w["."]=new j,w[":"]=new j,w["/"]=new j,w["+"]=new j}function J(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function Q(w,E){Hn[w]=E}function le(w,E){for(var A=[],B=0;B<E;B++)A.push(w);return A}function ie(w,E){Bs[w]=E}function ue(w,E){or[w]=E}function pe(w,E,A){var B=w.state.vim,z=B.insertMode||B.visualMode,W=Math.min(Math.max(w.firstLine(),E.line),w.lastLine()),q=w.getLine(W),Y=q.length-1+ +!!z,X=Math.min(Math.max(0,E.ch),Y),se=q.charCodeAt(X);if(56320<=se&&se<=57343){var he=1;A&&A.line==W&&A.ch>X&&(he=-1),X+=he,X>Y&&(X-=2)}return new Fe(W,X)}function oe(w){var E={};for(var A in w)w.hasOwnProperty(A)&&(E[A]=w[A]);return E}function re(w,E,A){return typeof E=="object"&&(A=E.ch,E=E.line),new Fe(w.line+E,w.ch+A)}function Ce(w,E,A,B){B.operator&&(A="operatorPending");for(var z,W=[],q=[],Y=xo?E.length-ms:0,X=Y;X<E.length;X++){var se=E[X];A=="insert"&&se.context!="insert"||se.context&&se.context!=A||B.operator&&se.type=="action"||!(z=ke(w,se.keys))||(z=="partial"&&W.push(se),z=="full"&&q.push(se))}return{partial:W.length&&W,full:q.length&&q}}function ke(w,E){var A=E.slice(-11)=="<character>",B=E.slice(-10)=="<register>";if(A||B){var z=E.length-(A?11:10),W=w.slice(0,z),q=E.slice(0,z);return W==q&&w.length>z?"full":q.indexOf(W)==0?"partial":!1}return w==E?"full":E.indexOf(w)==0?"partial":!1}function Ee(w){var E=/^.*(<[^>]+>)$/.exec(w),A=E?E[1]:w.slice(-1);if(A.length>1)switch(A){case"<CR>":A=`
1391
+ `;break;case"<Space>":A=" ";break;default:A=""}return A}function Ve(w,E,A){return function(){for(var B=0;B<A;B++)E(w)}}function Me(w){return new Fe(w.line,w.ch)}function ot(w,E){return w.ch==E.ch&&w.line==E.line}function Ge(w,E){return w.line<E.line?!0:w.line==E.line&&w.ch<E.ch}function Ze(w,E){return arguments.length>2&&(E=Ze.apply(void 0,Array.prototype.slice.call(arguments,1))),Ge(w,E)?w:E}function Ie(w,E){return arguments.length>2&&(E=Ie.apply(void 0,Array.prototype.slice.call(arguments,1))),Ge(w,E)?E:w}function Tt(w,E,A){var B=Ge(w,E),z=Ge(E,A);return B&&z}function mt(w,E){return w.getLine(E).length}function Wt(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}function An(w){return w.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function er(w,E,A){var B=mt(w,E),z=new Array(A-B+1).join(" ");w.setCursor(new Fe(E,B)),w.replaceRange(z,w.getCursor())}function Ht(w,E){var A=[],B=w.listSelections(),z=Me(w.clipPos(E)),W=!ot(E,z),q=w.getCursor("head"),Y=vt(B,q),X=ot(B[Y].head,B[Y].anchor),se=B.length-1,he=se-Y>Y?se:0,we=B[he].anchor,$e=Math.min(we.line,z.line),be=Math.max(we.line,z.line),_e=we.ch,ze=z.ch,De=B[he].head.ch-_e,Qe=ze-_e;De>0&&Qe<=0?(_e++,W||ze--):De<0&&Qe>=0?(_e--,X||ze++):De<0&&Qe==-1&&(_e--,ze++);for(var bt=$e;bt<=be;bt++){var st={anchor:new Fe(bt,_e),head:new Fe(bt,ze)};A.push(st)}return w.setSelections(A),E.ch=ze,we.ch=_e,we}function Tr(w,E,A){for(var B=[],z=0;z<A;z++){var W=re(E,z,0);B.push({anchor:W,head:W})}w.setSelections(B,0)}function vt(w,E,A){for(var B=0;B<w.length;B++){var z=ot(w[B].anchor,E),W=ot(w[B].head,E);if(z||W)return B}return-1}function Je(w,E){var A=E.lastSelection,B=function(){var W=w.listSelections(),q=W[0],Y=W[W.length-1],X=Ge(q.anchor,q.head)?q.anchor:q.head,se=Ge(Y.anchor,Y.head)?Y.head:Y.anchor;return[X,se]},z=function(){var W=w.getCursor(),q=w.getCursor(),Y=A.visualBlock;if(Y){var X=Y.width,se=Y.height;q=new Fe(W.line+se,W.ch+X);for(var he=[],we=W.line;we<q.line;we++){var $e=new Fe(we,W.ch),be=new Fe(we,q.ch),_e={anchor:$e,head:be};he.push(_e)}w.setSelections(he)}else{var ze=A.anchorMark.find(),De=A.headMark.find(),Qe=De.line-ze.line,bt=De.ch-ze.ch;q={line:q.line+Qe,ch:Qe?q.ch:bt+q.ch},A.visualLine&&(W=new Fe(W.line,0),q=new Fe(q.line,mt(w,q.line))),w.setSelection(W,q)}return[W,q]};return E.visualMode?B():z()}function Dt(w,E){var A=E.sel.anchor,B=E.sel.head;E.lastPastedText&&(B=w.posFromIndex(w.indexFromPos(A)+E.lastPastedText.length),E.lastPastedText=null),E.lastSelection={anchorMark:w.setBookmark(A),headMark:w.setBookmark(B),anchor:Me(A),head:Me(B),visualMode:E.visualMode,visualLine:E.visualLine,visualBlock:E.visualBlock}}function On(w,E,A,B){var z=w.state.vim.sel,W=B?E:z.head,q=B?E:z.anchor,Y;return Ge(A,E)&&(Y=A,A=E,E=Y),Ge(W,q)?(W=Ze(E,W),q=Ie(q,A)):(q=Ze(E,q),W=Ie(W,A),W=re(W,0,-1),W.ch==-1&&W.line!=w.firstLine()&&(W=new Fe(W.line-1,mt(w,W.line-1)))),[q,W]}function Bn(w,E,z){var B=w.state.vim;E=E||B.sel;var z=z||B.visualLine?"line":B.visualBlock?"block":"char",W=Gn(w,E,z);w.setSelections(W.ranges,W.primary)}function Gn(w,E,A,B){var z=Me(E.head),W=Me(E.anchor);if(A=="char"){var q=!B&&!Ge(E.head,E.anchor)?1:0,Y=Ge(E.head,E.anchor)?1:0;return z=re(E.head,0,q),W=re(E.anchor,0,Y),{ranges:[{anchor:W,head:z}],primary:0}}if(A=="line"){if(Ge(E.head,E.anchor))z.ch=0,W.ch=mt(w,W.line);else{W.ch=0;var X=w.lastLine();z.line>X&&(z.line=X),z.ch=mt(w,z.line)}return{ranges:[{anchor:W,head:z}],primary:0}}if(A=="block"){var se=Math.min(W.line,z.line),he=W.ch,we=Math.max(W.line,z.line),$e=z.ch;he<$e?$e+=1:he+=1;for(var be=we-se+1,_e=z.line==se?0:be-1,ze=[],De=0;De<be;De++)ze.push({anchor:new Fe(se+De,he),head:new Fe(se+De,$e)});return{ranges:ze,primary:_e}}}function mr(w){var E=w.getCursor("head");return w.getSelection().length==1&&(E=Ze(E,w.getCursor("anchor"))),E}function mn(w,E){var A=w.state.vim;E!==!1&&w.setCursor(pe(w,A.sel.head)),Dt(w,A),A.visualMode=!1,A.visualLine=!1,A.visualBlock=!1,A.insertMode||Be.signal(w,"vim-mode-change",{mode:"normal"})}function zn(w,E,A){var B=w.getRange(E,A);if(/\n\s*$/.test(B)){var z=B.split(`
1392
+ `);z.pop();for(var W,W=z.pop();z.length>0&&W&&m(W);W=z.pop())A.line--,A.ch=0;W?(A.line--,A.ch=mt(w,A.line)):A.ch=0}}function Kn(w,E,A){E.ch=0,A.ch=0,A.line++}function hn(w){if(!w)return 0;var E=w.search(/\S/);return E==-1?w.length:E}function tr(w,E,A){var B=E.inclusive,z=E.innerWord,W=E.bigWord,q=E.noSymbol,Y=E.multiline,X=A||mr(w),se=w.getLine(X.line),he=se,we=X.line,$e=we,be=X.ch,_e,ze=q?vs[0]:bo[0];if(z&&/\s/.test(se.charAt(be)))ze=function(Dn){return/\s/.test(Dn)};else{for(;!ze(se.charAt(be));)if(be++,be>=se.length){if(!Y)return null;be--,_e=vr(w,X,!0,W,!0);break}W?ze=bo[0]:(ze=vs[0],ze(se.charAt(be))||(ze=vs[1]))}for(var De=be,Qe=be;ze(se.charAt(Qe))&&Qe>=0;)Qe--;if(Qe++,_e)De=_e.to,$e=_e.line,he=w.getLine($e),!he&&De==0&&De++;else for(;ze(se.charAt(De))&&De<se.length;)De++;if(B){var bt=De,st=X.ch<=Qe&&/\s/.test(se.charAt(X.ch));if(!st)for(;/\s/.test(he.charAt(De))&&De<he.length;)De++;if(bt==De||st){for(var ut=Qe;/\s/.test(se.charAt(Qe-1))&&Qe>0;)Qe--;!Qe&&!st&&(Qe=ut)}}return{start:new Fe(we,Qe),end:new Fe($e,De)}}function lo(w,E,A){var B=E;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:B,end:B};var z=Be.findMatchingTag(w,E)||Be.findEnclosingTag(w,E);return!z||!z.open||!z.close?{start:B,end:B}:A?{start:z.open.from,end:z.close.to}:{start:z.open.to,end:z.close.from}}function wi(w,E,A){ot(E,A)||qe.jumpList.add(w,E,A)}function Fr(w,E){qe.lastCharacterSearch.increment=w,qe.lastCharacterSearch.forward=E.forward,qe.lastCharacterSearch.selectedCharacter=E.selectedCharacter}function jr(w,E,A,B){var z=Me(w.getCursor()),W=A?1:-1,q=A?w.lineCount():-1,Y=z.ch,X=z.line,se=w.getLine(X),he={lineText:se,nextCh:se.charAt(Y),lastCh:null,index:Y,symb:B,reverseSymb:(A?{")":"(","}":"{"}:{"(":")","{":"}"})[B],forward:A,depth:0,curMoveThrough:!1},we=Xi[B];if(!we)return z;var $e=Qi[we].init,be=Qi[we].isComplete;for($e&&$e(he);X!==q&&E;){if(he.index+=W,he.nextCh=he.lineText.charAt(he.index),!he.nextCh){if(X+=W,he.lineText=w.getLine(X)||"",W>0)he.index=0;else{var _e=he.lineText.length;he.index=_e>0?_e-1:0}he.nextCh=he.lineText.charAt(he.index)}be(he)&&(z.line=X,z.ch=he.index,E--)}return he.nextCh||he.curMoveThrough?new Fe(X,he.index):z}function vr(w,E,A,B,z){var W=E.line,q=E.ch,Y=w.getLine(W),X=A?1:-1,se=B?bo:vs;if(z&&Y==""){if(W+=X,Y=w.getLine(W),!a(w,W))return null;q=A?0:Y.length}for(;;){if(z&&Y=="")return{from:0,to:0,line:W};for(var he=X>0?Y.length:-1,we=he,$e=he;q!=he;){for(var be=!1,_e=0;_e<se.length&&!be;++_e)if(se[_e](Y.charAt(q))){for(we=q;q!=he&&se[_e](Y.charAt(q));)q+=X;if($e=q,be=we!=$e,we==E.ch&&W==E.line&&$e==we+X)continue;return{from:Math.min(we,$e+1),to:Math.max(we,$e),line:W}}be||(q+=X)}if(W+=X,!a(w,W))return null;Y=w.getLine(W),q=X>0?0:Y.length}}function yr(w,E,A,B,z,W){var q=Me(E),Y=[];(B&&!z||!B&&z)&&A++;for(var X=!B||!z,se=0;se<A;se++){var he=vr(w,E,B,W,X);if(!he){var we=mt(w,w.lastLine());Y.push(B?{line:w.lastLine(),from:we,to:we}:{line:0,from:0,to:0});break}Y.push(he),E=new Fe(he.line,B?he.to-1:he.from)}var $e=Y.length!=A,be=Y[0],_e=Y.pop();return B&&!z?(!$e&&(be.from!=q.ch||be.line!=q.line)&&(_e=Y.pop()),new Fe(_e.line,_e.from)):B&&z?new Fe(_e.line,_e.to-1):!B&&z?(!$e&&(be.to!=q.ch||be.line!=q.line)&&(_e=Y.pop()),new Fe(_e.line,_e.to)):new Fe(_e.line,_e.from)}function co(w,E,A,B,z){var W=E,q=new Fe(W.line+A.repeat-1,1/0),Y=w.clipPos(q);return Y.ch--,z||(B.lastHPos=1/0,B.lastHSPos=w.charCoords(Y,"div").left),q}function uo(w,E,A,B,z){for(var W=z||w.getCursor(),q=W.ch,Y,X=0;X<E;X++){var se=w.getLine(W.line);if(Y=Qo(q,se,B,A),Y==-1)return null;q=Y}return new Fe(w.getCursor().line,Y)}function hs(w,E){var A=w.getCursor().line;return pe(w,new Fe(A,E-1))}function ci(w,E,A,B){!x(A,ns)&&!fn.test(A)||(E.marks[A]&&E.marks[A].clear(),E.marks[A]=w.setBookmark(B))}function Qo(w,E,A,B,z){var W;return B?(W=E.indexOf(A,w+1),W!=-1):(W=E.lastIndexOf(A,w-1),W!=-1),W}function Po(w,E,A,B,z){function W(Qe){return!/\S/.test(w.getLine(Qe))}function q(Qe,bt,st){return st?W(Qe)!=W(Qe+bt):!W(Qe)&&W(Qe+bt)}function Y(Qe){B=B>0?1:-1;var bt=w.ace.session.getFoldLine(Qe);bt&&Qe+B>bt.start.row&&Qe+B<bt.end.row&&(B=(B>0?bt.end.row:bt.start.row)-Qe)}var X=E.line,se=w.firstLine(),he=w.lastLine(),we,$e,be=X;if(B){for(;se<=be&&be<=he&&A>0;)Y(be),q(be,B)&&A--,be+=B;return new Fe(be,0)}var _e=w.state.vim;if(_e.visualLine&&q(X,1,!0)){var ze=_e.sel.anchor;q(ze.line,-1,!0)&&(!z||ze.line!=X)&&(X+=1)}var De=W(X);for(be=X;be<=he&&A;be++)q(be,1,!0)&&(!z||W(be)!=De)&&A--;for($e=new Fe(be,0),be>he&&!De?De=!0:z=!1,be=X;be>se&&!((!z||W(be)==De||be==X)&&q(be,-1,!0));be--);return we=new Fe(be,0),{start:we,end:$e}}function Wr(w,E,A,B,z){function W(se){se.pos+se.dir<0||se.pos+se.dir>=se.line.length?se.line=null:se.pos+=se.dir}function q(se,he,we,$e){var be=se.getLine(he),_e={line:be,ln:he,pos:we,dir:$e};if(_e.line==="")return{ln:_e.ln,pos:_e.pos};var ze=_e.pos;for(W(_e);_e.line!==null;){if(ze=_e.pos,b(_e.line[_e.pos])){if(!z)return{ln:_e.ln,pos:_e.pos+1};for(W(_e);_e.line!==null&&m(_e.line[_e.pos]);)ze=_e.pos,W(_e);return{ln:_e.ln,pos:ze+1}}W(_e)}return{ln:_e.ln,pos:ze+1}}function Y(se,he,we,$e){var be=se.getLine(he),_e={line:be,ln:he,pos:we,dir:$e};if(_e.line==="")return{ln:_e.ln,pos:_e.pos};var ze=_e.pos;for(W(_e);_e.line!==null;){if(!m(_e.line[_e.pos])&&!b(_e.line[_e.pos]))ze=_e.pos;else if(b(_e.line[_e.pos]))return z?m(_e.line[_e.pos+1])?{ln:_e.ln,pos:_e.pos+1}:{ln:_e.ln,pos:ze}:{ln:_e.ln,pos:ze};W(_e)}return _e.line=be,z&&m(_e.line[_e.pos])?{ln:_e.ln,pos:_e.pos}:{ln:_e.ln,pos:ze}}for(var X={ln:E.line,pos:E.ch};A>0;)B<0?X=Y(w,X.ln,X.pos,B):X=q(w,X.ln,X.pos,B),A--;return new Fe(X.ln,X.pos)}function Hr(w,E,A,B){function z(X,se){if(se.pos+se.dir<0||se.pos+se.dir>=se.line.length){if(se.ln+=se.dir,!a(X,se.ln)){se.line=null,se.ln=null,se.pos=null;return}se.line=X.getLine(se.ln),se.pos=se.dir>0?0:se.line.length-1}else se.pos+=se.dir}function W(X,se,he,we){var De=X.getLine(se),$e=De==="",be={line:De,ln:se,pos:he,dir:we},_e={ln:be.ln,pos:be.pos},ze=be.line==="";for(z(X,be);be.line!==null;){if(_e.ln=be.ln,_e.pos=be.pos,be.line===""&&!ze)return{ln:be.ln,pos:be.pos};if($e&&be.line!==""&&!m(be.line[be.pos]))return{ln:be.ln,pos:be.pos};b(be.line[be.pos])&&!$e&&(be.pos===be.line.length-1||m(be.line[be.pos+1]))&&($e=!0),z(X,be)}var De=X.getLine(_e.ln);_e.pos=0;for(var Qe=De.length-1;Qe>=0;--Qe)if(!m(De[Qe])){_e.pos=Qe;break}return _e}function q(X,se,he,we){var ze=X.getLine(se),$e={line:ze,ln:se,pos:he,dir:we},be={ln:$e.ln,pos:null},_e=$e.line==="";for(z(X,$e);$e.line!==null;){if($e.line===""&&!_e)return be.pos!==null?be:{ln:$e.ln,pos:$e.pos};if(!(!b($e.line[$e.pos])||be.pos===null||$e.ln===be.ln&&$e.pos+1===be.pos))return be;$e.line!==""&&!m($e.line[$e.pos])&&(_e=!1,be={ln:$e.ln,pos:$e.pos}),z(X,$e)}var ze=X.getLine(be.ln);be.pos=0;for(var De=0;De<ze.length;++De)if(!m(ze[De])){be.pos=De;break}return be}for(var Y={ln:E.line,pos:E.ch};A>0;)B<0?Y=q(w,Y.ln,Y.pos,B):Y=W(w,Y.ln,Y.pos,B),A--;return new Fe(Y.ln,Y.pos)}function Nn(w,E,A,B){var z=E,W,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[A],X={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[A],se=w.getLine(z.line).charAt(z.ch),he=se===X?1:0;if(W=w.scanForBracket(new Fe(z.line,z.ch+he),-1,void 0,{bracketRegex:Y}),q=w.scanForBracket(new Fe(z.line,z.ch+he),1,void 0,{bracketRegex:Y}),!W||!q)return null;if(W=W.pos,q=q.pos,W.line==q.line&&W.ch>q.ch||W.line>q.line){var we=W;W=q,q=we}return B?q.ch+=1:W.ch+=1,{start:W,end:q}}function Ur(w,E,A,B){var z=Me(E),W=w.getLine(z.line),q=W.split(""),Y,X,se,he,we=q.indexOf(A);if(z.ch<we)z.ch=we;else if(we<z.ch&&q[z.ch]==A){var $e=/string/.test(w.getTokenTypeAt(re(E,0,1))),be=/string/.test(w.getTokenTypeAt(E)),_e=$e&&!be;_e||(X=z.ch,--z.ch)}if(q[z.ch]==A&&!X)Y=z.ch+1;else for(se=z.ch;se>-1&&!Y;se--)q[se]==A&&(Y=se+1);if(Y&&!X)for(se=Y,he=q.length;se<he&&!X;se++)q[se]==A&&(X=se);return!Y||!X?{start:z,end:z}:(B&&(--Y,++X),{start:new Fe(z.line,Y),end:new Fe(z.line,X)})}function xi(){}function Fn(w){var E=w.state.vim;return E.searchState_||(E.searchState_=new xi)}function nr(w){return Ci(w,"/")}function Yi(w){return ds(w,"/")}function Ci(w,E){var A=ds(w,E)||[];if(!A.length)return[];var B=[];if(A[0]===0){for(var z=0;z<A.length;z++)typeof A[z]=="number"&&B.push(w.substring(A[z]+1,A[z+1]));return B}}function ds(w,E){E||(E="/");for(var A=!1,B=[],z=0;z<w.length;z++){var W=w.charAt(z);!A&&W==E&&B.push(z),A=!A&&W=="\\"}return B}function ho(w){for(var E="|(){",A="}",B=!1,z=[],W=-1;W<w.length;W++){var q=w.charAt(W)||"",Y=w.charAt(W+1)||"",X=Y&&E.indexOf(Y)!=-1;B?((q!=="\\"||!X)&&z.push(q),B=!1):q==="\\"?(B=!0,Y&&A.indexOf(Y)!=-1&&(X=!0),(!X||Y==="\\")&&z.push(q)):(z.push(q),X&&Y!=="\\"&&z.push("\\"))}return z.join("")}function Ca(w){for(var E=!1,A=[],B=-1;B<w.length;B++){var z=w.charAt(B)||"",W=w.charAt(B+1)||"";Co[z+W]?(A.push(Co[z+W]),B++):E?(A.push(z),E=!1):z==="\\"?(E=!0,i(W)||W==="$"?A.push("$"):W!=="/"&&W!=="\\"&&A.push("\\")):(z==="$"&&A.push("$"),A.push(z),W==="/"&&A.push("\\"))}return A.join("")}function Ds(w){for(var E=new Be.StringStream(w),A=[];!E.eol();){for(;E.peek()&&E.peek()!="\\";)A.push(E.next());var B=!1;for(var z in Aa)if(E.match(z,!0)){B=!0,A.push(Aa[z]);break}B||A.push(E.next())}return A.join("")}function nn(w,E,A){var B=qe.registerController.getRegister("/");if(B.setText(w),w instanceof RegExp)return w;var z=Yi(w),W,q;if(!z.length)W=w;else{W=w.substring(0,z[0]);var Y=w.substring(z[0]);q=Y.indexOf("i")!=-1}if(!W)return null;_("pcre")||(W=ho(W)),A&&(E=/^[^A-Z]*$/.test(W));var X=new RegExp(W,E||q?"im":"m");return X}function Er(w){typeof w=="string"&&(w=document.createElement(w));for(var E,A=1;A<arguments.length;A++)if(E=arguments[A])if(typeof E!="object"&&(E=document.createTextNode(E)),E.nodeType)w.appendChild(E);else for(var B in E)Object.prototype.hasOwnProperty.call(E,B)&&(B[0]==="$"?w.style[B.slice(1)]=E[B]:w.setAttribute(B,E[B]));return w}function Ut(w,E){var A=Er("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},E);w.openNotification?w.openNotification(A,{bottom:!0,duration:5e3}):alert(A.innerText)}function ps(w,E){return Er("div",{$display:"flex"},Er("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},w,Er("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),E&&Er("span",{$color:"#888"},E))}function br(w,E){if(hi.length){E.value||(E.value=""),Vt=E;return}var A=ps(E.prefix,E.desc);if(w.openDialog)w.openDialog(A,E.onClose,{onKeyDown:E.onKeyDown,onKeyUp:E.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:E.value});else{var B="";typeof E.prefix!="string"&&E.prefix&&(B+=E.prefix.textContent),E.desc&&(B+=" "+E.desc),E.onClose(prompt(B,""))}}function jn(w,E){if(w instanceof RegExp&&E instanceof RegExp){for(var A=["global","multiline","ignoreCase","source"],B=0;B<A.length;B++){var z=A[B];if(w[z]!==E[z])return!1}return!0}return!1}function Cn(w,E,A,B){if(E){var z=Fn(w),W=nn(E,!!A,!!B);if(W)return Bo(w,W),jn(W,z.getQuery())||z.setQuery(W),W}}function Wn(w){if(w.source.charAt(0)=="^")var E=!0;return{token:function(A){if(E&&!A.sol()){A.skipToEnd();return}var B=A.match(w,!1);if(B)return B[0].length==0?(A.next(),"searching"):!A.sol()&&(A.backUp(1),!w.exec(A.next()+B[0]))?(A.next(),null):(A.match(w),"searching");for(;!A.eol()&&(A.next(),!A.match(w,!1)););},query:w}}function Bo(w,E){clearTimeout(vn);var A=Fn(w);A.highlightTimeout=vn,vn=setTimeout(function(){if(w.state.vim){var B=Fn(w);B.highlightTimeout=null;var z=B.getOverlay();(!z||E!=z.query)&&(z&&w.removeOverlay(z),z=Wn(E),w.addOverlay(z),w.showMatchesOnScrollbar&&(B.getScrollbarAnnotate()&&B.getScrollbarAnnotate().clear(),B.setScrollbarAnnotate(w.showMatchesOnScrollbar(E))),B.setOverlay(z))}},50)}function cr(w,E,A,B){return B===void 0&&(B=1),w.operation(function(){for(var z=w.getCursor(),W=w.getSearchCursor(A,z),q=0;q<B;q++){var Y=W.find(E);if(q==0&&Y&&ot(W.from(),z)){var X=E?W.from():W.to();Y=W.find(E),Y&&!Y[0]&&ot(W.from(),X)&&w.getLine(X.line).length==X.ch&&(Y=W.find(E))}if(!Y&&(W=w.getSearchCursor(A,E?new Fe(w.lastLine()):new Fe(w.firstLine(),0)),!W.find(E)))return}return W.from()})}function zo(w,E,A,B,z){return B===void 0&&(B=1),w.operation(function(){var W=w.getCursor(),q=w.getSearchCursor(A,W),Y=q.find(!E);!z.visualMode&&Y&&ot(q.from(),W)&&q.find(!E);for(var X=0;X<B;X++)if(Y=q.find(E),!Y&&(q=w.getSearchCursor(A,E?new Fe(w.lastLine()):new Fe(w.firstLine(),0)),!q.find(E)))return;return[q.from(),q.to()]})}function Rr(w){var E=Fn(w);E.highlightTimeout&&(clearTimeout(E.highlightTimeout),E.highlightTimeout=null),w.removeOverlay(Fn(w).getOverlay()),E.setOverlay(null),E.getScrollbarAnnotate()&&(E.getScrollbarAnnotate().clear(),E.setScrollbarAnnotate(null))}function po(w,E,A){return typeof w!="number"&&(w=w.line),E instanceof Array?x(w,E):typeof A=="number"?w>=E&&w<=A:w==E}function Vr(w){var E=w.ace.renderer;return{top:E.getFirstFullyVisibleRow(),bottom:E.getLastFullyVisibleRow()}}function _i(w,E,A){if(A=="'"||A=="`")return qe.jumpList.find(w,-1)||new Fe(0,0);if(A==".")return ki(w);var B=E.marks[A];return B&&B.find()}function ki(w){if(w.getLastEditEnd)return w.getLastEditEnd();for(var E=w.doc.history.done,A=E.length;A--;)if(E[A].changes)return Me(E[A].changes[0].to)}function es(w,E,A,B,z,W,q,Y,X){function se(){w.operation(function(){for(;!ze;)he(),$e();be()})}function he(){var st=w.getRange(W.from(),W.to()),ut=st.replace(q,Y),Dn=W.to().line;W.replace(ut),Qe=W.to().line,z+=Qe-Dn,bt=Qe<Dn}function we(){var st=De&&Me(W.to()),ut=W.findNext();return ut&&!ut[0]&&st&&ot(W.from(),st)&&(ut=W.findNext()),ut}function $e(){for(;we()&&po(W.from(),B,z);)if(!(!A&&W.from().line==Qe&&!bt)){w.scrollIntoView(W.from(),30),w.setSelection(W.from(),W.to()),De=W.from(),ze=!1;return}ze=!0}function be(st){if(st&&st(),w.focus(),De){w.setCursor(De);var ut=w.state.vim;ut.exMode=!1,ut.lastHPos=ut.lastHSPos=De.ch}X&&X()}function _e(st,ut,Dn){Be.e_stop(st);var Mt=F(st);switch(Mt){case"y":he(),$e();break;case"n":$e();break;case"a":var ln=X;X=void 0,w.operation(se),X=ln;break;case"l":he();case"q":case"<Esc>":case"<C-c>":case"<C-[>":be(Dn)}return ze&&be(Dn),!0}w.state.vim.exMode=!0;var ze=!1,De,Qe,bt;if($e(),ze){Ut(w,"No matches for "+q.source);return}if(!E){se(),X&&X();return}br(w,{prefix:Er("span","replace with ",Er("strong",Y)," (y/n/a/q/l)"),onKeyDown:_e})}function qr(w,E){var A=w.state.vim,B=qe.macroModeState,z=qe.registerController.getRegister("."),W=B.isPlaying,q=B.lastInsertModeChanges;W||(w.off("change",Ir),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=null,Be.off(w.getInputField(),"keydown",vo)),!W&&A.insertModeRepeat>1&&(ts(w,A,A.insertModeRepeat-1,!0),A.lastEditInputState.repeatOverride=A.insertModeRepeat),delete A.insertModeRepeat,A.insertMode=!1,E||w.setCursor(w.getCursor().line,w.getCursor().ch-1),w.setOption("keyMap","vim"),w.setOption("disableInput",!0),w.toggleOverwrite(!1),z.setText(q.changes.join("")),Be.signal(w,"vim-mode-change",{mode:"normal"}),B.isRecording&&Rn(B)}function Fo(w){Zn.unshift(w)}function fo(w,E,A,B,z){var W={keys:w,type:E};W[E]=A,W[E+"Args"]=B;for(var q in z)W[q]=z[q];Fo(W)}function jo(w,E,A,B){var z=qe.registerController.getRegister(B);if(B==":"){z.keyBuffer[0]&&pi.processCommand(w,z.keyBuffer[0]),A.isPlaying=!1;return}var W=z.keyBuffer,q=0;A.isPlaying=!0,A.replaySearchQueries=z.searchQueries.slice(0);for(var Y=0;Y<W.length;Y++)for(var X=W[Y],se,he;X;)if(se=/<\w+-.+?>|<\w+>|./.exec(X),he=se[0],X=X.substring(se.index+he.length),Et.handleKey(w,he,"macro"),E.insertMode){var we=z.insertModeChanges[q++].changes;qe.macroModeState.lastInsertModeChanges.changes=we,Ho(w,we,1),qr(w)}A.isPlaying=!1}function go(w,E){if(!w.isPlaying){var A=w.latestRegister,B=qe.registerController.getRegister(A);B&&B.pushText(E)}}function Rn(w){if(!w.isPlaying){var E=w.latestRegister,A=qe.registerController.getRegister(E);A&&A.pushInsertModeChanges&&A.pushInsertModeChanges(w.lastInsertModeChanges)}}function Ji(w,E){if(!w.isPlaying){var A=w.latestRegister,B=qe.registerController.getRegister(A);B&&B.pushSearchQuery&&B.pushSearchQuery(E)}}function Ir(w,E){var A=qe.macroModeState,B=A.lastInsertModeChanges;if(!A.isPlaying)for(var z=w.state.vim;E;){if(B.expectCursorActivityForChange=!0,B.ignoreCount>1)B.ignoreCount--;else if(E.origin=="+input"||E.origin=="paste"||E.origin===void 0){var W=w.listSelections().length;W>1&&(B.ignoreCount=W);var q=E.text.join(`
1393
+ `);if(B.maybeReset&&(B.changes=[],B.maybeReset=!1),q)if(w.state.overwrite&&!/\n/.test(q))B.changes.push([q]);else{if(q.length>1){var Y=z&&z.insertEnd&&z.insertEnd.find(),X=w.getCursor();if(Y&&Y.line==X.line){var se=Y.ch-X.ch;se>0&&se<q.length&&(B.changes.push([q,se]),q="")}}q&&B.changes.push(q)}}E=E.next}}function mo(w){var E=w.state.vim;if(E.insertMode){var A=qe.macroModeState;if(A.isPlaying)return;var B=A.lastInsertModeChanges;B.expectCursorActivityForChange?B.expectCursorActivityForChange=!1:(B.maybeReset=!0,E.insertEnd&&E.insertEnd.clear(),E.insertEnd=w.setBookmark(w.getCursor(),{insertLeft:!0}))}else w.curOp.isVimOp||fs(w,E)}function fs(w,E,A){var B=w.getCursor("anchor"),z=w.getCursor("head");if(E.visualMode&&!w.somethingSelected()?mn(w,!1):!E.visualMode&&!E.insertMode&&w.somethingSelected()&&(E.visualMode=!0,E.visualLine=!1,Be.signal(w,"vim-mode-change",{mode:"visual"})),E.visualMode){var W=Ge(z,B)?0:-1,q=Ge(z,B)?-1:0;z=re(z,0,W),B=re(B,0,q),E.sel={anchor:B,head:z},ci(w,E,"<",Ze(z,B)),ci(w,E,">",Ie(z,B))}else!E.insertMode&&!A&&(E.lastHPos=w.getCursor().ch)}function Wo(w,E){this.keyName=w,this.key=E.key,this.ctrlKey=E.ctrlKey,this.altKey=E.altKey,this.metaKey=E.metaKey,this.shiftKey=E.shiftKey}function vo(w){var E=qe.macroModeState,A=E.lastInsertModeChanges,B=Be.keyName?Be.keyName(w):w.key;B&&(B.indexOf("Delete")!=-1||B.indexOf("Backspace")!=-1)&&(A.maybeReset&&(A.changes=[],A.maybeReset=!1),A.changes.push(new Wo(B,w)))}function ts(w,E,A,B){function z(){Y?Zi.processAction(w,E,E.lastEditActionCommand):Zi.evalInput(w,E)}function W(he){if(q.lastInsertModeChanges.changes.length>0){he=E.lastEditActionCommand?he:1;var we=q.lastInsertModeChanges;Ho(w,we.changes,he)}}var q=qe.macroModeState;q.isPlaying=!0;var Y=!!E.lastEditActionCommand,X=E.inputState;if(E.inputState=E.lastEditInputState,Y&&E.lastEditActionCommand.interlaceInsertRepeat)for(var se=0;se<A;se++)z(),W(1);else B||z(),W(A);E.inputState=X,E.insertMode&&!B&&qr(w),q.isPlaying=!1}function gs(w,E){Be.lookupKey(E,"vim-insert",function(A){return typeof A=="string"?Be.commands[A](w):A(w),!0})}function Ho(w,E,A){var B=w.getCursor("head"),z=qe.macroModeState.lastInsertModeChanges.visualBlock;z&&(Tr(w,B,z+1),A=w.listSelections().length,w.setCursor(B));for(var W=0;W<A;W++){z&&w.setCursor(re(B,W,0));for(var q=0;q<E.length;q++){var Y=E[q];if(Y instanceof Wo)gs(w,Y.keyName);else if(typeof Y=="string")w.replaceSelection(Y);else{var X=w.getCursor(),se=re(X,0,Y[0].length-(Y[1]||0));w.replaceRange(Y[0],X,Y[1]?X:se),w.setCursor(se)}}}z&&w.setCursor(re(B,0,1))}function Ps(w,E,A,B){E.length>1&&E[0]=="n"&&(E=E.replace("numpad","")),E=rs[E]||E;var z="";if(A.ctrlKey&&(z+="C-"),A.altKey&&(z+="A-"),(z||E.length>1)&&A.shiftKey&&(z+="S-"),B&&!B.expectLiteralNext&&E.length==1){if(Xn.keymap&&E in Xn.keymap)(Xn.remapCtrl!==!1||!z)&&(E=Xn.keymap[E]);else if(E.charCodeAt(0)>255){var W=A.code&&A.code.slice(-1)||"";A.shiftKey||(W=W.toLowerCase()),W&&(E=W)}}return z+=E,z.length>1&&(z="<"+z+">"),z}function yo(w){var E=new w.constructor;return Object.keys(w).forEach(function(A){if(A!="insertEnd"){var B=w[A];Array.isArray(B)?B=B.slice():B&&typeof B=="object"&&B.constructor!=Object&&(B=yo(B)),E[A]=B}}),w.sel&&(E.sel={head:w.sel.head&&Me(w.sel.head),anchor:w.sel.anchor&&Me(w.sel.anchor)}),E}function Uo(w,E,A){var B=!1,z=Et.maybeInitVimState_(w),W=z.visualBlock||z.wasInVisualBlock,q=w.ace.inMultiSelectMode;if(z.wasInVisualBlock&&!q?z.wasInVisualBlock=!1:q&&z.visualBlock&&(z.wasInVisualBlock=!0),E=="<Esc>"&&!z.insertMode&&!z.visualMode&&q)w.ace.exitMultiSelectMode();else if(W||!q||w.ace.inVirtualSelectionMode)B=Et.handleKey(w,E,A);else{var Y=yo(z),X=z.inputState.changeQueueList||[];w.operation(function(){w.curOp.isVimOp=!0;var se=0;w.ace.forEachSelection(function(){var he=w.ace.selection;w.state.vim.lastHPos=he.$desiredColumn==null?he.lead.column:he.$desiredColumn,w.state.vim.inputState.changeQueue=X[se];var we=w.getCursor("head"),$e=w.getCursor("anchor"),be=Ge(we,$e)?0:-1,_e=Ge(we,$e)?-1:0;we=re(we,0,be),$e=re($e,0,_e),w.state.vim.sel.head=we,w.state.vim.sel.anchor=$e,B=Xr(w,E,A),he.$desiredColumn=w.state.vim.lastHPos==-1?null:w.state.vim.lastHPos,w.ace.inVirtualSelectionMode&&(X[se]=w.state.vim.inputState.changeQueue),w.virtualSelectionMode()&&(w.state.vim=yo(Y)),se++}),w.curOp.cursorActivity&&!B&&(w.curOp.cursorActivity=!1),z.status=w.state.vim.status,w.state.vim=z,z.inputState.changeQueueList=X,z.inputState.changeQueue=null},!0)}return B&&!z.visualMode&&!z.insert&&z.visualMode!=w.somethingSelected()&&fs(w,z,!0),B}function ui(w,E){E.off("beforeEndOperation",ui);var A=E.state.cm.vimCmd;A&&E.execCommand(A.exec?A:A.name,A.args),E.curOp=E.prevOp}var Yn=t("../range").Range,te=t("../lib/event_emitter").EventEmitter,Se=t("../lib/dom"),Le=t("../lib/oop"),Ke=t("../lib/keys"),xt=t("../lib/event"),St=t("../search").Search,It=t("../lib/useragent"),Mr=t("../search_highlight").SearchHighlight,Lr=t("../commands/multi_select_commands"),Jn=t("../mode/text").Mode.prototype.tokenRe,rr=t("../ext/hardwrap").hardWrap;t("../multi_select");var Be=function(w){this.ace=w,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(w,E){if(!(this instanceof Fe))return new Fe(w,E);this.line=w,this.ch=E},Be.defineOption=function(w,E,A){},Be.commands={redo:function(w){w.ace.redo()},undo:function(w){w.ace.undo()},newlineAndIndent:function(w){w.ace.insert(`
1394
+ `)},goLineLeft:function(w){w.ace.selection.moveCursorLineStart()},goLineRight:function(w){w.ace.selection.moveCursorLineEnd()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=xt.stopEvent,Be.keyName=function(w){var E=Ke[w.keyCode]||w.key||"";return E.length==1&&(E=E.toUpperCase()),E=xt.getModifierString(w).replace(/(^|-)\w/g,function(A){return A.toUpperCase()})+E,E},Be.keyMap.default=function(w){return function(E){var A=E.ace.commands.commandKeyBinding[w.toLowerCase()];return A&&E.ace.execCommand(A)!==!1}},Be.lookupKey=function w(E,A,B){A||(A="default"),typeof A=="string"&&(A=Be.keyMap[A]||Be.keyMap.default);var z=typeof A=="function"?A(E):A[E];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&B(z))return"handled";if(A.fallthrough){if(!Array.isArray(A.fallthrough))return w(E,A.fallthrough,B);for(var W=0;W<A.fallthrough.length;W++){var q=w(E,A.fallthrough[W],B);if(q)return q}}},Be.findMatchingTag=function(w,E){return w.findMatchingTag(E)},Be.findEnclosingTag=function(w,E){},Be.signal=function(w,E,A){return w._signal(E,A)},Be.on=xt.addListener,Be.off=xt.removeListener,Be.isWordChar=function(w){return w<""?/^\w$/.test(w):(Jn.lastIndex=0,Jn.test(w))},(function(){Le.implement(Be.prototype,te),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(A){this.$lineHandleChanges&&this.$lineHandleChanges.push(A);var B={text:A.action[0]=="i"?A.lines:[]},z=this.curOp=this.curOp||{};z.changeHandlers||(z.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),z.lastChange?z.lastChange.next=z.lastChange=B:z.lastChange=z.change=B,this.$updateMarkers(A)},this.onSelectionChange=function(){var A=this.curOp=this.curOp||{};A.cursorActivityHandlers||(A.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Lr.keyboardHandler)},this.operation=function(A,B){if(!B&&this.curOp||B&&this.curOp&&this.curOp.force)return A();if((B||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var z=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var W=this.curOp=this.curOp||{};this.curOp.force=B;var q=A();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(),!W.cursorActivity&&!W.lastChange&&z&&(this.ace.prevOp=z)),(B||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var A=this.curOp;A&&(A.change&&this.signal("change",A.change,A),A&&A.cursorActivity&&this.signal("cursorActivity",null,A),this.curOp=null)},this.signal=function(A,B,z){var W=z?z[A+"Handlers"]:(this._eventRegistry||{})[A];if(W){W=W.slice();for(var q=0;q<W.length;q++)W[q](this,B)}},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(A,B){typeof A=="object"&&(B=A.ch,A=A.line);var z=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:A,column:B}),this.ace.selection.moveTo(A,B),z&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(A){var B=this.ace.selection,z=A=="anchor"?B.isEmpty()?B.lead:B.anchor:A=="head"||!A?B.lead:B.getRange()[A];return g(z)},this.listSelections=function(A){var B=this.ace.multiSelect.rangeList.ranges;return!B.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:B.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(A,B){var z=this.ace.multiSelect,W=A.map(function(se){var he=d(se.anchor),we=d(se.head),$e=Yn.comparePoints(he,we)<0?new Yn.fromPoints(he,we):new Yn.fromPoints(we,he);return $e.cursor=Yn.comparePoints($e.start,we)?$e.end:$e.start,$e});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(W[0]);return}B?W[B]&&W.push(W.splice(B,1)[0]):W=W.reverse(),z.toSingleRange(W[0].clone());for(var q=this.ace.session,Y=0;Y<W.length;Y++){var X=q.$clipRangeToDocument(W[Y]);z.addRange(X)}},this.setSelection=function(A,B,z){var W=this.ace.selection;W.moveTo(A.line,A.ch),W.selectTo(B.line,B.ch),z&&z.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(A){return!this.ace.selection.isEmpty()},this.clipPos=function(A){var B=this.ace.session.$clipPositionToDocument(A.line,A.ch);return g(B)},this.foldCode=function(A){this.ace.session.$toggleFoldWidget(A.line,{})},this.markText=function(A){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(A){var B=A.action=="insert",z=A.start,W=A.end,q=(W.row-z.row)*(B?1:-1),Y=(W.column-z.column)*(B?1:-1);B&&(W=z);for(var X in this.marks){var se=this.marks[X],he=Yn.comparePoints(se,z);if(!(he<0)){if(he===0&&B)if(!se.$insertRight)he=1;else{if(se.bias!=1){se.bias=-1;continue}he=1}var we=B?he:Yn.comparePoints(se,W);if(we>0){se.row+=q,se.column+=se.row==W.row?Y:0;continue}!B&&we<=0&&(se.row=z.row,se.column=z.column,we===0&&(se.bias=1))}}};var w=function(A,B,z,W){this.cm=A,this.id=B,this.row=z,this.column=W,A.marks[this.id]=this};w.prototype.clear=function(){delete this.cm.marks[this.id]},w.prototype.find=function(){return g(this)},this.setBookmark=function(A,B){var z=new w(this,this.$uid++,A.line,A.ch);return(!B||!B.insertLeft)&&(z.$insertRight=!0),this.marks[z.id]=z,z},this.moveH=function(A,B){if(B=="char"){var z=this.ace.selection;z.clearSelection(),z.moveCursorBy(0,A)}},this.findPosV=function(A,B,z,W){if(z=="page"){var q=this.ace.renderer,Y=q.layerConfig;B*=Math.floor(Y.height/Y.lineHeight),z="line"}if(z=="line"){var X=this.ace.session.documentToScreenPosition(A.line,A.ch);W!=null&&(X.column=W),X.row+=B,X.row=Math.min(Math.max(0,X.row),this.ace.session.getScreenLength()-1);var se=this.ace.session.screenToDocumentPosition(X.row,X.column);return g(se)}debugger},this.charCoords=function(A,B){if(B=="div"||!B){var z=this.ace.session.documentToScreenPosition(A.line,A.ch);return{left:z.column,top:z.row}}if(B=="local"){var W=this.ace.renderer,z=this.ace.session.documentToScreenPosition(A.line,A.ch),q=W.layerConfig.lineHeight,Y=W.layerConfig.characterWidth,X=q*z.row;return{left:z.column*Y,top:X,bottom:X+q}}},this.coordsChar=function(A,B){var z=this.ace.renderer;if(B=="local"){var W=Math.max(0,Math.floor(A.top/z.lineHeight)),q=Math.max(0,Math.floor(A.left/z.characterWidth)),Y=z.session.screenToDocumentPosition(W,q);return g(Y)}if(B=="div")throw"not implemented"},this.getSearchCursor=function(A,B,z){var W=!1,q=!1;A instanceof RegExp&&!A.global&&(W=!A.ignoreCase,A=A.source,q=!0),A=="\\n"&&(A=`
1395
+ `,q=!1);var Y=new St;B.ch==null&&(B.ch=Number.MAX_VALUE);var X={row:B.line,column:B.ch},se=this,he=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(we){Y.setOptions({needle:A,caseSensitive:W,wrap:!1,backwards:we,regExp:q,start:he||X});var $e=Y.find(se.ace.session);return he=$e,he&&[!he.isEmpty()]},from:function(){return he&&g(he.start)},to:function(){return he&&g(he.end)},replace:function(we){he&&(he.end=se.ace.session.doc.replace(he,we))}}},this.scrollTo=function(A,B){var z=this.ace.renderer,W=z.layerConfig,q=W.maxHeight;q-=(z.$size.scrollerHeight-z.lineHeight)*z.$scrollPastEnd,B!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(B,q))),A!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(A,W.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(A,B){if(A){var z=this.ace.renderer,W={top:0,bottom:B};z.scrollCursorIntoView(d(A),z.lineHeight*2/z.$size.scrollerHeight,W)}},this.getLine=function(A){return this.ace.session.getLine(A)},this.getRange=function(A,B){return this.ace.session.getTextRange(new Yn(A.line,A.ch,B.line,B.ch))},this.replaceRange=function(A,B,z){z||(z=B);var W=new Yn(B.line,B.ch,z.line,z.ch);return this.ace.session.$clipRangeToDocument(W),this.ace.session.replace(W,A)},this.replaceSelection=this.replaceSelections=function(A){var B=Array.isArray(A)&&A,z=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(z.getRange(),B?A[0]||"":A);return}z.inVirtualSelectionMode=!0;var W=z.rangeList.ranges;W.length||(W=[this.ace.multiSelect.getRange()]);for(var q=W.length;q--;)this.ace.session.replace(W[q],B?A[q]||"":A);z.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(A){return this.getRange(A.anchor,A.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var E={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(A,B){switch(this.state[A]=B,A){case"indentWithTabs":A=E[A],B=!B;break;case"keyMap":this.state.$keyMap=B;return;default:A=E[A]}A&&this.ace.setOption(A,B)},this.getOption=function(A){var B,z=E[A];switch(z&&(B=this.ace.getOption(z)),A){case"indentWithTabs":return A=E[A],!B;case"keyMap":return this.state.$keyMap||"vim"}return z?B:this.state[A]},this.toggleOverwrite=function(A){return this.state.overwrite=A,this.ace.setOverwrite(A)},this.addOverlay=function(A){if(!this.$searchHighlight||!this.$searchHighlight.session){var B=new Mr(null,"ace_highlight-marker","text"),z=this.ace.session.addDynamicMarker(B);B.id=z.id,B.session=this.ace.session,B.destroy=function(q){B.session.off("change",B.updateOnChange),B.session.off("changeEditor",B.destroy),B.session.removeMarker(B.id),B.session=null},B.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?B.cache[Y]=void 0:B.cache.splice(Y,B.cache.length)},B.session.on("changeEditor",B.destroy),B.session.on("change",B.updateOnChange)}var W=new RegExp(A.query.source,"gmi");this.$searchHighlight=A.highlight=B,this.$searchHighlight.setRegexp(W),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(A){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var A=this.ace.renderer,B=A.layerConfig;return{left:A.scrollLeft,top:A.scrollTop,height:B.maxHeight,width:B.width,clientHeight:B.height,clientWidth:B.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(A){return this.ace.setValue(A,-1)},this.getTokenTypeAt=function(A){var B=this.ace.session.getTokenAt(A.line,A.ch);return B&&/comment|string/.test(B.type)?"string":""},this.findMatchingBracket=function(A){var B=this.ace.session.findMatchingBracket(d(A));return{to:B&&g(B)}},this.findMatchingTag=function(A){var B=this.ace.session.getMatchingTags(d(A));if(B)return{open:{from:g(B.openTag.start),to:g(B.openTag.end)},close:{from:g(B.closeTag.start),to:g(B.closeTag.end)}}},this.indentLine=function(A,B){B===!0?this.ace.session.indentRows(A,A," "):B===!1&&this.ace.session.outdentRows(new Yn(A,0,A,0))},this.indexFromPos=function(A){return this.ace.session.doc.positionToIndex(d(A))},this.posFromIndex=function(A){return g(this.ace.session.doc.indexToPosition(A))},this.focus=function(A){return this.ace.textInput.focus()},this.blur=function(A){return this.ace.blur()},this.defaultTextHeight=function(A){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(A,B,z,W){var q=W.bracketRegex.source,Y=/paren|text|operator|tag/;if(B==1)var X=this.ace.session.$findClosingBracket(q.slice(1,2),d(A),Y);else{var X=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:A.line,column:A.ch+1},Y);!X&&W.bracketRegex&&W.bracketRegex.test(this.getLine(A.line)[A.ch-1])&&(X={row:A.line,column:A.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(A){if(Be.commands.hasOwnProperty(A))return Be.commands[A](this);if(A=="indentAuto")return this.ace.execCommand("autoindent");console.log(A+" is not implemented")},this.getLineNumber=function(A){var B=this.$lineHandleChanges;if(!B)return null;for(var z=A.row,W=0;W<B.length;W++){var q=B[W];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(A){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(A),row:A}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var A=this.ace.session.$undoManager;if(A&&A.$lastDelta)return g(A.$lastDelta.end)}}).call(Be.prototype);var _a=Be.StringStream=function(w,E){this.pos=this.start=0,this.string=w,this.tabSize=E||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};_a.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(w){var E=this.string.charAt(this.pos);if(typeof w=="string")var A=E==w;else var A=E&&(w.test?w.test(E):w(E));if(A)return++this.pos,E},eatWhile:function(w){for(var E=this.pos;this.eat(w););return this.pos>E},eatSpace:function(){for(var w=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>w},skipToEnd:function(){this.pos=this.string.length},skipTo:function(w){var E=this.string.indexOf(w,this.pos);if(E>-1)return this.pos=E,!0},backUp:function(w){this.pos-=w},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(w,E,A){if(typeof w!="string"){var B=this.string.slice(this.pos).match(w);return B&&B.index>0?null:(B&&E!==!1&&(this.pos+=B[0].length),B)}var z=function(q){return A?q.toLowerCase():q},W=this.string.substr(this.pos,w.length);if(z(W)==z(w))return E!==!1&&(this.pos+=w.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(w,E){this.lineStart+=w;try{return E()}finally{this.lineStart-=w}}},Be.defineExtension=function(w,E){Be.prototype[w]=E},Se.importCssString(`.normal-mode .ace_cursor{
1396
+ border: none;
1397
+ background-color: rgba(255,0,0,0.5);
1398
+ }
1399
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1400
+ background-color: transparent;
1401
+ border: 1px solid red;
1402
+ opacity: 0.7
1403
+ }
1404
+ .ace_dialog {
1405
+ position: absolute;
1406
+ left: 0; right: 0;
1407
+ background: inherit;
1408
+ z-index: 15;
1409
+ padding: .1em .8em;
1410
+ overflow: hidden;
1411
+ color: inherit;
1412
+ }
1413
+ .ace_dialog-top {
1414
+ border-bottom: 1px solid #444;
1415
+ top: 0;
1416
+ }
1417
+ .ace_dialog-bottom {
1418
+ border-top: 1px solid #444;
1419
+ bottom: 0;
1420
+ }
1421
+ .ace_dialog input {
1422
+ border: none;
1423
+ outline: none;
1424
+ background: transparent;
1425
+ width: 20em;
1426
+ color: inherit;
1427
+ font-family: monospace;
1428
+ }`,"vimMode",!1),(function(){function w(A,B,z){var W=A.ace.container,q;return q=W.appendChild(document.createElement("div")),z?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof B=="string"?q.innerHTML=B:q.appendChild(B),q}function E(A,B){A.state.currentNotificationClose&&A.state.currentNotificationClose(),A.state.currentNotificationClose=B}Be.defineExtension("openDialog",function(A,B,z){function W(we){if(typeof we=="string")se.value=we;else{if(Y||we&&we.type=="blur"&&document.activeElement===se)return;X.state.dialog==q&&(X.state.dialog=null,X.focus()),Y=!0,q.remove(),z.onClose&&z.onClose(q);var $e=X;$e.state.vim&&($e.state.vim.status=null,$e.ace._signal("changeStatus"),$e.ace.renderer.$loop.schedule($e.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){z||(z={}),E(this,null);var q=w(this,A,z.bottom),Y=!1,X=this;this.state.dialog=q;var se=q.getElementsByTagName("input")[0],he;return se?(z.value&&(se.value=z.value,z.selectValueOnOpen!==!1&&se.select()),z.onInput&&Be.on(se,"input",function(we){z.onInput(we,se.value,W)}),z.onKeyUp&&Be.on(se,"keyup",function(we){z.onKeyUp(we,se.value,W)}),Be.on(se,"keydown",function(we){z&&z.onKeyDown&&z.onKeyDown(we,se.value,W)||(we.keyCode==13&&B(se.value),(we.keyCode==27||z.closeOnEnter!==!1&&we.keyCode==13)&&(Be.e_stop(we),W()))}),z.closeOnBlur!==!1&&Be.on(se,"blur",W),se.focus()):(he=q.getElementsByTagName("button")[0])&&(Be.on(he,"click",function(){W(),X.focus()}),z.closeOnBlur!==!1&&Be.on(he,"blur",W),he.focus()),W}}),Be.defineExtension("openNotification",function(A,B){function z(){q||(q=!0,clearTimeout(Y),W.remove())}if(!this.virtualSelectionMode()){E(this,z);var W=w(this,A,B&&B.bottom),q=!1,Y,X=B&&typeof B.duration<"u"?B.duration:5e3;return Be.on(W,"click",function(se){Be.e_preventDefault(se),z()}),X&&(Y=setTimeout(z,X)),z}})})();var Fe=Be.Pos,Zn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],ms=Zn.length,Vo=[{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"}],Xn=M(""),yl=/[\d]/,vs=[Be.isWordChar,function(w){return w&&!Be.isWordChar(w)&&!/\s/.test(w)}],bo=[function(w){return/\S/.test(w)}],ns=["<",">"],ka=["-",'"',".",":","_","/","+"],fn=/^\w$/,yt;try{yt=new RegExp("^[\\p{Lu}]$","u")}catch{yt=/^[A-Z]$/}var Qt={};I("filetype",void 0,"string",["ft"],function(w,E){if(E!==void 0){if(w===void 0){var A=E.getOption("mode");return A=="null"?"":A}var A=w==""?"null":w;E.setOption("mode",A)}}),I("textwidth",80,"number",["tw"],function(w,E){if(E!==void 0){if(w===void 0){var A=E.getOption("textwidth");return A}var B=Math.round(w);B>1&&E.setOption("textwidth",B)}});var wo=function(){function w(X,se,he){function we(ze){var De=++z%B,Qe=Y[De];Qe&&Qe.clear(),Y[De]=X.setBookmark(ze)}var $e=z%B,be=Y[$e];if(be){var _e=be.find();_e&&!ot(_e,se)&&we(se)}else we(se);we(he),W=z,q=z-B+1,q<0&&(q=0)}function E(X,se){z+=se,z>W?z=W:z<q&&(z=q);var he=Y[(B+z)%B];if(he&&!he.find()){var we=se>0?1:-1,$e,be=X.getCursor();do if(z+=we,he=Y[(B+z)%B],he&&($e=he.find())&&!ot(be,$e))break;while(z<W&&z>q)}return he}function A(X,se){var he=z,we=E(X,se);return z=he,we&&we.find()}var B=100,z=-1,W=0,q=0,Y=new Array(B);return{cachedCursor:void 0,add:w,find:A,move:E}},ir=function(w){return w?{changes:w.changes,expectCursorActivityForChange:w.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var w=qe.macroModeState;w.onRecordingDone&&w.onRecordingDone(),w.onRecordingDone=void 0,w.isRecording=!1},enterMacroRecordMode:function(w,E){var A=qe.registerController.getRegister(E);if(A){if(A.clear(),this.latestRegister=E,w.openDialog){var B=Er("span",{class:"cm-vim-message"},"recording @"+E);this.onRecordingDone=w.openDialog(B,null,{bottom:!0})}this.isRecording=!0}}};var qe,In,Et={enterVimMode:l,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return qe.registerController},resetVimGlobalState_:P,getVimGlobalState_:function(){return qe},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:Wo,map:function(w,E,A){pi.map(w,E,A)},unmap:function(w,E){return pi.unmap(w,E)},noremap:function(w,E,A){pi.map(w,E,A,!0)},mapclear:function(w){var E=Zn.length,A=ms,B=Zn.slice(0,E-A);if(Zn=Zn.slice(E-A),w)for(var z=B.length-1;z>=0;z--){var W=B[z];if(w!==W.context)if(W.context)this._mapCommand(W);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==w){var X={};for(var se in W)X[se]=W[se];X.context=q[Y],this._mapCommand(X)}}}},langmap:D,vimKeyFromEvent:F,setOption:$,getOption:_,defineOption:I,defineEx:function(w,E,A){if(!E)E=w;else if(w.indexOf(E)!==0)throw new Error('(Vim.defineEx) "'+E+'" is not a prefix of "'+w+'", command not registered');Or[w]=A,pi.commandMap_[E]={name:w,shortName:E,type:"api"}},handleKey:function(w,E,A){var B=this.findKey(w,E,A);if(typeof B=="function")return B()},multiSelectHandleKey:Uo,findKey:function(w,E,A){function B(){var se=qe.macroModeState;if(se.isRecording){if(E=="q")return se.exitMacroRecordMode(),k(w),!0;A!="mapping"&&go(se,E)}}function z(){if(E=="<Esc>"){if(Y.visualMode)mn(w);else{if(!Y.insertMode)return;qr(w)}return k(w),!0}}function W(){if(z())return!0;Y.inputState.keyBuffer.push(E);var se=Y.inputState.keyBuffer.join(""),he=E.length==1,we=Zi.matchCommand(se,Zn,Y.inputState,"insert"),$e=Y.inputState.changeQueue;if(we.type=="none")return k(w),!1;if(we.type=="partial"){if(we.expectLiteralNext&&(Y.expectLiteralNext=!0),In&&window.clearTimeout(In),In=he&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&k(w)},_("insertModeEscKeysTimeout")),he){var be=w.listSelections();(!$e||$e.removed.length!=be.length)&&($e=Y.inputState.changeQueue=new N),$e.inserted+=E;for(var _e=0;_e<be.length;_e++){var ze=Ze(be[_e].anchor,be[_e].head),De=Ie(be[_e].anchor,be[_e].head),Qe=w.getRange(ze,w.state.overwrite?re(De,0,1):De);$e.removed[_e]=($e.removed[_e]||"")+Qe}}return!he}if(Y.expectLiteralNext=!1,In&&window.clearTimeout(In),we.command&&$e){for(var be=w.listSelections(),_e=0;_e<be.length;_e++){var bt=be[_e].head;w.replaceRange($e.removed[_e]||"",re(bt,0,-$e.inserted.length),bt,"+input")}qe.macroModeState.lastInsertModeChanges.changes.pop()}return we.command||k(w),we.command}function q(){if(B()||z())return!0;Y.inputState.keyBuffer.push(E);var se=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(se))return!0;var he=/^(\d*)(.*)$/.exec(se);if(!he)return k(w),!1;var we=Y.visualMode?"visual":"normal",$e=he[2]||he[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==$e&&($e=Y.inputState.operatorShortcut);var be=Zi.matchCommand($e,Zn,Y.inputState,we);return be.type=="none"?(k(w),!1):be.type=="partial"?(be.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):be.type=="clear"?(k(w),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,he=/^(\d*)(.*)$/.exec(se),he[1]&&he[1]!="0"&&Y.inputState.pushRepeatDigit(he[1]),be.command)}var Y=O(w),X;return Y.insertMode?X=W():X=q(),X===!1?!Y.insertMode&&E.length===1?function(){return!0}:void 0:X===!0?function(){return!0}:function(){if(!((X.operator||X.isEdit)&&w.getOption("readOnly")))return w.operation(function(){w.curOp.isVimOp=!0;try{X.type=="keyToKey"?T(w,X.toKeys,X):Zi.processCommand(w,Y,X)}catch(se){throw w.state.vim=void 0,O(w),Et.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(w,E){pi.processCommand(w,E)},defineMotion:Q,defineAction:ue,defineOperator:ie,mapCommand:fo,_mapCommand:Fo,defineRegister:U,exitVisualMode:mn,exitInsertMode:qr},hi=[],xo=!1,Vt,di={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},wr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},qo={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(di)).forEach(function(w){qo[(di[w]||"").toLowerCase()]=qo[w.toLowerCase()]=w}),I("langmap",void 0,"string",["lmap"],function(w,E){if(w===void 0)return Xn.string;D(w)}),S.prototype.pushRepeatDigit=function(w){this.operator?this.motionRepeat=this.motionRepeat.concat(w):this.prefixRepeat=this.prefixRepeat.concat(w)},S.prototype.getRepeat=function(){var w=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(w=1,this.prefixRepeat.length>0&&(w*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(w*=parseInt(this.motionRepeat.join(""),10))),w},j.prototype={setText:function(w,E,A){this.keyBuffer=[w||""],this.linewise=!!E,this.blockwise=!!A},pushText:function(w,E){E&&(this.linewise||this.keyBuffer.push(`
1429
+ `),this.linewise=!0),this.keyBuffer.push(w)},pushInsertModeChanges:function(w){this.insertModeChanges.push(ir(w))},pushSearchQuery:function(w){this.searchQueries.push(w)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(w,E,A,B,z){if(w!=="_"){B&&A.charAt(A.length-1)!==`
1430
+ `&&(A+=`
1431
+ `);var W=this.isValidRegister(w)?this.getRegister(w):null;if(!W){switch(E){case"yank":this.registers[0]=new j(A,B,z);break;case"delete":case"change":A.indexOf(`
1432
+ `)==-1?this.registers["-"]=new j(A,B):(this.shiftNumericRegisters_(),this.registers[1]=new j(A,B))}this.unnamedRegister.setText(A,B,z);return}var q=c(w);q?W.pushText(A,B):W.setText(A,B,z),w==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(A),this.unnamedRegister.setText(W.toString(),B)}},getRegister:function(w){return this.isValidRegister(w)?(w=w.toLowerCase(),this.registers[w]||(this.registers[w]=new j),this.registers[w]):this.unnamedRegister},isValidRegister:function(w){return w&&(x(w,ka)||fn.test(w))},shiftNumericRegisters_:function(){for(var w=9;w>=2;w--)this.registers[w]=this.getRegister(""+(w-1))}},J.prototype={nextMatch:function(w,E){var A=this.historyBuffer,B=E?-1:1;this.initialPrefix===null&&(this.initialPrefix=w);for(var z=this.iterator+B;E?z>=0:z<A.length;z+=B)for(var W=A[z],q=0;q<=W.length;q++)if(this.initialPrefix==W.substring(0,q))return this.iterator=z,W;if(z>=A.length)return this.iterator=A.length,this.initialPrefix;if(z<0)return w},pushInput:function(w){var E=this.historyBuffer.indexOf(w);E>-1&&this.historyBuffer.splice(E,1),w.length&&this.historyBuffer.push(w)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Zi={matchCommand:function(w,E,A,B){var z=Ce(w,E,B,A);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 W,q=0;q<z.full.length;q++){var Y=z.full[q];W||(W=Y)}if(W.keys.slice(-11)=="<character>"||W.keys.slice(-10)=="<register>"){var X=Ee(w);if(!X||X.length>1)return{type:"clear"};A.selectedCharacter=X}return{type:"full",command:W}},processCommand:function(w,E,A){switch(E.inputState.repeatOverride=A.repeatOverride,A.type){case"motion":this.processMotion(w,E,A);break;case"operator":this.processOperator(w,E,A);break;case"operatorMotion":this.processOperatorMotion(w,E,A);break;case"action":this.processAction(w,E,A);break;case"search":this.processSearch(w,E,A);break;case"ex":case"keyToEx":this.processEx(w,E,A);break}},processMotion:function(w,E,A){E.inputState.motion=A.motion,E.inputState.motionArgs=oe(A.motionArgs),this.evalInput(w,E)},processOperator:function(w,E,A){var B=E.inputState;if(B.operator){if(B.operator==A.operator){B.motion="expandToLine",B.motionArgs={linewise:!0},this.evalInput(w,E);return}k(w)}B.operator=A.operator,B.operatorArgs=oe(A.operatorArgs),A.keys.length>1&&(B.operatorShortcut=A.keys),A.exitVisualBlock&&(E.visualBlock=!1,Bn(w)),E.visualMode&&this.evalInput(w,E)},processOperatorMotion:function(w,E,A){var B=E.visualMode,z=oe(A.operatorMotionArgs);z&&B&&z.visualLine&&(E.visualLine=!0),this.processOperator(w,E,A),B||this.processMotion(w,E,A)},processAction:function(w,E,A){var B=E.inputState,z=B.getRepeat(),W=!!z,q=oe(A.actionArgs)||{};B.selectedCharacter&&(q.selectedCharacter=B.selectedCharacter),A.operator&&this.processOperator(w,E,A),A.motion&&this.processMotion(w,E,A),(A.motion||A.operator)&&this.evalInput(w,E),q.repeat=z||1,q.repeatIsExplicit=W,q.registerName=B.registerName,k(w),E.lastMotion=null,A.isEdit&&this.recordLastEdit(E,B,A),or[A.action](w,q,E)},processSearch:function(w,E,A){function B(De,Qe,bt){qe.searchHistoryController.pushInput(De),qe.searchHistoryController.reset();try{Cn(w,De,Qe,bt)}catch{Ut(w,"Invalid regex: "+De),k(w);return}Zi.processMotion(w,E,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:A.searchArgs.toJumplist}})}function z(De){B(De,!0,!0);var Qe=qe.macroModeState;Qe.isRecording&&Ji(Qe,De)}function W(De,Qe,bt){var st=F(De),ut,Dn;st=="<Up>"||st=="<Down>"?(ut=st=="<Up>",Dn=De.target?De.target.selectionEnd:0,Qe=qe.searchHistoryController.nextMatch(Qe,ut)||"",bt(Qe),Dn&&De.target&&(De.target.selectionEnd=De.target.selectionStart=Math.min(Dn,De.target.value.length))):st&&st!="<Left>"&&st!="<Right>"&&qe.searchHistoryController.reset();var Mt;try{Mt=Cn(w,Qe,!0,!0)}catch{}Mt?w.scrollIntoView(cr(w,!Y,Mt),30):(Rr(w),w.scrollTo(we.left,we.top))}function q(De,Qe,bt){var st=F(De);st=="<Esc>"||st=="<C-c>"||st=="<C-[>"||st=="<BS>"&&Qe==""?(qe.searchHistoryController.pushInput(Qe),qe.searchHistoryController.reset(),Cn(w,he),Rr(w),w.scrollTo(we.left,we.top),Be.e_stop(De),k(w),bt(),w.focus()):st=="<Up>"||st=="<Down>"?Be.e_stop(De):st=="<C-u>"&&(Be.e_stop(De),bt(""))}if(w.getSearchCursor){var Y=A.searchArgs.forward,X=A.searchArgs.wholeWordOnly;Fn(w).setReversed(!Y);var se=Y?"/":"?",he=Fn(w).getQuery(),we=w.getScrollInfo();switch(A.searchArgs.querySrc){case"prompt":var $e=qe.macroModeState;if($e.isPlaying){var ze=$e.replaySearchQueries.shift();B(ze,!0,!1)}else br(w,{onClose:z,prefix:se,desc:"(JavaScript regexp)",onKeyUp:W,onKeyDown:q});break;case"wordUnderCursor":var be=tr(w,{noSymbol:!0}),_e=!0;if(be||(be=tr(w,{noSymbol:!1}),_e=!1),!be){Ut(w,"No word under cursor"),k(w);return}var ze=w.getLine(be.start.line).substring(be.start.ch,be.end.ch);_e&&X?ze="\\b"+ze+"\\b":ze=An(ze),qe.jumpList.cachedCursor=w.getCursor(),w.setCursor(be.start),B(ze,!0,!1)}}},processEx:function(w,E,A){function B(W){qe.exCommandHistoryController.pushInput(W),qe.exCommandHistoryController.reset(),pi.processCommand(w,W),w.state.vim&&k(w)}function z(W,q,Y){var X=F(W),se,he;(X=="<Esc>"||X=="<C-c>"||X=="<C-[>"||X=="<BS>"&&q=="")&&(qe.exCommandHistoryController.pushInput(q),qe.exCommandHistoryController.reset(),Be.e_stop(W),k(w),Y(),w.focus()),X=="<Up>"||X=="<Down>"?(Be.e_stop(W),se=X=="<Up>",he=W.target?W.target.selectionEnd:0,q=qe.exCommandHistoryController.nextMatch(q,se)||"",Y(q),he&&W.target&&(W.target.selectionEnd=W.target.selectionStart=Math.min(he,W.target.value.length))):X=="<C-u>"?(Be.e_stop(W),Y("")):X&&X!="<Left>"&&X!="<Right>"&&qe.exCommandHistoryController.reset()}A.type=="keyToEx"?pi.processCommand(w,A.exArgs.input):E.visualMode?br(w,{onClose:B,prefix:":",value:"'<,'>",onKeyDown:z,selectValueOnOpen:!1}):br(w,{onClose:B,prefix:":",onKeyDown:z})},evalInput:function(w,E){var A=E.inputState,B=A.motion,z=A.motionArgs||{},W=A.operator,q=A.operatorArgs||{},Y=A.registerName,X=E.sel,se=Me(E.visualMode?pe(w,X.head):w.getCursor("head")),he=Me(E.visualMode?pe(w,X.anchor):w.getCursor("anchor")),we=Me(se),$e=Me(he),be,_e,ze;if(W&&this.recordLastEdit(E,A),A.repeatOverride!==void 0?ze=A.repeatOverride:ze=A.getRepeat(),ze>0&&z.explicitRepeat?z.repeatIsExplicit=!0:(z.noRepeat||!z.explicitRepeat&&ze===0)&&(ze=1,z.repeatIsExplicit=!1),A.selectedCharacter&&(z.selectedCharacter=q.selectedCharacter=A.selectedCharacter),z.repeat=ze,k(w),B){var De=Hn[B](w,se,z,E,A);if(E.lastMotion=Hn[B],!De)return;if(z.toJumplist){!W&&w.ace.curOp!=null&&(w.ace.curOp.command.scrollIntoView="center-animate");var Qe=qe.jumpList,bt=Qe.cachedCursor;bt?(wi(w,bt,De),delete Qe.cachedCursor):wi(w,se,De)}De instanceof Array?(_e=De[0],be=De[1]):be=De,be||(be=Me(se)),E.visualMode?((!E.visualBlock||be.ch!==1/0)&&(be=pe(w,be,we)),_e&&(_e=pe(w,_e)),_e=_e||$e,X.anchor=_e,X.head=be,Bn(w),ci(w,E,"<",Ge(_e,be)?_e:be),ci(w,E,">",Ge(_e,be)?be:_e)):W||(w.ace.curOp&&(w.ace.curOp.vimDialogScroll="center-animate"),be=pe(w,be,we),w.setCursor(be.line,be.ch))}if(W){if(q.lastSel){_e=$e;var st=q.lastSel,ut=Math.abs(st.head.line-st.anchor.line),Dn=Math.abs(st.head.ch-st.anchor.ch);st.visualLine?be=new Fe($e.line+ut,$e.ch):st.visualBlock?be=new Fe($e.line+ut,$e.ch+Dn):st.head.line==st.anchor.line?be=new Fe($e.line,$e.ch+Dn):be=new Fe($e.line+ut,$e.ch),E.visualMode=!0,E.visualLine=st.visualLine,E.visualBlock=st.visualBlock,X=E.sel={anchor:_e,head:be},Bn(w)}else E.visualMode&&(q.lastSel={anchor:Me(X.anchor),head:Me(X.head),visualBlock:E.visualBlock,visualLine:E.visualLine});var Mt,ln,Bt,Ot,xr;if(E.visualMode){Mt=Ze(X.head,X.anchor),ln=Ie(X.head,X.anchor),Bt=E.visualLine||q.linewise,Ot=E.visualBlock?"block":Bt?"line":"char";var Nr=v(w,Mt,ln);if(xr=Gn(w,{anchor:Nr.start,head:Nr.end},Ot),Bt){var Un=xr.ranges;if(Ot=="block")for(var V=0;V<Un.length;V++)Un[V].head.ch=mt(w,Un[V].head.line);else Ot=="line"&&(Un[0].head=new Fe(Un[0].head.line+1,0))}}else{if(Mt=Me(_e||$e),ln=Me(be||we),Ge(ln,Mt)){var Z=Mt;Mt=ln,ln=Z}Bt=z.linewise||q.linewise,Bt?Kn(w,Mt,ln):z.forward&&zn(w,Mt,ln),Ot="char";var ae=!z.inclusive||Bt,Nr=v(w,Mt,ln);xr=Gn(w,{anchor:Nr.start,head:Nr.end},Ot,ae)}w.setSelections(xr.ranges,xr.primary),E.lastMotion=null,q.repeat=ze,q.registerName=Y,q.linewise=Bt;var ce=Bs[W](w,q,xr.ranges,$e,be);E.visualMode&&mn(w,ce!=null),ce&&w.setCursor(ce)}},recordLastEdit:function(w,E,A){var B=qe.macroModeState;B.isPlaying||(w.lastEditInputState=E,w.lastEditActionCommand=A,B.lastInsertModeChanges.changes=[],B.lastInsertModeChanges.expectCursorActivityForChange=!1,B.lastInsertModeChanges.visualBlock=w.visualBlock?w.sel.head.line-w.sel.anchor.line:0)}},Hn={moveToTopLine:function(w,E,A){var B=Vr(w).top+A.repeat-1;return new Fe(B,hn(w.getLine(B)))},moveToMiddleLine:function(w){var E=Vr(w),A=Math.floor((E.top+E.bottom)*.5);return new Fe(A,hn(w.getLine(A)))},moveToBottomLine:function(w,E,A){var B=Vr(w).bottom-A.repeat+1;return new Fe(B,hn(w.getLine(B)))},expandToLine:function(w,E,A){var B=E;return new Fe(B.line+A.repeat-1,1/0)},findNext:function(w,E,A){var B=Fn(w),z=B.getQuery();if(z){var W=!A.forward;return W=B.isReversed()?!W:W,Bo(w,z),cr(w,W,z,A.repeat)}},findAndSelectNextInclusive:function(w,E,A,B,z){var W=Fn(w),q=W.getQuery();if(q){var Y=!A.forward;Y=W.isReversed()?!Y:Y;var X=zo(w,Y,q,A.repeat,B);if(X){if(z.operator)return X;var se=X[0],he=new Fe(X[1].line,X[1].ch-1);if(B.visualMode){(B.visualLine||B.visualBlock)&&(B.visualLine=!1,B.visualBlock=!1,Be.signal(w,"vim-mode-change",{mode:"visual",subMode:""}));var we=B.sel.anchor;if(we)return W.isReversed()?A.forward?[we,se]:[we,he]:A.forward?[we,he]:[we,se]}else B.visualMode=!0,B.visualLine=!1,B.visualBlock=!1,Be.signal(w,"vim-mode-change",{mode:"visual",subMode:""});return Y?[he,se]:[se,he]}}},goToMark:function(w,E,A,B){var z=_i(w,B,A.selectedCharacter);return z?A.linewise?{line:z.line,ch:hn(w.getLine(z.line))}:z:null},moveToOtherHighlightedEnd:function(w,E,A,B){if(B.visualBlock&&A.sameLine){var z=B.sel;return[pe(w,new Fe(z.anchor.line,z.head.ch)),pe(w,new Fe(z.head.line,z.anchor.ch))]}return[B.sel.head,B.sel.anchor]},jumpToMark:function(w,E,A,B){for(var z=E,W=0;W<A.repeat;W++){var q=z;for(var Y in B.marks)if(u(Y)){var X=B.marks[Y].find(),se=A.forward?Ge(X,q):Ge(q,X);if(!se&&!(A.linewise&&X.line==q.line)){var he=ot(q,z),we=A.forward?Tt(q,X,z):Tt(z,X,q);(he||we)&&(z=X)}}}return A.linewise&&(z=new Fe(z.line,hn(w.getLine(z.line)))),z},moveByCharacters:function(w,E,A){var B=E,z=A.repeat,W=A.forward?B.ch+z:B.ch-z;return new Fe(B.line,W)},moveByLines:function(w,E,A,B){var z=E,W=z.ch;switch(B.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:W=B.lastHPos;break;default:B.lastHPos=W}var q=A.repeat+(A.repeatOffset||0),Y=A.forward?z.line+q:z.line-q,X=w.firstLine(),se=w.lastLine();if(Y<X&&z.line==X)return this.moveToStartOfLine(w,E,A,B);if(Y>se&&z.line==se)return co(w,E,A,B,!0);var he=w.ace.session.getFoldLine(Y);return he&&(A.forward?Y>he.start.row&&(Y=he.end.row+1):Y=he.start.row),A.toFirstChar&&(W=hn(w.getLine(Y)),B.lastHPos=W),B.lastHSPos=w.charCoords(new Fe(Y,W),"div").left,new Fe(Y,W)},moveByDisplayLines:function(w,E,A,B){var z=E;switch(B.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:B.lastHSPos=w.charCoords(z,"div").left}var W=A.repeat,X=w.findPosV(z,A.forward?W:-W,"line",B.lastHSPos);if(X.hitSide)if(A.forward)var q=w.charCoords(X,"div"),Y={top:q.top+8,left:B.lastHSPos},X=w.coordsChar(Y,"div");else{var se=w.charCoords(new Fe(w.firstLine(),0),"div");se.left=B.lastHSPos,X=w.coordsChar(se,"div")}return B.lastHPos=X.ch,X},moveByPage:function(w,E,A){var B=E,z=A.repeat;return w.findPosV(B,A.forward?z:-z,"page")},moveByParagraph:function(w,E,A){var B=A.forward?1:-1;return Po(w,E,A.repeat,B)},moveBySentence:function(w,E,A){var B=A.forward?1:-1;return Hr(w,E,A.repeat,B)},moveByScroll:function(w,E,A,B){var z=w.getScrollInfo(),W=null,q=A.repeat;q||(q=z.clientHeight/(2*w.defaultTextHeight()));var Y=w.charCoords(E,"local");if(A.repeat=q,W=Hn.moveByDisplayLines(w,E,A,B),!W)return null;var X=w.charCoords(W,"local");return w.scrollTo(null,z.top+X.top-Y.top),W},moveByWords:function(w,E,A){return yr(w,E,A.repeat,!!A.forward,!!A.wordEnd,!!A.bigWord)},moveTillCharacter:function(w,E,A){var B=A.repeat,z=uo(w,B,A.forward,A.selectedCharacter,E),W=A.forward?-1:1;return Fr(W,A),z?(z.ch+=W,z):null},moveToCharacter:function(w,E,A){var B=A.repeat;return Fr(0,A),uo(w,B,A.forward,A.selectedCharacter,E)||E},moveToSymbol:function(w,E,A){var B=A.repeat;return jr(w,B,A.forward,A.selectedCharacter)||E},moveToColumn:function(w,E,A,B){var z=A.repeat;return B.lastHPos=z-1,B.lastHSPos=w.charCoords(E,"div").left,hs(w,z)},moveToEol:function(w,E,A,B){return co(w,E,A,B,!1)},moveToFirstNonWhiteSpaceCharacter:function(w,E){var A=E;return new Fe(A.line,hn(w.getLine(A.line)))},moveToMatchedSymbol:function(w,E){for(var A=E,B=A.line,z=A.ch,W=w.getLine(B),q;z<W.length;z++)if(q=W.charAt(z),q&&p(q)){var Y=w.getTokenTypeAt(new Fe(B,z+1));if(Y!=="string"&&Y!=="comment")break}if(z<W.length){var X=/[<>]/.test(W[z])?/[(){}[\]<>]/:/[(){}[\]]/,se=w.findMatchingBracket(new Fe(B,z+1),{bracketRegex:X});return se.to}return A},moveToStartOfLine:function(w,E){return new Fe(E.line,0)},moveToLineOrEdgeOfDocument:function(w,E,A){var B=A.forward?w.lastLine():w.firstLine();return A.repeatIsExplicit&&(B=A.repeat-w.getOption("firstLineNumber")),new Fe(B,hn(w.getLine(B)))},moveToStartOfDisplayLine:function(w){return w.execCommand("goLineLeft"),w.getCursor()},moveToEndOfDisplayLine:function(w){w.execCommand("goLineRight");var E=w.getCursor();return E.sticky=="before"&&E.ch--,E},textObjectManipulation:function(w,E,A,B){var z={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},W={"'":!0,'"':!0,"`":!0},q=A.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!A.textObjectInner,X,se;if(z[q]){if(se=!0,X=Nn(w,E,q,Y),!X){var he=w.getSearchCursor(new RegExp("\\"+q,"g"),E);he.find()&&(X=Nn(w,he.from(),q,Y))}}else if(W[q])se=!0,X=Ur(w,E,q,Y);else if(q==="W"||q==="w")for(var we=A.repeat||1;we-- >0;){var $e=tr(w,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},X&&X.end);$e&&(X||(X=$e),X.end=$e.end)}else if(q==="p")if(X=Po(w,E,A.repeat,0,Y),A.linewise=!0,B.visualMode)B.visualLine||(B.visualLine=!0);else{var be=B.inputState.operatorArgs;be&&(be.linewise=!0),X.end.line--}else if(q==="t")X=lo(w,E,Y);else if(q==="s"){var _e=w.getLine(E.line);E.ch>0&&b(_e[E.ch])&&(E.ch-=1);var ze=Wr(w,E,A.repeat,1,Y),De=Wr(w,E,A.repeat,-1,Y);m(w.getLine(De.line)[De.ch])&&m(w.getLine(ze.line)[ze.ch-1])&&(De={line:De.line,ch:De.ch+1}),X={start:De,end:ze}}return X?w.state.vim.visualMode?On(w,X.start,X.end,se):[X.start,X.end]:null},repeatLastCharacterSearch:function(w,E,A){var B=qe.lastCharacterSearch,z=A.repeat,W=A.forward===B.forward,q=(B.increment?1:0)*(W?-1:1);w.moveH(-q,"char"),A.inclusive=!!W;var Y=uo(w,z,W,B.selectedCharacter);return Y?(Y.ch+=q,Y):(w.moveH(q,"char"),E)}},Bs={change:function(w,E,A){var B,z,W=w.state.vim,q=A[0].anchor,Y=A[0].head;if(W.visualMode)if(E.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,w.setSelection(q,Y),z=w.getSelection(),w.replaceSelection(""),B=q;else{z=w.getSelection();var X=le("",A.length);w.replaceSelections(X),B=Ze(A[0].head,A[0].anchor)}else{z=w.getRange(q,Y);var se=W.lastEditInputState||{};if(se.motion=="moveByWords"&&!m(z)){var he=/\s+$/.exec(z);he&&se.motionArgs&&se.motionArgs.forward&&(Y=re(Y,0,-he[0].length),z=z.slice(0,-he[0].length))}E.linewise&&(q=new Fe(q.line,hn(w.getLine(q.line))),Y.line>q.line&&(Y=new Fe(Y.line-1,Number.MAX_VALUE))),w.replaceRange("",q,Y),B=q}qe.registerController.pushText(E.registerName,"change",z,E.linewise,A.length>1),or.enterInsertMode(w,{head:B},w.state.vim)},delete:function(w,E,A){var B,z,W=w.state.vim;if(W.visualBlock){z=w.getSelection();var q=le("",A.length);w.replaceSelections(q),B=Ze(A[0].head,A[0].anchor)}else{var Y=A[0].anchor,X=A[0].head;E.linewise&&X.line!=w.firstLine()&&Y.line==w.lastLine()&&Y.line==X.line-1&&(Y.line==w.firstLine()?Y.ch=0:Y=new Fe(Y.line-1,mt(w,Y.line-1))),z=w.getRange(Y,X),w.replaceRange("",Y,X),B=Y,E.linewise&&(B=Hn.moveToFirstNonWhiteSpaceCharacter(w,Y))}return qe.registerController.pushText(E.registerName,"delete",z,E.linewise,W.visualBlock),pe(w,B)},indent:function(w,E,A){var B=w.state.vim,z=B.visualMode?E.repeat:1;if(B.visualBlock){for(var W=w.getOption("tabSize"),q=w.getOption("indentWithTabs")?" ":" ".repeat(W),Y,X=A.length-1;X>=0;X--)if(Y=Ze(A[X].anchor,A[X].head),E.indentRight)w.replaceRange(q.repeat(z),Y,Y);else{for(var se=w.getLine(Y.line),he=0,we=0;we<z;we++){var $e=se[Y.ch+he];if($e==" ")he++;else{if($e!=" ")break;he++;for(var be=1;be<q.length&&($e=se[Y.ch+he],$e===" ");be++)he++}}w.replaceRange("",Y,re(Y,0,he))}return Y}if(w.indentMore)for(var we=0;we<z;we++)E.indentRight?w.indentMore():w.indentLess();else{var _e=A[0].anchor.line,ze=B.visualBlock?A[A.length-1].anchor.line:A[0].head.line;E.linewise&&ze--;for(var X=_e;X<=ze;X++)for(var we=0;we<z;we++)w.indentLine(X,E.indentRight)}return Hn.moveToFirstNonWhiteSpaceCharacter(w,A[0].anchor)},indentAuto:function(w,E,A){return w.execCommand("indentAuto"),Hn.moveToFirstNonWhiteSpaceCharacter(w,A[0].anchor)},hardWrap:function(w,E,A,B,z){if(w.hardWrap){var W=A[0].anchor.line,q=A[0].head.line;E.linewise&&q--;var Y=w.hardWrap({from:W,to:q});return Y>W&&E.linewise&&Y--,E.keepCursor?B:new Fe(Y,0)}},changeCase:function(w,E,A,B,z){for(var W=w.getSelections(),q=[],Y=E.toLower,X=0;X<W.length;X++){var se=W[X],he="";if(Y===!0)he=se.toLowerCase();else if(Y===!1)he=se.toUpperCase();else for(var we=0;we<se.length;we++){var $e=se.charAt(we);he+=c($e)?$e.toLowerCase():$e.toUpperCase()}q.push(he)}return w.replaceSelections(q),E.shouldMoveCursor?z:!w.state.vim.visualMode&&E.linewise&&A[0].anchor.line+1==A[0].head.line?Hn.moveToFirstNonWhiteSpaceCharacter(w,B):E.linewise?B:Ze(A[0].anchor,A[0].head)},yank:function(w,E,A,B){var z=w.state.vim,W=w.getSelection(),q=z.visualMode?Ze(z.sel.anchor,z.sel.head,A[0].head,A[0].anchor):B;return qe.registerController.pushText(E.registerName,"yank",W,E.linewise,z.visualBlock),q}},or={jumpListWalk:function(w,E,A){if(!A.visualMode){var B=E.repeat,z=E.forward,W=qe.jumpList,q=W.move(w,z?B:-B),Y=q?q.find():void 0;Y=Y||w.getCursor(),w.setCursor(Y),w.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(w,E,A){if(!A.visualMode){var B=E.repeat||1,z=w.defaultTextHeight(),W=w.getScrollInfo().top,q=z*B,Y=E.forward?W+q:W-q,X=Me(w.getCursor()),se=w.charCoords(X,"local");if(E.forward)Y>se.top?(X.line+=(Y-se.top)/z,X.line=Math.ceil(X.line),w.setCursor(X),se=w.charCoords(X,"local"),w.scrollTo(null,se.top)):w.scrollTo(null,Y);else{var he=Y+w.getScrollInfo().clientHeight;he<se.bottom?(X.line-=(se.bottom-he)/z,X.line=Math.floor(X.line),w.setCursor(X),se=w.charCoords(X,"local"),w.scrollTo(null,se.bottom-w.getScrollInfo().clientHeight)):w.scrollTo(null,Y)}}},scrollToCursor:function(w,E){var A=w.getCursor().line,B=w.charCoords(new Fe(A,0),"local"),z=w.getScrollInfo().clientHeight,W=B.top;switch(E.position){case"center":W=B.bottom-z/2;break;case"bottom":var q=new Fe(A,w.getLine(A).length-1),Y=w.charCoords(q,"local"),X=Y.bottom-W;W=W-z+X}w.scrollTo(null,W)},replayMacro:function(w,E,A){var B=E.selectedCharacter,z=E.repeat,W=qe.macroModeState;for(B=="@"?B=W.latestRegister:W.latestRegister=B;z--;)jo(w,A,W,B)},enterMacroRecordMode:function(w,E){var A=qe.macroModeState,B=E.selectedCharacter;qe.registerController.isValidRegister(B)&&A.enterMacroRecordMode(w,B)},toggleOverwrite:function(w){w.state.overwrite?(w.toggleOverwrite(!1),w.setOption("keyMap","vim-insert"),Be.signal(w,"vim-mode-change",{mode:"insert"})):(w.toggleOverwrite(!0),w.setOption("keyMap","vim-replace"),Be.signal(w,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(w,E,A){if(!w.getOption("readOnly")){A.insertMode=!0,A.insertModeRepeat=E&&E.repeat||1;var B=E?E.insertAt:null,z=A.sel,W=E.head||w.getCursor("head"),q=w.listSelections().length;if(B=="eol")W=new Fe(W.line,mt(w,W.line));else if(B=="bol")W=new Fe(W.line,0);else if(B=="charAfter"){var Y=v(w,W,re(W,0,1));W=Y.end}else if(B=="firstNonBlank"){var Y=v(w,W,Hn.moveToFirstNonWhiteSpaceCharacter(w,W));W=Y.end}else if(B=="startOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(W=new Fe(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?W=z.head:W=new Fe(z.anchor.line,0)}else if(B=="endOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(W=new Fe(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?W=re(z.head,0,1):W=new Fe(z.anchor.line,0)}else if(B=="inplace"){if(A.visualMode)return}else B=="lastEdit"&&(W=ki(w)||W);w.setOption("disableInput",!1),E&&E.replace?(w.toggleOverwrite(!0),w.setOption("keyMap","vim-replace"),Be.signal(w,"vim-mode-change",{mode:"replace"})):(w.toggleOverwrite(!1),w.setOption("keyMap","vim-insert"),Be.signal(w,"vim-mode-change",{mode:"insert"})),qe.macroModeState.isPlaying||(w.on("change",Ir),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=w.setBookmark(W,{insertLeft:!0}),Be.on(w.getInputField(),"keydown",vo)),A.visualMode&&mn(w),Tr(w,W,q)}},toggleVisualMode:function(w,E,A){var B=E.repeat,z=w.getCursor(),W;if(A.visualMode)A.visualLine^E.linewise||A.visualBlock^E.blockwise?(A.visualLine=!!E.linewise,A.visualBlock=!!E.blockwise,Be.signal(w,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),Bn(w)):mn(w);else{A.visualMode=!0,A.visualLine=!!E.linewise,A.visualBlock=!!E.blockwise,W=pe(w,new Fe(z.line,z.ch+B-1));var q=v(w,z,W);A.sel={anchor:q.start,head:q.end},Be.signal(w,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),Bn(w),ci(w,A,"<",Ze(z,W)),ci(w,A,">",Ie(z,W))}},reselectLastSelection:function(w,E,A){var B=A.lastSelection;if(A.visualMode&&Dt(w,A),B){var z=B.anchorMark.find(),W=B.headMark.find();if(!z||!W)return;A.sel={anchor:z,head:W},A.visualMode=!0,A.visualLine=B.visualLine,A.visualBlock=B.visualBlock,Bn(w),ci(w,A,"<",Ze(z,W)),ci(w,A,">",Ie(z,W)),Be.signal(w,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""})}},joinLines:function(w,E,A){var B,z;if(A.visualMode){if(B=w.getCursor("anchor"),z=w.getCursor("head"),Ge(z,B)){var W=z;z=B,B=W}z.ch=mt(w,z.line)-1}else{var q=Math.max(E.repeat,2);B=w.getCursor(),z=pe(w,new Fe(B.line+q-1,1/0))}for(var Y=0,X=B.line;X<z.line;X++){Y=mt(w,B.line);var se="",he=0;if(!E.keepSpaces){var we=w.getLine(B.line+1);he=we.search(/\S/),he==-1?he=we.length:se=" "}w.replaceRange(se,new Fe(B.line,Y),new Fe(B.line+1,he))}var $e=pe(w,new Fe(B.line,Y));A.visualMode&&mn(w,!1),w.setCursor($e)},newLineAndEnterInsertMode:function(w,E,A){A.insertMode=!0;var B=Me(w.getCursor());if(B.line===w.firstLine()&&!E.after)w.replaceRange(`
1433
+ `,new Fe(w.firstLine(),0)),w.setCursor(w.firstLine(),0);else{B.line=E.after?B.line:B.line-1,B.ch=mt(w,B.line),w.setCursor(B);var z=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;z(w)}this.enterInsertMode(w,{repeat:E.repeat},A)},paste:function(w,E,A){var B=this,z=qe.registerController.getRegister(E.registerName),W=function(){var q=z.toString();B.continuePaste(w,E,A,q,z)};E.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){B.continuePaste(w,E,A,q,z)},function(){W()}):W()},continuePaste:function(w,E,A,B,z){var W=Me(w.getCursor());if(B){if(E.matchIndent){var q=w.getOption("tabSize"),Y=function(Un){var V=Un.split(" ").length-1,Z=Un.split(" ").length-1;return V*q+Z*1},X=w.getLine(w.getCursor().line),se=Y(X.match(/^\s*/)[0]),he=B.replace(/\n$/,""),we=B!==he,$e=Y(B.match(/^\s*/)[0]),B=he.replace(/^\s*/gm,function(Un){var V=se+(Y(Un)-$e);if(V<0)return"";if(w.getOption("indentWithTabs")){var Z=Math.floor(V/q);return Array(Z+1).join(" ")}return Array(V+1).join(" ")});B+=we?`
1434
+ `:""}if(E.repeat>1)var B=Array(E.repeat+1).join(B);var be=z.linewise,_e=z.blockwise;if(_e){B=B.split(`
1435
+ `),be&&B.pop();for(var ze=0;ze<B.length;ze++)B[ze]=B[ze]==""?" ":B[ze];W.ch+=E.after?1:0,W.ch=Math.min(mt(w,W.line),W.ch)}else be?A.visualMode?B=A.visualLine?B.slice(0,-1):`
1436
+ `+B.slice(0,B.length-1)+`
1437
+ `:E.after?(B=`
1438
+ `+B.slice(0,B.length-1),W.ch=mt(w,W.line)):W.ch=0:W.ch+=E.after?1:0;var De;if(A.visualMode){A.lastPastedText=B;var Qe,bt=Je(w,A),st=bt[0],ut=bt[1],Dn=w.getSelection(),Mt=w.listSelections(),ln=new Array(Mt.length).join("1").split("1");A.lastSelection&&(Qe=A.lastSelection.headMark.find()),qe.registerController.unnamedRegister.setText(Dn),_e?(w.replaceSelections(ln),ut=new Fe(st.line+B.length-1,st.ch),w.setCursor(st),Ht(w,ut),w.replaceSelections(B),De=st):A.visualBlock?(w.replaceSelections(ln),w.setCursor(st),w.replaceRange(B,st,st),De=st):(w.replaceRange(B,st,ut),De=w.posFromIndex(w.indexFromPos(st)+B.length-1)),Qe&&(A.lastSelection.headMark=w.setBookmark(Qe)),be&&(De.ch=0)}else if(_e){w.setCursor(W);for(var ze=0;ze<B.length;ze++){var Bt=W.line+ze;Bt>w.lastLine()&&w.replaceRange(`
1439
+ `,new Fe(Bt,0));var Ot=mt(w,Bt);Ot<W.ch&&er(w,Bt,W.ch)}w.setCursor(W),Ht(w,new Fe(W.line+B.length-1,W.ch)),w.replaceSelections(B),De=W}else if(w.replaceRange(B,W),be){var Bt=E.after?W.line+1:W.line;De=new Fe(Bt,hn(w.getLine(Bt)))}else De=Me(W),/\n/.test(B)||(De.ch+=B.length-(E.after?1:0));A.visualMode&&mn(w,!1),w.setCursor(De)}},undo:function(w,E){w.operation(function(){Ve(w,Be.commands.undo,E.repeat)(),w.setCursor(pe(w,w.getCursor("start")))})},redo:function(w,E){Ve(w,Be.commands.redo,E.repeat)()},setRegister:function(w,E,A){A.inputState.registerName=E.selectedCharacter},insertRegister:function(w,E,A){var B=E.selectedCharacter,z=qe.registerController.getRegister(B),W=z&&z.toString();W&&w.replaceSelection(W)},oneNormalCommand:function(w,E,A){qr(w,!0),A.insertModeReturn=!0,Be.on(w,"vim-command-done",function B(){A.visualMode||(A.insertModeReturn&&(A.insertModeReturn=!1,A.insertMode||or.enterInsertMode(w,{},A)),Be.off(w,"vim-command-done",B))})},setMark:function(w,E,A){var B=E.selectedCharacter;ci(w,A,B,w.getCursor())},replace:function(w,E,A){var B=E.selectedCharacter,z=w.getCursor(),W,q,Y=w.listSelections();if(A.visualMode)z=w.getCursor("start"),q=w.getCursor("end");else{var X=w.getLine(z.line);W=z.ch+E.repeat,W>X.length&&(W=X.length),q=new Fe(z.line,W)}var se=v(w,z,q);if(z=se.start,q=se.end,B==`
1440
+ `)A.visualMode||w.replaceRange("",z,q),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(w);else{var he=w.getRange(z,q);if(he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,B),he=he.replace(/[^\n]/g,B),A.visualBlock){var we=new Array(w.getOption("tabSize")+1).join(" ");he=w.getSelection(),he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,B),he=he.replace(/\t/g,we).replace(/[^\n]/g,B).split(`
1441
+ `),w.replaceSelections(he)}else w.replaceRange(he,z,q);A.visualMode?(z=Ge(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,w.setCursor(z),mn(w,!1)):w.setCursor(re(q,0,-1))}},incrementNumberToken:function(w,E){for(var A=w.getCursor(),B=w.getLine(A.line),z=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,W,q,Y,X;(W=z.exec(B))!==null&&(q=W.index,Y=q+W[0].length,!(A.ch<Y)););if(!(!E.backtrack&&Y<=A.ch)&&W){var se=W[2]||W[4],he=W[3]||W[5],we=E.increase?1:-1,$e={"0b":2,0:8,"":10,"0x":16}[se.toLowerCase()],be=parseInt(W[1]+he,$e)+we*E.repeat;X=be.toString($e);var _e=se?new Array(he.length-X.length+1+W[1].length).join("0"):"";X.charAt(0)==="-"?X="-"+se+_e+X.substr(1):X=se+_e+X;var ze=new Fe(A.line,q),De=new Fe(A.line,Y);w.replaceRange(X,ze,De),w.setCursor(new Fe(A.line,q+X.length-1))}},repeatLastEdit:function(w,E,A){var B=A.lastEditInputState;if(B){var z=E.repeat;z&&E.repeatIsExplicit?A.lastEditInputState.repeatOverride=z:z=A.lastEditInputState.repeatOverride||z,ts(w,A,z,!1)}},indent:function(w,E){w.indentLine(w.getCursor().line,E.indentRight)},exitInsertMode:qr},Xi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Qi={bracket:{isComplete:function(w){if(w.nextCh===w.symb){if(w.depth++,w.depth>=1)return!0}else w.nextCh===w.reverseSymb&&w.depth--;return!1}},section:{init:function(w){w.curMoveThrough=!0,w.symb=(w.forward?"]":"[")===w.symb?"{":"}"},isComplete:function(w){return w.index===0&&w.nextCh===w.symb}},comment:{isComplete:function(w){var E=w.lastCh==="*"&&w.nextCh==="/";return w.lastCh=w.nextCh,E}},method:{init:function(w){w.symb=w.symb==="m"?"{":"}",w.reverseSymb=w.symb==="{"?"}":"{"},isComplete:function(w){return w.nextCh===w.symb}},preprocess:{init:function(w){w.index=0},isComplete:function(w){if(w.nextCh==="#"){var E=w.lineText.match(/^#(\w+)/)[1];if(E==="endif"){if(w.forward&&w.depth===0)return!0;w.depth++}else if(E==="if"){if(!w.forward&&w.depth===0)return!0;w.depth--}if(E==="else"&&w.depth===0)return!0}return!1}}};I("pcre",!0,"boolean"),xi.prototype={getQuery:function(){return qe.query},setQuery:function(w){qe.query=w},getOverlay:function(){return this.searchOverlay},setOverlay:function(w){this.searchOverlay=w},isReversed:function(){return qe.isReversed},setReversed:function(w){qe.isReversed=w},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(w){this.annotate=w}};var Co={"\\n":`
1442
+ `,"\\r":"\r","\\t":" "},Aa={"\\/":"/","\\\\":"\\","\\n":`
1443
+ `,"\\r":"\r","\\t":" ","\\&":"&"},vn=0,bl=function(){this.buildCommandMap_()};bl.prototype={processCommand:function(w,E,A){var B=this;w.operation(function(){w.curOp.isVimOp=!0,B._processCommand(w,E,A)})},_processCommand:function(w,E,A){var B=w.state.vim,z=qe.registerController.getRegister(":"),W=z.toString(),q=new Be.StringStream(E);z.setText(E);var Y=A||{};Y.input=E;try{this.parseInput_(w,q,Y)}catch(he){throw Ut(w,he.toString()),he}B.visualMode&&mn(w);var X,se;if(!Y.commandName)Y.line!==void 0&&(se="move");else if(X=this.matchCommand_(Y.commandName),X){if(se=X.name,X.excludeFromCommandHistory&&z.setText(W),this.parseCommandArgs_(q,Y,X),X.type=="exToKey"){T(w,X.toKeys,X);return}if(X.type=="exToEx"){this.processCommand(w,X.toInput);return}}if(!se){Ut(w,'Not an editor command ":'+E+'"');return}try{Or[se](w,Y),(!X||!X.possiblyAsync)&&Y.callback&&Y.callback()}catch(he){throw Ut(w,he.toString()),he}},parseInput_:function(w,E,A){if(E.eatWhile(":"),E.eat("%")?(A.line=w.firstLine(),A.lineEnd=w.lastLine()):(A.line=this.parseLineSpec_(w,E),A.line!==void 0&&E.eat(",")&&(A.lineEnd=this.parseLineSpec_(w,E))),A.line==null)if(w.state.vim.visualMode){var B=_i(w,w.state.vim,"<");A.selectionLine=B&&B.line,B=_i(w,w.state.vim,">"),A.selectionLineEnd=B&&B.line}else A.selectionLine=w.getCursor().line;else A.selectionLine=A.line,A.selectionLineEnd=A.lineEnd;var z=E.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return z?A.commandName=z[1]:A.commandName=E.match(/.*/)[0],A},parseLineSpec_:function(w,E){var A=E.match(/^(\d+)/);if(A)return parseInt(A[1],10)-1;switch(E.next()){case".":return this.parseLineSpecOffset_(E,w.getCursor().line);case"$":return this.parseLineSpecOffset_(E,w.lastLine());case"'":var B=E.next(),z=_i(w,w.state.vim,B);if(!z)throw new Error("Mark not set");return this.parseLineSpecOffset_(E,z.line);case"-":case"+":return E.backUp(1),this.parseLineSpecOffset_(E,w.getCursor().line);default:return E.backUp(1),void 0}},parseLineSpecOffset_:function(w,E){var A=w.match(/^([+-])?(\d+)/);if(A){var B=parseInt(A[2],10);A[1]=="-"?E-=B:E+=B}return E},parseCommandArgs_:function(w,E,A){if(!w.eol()){E.argString=w.match(/.*/)[0];var B=A.argDelimiter||/\s+/,z=Wt(E.argString).split(B);z.length&&z[0]&&(E.args=z)}},matchCommand_:function(w){for(var E=w.length;E>0;E--){var A=w.substring(0,E);if(this.commandMap_[A]){var B=this.commandMap_[A];if(B.name.indexOf(w)===0)return B}}return null},buildCommandMap_:function(){this.commandMap_={};for(var w=0;w<Vo.length;w++){var E=Vo[w],A=E.shortName||E.name;this.commandMap_[A]=E}},map:function(w,E,A,B){if(w!=":"&&w.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var z=w.substring(1);E!=":"&&E.charAt(0)==":"?this.commandMap_[z]={name:z,type:"exToEx",toInput:E.substring(1),user:!0}:this.commandMap_[z]={name:z,type:"exToKey",toKeys:E,user:!0}}else{var W={keys:w,type:"keyToKey",toKeys:E,noremap:!!B};A&&(W.context=A),Zn.unshift(W)}},unmap:function(w,E){if(w!=":"&&w.charAt(0)==":"){if(E)throw Error("Mode not supported for ex mappings");var A=w.substring(1);if(this.commandMap_[A]&&this.commandMap_[A].user)return delete this.commandMap_[A],!0}else for(var B=w,z=0;z<Zn.length;z++)if(B==Zn[z].keys&&Zn[z].context===E)return Zn.splice(z,1),!0}};var Or={colorscheme:function(w,E){if(!E.args||E.args.length<1){Ut(w,w.getOption("theme"));return}w.setOption("theme",E.args[0])},map:function(w,E,A,B){var z=E.args;if(!z||z.length<2){w&&Ut(w,"Invalid mapping: "+E.input);return}pi.map(z[0],z[1],A,B)},imap:function(w,E){this.map(w,E,"insert")},nmap:function(w,E){this.map(w,E,"normal")},vmap:function(w,E){this.map(w,E,"visual")},omap:function(w,E){this.map(w,E,"operatorPending")},noremap:function(w,E){this.map(w,E,void 0,!0)},inoremap:function(w,E){this.map(w,E,"insert",!0)},nnoremap:function(w,E){this.map(w,E,"normal",!0)},vnoremap:function(w,E){this.map(w,E,"visual",!0)},onoremap:function(w,E){this.map(w,E,"operatorPending",!0)},unmap:function(w,E,A){var B=E.args;(!B||B.length<1||!pi.unmap(B[0],A))&&w&&Ut(w,"No such mapping: "+E.input)},mapclear:function(w,E){Et.mapclear()},imapclear:function(w,E){Et.mapclear("insert")},nmapclear:function(w,E){Et.mapclear("normal")},vmapclear:function(w,E){Et.mapclear("visual")},omapclear:function(w,E){Et.mapclear("operatorPending")},move:function(w,E){Zi.processCommand(w,w.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:E.line+1})},set:function(w,E){var A=E.args,B=E.setCfg||{};if(!A||A.length<1){w&&Ut(w,"Invalid mapping: "+E.input);return}var z=A[0].split("="),W=z[0],q=z[1],Y=!1,X=!1;if(W.charAt(W.length-1)=="?"){if(q)throw Error("Trailing characters: "+E.argString);W=W.substring(0,W.length-1),Y=!0}else W.charAt(W.length-1)=="!"&&(W=W.substring(0,W.length-1),X=!0);q===void 0&&W.substring(0,2)=="no"&&(W=W.substring(2),q=!1);var se=Qt[W]&&Qt[W].type=="boolean";if(se&&(X?q=!_(W,w,B):q==null&&(q=!0)),!se&&q===void 0||Y){var he=_(W,w,B);he instanceof Error?Ut(w,he.message):he===!0||he===!1?Ut(w," "+(he?"":"no")+W):Ut(w," "+W+"="+he)}else{var we=$(W,q,w,B);we instanceof Error&&Ut(w,we.message)}},setlocal:function(w,E){E.setCfg={scope:"local"},this.set(w,E)},setglobal:function(w,E){E.setCfg={scope:"global"},this.set(w,E)},registers:function(w,E){var A=E.args,B=qe.registerController.registers,z=`----------Registers----------
1444
+
1445
+ `;if(A){var W;A=A.join("");for(var q=0;q<A.length;q++)if(W=A.charAt(q),!!qe.registerController.isValidRegister(W)){var Y=B[W]||new j;z+='"'+W+" "+Y.toString()+`
1446
+ `}}else for(var W in B){var X=B[W].toString();X.length&&(z+='"'+W+" "+X+`
1447
+ `)}Ut(w,z)},sort:function(w,E){function A(){if(E.argString){var Bt=new Be.StringStream(E.argString);if(Bt.eat("!")&&(W=!0),Bt.eol())return;if(!Bt.eatSpace())return"Invalid arguments";var Ot=Bt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ot&&!Bt.eol())return"Invalid arguments";if(Ot[1]){q=Ot[1].indexOf("i")!=-1,Y=Ot[1].indexOf("u")!=-1;var xr=Ot[1].indexOf("d")!=-1||Ot[1].indexOf("n")!=-1&&1,Nr=Ot[1].indexOf("x")!=-1&&1,Un=Ot[1].indexOf("o")!=-1&&1;if(xr+Nr+Un>1)return"Invalid arguments";X=xr&&"decimal"||Nr&&"hex"||Un&&"octal"}Ot[2]&&(se=new RegExp(Ot[2].substr(1,Ot[2].length-2),q?"i":""))}}function B(Bt,Ot){if(W){var xr;xr=Bt,Bt=Ot,Ot=xr}q&&(Bt=Bt.toLowerCase(),Ot=Ot.toLowerCase());var Nr=X&&De.exec(Bt),Un=X&&De.exec(Ot);return Nr?(Nr=parseInt((Nr[1]+Nr[2]).toLowerCase(),Qe),Un=parseInt((Un[1]+Un[2]).toLowerCase(),Qe),Nr-Un):Bt<Ot?-1:1}function z(Bt,Ot){if(W){var xr;xr=Bt,Bt=Ot,Ot=xr}return q&&(Bt[0]=Bt[0].toLowerCase(),Ot[0]=Ot[0].toLowerCase()),Bt[0]<Ot[0]?-1:1}var W,q,Y,X,se,he=A();if(he){Ut(w,he+": "+E.argString);return}var we=E.line||w.firstLine(),$e=E.lineEnd||E.line||w.lastLine();if(we!=$e){var be=new Fe(we,0),_e=new Fe($e,mt(w,$e)),ze=w.getRange(be,_e).split(`
1448
+ `),De=se||(X=="decimal"?/(-?)([\d]+)/:X=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:X=="octal"?/([0-7]+)/:null),Qe=X=="decimal"?10:X=="hex"?16:X=="octal"?8:null,bt=[],st=[];if(X||se)for(var ut=0;ut<ze.length;ut++){var Dn=se?ze[ut].match(se):null;Dn&&Dn[0]!=""?bt.push(Dn):!se&&De.exec(ze[ut])?bt.push(ze[ut]):st.push(ze[ut])}else st=ze;if(bt.sort(se?z:B),se)for(var ut=0;ut<bt.length;ut++)bt[ut]=bt[ut].input;else X||st.sort(B);if(ze=W?bt.concat(st):st.concat(bt),Y){var Mt=ze,ln;ze=[];for(var ut=0;ut<Mt.length;ut++)Mt[ut]!=ln&&ze.push(Mt[ut]),ln=Mt[ut]}w.replaceRange(ze.join(`
1449
+ `),be,_e)}},vglobal:function(w,E){this.global(w,E)},normal:function(w,E){var A=E.argString;if(A&&A[0]=="!"&&(A=A.slice(1),xo=!0),A=A.trimStart(),!A){Ut(w,"Argument is required.");return}var B=E.line;if(typeof B=="number")for(var z=isNaN(E.lineEnd)?B:E.lineEnd,W=B;W<=z;W++)w.setCursor(W,0),T(w,E.argString.trimStart()),w.state.vim.insertMode&&qr(w,!0);else T(w,E.argString.trimStart()),w.state.vim.insertMode&&qr(w,!0)},global:function(w,E){var A=E.argString;if(!A){Ut(w,"Regular Expression missing from global");return}var B=E.commandName[0]==="v";A[0]==="!"&&E.commandName[0]==="g"&&(B=!0,A=A.slice(1));var z=E.line!==void 0?E.line:w.firstLine(),W=E.lineEnd||E.line||w.lastLine(),q=nr(A),Y=A,X;if(q.length&&(Y=q[0],X=q.slice(1,q.length).join("/")),Y)try{Cn(w,Y,!0,!0)}catch{Ut(w,"Invalid regex: "+Y);return}for(var se=Fn(w).getQuery(),he=[],we=z;we<=W;we++){var $e=w.getLine(we),be=se.test($e);be!==B&&he.push(X?w.getLineHandle(we):$e)}if(!X){Ut(w,he.join(`
1450
+ `));return}var _e=0,ze=function(){if(_e<he.length){var De=he[_e++],Qe=w.getLineNumber(De);if(Qe==null){ze();return}var bt=Qe+1+X;pi.processCommand(w,bt,{callback:ze})}else w.releaseLineHandles&&w.releaseLineHandles()};ze()},substitute:function(w,E){if(!w.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var A=E.argString,B=A?Ci(A,A[0]):[],z,W="",q,Y,X,se=!1,he=!1;if(B.length)z=B[0],_("pcre")&&z!==""&&(z=new RegExp(z).source),W=B[1],W!==void 0&&(_("pcre")?W=Ds(W.replace(/([^\\])&/g,"$1$$&")):W=Ca(W),qe.lastSubstituteReplacePart=W),q=B[2]?B[2].split(" "):[];else if(A&&A.length){Ut(w,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],X=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(se=!0),Y.indexOf("g")!=-1&&(he=!0),_("pcre")?z=z+"/"+Y:z=z.replace(/\//g,"\\/")+"/"+Y)),z)try{Cn(w,z,!0,!0)}catch{Ut(w,"Invalid regex: "+z);return}if(W=W||qe.lastSubstituteReplacePart,W===void 0){Ut(w,"No previous substitute regular expression");return}var we=Fn(w),$e=we.getQuery(),be=E.line!==void 0?E.line:w.getCursor().line,_e=E.lineEnd||be;be==w.firstLine()&&_e==w.lastLine()&&(_e=1/0),X&&(be=_e,_e=be+X-1);var ze=pe(w,new Fe(be,0)),De=w.getSearchCursor($e,ze);es(w,se,he,be,_e,De,$e,W,E.callback)},startinsert:function(w,E){T(w,E.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(w){Be.commands.save?Be.commands.save(w):w.save&&w.save()},nohlsearch:function(w){Rr(w)},yank:function(w){var E=Me(w.getCursor()),A=E.line,B=w.getLine(A);qe.registerController.pushText("0","yank",B,!0,!0)},delete:function(w,E){var A=E.selectionLine,B=isNaN(E.selectionLineEnd)?A:E.selectionLineEnd;Bs.delete(w,{linewise:!0},[{anchor:new Fe(A,0),head:new Fe(B+1,0)}])},join:function(w,E){var A=E.selectionLine,B=isNaN(E.selectionLineEnd)?A:E.selectionLineEnd;w.setCursor(new Fe(A,0)),or.joinLines(w,{repeat:B-A},w.state.vim)},delmarks:function(w,E){if(!E.argString||!Wt(E.argString)){Ut(w,"Argument required");return}for(var A=w.state.vim,B=new Be.StringStream(Wt(E.argString));!B.eol();){B.eatSpace();var z=B.pos;if(!B.match(/[a-zA-Z]/,!1)){Ut(w,"Invalid argument: "+E.argString.substring(z));return}var W=B.next();if(B.match("-",!0)){if(!B.match(/[a-zA-Z]/,!1)){Ut(w,"Invalid argument: "+E.argString.substring(z));return}var q=W,Y=B.next();if(!(u(q)&&u(Y)||c(q)&&c(Y))){Ut(w,"Invalid argument: "+q+"-");return}var X=q.charCodeAt(0),se=Y.charCodeAt(0);if(X>=se){Ut(w,"Invalid argument: "+E.argString.substring(z));return}for(var he=0;he<=se-X;he++){var we=String.fromCharCode(X+he);delete A.marks[we]}}else delete A.marks[W]}}},pi=new bl;I("insertModeEscKeysTimeout",200,"number"),Be.Vim=Et;var rs={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"},Xr=Et.handleKey.bind(Et);Et.handleKey=function(w,E,A){return w.operation(function(){return Xr(w,E,A)},!0)},P(),r.CodeMirror=Be;var Ni=Et.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(w,E,A,B,z){var W=this.state.vim||{},q=A.characterWidth,Y=A.lineHeight,X=E.top,se=E.left;if(!W.insertMode){var he=B.cursor?Yn.comparePoints(B.cursor,B.start)<=0:z.selection.isBackwards()||z.selection.isEmpty();!he&&se>q&&(se-=q)}!W.insertMode&&W.status&&(Y/=2,X+=Y),Se.translate(w,se,X),Se.setStyle(w.style,"width",q+"px"),Se.setStyle(w.style,"height",Y+"px")},$getDirectionForHighlight:function(w){var E=w.state.cm,A=Ni(E);if(!A.insertMode)return w.session.selection.isBackwards()||w.session.selection.isEmpty()},handleKeyboard:function(w,E,A,B,z){var W=w.editor,q=W.state.cm,Y=Ni(q);if(B!=-1){if(Y.insertMode||(E==-1?(A.charCodeAt(0)>255&&w.inputKey&&(A=w.inputKey,A&&w.inputHash==4&&(A=A.toUpperCase())),w.inputChar=A):E==4||E==0?w.inputKey==A&&w.inputHash==E&&w.inputChar?(A=w.inputChar,E=-1):(w.inputChar=null,w.inputKey=A,w.inputHash=E):w.inputChar=w.inputKey=null),q.state.overwrite&&Y.insertMode&&A=="backspace"&&E==0)return{command:"gotoleft"};if(A=="c"&&E==1&&!It.isMac&&W.getCopyText())return W.once("copy",function(){Y.insertMode?W.selection.clearSelection():q.operation(function(){mn(q)})}),{command:"null",passEvent:!0};if(A=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var X=Fn(q),se=X.getOverlay();se&&q.removeOverlay(se)}if(E==-1||E&1||E===0&&A.length>1){var he=Y.insertMode,we=Ps(E,A,z||{},Y);Y.status==null&&(Y.status="");var $e=Uo(q,we,"user");return Y=Ni(q),$e&&Y.status!=null?Y.status+=we:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!$e&&(E!=-1||he)?void 0:{command:"null",passEvent:!$e}}}},attach:function(w){function E(){var B=Ni(A).insertMode;A.ace.renderer.setStyle("normal-mode",!B),w.textInput.setCommandMode(!B),w.renderer.$keepTextAreaAtCursor=B,w.renderer.$blockCursor=!B}w.state||(w.state={});var A=new Be(w);w.state.cm=A,w.$vimModeHandler=this,l(A),Ni(A).status=null,A.on("vim-command-done",function(){A.virtualSelectionMode()||(Ni(A).status=null,A.ace._signal("changeStatus"),A.ace.session.markUndoGroup())}),A.on("changeStatus",function(){A.ace.renderer.updateCursor(),A.ace._signal("changeStatus")}),A.on("vim-mode-change",function(){A.virtualSelectionMode()||(E(),A._signal("changeStatus"))}),E(),w.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(A)},detach:function(w){var E=w.state.cm;f(E),E.destroy(),w.state.cm=null,w.$vimModeHandler=null,w.renderer.$cursorLayer.drawCursor=null,w.renderer.setStyle("normal-mode",!1),w.textInput.setCommandMode(!1),w.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(w){var E=w.state.cm,A=Ni(E);if(A.insertMode)return"INSERT";var B="";return A.visualMode&&(B+="VISUAL",A.visualLine&&(B+=" LINE"),A.visualBlock&&(B+=" BLOCK")),A.status&&(B+=(B?" ":"")+A.status),B}},Et.defineOption({name:"wrap",set:function(w,E){E&&E.ace.setOption("wrap",w)},type:"boolean"},!1),Et.defineEx("write","w",function(){console.log(":write is not implemented")}),Zn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),Zn.push({keys:"gq",type:"operator",operator:"hardWrap"}),Et.defineOperator("hardWrap",function(w,E,A,B,z){var W=A[0].anchor.line,q=A[0].head.line;return E.linewise&&q--,rr(w.ace,{startRow:W,endRow:q}),Fe(q,0)}),I("textwidth",void 0,"number",["tw"],function(w,E){if(E!==void 0){if(w===void 0){var A=E.ace.getOption("printMarginColumn");return A}var B=Math.round(w);B>1&&E.ace.setOption("printMarginColumn",B)}}),or.aceCommand=function(w,E,A){w.vimCmd=E,w.ace.inVirtualSelectionMode?w.ace.on("beforeEndOperation",ui):ui(null,w.ace)},or.fold=function(w,E,A){w.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(E.all?2:0)+(E.open?1:0)])},ms=Zn.length,r.handler.defaultKeymap=Zn,r.handler.actions=or,r.Vim=Et}),(function(){ace.require(["ace/keyboard/vim"],function(t){e&&(e.exports=t)})})()})(Tm)),Tm.exports}Z_();var Rm={},Im;function X_(){return Im||(Im=1,(function(e){(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 t(v){return h(g(v),arguments)}function r(v,l){return t.apply(null,[v].concat(l||[]))}function h(v,l){var f=1,s=v.length,a,u="",p,i,c,m,b,x,I,$;for(p=0;p<s;p++)if(typeof v[p]=="string")u+=v[p];else if(typeof v[p]=="object"){if(c=v[p],c.keys)for(a=l[f],i=0;i<c.keys.length;i++){if(a==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[i],c.keys[i-1]));a=a[c.keys[i]]}else c.param_no?a=l[c.param_no]:a=l[f++];if(n.not_type.test(c.type)&&n.not_primitive.test(c.type)&&a instanceof Function&&(a=a()),n.numeric_arg.test(c.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(t("[sprintf] expecting number but found %T",a));switch(n.number.test(c.type)&&(I=a>=0),c.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,c.width?parseInt(c.width):0);break;case"e":a=c.precision?parseFloat(a).toExponential(c.precision):parseFloat(a).toExponential();break;case"f":a=c.precision?parseFloat(a).toFixed(c.precision):parseFloat(a);break;case"g":a=c.precision?String(Number(a.toPrecision(c.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=c.precision?a.substring(0,c.precision):a;break;case"t":a=String(!!a),a=c.precision?a.substring(0,c.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=c.precision?a.substring(0,c.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=c.precision?a.substring(0,c.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}n.json.test(c.type)?u+=a:(n.number.test(c.type)&&(!I||c.sign)?($=I?"+":"-",a=a.toString().replace(n.sign,"")):$="",b=c.pad_char?c.pad_char==="0"?"0":c.pad_char.charAt(1):" ",x=c.width-($+a).length,m=c.width&&x>0?b.repeat(x):"",u+=c.align?$+a+m:b==="0"?$+m+a:m+$+a)}return u}var d=Object.create(null);function g(v){if(d[v])return d[v];for(var l=v,f,s=[],a=0;l;){if((f=n.text.exec(l))!==null)s.push(f[0]);else if((f=n.modulo.exec(l))!==null)s.push("%");else if((f=n.placeholder.exec(l))!==null){if(f[2]){a|=1;var u=[],p=f[2],i=[];if((i=n.key.exec(p))!==null)for(u.push(i[1]);(p=p.substring(i[0].length))!=="";)if((i=n.key_access.exec(p))!==null)u.push(i[1]);else if((i=n.index_access.exec(p))!==null)u.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(f[0].length)}return d[v]=s}e.sprintf=t,e.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()})(Rm)),Rm}X_();var Bc={exports:{}},Q_=Bc.exports,Mm;function ek(){return Mm||(Mm=1,(function(e,n){(function(){var t,r="4.18.1",h=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",v="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",f="__lodash_hash_undefined__",s=500,a="__lodash_placeholder__",u=1,p=2,i=4,c=1,m=2,b=1,x=2,I=4,$=8,_=16,C=32,O=64,P=128,L=256,T=512,F=30,D="...",M=800,S=16,k=1,N=2,j=3,U=1/0,G=9007199254740991,J=17976931348623157e292,Q=NaN,le=4294967295,ie=le-1,ue=le>>>1,pe=[["ary",P],["bind",b],["bindKey",x],["curry",$],["curryRight",_],["flip",T],["partial",C],["partialRight",O],["rearg",L]],oe="[object Arguments]",re="[object Array]",Ce="[object AsyncFunction]",ke="[object Boolean]",Ee="[object Date]",Ve="[object DOMException]",Me="[object Error]",ot="[object Function]",Ge="[object GeneratorFunction]",Ze="[object Map]",Ie="[object Number]",Tt="[object Null]",mt="[object Object]",Wt="[object Promise]",An="[object Proxy]",er="[object RegExp]",Ht="[object Set]",Tr="[object String]",vt="[object Symbol]",Je="[object Undefined]",Dt="[object WeakMap]",On="[object WeakSet]",Bn="[object ArrayBuffer]",Gn="[object DataView]",mr="[object Float32Array]",mn="[object Float64Array]",zn="[object Int8Array]",Kn="[object Int16Array]",hn="[object Int32Array]",tr="[object Uint8Array]",lo="[object Uint8ClampedArray]",wi="[object Uint16Array]",Fr="[object Uint32Array]",jr=/\b__p \+= '';/g,vr=/\b(__p \+=) '' \+/g,yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,co=/&(?:amp|lt|gt|quot|#39);/g,uo=/[&<>"']/g,hs=RegExp(co.source),ci=RegExp(uo.source),Qo=/<%-([\s\S]+?)%>/g,Po=/<%([\s\S]+?)%>/g,Wr=/<%=([\s\S]+?)%>/g,Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nn=/^\w*$/,Ur=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(xi.source),nr=/^\s+/,Yi=/\s/,Ci=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ds=/\{\n\/\* \[wrapped with (.+)\] \*/,ho=/,? & /,Ca=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ds=/[()=,{}\[\]\/\s]/,nn=/\\(\\)?/g,Er=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ut=/\w*$/,ps=/^[-+]0x[0-9a-f]+$/i,br=/^0b[01]+$/i,jn=/^\[object .+?Constructor\]$/,Cn=/^0o[0-7]+$/i,Wn=/^(?:0|[1-9]\d*)$/,Bo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cr=/($^)/,zo=/['\n\r\u2028\u2029\\]/g,Rr="\\ud800-\\udfff",po="\\u0300-\\u036f",Vr="\\ufe20-\\ufe2f",_i="\\u20d0-\\u20ff",ki=po+Vr+_i,es="\\u2700-\\u27bf",qr="a-z\\xdf-\\xf6\\xf8-\\xff",Fo="\\xac\\xb1\\xd7\\xf7",fo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jo="\\u2000-\\u206f",go=" \\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",Rn="A-Z\\xc0-\\xd6\\xd8-\\xde",Ji="\\ufe0e\\ufe0f",Ir=Fo+fo+jo+go,mo="['’]",fs="["+Rr+"]",Wo="["+Ir+"]",vo="["+ki+"]",ts="\\d+",gs="["+es+"]",Ho="["+qr+"]",Ps="[^"+Rr+Ir+ts+es+qr+Rn+"]",yo="\\ud83c[\\udffb-\\udfff]",Uo="(?:"+vo+"|"+yo+")",ui="[^"+Rr+"]",Yn="(?:\\ud83c[\\udde6-\\uddff]){2}",te="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="["+Rn+"]",Le="\\u200d",Ke="(?:"+Ho+"|"+Ps+")",xt="(?:"+Se+"|"+Ps+")",St="(?:"+mo+"(?:d|ll|m|re|s|t|ve))?",It="(?:"+mo+"(?:D|LL|M|RE|S|T|VE))?",Mr=Uo+"?",Lr="["+Ji+"]?",Jn="(?:"+Le+"(?:"+[ui,Yn,te].join("|")+")"+Lr+Mr+")*",rr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Be="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",_a=Lr+Mr+Jn,Fe="(?:"+[gs,Yn,te].join("|")+")"+_a,Zn="(?:"+[ui+vo+"?",vo,Yn,te,fs].join("|")+")",ms=RegExp(mo,"g"),Vo=RegExp(vo,"g"),Xn=RegExp(yo+"(?="+yo+")|"+Zn+_a,"g"),yl=RegExp([Se+"?"+Ho+"+"+St+"(?="+[Wo,Se,"$"].join("|")+")",xt+"+"+It+"(?="+[Wo,Se+Ke,"$"].join("|")+")",Se+"?"+Ke+"+"+St,Se+"+"+It,Be,rr,ts,Fe].join("|"),"g"),vs=RegExp("["+Le+Rr+ki+Ji+"]"),bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ns=["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"],ka=-1,fn={};fn[mr]=fn[mn]=fn[zn]=fn[Kn]=fn[hn]=fn[tr]=fn[lo]=fn[wi]=fn[Fr]=!0,fn[oe]=fn[re]=fn[Bn]=fn[ke]=fn[Gn]=fn[Ee]=fn[Me]=fn[ot]=fn[Ze]=fn[Ie]=fn[mt]=fn[er]=fn[Ht]=fn[Tr]=fn[Dt]=!1;var yt={};yt[oe]=yt[re]=yt[Bn]=yt[Gn]=yt[ke]=yt[Ee]=yt[mr]=yt[mn]=yt[zn]=yt[Kn]=yt[hn]=yt[Ze]=yt[Ie]=yt[mt]=yt[er]=yt[Ht]=yt[Tr]=yt[vt]=yt[tr]=yt[lo]=yt[wi]=yt[Fr]=!0,yt[Me]=yt[ot]=yt[Dt]=!1;var Qt={À:"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"},wo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ir={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},In=parseFloat,Et=parseInt,hi=typeof Rs=="object"&&Rs&&Rs.Object===Object&&Rs,xo=typeof self=="object"&&self&&self.Object===Object&&self,Vt=hi||xo||Function("return this")(),di=n&&!n.nodeType&&n,wr=di&&!0&&e&&!e.nodeType&&e,qo=wr&&wr.exports===di,Zi=qo&&hi.process,Hn=(function(){try{var ye=wr&&wr.require&&wr.require("util").types;return ye||Zi&&Zi.binding&&Zi.binding("util")}catch{}})(),Bs=Hn&&Hn.isArrayBuffer,or=Hn&&Hn.isDate,Xi=Hn&&Hn.isMap,Qi=Hn&&Hn.isRegExp,Co=Hn&&Hn.isSet,Aa=Hn&&Hn.isTypedArray;function vn(ye,Re,Te){switch(Te.length){case 0:return ye.call(Re);case 1:return ye.call(Re,Te[0]);case 2:return ye.call(Re,Te[0],Te[1]);case 3:return ye.call(Re,Te[0],Te[1],Te[2])}return ye.apply(Re,Te)}function bl(ye,Re,Te,Xe){for(var wt=-1,Nt=ye==null?0:ye.length;++wt<Nt;){var dn=ye[wt];Re(Xe,dn,Te(dn),ye)}return Xe}function Or(ye,Re){for(var Te=-1,Xe=ye==null?0:ye.length;++Te<Xe&&Re(ye[Te],Te,ye)!==!1;);return ye}function pi(ye,Re){for(var Te=ye==null?0:ye.length;Te--&&Re(ye[Te],Te,ye)!==!1;);return ye}function rs(ye,Re){for(var Te=-1,Xe=ye==null?0:ye.length;++Te<Xe;)if(!Re(ye[Te],Te,ye))return!1;return!0}function Xr(ye,Re){for(var Te=-1,Xe=ye==null?0:ye.length,wt=0,Nt=[];++Te<Xe;){var dn=ye[Te];Re(dn,Te,ye)&&(Nt[wt++]=dn)}return Nt}function Ni(ye,Re){var Te=ye==null?0:ye.length;return!!Te&&we(ye,Re,0)>-1}function w(ye,Re,Te){for(var Xe=-1,wt=ye==null?0:ye.length;++Xe<wt;)if(Te(Re,ye[Xe]))return!0;return!1}function E(ye,Re){for(var Te=-1,Xe=ye==null?0:ye.length,wt=Array(Xe);++Te<Xe;)wt[Te]=Re(ye[Te],Te,ye);return wt}function A(ye,Re){for(var Te=-1,Xe=Re.length,wt=ye.length;++Te<Xe;)ye[wt+Te]=Re[Te];return ye}function B(ye,Re,Te,Xe){var wt=-1,Nt=ye==null?0:ye.length;for(Xe&&Nt&&(Te=ye[++wt]);++wt<Nt;)Te=Re(Te,ye[wt],wt,ye);return Te}function z(ye,Re,Te,Xe){var wt=ye==null?0:ye.length;for(Xe&&wt&&(Te=ye[--wt]);wt--;)Te=Re(Te,ye[wt],wt,ye);return Te}function W(ye,Re){for(var Te=-1,Xe=ye==null?0:ye.length;++Te<Xe;)if(Re(ye[Te],Te,ye))return!0;return!1}var q=ze("length");function Y(ye){return ye.split("")}function X(ye){return ye.match(Ca)||[]}function se(ye,Re,Te){var Xe;return Te(ye,function(wt,Nt,dn){if(Re(wt,Nt,dn))return Xe=Nt,!1}),Xe}function he(ye,Re,Te,Xe){for(var wt=ye.length,Nt=Te+(Xe?1:-1);Xe?Nt--:++Nt<wt;)if(Re(ye[Nt],Nt,ye))return Nt;return-1}function we(ye,Re,Te){return Re===Re?Rt(ye,Re,Te):he(ye,be,Te)}function $e(ye,Re,Te,Xe){for(var wt=Te-1,Nt=ye.length;++wt<Nt;)if(Xe(ye[wt],Re))return wt;return-1}function be(ye){return ye!==ye}function _e(ye,Re){var Te=ye==null?0:ye.length;return Te?st(ye,Re)/Te:Q}function ze(ye){return function(Re){return Re==null?t:Re[ye]}}function De(ye){return function(Re){return ye==null?t:ye[Re]}}function Qe(ye,Re,Te,Xe,wt){return wt(ye,function(Nt,dn,Gt){Te=Xe?(Xe=!1,Nt):Re(Te,Nt,dn,Gt)}),Te}function bt(ye,Re){var Te=ye.length;for(ye.sort(Re);Te--;)ye[Te]=ye[Te].value;return ye}function st(ye,Re){for(var Te,Xe=-1,wt=ye.length;++Xe<wt;){var Nt=Re(ye[Xe]);Nt!==t&&(Te=Te===t?Nt:Te+Nt)}return Te}function ut(ye,Re){for(var Te=-1,Xe=Array(ye);++Te<ye;)Xe[Te]=Re(Te);return Xe}function Dn(ye,Re){return E(Re,function(Te){return[Te,ye[Te]]})}function Mt(ye){return ye&&ye.slice(0,Ct(ye)+1).replace(nr,"")}function ln(ye){return function(Re){return ye(Re)}}function Bt(ye,Re){return E(Re,function(Te){return ye[Te]})}function Ot(ye,Re){return ye.has(Re)}function xr(ye,Re){for(var Te=-1,Xe=ye.length;++Te<Xe&&we(Re,ye[Te],0)>-1;);return Te}function Nr(ye,Re){for(var Te=ye.length;Te--&&we(Re,ye[Te],0)>-1;);return Te}function Un(ye,Re){for(var Te=ye.length,Xe=0;Te--;)ye[Te]===Re&&++Xe;return Xe}var V=De(Qt),Z=De(wo);function ae(ye){return"\\"+qe[ye]}function ce(ye,Re){return ye==null?t:ye[Re]}function ge(ye){return vs.test(ye)}function Ae(ye){return bo.test(ye)}function Oe(ye){for(var Re,Te=[];!(Re=ye.next()).done;)Te.push(Re.value);return Te}function We(ye){var Re=-1,Te=Array(ye.size);return ye.forEach(function(Xe,wt){Te[++Re]=[wt,Xe]}),Te}function Ue(ye,Re){return function(Te){return ye(Re(Te))}}function Ye(ye,Re){for(var Te=-1,Xe=ye.length,wt=0,Nt=[];++Te<Xe;){var dn=ye[Te];(dn===Re||dn===a)&&(ye[Te]=a,Nt[wt++]=Te)}return Nt}function nt(ye){var Re=-1,Te=Array(ye.size);return ye.forEach(function(Xe){Te[++Re]=Xe}),Te}function ct(ye){var Re=-1,Te=Array(ye.size);return ye.forEach(function(Xe){Te[++Re]=[Xe,Xe]}),Te}function Rt(ye,Re,Te){for(var Xe=Te-1,wt=ye.length;++Xe<wt;)if(ye[Xe]===Re)return Xe;return-1}function cn(ye,Re,Te){for(var Xe=Te+1;Xe--;)if(ye[Xe]===Re)return Xe;return Xe}function qt(ye){return ge(ye)?Tn(ye):q(ye)}function $t(ye){return ge(ye)?Vn(ye):Y(ye)}function Ct(ye){for(var Re=ye.length;Re--&&Yi.test(ye.charAt(Re)););return Re}var ft=De(ir);function Tn(ye){for(var Re=Xn.lastIndex=0;Xn.test(ye);)++Re;return Re}function Vn(ye){return ye.match(Xn)||[]}function Cr(ye){return ye.match(yl)||[]}var yn=(function ye(Re){Re=Re==null?Vt:_n.defaults(Vt.Object(),Re,_n.pick(Vt,ns));var Te=Re.Array,Xe=Re.Date,wt=Re.Error,Nt=Re.Function,dn=Re.Math,Gt=Re.Object,Di=Re.RegExp,Qr=Re.String,Mn=Re.TypeError,_o=Te.prototype,ei=Nt.prototype,ys=Gt.prototype,Xu=Re["__core-js_shared__"],Qu=ei.toString,bn=ys.hasOwnProperty,rD=0,Mx=(function(){var o=/[^.]+$/.exec(Xu&&Xu.keys&&Xu.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),eh=ys.toString,iD=Qu.call(Gt),oD=Vt._,sD=Di("^"+Qu.call(bn).replace(xi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),th=qo?Re.Buffer:t,zs=Re.Symbol,nh=Re.Uint8Array,Lx=th?th.allocUnsafe:t,rh=Ue(Gt.getPrototypeOf,Gt),Ox=Gt.create,Nx=ys.propertyIsEnumerable,ih=_o.splice,Dx=zs?zs.isConcatSpreadable:t,bc=zs?zs.iterator:t,Sa=zs?zs.toStringTag:t,oh=(function(){try{var o=Ia(Gt,"defineProperty");return o({},"",{}),o}catch{}})(),aD=Re.clearTimeout!==Vt.clearTimeout&&Re.clearTimeout,lD=Xe&&Xe.now!==Vt.Date.now&&Xe.now,cD=Re.setTimeout!==Vt.setTimeout&&Re.setTimeout,sh=dn.ceil,ah=dn.floor,Lf=Gt.getOwnPropertySymbols,uD=th?th.isBuffer:t,Px=Re.isFinite,hD=_o.join,dD=Ue(Gt.keys,Gt),Dr=dn.max,fi=dn.min,pD=Xe.now,fD=Re.parseInt,Bx=dn.random,gD=_o.reverse,Of=Ia(Re,"DataView"),wc=Ia(Re,"Map"),Nf=Ia(Re,"Promise"),wl=Ia(Re,"Set"),xc=Ia(Re,"WeakMap"),Cc=Ia(Gt,"create"),lh=xc&&new xc,xl={},mD=Ma(Of),vD=Ma(wc),yD=Ma(Nf),bD=Ma(wl),wD=Ma(xc),ch=zs?zs.prototype:t,_c=ch?ch.valueOf:t,zx=ch?ch.toString:t;function ee(o){if(sr(o)&&!Pt(o)&&!(o instanceof en)){if(o instanceof ko)return o;if(bn.call(o,"__wrapped__"))return F1(o)}return new ko(o)}var Cl=(function(){function o(){}return function(y){if(!Qn(y))return{};if(Ox)return Ox(y);o.prototype=y;var R=new o;return o.prototype=t,R}})();function uh(){}function ko(o,y){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=t}ee.templateSettings={escape:Qo,evaluate:Po,interpolate:Wr,variable:"",imports:{_:ee}},ee.prototype=uh.prototype,ee.prototype.constructor=ee,ko.prototype=Cl(uh.prototype),ko.prototype.constructor=ko;function en(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=le,this.__views__=[]}function xD(){var o=new en(this.__wrapped__);return o.__actions__=Pi(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Pi(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Pi(this.__views__),o}function CD(){if(this.__filtered__){var o=new en(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function _D(){var o=this.__wrapped__.value(),y=this.__dir__,R=Pt(o),H=y<0,K=R?o.length:0,ne=NP(0,K,this.__views__),de=ne.start,fe=ne.end,xe=fe-de,Ne=H?fe:de-1,Pe=this.__iteratees__,je=Pe.length,rt=0,pt=fi(xe,this.__takeCount__);if(!R||!H&&K==xe&&pt==xe)return c1(o,this.__actions__);var At=[];e:for(;xe--&&rt<pt;){Ne+=y;for(var jt=-1,_t=o[Ne];++jt<je;){var Jt=Pe[jt],rn=Jt.iteratee,no=Jt.type,$i=rn(_t);if(no==N)_t=$i;else if(!$i){if(no==k)continue e;break e}}At[rt++]=_t}return At}en.prototype=Cl(uh.prototype),en.prototype.constructor=en;function $a(o){var y=-1,R=o==null?0:o.length;for(this.clear();++y<R;){var H=o[y];this.set(H[0],H[1])}}function kD(){this.__data__=Cc?Cc(null):{},this.size=0}function AD(o){var y=this.has(o)&&delete this.__data__[o];return this.size-=y?1:0,y}function SD(o){var y=this.__data__;if(Cc){var R=y[o];return R===f?t:R}return bn.call(y,o)?y[o]:t}function $D(o){var y=this.__data__;return Cc?y[o]!==t:bn.call(y,o)}function TD(o,y){var R=this.__data__;return this.size+=this.has(o)?0:1,R[o]=Cc&&y===t?f:y,this}$a.prototype.clear=kD,$a.prototype.delete=AD,$a.prototype.get=SD,$a.prototype.has=$D,$a.prototype.set=TD;function bs(o){var y=-1,R=o==null?0:o.length;for(this.clear();++y<R;){var H=o[y];this.set(H[0],H[1])}}function ED(){this.__data__=[],this.size=0}function RD(o){var y=this.__data__,R=hh(y,o);if(R<0)return!1;var H=y.length-1;return R==H?y.pop():ih.call(y,R,1),--this.size,!0}function ID(o){var y=this.__data__,R=hh(y,o);return R<0?t:y[R][1]}function MD(o){return hh(this.__data__,o)>-1}function LD(o,y){var R=this.__data__,H=hh(R,o);return H<0?(++this.size,R.push([o,y])):R[H][1]=y,this}bs.prototype.clear=ED,bs.prototype.delete=RD,bs.prototype.get=ID,bs.prototype.has=MD,bs.prototype.set=LD;function ws(o){var y=-1,R=o==null?0:o.length;for(this.clear();++y<R;){var H=o[y];this.set(H[0],H[1])}}function OD(){this.size=0,this.__data__={hash:new $a,map:new(wc||bs),string:new $a}}function ND(o){var y=_h(this,o).delete(o);return this.size-=y?1:0,y}function DD(o){return _h(this,o).get(o)}function PD(o){return _h(this,o).has(o)}function BD(o,y){var R=_h(this,o),H=R.size;return R.set(o,y),this.size+=R.size==H?0:1,this}ws.prototype.clear=OD,ws.prototype.delete=ND,ws.prototype.get=DD,ws.prototype.has=PD,ws.prototype.set=BD;function Ta(o){var y=-1,R=o==null?0:o.length;for(this.__data__=new ws;++y<R;)this.add(o[y])}function zD(o){return this.__data__.set(o,f),this}function FD(o){return this.__data__.has(o)}Ta.prototype.add=Ta.prototype.push=zD,Ta.prototype.has=FD;function Go(o){var y=this.__data__=new bs(o);this.size=y.size}function jD(){this.__data__=new bs,this.size=0}function WD(o){var y=this.__data__,R=y.delete(o);return this.size=y.size,R}function HD(o){return this.__data__.get(o)}function UD(o){return this.__data__.has(o)}function VD(o,y){var R=this.__data__;if(R instanceof bs){var H=R.__data__;if(!wc||H.length<h-1)return H.push([o,y]),this.size=++R.size,this;R=this.__data__=new ws(H)}return R.set(o,y),this.size=R.size,this}Go.prototype.clear=jD,Go.prototype.delete=WD,Go.prototype.get=HD,Go.prototype.has=UD,Go.prototype.set=VD;function Fx(o,y){var R=Pt(o),H=!R&&La(o),K=!R&&!H&&Us(o),ne=!R&&!H&&!K&&Sl(o),de=R||H||K||ne,fe=de?ut(o.length,Qr):[],xe=fe.length;for(var Ne in o)(y||bn.call(o,Ne))&&!(de&&(Ne=="length"||K&&(Ne=="offset"||Ne=="parent")||ne&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||_s(Ne,xe)))&&fe.push(Ne);return fe}function jx(o){var y=o.length;return y?o[qf(0,y-1)]:t}function qD(o,y){return kh(Pi(o),Ea(y,0,o.length))}function GD(o){return kh(Pi(o))}function Df(o,y,R){(R!==t&&!Yo(o[y],R)||R===t&&!(y in o))&&is(o,y,R)}function kc(o,y,R){var H=o[y];(!(bn.call(o,y)&&Yo(H,R))||R===t&&!(y in o))&&is(o,y,R)}function hh(o,y){for(var R=o.length;R--;)if(Yo(o[R][0],y))return R;return-1}function KD(o,y,R,H){return Fs(o,function(K,ne,de){y(H,K,R(K),de)}),H}function Wx(o,y){return o&&ss(y,Gr(y),o)}function YD(o,y){return o&&ss(y,zi(y),o)}function is(o,y,R){y=="__proto__"&&oh?oh(o,y,{configurable:!0,enumerable:!0,value:R,writable:!0}):o[y]=R}function Pf(o,y){for(var R=-1,H=y.length,K=Te(H),ne=o==null;++R<H;)K[R]=ne?t:yg(o,y[R]);return K}function Ea(o,y,R){return o===o&&(R!==t&&(o=o<=R?o:R),y!==t&&(o=o>=y?o:y)),o}function Ao(o,y,R,H,K,ne){var de,fe=y&u,xe=y&p,Ne=y&i;if(R&&(de=K?R(o,H,K,ne):R(o)),de!==t)return de;if(!Qn(o))return o;var Pe=Pt(o);if(Pe){if(de=PP(o),!fe)return Pi(o,de)}else{var je=gi(o),rt=je==ot||je==Ge;if(Us(o))return d1(o,fe);if(je==mt||je==oe||rt&&!K){if(de=xe||rt?{}:I1(o),!fe)return xe?SP(o,YD(de,o)):AP(o,Wx(de,o))}else{if(!yt[je])return K?o:{};de=BP(o,je,fe)}}ne||(ne=new Go);var pt=ne.get(o);if(pt)return pt;ne.set(o,de),sC(o)?o.forEach(function(_t){de.add(Ao(_t,y,R,_t,o,ne))}):iC(o)&&o.forEach(function(_t,Jt){de.set(Jt,Ao(_t,y,R,Jt,o,ne))});var At=Ne?xe?rg:ng:xe?zi:Gr,jt=Pe?t:At(o);return Or(jt||o,function(_t,Jt){jt&&(Jt=_t,_t=o[Jt]),kc(de,Jt,Ao(_t,y,R,Jt,o,ne))}),de}function JD(o){var y=Gr(o);return function(R){return Hx(R,o,y)}}function Hx(o,y,R){var H=R.length;if(o==null)return!H;for(o=Gt(o);H--;){var K=R[H],ne=y[K],de=o[K];if(de===t&&!(K in o)||!ne(de))return!1}return!0}function Ux(o,y,R){if(typeof o!="function")throw new Mn(g);return Ic(function(){o.apply(t,R)},y)}function Ac(o,y,R,H){var K=-1,ne=Ni,de=!0,fe=o.length,xe=[],Ne=y.length;if(!fe)return xe;R&&(y=E(y,ln(R))),H?(ne=w,de=!1):y.length>=h&&(ne=Ot,de=!1,y=new Ta(y));e:for(;++K<fe;){var Pe=o[K],je=R==null?Pe:R(Pe);if(Pe=H||Pe!==0?Pe:0,de&&je===je){for(var rt=Ne;rt--;)if(y[rt]===je)continue e;xe.push(Pe)}else ne(y,je,H)||xe.push(Pe)}return xe}var Fs=v1(os),Vx=v1(zf,!0);function ZD(o,y){var R=!0;return Fs(o,function(H,K,ne){return R=!!y(H,K,ne),R}),R}function dh(o,y,R){for(var H=-1,K=o.length;++H<K;){var ne=o[H],de=y(ne);if(de!=null&&(fe===t?de===de&&!to(de):R(de,fe)))var fe=de,xe=ne}return xe}function XD(o,y,R,H){var K=o.length;for(R=zt(R),R<0&&(R=-R>K?0:K+R),H=H===t||H>K?K:zt(H),H<0&&(H+=K),H=R>H?0:lC(H);R<H;)o[R++]=y;return o}function qx(o,y){var R=[];return Fs(o,function(H,K,ne){y(H,K,ne)&&R.push(H)}),R}function ti(o,y,R,H,K){var ne=-1,de=o.length;for(R||(R=FP),K||(K=[]);++ne<de;){var fe=o[ne];y>0&&R(fe)?y>1?ti(fe,y-1,R,H,K):A(K,fe):H||(K[K.length]=fe)}return K}var Bf=y1(),Gx=y1(!0);function os(o,y){return o&&Bf(o,y,Gr)}function zf(o,y){return o&&Gx(o,y,Gr)}function ph(o,y){return Xr(y,function(R){return ks(o[R])})}function Ra(o,y){y=Ws(y,o);for(var R=0,H=y.length;o!=null&&R<H;)o=o[Ko(y[R++])];return R&&R==H?o:t}function Kx(o,y,R){var H=y(o);return Pt(o)?H:A(H,R(o))}function Ai(o){return o==null?o===t?Je:Tt:Sa&&Sa in Gt(o)?OP(o):GP(o)}function Ff(o,y){return o>y}function QD(o,y){return o!=null&&bn.call(o,y)}function eP(o,y){return o!=null&&y in Gt(o)}function tP(o,y,R){return o>=fi(y,R)&&o<Dr(y,R)}function jf(o,y,R){for(var H=R?w:Ni,K=o[0].length,ne=o.length,de=ne,fe=Te(ne),xe=1/0,Ne=[];de--;){var Pe=o[de];de&&y&&(Pe=E(Pe,ln(y))),xe=fi(Pe.length,xe),fe[de]=!R&&(y||K>=120&&Pe.length>=120)?new Ta(de&&Pe):t}Pe=o[0];var je=-1,rt=fe[0];e:for(;++je<K&&Ne.length<xe;){var pt=Pe[je],At=y?y(pt):pt;if(pt=R||pt!==0?pt:0,!(rt?Ot(rt,At):H(Ne,At,R))){for(de=ne;--de;){var jt=fe[de];if(!(jt?Ot(jt,At):H(o[de],At,R)))continue e}rt&&rt.push(At),Ne.push(pt)}}return Ne}function nP(o,y,R,H){return os(o,function(K,ne,de){y(H,R(K),ne,de)}),H}function Sc(o,y,R){y=Ws(y,o),o=N1(o,y);var H=o==null?o:o[Ko($o(y))];return H==null?t:vn(H,o,R)}function Yx(o){return sr(o)&&Ai(o)==oe}function rP(o){return sr(o)&&Ai(o)==Bn}function iP(o){return sr(o)&&Ai(o)==Ee}function $c(o,y,R,H,K){return o===y?!0:o==null||y==null||!sr(o)&&!sr(y)?o!==o&&y!==y:oP(o,y,R,H,$c,K)}function oP(o,y,R,H,K,ne){var de=Pt(o),fe=Pt(y),xe=de?re:gi(o),Ne=fe?re:gi(y);xe=xe==oe?mt:xe,Ne=Ne==oe?mt:Ne;var Pe=xe==mt,je=Ne==mt,rt=xe==Ne;if(rt&&Us(o)){if(!Us(y))return!1;de=!0,Pe=!1}if(rt&&!Pe)return ne||(ne=new Go),de||Sl(o)?T1(o,y,R,H,K,ne):MP(o,y,xe,R,H,K,ne);if(!(R&c)){var pt=Pe&&bn.call(o,"__wrapped__"),At=je&&bn.call(y,"__wrapped__");if(pt||At){var jt=pt?o.value():o,_t=At?y.value():y;return ne||(ne=new Go),K(jt,_t,R,H,ne)}}return rt?(ne||(ne=new Go),LP(o,y,R,H,K,ne)):!1}function sP(o){return sr(o)&&gi(o)==Ze}function Wf(o,y,R,H){var K=R.length,ne=K,de=!H;if(o==null)return!ne;for(o=Gt(o);K--;){var fe=R[K];if(de&&fe[2]?fe[1]!==o[fe[0]]:!(fe[0]in o))return!1}for(;++K<ne;){fe=R[K];var xe=fe[0],Ne=o[xe],Pe=fe[1];if(de&&fe[2]){if(Ne===t&&!(xe in o))return!1}else{var je=new Go;if(H)var rt=H(Ne,Pe,xe,o,y,je);if(!(rt===t?$c(Pe,Ne,c|m,H,je):rt))return!1}}return!0}function Jx(o){if(!Qn(o)||WP(o))return!1;var y=ks(o)?sD:jn;return y.test(Ma(o))}function aP(o){return sr(o)&&Ai(o)==er}function lP(o){return sr(o)&&gi(o)==Ht}function cP(o){return sr(o)&&Rh(o.length)&&!!fn[Ai(o)]}function Zx(o){return typeof o=="function"?o:o==null?Fi:typeof o=="object"?Pt(o)?e1(o[0],o[1]):Qx(o):wC(o)}function Hf(o){if(!Rc(o))return dD(o);var y=[];for(var R in Gt(o))bn.call(o,R)&&R!="constructor"&&y.push(R);return y}function uP(o){if(!Qn(o))return qP(o);var y=Rc(o),R=[];for(var H in o)H=="constructor"&&(y||!bn.call(o,H))||R.push(H);return R}function Uf(o,y){return o<y}function Xx(o,y){var R=-1,H=Bi(o)?Te(o.length):[];return Fs(o,function(K,ne,de){H[++R]=y(K,ne,de)}),H}function Qx(o){var y=og(o);return y.length==1&&y[0][2]?L1(y[0][0],y[0][1]):function(R){return R===o||Wf(R,o,y)}}function e1(o,y){return ag(o)&&M1(y)?L1(Ko(o),y):function(R){var H=yg(R,o);return H===t&&H===y?bg(R,o):$c(y,H,c|m)}}function fh(o,y,R,H,K){o!==y&&Bf(y,function(ne,de){if(K||(K=new Go),Qn(ne))hP(o,y,de,R,fh,H,K);else{var fe=H?H(cg(o,de),ne,de+"",o,y,K):t;fe===t&&(fe=ne),Df(o,de,fe)}},zi)}function hP(o,y,R,H,K,ne,de){var fe=cg(o,R),xe=cg(y,R),Ne=de.get(xe);if(Ne){Df(o,R,Ne);return}var Pe=ne?ne(fe,xe,R+"",o,y,de):t,je=Pe===t;if(je){var rt=Pt(xe),pt=!rt&&Us(xe),At=!rt&&!pt&&Sl(xe);Pe=xe,rt||pt||At?Pt(fe)?Pe=fe:ur(fe)?Pe=Pi(fe):pt?(je=!1,Pe=d1(xe,!0)):At?(je=!1,Pe=p1(xe,!0)):Pe=[]:Mc(xe)||La(xe)?(Pe=fe,La(fe)?Pe=cC(fe):(!Qn(fe)||ks(fe))&&(Pe=I1(xe))):je=!1}je&&(de.set(xe,Pe),K(Pe,xe,H,ne,de),de.delete(xe)),Df(o,R,Pe)}function t1(o,y){var R=o.length;if(R)return y+=y<0?R:0,_s(y,R)?o[y]:t}function n1(o,y,R){y.length?y=E(y,function(ne){return Pt(ne)?function(de){return Ra(de,ne.length===1?ne[0]:ne)}:ne}):y=[Fi];var H=-1;y=E(y,ln(kt()));var K=Xx(o,function(ne,de,fe){var xe=E(y,function(Ne){return Ne(ne)});return{criteria:xe,index:++H,value:ne}});return bt(K,function(ne,de){return kP(ne,de,R)})}function dP(o,y){return r1(o,y,function(R,H){return bg(o,H)})}function r1(o,y,R){for(var H=-1,K=y.length,ne={};++H<K;){var de=y[H],fe=Ra(o,de);R(fe,de)&&Tc(ne,Ws(de,o),fe)}return ne}function pP(o){return function(y){return Ra(y,o)}}function Vf(o,y,R,H){var K=H?$e:we,ne=-1,de=y.length,fe=o;for(o===y&&(y=Pi(y)),R&&(fe=E(o,ln(R)));++ne<de;)for(var xe=0,Ne=y[ne],Pe=R?R(Ne):Ne;(xe=K(fe,Pe,xe,H))>-1;)fe!==o&&ih.call(fe,xe,1),ih.call(o,xe,1);return o}function i1(o,y){for(var R=o?y.length:0,H=R-1;R--;){var K=y[R];if(R==H||K!==ne){var ne=K;_s(K)?ih.call(o,K,1):Yf(o,K)}}return o}function qf(o,y){return o+ah(Bx()*(y-o+1))}function fP(o,y,R,H){for(var K=-1,ne=Dr(sh((y-o)/(R||1)),0),de=Te(ne);ne--;)de[H?ne:++K]=o,o+=R;return de}function Gf(o,y){var R="";if(!o||y<1||y>G)return R;do y%2&&(R+=o),y=ah(y/2),y&&(o+=o);while(y);return R}function Kt(o,y){return ug(O1(o,y,Fi),o+"")}function gP(o){return jx($l(o))}function mP(o,y){var R=$l(o);return kh(R,Ea(y,0,R.length))}function Tc(o,y,R,H){if(!Qn(o))return o;y=Ws(y,o);for(var K=-1,ne=y.length,de=ne-1,fe=o;fe!=null&&++K<ne;){var xe=Ko(y[K]),Ne=R;if(xe==="__proto__"||xe==="constructor"||xe==="prototype")return o;if(K!=de){var Pe=fe[xe];Ne=H?H(Pe,xe,fe):t,Ne===t&&(Ne=Qn(Pe)?Pe:_s(y[K+1])?[]:{})}kc(fe,xe,Ne),fe=fe[xe]}return o}var o1=lh?function(o,y){return lh.set(o,y),o}:Fi,vP=oh?function(o,y){return oh(o,"toString",{configurable:!0,enumerable:!1,value:xg(y),writable:!0})}:Fi;function yP(o){return kh($l(o))}function So(o,y,R){var H=-1,K=o.length;y<0&&(y=-y>K?0:K+y),R=R>K?K:R,R<0&&(R+=K),K=y>R?0:R-y>>>0,y>>>=0;for(var ne=Te(K);++H<K;)ne[H]=o[H+y];return ne}function bP(o,y){var R;return Fs(o,function(H,K,ne){return R=y(H,K,ne),!R}),!!R}function gh(o,y,R){var H=0,K=o==null?H:o.length;if(typeof y=="number"&&y===y&&K<=ue){for(;H<K;){var ne=H+K>>>1,de=o[ne];de!==null&&!to(de)&&(R?de<=y:de<y)?H=ne+1:K=ne}return K}return Kf(o,y,Fi,R)}function Kf(o,y,R,H){var K=0,ne=o==null?0:o.length;if(ne===0)return 0;y=R(y);for(var de=y!==y,fe=y===null,xe=to(y),Ne=y===t;K<ne;){var Pe=ah((K+ne)/2),je=R(o[Pe]),rt=je!==t,pt=je===null,At=je===je,jt=to(je);if(de)var _t=H||At;else Ne?_t=At&&(H||rt):fe?_t=At&&rt&&(H||!pt):xe?_t=At&&rt&&!pt&&(H||!jt):pt||jt?_t=!1:_t=H?je<=y:je<y;_t?K=Pe+1:ne=Pe}return fi(ne,ie)}function s1(o,y){for(var R=-1,H=o.length,K=0,ne=[];++R<H;){var de=o[R],fe=y?y(de):de;if(!R||!Yo(fe,xe)){var xe=fe;ne[K++]=de===0?0:de}}return ne}function a1(o){return typeof o=="number"?o:to(o)?Q:+o}function eo(o){if(typeof o=="string")return o;if(Pt(o))return E(o,eo)+"";if(to(o))return zx?zx.call(o):"";var y=o+"";return y=="0"&&1/o==-U?"-0":y}function js(o,y,R){var H=-1,K=Ni,ne=o.length,de=!0,fe=[],xe=fe;if(R)de=!1,K=w;else if(ne>=h){var Ne=y?null:RP(o);if(Ne)return nt(Ne);de=!1,K=Ot,xe=new Ta}else xe=y?[]:fe;e:for(;++H<ne;){var Pe=o[H],je=y?y(Pe):Pe;if(Pe=R||Pe!==0?Pe:0,de&&je===je){for(var rt=xe.length;rt--;)if(xe[rt]===je)continue e;y&&xe.push(je),fe.push(Pe)}else K(xe,je,R)||(xe!==fe&&xe.push(je),fe.push(Pe))}return fe}function Yf(o,y){y=Ws(y,o);var R=-1,H=y.length;if(!H)return!0;for(;++R<H;){var K=Ko(y[R]);if(K==="__proto__"&&!bn.call(o,"__proto__")||(K==="constructor"||K==="prototype")&&R<H-1)return!1}var ne=N1(o,y);return ne==null||delete ne[Ko($o(y))]}function l1(o,y,R,H){return Tc(o,y,R(Ra(o,y)),H)}function mh(o,y,R,H){for(var K=o.length,ne=H?K:-1;(H?ne--:++ne<K)&&y(o[ne],ne,o););return R?So(o,H?0:ne,H?ne+1:K):So(o,H?ne+1:0,H?K:ne)}function c1(o,y){var R=o;return R instanceof en&&(R=R.value()),B(y,function(H,K){return K.func.apply(K.thisArg,A([H],K.args))},R)}function Jf(o,y,R){var H=o.length;if(H<2)return H?js(o[0]):[];for(var K=-1,ne=Te(H);++K<H;)for(var de=o[K],fe=-1;++fe<H;)fe!=K&&(ne[K]=Ac(ne[K]||de,o[fe],y,R));return js(ti(ne,1),y,R)}function u1(o,y,R){for(var H=-1,K=o.length,ne=y.length,de={};++H<K;){var fe=H<ne?y[H]:t;R(de,o[H],fe)}return de}function Zf(o){return ur(o)?o:[]}function Xf(o){return typeof o=="function"?o:Fi}function Ws(o,y){return Pt(o)?o:ag(o,y)?[o]:z1(wn(o))}var wP=Kt;function Hs(o,y,R){var H=o.length;return R=R===t?H:R,!y&&R>=H?o:So(o,y,R)}var h1=aD||function(o){return Vt.clearTimeout(o)};function d1(o,y){if(y)return o.slice();var R=o.length,H=Lx?Lx(R):new o.constructor(R);return o.copy(H),H}function Qf(o){var y=new o.constructor(o.byteLength);return new nh(y).set(new nh(o)),y}function xP(o,y){var R=y?Qf(o.buffer):o.buffer;return new o.constructor(R,o.byteOffset,o.byteLength)}function CP(o){var y=new o.constructor(o.source,Ut.exec(o));return y.lastIndex=o.lastIndex,y}function _P(o){return _c?Gt(_c.call(o)):{}}function p1(o,y){var R=y?Qf(o.buffer):o.buffer;return new o.constructor(R,o.byteOffset,o.length)}function f1(o,y){if(o!==y){var R=o!==t,H=o===null,K=o===o,ne=to(o),de=y!==t,fe=y===null,xe=y===y,Ne=to(y);if(!fe&&!Ne&&!ne&&o>y||ne&&de&&xe&&!fe&&!Ne||H&&de&&xe||!R&&xe||!K)return 1;if(!H&&!ne&&!Ne&&o<y||Ne&&R&&K&&!H&&!ne||fe&&R&&K||!de&&K||!xe)return-1}return 0}function kP(o,y,R){for(var H=-1,K=o.criteria,ne=y.criteria,de=K.length,fe=R.length;++H<de;){var xe=f1(K[H],ne[H]);if(xe){if(H>=fe)return xe;var Ne=R[H];return xe*(Ne=="desc"?-1:1)}}return o.index-y.index}function g1(o,y,R,H){for(var K=-1,ne=o.length,de=R.length,fe=-1,xe=y.length,Ne=Dr(ne-de,0),Pe=Te(xe+Ne),je=!H;++fe<xe;)Pe[fe]=y[fe];for(;++K<de;)(je||K<ne)&&(Pe[R[K]]=o[K]);for(;Ne--;)Pe[fe++]=o[K++];return Pe}function m1(o,y,R,H){for(var K=-1,ne=o.length,de=-1,fe=R.length,xe=-1,Ne=y.length,Pe=Dr(ne-fe,0),je=Te(Pe+Ne),rt=!H;++K<Pe;)je[K]=o[K];for(var pt=K;++xe<Ne;)je[pt+xe]=y[xe];for(;++de<fe;)(rt||K<ne)&&(je[pt+R[de]]=o[K++]);return je}function Pi(o,y){var R=-1,H=o.length;for(y||(y=Te(H));++R<H;)y[R]=o[R];return y}function ss(o,y,R,H){var K=!R;R||(R={});for(var ne=-1,de=y.length;++ne<de;){var fe=y[ne],xe=H?H(R[fe],o[fe],fe,R,o):t;xe===t&&(xe=o[fe]),K?is(R,fe,xe):kc(R,fe,xe)}return R}function AP(o,y){return ss(o,sg(o),y)}function SP(o,y){return ss(o,E1(o),y)}function vh(o,y){return function(R,H){var K=Pt(R)?bl:KD,ne=y?y():{};return K(R,o,kt(H,2),ne)}}function _l(o){return Kt(function(y,R){var H=-1,K=R.length,ne=K>1?R[K-1]:t,de=K>2?R[2]:t;for(ne=o.length>3&&typeof ne=="function"?(K--,ne):t,de&&Si(R[0],R[1],de)&&(ne=K<3?t:ne,K=1),y=Gt(y);++H<K;){var fe=R[H];fe&&o(y,fe,H,ne)}return y})}function v1(o,y){return function(R,H){if(R==null)return R;if(!Bi(R))return o(R,H);for(var K=R.length,ne=y?K:-1,de=Gt(R);(y?ne--:++ne<K)&&H(de[ne],ne,de)!==!1;);return R}}function y1(o){return function(y,R,H){for(var K=-1,ne=Gt(y),de=H(y),fe=de.length;fe--;){var xe=de[o?fe:++K];if(R(ne[xe],xe,ne)===!1)break}return y}}function $P(o,y,R){var H=y&b,K=Ec(o);function ne(){var de=this&&this!==Vt&&this instanceof ne?K:o;return de.apply(H?R:this,arguments)}return ne}function b1(o){return function(y){y=wn(y);var R=ge(y)?$t(y):t,H=R?R[0]:y.charAt(0),K=R?Hs(R,1).join(""):y.slice(1);return H[o]()+K}}function kl(o){return function(y){return B(yC(vC(y).replace(ms,"")),o,"")}}function Ec(o){return function(){var y=arguments;switch(y.length){case 0:return new o;case 1:return new o(y[0]);case 2:return new o(y[0],y[1]);case 3:return new o(y[0],y[1],y[2]);case 4:return new o(y[0],y[1],y[2],y[3]);case 5:return new o(y[0],y[1],y[2],y[3],y[4]);case 6:return new o(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new o(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var R=Cl(o.prototype),H=o.apply(R,y);return Qn(H)?H:R}}function TP(o,y,R){var H=Ec(o);function K(){for(var ne=arguments.length,de=Te(ne),fe=ne,xe=Al(K);fe--;)de[fe]=arguments[fe];var Ne=ne<3&&de[0]!==xe&&de[ne-1]!==xe?[]:Ye(de,xe);if(ne-=Ne.length,ne<R)return k1(o,y,yh,K.placeholder,t,de,Ne,t,t,R-ne);var Pe=this&&this!==Vt&&this instanceof K?H:o;return vn(Pe,this,de)}return K}function w1(o){return function(y,R,H){var K=Gt(y);if(!Bi(y)){var ne=kt(R,3);y=Gr(y),R=function(fe){return ne(K[fe],fe,K)}}var de=o(y,R,H);return de>-1?K[ne?y[de]:de]:t}}function x1(o){return Cs(function(y){var R=y.length,H=R,K=ko.prototype.thru;for(o&&y.reverse();H--;){var ne=y[H];if(typeof ne!="function")throw new Mn(g);if(K&&!de&&Ch(ne)=="wrapper")var de=new ko([],!0)}for(H=de?H:R;++H<R;){ne=y[H];var fe=Ch(ne),xe=fe=="wrapper"?ig(ne):t;xe&&lg(xe[0])&&xe[1]==(P|$|C|L)&&!xe[4].length&&xe[9]==1?de=de[Ch(xe[0])].apply(de,xe[3]):de=ne.length==1&&lg(ne)?de[fe]():de.thru(ne)}return function(){var Ne=arguments,Pe=Ne[0];if(de&&Ne.length==1&&Pt(Pe))return de.plant(Pe).value();for(var je=0,rt=R?y[je].apply(this,Ne):Pe;++je<R;)rt=y[je].call(this,rt);return rt}})}function yh(o,y,R,H,K,ne,de,fe,xe,Ne){var Pe=y&P,je=y&b,rt=y&x,pt=y&($|_),At=y&T,jt=rt?t:Ec(o);function _t(){for(var Jt=arguments.length,rn=Te(Jt),no=Jt;no--;)rn[no]=arguments[no];if(pt)var $i=Al(_t),ro=Un(rn,$i);if(H&&(rn=g1(rn,H,K,pt)),ne&&(rn=m1(rn,ne,de,pt)),Jt-=ro,pt&&Jt<Ne){var hr=Ye(rn,$i);return k1(o,y,yh,_t.placeholder,R,rn,hr,fe,xe,Ne-Jt)}var Jo=je?R:this,Ss=rt?Jo[o]:o;return Jt=rn.length,fe?rn=KP(rn,fe):At&&Jt>1&&rn.reverse(),Pe&&xe<Jt&&(rn.length=xe),this&&this!==Vt&&this instanceof _t&&(Ss=jt||Ec(Ss)),Ss.apply(Jo,rn)}return _t}function C1(o,y){return function(R,H){return nP(R,o,y(H),{})}}function bh(o,y){return function(R,H){var K;if(R===t&&H===t)return y;if(R!==t&&(K=R),H!==t){if(K===t)return H;typeof R=="string"||typeof H=="string"?(R=eo(R),H=eo(H)):(R=a1(R),H=a1(H)),K=o(R,H)}return K}}function eg(o){return Cs(function(y){return y=E(y,ln(kt())),Kt(function(R){var H=this;return o(y,function(K){return vn(K,H,R)})})})}function wh(o,y){y=y===t?" ":eo(y);var R=y.length;if(R<2)return R?Gf(y,o):y;var H=Gf(y,sh(o/qt(y)));return ge(y)?Hs($t(H),0,o).join(""):H.slice(0,o)}function EP(o,y,R,H){var K=y&b,ne=Ec(o);function de(){for(var fe=-1,xe=arguments.length,Ne=-1,Pe=H.length,je=Te(Pe+xe),rt=this&&this!==Vt&&this instanceof de?ne:o;++Ne<Pe;)je[Ne]=H[Ne];for(;xe--;)je[Ne++]=arguments[++fe];return vn(rt,K?R:this,je)}return de}function _1(o){return function(y,R,H){return H&&typeof H!="number"&&Si(y,R,H)&&(R=H=t),y=As(y),R===t?(R=y,y=0):R=As(R),H=H===t?y<R?1:-1:As(H),fP(y,R,H,o)}}function xh(o){return function(y,R){return typeof y=="string"&&typeof R=="string"||(y=To(y),R=To(R)),o(y,R)}}function k1(o,y,R,H,K,ne,de,fe,xe,Ne){var Pe=y&$,je=Pe?de:t,rt=Pe?t:de,pt=Pe?ne:t,At=Pe?t:ne;y|=Pe?C:O,y&=~(Pe?O:C),y&I||(y&=-4);var jt=[o,y,K,pt,je,At,rt,fe,xe,Ne],_t=R.apply(t,jt);return lg(o)&&D1(_t,jt),_t.placeholder=H,P1(_t,o,y)}function tg(o){var y=dn[o];return function(R,H){if(R=To(R),H=H==null?0:fi(zt(H),292),H&&Px(R)){var K=(wn(R)+"e").split("e"),ne=y(K[0]+"e"+(+K[1]+H));return K=(wn(ne)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return y(R)}}var RP=wl&&1/nt(new wl([,-0]))[1]==U?function(o){return new wl(o)}:kg;function A1(o){return function(y){var R=gi(y);return R==Ze?We(y):R==Ht?ct(y):Dn(y,o(y))}}function xs(o,y,R,H,K,ne,de,fe){var xe=y&x;if(!xe&&typeof o!="function")throw new Mn(g);var Ne=H?H.length:0;if(Ne||(y&=-97,H=K=t),de=de===t?de:Dr(zt(de),0),fe=fe===t?fe:zt(fe),Ne-=K?K.length:0,y&O){var Pe=H,je=K;H=K=t}var rt=xe?t:ig(o),pt=[o,y,R,H,K,Pe,je,ne,de,fe];if(rt&&VP(pt,rt),o=pt[0],y=pt[1],R=pt[2],H=pt[3],K=pt[4],fe=pt[9]=pt[9]===t?xe?0:o.length:Dr(pt[9]-Ne,0),!fe&&y&($|_)&&(y&=-25),!y||y==b)var At=$P(o,y,R);else y==$||y==_?At=TP(o,y,fe):(y==C||y==(b|C))&&!K.length?At=EP(o,y,R,H):At=yh.apply(t,pt);var jt=rt?o1:D1;return P1(jt(At,pt),o,y)}function S1(o,y,R,H){return o===t||Yo(o,ys[R])&&!bn.call(H,R)?y:o}function $1(o,y,R,H,K,ne){return Qn(o)&&Qn(y)&&(ne.set(y,o),fh(o,y,t,$1,ne),ne.delete(y)),o}function IP(o){return Mc(o)?t:o}function T1(o,y,R,H,K,ne){var de=R&c,fe=o.length,xe=y.length;if(fe!=xe&&!(de&&xe>fe))return!1;var Ne=ne.get(o),Pe=ne.get(y);if(Ne&&Pe)return Ne==y&&Pe==o;var je=-1,rt=!0,pt=R&m?new Ta:t;for(ne.set(o,y),ne.set(y,o);++je<fe;){var At=o[je],jt=y[je];if(H)var _t=de?H(jt,At,je,y,o,ne):H(At,jt,je,o,y,ne);if(_t!==t){if(_t)continue;rt=!1;break}if(pt){if(!W(y,function(Jt,rn){if(!Ot(pt,rn)&&(At===Jt||K(At,Jt,R,H,ne)))return pt.push(rn)})){rt=!1;break}}else if(!(At===jt||K(At,jt,R,H,ne))){rt=!1;break}}return ne.delete(o),ne.delete(y),rt}function MP(o,y,R,H,K,ne,de){switch(R){case Gn:if(o.byteLength!=y.byteLength||o.byteOffset!=y.byteOffset)return!1;o=o.buffer,y=y.buffer;case Bn:return!(o.byteLength!=y.byteLength||!ne(new nh(o),new nh(y)));case ke:case Ee:case Ie:return Yo(+o,+y);case Me:return o.name==y.name&&o.message==y.message;case er:case Tr:return o==y+"";case Ze:var fe=We;case Ht:var xe=H&c;if(fe||(fe=nt),o.size!=y.size&&!xe)return!1;var Ne=de.get(o);if(Ne)return Ne==y;H|=m,de.set(o,y);var Pe=T1(fe(o),fe(y),H,K,ne,de);return de.delete(o),Pe;case vt:if(_c)return _c.call(o)==_c.call(y)}return!1}function LP(o,y,R,H,K,ne){var de=R&c,fe=ng(o),xe=fe.length,Ne=ng(y),Pe=Ne.length;if(xe!=Pe&&!de)return!1;for(var je=xe;je--;){var rt=fe[je];if(!(de?rt in y:bn.call(y,rt)))return!1}var pt=ne.get(o),At=ne.get(y);if(pt&&At)return pt==y&&At==o;var jt=!0;ne.set(o,y),ne.set(y,o);for(var _t=de;++je<xe;){rt=fe[je];var Jt=o[rt],rn=y[rt];if(H)var no=de?H(rn,Jt,rt,y,o,ne):H(Jt,rn,rt,o,y,ne);if(!(no===t?Jt===rn||K(Jt,rn,R,H,ne):no)){jt=!1;break}_t||(_t=rt=="constructor")}if(jt&&!_t){var $i=o.constructor,ro=y.constructor;$i!=ro&&"constructor"in o&&"constructor"in y&&!(typeof $i=="function"&&$i instanceof $i&&typeof ro=="function"&&ro instanceof ro)&&(jt=!1)}return ne.delete(o),ne.delete(y),jt}function Cs(o){return ug(O1(o,t,H1),o+"")}function ng(o){return Kx(o,Gr,sg)}function rg(o){return Kx(o,zi,E1)}var ig=lh?function(o){return lh.get(o)}:kg;function Ch(o){for(var y=o.name+"",R=xl[y],H=bn.call(xl,y)?R.length:0;H--;){var K=R[H],ne=K.func;if(ne==null||ne==o)return K.name}return y}function Al(o){var y=bn.call(ee,"placeholder")?ee:o;return y.placeholder}function kt(){var o=ee.iteratee||Cg;return o=o===Cg?Zx:o,arguments.length?o(arguments[0],arguments[1]):o}function _h(o,y){var R=o.__data__;return jP(y)?R[typeof y=="string"?"string":"hash"]:R.map}function og(o){for(var y=Gr(o),R=y.length;R--;){var H=y[R],K=o[H];y[R]=[H,K,M1(K)]}return y}function Ia(o,y){var R=ce(o,y);return Jx(R)?R:t}function OP(o){var y=bn.call(o,Sa),R=o[Sa];try{o[Sa]=t;var H=!0}catch{}var K=eh.call(o);return H&&(y?o[Sa]=R:delete o[Sa]),K}var sg=Lf?function(o){return o==null?[]:(o=Gt(o),Xr(Lf(o),function(y){return Nx.call(o,y)}))}:Ag,E1=Lf?function(o){for(var y=[];o;)A(y,sg(o)),o=rh(o);return y}:Ag,gi=Ai;(Of&&gi(new Of(new ArrayBuffer(1)))!=Gn||wc&&gi(new wc)!=Ze||Nf&&gi(Nf.resolve())!=Wt||wl&&gi(new wl)!=Ht||xc&&gi(new xc)!=Dt)&&(gi=function(o){var y=Ai(o),R=y==mt?o.constructor:t,H=R?Ma(R):"";if(H)switch(H){case mD:return Gn;case vD:return Ze;case yD:return Wt;case bD:return Ht;case wD:return Dt}return y});function NP(o,y,R){for(var H=-1,K=R.length;++H<K;){var ne=R[H],de=ne.size;switch(ne.type){case"drop":o+=de;break;case"dropRight":y-=de;break;case"take":y=fi(y,o+de);break;case"takeRight":o=Dr(o,y-de);break}}return{start:o,end:y}}function DP(o){var y=o.match(ds);return y?y[1].split(ho):[]}function R1(o,y,R){y=Ws(y,o);for(var H=-1,K=y.length,ne=!1;++H<K;){var de=Ko(y[H]);if(!(ne=o!=null&&R(o,de)))break;o=o[de]}return ne||++H!=K?ne:(K=o==null?0:o.length,!!K&&Rh(K)&&_s(de,K)&&(Pt(o)||La(o)))}function PP(o){var y=o.length,R=new o.constructor(y);return y&&typeof o[0]=="string"&&bn.call(o,"index")&&(R.index=o.index,R.input=o.input),R}function I1(o){return typeof o.constructor=="function"&&!Rc(o)?Cl(rh(o)):{}}function BP(o,y,R){var H=o.constructor;switch(y){case Bn:return Qf(o);case ke:case Ee:return new H(+o);case Gn:return xP(o,R);case mr:case mn:case zn:case Kn:case hn:case tr:case lo:case wi:case Fr:return p1(o,R);case Ze:return new H;case Ie:case Tr:return new H(o);case er:return CP(o);case Ht:return new H;case vt:return _P(o)}}function zP(o,y){var R=y.length;if(!R)return o;var H=R-1;return y[H]=(R>1?"& ":"")+y[H],y=y.join(R>2?", ":" "),o.replace(Ci,`{
1451
+ /* [wrapped with `+y+`] */
1452
+ `)}function FP(o){return Pt(o)||La(o)||!!(Dx&&o&&o[Dx])}function _s(o,y){var R=typeof o;return y=y??G,!!y&&(R=="number"||R!="symbol"&&Wn.test(o))&&o>-1&&o%1==0&&o<y}function Si(o,y,R){if(!Qn(R))return!1;var H=typeof y;return(H=="number"?Bi(R)&&_s(y,R.length):H=="string"&&y in R)?Yo(R[y],o):!1}function ag(o,y){if(Pt(o))return!1;var R=typeof o;return R=="number"||R=="symbol"||R=="boolean"||o==null||to(o)?!0:Nn.test(o)||!Hr.test(o)||y!=null&&o in Gt(y)}function jP(o){var y=typeof o;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?o!=="__proto__":o===null}function lg(o){var y=Ch(o),R=ee[y];if(typeof R!="function"||!(y in en.prototype))return!1;if(o===R)return!0;var H=ig(R);return!!H&&o===H[0]}function WP(o){return!!Mx&&Mx in o}var HP=Xu?ks:Sg;function Rc(o){var y=o&&o.constructor,R=typeof y=="function"&&y.prototype||ys;return o===R}function M1(o){return o===o&&!Qn(o)}function L1(o,y){return function(R){return R==null?!1:R[o]===y&&(y!==t||o in Gt(R))}}function UP(o){var y=Th(o,function(H){return R.size===s&&R.clear(),H}),R=y.cache;return y}function VP(o,y){var R=o[1],H=y[1],K=R|H,ne=K<(b|x|P),de=H==P&&R==$||H==P&&R==L&&o[7].length<=y[8]||H==(P|L)&&y[7].length<=y[8]&&R==$;if(!(ne||de))return o;H&b&&(o[2]=y[2],K|=R&b?0:I);var fe=y[3];if(fe){var xe=o[3];o[3]=xe?g1(xe,fe,y[4]):fe,o[4]=xe?Ye(o[3],a):y[4]}return fe=y[5],fe&&(xe=o[5],o[5]=xe?m1(xe,fe,y[6]):fe,o[6]=xe?Ye(o[5],a):y[6]),fe=y[7],fe&&(o[7]=fe),H&P&&(o[8]=o[8]==null?y[8]:fi(o[8],y[8])),o[9]==null&&(o[9]=y[9]),o[0]=y[0],o[1]=K,o}function qP(o){var y=[];if(o!=null)for(var R in Gt(o))y.push(R);return y}function GP(o){return eh.call(o)}function O1(o,y,R){return y=Dr(y===t?o.length-1:y,0),function(){for(var H=arguments,K=-1,ne=Dr(H.length-y,0),de=Te(ne);++K<ne;)de[K]=H[y+K];K=-1;for(var fe=Te(y+1);++K<y;)fe[K]=H[K];return fe[y]=R(de),vn(o,this,fe)}}function N1(o,y){return y.length<2?o:Ra(o,So(y,0,-1))}function KP(o,y){for(var R=o.length,H=fi(y.length,R),K=Pi(o);H--;){var ne=y[H];o[H]=_s(ne,R)?K[ne]:t}return o}function cg(o,y){if(!(y==="constructor"&&typeof o[y]=="function")&&y!="__proto__")return o[y]}var D1=B1(o1),Ic=cD||function(o,y){return Vt.setTimeout(o,y)},ug=B1(vP);function P1(o,y,R){var H=y+"";return ug(o,zP(H,YP(DP(H),R)))}function B1(o){var y=0,R=0;return function(){var H=pD(),K=S-(H-R);if(R=H,K>0){if(++y>=M)return arguments[0]}else y=0;return o.apply(t,arguments)}}function kh(o,y){var R=-1,H=o.length,K=H-1;for(y=y===t?H:y;++R<y;){var ne=qf(R,K),de=o[ne];o[ne]=o[R],o[R]=de}return o.length=y,o}var z1=UP(function(o){var y=[];return o.charCodeAt(0)===46&&y.push(""),o.replace(Ur,function(R,H,K,ne){y.push(K?ne.replace(nn,"$1"):H||R)}),y});function Ko(o){if(typeof o=="string"||to(o))return o;var y=o+"";return y=="0"&&1/o==-U?"-0":y}function Ma(o){if(o!=null){try{return Qu.call(o)}catch{}try{return o+""}catch{}}return""}function YP(o,y){return Or(pe,function(R){var H="_."+R[0];y&R[1]&&!Ni(o,H)&&o.push(H)}),o.sort()}function F1(o){if(o instanceof en)return o.clone();var y=new ko(o.__wrapped__,o.__chain__);return y.__actions__=Pi(o.__actions__),y.__index__=o.__index__,y.__values__=o.__values__,y}function JP(o,y,R){(R?Si(o,y,R):y===t)?y=1:y=Dr(zt(y),0);var H=o==null?0:o.length;if(!H||y<1)return[];for(var K=0,ne=0,de=Te(sh(H/y));K<H;)de[ne++]=So(o,K,K+=y);return de}function ZP(o){for(var y=-1,R=o==null?0:o.length,H=0,K=[];++y<R;){var ne=o[y];ne&&(K[H++]=ne)}return K}function XP(){var o=arguments.length;if(!o)return[];for(var y=Te(o-1),R=arguments[0],H=o;H--;)y[H-1]=arguments[H];return A(Pt(R)?Pi(R):[R],ti(y,1))}var QP=Kt(function(o,y){return ur(o)?Ac(o,ti(y,1,ur,!0)):[]}),eB=Kt(function(o,y){var R=$o(y);return ur(R)&&(R=t),ur(o)?Ac(o,ti(y,1,ur,!0),kt(R,2)):[]}),tB=Kt(function(o,y){var R=$o(y);return ur(R)&&(R=t),ur(o)?Ac(o,ti(y,1,ur,!0),t,R):[]});function nB(o,y,R){var H=o==null?0:o.length;return H?(y=R||y===t?1:zt(y),So(o,y<0?0:y,H)):[]}function rB(o,y,R){var H=o==null?0:o.length;return H?(y=R||y===t?1:zt(y),y=H-y,So(o,0,y<0?0:y)):[]}function iB(o,y){return o&&o.length?mh(o,kt(y,3),!0,!0):[]}function oB(o,y){return o&&o.length?mh(o,kt(y,3),!0):[]}function sB(o,y,R,H){var K=o==null?0:o.length;return K?(R&&typeof R!="number"&&Si(o,y,R)&&(R=0,H=K),XD(o,y,R,H)):[]}function j1(o,y,R){var H=o==null?0:o.length;if(!H)return-1;var K=R==null?0:zt(R);return K<0&&(K=Dr(H+K,0)),he(o,kt(y,3),K)}function W1(o,y,R){var H=o==null?0:o.length;if(!H)return-1;var K=H-1;return R!==t&&(K=zt(R),K=R<0?Dr(H+K,0):fi(K,H-1)),he(o,kt(y,3),K,!0)}function H1(o){var y=o==null?0:o.length;return y?ti(o,1):[]}function aB(o){var y=o==null?0:o.length;return y?ti(o,U):[]}function lB(o,y){var R=o==null?0:o.length;return R?(y=y===t?1:zt(y),ti(o,y)):[]}function cB(o){for(var y=-1,R=o==null?0:o.length,H={};++y<R;){var K=o[y];is(H,K[0],K[1])}return H}function U1(o){return o&&o.length?o[0]:t}function uB(o,y,R){var H=o==null?0:o.length;if(!H)return-1;var K=R==null?0:zt(R);return K<0&&(K=Dr(H+K,0)),we(o,y,K)}function hB(o){var y=o==null?0:o.length;return y?So(o,0,-1):[]}var dB=Kt(function(o){var y=E(o,Zf);return y.length&&y[0]===o[0]?jf(y):[]}),pB=Kt(function(o){var y=$o(o),R=E(o,Zf);return y===$o(R)?y=t:R.pop(),R.length&&R[0]===o[0]?jf(R,kt(y,2)):[]}),fB=Kt(function(o){var y=$o(o),R=E(o,Zf);return y=typeof y=="function"?y:t,y&&R.pop(),R.length&&R[0]===o[0]?jf(R,t,y):[]});function gB(o,y){return o==null?"":hD.call(o,y)}function $o(o){var y=o==null?0:o.length;return y?o[y-1]:t}function mB(o,y,R){var H=o==null?0:o.length;if(!H)return-1;var K=H;return R!==t&&(K=zt(R),K=K<0?Dr(H+K,0):fi(K,H-1)),y===y?cn(o,y,K):he(o,be,K,!0)}function vB(o,y){return o&&o.length?t1(o,zt(y)):t}var yB=Kt(V1);function V1(o,y){return o&&o.length&&y&&y.length?Vf(o,y):o}function bB(o,y,R){return o&&o.length&&y&&y.length?Vf(o,y,kt(R,2)):o}function wB(o,y,R){return o&&o.length&&y&&y.length?Vf(o,y,t,R):o}var xB=Cs(function(o,y){var R=o==null?0:o.length,H=Pf(o,y);return i1(o,E(y,function(K){return _s(K,R)?+K:K}).sort(f1)),H});function CB(o,y){var R=[];if(!(o&&o.length))return R;var H=-1,K=[],ne=o.length;for(y=kt(y,3);++H<ne;){var de=o[H];y(de,H,o)&&(R.push(de),K.push(H))}return i1(o,K),R}function hg(o){return o==null?o:gD.call(o)}function _B(o,y,R){var H=o==null?0:o.length;return H?(R&&typeof R!="number"&&Si(o,y,R)?(y=0,R=H):(y=y==null?0:zt(y),R=R===t?H:zt(R)),So(o,y,R)):[]}function kB(o,y){return gh(o,y)}function AB(o,y,R){return Kf(o,y,kt(R,2))}function SB(o,y){var R=o==null?0:o.length;if(R){var H=gh(o,y);if(H<R&&Yo(o[H],y))return H}return-1}function $B(o,y){return gh(o,y,!0)}function TB(o,y,R){return Kf(o,y,kt(R,2),!0)}function EB(o,y){var R=o==null?0:o.length;if(R){var H=gh(o,y,!0)-1;if(Yo(o[H],y))return H}return-1}function RB(o){return o&&o.length?s1(o):[]}function IB(o,y){return o&&o.length?s1(o,kt(y,2)):[]}function MB(o){var y=o==null?0:o.length;return y?So(o,1,y):[]}function LB(o,y,R){return o&&o.length?(y=R||y===t?1:zt(y),So(o,0,y<0?0:y)):[]}function OB(o,y,R){var H=o==null?0:o.length;return H?(y=R||y===t?1:zt(y),y=H-y,So(o,y<0?0:y,H)):[]}function NB(o,y){return o&&o.length?mh(o,kt(y,3),!1,!0):[]}function DB(o,y){return o&&o.length?mh(o,kt(y,3)):[]}var PB=Kt(function(o){return js(ti(o,1,ur,!0))}),BB=Kt(function(o){var y=$o(o);return ur(y)&&(y=t),js(ti(o,1,ur,!0),kt(y,2))}),zB=Kt(function(o){var y=$o(o);return y=typeof y=="function"?y:t,js(ti(o,1,ur,!0),t,y)});function FB(o){return o&&o.length?js(o):[]}function jB(o,y){return o&&o.length?js(o,kt(y,2)):[]}function WB(o,y){return y=typeof y=="function"?y:t,o&&o.length?js(o,t,y):[]}function dg(o){if(!(o&&o.length))return[];var y=0;return o=Xr(o,function(R){if(ur(R))return y=Dr(R.length,y),!0}),ut(y,function(R){return E(o,ze(R))})}function q1(o,y){if(!(o&&o.length))return[];var R=dg(o);return y==null?R:E(R,function(H){return vn(y,t,H)})}var HB=Kt(function(o,y){return ur(o)?Ac(o,y):[]}),UB=Kt(function(o){return Jf(Xr(o,ur))}),VB=Kt(function(o){var y=$o(o);return ur(y)&&(y=t),Jf(Xr(o,ur),kt(y,2))}),qB=Kt(function(o){var y=$o(o);return y=typeof y=="function"?y:t,Jf(Xr(o,ur),t,y)}),GB=Kt(dg);function KB(o,y){return u1(o||[],y||[],kc)}function YB(o,y){return u1(o||[],y||[],Tc)}var JB=Kt(function(o){var y=o.length,R=y>1?o[y-1]:t;return R=typeof R=="function"?(o.pop(),R):t,q1(o,R)});function G1(o){var y=ee(o);return y.__chain__=!0,y}function ZB(o,y){return y(o),o}function Ah(o,y){return y(o)}var XB=Cs(function(o){var y=o.length,R=y?o[0]:0,H=this.__wrapped__,K=function(ne){return Pf(ne,o)};return y>1||this.__actions__.length||!(H instanceof en)||!_s(R)?this.thru(K):(H=H.slice(R,+R+(y?1:0)),H.__actions__.push({func:Ah,args:[K],thisArg:t}),new ko(H,this.__chain__).thru(function(ne){return y&&!ne.length&&ne.push(t),ne}))});function QB(){return G1(this)}function ez(){return new ko(this.value(),this.__chain__)}function tz(){this.__values__===t&&(this.__values__=aC(this.value()));var o=this.__index__>=this.__values__.length,y=o?t:this.__values__[this.__index__++];return{done:o,value:y}}function nz(){return this}function rz(o){for(var y,R=this;R instanceof uh;){var H=F1(R);H.__index__=0,H.__values__=t,y?K.__wrapped__=H:y=H;var K=H;R=R.__wrapped__}return K.__wrapped__=o,y}function iz(){var o=this.__wrapped__;if(o instanceof en){var y=o;return this.__actions__.length&&(y=new en(this)),y=y.reverse(),y.__actions__.push({func:Ah,args:[hg],thisArg:t}),new ko(y,this.__chain__)}return this.thru(hg)}function oz(){return c1(this.__wrapped__,this.__actions__)}var sz=vh(function(o,y,R){bn.call(o,R)?++o[R]:is(o,R,1)});function az(o,y,R){var H=Pt(o)?rs:ZD;return R&&Si(o,y,R)&&(y=t),H(o,kt(y,3))}function lz(o,y){var R=Pt(o)?Xr:qx;return R(o,kt(y,3))}var cz=w1(j1),uz=w1(W1);function hz(o,y){return ti(Sh(o,y),1)}function dz(o,y){return ti(Sh(o,y),U)}function pz(o,y,R){return R=R===t?1:zt(R),ti(Sh(o,y),R)}function K1(o,y){var R=Pt(o)?Or:Fs;return R(o,kt(y,3))}function Y1(o,y){var R=Pt(o)?pi:Vx;return R(o,kt(y,3))}var fz=vh(function(o,y,R){bn.call(o,R)?o[R].push(y):is(o,R,[y])});function gz(o,y,R,H){o=Bi(o)?o:$l(o),R=R&&!H?zt(R):0;var K=o.length;return R<0&&(R=Dr(K+R,0)),Ih(o)?R<=K&&o.indexOf(y,R)>-1:!!K&&we(o,y,R)>-1}var mz=Kt(function(o,y,R){var H=-1,K=typeof y=="function",ne=Bi(o)?Te(o.length):[];return Fs(o,function(de){ne[++H]=K?vn(y,de,R):Sc(de,y,R)}),ne}),vz=vh(function(o,y,R){is(o,R,y)});function Sh(o,y){var R=Pt(o)?E:Xx;return R(o,kt(y,3))}function yz(o,y,R,H){return o==null?[]:(Pt(y)||(y=y==null?[]:[y]),R=H?t:R,Pt(R)||(R=R==null?[]:[R]),n1(o,y,R))}var bz=vh(function(o,y,R){o[R?0:1].push(y)},function(){return[[],[]]});function wz(o,y,R){var H=Pt(o)?B:Qe,K=arguments.length<3;return H(o,kt(y,4),R,K,Fs)}function xz(o,y,R){var H=Pt(o)?z:Qe,K=arguments.length<3;return H(o,kt(y,4),R,K,Vx)}function Cz(o,y){var R=Pt(o)?Xr:qx;return R(o,Eh(kt(y,3)))}function _z(o){var y=Pt(o)?jx:gP;return y(o)}function kz(o,y,R){(R?Si(o,y,R):y===t)?y=1:y=zt(y);var H=Pt(o)?qD:mP;return H(o,y)}function Az(o){var y=Pt(o)?GD:yP;return y(o)}function Sz(o){if(o==null)return 0;if(Bi(o))return Ih(o)?qt(o):o.length;var y=gi(o);return y==Ze||y==Ht?o.size:Hf(o).length}function $z(o,y,R){var H=Pt(o)?W:bP;return R&&Si(o,y,R)&&(y=t),H(o,kt(y,3))}var Tz=Kt(function(o,y){if(o==null)return[];var R=y.length;return R>1&&Si(o,y[0],y[1])?y=[]:R>2&&Si(y[0],y[1],y[2])&&(y=[y[0]]),n1(o,ti(y,1),[])}),$h=lD||function(){return Vt.Date.now()};function Ez(o,y){if(typeof y!="function")throw new Mn(g);return o=zt(o),function(){if(--o<1)return y.apply(this,arguments)}}function J1(o,y,R){return y=R?t:y,y=o&&y==null?o.length:y,xs(o,P,t,t,t,t,y)}function Z1(o,y){var R;if(typeof y!="function")throw new Mn(g);return o=zt(o),function(){return--o>0&&(R=y.apply(this,arguments)),o<=1&&(y=t),R}}var pg=Kt(function(o,y,R){var H=b;if(R.length){var K=Ye(R,Al(pg));H|=C}return xs(o,H,y,R,K)}),X1=Kt(function(o,y,R){var H=b|x;if(R.length){var K=Ye(R,Al(X1));H|=C}return xs(y,H,o,R,K)});function Q1(o,y,R){y=R?t:y;var H=xs(o,$,t,t,t,t,t,y);return H.placeholder=Q1.placeholder,H}function eC(o,y,R){y=R?t:y;var H=xs(o,_,t,t,t,t,t,y);return H.placeholder=eC.placeholder,H}function tC(o,y,R){var H,K,ne,de,fe,xe,Ne=0,Pe=!1,je=!1,rt=!0;if(typeof o!="function")throw new Mn(g);y=To(y)||0,Qn(R)&&(Pe=!!R.leading,je="maxWait"in R,ne=je?Dr(To(R.maxWait)||0,y):ne,rt="trailing"in R?!!R.trailing:rt);function pt(hr){var Jo=H,Ss=K;return H=K=t,Ne=hr,de=o.apply(Ss,Jo),de}function At(hr){return Ne=hr,fe=Ic(Jt,y),Pe?pt(hr):de}function jt(hr){var Jo=hr-xe,Ss=hr-Ne,xC=y-Jo;return je?fi(xC,ne-Ss):xC}function _t(hr){var Jo=hr-xe,Ss=hr-Ne;return xe===t||Jo>=y||Jo<0||je&&Ss>=ne}function Jt(){var hr=$h();if(_t(hr))return rn(hr);fe=Ic(Jt,jt(hr))}function rn(hr){return fe=t,rt&&H?pt(hr):(H=K=t,de)}function no(){fe!==t&&h1(fe),Ne=0,H=xe=K=fe=t}function $i(){return fe===t?de:rn($h())}function ro(){var hr=$h(),Jo=_t(hr);if(H=arguments,K=this,xe=hr,Jo){if(fe===t)return At(xe);if(je)return h1(fe),fe=Ic(Jt,y),pt(xe)}return fe===t&&(fe=Ic(Jt,y)),de}return ro.cancel=no,ro.flush=$i,ro}var Rz=Kt(function(o,y){return Ux(o,1,y)}),Iz=Kt(function(o,y,R){return Ux(o,To(y)||0,R)});function Mz(o){return xs(o,T)}function Th(o,y){if(typeof o!="function"||y!=null&&typeof y!="function")throw new Mn(g);var R=function(){var H=arguments,K=y?y.apply(this,H):H[0],ne=R.cache;if(ne.has(K))return ne.get(K);var de=o.apply(this,H);return R.cache=ne.set(K,de)||ne,de};return R.cache=new(Th.Cache||ws),R}Th.Cache=ws;function Eh(o){if(typeof o!="function")throw new Mn(g);return function(){var y=arguments;switch(y.length){case 0:return!o.call(this);case 1:return!o.call(this,y[0]);case 2:return!o.call(this,y[0],y[1]);case 3:return!o.call(this,y[0],y[1],y[2])}return!o.apply(this,y)}}function Lz(o){return Z1(2,o)}var Oz=wP(function(o,y){y=y.length==1&&Pt(y[0])?E(y[0],ln(kt())):E(ti(y,1),ln(kt()));var R=y.length;return Kt(function(H){for(var K=-1,ne=fi(H.length,R);++K<ne;)H[K]=y[K].call(this,H[K]);return vn(o,this,H)})}),fg=Kt(function(o,y){var R=Ye(y,Al(fg));return xs(o,C,t,y,R)}),nC=Kt(function(o,y){var R=Ye(y,Al(nC));return xs(o,O,t,y,R)}),Nz=Cs(function(o,y){return xs(o,L,t,t,t,y)});function Dz(o,y){if(typeof o!="function")throw new Mn(g);return y=y===t?y:zt(y),Kt(o,y)}function Pz(o,y){if(typeof o!="function")throw new Mn(g);return y=y==null?0:Dr(zt(y),0),Kt(function(R){var H=R[y],K=Hs(R,0,y);return H&&A(K,H),vn(o,this,K)})}function Bz(o,y,R){var H=!0,K=!0;if(typeof o!="function")throw new Mn(g);return Qn(R)&&(H="leading"in R?!!R.leading:H,K="trailing"in R?!!R.trailing:K),tC(o,y,{leading:H,maxWait:y,trailing:K})}function zz(o){return J1(o,1)}function Fz(o,y){return fg(Xf(y),o)}function jz(){if(!arguments.length)return[];var o=arguments[0];return Pt(o)?o:[o]}function Wz(o){return Ao(o,i)}function Hz(o,y){return y=typeof y=="function"?y:t,Ao(o,i,y)}function Uz(o){return Ao(o,u|i)}function Vz(o,y){return y=typeof y=="function"?y:t,Ao(o,u|i,y)}function qz(o,y){return y==null||Hx(o,y,Gr(y))}function Yo(o,y){return o===y||o!==o&&y!==y}var Gz=xh(Ff),Kz=xh(function(o,y){return o>=y}),La=Yx((function(){return arguments})())?Yx:function(o){return sr(o)&&bn.call(o,"callee")&&!Nx.call(o,"callee")},Pt=Te.isArray,Yz=Bs?ln(Bs):rP;function Bi(o){return o!=null&&Rh(o.length)&&!ks(o)}function ur(o){return sr(o)&&Bi(o)}function Jz(o){return o===!0||o===!1||sr(o)&&Ai(o)==ke}var Us=uD||Sg,Zz=or?ln(or):iP;function Xz(o){return sr(o)&&o.nodeType===1&&!Mc(o)}function Qz(o){if(o==null)return!0;if(Bi(o)&&(Pt(o)||typeof o=="string"||typeof o.splice=="function"||Us(o)||Sl(o)||La(o)))return!o.length;var y=gi(o);if(y==Ze||y==Ht)return!o.size;if(Rc(o))return!Hf(o).length;for(var R in o)if(bn.call(o,R))return!1;return!0}function eF(o,y){return $c(o,y)}function tF(o,y,R){R=typeof R=="function"?R:t;var H=R?R(o,y):t;return H===t?$c(o,y,t,R):!!H}function gg(o){if(!sr(o))return!1;var y=Ai(o);return y==Me||y==Ve||typeof o.message=="string"&&typeof o.name=="string"&&!Mc(o)}function nF(o){return typeof o=="number"&&Px(o)}function ks(o){if(!Qn(o))return!1;var y=Ai(o);return y==ot||y==Ge||y==Ce||y==An}function rC(o){return typeof o=="number"&&o==zt(o)}function Rh(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=G}function Qn(o){var y=typeof o;return o!=null&&(y=="object"||y=="function")}function sr(o){return o!=null&&typeof o=="object"}var iC=Xi?ln(Xi):sP;function rF(o,y){return o===y||Wf(o,y,og(y))}function iF(o,y,R){return R=typeof R=="function"?R:t,Wf(o,y,og(y),R)}function oF(o){return oC(o)&&o!=+o}function sF(o){if(HP(o))throw new wt(d);return Jx(o)}function aF(o){return o===null}function lF(o){return o==null}function oC(o){return typeof o=="number"||sr(o)&&Ai(o)==Ie}function Mc(o){if(!sr(o)||Ai(o)!=mt)return!1;var y=rh(o);if(y===null)return!0;var R=bn.call(y,"constructor")&&y.constructor;return typeof R=="function"&&R instanceof R&&Qu.call(R)==iD}var mg=Qi?ln(Qi):aP;function cF(o){return rC(o)&&o>=-G&&o<=G}var sC=Co?ln(Co):lP;function Ih(o){return typeof o=="string"||!Pt(o)&&sr(o)&&Ai(o)==Tr}function to(o){return typeof o=="symbol"||sr(o)&&Ai(o)==vt}var Sl=Aa?ln(Aa):cP;function uF(o){return o===t}function hF(o){return sr(o)&&gi(o)==Dt}function dF(o){return sr(o)&&Ai(o)==On}var pF=xh(Uf),fF=xh(function(o,y){return o<=y});function aC(o){if(!o)return[];if(Bi(o))return Ih(o)?$t(o):Pi(o);if(bc&&o[bc])return Oe(o[bc]());var y=gi(o),R=y==Ze?We:y==Ht?nt:$l;return R(o)}function As(o){if(!o)return o===0?o:0;if(o=To(o),o===U||o===-U){var y=o<0?-1:1;return y*J}return o===o?o:0}function zt(o){var y=As(o),R=y%1;return y===y?R?y-R:y:0}function lC(o){return o?Ea(zt(o),0,le):0}function To(o){if(typeof o=="number")return o;if(to(o))return Q;if(Qn(o)){var y=typeof o.valueOf=="function"?o.valueOf():o;o=Qn(y)?y+"":y}if(typeof o!="string")return o===0?o:+o;o=Mt(o);var R=br.test(o);return R||Cn.test(o)?Et(o.slice(2),R?2:8):ps.test(o)?Q:+o}function cC(o){return ss(o,zi(o))}function gF(o){return o?Ea(zt(o),-G,G):o===0?o:0}function wn(o){return o==null?"":eo(o)}var mF=_l(function(o,y){if(Rc(y)||Bi(y)){ss(y,Gr(y),o);return}for(var R in y)bn.call(y,R)&&kc(o,R,y[R])}),uC=_l(function(o,y){ss(y,zi(y),o)}),hC=_l(function(o,y,R,H){ss(y,zi(y),o,H)}),vg=_l(function(o,y,R,H){ss(y,Gr(y),o,H)}),vF=Cs(Pf);function yF(o,y){var R=Cl(o);return y==null?R:Wx(R,y)}var bF=Kt(function(o,y){o=Gt(o);var R=-1,H=y.length,K=H>2?y[2]:t;for(K&&Si(y[0],y[1],K)&&(H=1);++R<H;)for(var ne=y[R],de=zi(ne),fe=-1,xe=de.length;++fe<xe;){var Ne=de[fe],Pe=o[Ne];(Pe===t||Yo(Pe,ys[Ne])&&!bn.call(o,Ne))&&(o[Ne]=ne[Ne])}return o}),wF=Kt(function(o){return o.push(t,$1),vn(dC,t,o)});function xF(o,y){return se(o,kt(y,3),os)}function CF(o,y){return se(o,kt(y,3),zf)}function _F(o,y){return o==null?o:Bf(o,kt(y,3),zi)}function kF(o,y){return o==null?o:Gx(o,kt(y,3),zi)}function AF(o,y){return o&&os(o,kt(y,3))}function SF(o,y){return o&&zf(o,kt(y,3))}function $F(o){return o==null?[]:ph(o,Gr(o))}function TF(o){return o==null?[]:ph(o,zi(o))}function yg(o,y,R){var H=o==null?t:Ra(o,y);return H===t?R:H}function EF(o,y){return o!=null&&R1(o,y,QD)}function bg(o,y){return o!=null&&R1(o,y,eP)}var RF=C1(function(o,y,R){y!=null&&typeof y.toString!="function"&&(y=eh.call(y)),o[y]=R},xg(Fi)),IF=C1(function(o,y,R){y!=null&&typeof y.toString!="function"&&(y=eh.call(y)),bn.call(o,y)?o[y].push(R):o[y]=[R]},kt),MF=Kt(Sc);function Gr(o){return Bi(o)?Fx(o):Hf(o)}function zi(o){return Bi(o)?Fx(o,!0):uP(o)}function LF(o,y){var R={};return y=kt(y,3),os(o,function(H,K,ne){is(R,y(H,K,ne),H)}),R}function OF(o,y){var R={};return y=kt(y,3),os(o,function(H,K,ne){is(R,K,y(H,K,ne))}),R}var NF=_l(function(o,y,R){fh(o,y,R)}),dC=_l(function(o,y,R,H){fh(o,y,R,H)}),DF=Cs(function(o,y){var R={};if(o==null)return R;var H=!1;y=E(y,function(ne){return ne=Ws(ne,o),H||(H=ne.length>1),ne}),ss(o,rg(o),R),H&&(R=Ao(R,u|p|i,IP));for(var K=y.length;K--;)Yf(R,y[K]);return R});function PF(o,y){return pC(o,Eh(kt(y)))}var BF=Cs(function(o,y){return o==null?{}:dP(o,y)});function pC(o,y){if(o==null)return{};var R=E(rg(o),function(H){return[H]});return y=kt(y),r1(o,R,function(H,K){return y(H,K[0])})}function zF(o,y,R){y=Ws(y,o);var H=-1,K=y.length;for(K||(K=1,o=t);++H<K;){var ne=o==null?t:o[Ko(y[H])];ne===t&&(H=K,ne=R),o=ks(ne)?ne.call(o):ne}return o}function FF(o,y,R){return o==null?o:Tc(o,y,R)}function jF(o,y,R,H){return H=typeof H=="function"?H:t,o==null?o:Tc(o,y,R,H)}var fC=A1(Gr),gC=A1(zi);function WF(o,y,R){var H=Pt(o),K=H||Us(o)||Sl(o);if(y=kt(y,4),R==null){var ne=o&&o.constructor;K?R=H?new ne:[]:Qn(o)?R=ks(ne)?Cl(rh(o)):{}:R={}}return(K?Or:os)(o,function(de,fe,xe){return y(R,de,fe,xe)}),R}function HF(o,y){return o==null?!0:Yf(o,y)}function UF(o,y,R){return o==null?o:l1(o,y,Xf(R))}function VF(o,y,R,H){return H=typeof H=="function"?H:t,o==null?o:l1(o,y,Xf(R),H)}function $l(o){return o==null?[]:Bt(o,Gr(o))}function qF(o){return o==null?[]:Bt(o,zi(o))}function GF(o,y,R){return R===t&&(R=y,y=t),R!==t&&(R=To(R),R=R===R?R:0),y!==t&&(y=To(y),y=y===y?y:0),Ea(To(o),y,R)}function KF(o,y,R){return y=As(y),R===t?(R=y,y=0):R=As(R),o=To(o),tP(o,y,R)}function YF(o,y,R){if(R&&typeof R!="boolean"&&Si(o,y,R)&&(y=R=t),R===t&&(typeof y=="boolean"?(R=y,y=t):typeof o=="boolean"&&(R=o,o=t)),o===t&&y===t?(o=0,y=1):(o=As(o),y===t?(y=o,o=0):y=As(y)),o>y){var H=o;o=y,y=H}if(R||o%1||y%1){var K=Bx();return fi(o+K*(y-o+In("1e-"+((K+"").length-1))),y)}return qf(o,y)}var JF=kl(function(o,y,R){return y=y.toLowerCase(),o+(R?mC(y):y)});function mC(o){return wg(wn(o).toLowerCase())}function vC(o){return o=wn(o),o&&o.replace(Bo,V).replace(Vo,"")}function ZF(o,y,R){o=wn(o),y=eo(y);var H=o.length;R=R===t?H:Ea(zt(R),0,H);var K=R;return R-=y.length,R>=0&&o.slice(R,K)==y}function XF(o){return o=wn(o),o&&ci.test(o)?o.replace(uo,Z):o}function QF(o){return o=wn(o),o&&Fn.test(o)?o.replace(xi,"\\$&"):o}var ej=kl(function(o,y,R){return o+(R?"-":"")+y.toLowerCase()}),tj=kl(function(o,y,R){return o+(R?" ":"")+y.toLowerCase()}),nj=b1("toLowerCase");function rj(o,y,R){o=wn(o),y=zt(y);var H=y?qt(o):0;if(!y||H>=y)return o;var K=(y-H)/2;return wh(ah(K),R)+o+wh(sh(K),R)}function ij(o,y,R){o=wn(o),y=zt(y);var H=y?qt(o):0;return y&&H<y?o+wh(y-H,R):o}function oj(o,y,R){o=wn(o),y=zt(y);var H=y?qt(o):0;return y&&H<y?wh(y-H,R)+o:o}function sj(o,y,R){return R||y==null?y=0:y&&(y=+y),fD(wn(o).replace(nr,""),y||0)}function aj(o,y,R){return(R?Si(o,y,R):y===t)?y=1:y=zt(y),Gf(wn(o),y)}function lj(){var o=arguments,y=wn(o[0]);return o.length<3?y:y.replace(o[1],o[2])}var cj=kl(function(o,y,R){return o+(R?"_":"")+y.toLowerCase()});function uj(o,y,R){return R&&typeof R!="number"&&Si(o,y,R)&&(y=R=t),R=R===t?le:R>>>0,R?(o=wn(o),o&&(typeof y=="string"||y!=null&&!mg(y))&&(y=eo(y),!y&&ge(o))?Hs($t(o),0,R):o.split(y,R)):[]}var hj=kl(function(o,y,R){return o+(R?" ":"")+wg(y)});function dj(o,y,R){return o=wn(o),R=R==null?0:Ea(zt(R),0,o.length),y=eo(y),o.slice(R,R+y.length)==y}function pj(o,y,R){var H=ee.templateSettings;R&&Si(o,y,R)&&(y=t),o=wn(o),y=vg({},y,H,S1);var K=vg({},y.imports,H.imports,S1),ne=Gr(K),de=Bt(K,ne);Or(ne,function(_t){if(Ds.test(_t))throw new wt(l)});var fe,xe,Ne=0,Pe=y.interpolate||cr,je="__p += '",rt=Di((y.escape||cr).source+"|"+Pe.source+"|"+(Pe===Wr?Er:cr).source+"|"+(y.evaluate||cr).source+"|$","g"),pt="//# sourceURL="+(bn.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ka+"]")+`
1453
+ `;o.replace(rt,function(_t,Jt,rn,no,$i,ro){return rn||(rn=no),je+=o.slice(Ne,ro).replace(zo,ae),Jt&&(fe=!0,je+=`' +
1454
+ __e(`+Jt+`) +
1455
+ '`),$i&&(xe=!0,je+=`';
1456
+ `+$i+`;
1457
+ __p += '`),rn&&(je+=`' +
1458
+ ((__t = (`+rn+`)) == null ? '' : __t) +
1459
+ '`),Ne=ro+_t.length,_t}),je+=`';
1460
+ `;var At=bn.call(y,"variable")&&y.variable;if(!At)je=`with (obj) {
1461
+ `+je+`
1462
+ }
1463
+ `;else if(Ds.test(At))throw new wt(v);je=(xe?je.replace(jr,""):je).replace(vr,"$1").replace(yr,"$1;"),je="function("+(At||"obj")+`) {
1464
+ `+(At?"":`obj || (obj = {});
1465
+ `)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(xe?`, __j = Array.prototype.join;
1466
+ function print() { __p += __j.call(arguments, '') }
1467
+ `:`;
1468
+ `)+je+`return __p
1469
+ }`;var jt=bC(function(){return Nt(ne,pt+"return "+je).apply(t,de)});if(jt.source=je,gg(jt))throw jt;return jt}function fj(o){return wn(o).toLowerCase()}function gj(o){return wn(o).toUpperCase()}function mj(o,y,R){if(o=wn(o),o&&(R||y===t))return Mt(o);if(!o||!(y=eo(y)))return o;var H=$t(o),K=$t(y),ne=xr(H,K),de=Nr(H,K)+1;return Hs(H,ne,de).join("")}function vj(o,y,R){if(o=wn(o),o&&(R||y===t))return o.slice(0,Ct(o)+1);if(!o||!(y=eo(y)))return o;var H=$t(o),K=Nr(H,$t(y))+1;return Hs(H,0,K).join("")}function yj(o,y,R){if(o=wn(o),o&&(R||y===t))return o.replace(nr,"");if(!o||!(y=eo(y)))return o;var H=$t(o),K=xr(H,$t(y));return Hs(H,K).join("")}function bj(o,y){var R=F,H=D;if(Qn(y)){var K="separator"in y?y.separator:K;R="length"in y?zt(y.length):R,H="omission"in y?eo(y.omission):H}o=wn(o);var ne=o.length;if(ge(o)){var de=$t(o);ne=de.length}if(R>=ne)return o;var fe=R-qt(H);if(fe<1)return H;var xe=de?Hs(de,0,fe).join(""):o.slice(0,fe);if(K===t)return xe+H;if(de&&(fe+=xe.length-fe),mg(K)){if(o.slice(fe).search(K)){var Ne,Pe=xe;for(K.global||(K=Di(K.source,wn(Ut.exec(K))+"g")),K.lastIndex=0;Ne=K.exec(Pe);)var je=Ne.index;xe=xe.slice(0,je===t?fe:je)}}else if(o.indexOf(eo(K),fe)!=fe){var rt=xe.lastIndexOf(K);rt>-1&&(xe=xe.slice(0,rt))}return xe+H}function wj(o){return o=wn(o),o&&hs.test(o)?o.replace(co,ft):o}var xj=kl(function(o,y,R){return o+(R?" ":"")+y.toUpperCase()}),wg=b1("toUpperCase");function yC(o,y,R){return o=wn(o),y=R?t:y,y===t?Ae(o)?Cr(o):X(o):o.match(y)||[]}var bC=Kt(function(o,y){try{return vn(o,t,y)}catch(R){return gg(R)?R:new wt(R)}}),Cj=Cs(function(o,y){return Or(y,function(R){R=Ko(R),is(o,R,pg(o[R],o))}),o});function _j(o){var y=o==null?0:o.length,R=kt();return o=y?E(o,function(H){if(typeof H[1]!="function")throw new Mn(g);return[R(H[0]),H[1]]}):[],Kt(function(H){for(var K=-1;++K<y;){var ne=o[K];if(vn(ne[0],this,H))return vn(ne[1],this,H)}})}function kj(o){return JD(Ao(o,u))}function xg(o){return function(){return o}}function Aj(o,y){return o==null||o!==o?y:o}var Sj=x1(),$j=x1(!0);function Fi(o){return o}function Cg(o){return Zx(typeof o=="function"?o:Ao(o,u))}function Tj(o){return Qx(Ao(o,u))}function Ej(o,y){return e1(o,Ao(y,u))}var Rj=Kt(function(o,y){return function(R){return Sc(R,o,y)}}),Ij=Kt(function(o,y){return function(R){return Sc(o,R,y)}});function _g(o,y,R){var H=Gr(y),K=ph(y,H);R==null&&!(Qn(y)&&(K.length||!H.length))&&(R=y,y=o,o=this,K=ph(y,Gr(y)));var ne=!(Qn(R)&&"chain"in R)||!!R.chain,de=ks(o);return Or(K,function(fe){var xe=y[fe];o[fe]=xe,de&&(o.prototype[fe]=function(){var Ne=this.__chain__;if(ne||Ne){var Pe=o(this.__wrapped__),je=Pe.__actions__=Pi(this.__actions__);return je.push({func:xe,args:arguments,thisArg:o}),Pe.__chain__=Ne,Pe}return xe.apply(o,A([this.value()],arguments))})}),o}function Mj(){return Vt._===this&&(Vt._=oD),this}function kg(){}function Lj(o){return o=zt(o),Kt(function(y){return t1(y,o)})}var Oj=eg(E),Nj=eg(rs),Dj=eg(W);function wC(o){return ag(o)?ze(Ko(o)):pP(o)}function Pj(o){return function(y){return o==null?t:Ra(o,y)}}var Bj=_1(),zj=_1(!0);function Ag(){return[]}function Sg(){return!1}function Fj(){return{}}function jj(){return""}function Wj(){return!0}function Hj(o,y){if(o=zt(o),o<1||o>G)return[];var R=le,H=fi(o,le);y=kt(y),o-=le;for(var K=ut(H,y);++R<o;)y(R);return K}function Uj(o){return Pt(o)?E(o,Ko):to(o)?[o]:Pi(z1(wn(o)))}function Vj(o){var y=++rD;return wn(o)+y}var qj=bh(function(o,y){return o+y},0),Gj=tg("ceil"),Kj=bh(function(o,y){return o/y},1),Yj=tg("floor");function Jj(o){return o&&o.length?dh(o,Fi,Ff):t}function Zj(o,y){return o&&o.length?dh(o,kt(y,2),Ff):t}function Xj(o){return _e(o,Fi)}function Qj(o,y){return _e(o,kt(y,2))}function e3(o){return o&&o.length?dh(o,Fi,Uf):t}function t3(o,y){return o&&o.length?dh(o,kt(y,2),Uf):t}var n3=bh(function(o,y){return o*y},1),r3=tg("round"),i3=bh(function(o,y){return o-y},0);function o3(o){return o&&o.length?st(o,Fi):0}function s3(o,y){return o&&o.length?st(o,kt(y,2)):0}return ee.after=Ez,ee.ary=J1,ee.assign=mF,ee.assignIn=uC,ee.assignInWith=hC,ee.assignWith=vg,ee.at=vF,ee.before=Z1,ee.bind=pg,ee.bindAll=Cj,ee.bindKey=X1,ee.castArray=jz,ee.chain=G1,ee.chunk=JP,ee.compact=ZP,ee.concat=XP,ee.cond=_j,ee.conforms=kj,ee.constant=xg,ee.countBy=sz,ee.create=yF,ee.curry=Q1,ee.curryRight=eC,ee.debounce=tC,ee.defaults=bF,ee.defaultsDeep=wF,ee.defer=Rz,ee.delay=Iz,ee.difference=QP,ee.differenceBy=eB,ee.differenceWith=tB,ee.drop=nB,ee.dropRight=rB,ee.dropRightWhile=iB,ee.dropWhile=oB,ee.fill=sB,ee.filter=lz,ee.flatMap=hz,ee.flatMapDeep=dz,ee.flatMapDepth=pz,ee.flatten=H1,ee.flattenDeep=aB,ee.flattenDepth=lB,ee.flip=Mz,ee.flow=Sj,ee.flowRight=$j,ee.fromPairs=cB,ee.functions=$F,ee.functionsIn=TF,ee.groupBy=fz,ee.initial=hB,ee.intersection=dB,ee.intersectionBy=pB,ee.intersectionWith=fB,ee.invert=RF,ee.invertBy=IF,ee.invokeMap=mz,ee.iteratee=Cg,ee.keyBy=vz,ee.keys=Gr,ee.keysIn=zi,ee.map=Sh,ee.mapKeys=LF,ee.mapValues=OF,ee.matches=Tj,ee.matchesProperty=Ej,ee.memoize=Th,ee.merge=NF,ee.mergeWith=dC,ee.method=Rj,ee.methodOf=Ij,ee.mixin=_g,ee.negate=Eh,ee.nthArg=Lj,ee.omit=DF,ee.omitBy=PF,ee.once=Lz,ee.orderBy=yz,ee.over=Oj,ee.overArgs=Oz,ee.overEvery=Nj,ee.overSome=Dj,ee.partial=fg,ee.partialRight=nC,ee.partition=bz,ee.pick=BF,ee.pickBy=pC,ee.property=wC,ee.propertyOf=Pj,ee.pull=yB,ee.pullAll=V1,ee.pullAllBy=bB,ee.pullAllWith=wB,ee.pullAt=xB,ee.range=Bj,ee.rangeRight=zj,ee.rearg=Nz,ee.reject=Cz,ee.remove=CB,ee.rest=Dz,ee.reverse=hg,ee.sampleSize=kz,ee.set=FF,ee.setWith=jF,ee.shuffle=Az,ee.slice=_B,ee.sortBy=Tz,ee.sortedUniq=RB,ee.sortedUniqBy=IB,ee.split=uj,ee.spread=Pz,ee.tail=MB,ee.take=LB,ee.takeRight=OB,ee.takeRightWhile=NB,ee.takeWhile=DB,ee.tap=ZB,ee.throttle=Bz,ee.thru=Ah,ee.toArray=aC,ee.toPairs=fC,ee.toPairsIn=gC,ee.toPath=Uj,ee.toPlainObject=cC,ee.transform=WF,ee.unary=zz,ee.union=PB,ee.unionBy=BB,ee.unionWith=zB,ee.uniq=FB,ee.uniqBy=jB,ee.uniqWith=WB,ee.unset=HF,ee.unzip=dg,ee.unzipWith=q1,ee.update=UF,ee.updateWith=VF,ee.values=$l,ee.valuesIn=qF,ee.without=HB,ee.words=yC,ee.wrap=Fz,ee.xor=UB,ee.xorBy=VB,ee.xorWith=qB,ee.zip=GB,ee.zipObject=KB,ee.zipObjectDeep=YB,ee.zipWith=JB,ee.entries=fC,ee.entriesIn=gC,ee.extend=uC,ee.extendWith=hC,_g(ee,ee),ee.add=qj,ee.attempt=bC,ee.camelCase=JF,ee.capitalize=mC,ee.ceil=Gj,ee.clamp=GF,ee.clone=Wz,ee.cloneDeep=Uz,ee.cloneDeepWith=Vz,ee.cloneWith=Hz,ee.conformsTo=qz,ee.deburr=vC,ee.defaultTo=Aj,ee.divide=Kj,ee.endsWith=ZF,ee.eq=Yo,ee.escape=XF,ee.escapeRegExp=QF,ee.every=az,ee.find=cz,ee.findIndex=j1,ee.findKey=xF,ee.findLast=uz,ee.findLastIndex=W1,ee.findLastKey=CF,ee.floor=Yj,ee.forEach=K1,ee.forEachRight=Y1,ee.forIn=_F,ee.forInRight=kF,ee.forOwn=AF,ee.forOwnRight=SF,ee.get=yg,ee.gt=Gz,ee.gte=Kz,ee.has=EF,ee.hasIn=bg,ee.head=U1,ee.identity=Fi,ee.includes=gz,ee.indexOf=uB,ee.inRange=KF,ee.invoke=MF,ee.isArguments=La,ee.isArray=Pt,ee.isArrayBuffer=Yz,ee.isArrayLike=Bi,ee.isArrayLikeObject=ur,ee.isBoolean=Jz,ee.isBuffer=Us,ee.isDate=Zz,ee.isElement=Xz,ee.isEmpty=Qz,ee.isEqual=eF,ee.isEqualWith=tF,ee.isError=gg,ee.isFinite=nF,ee.isFunction=ks,ee.isInteger=rC,ee.isLength=Rh,ee.isMap=iC,ee.isMatch=rF,ee.isMatchWith=iF,ee.isNaN=oF,ee.isNative=sF,ee.isNil=lF,ee.isNull=aF,ee.isNumber=oC,ee.isObject=Qn,ee.isObjectLike=sr,ee.isPlainObject=Mc,ee.isRegExp=mg,ee.isSafeInteger=cF,ee.isSet=sC,ee.isString=Ih,ee.isSymbol=to,ee.isTypedArray=Sl,ee.isUndefined=uF,ee.isWeakMap=hF,ee.isWeakSet=dF,ee.join=gB,ee.kebabCase=ej,ee.last=$o,ee.lastIndexOf=mB,ee.lowerCase=tj,ee.lowerFirst=nj,ee.lt=pF,ee.lte=fF,ee.max=Jj,ee.maxBy=Zj,ee.mean=Xj,ee.meanBy=Qj,ee.min=e3,ee.minBy=t3,ee.stubArray=Ag,ee.stubFalse=Sg,ee.stubObject=Fj,ee.stubString=jj,ee.stubTrue=Wj,ee.multiply=n3,ee.nth=vB,ee.noConflict=Mj,ee.noop=kg,ee.now=$h,ee.pad=rj,ee.padEnd=ij,ee.padStart=oj,ee.parseInt=sj,ee.random=YF,ee.reduce=wz,ee.reduceRight=xz,ee.repeat=aj,ee.replace=lj,ee.result=zF,ee.round=r3,ee.runInContext=ye,ee.sample=_z,ee.size=Sz,ee.snakeCase=cj,ee.some=$z,ee.sortedIndex=kB,ee.sortedIndexBy=AB,ee.sortedIndexOf=SB,ee.sortedLastIndex=$B,ee.sortedLastIndexBy=TB,ee.sortedLastIndexOf=EB,ee.startCase=hj,ee.startsWith=dj,ee.subtract=i3,ee.sum=o3,ee.sumBy=s3,ee.template=pj,ee.times=Hj,ee.toFinite=As,ee.toInteger=zt,ee.toLength=lC,ee.toLower=fj,ee.toNumber=To,ee.toSafeInteger=gF,ee.toString=wn,ee.toUpper=gj,ee.trim=mj,ee.trimEnd=vj,ee.trimStart=yj,ee.truncate=bj,ee.unescape=wj,ee.uniqueId=Vj,ee.upperCase=xj,ee.upperFirst=wg,ee.each=K1,ee.eachRight=Y1,ee.first=U1,_g(ee,(function(){var o={};return os(ee,function(y,R){bn.call(ee.prototype,R)||(o[R]=y)}),o})(),{chain:!1}),ee.VERSION=r,Or(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){ee[o].placeholder=ee}),Or(["drop","take"],function(o,y){en.prototype[o]=function(R){R=R===t?1:Dr(zt(R),0);var H=this.__filtered__&&!y?new en(this):this.clone();return H.__filtered__?H.__takeCount__=fi(R,H.__takeCount__):H.__views__.push({size:fi(R,le),type:o+(H.__dir__<0?"Right":"")}),H},en.prototype[o+"Right"]=function(R){return this.reverse()[o](R).reverse()}}),Or(["filter","map","takeWhile"],function(o,y){var R=y+1,H=R==k||R==j;en.prototype[o]=function(K){var ne=this.clone();return ne.__iteratees__.push({iteratee:kt(K,3),type:R}),ne.__filtered__=ne.__filtered__||H,ne}}),Or(["head","last"],function(o,y){var R="take"+(y?"Right":"");en.prototype[o]=function(){return this[R](1).value()[0]}}),Or(["initial","tail"],function(o,y){var R="drop"+(y?"":"Right");en.prototype[o]=function(){return this.__filtered__?new en(this):this[R](1)}}),en.prototype.compact=function(){return this.filter(Fi)},en.prototype.find=function(o){return this.filter(o).head()},en.prototype.findLast=function(o){return this.reverse().find(o)},en.prototype.invokeMap=Kt(function(o,y){return typeof o=="function"?new en(this):this.map(function(R){return Sc(R,o,y)})}),en.prototype.reject=function(o){return this.filter(Eh(kt(o)))},en.prototype.slice=function(o,y){o=zt(o);var R=this;return R.__filtered__&&(o>0||y<0)?new en(R):(o<0?R=R.takeRight(-o):o&&(R=R.drop(o)),y!==t&&(y=zt(y),R=y<0?R.dropRight(-y):R.take(y-o)),R)},en.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},en.prototype.toArray=function(){return this.take(le)},os(en.prototype,function(o,y){var R=/^(?:filter|find|map|reject)|While$/.test(y),H=/^(?:head|last)$/.test(y),K=ee[H?"take"+(y=="last"?"Right":""):y],ne=H||/^find/.test(y);K&&(ee.prototype[y]=function(){var de=this.__wrapped__,fe=H?[1]:arguments,xe=de instanceof en,Ne=fe[0],Pe=xe||Pt(de),je=function(Jt){var rn=K.apply(ee,A([Jt],fe));return H&&rt?rn[0]:rn};Pe&&R&&typeof Ne=="function"&&Ne.length!=1&&(xe=Pe=!1);var rt=this.__chain__,pt=!!this.__actions__.length,At=ne&&!rt,jt=xe&&!pt;if(!ne&&Pe){de=jt?de:new en(this);var _t=o.apply(de,fe);return _t.__actions__.push({func:Ah,args:[je],thisArg:t}),new ko(_t,rt)}return At&&jt?o.apply(this,fe):(_t=this.thru(je),At?H?_t.value()[0]:_t.value():_t)})}),Or(["pop","push","shift","sort","splice","unshift"],function(o){var y=_o[o],R=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",H=/^(?:pop|shift)$/.test(o);ee.prototype[o]=function(){var K=arguments;if(H&&!this.__chain__){var ne=this.value();return y.apply(Pt(ne)?ne:[],K)}return this[R](function(de){return y.apply(Pt(de)?de:[],K)})}}),os(en.prototype,function(o,y){var R=ee[y];if(R){var H=R.name+"";bn.call(xl,H)||(xl[H]=[]),xl[H].push({name:y,func:R})}}),xl[yh(t,x).name]=[{name:"wrapper",func:t}],en.prototype.clone=xD,en.prototype.reverse=CD,en.prototype.value=_D,ee.prototype.at=XB,ee.prototype.chain=QB,ee.prototype.commit=ez,ee.prototype.next=tz,ee.prototype.plant=rz,ee.prototype.reverse=iz,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=oz,ee.prototype.first=ee.prototype.head,bc&&(ee.prototype[bc]=nz),ee}),_n=yn();wr?((wr.exports=_n)._=_n,di._=_n):Vt._=_n}).call(Q_)})(Bc,Bc.exports)),Bc.exports}var tk=ek();ar("g",Pc(tk)).debounce(function(){this.rebuildDisplayText()},300);var Lm={exports:{}},Om;function nk(){return Om||(Om=1,(function(e,n){(function(){ace.require(["ace/mode/text"],function(t){e&&(e.exports=t)})})()})(Lm)),Lm.exports}nk();const rk=!0,kr="u-",ik="uplot",ok=kr+"hz",sk=kr+"vt",ak=kr+"title",lk=kr+"wrap",ck=kr+"under",uk=kr+"over",hk=kr+"axis",Xs=kr+"off",dk=kr+"select",pk=kr+"cursor-x",fk=kr+"cursor-y",gk=kr+"cursor-pt",mk=kr+"legend",vk=kr+"live",yk=kr+"inline",bk=kr+"series",wk=kr+"marker",Nm=kr+"label",xk=kr+"value",Nl="width",Dl="height",Pl="top",Dm="bottom",ja="left",Wh="right",Hh="#000",Pm=Hh+"0",Uh="mousemove",Bm="mousedown",Vh="mouseup",zm="mouseenter",Fm="mouseleave",jm="dblclick",Ck="resize",_k="scroll",Wm="change",zc="dppxchange",qh="--",Wa=typeof window<"u",Gh=Wa?document:null,Ha=Wa?window:null,kk=Wa?navigator:null;let pn,Fc;function Kh(){let e=devicePixelRatio;pn!=e&&(pn=e,Fc&&Zh(Wm,Fc,Kh),Fc=matchMedia(`(min-resolution: ${pn-.001}dppx) and (max-resolution: ${pn+.001}dppx)`),Qs(Wm,Fc,Kh),Ha.dispatchEvent(new CustomEvent(zc)))}function Hi(e,n){if(n!=null){let t=e.classList;!t.contains(n)&&t.add(n)}}function Yh(e,n){let t=e.classList;t.contains(n)&&t.remove(n)}function Ln(e,n,t){e.style[n]=t+"px"}function Ro(e,n,t,r){let h=Gh.createElement(e);return n!=null&&Hi(h,n),t?.insertBefore(h,r),h}function io(e,n){return Ro("div",e,n)}const Hm=new WeakMap;function Xo(e,n,t,r,h){let d="translate("+n+"px,"+t+"px)",g=Hm.get(e);d!=g&&(e.style.transform=d,Hm.set(e,d),n<0||t<0||n>r||t>h?Hi(e,Xs):Yh(e,Xs))}const Um=new WeakMap;function Vm(e,n,t){let r=n+t,h=Um.get(e);r!=h&&(Um.set(e,r),e.style.background=n,e.style.borderColor=t)}const qm=new WeakMap;function Gm(e,n,t,r){let h=n+""+t,d=qm.get(e);h!=d&&(qm.set(e,h),e.style.height=t+"px",e.style.width=n+"px",e.style.marginLeft=r?-n/2+"px":0,e.style.marginTop=r?-t/2+"px":0)}const Jh={passive:!0},Ak={...Jh,capture:!0};function Qs(e,n,t,r){n.addEventListener(e,t,r?Ak:Jh)}function Zh(e,n,t,r){n.removeEventListener(e,t,Jh)}Wa&&Kh();function Io(e,n,t,r){let h;t=t||0,r=r||n.length-1;let d=r<=2147483647;for(;r-t>1;)h=d?t+r>>1:Vi((t+r)/2),n[h]<e?t=h:r=h;return e-n[t]<=n[r]-e?t:r}function Km(e){return(n,t,r)=>{let h=-1,d=-1;for(let g=t;g<=r;g++)if(e(n[g])){h=g;break}for(let g=r;g>=t;g--)if(e(n[g])){d=g;break}return[h,d]}}const Ym=e=>e!=null,Jm=e=>e!=null&&e>0,jc=Km(Ym),Sk=Km(Jm);function $k(e,n,t,r=0,h=!1){let d=h?Sk:jc,g=h?Jm:Ym;[n,t]=d(e,n,t);let v=e[n],l=e[n];if(n>-1)if(r==1)v=e[n],l=e[t];else if(r==-1)v=e[t],l=e[n];else for(let f=n;f<=t;f++){let s=e[f];g(s)&&(s<v?v=s:s>l&&(l=s))}return[v??Sn,l??-Sn]}function Wc(e,n,t,r){let h=Qm(e),d=Qm(n);e==n&&(h==-1?(e*=t,n/=t):(e/=t,n*=t));let g=t==10?ls:ev,v=h==1?Vi:oo,l=d==1?oo:Vi,f=v(g(Ar(e))),s=l(g(Ar(n))),a=Ua(t,f),u=Ua(t,s);return t==10&&(f<0&&(a=$n(a,-f)),s<0&&(u=$n(u,-s))),r||t==2?(e=a*h,n=u*d):(e=av(e,a),n=Vc(n,u)),[e,n]}function Xh(e,n,t,r){let h=Wc(e,n,t,r);return e==0&&(h[0]=0),n==0&&(h[1]=0),h}const Qh=.1,Zm={mode:3,pad:Qh},Bl={pad:0,soft:null,mode:0},Tk={min:Bl,max:Bl};function Hc(e,n,t,r){return qc(t)?Xm(e,n,t):(Bl.pad=t,Bl.soft=r?0:null,Bl.mode=r?3:0,Xm(e,n,Tk))}function un(e,n){return e??n}function Ek(e,n,t){for(n=un(n,0),t=un(t,e.length-1);n<=t;){if(e[n]!=null)return!0;n++}return!1}function Xm(e,n,t){let r=t.min,h=t.max,d=un(r.pad,0),g=un(h.pad,0),v=un(r.hard,-Sn),l=un(h.hard,Sn),f=un(r.soft,Sn),s=un(h.soft,-Sn),a=un(r.mode,0),u=un(h.mode,0),p=n-e,i=ls(p),c=yi(Ar(e),Ar(n)),m=ls(c),b=Ar(m-i);(p<1e-24||b>10)&&(p=0,(e==0||n==0)&&(p=1e-24,a==2&&f!=Sn&&(d=0),u==2&&s!=-Sn&&(g=0)));let x=p||c||1e3,I=ls(x),$=Ua(10,Vi(I)),_=x*(p==0?e==0?.1:1:d),C=$n(av(e-_,$/10),24),O=e>=f&&(a==1||a==3&&C<=f||a==2&&C>=f)?f:Sn,P=yi(v,C<O&&e>=O?O:Mo(O,C)),L=x*(p==0?n==0?.1:1:g),T=$n(Vc(n+L,$/10),24),F=n<=s&&(u==1||u==3&&T>=s||u==2&&T<=s)?s:-Sn,D=Mo(l,T>F&&n<=F?F:yi(F,T));return P==D&&P==0&&(D=100),[P,D]}const Rk=new Intl.NumberFormat(Wa?kk.language:"en-US"),ed=e=>Rk.format(e),Ui=Math,Uc=Ui.PI,Ar=Ui.abs,Vi=Ui.floor,Sr=Ui.round,oo=Ui.ceil,Mo=Ui.min,yi=Ui.max,Ua=Ui.pow,Qm=Ui.sign,ls=Ui.log10,ev=Ui.log2,Ik=(e,n=1)=>Ui.sinh(e)*n,td=(e,n=1)=>Ui.asinh(e/n),Sn=1/0;function tv(e){return(ls((e^e>>31)-(e>>31))|0)+1}function nd(e,n,t){return Mo(yi(e,n),t)}function nv(e){return typeof e=="function"}function Xt(e){return nv(e)?e:()=>e}const Mk=()=>{},rv=e=>e,iv=(e,n)=>n,Lk=e=>null,ov=e=>!0,sv=(e,n)=>e==n,Ok=/\.\d*?(?=9{6,}|0{6,})/gm,ea=e=>{if(cv(e)||Is.has(e))return e;const n=`${e}`,t=n.match(Ok);if(t==null)return e;let r=t[0].length-1;if(n.indexOf("e-")!=-1){let[h,d]=n.split("e");return+`${ea(h)}e${d}`}return $n(e,r)};function ta(e,n){return ea($n(ea(e/n))*n)}function Vc(e,n){return ea(oo(ea(e/n))*n)}function av(e,n){return ea(Vi(ea(e/n))*n)}function $n(e,n=0){if(cv(e))return e;let t=10**n,r=e*t*(1+Number.EPSILON);return Sr(r)/t}const Is=new Map;function lv(e){return((""+e).split(".")[1]||"").length}function zl(e,n,t,r){let h=[],d=r.map(lv);for(let g=n;g<t;g++){let v=Ar(g),l=$n(Ua(e,g),v);for(let f=0;f<r.length;f++){let s=e==10?+`${r[f]}e${g}`:r[f]*l,a=(g>=0?0:v)+(g>=d[f]?0:d[f]),u=e==10?s:$n(s,a);h.push(u),Is.set(u,a)}}return h}const Fl={},rd=[],Va=[null,null],Ms=Array.isArray,cv=Number.isInteger,Nk=e=>e===void 0;function uv(e){return typeof e=="string"}function qc(e){let n=!1;if(e!=null){let t=e.constructor;n=t==null||t==Object}return n}function Dk(e){return e!=null&&typeof e=="object"}const Pk=Object.getPrototypeOf(Uint8Array),hv="__proto__";function qa(e,n=qc){let t;if(Ms(e)){let r=e.find(h=>h!=null);if(Ms(r)||n(r)){t=Array(e.length);for(let h=0;h<e.length;h++)t[h]=qa(e[h],n)}else t=e.slice()}else if(e instanceof Pk)t=e.slice();else if(n(e)){t={};for(let r in e)r!=hv&&(t[r]=qa(e[r],n))}else t=e;return t}function pr(e){let n=arguments;for(let t=1;t<n.length;t++){let r=n[t];for(let h in r)h!=hv&&(qc(e[h])?pr(e[h],qa(r[h])):e[h]=qa(r[h]))}return e}const Bk=0,zk=1,Fk=2;function jk(e,n,t){for(let r=0,h,d=-1;r<n.length;r++){let g=n[r];if(g>d){for(h=g-1;h>=0&&e[h]==null;)e[h--]=null;for(h=g+1;h<t&&e[h]==null;)e[d=h++]=null}}}function Wk(e,n){if(Vk(e)){let g=e[0].slice();for(let v=1;v<e.length;v++)g.push(...e[v].slice(1));return qk(g[0])||(g=Uk(g)),g}let t=new Set;for(let g=0;g<e.length;g++){let v=e[g][0],l=v.length;for(let f=0;f<l;f++)t.add(v[f])}let r=[Array.from(t).sort((g,v)=>g-v)],h=r[0].length,d=new Map;for(let g=0;g<h;g++)d.set(r[0][g],g);for(let g=0;g<e.length;g++){let v=e[g],l=v[0];for(let f=1;f<v.length;f++){let s=v[f],a=Array(h).fill(void 0),u=n?n[g][f]:zk,p=[];for(let i=0;i<s.length;i++){let c=s[i],m=d.get(l[i]);c===null?u!=Bk&&(a[m]=c,u==Fk&&p.push(m)):a[m]=c}jk(a,p,h),r.push(a)}}return r}const Hk=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function Uk(e){let n=e[0],t=n.length,r=Array(t);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,g)=>n[d]-n[g]);let h=[];for(let d=0;d<e.length;d++){let g=e[d],v=Array(t);for(let l=0;l<t;l++)v[l]=g[r[l]];h.push(v)}return h}function Vk(e){let n=e[0][0],t=n.length;for(let r=1;r<e.length;r++){let h=e[r][0];if(h.length!=t)return!1;if(h!=n){for(let d=0;d<t;d++)if(h[d]!=n[d])return!1}}return!0}function qk(e,n=100){const t=e.length;if(t<=1)return!0;let r=0,h=t-1;for(;r<=h&&e[r]==null;)r++;for(;h>=r&&e[h]==null;)h--;if(h<=r)return!0;const d=yi(1,Vi((h-r+1)/n));for(let g=e[r],v=r+d;v<=h;v+=d){const l=e[v];if(l!=null){if(l<=g)return!1;g=l}}return!0}const dv=["January","February","March","April","May","June","July","August","September","October","November","December"],pv=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function fv(e){return e.slice(0,3)}const Gk=pv.map(fv),Kk=dv.map(fv),Yk={MMMM:dv,MMM:Kk,WWWW:pv,WWW:Gk};function jl(e){return(e<10?"0":"")+e}function Jk(e){return(e<10?"00":e<100?"0":"")+e}const Zk={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,n)=>n.MMMM[e.getMonth()],MMM:(e,n)=>n.MMM[e.getMonth()],MM:e=>jl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>jl(e.getDate()),D:e=>e.getDate(),WWWW:(e,n)=>n.WWWW[e.getDay()],WWW:(e,n)=>n.WWW[e.getDay()],HH:e=>jl(e.getHours()),H:e=>e.getHours(),h:e=>{let n=e.getHours();return n==0?12:n>12?n-12:n},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>jl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>jl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>Jk(e.getMilliseconds())};function id(e,n){n=n||Yk;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,h;for(;h=r.exec(e);)t.push(h[0][0]=="{"?Zk[h[1]]:h[0]);return d=>{let g="";for(let v=0;v<t.length;v++)g+=typeof t[v]=="string"?t[v]:t[v](d,n);return g}}const Xk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Qk(e,n){let t;return n=="UTC"||n=="Etc/UTC"?t=new Date(+e+e.getTimezoneOffset()*6e4):n==Xk?t=e:(t=new Date(e.toLocaleString("en-US",{timeZone:n})),t.setMilliseconds(e.getMilliseconds())),t}const gv=e=>e%1==0,Gc=[1,2,2.5,5],eA=zl(10,-32,0,Gc),mv=zl(10,0,32,Gc),tA=mv.filter(gv),na=eA.concat(mv),od=`
1470
+ `,vv="{YYYY}",yv=od+vv,bv="{M}/{D}",Wl=od+bv,Kc=Wl+"/{YY}",wv="{aa}",nA="{h}:{mm}",Ga=nA+wv,xv=od+Ga,Cv=":{ss}",gn=null;function _v(e){let n=e*1e3,t=n*60,r=t*60,h=r*24,d=h*30,g=h*365,v=(e==1?zl(10,0,3,Gc).filter(gv):zl(10,-3,0,Gc)).concat([n,n*5,n*10,n*15,n*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,h,h*2,h*3,h*4,h*5,h*6,h*7,h*8,h*9,h*10,h*15,d,d*2,d*3,d*4,d*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const l=[[g,vv,gn,gn,gn,gn,gn,gn,1],[h*28,"{MMM}",yv,gn,gn,gn,gn,gn,1],[h,bv,yv,gn,gn,gn,gn,gn,1],[r,"{h}"+wv,Kc,gn,Wl,gn,gn,gn,1],[t,Ga,Kc,gn,Wl,gn,gn,gn,1],[n,Cv,Kc+" "+Ga,gn,Wl+" "+Ga,gn,xv,gn,1],[e,Cv+".{fff}",Kc+" "+Ga,gn,Wl+" "+Ga,gn,xv,gn,1]];function f(s){return(a,u,p,i,c,m)=>{let b=[],x=c>=g,I=c>=d&&c<g,$=s(p),_=$n($*e,3),C=sd($.getFullYear(),x?0:$.getMonth(),I||x?1:$.getDate()),O=$n(C*e,3);if(I||x){let P=I?c/d:0,L=x?c/g:0,T=_==O?_:$n(sd(C.getFullYear()+L,C.getMonth()+P,1)*e,3),F=new Date(Sr(T/e)),D=F.getFullYear(),M=F.getMonth();for(let S=0;T<=i;S++){let k=sd(D+L*S,M+P*S,1),N=k-s($n(k*e,3));T=$n((+k+N)*e,3),T<=i&&b.push(T)}}else{let P=c>=h?h:c,L=Vi(p)-Vi(_),T=O+L+Vc(_-O,P);b.push(T);let F=s(T),D=F.getHours()+F.getMinutes()/t+F.getSeconds()/r,M=c/r,S=a.axes[u]._space,k=m/S;for(;T=$n(T+c,e==1?0:3),!(T>i);)if(M>1){let N=Vi($n(D+M,6))%24,j=s(T).getHours()-N;j>1&&(j=-1),T-=j*r,D=(D+M)%24;let U=b[b.length-1];$n((T-U)/c,3)*k>=.7&&b.push(T)}else b.push(T)}return b}}return[v,l,f]}const[rA,iA,oA]=_v(1),[sA,aA,lA]=_v(.001);zl(2,-53,53,[1]);function kv(e,n){return e.map(t=>t.map((r,h)=>h==0||h==8||r==null?r:n(h==1||t[8]==0?r:t[1]+r)))}function Av(e,n){return(t,r,h,d,g)=>{let v=n.find(i=>g>=i[0])||n[n.length-1],l,f,s,a,u,p;return r.map(i=>{let c=e(i),m=c.getFullYear(),b=c.getMonth(),x=c.getDate(),I=c.getHours(),$=c.getMinutes(),_=c.getSeconds(),C=m!=l&&v[2]||b!=f&&v[3]||x!=s&&v[4]||I!=a&&v[5]||$!=u&&v[6]||_!=p&&v[7]||v[1];return l=m,f=b,s=x,a=I,u=$,p=_,C(c)})}}function cA(e,n){let t=id(n);return(r,h,d,g,v)=>h.map(l=>t(e(l)))}function sd(e,n,t){return new Date(e,n,t)}function Sv(e,n){return n(e)}const uA="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function $v(e,n){return(t,r,h,d)=>d==null?qh:n(e(r))}function hA(e,n){let t=e.series[n];return t.width?t.stroke(e,n):t.points.width?t.points.stroke(e,n):null}function dA(e,n){return e.series[n].fill(e,n)}const pA={show:!0,live:!0,isolate:!1,mount:Mk,markers:{show:!0,width:2,stroke:hA,fill:dA,dash:"solid"},idx:null,idxs:null,values:[]};function fA(e,n){let t=e.cursor.points,r=io(),h=t.size(e,n);Ln(r,Nl,h),Ln(r,Dl,h);let d=h/-2;Ln(r,"marginLeft",d),Ln(r,"marginTop",d);let g=t.width(e,n,h);return g&&Ln(r,"borderWidth",g),r}function gA(e,n){let t=e.series[n].points;return t._fill||t._stroke}function mA(e,n){let t=e.series[n].points;return t._stroke||t._fill}function vA(e,n){return e.series[n].points.size}const ad=[0,0];function yA(e,n,t){return ad[0]=n,ad[1]=t,ad}function Yc(e,n,t,r=!0){return h=>{h.button==0&&(!r||h.target==n)&&t(h)}}function ld(e,n,t,r=!0){return h=>{(!r||h.target==n)&&t(h)}}const bA={show:!0,x:!0,y:!0,lock:!1,move:yA,points:{one:!1,show:fA,size:vA,width:0,stroke:mA,fill:gA},bind:{mousedown:Yc,mouseup:Yc,click:Yc,dblclick:Yc,mousemove:ld,mouseleave:ld,mouseenter:ld},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,n,t,r,h)=>r-h,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Tv={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},cd=pr({},Tv,{filter:iv}),Ev=pr({},cd,{size:10}),Rv=pr({},Tv,{show:!1}),ud='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"',Iv="bold "+ud,Mv=1.5,Lv={show:!0,scale:"x",stroke:Hh,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Iv,side:2,grid:cd,ticks:Ev,border:Rv,font:ud,lineGap:Mv,rotate:0},wA="Value",xA="Time",Ov={show:!0,scale:"x",auto:!1,sorted:1,min:Sn,max:-Sn,idxs:[]};function CA(e,n,t,r,h){return n.map(d=>d==null?"":ed(d))}function _A(e,n,t,r,h,d,g){let v=[],l=Is.get(h)||0;t=g?t:$n(Vc(t,h),l);for(let f=t;f<=r;f=$n(f+h,l))v.push(Object.is(f,-0)?0:f);return v}function hd(e,n,t,r,h,d,g){const v=[],l=e.scales[e.axes[n].scale].log,f=l==10?ls:ev,s=Vi(f(t));h=Ua(l,s),l==10&&(h=na[Io(h,na)]);let a=t,u=h*l;l==10&&(u=na[Io(u,na)]);do v.push(a),a=a+h,l==10&&!Is.has(a)&&(a=$n(a,Is.get(h))),a>=u&&(h=a,u=h*l,l==10&&(u=na[Io(u,na)]));while(a<=r);return v}function kA(e,n,t,r,h,d,g){let v=e.scales[e.axes[n].scale].asinh,l=r>v?hd(e,n,yi(v,t),r,h):[v],f=r>=0&&t<=0?[0]:[];return(t<-v?hd(e,n,yi(v,-r),-t,h):[v]).reverse().map(s=>-s).concat(f,l)}const Nv=/./,AA=/[12357]/,SA=/[125]/,Dv=/1/,dd=(e,n,t,r)=>e.map((h,d)=>n==4&&h==0||d%r==0&&t.test(h.toExponential()[h<0?1:0])?h:null);function $A(e,n,t,r,h){let d=e.axes[t],g=d.scale,v=e.scales[g],l=e.valToPos,f=d._space,s=l(10,g),a=l(9,g)-s>=f?Nv:l(7,g)-s>=f?AA:l(5,g)-s>=f?SA:Dv;if(a==Dv){let u=Ar(l(1,g)-s);if(u<f)return dd(n.slice().reverse(),v.distr,a,oo(f/u)).reverse()}return dd(n,v.distr,a,1)}function TA(e,n,t,r,h){let d=e.axes[t],g=d.scale,v=d._space,l=e.valToPos,f=Ar(l(1,g)-l(2,g));return f<v?dd(n.slice().reverse(),3,Nv,oo(v/f)).reverse():n}function EA(e,n,t,r){return r==null?qh:n==null?"":ed(n)}const Pv={show:!0,scale:"y",stroke:Hh,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Iv,side:3,grid:cd,ticks:Ev,border:Rv,font:ud,lineGap:Mv,rotate:0};function RA(e,n){let t=3+(e||1)*2;return $n(t*n,3)}function IA(e,n){let{scale:t,idxs:r}=e.series[0],h=e._data[0],d=e.valToPos(h[r[0]],t,!0),g=e.valToPos(h[r[1]],t,!0),v=Ar(g-d),l=e.series[n],f=v/(l.points.space*pn);return r[1]-r[0]<=f}const Bv={scale:null,auto:!0,sorted:0,min:Sn,max:-Sn},zv=(e,n,t,r,h)=>h,Fv={show:!0,auto:!0,sorted:0,gaps:zv,alpha:1,facets:[pr({},Bv,{scale:"x"}),pr({},Bv,{scale:"y"})]},jv={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:zv,alpha:1,points:{show:IA,filter:null},values:null,min:Sn,max:-Sn,idxs:[],path:null,clip:null};function MA(e,n,t,r,h){return t/10}const Wv={time:rk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},LA=pr({},Wv,{time:!1,ori:1}),Hv={};function Uv(e,n){let t=Hv[e];return t||(t={key:e,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(h=>h!=r)},pub(r,h,d,g,v,l,f){for(let s=0;s<t.plots.length;s++)t.plots[s]!=h&&t.plots[s].pub(r,h,d,g,v,l,f)}},e!=null&&(Hv[e]=t)),t}const Ka=1,pd=2;function ra(e,n,t){const r=e.mode,h=e.series[n],d=r==2?e._data[n]:e._data,g=e.scales,v=e.bbox;let l=d[0],f=r==2?d[1]:d[n],s=r==2?g[h.facets[0].scale]:g[e.series[0].scale],a=r==2?g[h.facets[1].scale]:g[h.scale],u=v.left,p=v.top,i=v.width,c=v.height,m=e.valToPosH,b=e.valToPosV;return s.ori==0?t(h,l,f,s,a,m,b,u,p,i,c,Zc,Ya,Qc,Gv,Yv):t(h,l,f,s,a,b,m,p,u,c,i,Xc,Ja,md,Kv,Jv)}function fd(e,n){let t=0,r=0,h=un(e.bands,rd);for(let d=0;d<h.length;d++){let g=h[d];g.series[0]==n?t=g.dir:g.series[1]==n&&(g.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function OA(e,n,t,r,h){let d=e.mode,g=e.series[n],v=d==2?g.facets[1].scale:g.scale,l=e.scales[v];return h==-1?l.min:h==1?l.max:l.distr==3?l.dir==1?l.min:l.max:0}function cs(e,n,t,r,h,d){return ra(e,n,(g,v,l,f,s,a,u,p,i,c,m)=>{let b=g.pxRound;const x=f.dir*(f.ori==0?1:-1),I=f.ori==0?Ya:Ja;let $,_;x==1?($=t,_=r):($=r,_=t);let C=b(a(v[$],f,c,p)),O=b(u(l[$],s,m,i)),P=b(a(v[_],f,c,p)),L=b(u(d==1?s.max:s.min,s,m,i)),T=new Path2D(h);return I(T,P,L),I(T,C,L),I(T,C,O),T})}function Jc(e,n,t,r,h,d){let g=null;if(e.length>0){g=new Path2D;const v=n==0?Qc:md;let l=t;for(let a=0;a<e.length;a++){let u=e[a];if(u[1]>u[0]){let p=u[0]-l;p>0&&v(g,l,r,p,r+d),l=u[1]}}let f=t+h-l,s=10;f>0&&v(g,l,r-s/2,f,r+d+s)}return g}function NA(e,n,t){let r=e[e.length-1];r&&r[0]==n?r[1]=t:e.push([n,t])}function gd(e,n,t,r,h,d,g){let v=[],l=e.length;for(let f=h==1?t:r;f>=t&&f<=r;f+=h)if(n[f]===null){let s=f,a=f;if(h==1)for(;++f<=r&&n[f]===null;)a=f;else for(;--f>=t&&n[f]===null;)a=f;let u=d(e[s]),p=a==s?u:d(e[a]),i=s-h;u=g<=0&&i>=0&&i<l?d(e[i]):u;let c=a+h;p=g>=0&&c>=0&&c<l?d(e[c]):p,p>=u&&v.push([u,p])}return v}function Vv(e){return e==0?rv:e==1?Sr:n=>ta(n,e)}function qv(e){let n=e==0?Zc:Xc,t=e==0?(h,d,g,v,l,f)=>{h.arcTo(d,g,v,l,f)}:(h,d,g,v,l,f)=>{h.arcTo(g,d,l,v,f)},r=e==0?(h,d,g,v,l)=>{h.rect(d,g,v,l)}:(h,d,g,v,l)=>{h.rect(g,d,l,v)};return(h,d,g,v,l,f=0,s=0)=>{f==0&&s==0?r(h,d,g,v,l):(f=Mo(f,v/2,l/2),s=Mo(s,v/2,l/2),n(h,d+f,g),t(h,d+v,g,d+v,g+l,f),t(h,d+v,g+l,d,g+l,s),t(h,d,g+l,d,g,s),t(h,d,g,d+v,g,f),h.closePath())}}const Zc=(e,n,t)=>{e.moveTo(n,t)},Xc=(e,n,t)=>{e.moveTo(t,n)},Ya=(e,n,t)=>{e.lineTo(n,t)},Ja=(e,n,t)=>{e.lineTo(t,n)},Qc=qv(0),md=qv(1),Gv=(e,n,t,r,h,d)=>{e.arc(n,t,r,h,d)},Kv=(e,n,t,r,h,d)=>{e.arc(t,n,r,h,d)},Yv=(e,n,t,r,h,d,g)=>{e.bezierCurveTo(n,t,r,h,d,g)},Jv=(e,n,t,r,h,d,g)=>{e.bezierCurveTo(t,n,h,r,g,d)};function Zv(e){return(n,t,r,h,d)=>ra(n,t,(g,v,l,f,s,a,u,p,i,c,m)=>{let{pxRound:b,points:x}=g,I,$;f.ori==0?(I=Zc,$=Gv):(I=Xc,$=Kv);const _=$n(x.width*pn,3);let C=(x.size-x.width)/2*pn,O=$n(C*2,3),P=new Path2D,L=new Path2D,{left:T,top:F,width:D,height:M}=n.bbox;Qc(L,T-O,F-O,D+O*2,M+O*2);const S=k=>{if(l[k]!=null){let N=b(a(v[k],f,c,p)),j=b(u(l[k],s,m,i));I(P,N+C,j),$(P,N,j,C,0,Uc*2)}};if(d)d.forEach(S);else for(let k=r;k<=h;k++)S(k);return{stroke:_>0?P:null,fill:P,clip:L,flags:Ka|pd}})}function Xv(e){return(n,t,r,h,d,g)=>{r!=h&&(d!=r&&g!=r&&e(n,t,r),d!=h&&g!=h&&e(n,t,h),e(n,t,g))}}const DA=Xv(Ya),PA=Xv(Ja);function Qv(e){const n=un(e?.alignGaps,0);return(t,r,h,d)=>ra(t,r,(g,v,l,f,s,a,u,p,i,c,m)=>{[h,d]=jc(l,h,d);let b=g.pxRound,x=D=>b(a(D,f,c,p)),I=D=>b(u(D,s,m,i)),$,_;f.ori==0?($=Ya,_=DA):($=Ja,_=PA);const C=f.dir*(f.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ka},P=O.stroke;let L=!1;if(d-h>=c*4){let D=le=>t.posToVal(le,f.key,!0),M=null,S=null,k,N,j,U=x(v[C==1?h:d]),G=x(v[h]),J=x(v[d]),Q=D(C==1?G+1:J-1);for(let le=C==1?h:d;le>=h&&le<=d;le+=C){let ie=v[le],ue=(C==1?ie<Q:ie>Q)?U:x(ie),pe=l[le];ue==U?pe!=null?(N=pe,M==null?($(P,ue,I(N)),k=M=S=N):N<M?M=N:N>S&&(S=N)):pe===null&&(L=!0):(M!=null&&_(P,U,I(M),I(S),I(k),I(N)),pe!=null?(N=pe,$(P,ue,I(N)),M=S=k=N):(M=S=null,pe===null&&(L=!0)),U=ue,Q=D(U+C))}M!=null&&M!=S&&j!=U&&_(P,U,I(M),I(S),I(k),I(N))}else for(let D=C==1?h:d;D>=h&&D<=d;D+=C){let M=l[D];M===null?L=!0:M!=null&&$(P,x(v[D]),I(M))}let[T,F]=fd(t,r);if(g.fill!=null||T!=0){let D=O.fill=new Path2D(P),M=g.fillTo(t,r,g.min,g.max,T),S=I(M),k=x(v[h]),N=x(v[d]);C==-1&&([N,k]=[k,N]),$(D,N,S),$(D,k,S)}if(!g.spanGaps){let D=[];L&&D.push(...gd(v,l,h,d,C,x,n)),O.gaps=D=g.gaps(t,r,h,d,D),O.clip=Jc(D,f.ori,p,i,c,m)}return F!=0&&(O.band=F==2?[cs(t,r,h,d,P,-1),cs(t,r,h,d,P,1)]:cs(t,r,h,d,P,F)),O})}function BA(e){const n=un(e.align,1),t=un(e.ascDesc,!1),r=un(e.alignGaps,0),h=un(e.extend,!1);return(d,g,v,l)=>ra(d,g,(f,s,a,u,p,i,c,m,b,x,I)=>{[v,l]=jc(a,v,l);let $=f.pxRound,{left:_,width:C}=d.bbox,O=J=>$(i(J,u,x,m)),P=J=>$(c(J,p,I,b)),L=u.ori==0?Ya:Ja;const T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ka},F=T.stroke,D=u.dir*(u.ori==0?1:-1);let M=P(a[D==1?v:l]),S=O(s[D==1?v:l]),k=S,N=S;h&&n==-1&&(N=_,L(F,N,M)),L(F,S,M);for(let J=D==1?v:l;J>=v&&J<=l;J+=D){let Q=a[J];if(Q==null)continue;let le=O(s[J]),ie=P(Q);n==1?L(F,le,M):L(F,k,ie),L(F,le,ie),M=ie,k=le}let j=k;h&&n==1&&(j=_+C,L(F,j,M));let[U,G]=fd(d,g);if(f.fill!=null||U!=0){let J=T.fill=new Path2D(F),Q=f.fillTo(d,g,f.min,f.max,U),le=P(Q);L(J,j,le),L(J,N,le)}if(!f.spanGaps){let J=[];J.push(...gd(s,a,v,l,D,O,r));let Q=f.width*pn/2,le=t||n==1?Q:-Q,ie=t||n==-1?-Q:Q;J.forEach(ue=>{ue[0]+=le,ue[1]+=ie}),T.gaps=J=f.gaps(d,g,v,l,J),T.clip=Jc(J,u.ori,m,b,x,I)}return G!=0&&(T.band=G==2?[cs(d,g,v,l,F,-1),cs(d,g,v,l,F,1)]:cs(d,g,v,l,F,G)),T})}function ey(e,n,t,r,h,d,g=Sn){if(e.length>1){let v=null;for(let l=0,f=1/0;l<e.length;l++)if(n[l]!==void 0){if(v!=null){let s=Ar(e[l]-e[v]);s<f&&(f=s,g=Ar(t(e[l],r,h,d)-t(e[v],r,h,d)))}v=l}}return g}function zA(e){e=e||Fl;const n=un(e.size,[.6,Sn,1]),t=e.align||0,r=e.gap||0;let h=e.radius;h=h==null?[0,0]:typeof h=="number"?[h,0]:h;const d=Xt(h),g=1-n[0],v=un(n[1],Sn),l=un(n[2],1),f=un(e.disp,Fl),s=un(e.each,p=>{}),{fill:a,stroke:u}=f;return(p,i,c,m)=>ra(p,i,(b,x,I,$,_,C,O,P,L,T,F)=>{let D=b.pxRound,M=t,S=r*pn,k=v*pn,N=l*pn,j,U;$.ori==0?[j,U]=d(p,i):[U,j]=d(p,i);const G=$.dir*($.ori==0?1:-1);let J=$.ori==0?Qc:md,Q=$.ori==0?s:(Je,Dt,On,Bn,Gn,mr,mn)=>{s(Je,Dt,On,Gn,Bn,mn,mr)},le=un(p.bands,rd).find(Je=>Je.series[0]==i),ie=le!=null?le.dir:0,ue=b.fillTo(p,i,b.min,b.max,ie),pe=D(O(ue,_,F,L)),oe,re,Ce,ke=T,Ee=D(b.width*pn),Ve=!1,Me=null,ot=null,Ge=null,Ze=null;a!=null&&(Ee==0||u!=null)&&(Ve=!0,Me=a.values(p,i,c,m),ot=new Map,new Set(Me).forEach(Je=>{Je!=null&&ot.set(Je,new Path2D)}),Ee>0&&(Ge=u.values(p,i,c,m),Ze=new Map,new Set(Ge).forEach(Je=>{Je!=null&&Ze.set(Je,new Path2D)})));let{x0:Ie,size:Tt}=f;if(Ie!=null&&Tt!=null){M=1,x=Ie.values(p,i,c,m),Ie.unit==2&&(x=x.map(Dt=>p.posToVal(P+Dt*T,$.key,!0)));let Je=Tt.values(p,i,c,m);Tt.unit==2?re=Je[0]*T:re=C(Je[0],$,T,P)-C(0,$,T,P),ke=ey(x,I,C,$,T,P,ke),Ce=ke-re+S}else ke=ey(x,I,C,$,T,P,ke),Ce=ke*g+S,re=ke-Ce;Ce<1&&(Ce=0),Ee>=re/2&&(Ee=0),Ce<5&&(D=rv);let mt=Ce>0,Wt=ke-Ce-(mt?Ee:0);re=D(nd(Wt,N,k)),oe=(M==0?re/2:M==G?0:re)-M*G*((M==0?S/2:0)+(mt?Ee/2:0));const An={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},er=Ve?null:new Path2D;let Ht=null;if(le!=null)Ht=p.data[le.series[1]];else{let{y0:Je,y1:Dt}=f;Je!=null&&Dt!=null&&(I=Dt.values(p,i,c,m),Ht=Je.values(p,i,c,m))}let Tr=j*re,vt=U*re;for(let Je=G==1?c:m;Je>=c&&Je<=m;Je+=G){let Dt=I[Je];if(Dt==null)continue;if(Ht!=null){let hn=Ht[Je]??0;if(Dt-hn==0)continue;pe=O(hn,_,F,L)}let On=$.distr!=2||f!=null?x[Je]:Je,Bn=C(On,$,T,P),Gn=O(un(Dt,ue),_,F,L),mr=D(Bn-oe),mn=D(yi(Gn,pe)),zn=D(Mo(Gn,pe)),Kn=mn-zn;if(Dt!=null){let hn=Dt<0?vt:Tr,tr=Dt<0?Tr:vt;Ve?(Ee>0&&Ge[Je]!=null&&J(Ze.get(Ge[Je]),mr,zn+Vi(Ee/2),re,yi(0,Kn-Ee),hn,tr),Me[Je]!=null&&J(ot.get(Me[Je]),mr,zn+Vi(Ee/2),re,yi(0,Kn-Ee),hn,tr)):J(er,mr,zn+Vi(Ee/2),re,yi(0,Kn-Ee),hn,tr),Q(p,i,Je,mr-Ee/2,zn,re+Ee,Kn)}}return Ee>0?An.stroke=Ve?Ze:er:Ve||(An._fill=b.width==0?b._fill:b._stroke??b._fill,An.width=0),An.fill=Ve?ot:er,An})}function FA(e,n){const t=un(n?.alignGaps,0);return(r,h,d,g)=>ra(r,h,(v,l,f,s,a,u,p,i,c,m,b)=>{[d,g]=jc(f,d,g);let x=v.pxRound,I=j=>x(u(j,s,m,i)),$=j=>x(p(j,a,b,c)),_,C,O;s.ori==0?(_=Zc,O=Ya,C=Yv):(_=Xc,O=Ja,C=Jv);const P=s.dir*(s.ori==0?1:-1);let L=I(l[P==1?d:g]),T=L,F=[],D=[];for(let j=P==1?d:g;j>=d&&j<=g;j+=P)if(f[j]!=null){let U=l[j],G=I(U);F.push(T=G),D.push($(f[j]))}const M={stroke:e(F,D,_,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:Ka},S=M.stroke;let[k,N]=fd(r,h);if(v.fill!=null||k!=0){let j=M.fill=new Path2D(S),U=v.fillTo(r,h,v.min,v.max,k),G=$(U);O(j,T,G),O(j,L,G)}if(!v.spanGaps){let j=[];j.push(...gd(l,f,d,g,P,I,t)),M.gaps=j=v.gaps(r,h,d,g,j),M.clip=Jc(j,s.ori,i,c,m,b)}return N!=0&&(M.band=N==2?[cs(r,h,d,g,S,-1),cs(r,h,d,g,S,1)]:cs(r,h,d,g,S,N)),M})}function jA(e){return FA(WA,e)}function WA(e,n,t,r,h,d){const g=e.length;if(g<2)return null;const v=new Path2D;if(t(v,e[0],n[0]),g==2)r(v,e[1],n[1]);else{let l=Array(g),f=Array(g-1),s=Array(g-1),a=Array(g-1);for(let u=0;u<g-1;u++)s[u]=n[u+1]-n[u],a[u]=e[u+1]-e[u],f[u]=s[u]/a[u];l[0]=f[0];for(let u=1;u<g-1;u++)f[u]===0||f[u-1]===0||f[u-1]>0!=f[u]>0?l[u]=0:(l[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/f[u-1]+(a[u]+2*a[u-1])/f[u]),isFinite(l[u])||(l[u]=0));l[g-1]=f[g-2];for(let u=0;u<g-1;u++)h(v,e[u]+a[u]/3,n[u]+l[u]*a[u]/3,e[u+1]-a[u]/3,n[u+1]-l[u+1]*a[u]/3,e[u+1],n[u+1])}return v}const vd=new Set;function ty(){for(let e of vd)e.syncRect(!0)}Wa&&(Qs(Ck,Ha,ty),Qs(_k,Ha,ty,!0),Qs(zc,Ha,()=>{ri.pxRatio=pn}));const HA=Qv(),UA=Zv();function ny(e,n,t,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((h,d)=>yd(h,d,n,t))}function VA(e,n){return e.map((t,r)=>r==0?{}:pr({},n,t))}function yd(e,n,t,r){return pr({},n==0?t:r,e)}function ry(e,n,t){return n==null?Va:[n,t]}const qA=ry;function GA(e,n,t){return n==null?Va:Hc(n,t,Qh,!0)}function iy(e,n,t,r){return n==null?Va:Wc(n,t,e.scales[r].log,!1)}const KA=iy;function oy(e,n,t,r){return n==null?Va:Xh(n,t,e.scales[r].log,!1)}const YA=oy;function JA(e,n,t,r,h){let d=yi(tv(e),tv(n)),g=n-e,v=Io(h/r*g,t);do{let l=t[v],f=r*l/g;if(f>=h&&d+(l<5?Is.get(l):0)<=17)return[l,f]}while(++v<t.length);return[0,0]}function sy(e){let n,t;return e=e.replace(/(\d+)px/,(r,h)=>(n=Sr((t=+h)*pn))+"px"),[e,n,t]}function ZA(e){e.show&&[e.font,e.labelFont].forEach(n=>{let t=$n(n[2]*pn,1);n[0]=n[0].replace(/[0-9.]+px/,t+"px"),n[1]=t})}function ri(e,n,t){const r={mode:un(e.mode,1)},h=r.mode;function d(V,Z,ae,ce){let ge=Z.valToPct(V);return ce+ae*(Z.dir==-1?1-ge:ge)}function g(V,Z,ae,ce){let ge=Z.valToPct(V);return ce+ae*(Z.dir==-1?ge:1-ge)}function v(V,Z,ae,ce){return Z.ori==0?d(V,Z,ae,ce):g(V,Z,ae,ce)}r.valToPosH=d,r.valToPosV=g;let l=!1;r.status=0;const f=r.root=io(ik);if(e.id!=null&&(f.id=e.id),Hi(f,e.class),e.title){let V=io(ak,f);V.textContent=e.title}const s=Ro("canvas"),a=r.ctx=s.getContext("2d"),u=io(lk,f);Qs("click",u,V=>{V.target===i&&(yt!=bo||Qt!=ns)&&ir.click(r,V)},!0);const p=r.under=io(ck,u);u.appendChild(s);const i=r.over=io(uk,u);e=qa(e);const c=+un(e.pxAlign,1),m=Vv(c);(e.plugins||[]).forEach(V=>{V.opts&&(e=V.opts(r,e)||e)});const b=e.ms||.001,x=r.series=h==1?ny(e.series||[],Ov,jv,!1):VA(e.series||[null],Fv),I=r.axes=ny(e.axes||[],Lv,Pv,!0),$=r.scales={},_=r.bands=e.bands||[];_.forEach(V=>{V.fill=Xt(V.fill||null),V.dir=un(V.dir,-1)});const C=h==2?x[1].facets[0].scale:x[0].scale,O={axes:xt,series:ts},P=(e.drawOrder||["axes","series"]).map(V=>O[V]);function L(V){const Z=V.distr==3?ae=>ls(ae>0?ae:V.clamp(r,ae,V.min,V.max,V.key)):V.distr==4?ae=>td(ae,V.asinh):V.distr==100?ae=>V.fwd(ae):ae=>ae;return ae=>{let ce=Z(ae),{_min:ge,_max:Ae}=V,Oe=Ae-ge;return(ce-ge)/Oe}}function T(V){let Z=$[V];if(Z==null){let ae=(e.scales||Fl)[V]||Fl;if(ae.from!=null){T(ae.from);let ce=pr({},$[ae.from],ae,{key:V});ce.valToPct=L(ce),$[V]=ce}else{Z=$[V]=pr({},V==C?Wv:LA,ae),Z.key=V;let ce=Z.time,ge=Z.range,Ae=Ms(ge);if((V!=C||h==2&&!ce)&&(Ae&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Zm:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Zm:{mode:1,hard:ge[1],soft:ge[1]}},Ae=!1),!Ae&&qc(ge))){let Oe=ge;ge=(We,Ue,Ye)=>Ue==null?Va:Hc(Ue,Ye,Oe)}Z.range=Xt(ge||(ce?qA:V==C?Z.distr==3?KA:Z.distr==4?YA:ry:Z.distr==3?iy:Z.distr==4?oy:GA)),Z.auto=Xt(Ae?!1:Z.auto),Z.clamp=Xt(Z.clamp||MA),Z._min=Z._max=null,Z.valToPct=L(Z)}}}T("x"),T("y"),h==1&&x.forEach(V=>{T(V.scale)}),I.forEach(V=>{T(V.scale)});for(let V in e.scales)T(V);const F=$[C],D=F.distr;let M,S;F.ori==0?(Hi(f,ok),M=d,S=g):(Hi(f,sk),M=g,S=d);const k={};for(let V in $){let Z=$[V];(Z.min!=null||Z.max!=null)&&(k[V]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const N=e.tzDate||(V=>new Date(Sr(V/b))),j=e.fmtDate||id,U=b==1?oA(N):lA(N),G=Av(N,kv(b==1?iA:aA,j)),J=$v(N,Sv(uA,j)),Q=[],le=r.legend=pr({},pA,e.legend),ie=r.cursor=pr({},bA,{drag:{y:h==2}},e.cursor),ue=le.show,pe=ie.show,oe=le.markers;le.idxs=Q,oe.width=Xt(oe.width),oe.dash=Xt(oe.dash),oe.stroke=Xt(oe.stroke),oe.fill=Xt(oe.fill);let re,Ce,ke,Ee=[],Ve=[],Me,ot=!1,Ge={};if(le.live){const V=x[1]?x[1].values:null;ot=V!=null,Me=ot?V(r,1,0):{_:0};for(let Z in Me)Ge[Z]=qh}if(ue)if(re=Ro("table",mk,f),ke=Ro("tbody",null,re),le.mount(r,re),ot){Ce=Ro("thead",null,re,ke);let V=Ro("tr",null,Ce);Ro("th",null,V);for(var Ze in Me)Ro("th",Nm,V).textContent=Ze}else Hi(re,yk),le.live&&Hi(re,vk);const Ie={show:!0},Tt={show:!1};function mt(V,Z){if(Z==0&&(ot||!le.live||h==2))return Va;let ae=[],ce=Ro("tr",bk,ke,ke.childNodes[Z]);Hi(ce,V.class),V.show||Hi(ce,Xs);let ge=Ro("th",null,ce);if(oe.show){let We=io(wk,ge);if(Z>0){let Ue=oe.width(r,Z);Ue&&(We.style.border=Ue+"px "+oe.dash(r,Z)+" "+oe.stroke(r,Z)),We.style.background=oe.fill(r,Z)}}let Ae=io(Nm,ge);V.label instanceof HTMLElement?Ae.appendChild(V.label):Ae.textContent=V.label,Z>0&&(oe.show||(Ae.style.color=V.width>0?oe.stroke(r,Z):oe.fill(r,Z)),An("click",ge,We=>{if(ie._lock)return;Hr(We);let Ue=x.indexOf(V);if((We.ctrlKey||We.metaKey)!=le.isolate){let Ye=x.some((nt,ct)=>ct>0&&ct!=Ue&&nt.show);x.forEach((nt,ct)=>{ct>0&&wr(ct,Ye?ct==Ue?Ie:Tt:Ie,!0,Mt.setSeries)})}else wr(Ue,{show:!V.show},!0,Mt.setSeries)},!1),xi&&An(zm,ge,We=>{ie._lock||(Hr(We),wr(x.indexOf(V),Co,!0,Mt.setSeries))},!1));for(var Oe in Me){let We=Ro("td",xk,ce);We.textContent="--",ae.push(We)}return[ce,ae]}const Wt=new Map;function An(V,Z,ae,ce=!0){const ge=Wt.get(Z)||{},Ae=ie.bind[V](r,Z,ae,ce);Ae&&(Qs(V,Z,ge[V]=Ae),Wt.set(Z,ge))}function er(V,Z,ae){const ce=Wt.get(Z)||{};for(let ge in ce)(V==null||ge==V)&&(Zh(ge,Z,ce[ge]),delete ce[ge]);V==null&&Wt.delete(Z)}let Ht=0,Tr=0,vt=0,Je=0,Dt=0,On=0,Bn=Dt,Gn=On,mr=vt,mn=Je,zn=0,Kn=0,hn=0,tr=0;r.bbox={};let lo=!1,wi=!1,Fr=!1,jr=!1,vr=!1,yr=!1;function co(V,Z,ae){(ae||V!=r.width||Z!=r.height)&&uo(V,Z),St(!1),Fr=!0,wi=!0,rr()}function uo(V,Z){r.width=Ht=vt=V,r.height=Tr=Je=Z,Dt=On=0,Po(),Wr();let ae=r.bbox;zn=ae.left=ta(Dt*pn,.5),Kn=ae.top=ta(On*pn,.5),hn=ae.width=ta(vt*pn,.5),tr=ae.height=ta(Je*pn,.5)}const hs=3;function ci(){let V=!1,Z=0;for(;!V;){Z++;let ae=Le(Z),ce=Ke(Z);V=Z==hs||ae&&ce,V||(uo(r.width,r.height),wi=!0)}}function Qo({width:V,height:Z}){co(V,Z)}r.setSize=Qo;function Po(){let V=!1,Z=!1,ae=!1,ce=!1;I.forEach((ge,Ae)=>{if(ge.show&&ge._show){let{side:Oe,_size:We}=ge,Ue=Oe%2,Ye=ge.label!=null?ge.labelSize:0,nt=We+Ye;nt>0&&(Ue?(vt-=nt,Oe==3?(Dt+=nt,ce=!0):ae=!0):(Je-=nt,Oe==0?(On+=nt,V=!0):Z=!0))}}),nn[0]=V,nn[1]=ae,nn[2]=Z,nn[3]=ce,vt-=br[1]+br[3],Dt+=br[3],Je-=br[2]+br[0],On+=br[0]}function Wr(){let V=Dt+vt,Z=On+Je,ae=Dt,ce=On;function ge(Ae,Oe){switch(Ae){case 1:return V+=Oe,V-Oe;case 2:return Z+=Oe,Z-Oe;case 3:return ae-=Oe,ae+Oe;case 0:return ce-=Oe,ce+Oe}}I.forEach((Ae,Oe)=>{if(Ae.show&&Ae._show){let We=Ae.side;Ae._pos=ge(We,Ae._size),Ae.label!=null&&(Ae._lpos=ge(We,Ae.labelSize))}})}if(ie.dataIdx==null){let V=ie.hover,Z=V.skip=new Set(V.skip??[]);Z.add(void 0);let ae=V.prox=Xt(V.prox),ce=V.bias??=0;ie.dataIdx=(ge,Ae,Oe,We)=>{if(Ae==0)return Oe;let Ue=Oe,Ye=ae(ge,Ae,Oe,We)??Sn,nt=Ye>=0&&Ye<Sn,ct=F.ori==0?vt:Je,Rt=ie.left,cn=n[0],qt=n[Ae];if(Z.has(qt[Oe])){Ue=null;let $t=null,Ct=null,ft;if(ce==0||ce==-1)for(ft=Oe;$t==null&&ft-- >0;)Z.has(qt[ft])||($t=ft);if(ce==0||ce==1)for(ft=Oe;Ct==null&&ft++<qt.length;)Z.has(qt[ft])||(Ct=ft);if($t!=null||Ct!=null)if(nt){let Tn=$t==null?-1/0:M(cn[$t],F,ct,0),Vn=Ct==null?1/0:M(cn[Ct],F,ct,0),Cr=Rt-Tn,yn=Vn-Rt;Cr<=yn?Cr<=Ye&&(Ue=$t):yn<=Ye&&(Ue=Ct)}else Ue=Ct==null?$t:$t==null?Ct:Oe-$t<=Ct-Oe?$t:Ct}else nt&&Ar(Rt-M(cn[Oe],F,ct,0))>Ye&&(Ue=null);return Ue}}const Hr=V=>{ie.event=V};ie.idxs=Q,ie._lock=!1;let Nn=ie.points;Nn.show=Xt(Nn.show),Nn.size=Xt(Nn.size),Nn.stroke=Xt(Nn.stroke),Nn.width=Xt(Nn.width),Nn.fill=Xt(Nn.fill);const Ur=r.focus=pr({},e.focus||{alpha:.3},ie.focus),xi=Ur.prox>=0,Fn=xi&&Nn.one;let nr=[],Yi=[],Ci=[];function ds(V,Z){let ae=Nn.show(r,Z);if(ae instanceof HTMLElement)return Hi(ae,gk),Hi(ae,V.class),Xo(ae,-10,-10,vt,Je),i.insertBefore(ae,nr[Z]),ae}function ho(V,Z){if(h==1||Z>0){let ae=h==1&&$[V.scale].time,ce=V.value;V.value=ae?uv(ce)?$v(N,Sv(ce,j)):ce||J:ce||EA,V.label=V.label||(ae?xA:wA)}if(Fn||Z>0){V.width=V.width==null?1:V.width,V.paths=V.paths||HA||Lk,V.fillTo=Xt(V.fillTo||OA),V.pxAlign=+un(V.pxAlign,c),V.pxRound=Vv(V.pxAlign),V.stroke=Xt(V.stroke||null),V.fill=Xt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ae=RA(yi(1,V.width),1),ce=V.points=pr({},{size:ae,width:yi(1,ae*.2),stroke:V.stroke,space:ae*2,paths:UA,_stroke:null,_fill:null},V.points);ce.show=Xt(ce.show),ce.filter=Xt(ce.filter),ce.fill=Xt(ce.fill),ce.stroke=Xt(ce.stroke),ce.paths=Xt(ce.paths),ce.pxAlign=V.pxAlign}if(ue){let ae=mt(V,Z);Ee.splice(Z,0,ae[0]),Ve.splice(Z,0,ae[1]),le.values.push(null)}if(pe){Q.splice(Z,0,null);let ae=null;Fn?Z==0&&(ae=ds(V,Z)):Z>0&&(ae=ds(V,Z)),nr.splice(Z,0,ae),Yi.splice(Z,0,0),Ci.splice(Z,0,0)}ut("addSeries",Z)}function Ca(V,Z){Z=Z??x.length,V=h==1?yd(V,Z,Ov,jv):yd(V,Z,{},Fv),x.splice(Z,0,V),ho(x[Z],Z)}r.addSeries=Ca;function Ds(V){if(x.splice(V,1),ue){le.values.splice(V,1),Ve.splice(V,1);let Z=Ee.splice(V,1)[0];er(null,Z.firstChild),Z.remove()}pe&&(Q.splice(V,1),nr.splice(V,1)[0].remove(),Yi.splice(V,1),Ci.splice(V,1)),ut("delSeries",V)}r.delSeries=Ds;const nn=[!1,!1,!1,!1];function Er(V,Z){if(V._show=V.show,V.show){let ae=V.side%2,ce=$[V.scale];ce==null&&(V.scale=ae?x[1].scale:C,ce=$[V.scale]);let ge=ce.time;V.size=Xt(V.size),V.space=Xt(V.space),V.rotate=Xt(V.rotate),Ms(V.incrs)&&V.incrs.forEach(Oe=>{!Is.has(Oe)&&Is.set(Oe,lv(Oe))}),V.incrs=Xt(V.incrs||(ce.distr==2?tA:ge?b==1?rA:sA:na)),V.splits=Xt(V.splits||(ge&&ce.distr==1?U:ce.distr==3?hd:ce.distr==4?kA:_A)),V.stroke=Xt(V.stroke),V.grid.stroke=Xt(V.grid.stroke),V.ticks.stroke=Xt(V.ticks.stroke),V.border.stroke=Xt(V.border.stroke);let Ae=V.values;V.values=Ms(Ae)&&!Ms(Ae[0])?Xt(Ae):ge?Ms(Ae)?Av(N,kv(Ae,j)):uv(Ae)?cA(N,Ae):Ae||G:Ae||CA,V.filter=Xt(V.filter||(ce.distr>=3&&ce.log==10?$A:ce.distr==3&&ce.log==2?TA:iv)),V.font=sy(V.font),V.labelFont=sy(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&&(nn[Z]=!0,V._el=io(hk,u))}}function Ut(V,Z,ae,ce){let[ge,Ae,Oe,We]=ae,Ue=Z%2,Ye=0;return Ue==0&&(We||Ae)&&(Ye=Z==0&&!ge||Z==2&&!Oe?Sr(Lv.size/3):0),Ue==1&&(ge||Oe)&&(Ye=Z==1&&!Ae||Z==3&&!We?Sr(Pv.size/2):0),Ye}const ps=r.padding=(e.padding||[Ut,Ut,Ut,Ut]).map(V=>Xt(un(V,Ut))),br=r._padding=ps.map((V,Z)=>V(r,Z,nn,0));let jn,Cn=null,Wn=null;const Bo=h==1?x[0].idxs:null;let cr=null,zo=!1;function Rr(V,Z){if(n=V??[],r.data=r._data=n,h==2){jn=0;for(let ae=1;ae<x.length;ae++)jn+=n[ae][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),cr=n[0],jn=cr.length;let ae=n;if(D==2){ae=n.slice();let ce=ae[0]=Array(jn);for(let ge=0;ge<jn;ge++)ce[ge]=ge}r._data=n=ae}if(St(!0),ut("setData"),D==2&&(Fr=!0),Z!==!1){let ae=F;ae.auto(r,zo)?po():di(C,ae.min,ae.max),jr=jr||ie.left>=0,yr=!0,rr()}}r.setData=Rr;function po(){zo=!0;let V,Z;h==1&&(jn>0?(Cn=Bo[0]=0,Wn=Bo[1]=jn-1,V=n[0][Cn],Z=n[0][Wn],D==2?(V=Cn,Z=Wn):V==Z&&(D==3?[V,Z]=Wc(V,V,F.log,!1):D==4?[V,Z]=Xh(V,V,F.log,!1):F.time?Z=V+Sr(86400/b):[V,Z]=Hc(V,Z,Qh,!0))):(Cn=Bo[0]=V=null,Wn=Bo[1]=Z=null)),di(C,V,Z)}let Vr,_i,ki,es,qr,Fo,fo,jo,go,Rn;function Ji(V,Z,ae,ce,ge,Ae){V??=Pm,ae??=rd,ce??="butt",ge??=Pm,Ae??="round",V!=Vr&&(a.strokeStyle=Vr=V),ge!=_i&&(a.fillStyle=_i=ge),Z!=ki&&(a.lineWidth=ki=Z),Ae!=qr&&(a.lineJoin=qr=Ae),ce!=Fo&&(a.lineCap=Fo=ce),ae!=es&&a.setLineDash(es=ae)}function Ir(V,Z,ae,ce){Z!=_i&&(a.fillStyle=_i=Z),V!=fo&&(a.font=fo=V),ae!=jo&&(a.textAlign=jo=ae),ce!=go&&(a.textBaseline=go=ce)}function mo(V,Z,ae,ce,ge=0){if(ce.length>0&&V.auto(r,zo)&&(Z==null||Z.min==null)){let Ae=un(Cn,0),Oe=un(Wn,ce.length-1),We=ae.min==null?$k(ce,Ae,Oe,ge,V.distr==3):[ae.min,ae.max];V.min=Mo(V.min,ae.min=We[0]),V.max=yi(V.max,ae.max=We[1])}}const fs={min:null,max:null};function Wo(){for(let ce in $){let ge=$[ce];k[ce]==null&&(ge.min==null||k[C]!=null&&ge.auto(r,zo))&&(k[ce]=fs)}for(let ce in $){let ge=$[ce];k[ce]==null&&ge.from!=null&&k[ge.from]!=null&&(k[ce]=fs)}k[C]!=null&&St(!0);let V={};for(let ce in k){let ge=k[ce];if(ge!=null){let Ae=V[ce]=qa($[ce],Dk);if(ge.min!=null)pr(Ae,ge);else if(ce!=C||h==2)if(jn==0&&Ae.from==null){let Oe=Ae.range(r,null,null,ce);Ae.min=Oe[0],Ae.max=Oe[1]}else Ae.min=Sn,Ae.max=-Sn}}if(jn>0){x.forEach((ce,ge)=>{if(h==1){let Ae=ce.scale,Oe=k[Ae];if(Oe==null)return;let We=V[Ae];if(ge==0){let Ue=We.range(r,We.min,We.max,Ae);We.min=Ue[0],We.max=Ue[1],Cn=Io(We.min,n[0]),Wn=Io(We.max,n[0]),Wn-Cn>1&&(n[0][Cn]<We.min&&Cn++,n[0][Wn]>We.max&&Wn--),ce.min=cr[Cn],ce.max=cr[Wn]}else ce.show&&ce.auto&&mo(We,Oe,ce,n[ge],ce.sorted);ce.idxs[0]=Cn,ce.idxs[1]=Wn}else if(ge>0&&ce.show&&ce.auto){let[Ae,Oe]=ce.facets,We=Ae.scale,Ue=Oe.scale,[Ye,nt]=n[ge],ct=V[We],Rt=V[Ue];ct!=null&&mo(ct,k[We],Ae,Ye,Ae.sorted),Rt!=null&&mo(Rt,k[Ue],Oe,nt,Oe.sorted),ce.min=Oe.min,ce.max=Oe.max}});for(let ce in V){let ge=V[ce],Ae=k[ce];if(ge.from==null&&(Ae==null||Ae.min==null)){let Oe=ge.range(r,ge.min==Sn?null:ge.min,ge.max==-Sn?null:ge.max,ce);ge.min=Oe[0],ge.max=Oe[1]}}}for(let ce in V){let ge=V[ce];if(ge.from!=null){let Ae=V[ge.from];if(Ae.min==null)ge.min=ge.max=null;else{let Oe=ge.range(r,Ae.min,Ae.max,ce);ge.min=Oe[0],ge.max=Oe[1]}}}let Z={},ae=!1;for(let ce in V){let ge=V[ce],Ae=$[ce];if(Ae.min!=ge.min||Ae.max!=ge.max){Ae.min=ge.min,Ae.max=ge.max;let Oe=Ae.distr;Ae._min=Oe==3?ls(Ae.min):Oe==4?td(Ae.min,Ae.asinh):Oe==100?Ae.fwd(Ae.min):Ae.min,Ae._max=Oe==3?ls(Ae.max):Oe==4?td(Ae.max,Ae.asinh):Oe==100?Ae.fwd(Ae.max):Ae.max,Z[ce]=ae=!0}}if(ae){x.forEach((ce,ge)=>{h==2?ge>0&&Z.y&&(ce._paths=null):Z[ce.scale]&&(ce._paths=null)});for(let ce in Z)Fr=!0,ut("setScale",ce);pe&&ie.left>=0&&(jr=yr=!0)}for(let ce in k)k[ce]=null}function vo(V){let Z=nd(Cn-1,0,jn-1),ae=nd(Wn+1,0,jn-1);for(;V[Z]==null&&Z>0;)Z--;for(;V[ae]==null&&ae<jn-1;)ae++;return[Z,ae]}function ts(){if(jn>0){let V=x.some(Z=>Z._focus)&&Rn!=Ur.alpha;V&&(a.globalAlpha=Rn=Ur.alpha),x.forEach((Z,ae)=>{if(ae>0&&Z.show&&(gs(ae,!1),gs(ae,!0),Z._paths==null)){let ce=Rn;Rn!=Z.alpha&&(a.globalAlpha=Rn=Z.alpha);let ge=h==2?[0,n[ae][0].length-1]:vo(n[ae]);Z._paths=Z.paths(r,ae,ge[0],ge[1]),Rn!=ce&&(a.globalAlpha=Rn=ce)}}),x.forEach((Z,ae)=>{if(ae>0&&Z.show){let ce=Rn;Rn!=Z.alpha&&(a.globalAlpha=Rn=Z.alpha),Z._paths!=null&&Ho(ae,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,Ae=Z.points.show(r,ae,Cn,Wn,ge),Oe=Z.points.filter(r,ae,Ae,ge);(Ae||Oe)&&(Z.points._paths=Z.points.paths(r,ae,Cn,Wn,Oe),Ho(ae,!0))}Rn!=ce&&(a.globalAlpha=Rn=ce),ut("drawSeries",ae)}}),V&&(a.globalAlpha=Rn=1)}}function gs(V,Z){let ae=Z?x[V].points:x[V];ae._stroke=ae.stroke(r,V),ae._fill=ae.fill(r,V)}function Ho(V,Z){let ae=Z?x[V].points:x[V],{stroke:ce,fill:ge,clip:Ae,flags:Oe,_stroke:We=ae._stroke,_fill:Ue=ae._fill,_width:Ye=ae.width}=ae._paths;Ye=$n(Ye*pn,3);let nt=null,ct=Ye%2/2;Z&&Ue==null&&(Ue=Ye>0?"#fff":We);let Rt=ae.pxAlign==1&&ct>0;if(Rt&&a.translate(ct,ct),!Z){let cn=zn-Ye/2,qt=Kn-Ye/2,$t=hn+Ye,Ct=tr+Ye;nt=new Path2D,nt.rect(cn,qt,$t,Ct)}Z?Uo(We,Ye,ae.dash,ae.cap,Ue,ce,ge,Oe,Ae):Ps(V,We,Ye,ae.dash,ae.cap,Ue,ce,ge,Oe,nt,Ae),Rt&&a.translate(-ct,-ct)}function Ps(V,Z,ae,ce,ge,Ae,Oe,We,Ue,Ye,nt){let ct=!1;Ue!=0&&_.forEach((Rt,cn)=>{if(Rt.series[0]==V){let qt=x[Rt.series[1]],$t=n[Rt.series[1]],Ct=(qt._paths||Fl).band;Ms(Ct)&&(Ct=Rt.dir==1?Ct[0]:Ct[1]);let ft,Tn=null;qt.show&&Ct&&Ek($t,Cn,Wn)?(Tn=Rt.fill(r,cn)||Ae,ft=qt._paths.clip):Ct=null,Uo(Z,ae,ce,ge,Tn,Oe,We,Ue,Ye,nt,ft,Ct),ct=!0}}),ct||Uo(Z,ae,ce,ge,Ae,Oe,We,Ue,Ye,nt)}const yo=Ka|pd;function Uo(V,Z,ae,ce,ge,Ae,Oe,We,Ue,Ye,nt,ct){Ji(V,Z,ae,ce,ge),(Ue||Ye||ct)&&(a.save(),Ue&&a.clip(Ue),Ye&&a.clip(Ye)),ct?(We&yo)==yo?(a.clip(ct),nt&&a.clip(nt),Yn(ge,Oe),ui(V,Ae,Z)):We&pd?(Yn(ge,Oe),a.clip(ct),ui(V,Ae,Z)):We&Ka&&(a.save(),a.clip(ct),nt&&a.clip(nt),Yn(ge,Oe),a.restore(),ui(V,Ae,Z)):(Yn(ge,Oe),ui(V,Ae,Z)),(Ue||Ye||ct)&&a.restore()}function ui(V,Z,ae){ae>0&&(Z instanceof Map?Z.forEach((ce,ge)=>{a.strokeStyle=Vr=ge,a.stroke(ce)}):Z!=null&&V&&a.stroke(Z))}function Yn(V,Z){Z instanceof Map?Z.forEach((ae,ce)=>{a.fillStyle=_i=ce,a.fill(ae)}):Z!=null&&V&&a.fill(Z)}function te(V,Z,ae,ce){let ge=I[V],Ae;if(ce<=0)Ae=[0,0];else{let Oe=ge._space=ge.space(r,V,Z,ae,ce),We=ge._incrs=ge.incrs(r,V,Z,ae,ce,Oe);Ae=JA(Z,ae,We,ce,Oe)}return ge._found=Ae}function Se(V,Z,ae,ce,ge,Ae,Oe,We,Ue,Ye){let nt=Oe%2/2;c==1&&a.translate(nt,nt),Ji(We,Oe,Ue,Ye,We),a.beginPath();let ct,Rt,cn,qt,$t=ge+(ce==0||ce==3?-Ae:Ae);ae==0?(Rt=ge,qt=$t):(ct=ge,cn=$t);for(let Ct=0;Ct<V.length;Ct++)Z[Ct]!=null&&(ae==0?ct=cn=V[Ct]:Rt=qt=V[Ct],a.moveTo(ct,Rt),a.lineTo(cn,qt));a.stroke(),c==1&&a.translate(-nt,-nt)}function Le(V){let Z=!0;return I.forEach((ae,ce)=>{if(!ae.show)return;let ge=$[ae.scale];if(ge.min==null){ae._show&&(Z=!1,ae._show=!1,St(!1));return}else ae._show||(Z=!1,ae._show=!0,St(!1));let Ae=ae.side,Oe=Ae%2,{min:We,max:Ue}=ge,[Ye,nt]=te(ce,We,Ue,Oe==0?vt:Je);if(nt==0)return;let ct=ge.distr==2,Rt=ae._splits=ae.splits(r,ce,We,Ue,Ye,nt,ct),cn=ge.distr==2?Rt.map(ft=>cr[ft]):Rt,qt=ge.distr==2?cr[Rt[1]]-cr[Rt[0]]:Ye,$t=ae._values=ae.values(r,ae.filter(r,cn,ce,nt,qt),ce,nt,qt);ae._rotate=Ae==2?ae.rotate(r,$t,ce,nt):0;let Ct=ae._size;ae._size=oo(ae.size(r,$t,ce,V)),Ct!=null&&ae._size!=Ct&&(Z=!1)}),Z}function Ke(V){let Z=!0;return ps.forEach((ae,ce)=>{let ge=ae(r,ce,nn,V);ge!=br[ce]&&(Z=!1),br[ce]=ge}),Z}function xt(){for(let V=0;V<I.length;V++){let Z=I[V];if(!Z.show||!Z._show)continue;let ae=Z.side,ce=ae%2,ge,Ae,Oe=Z.stroke(r,V),We=ae==0||ae==3?-1:1,[Ue,Ye]=Z._found;if(Z.label!=null){let Qr=Z.labelGap*We,Mn=Sr((Z._lpos+Qr)*pn);Ir(Z.labelFont[0],Oe,"center",ae==2?Pl:Dm),a.save(),ce==1?(ge=Ae=0,a.translate(Mn,Sr(Kn+tr/2)),a.rotate((ae==3?-Uc:Uc)/2)):(ge=Sr(zn+hn/2),Ae=Mn);let _o=nv(Z.label)?Z.label(r,V,Ue,Ye):Z.label;a.fillText(_o,ge,Ae),a.restore()}if(Ye==0)continue;let nt=$[Z.scale],ct=ce==0?hn:tr,Rt=ce==0?zn:Kn,cn=Z._splits,qt=nt.distr==2?cn.map(Qr=>cr[Qr]):cn,$t=nt.distr==2?cr[cn[1]]-cr[cn[0]]:Ue,Ct=Z.ticks,ft=Z.border,Tn=Ct.show?Ct.size:0,Vn=Sr(Tn*pn),Cr=Sr((Z.alignTo==2?Z._size-Tn-Z.gap:Z.gap)*pn),yn=Z._rotate*-Uc/180,_n=m(Z._pos*pn),ye=(Vn+Cr)*We,Re=_n+ye;Ae=ce==0?Re:0,ge=ce==1?Re:0;let Te=Z.font[0],Xe=Z.align==1?ja:Z.align==2?Wh:yn>0?ja:yn<0?Wh:ce==0?"center":ae==3?Wh:ja,wt=yn||ce==1?"middle":ae==2?Pl:Dm;Ir(Te,Oe,Xe,wt);let Nt=Z.font[1]*Z.lineGap,dn=cn.map(Qr=>m(v(Qr,nt,ct,Rt))),Gt=Z._values;for(let Qr=0;Qr<Gt.length;Qr++){let Mn=Gt[Qr];if(Mn!=null){ce==0?ge=dn[Qr]:Ae=dn[Qr],Mn=""+Mn;let _o=Mn.indexOf(`
1471
+ `)==-1?[Mn]:Mn.split(/\n/gm);for(let ei=0;ei<_o.length;ei++){let ys=_o[ei];yn?(a.save(),a.translate(ge,Ae+ei*Nt),a.rotate(yn),a.fillText(ys,0,0),a.restore()):a.fillText(ys,ge,Ae+ei*Nt)}}}Ct.show&&Se(dn,Ct.filter(r,qt,V,Ye,$t),ce,ae,_n,Vn,$n(Ct.width*pn,3),Ct.stroke(r,V),Ct.dash,Ct.cap);let Di=Z.grid;Di.show&&Se(dn,Di.filter(r,qt,V,Ye,$t),ce,ce==0?2:1,ce==0?Kn:zn,ce==0?tr:hn,$n(Di.width*pn,3),Di.stroke(r,V),Di.dash,Di.cap),ft.show&&Se([_n],[1],ce==0?1:0,ce==0?1:2,ce==1?Kn:zn,ce==1?tr:hn,$n(ft.width*pn,3),ft.stroke(r,V),ft.dash,ft.cap)}ut("drawAxes")}function St(V){x.forEach((Z,ae)=>{ae>0&&(Z._paths=null,V&&(h==1?(Z.min=null,Z.max=null):Z.facets.forEach(ce=>{ce.min=null,ce.max=null})))})}let It=!1,Mr=!1,Lr=[];function Jn(){Mr=!1;for(let V=0;V<Lr.length;V++)ut(...Lr[V]);Lr.length=0}function rr(){It||(Hk(_a),It=!0)}function Be(V,Z=!1){It=!0,Mr=Z,V(r),_a(),Z&&Lr.length>0&&queueMicrotask(Jn)}r.batch=Be;function _a(){if(lo&&(Wo(),lo=!1),Fr&&(ci(),Fr=!1),wi){if(Ln(p,ja,Dt),Ln(p,Pl,On),Ln(p,Nl,vt),Ln(p,Dl,Je),Ln(i,ja,Dt),Ln(i,Pl,On),Ln(i,Nl,vt),Ln(i,Dl,Je),Ln(u,Nl,Ht),Ln(u,Dl,Tr),s.width=Sr(Ht*pn),s.height=Sr(Tr*pn),I.forEach(({_el:V,_show:Z,_size:ae,_pos:ce,side:ge})=>{if(V!=null)if(Z){let Ae=ge===3||ge===0?ae:0,Oe=ge%2==1;Ln(V,Oe?"left":"top",ce-Ae),Ln(V,Oe?"width":"height",ae),Ln(V,Oe?"top":"left",Oe?On:Dt),Ln(V,Oe?"height":"width",Oe?Je:vt),Yh(V,Xs)}else Hi(V,Xs)}),Vr=_i=ki=qr=Fo=fo=jo=go=es=null,Rn=1,z(!0),Dt!=Bn||On!=Gn||vt!=mr||Je!=mn){St(!1);let V=vt/mr,Z=Je/mn;if(pe&&!jr&&ie.left>=0){ie.left*=V,ie.top*=Z,Vo&&Xo(Vo,Sr(ie.left),0,vt,Je),Xn&&Xo(Xn,0,Sr(ie.top),vt,Je);for(let ae=0;ae<nr.length;ae++){let ce=nr[ae];ce!=null&&(Yi[ae]*=V,Ci[ae]*=Z,Xo(ce,oo(Yi[ae]),oo(Ci[ae]),vt,Je))}}if(Et.show&&!vr&&Et.left>=0&&Et.width>0){Et.left*=V,Et.width*=V,Et.top*=Z,Et.height*=Z;for(let ae in Y)Ln(hi,ae,Et[ae])}Bn=Dt,Gn=On,mr=vt,mn=Je}ut("setSize"),wi=!1}Ht>0&&Tr>0&&(a.clearRect(0,0,s.width,s.height),ut("drawClear"),P.forEach(V=>V()),ut("draw")),Et.show&&vr&&(xo(Et),vr=!1),pe&&jr&&(A(null,!0,!1),jr=!1),le.show&&le.live&&yr&&(w(),yr=!1),l||(l=!0,r.status=1,ut("ready")),zo=!1,It=!1}r.redraw=(V,Z)=>{Fr=Z||!1,V!==!1?di(C,F.min,F.max):rr()};function Fe(V,Z){let ae=$[V];if(ae.from==null){if(jn==0){let ce=ae.range(r,Z.min,Z.max,V);Z.min=ce[0],Z.max=ce[1]}if(Z.min>Z.max){let ce=Z.min;Z.min=Z.max,Z.max=ce}if(jn>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;V==C&&ae.distr==2&&jn>0&&(Z.min=Io(Z.min,n[0]),Z.max=Io(Z.max,n[0]),Z.min==Z.max&&Z.max++),k[V]=Z,lo=!0,rr()}}r.setScale=Fe;let Zn,ms,Vo,Xn,yl,vs,bo,ns,ka,fn,yt,Qt,wo=!1;const ir=ie.drag;let qe=ir.x,In=ir.y;pe&&(ie.x&&(Zn=io(pk,i)),ie.y&&(ms=io(fk,i)),F.ori==0?(Vo=Zn,Xn=ms):(Vo=ms,Xn=Zn),yt=ie.left,Qt=ie.top);const Et=r.select=pr({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),hi=Et.show?io(dk,Et.over?i:p):null;function xo(V,Z){if(Et.show){for(let ae in V)Et[ae]=V[ae],ae in Y&&Ln(hi,ae,V[ae]);Z!==!1&&ut("setSelect")}}r.setSelect=xo;function Vt(V){if(x[V].show)ue&&Yh(Ee[V],Xs);else if(ue&&Hi(Ee[V],Xs),pe){let Z=Fn?nr[0]:nr[V];Z!=null&&Xo(Z,-10,-10,vt,Je)}}function di(V,Z,ae){Fe(V,{min:Z,max:ae})}function wr(V,Z,ae,ce){Z.focus!=null&&Aa(V),Z.show!=null&&x.forEach((ge,Ae)=>{Ae>0&&(V==Ae||V==null)&&(ge.show=Z.show,Vt(Ae),h==2?(di(ge.facets[0].scale,null,null),di(ge.facets[1].scale,null,null)):di(ge.scale,null,null),rr())}),ae!==!1&&ut("setSeries",V,Z),ce&&Ot("setSeries",r,V,Z)}r.setSeries=wr;function qo(V,Z){pr(_[V],Z)}function Zi(V,Z){V.fill=Xt(V.fill||null),V.dir=un(V.dir,-1),Z=Z??_.length,_.splice(Z,0,V)}function Hn(V){V==null?_.length=0:_.splice(V,1)}r.addBand=Zi,r.setBand=qo,r.delBand=Hn;function Bs(V,Z){x[V].alpha=Z,pe&&nr[V]!=null&&(nr[V].style.opacity=Z),ue&&Ee[V]&&(Ee[V].style.opacity=Z)}let or,Xi,Qi;const Co={focus:!0};function Aa(V){if(V!=Qi){let Z=V==null,ae=Ur.alpha!=1;x.forEach((ce,ge)=>{if(h==1||ge>0){let Ae=Z||ge==0||ge==V;ce._focus=Z?null:Ae,ae&&Bs(ge,Ae?1:Ur.alpha)}}),Qi=V,ae&&rr()}}ue&&xi&&An(Fm,re,V=>{ie._lock||(Hr(V),Qi!=null&&wr(null,Co,!0,Mt.setSeries))});function vn(V,Z,ae){let ce=$[Z];ae&&(V=V/pn-(ce.ori==1?On:Dt));let ge=vt;ce.ori==1&&(ge=Je,V=ge-V),ce.dir==-1&&(V=ge-V);let Ae=ce._min,Oe=ce._max,We=V/ge,Ue=Ae+(Oe-Ae)*We,Ye=ce.distr;return Ye==3?Ua(10,Ue):Ye==4?Ik(Ue,ce.asinh):Ye==100?ce.bwd(Ue):Ue}function bl(V,Z){let ae=vn(V,C,Z);return Io(ae,n[0],Cn,Wn)}r.valToIdx=V=>Io(V,n[0]),r.posToIdx=bl,r.posToVal=vn,r.valToPos=(V,Z,ae)=>$[Z].ori==0?d(V,$[Z],ae?hn:vt,ae?zn:0):g(V,$[Z],ae?tr:Je,ae?Kn:0),r.setCursor=(V,Z,ae)=>{yt=V.left,Qt=V.top,A(null,Z,ae)};function Or(V,Z){Ln(hi,ja,Et.left=V),Ln(hi,Nl,Et.width=Z)}function pi(V,Z){Ln(hi,Pl,Et.top=V),Ln(hi,Dl,Et.height=Z)}let rs=F.ori==0?Or:pi,Xr=F.ori==1?Or:pi;function Ni(){if(ue&&le.live)for(let V=h==2?1:0;V<x.length;V++){if(V==0&&ot)continue;let Z=le.values[V],ae=0;for(let ce in Z)Ve[V][ae++].firstChild.nodeValue=Z[ce]}}function w(V,Z){if(V!=null&&(V.idxs?V.idxs.forEach((ae,ce)=>{Q[ce]=ae}):Nk(V.idx)||Q.fill(V.idx),le.idx=Q[0]),ue&&le.live){for(let ae=0;ae<x.length;ae++)(ae>0||h==1&&!ot)&&E(ae,Q[ae]);Ni()}yr=!1,Z!==!1&&ut("setLegend")}r.setLegend=w;function E(V,Z){let ae=x[V],ce=V==0&&D==2?cr:n[V],ge;ot?ge=ae.values(r,V,Z)??Ge:(ge=ae.value(r,Z==null?null:ce[Z],V,Z),ge=ge==null?Ge:{_:ge}),le.values[V]=ge}function A(V,Z,ae){ka=yt,fn=Qt,[yt,Qt]=ie.move(r,yt,Qt),ie.left=yt,ie.top=Qt,pe&&(Vo&&Xo(Vo,Sr(yt),0,vt,Je),Xn&&Xo(Xn,0,Sr(Qt),vt,Je));let ce,ge=Cn>Wn;or=Sn,Xi=null;let Ae=F.ori==0?vt:Je,Oe=F.ori==1?vt:Je;if(yt<0||jn==0||ge){ce=ie.idx=null;for(let We=0;We<x.length;We++){let Ue=nr[We];Ue!=null&&Xo(Ue,-10,-10,vt,Je)}xi&&wr(null,Co,!0,V==null&&Mt.setSeries),le.live&&(Q.fill(ce),yr=!0)}else{let We,Ue,Ye;h==1&&(We=F.ori==0?yt:Qt,Ue=vn(We,C),ce=ie.idx=Io(Ue,n[0],Cn,Wn),Ye=M(n[0][ce],F,Ae,0));let nt=-10,ct=-10,Rt=0,cn=0,qt=!0,$t="",Ct="";for(let ft=h==2?1:0;ft<x.length;ft++){let Tn=x[ft],Vn=Q[ft],Cr=Vn==null?null:h==1?n[ft][Vn]:n[ft][1][Vn],yn=ie.dataIdx(r,ft,ce,Ue),_n=yn==null?null:h==1?n[ft][yn]:n[ft][1][yn];if(yr=yr||_n!=Cr||yn!=Vn,Q[ft]=yn,ft>0&&Tn.show){let ye=yn==null?-10:yn==ce?Ye:M(h==1?n[0][yn]:n[ft][0][yn],F,Ae,0),Re=_n==null?-10:S(_n,h==1?$[Tn.scale]:$[Tn.facets[1].scale],Oe,0);if(xi&&_n!=null){let Te=F.ori==1?yt:Qt,Xe=Ar(Ur.dist(r,ft,yn,Re,Te));if(Xe<or){let wt=Ur.bias;if(wt!=0){let Nt=vn(Te,Tn.scale),dn=_n>=0?1:-1,Gt=Nt>=0?1:-1;Gt==dn&&(Gt==1?wt==1?_n>=Nt:_n<=Nt:wt==1?_n<=Nt:_n>=Nt)&&(or=Xe,Xi=ft)}else or=Xe,Xi=ft}}if(yr||Fn){let Te,Xe;F.ori==0?(Te=ye,Xe=Re):(Te=Re,Xe=ye);let wt,Nt,dn,Gt,Di,Qr,Mn=!0,_o=Nn.bbox;if(_o!=null){Mn=!1;let ei=_o(r,ft);dn=ei.left,Gt=ei.top,wt=ei.width,Nt=ei.height}else dn=Te,Gt=Xe,wt=Nt=Nn.size(r,ft);if(Qr=Nn.fill(r,ft),Di=Nn.stroke(r,ft),Fn)ft==Xi&&or<=Ur.prox&&(nt=dn,ct=Gt,Rt=wt,cn=Nt,qt=Mn,$t=Qr,Ct=Di);else{let ei=nr[ft];ei!=null&&(Yi[ft]=dn,Ci[ft]=Gt,Gm(ei,wt,Nt,Mn),Vm(ei,Qr,Di),Xo(ei,oo(dn),oo(Gt),vt,Je))}}}}if(Fn){let ft=Ur.prox,Tn=Qi==null?or<=ft:or>ft||Xi!=Qi;if(yr||Tn){let Vn=nr[0];Vn!=null&&(Yi[0]=nt,Ci[0]=ct,Gm(Vn,Rt,cn,qt),Vm(Vn,$t,Ct),Xo(Vn,oo(nt),oo(ct),vt,Je))}}}if(Et.show&&wo)if(V!=null){let[We,Ue]=Mt.scales,[Ye,nt]=Mt.match,[ct,Rt]=V.cursor.sync.scales,cn=V.cursor.drag;if(qe=cn._x,In=cn._y,qe||In){let{left:qt,top:$t,width:Ct,height:ft}=V.select,Tn=V.scales[ct].ori,Vn=V.posToVal,Cr,yn,_n,ye,Re,Te=We!=null&&Ye(We,ct),Xe=Ue!=null&&nt(Ue,Rt);Te&&qe?(Tn==0?(Cr=qt,yn=Ct):(Cr=$t,yn=ft),_n=$[We],ye=M(Vn(Cr,ct),_n,Ae,0),Re=M(Vn(Cr+yn,ct),_n,Ae,0),rs(Mo(ye,Re),Ar(Re-ye))):rs(0,Ae),Xe&&In?(Tn==1?(Cr=qt,yn=Ct):(Cr=$t,yn=ft),_n=$[Ue],ye=S(Vn(Cr,Rt),_n,Oe,0),Re=S(Vn(Cr+yn,Rt),_n,Oe,0),Xr(Mo(ye,Re),Ar(Re-ye))):Xr(0,Oe)}else X()}else{let We=Ar(ka-yl),Ue=Ar(fn-vs);if(F.ori==1){let Rt=We;We=Ue,Ue=Rt}qe=ir.x&&We>=ir.dist,In=ir.y&&Ue>=ir.dist;let Ye=ir.uni;Ye!=null?qe&&In&&(qe=We>=Ye,In=Ue>=Ye,!qe&&!In&&(Ue>We?In=!0:qe=!0)):ir.x&&ir.y&&(qe||In)&&(qe=In=!0);let nt,ct;qe&&(F.ori==0?(nt=bo,ct=yt):(nt=ns,ct=Qt),rs(Mo(nt,ct),Ar(ct-nt)),In||Xr(0,Oe)),In&&(F.ori==1?(nt=bo,ct=yt):(nt=ns,ct=Qt),Xr(Mo(nt,ct),Ar(ct-nt)),qe||rs(0,Ae)),!qe&&!In&&(rs(0,0),Xr(0,0))}if(ir._x=qe,ir._y=In,V==null){if(ae){if(ln!=null){let[We,Ue]=Mt.scales;Mt.values[0]=We!=null?vn(F.ori==0?yt:Qt,We):null,Mt.values[1]=Ue!=null?vn(F.ori==1?yt:Qt,Ue):null}Ot(Uh,r,yt,Qt,vt,Je,ce)}if(xi){let We=ae&&Mt.setSeries,Ue=Ur.prox;Qi==null?or<=Ue&&wr(Xi,Co,!0,We):or>Ue?wr(null,Co,!0,We):Xi!=Qi&&wr(Xi,Co,!0,We)}}yr&&(le.idx=ce,w()),Z!==!1&&ut("setCursor")}let B=null;Object.defineProperty(r,"rect",{get(){return B==null&&z(!1),B}});function z(V=!1){V?B=null:(B=i.getBoundingClientRect(),ut("syncRect",B))}function W(V,Z,ae,ce,ge,Ae,Oe){ie._lock||wo&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,Z,ae,ce,ge,Ae,Oe,!1,V!=null),V!=null?A(null,!0,!0):A(Z,!0,!1))}function q(V,Z,ae,ce,ge,Ae,Oe,We,Ue){if(B==null&&z(!1),Hr(V),V!=null)ae=V.clientX-B.left,ce=V.clientY-B.top;else{if(ae<0||ce<0){yt=-10,Qt=-10;return}let[Ye,nt]=Mt.scales,ct=Z.cursor.sync,[Rt,cn]=ct.values,[qt,$t]=ct.scales,[Ct,ft]=Mt.match,Tn=Z.axes[0].side%2==1,Vn=F.ori==0?vt:Je,Cr=F.ori==1?vt:Je,yn=Tn?Ae:ge,_n=Tn?ge:Ae,ye=Tn?ce:ae,Re=Tn?ae:ce;if(qt!=null?ae=Ct(Ye,qt)?v(Rt,$[Ye],Vn,0):-10:ae=Vn*(ye/yn),$t!=null?ce=ft(nt,$t)?v(cn,$[nt],Cr,0):-10:ce=Cr*(Re/_n),F.ori==1){let Te=ae;ae=ce,ce=Te}}Ue&&(Z==null||Z.cursor.event.type==Uh)&&((ae<=1||ae>=vt-1)&&(ae=ta(ae,vt)),(ce<=1||ce>=Je-1)&&(ce=ta(ce,Je))),We?(yl=ae,vs=ce,[bo,ns]=ie.move(r,ae,ce)):(yt=ae,Qt=ce)}const Y={width:0,height:0,left:0,top:0};function X(){xo(Y,!1)}let se,he,we,$e;function be(V,Z,ae,ce,ge,Ae,Oe){wo=!0,qe=In=ir._x=ir._y=!1,q(V,Z,ae,ce,ge,Ae,Oe,!0,!1),V!=null&&(An(Vh,Gh,_e,!1),Ot(Bm,r,bo,ns,vt,Je,null));let{left:We,top:Ue,width:Ye,height:nt}=Et;se=We,he=Ue,we=Ye,$e=nt}function _e(V,Z,ae,ce,ge,Ae,Oe){wo=ir._x=ir._y=!1,q(V,Z,ae,ce,ge,Ae,Oe,!1,!0);let{left:We,top:Ue,width:Ye,height:nt}=Et,ct=Ye>0||nt>0,Rt=se!=We||he!=Ue||we!=Ye||$e!=nt;if(ct&&Rt&&xo(Et),ir.setScale&&ct&&Rt){let cn=We,qt=Ye,$t=Ue,Ct=nt;if(F.ori==1&&(cn=Ue,qt=nt,$t=We,Ct=Ye),qe&&di(C,vn(cn,C),vn(cn+qt,C)),In)for(let ft in $){let Tn=$[ft];ft!=C&&Tn.from==null&&Tn.min!=Sn&&di(ft,vn($t+Ct,ft),vn($t,ft))}X()}else ie.lock&&(ie._lock=!ie._lock,A(Z,!0,V!=null));V!=null&&(er(Vh,Gh),Ot(Vh,r,yt,Qt,vt,Je,null))}function ze(V,Z,ae,ce,ge,Ae,Oe){if(ie._lock)return;Hr(V);let We=wo;if(wo){let Ue=!0,Ye=!0,nt=10,ct,Rt;F.ori==0?(ct=qe,Rt=In):(ct=In,Rt=qe),ct&&Rt&&(Ue=yt<=nt||yt>=vt-nt,Ye=Qt<=nt||Qt>=Je-nt),ct&&Ue&&(yt=yt<bo?0:vt),Rt&&Ye&&(Qt=Qt<ns?0:Je),A(null,!0,!0),wo=!1}yt=-10,Qt=-10,Q.fill(null),A(null,!0,!0),We&&(wo=We)}function De(V,Z,ae,ce,ge,Ae,Oe){ie._lock||(Hr(V),po(),X(),V!=null&&Ot(jm,r,yt,Qt,vt,Je,null))}function Qe(){I.forEach(ZA),co(r.width,r.height,!0)}Qs(zc,Ha,Qe);const bt={};bt.mousedown=be,bt.mousemove=W,bt.mouseup=_e,bt.dblclick=De,bt.setSeries=(V,Z,ae,ce)=>{let ge=Mt.match[2];ae=ge(r,Z,ae),ae!=-1&&wr(ae,ce,!0,!1)},pe&&(An(Bm,i,be),An(Uh,i,W),An(zm,i,V=>{Hr(V),z(!1)}),An(Fm,i,ze),An(jm,i,De),vd.add(r),r.syncRect=z);const st=r.hooks=e.hooks||{};function ut(V,Z,ae){Mr?Lr.push([V,Z,ae]):V in st&&st[V].forEach(ce=>{ce.call(null,r,Z,ae)})}(e.plugins||[]).forEach(V=>{for(let Z in V.hooks)st[Z]=(st[Z]||[]).concat(V.hooks[Z])});const Dn=(V,Z,ae)=>ae,Mt=pr({key:null,setSeries:!1,filters:{pub:ov,sub:ov},scales:[C,x[1]?x[1].scale:null],match:[sv,sv,Dn],values:[null,null]},ie.sync);Mt.match.length==2&&Mt.match.push(Dn),ie.sync=Mt;const ln=Mt.key,Bt=Uv(ln);function Ot(V,Z,ae,ce,ge,Ae,Oe){Mt.filters.pub(V,Z,ae,ce,ge,Ae,Oe)&&Bt.pub(V,Z,ae,ce,ge,Ae,Oe)}Bt.sub(r);function xr(V,Z,ae,ce,ge,Ae,Oe){Mt.filters.sub(V,Z,ae,ce,ge,Ae,Oe)&&bt[V](null,Z,ae,ce,ge,Ae,Oe)}r.pub=xr;function Nr(){Bt.unsub(r),vd.delete(r),Wt.clear(),Zh(zc,Ha,Qe),f.remove(),re?.remove(),ut("destroy")}r.destroy=Nr;function Un(){ut("init",e,n),Rr(n||e.data,!1),k[C]?Fe(C,k[C]):po(),vr=Et.show&&(Et.width>0||Et.height>0),jr=yr=!0,co(e.width,e.height)}return x.forEach(ho),I.forEach(Er),t?t instanceof HTMLElement?(t.appendChild(f),Un()):t(r,Un):Un(),r}ri.assign=pr,ri.fmtNum=ed,ri.rangeNum=Hc,ri.rangeLog=Wc,ri.rangeAsinh=Xh,ri.orient=ra,ri.pxRatio=pn,ri.join=Wk,ri.fmtDate=id,ri.tzDate=Qk,ri.sync=Uv;{ri.addGap=NA,ri.clipGaps=Jc;let e=ri.paths={points:Zv};e.linear=Qv,e.stepped=BA,e.bars=zA,e.spline=jA}var ay,ly;function XA(){return ly||(ly=1,ay=function(e,n,t,r,h){var d,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=e.length)throw new RangeError("invalid lower bound");if(h===void 0)h=e.length-1;else if(h=h|0,h<r||h>=e.length)throw new RangeError("invalid upper bound");for(;r<=h;)if(d=r+(h-r>>>1),g=+t(e[d],n,d,e),g<0)r=d+1;else if(g>0)h=d-1;else return d;return~r}),ay}var QA=XA();const d3=ar("y",Pc(QA));var bd,cy;function eS(){if(cy)return bd;cy=1;function e(n,t,r){var h=-1,d=n.length;t<0&&(t=-t>d?0:d+t),r=r>d?d:r,r<0&&(r+=d),d=t>r?0:r-t>>>0,t>>>=0;for(var g=Array(d);++h<d;)g[h]=n[h+t];return g}return bd=e,bd}var wd,uy;function tS(){if(uy)return wd;uy=1;var e=eS();function n(t,r,h){var d=t.length;return h=h===void 0?d:h,!r&&h>=d?t:e(t,r,h)}return wd=n,wd}var xd,hy;function dy(){if(hy)return xd;hy=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=n+t+r,d="\\ufe0e\\ufe0f",g="\\u200d",v=RegExp("["+g+e+h+d+"]");function l(f){return v.test(f)}return xd=l,xd}var Cd,py;function nS(){if(py)return Cd;py=1;function e(n){return n.split("")}return Cd=e,Cd}var _d,fy;function rS(){if(fy)return _d;fy=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=n+t+r,d="\\ufe0e\\ufe0f",g="["+e+"]",v="["+h+"]",l="\\ud83c[\\udffb-\\udfff]",f="(?:"+v+"|"+l+")",s="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",i=f+"?",c="["+d+"]?",m="(?:"+p+"(?:"+[s,a,u].join("|")+")"+c+i+")*",b=c+i+m,x="(?:"+[s+v+"?",v,a,u,g].join("|")+")",I=RegExp(l+"(?="+l+")|"+x+b,"g");function $(_){return _.match(I)||[]}return _d=$,_d}var kd,gy;function iS(){if(gy)return kd;gy=1;var e=nS(),n=dy(),t=rS();function r(h){return n(h)?t(h):e(h)}return kd=r,kd}var Ad,my;function oS(){if(my)return Ad;my=1;var e=typeof Rs=="object"&&Rs&&Rs.Object===Object&&Rs;return Ad=e,Ad}var Sd,vy;function sS(){if(vy)return Sd;vy=1;var e=oS(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return Sd=t,Sd}var $d,yy;function Td(){if(yy)return $d;yy=1;var e=sS(),n=e.Symbol;return $d=n,$d}var Ed,by;function aS(){if(by)return Ed;by=1;function e(n,t){for(var r=-1,h=n==null?0:n.length,d=Array(h);++r<h;)d[r]=t(n[r],r,n);return d}return Ed=e,Ed}var Rd,wy;function lS(){if(wy)return Rd;wy=1;var e=Array.isArray;return Rd=e,Rd}var Id,xy;function cS(){if(xy)return Id;xy=1;var e=Td(),n=Object.prototype,t=n.hasOwnProperty,r=n.toString,h=e?e.toStringTag:void 0;function d(g){var v=t.call(g,h),l=g[h];try{g[h]=void 0;var f=!0}catch{}var s=r.call(g);return f&&(v?g[h]=l:delete g[h]),s}return Id=d,Id}var Md,Cy;function uS(){if(Cy)return Md;Cy=1;var e=Object.prototype,n=e.toString;function t(r){return n.call(r)}return Md=t,Md}var Ld,_y;function hS(){if(_y)return Ld;_y=1;var e=Td(),n=cS(),t=uS(),r="[object Null]",h="[object Undefined]",d=e?e.toStringTag:void 0;function g(v){return v==null?v===void 0?h:r:d&&d in Object(v)?n(v):t(v)}return Ld=g,Ld}var Od,ky;function dS(){if(ky)return Od;ky=1;function e(n){return n!=null&&typeof n=="object"}return Od=e,Od}var Nd,Ay;function pS(){if(Ay)return Nd;Ay=1;var e=hS(),n=dS(),t="[object Symbol]";function r(h){return typeof h=="symbol"||n(h)&&e(h)==t}return Nd=r,Nd}var Dd,Sy;function fS(){if(Sy)return Dd;Sy=1;var e=Td(),n=aS(),t=lS(),r=pS(),h=e?e.prototype:void 0,d=h?h.toString:void 0;function g(v){if(typeof v=="string")return v;if(t(v))return n(v,g)+"";if(r(v))return d?d.call(v):"";var l=v+"";return l=="0"&&1/v==-1/0?"-0":l}return Dd=g,Dd}var Pd,$y;function eu(){if($y)return Pd;$y=1;var e=fS();function n(t){return t==null?"":e(t)}return Pd=n,Pd}var Bd,Ty;function gS(){if(Ty)return Bd;Ty=1;var e=tS(),n=dy(),t=iS(),r=eu();function h(d){return function(g){g=r(g);var v=n(g)?t(g):void 0,l=v?v[0]:g.charAt(0),f=v?e(v,1).join(""):g.slice(1);return l[d]()+f}}return Bd=h,Bd}var zd,Ey;function Ry(){if(Ey)return zd;Ey=1;var e=gS(),n=e("toUpperCase");return zd=n,zd}var mS=Ry();const vS=Pc(mS);var Fd,Iy;function yS(){if(Iy)return Fd;Iy=1;var e=eu(),n=Ry();function t(r){return n(e(r).toLowerCase())}return Fd=t,Fd}var jd,My;function bS(){if(My)return jd;My=1;function e(n,t,r,h){var d=-1,g=n==null?0:n.length;for(h&&g&&(r=n[++d]);++d<g;)r=t(r,n[d],d,n);return r}return jd=e,jd}var Wd,Ly;function wS(){if(Ly)return Wd;Ly=1;function e(n){return function(t){return n?.[t]}}return Wd=e,Wd}var Hd,Oy;function xS(){if(Oy)return Hd;Oy=1;var e=wS(),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"},t=e(n);return Hd=t,Hd}var Ud,Ny;function CS(){if(Ny)return Ud;Ny=1;var e=xS(),n=eu(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",h="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",g=r+h+d,v="["+g+"]",l=RegExp(v,"g");function f(s){return s=n(s),s&&s.replace(t,e).replace(l,"")}return Ud=f,Ud}var Vd,Dy;function _S(){if(Dy)return Vd;Dy=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}return Vd=n,Vd}var qd,Py;function kS(){if(Py)return qd;Py=1;var e=/[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(t){return e.test(t)}return qd=n,qd}var Gd,By;function AS(){if(By)return Gd;By=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=n+t+r,d="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",v="\\xac\\xb1\\xd7\\xf7",l="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",p=v+l+f+s,i="['’]",c="["+p+"]",m="["+h+"]",b="\\d+",x="["+d+"]",I="["+g+"]",$="[^"+e+p+b+d+g+a+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+_+")",O="[^"+e+"]",P="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+a+"]",F="\\u200d",D="(?:"+I+"|"+$+")",M="(?:"+T+"|"+$+")",S="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",k="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",j="["+u+"]?",U="(?:"+F+"(?:"+[O,P,L].join("|")+")"+j+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",J="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Q=j+N+U,le="(?:"+[x,P,L].join("|")+")"+Q,ie=RegExp([T+"?"+I+"+"+S+"(?="+[c,T,"$"].join("|")+")",M+"+"+k+"(?="+[c,T+D,"$"].join("|")+")",T+"?"+D+"+"+S,T+"+"+k,J,G,b,le].join("|"),"g");function ue(pe){return pe.match(ie)||[]}return Gd=ue,Gd}var Kd,zy;function SS(){if(zy)return Kd;zy=1;var e=_S(),n=kS(),t=eu(),r=AS();function h(d,g,v){return d=t(d),g=v?void 0:g,g===void 0?n(d)?r(d):e(d):d.match(g)||[]}return Kd=h,Kd}var Yd,Fy;function $S(){if(Fy)return Yd;Fy=1;var e=bS(),n=CS(),t=SS(),r="['’]",h=RegExp(r,"g");function d(g){return function(v){return e(t(n(v).replace(h,"")),g,"")}}return Yd=d,Yd}var Jd,jy;function TS(){if(jy)return Jd;jy=1;var e=yS(),n=$S(),t=n(function(r,h,d){return h=h.toLowerCase(),r+(d?e(h):h)});return Jd=t,Jd}var ES=TS();const RS=Pc(ES),IS=Object.assign({"./ArrayWidget.vue":()=>lt(()=>at.import("./ArrayWidget-5XQXgMtp-a1cacc906ac370efa514.js"),void 0),"./ArrayplotWidget.vue":()=>lt(()=>at.import("./ArrayplotWidget-pk7OINvA-33210225b3c4431d6f33.js"),void 0),"./BlockWidget.vue":()=>lt(()=>at.import("./BlockWidget-B_5TnoG_-4917a3006731d930dcdd.js"),void 0),"./ButtonWidget.vue":()=>lt(()=>at.import("./ButtonWidget-CiZGNEls-dd9c48d4c0e919b0c57c.js"),void 0),"./CanvasWidget.vue":()=>lt(()=>at.import("./CanvasWidget-CzLQAoHY-4af75346e21d0d3331bc.js"),void 0),"./CanvasdotWidget.vue":()=>lt(()=>at.import("./CanvasdotWidget-CcI1HwAp-f0e921fbede93d96bb17.js"),void 0),"./CanvasimageWidget.vue":()=>lt(()=>at.import("./CanvasimageWidget-CYg1rKr_-39afd3add27b4d447626.js"),void 0),"./CanvasimagevalueWidget.vue":()=>lt(()=>at.import("./CanvasimagevalueWidget-e0p2honY-57cf09c62360d64ff9c1.js"),void 0),"./CanvaslabelWidget.vue":()=>lt(()=>at.import("./CanvaslabelWidget-CgECf4wH-fef8dafccaa229773720.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>lt(()=>at.import("./CanvaslabelvalueWidget-bCIPWE4c-08b3d8971b85e410007d.js"),void 0),"./CanvaslineWidget.vue":()=>lt(()=>at.import("./CanvaslineWidget-Tw1B6RTA-4182a23eb3b4901d5006.js"),void 0),"./CanvaslinevalueWidget.vue":()=>lt(()=>at.import("./CanvaslinevalueWidget-GvTic9rq-b0f032ce88445cb0c895.js"),void 0),"./CheckbuttonWidget.vue":()=>lt(()=>at.import("./CheckbuttonWidget-DV6xeneq-86726035ada344b7e26c.js"),void 0),"./ComboboxWidget.vue":()=>lt(()=>at.import("./ComboboxWidget-BO31bWzg-a8f50b8d6656deb1ce0a.js"),void 0),"./DateWidget.vue":()=>lt(()=>at.import("./DateWidget-DYviZFhJ-ed0e06de6fb4dc83dade.js"),void 0),"./DynamicWidget.vue":()=>lt(()=>at.import("./DynamicWidget-BuSbQVhf-50da98367e5f44445d64.js"),void 0),"./FilechecksumWidget.vue":()=>lt(()=>at.import("./FilechecksumWidget-rJe1KvzY-705def22db12f6e1158f.js"),void 0),"./FiledisplayWidget.vue":()=>lt(()=>at.import("./FiledisplayWidget-CbTWgtBy-e893d89bca5e32862cca.js"),void 0),"./FormatvalueWidget.vue":()=>lt(()=>at.import("./FormatvalueWidget-B9Giwzaz-e5b15c689305bbdc6138.js"),void 0),"./HorizontalWidget.vue":()=>lt(()=>at.import("./HorizontalWidget-BfdjRLGe-c62ae940f92c44a7eadb.js"),void 0),"./HorizontalboxWidget.vue":()=>lt(()=>at.import("./HorizontalboxWidget-B1b9uNaB-283855166e8f6be80aa3.js"),void 0),"./HorizontallineWidget.vue":()=>lt(()=>at.import("./HorizontallineWidget-CHz4o6Gi-144da9f65a08a273e22c.js"),void 0),"./IframeWidget.vue":()=>lt(()=>at.import("./IframeWidget-BCtrIgD1-2cc07ddcb93de83d426b.js"),void 0),"./ImageviewerWidget.vue":()=>lt(()=>at.import("./ImageviewerWidget-DKMBE3tQ-0b274f194175b3f6f708.js"),void 0),"./LabelWidget.vue":()=>lt(()=>at.import("./LabelWidget-B0nE0ImW-999c37cd748bfc5ca350.js"),void 0),"./LabelledWidget.vue":()=>lt(()=>at.import("./LabelledWidget-DrZHj_lR-c3f0ca0f29f8d1826cfa.js"),void 0),"./LabelprogressbarWidget.vue":()=>lt(()=>at.import("./LabelprogressbarWidget-K9NphQp0-005aa442ae92ec5e6195.js"),void 0),"./LabelsparklineWidget.vue":()=>lt(()=>at.import("./LabelsparklineWidget-cn1OJvL3-9ad770dac6482cfe7084.js"),void 0),"./LabelvalueWidget.vue":()=>lt(()=>at.import("./LabelvalueWidget-DxJbd9nR-94970a1cc88b1da754d2.js"),void 0),"./LabelvaluedescWidget.vue":()=>lt(()=>at.import("./LabelvaluedescWidget-B-RiUnpl-fcb69cfc6baf57e6d2c8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>lt(()=>at.import("./LabelvaluelimitsbarWidget-BF94rtl8-c4fd4c7721f15451d97a.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>lt(()=>at.import("./LabelvaluelimitscolumnWidget-UOfPu8D1-dafe079eee8d7fbe6259.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>lt(()=>at.import("./LabelvaluerangebarWidget-EVON-Tv8-cd0b204f545690c17be8.js"),void 0),"./LedWidget.vue":()=>lt(()=>at.import("./LedWidget-DqVfh3zJ-78303742fb462fb51a83.js"),void 0),"./LimitsbarWidget.vue":()=>lt(()=>at.import("./LimitsbarWidget-rEJIGKCx-2261d23989cc84a8d6f7.js"),void 0),"./LimitscolorWidget.vue":()=>lt(()=>at.import("./LimitscolorWidget-DVXho9Mm-16a9b9e86dda203630c7.js"),void 0),"./LimitscolumnWidget.vue":()=>lt(()=>at.import("./LimitscolumnWidget-DSQAdlZS-f7be960c2a12ab481f6d.js"),void 0),"./LinegraphWidget.vue":()=>lt(()=>at.import("./LinegraphWidget-CQRwZ0N6-e14cfd73c7976088c1f1.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>lt(()=>at.import("./MatrixbycolumnsWidget-CJJ7SugT-cdb25088226a82895af3.js"),void 0),"./ProgressbarWidget.vue":()=>lt(()=>at.import("./ProgressbarWidget-VTd49uhi-4de5cacfe2dc76b2ab1c.js"),void 0),"./RadiobuttonWidget.vue":()=>lt(()=>at.import("./RadiobuttonWidget-DqsantxO-2112f35825b3072a7b0a.js"),void 0),"./RadiogroupWidget.vue":()=>lt(()=>at.import("./RadiogroupWidget-Bht6RZPH-8f7c530485bd7760772e.js"),void 0),"./RangebarWidget.vue":()=>lt(()=>at.import("./RangebarWidget-CN11Oqws-2c2edef9a9eb9ef4892c.js"),void 0),"./RollupWidget.vue":()=>lt(()=>at.import("./RollupWidget-cgl9Ghle-e2934ddfe4117fb13a53.js"),void 0),"./ScrollwindowWidget.vue":()=>lt(()=>at.import("./ScrollwindowWidget-BFK-ihvZ-90c8fb32873df4b31339.js"),void 0),"./SignalWidget.vue":()=>lt(()=>at.import("./SignalWidget-Be7Z5pJD-10eb7a0ca46a327184f3.js"),void 0),"./SpacerWidget.vue":()=>lt(()=>at.import("./SpacerWidget-uKPA-f_0-18ddf6aff97bc3aa2eed.js"),void 0),"./SparklineWidget.vue":()=>lt(()=>at.import("./SparklineWidget-Wu5iFbly-9336eea1201b5e702e22.js"),void 0),"./TabbookWidget.vue":()=>lt(()=>at.import("./TabbookWidget-D3FrIoV4-e06adf708de31869bff4.js"),void 0),"./TextboxWidget.vue":()=>lt(()=>at.import("./TextboxWidget-f6wEcoI0-40e18e2c50ee31ccd381.js"),void 0),"./TextfieldWidget.vue":()=>lt(()=>at.import("./TextfieldWidget-D72Sey-h-91a2aac704f5a971cb37.js"),void 0),"./TimeWidget.vue":()=>lt(()=>at.import("./TimeWidget-BBuxr7Db-4478ed91a6bda559bcd5.js"),void 0),"./TitleWidget.vue":()=>lt(()=>at.import("./TitleWidget-Dfp5mPH2-cbf4ea6dbac6faf880ca.js"),void 0),"./ValueWidget.vue":()=>lt(()=>at.import("./ValueWidget-CpptSOvJ-c79b03e200fceaed3b72.js"),void 0),"./ValuelimitsbarWidget.vue":()=>lt(()=>at.import("./ValuelimitsbarWidget-AgeOlPAV-5ecbdfb993465212a981.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>lt(()=>at.import("./ValuelimitscolumnWidget-CfTt7Q8a-5f88ad7096c065616966.js"),void 0),"./ValuerangebarWidget.vue":()=>lt(()=>at.import("./ValuerangebarWidget-E3CtttJk-e1f7f4f4d4deb9b59e1d.js"),void 0),"./VerticalWidget.vue":()=>lt(()=>at.import("./VerticalWidget-B_eheXmK-caf636d80032bd7d00de.js"),void 0),"./VerticalboxWidget.vue":()=>lt(()=>at.import("./VerticalboxWidget-Bf8XJiY9-482c288cf9bc399495ad.js"),void 0)}),MS=Object.entries(IS).reduce((e,[n,t])=>{n=n.split("/").pop();const r=vS(RS(n.replace(/\.\w+$/,"")));return{...e,[r]:Tg(t)}},{}),p3=ar("w",{components:MS});function Wy(e,n){return function(){return e.apply(n,arguments)}}const{toString:LS}=Object.prototype,{getPrototypeOf:Za}=Object,{iterator:Hl,toStringTag:Hy}=Symbol,tu=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),Ul=(e,n)=>{let t=e;const r=[];for(;t!=null&&t!==Object.prototype;){if(r.indexOf(t)!==-1)return!1;if(r.push(t),tu(t,n))return!0;t=Za(t)}return!1},OS=(e,n)=>e!=null&&Ul(e,n)?e[n]:void 0,Zd=(e=>n=>{const t=LS.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),so=e=>(e=e.toLowerCase(),n=>Zd(n)===e),nu=e=>n=>typeof n===e,{isArray:ia}=Array,oa=nu("undefined");function Xa(e){return e!==null&&!oa(e)&&e.constructor!==null&&!oa(e.constructor)&&Ri(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Uy=so("ArrayBuffer");function NS(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Uy(e.buffer),n}const DS=nu("string"),Ri=nu("function"),Vy=nu("number"),Qa=e=>e!==null&&typeof e=="object",PS=e=>e===!0||e===!1,ru=e=>{if(!Qa(e))return!1;const n=Za(e);return(n===null||n===Object.prototype||Za(n)===null)&&!Ul(e,Hy)&&!Ul(e,Hl)},BS=e=>{if(!Qa(e)||Xa(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},zS=so("Date"),FS=so("File"),jS=e=>!!(e&&typeof e.uri<"u"),WS=e=>e&&typeof e.getParts<"u",HS=so("Blob"),US=so("FileList"),VS=so("Set"),qS=e=>Qa(e)&&Ri(e.pipe);function GS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const qy=GS(),Gy=typeof qy.FormData<"u"?qy.FormData:void 0,KS=e=>{if(!e)return!1;if(Gy&&e instanceof Gy)return!0;const n=Za(e);if(!n||n===Object.prototype||!Ri(e.append))return!1;const t=Zd(e);return t==="formdata"||t==="object"&&Ri(e.toString)&&e.toString()==="[object FormData]"},YS=so("URLSearchParams"),[JS,ZS,XS,QS]=["ReadableStream","Request","Response","Headers"].map(so),e$=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vl(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,h;if(typeof e!="object"&&(e=[e]),ia(e))for(r=0,h=e.length;r<h;r++)n.call(null,e[r],r,e);else{if(Xa(e))return;const d=t?Object.getOwnPropertyNames(e):Object.keys(e),g=d.length;let v;for(r=0;r<g;r++)v=d[r],n.call(null,e[v],v,e)}}function Ky(e,n){if(Xa(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,h;for(;r-- >0;)if(h=t[r],n===h.toLowerCase())return h;return null}const sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yy=e=>!oa(e)&&e!==sa;function Xd(...e){const{caseless:n,skipUndefined:t}=Yy(this)&&this||{},r={},h=(d,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=n&&typeof g=="string"&&Ky(r,g)||g,l=tu(r,v)?r[v]:void 0;ru(l)&&ru(d)?r[v]=Xd(l,d):ru(d)?r[v]=Xd({},d):ia(d)?r[v]=d.slice():(!t||!oa(d))&&(r[v]=d)};for(let d=0,g=e.length;d<g;d++){const v=e[d];if(!v||Xa(v)||(Vl(v,h),typeof v!="object"||ia(v)))continue;const l=Object.getOwnPropertySymbols(v);for(let f=0;f<l.length;f++){const s=l[f];d$.call(v,s)&&h(v[s],s)}}return r}const t$=(e,n,t,{allOwnKeys:r}={})=>(Vl(n,(h,d)=>{t&&Ri(h)?Object.defineProperty(e,d,{__proto__:null,value:Wy(h,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,d,{__proto__:null,value:h,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),n$=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),r$=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:n.prototype}),t&&Object.assign(e.prototype,t)},i$=(e,n,t,r)=>{let h,d,g;const v={};if(n=n||{},e==null)return n;do{for(h=Object.getOwnPropertyNames(e),d=h.length;d-- >0;)g=h[d],(!r||r(g,e,n))&&!v[g]&&(n[g]=e[g],v[g]=!0);e=t!==!1&&Za(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},o$=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},s$=e=>{if(!e)return null;if(ia(e))return e;let n=e.length;if(!Vy(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},a$=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Za(Uint8Array)),l$=(e,n)=>{const t=(e&&e[Hl]).call(e);let r;for(;(r=t.next())&&!r.done;){const h=r.value;n.call(e,h[0],h[1])}},c$=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},u$=so("HTMLFormElement"),h$=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,t,r){return t.toUpperCase()+r}),{propertyIsEnumerable:d$}=Object.prototype,p$=so("RegExp"),Jy=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};Vl(t,(h,d)=>{let g;(g=n(h,d,e))!==!1&&(r[d]=g||h)}),Object.defineProperties(e,r)},f$=e=>{Jy(e,(n,t)=>{if(Ri(e)&&["arguments","caller","callee"].includes(t))return!1;const r=e[t];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 '"+t+"'")})}})},g$=(e,n)=>{const t={},r=h=>{h.forEach(d=>{t[d]=!0})};return ia(e)?r(e):r(String(e).split(n)),t},m$=()=>{},v$=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function y$(e){return!!(e&&Ri(e.append)&&e[Hy]==="FormData"&&e[Hl])}const b$=e=>{const n=new WeakSet,t=r=>{if(Qa(r)){if(n.has(r))return;if(Xa(r))return r;if(!("toJSON"in r)){n.add(r);let h;if(VS(r)){h=[];for(const d of r){const g=t(d);!oa(g)&&h.push(g)}}else h=ia(r)?[]:{},Vl(r,(d,g)=>{const v=t(d);!oa(v)&&(h[g]=v)});return n.delete(r),h}}return r};return t(e)},w$=so("AsyncFunction"),x$=e=>e&&(Qa(e)||Ri(e))&&Ri(e.then)&&Ri(e.catch),Zy=((e,n)=>e?setImmediate:n?((t,r)=>(sa.addEventListener("message",({source:h,data:d})=>{h===sa&&d===t&&r.length&&r.shift()()},!1),h=>{r.push(h),sa.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ri(sa.postMessage)),C$=typeof queueMicrotask<"u"?queueMicrotask.bind(sa):typeof process<"u"&&process.nextTick||Zy,Xy=e=>e!=null&&Ri(e[Hl]),_$=e=>e!=null&&Ul(e,Hl)&&Xy(e),me={isArray:ia,isArrayBuffer:Uy,isBuffer:Xa,isFormData:KS,isArrayBufferView:NS,isString:DS,isNumber:Vy,isBoolean:PS,isObject:Qa,isPlainObject:ru,isEmptyObject:BS,isReadableStream:JS,isRequest:ZS,isResponse:XS,isHeaders:QS,isUndefined:oa,isDate:zS,isFile:FS,isReactNativeBlob:jS,isReactNative:WS,isBlob:HS,isRegExp:p$,isFunction:Ri,isStream:qS,isURLSearchParams:YS,isTypedArray:a$,isFileList:US,forEach:Vl,merge:Xd,extend:t$,trim:e$,stripBOM:n$,inherits:r$,toFlatObject:i$,kindOf:Zd,kindOfTest:so,endsWith:o$,toArray:s$,forEachEntry:l$,matchAll:c$,isHTMLForm:u$,hasOwnProperty:tu,hasOwnProp:tu,hasOwnInPrototypeChain:Ul,getSafeProp:OS,reduceDescriptors:Jy,freezeMethods:f$,toObjectSet:g$,toCamelCase:h$,noop:m$,toFiniteNumber:v$,findKey:Ky,global:sa,isContextDefined:Yy,isSpecCompliantForm:y$,toJSONObject:b$,isAsyncFn:w$,isThenable:x$,setImmediate:Zy,asap:C$,isIterable:Xy,isSafeIterable:_$},k$=me.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"]),A$=e=>{const n={};let t,r,h;return e&&e.split(`
1472
+ `).forEach(function(d){h=d.indexOf(":"),t=d.substring(0,h).trim().toLowerCase(),r=d.substring(h+1).trim();const g=me.hasOwnProp(n,t);!t||g&&me.hasOwnProp(k$,t)||(t==="set-cookie"?g?n[t].push(r):n[t]=[r]:n[t]=g?n[t]+", "+r:r)}),n};function S$(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}const $$=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),T$=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Qd(e,n){return me.isArray(e)?e.map(t=>Qd(t,n)):S$(String(e).replace(n,""))}const E$=e=>Qd(e,$$),R$=e=>Qd(e,T$);function Qy(e){const n=Object.create(null);return me.forEach(e.toJSON(),(t,r)=>{n[r]=R$(t)}),n}const e0=Symbol("internals");function ql(e){return e&&String(e).trim().toLowerCase()}function iu(e){return e===!1||e==null?e:me.isArray(e)?e.map(iu):E$(String(e))}function I$(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const M$=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ep(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}function L$(e){const n=e.length-1;if(n<1||e.charCodeAt(0)!==34||e.charCodeAt(n)!==34)return e;let t="";for(let r=1;r<n;r++){const h=e.charCodeAt(r);if(h===34||h===92&&(r+=1,r>=n))return e;t+=e[r]}return t}function O$(e){const n=Object.create(null),t=String(e);let r=0,h=!1,d=!1;function g(v){const l=ep(t.slice(r,v)),f=l.indexOf("=");if(f<1)return;const s=ep(l.slice(0,f));if(!M$.test(s))return;const a=s.toLowerCase();if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=ep(l.slice(f+1));n[a]=L$(u)}for(let v=0;v<t.length;v++){const l=t.charCodeAt(v);h?d?d=!1:l===92?d=!0:l===34&&(h=!1):l===34?h=!0:(l===44||l===59)&&(g(v),r=v+1)}return g(t.length),n}const N$=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tp(e,n,t,r,h){if(me.isFunction(r))return r.call(this,n,t);if(h&&(n=t),!!me.isString(n)){if(me.isString(r))return n.indexOf(r)!==-1;if(me.isRegExp(r))return r.test(n)}}function D$(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function P$(e,n){const t=me.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{__proto__:null,value:function(h,d,g){return this[r].call(this,n,h,d,g)},configurable:!0})})}let ii=class{constructor(n){n&&this.set(n)}set(n,t,r){const h=this;function d(v,l,f){const s=ql(l);if(!s)return;const a=me.findKey(h,s);(!a||h[a]===void 0||f===!0||f===void 0&&h[a]!==!1)&&(h[a||l]=iu(v))}const g=(v,l)=>me.forEach(v,(f,s)=>d(f,s,l));if(me.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(me.isString(n)&&(n=n.trim())&&!N$(n))g(A$(n),t);else if(me.isObject(n)&&me.isSafeIterable(n)){let v=Object.create(null),l,f;for(const s of n){if(!me.isArray(s))throw new TypeError("Object iterator must return a key-value pair");f=s[0],me.hasOwnProp(v,f)?(l=v[f],v[f]=me.isArray(l)?[...l,s[1]]:[l,s[1]]):v[f]=s[1]}g(v,t)}else n!=null&&d(t,n,r);return this}get(n,t){if(n=ql(n),n){const r=me.findKey(this,n);if(r){const h=this[r];if(!t)return h;if(t===!0)return I$(h);if(me.isFunction(t))return t.call(this,h,r);if(me.isRegExp(t))return t.exec(h);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=ql(n),n){const r=me.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||tp(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let h=!1;function d(g){if(g=ql(g),g){const v=me.findKey(r,g);v&&(!t||tp(r,r[v],v,t))&&(delete r[v],h=!0)}}return me.isArray(n)?n.forEach(d):d(n),h}clear(n){const t=Object.keys(this);let r=t.length,h=!1;for(;r--;){const d=t[r];(!n||tp(this,this[d],d,n,!0))&&(delete this[d],h=!0)}return h}normalize(n){const t=this,r={};return me.forEach(this,(h,d)=>{const g=me.findKey(r,d);if(g){t[g]=iu(h),delete t[d];return}const v=n?D$(d):String(d).trim();v!==d&&delete t[d],t[v]=iu(h),r[v]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return me.forEach(this,(r,h)=>{r!=null&&r!==!1&&(t[h]=n&&me.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
1473
+ `)}getSetCookie(){const n=this.get("set-cookie");return me.isArray(n)?n:n==null||n===!1?[]:[n]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static parseParameters(n){return O$(n)}static concat(n,...t){const r=new this(n);return t.forEach(h=>r.set(h)),r}static accessor(n){const t=(this[e0]=this[e0]={accessors:{}}).accessors,r=this.prototype;function h(d){const g=ql(d);t[g]||(P$(r,d),t[g]=!0)}return me.isArray(n)?n.forEach(h):h(n),this}};ii.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),me.reduceDescriptors(ii.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),me.freezeMethods(ii);const ou="[REDACTED ****]";function B$(e){if(me.hasOwnProp(e,"toJSON"))return!0;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;){if(me.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function z$(e,n){const t=new Set(n.map(d=>String(d).toLowerCase())),r=[],h=d=>{if(d===null||typeof d!="object"||me.isBuffer(d))return d;if(r.indexOf(d)!==-1)return;d instanceof ii&&(d=d.toJSON()),r.push(d);let g;if(me.isArray(d))g=[],d.forEach((v,l)=>{const f=h(v);me.isUndefined(f)||(g[l]=f)});else{if(!me.isPlainObject(d)&&B$(d))return r.pop(),d;g=Object.create(null);for(const[v,l]of Object.entries(d)){const f=t.has(v.toLowerCase())?ou:h(l);me.isUndefined(f)||(g[v]=f)}}return r.pop(),g};return h(e)}function t0(e){try{return String(e)}catch{return""}}function F$(e){return e.errors.map(n=>{try{return n&&n.message?t0(n.message):t0(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let et=class CC extends Error{static from(n,t,r,h,d,g){let v=n.message;!v&&me.isArray(n.errors)&&n.errors.length&&(v=F$(n));const l=new CC(v,t||n.code,r,h,d);return Object.defineProperty(l,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),l.name=n.name,n.status!=null&&l.status==null&&(l.status=n.status),g&&Object.assign(l,g),l}constructor(n,t,r,h,d){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),h&&(this.request=h),d&&(this.response=d,this.status=d.status)}toJSON(){const n=this.config,t=n&&me.hasOwnProp(n,"redact")?n.redact:void 0,r=me.isArray(t)&&t.length>0?z$(n,t):me.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}}};et.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",et.ERR_BAD_OPTION="ERR_BAD_OPTION",et.ECONNABORTED="ECONNABORTED",et.ETIMEDOUT="ETIMEDOUT",et.ECONNREFUSED="ECONNREFUSED",et.ERR_NETWORK="ERR_NETWORK",et.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",et.ERR_DEPRECATED="ERR_DEPRECATED",et.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",et.ERR_BAD_REQUEST="ERR_BAD_REQUEST",et.ERR_CANCELED="ERR_CANCELED",et.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",et.ERR_INVALID_URL="ERR_INVALID_URL",et.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const j$=null,n0=100;function np(e){return me.isPlainObject(e)||me.isArray(e)}function r0(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function rp(e,n,t){return e?e.concat(n).map(function(r,h){return r=r0(r),!t&&h?"["+r+"]":r}).join(t?".":""):n}function W$(e){return me.isArray(e)&&!e.some(np)}const H$=me.toFlatObject(me,{},null,function(e){return/^is[A-Z]/.test(e)});function su(e,n,t){if(!me.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=me.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!me.isUndefined(x[b])});const r=t.metaTokens,h=t.visitor||i,d=t.dots,g=t.indexes,v=t.Blob||typeof Blob<"u"&&Blob,l=t.maxDepth===void 0?n0:t.maxDepth,f=v&&me.isSpecCompliantForm(n),s=[];if(!me.isFunction(h))throw new TypeError("visitor must be a function");function a(b){if(b===null)return"";if(me.isDate(b))return b.toISOString();if(me.isBoolean(b))return b.toString();if(!f&&me.isBlob(b))throw new et("Blob is not supported. Use a Buffer instead.");if(me.isArrayBuffer(b)||me.isTypedArray(b)){if(f&&typeof v=="function")return new v([b]);throw new et("Blob is not supported. Use a Buffer instead.",et.ERR_NOT_SUPPORT)}return b}function u(b){if(b>l)throw new et("Object is too deeply nested ("+b+" levels). Max depth: "+l,et.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(b,x){if(l===1/0)return JSON.stringify(b);const I=[];return JSON.stringify(b,function($,_){if(!me.isObject(_))return _;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(_),u(x+I.length-1),_})}function i(b,x,I){let $=b;if(me.isReactNative(n)&&me.isReactNativeBlob(b))return n.append(rp(I,x,d),a(b)),!1;if(b&&!I&&typeof b=="object"){if(me.endsWith(x,"{}"))x=r?x:x.slice(0,-2),b=p(b,1);else if(me.isArray(b)&&W$(b)||(me.isFileList(b)||me.endsWith(x,"[]"))&&($=me.toArray(b)))return x=r0(x),$.forEach(function(_,C){!(me.isUndefined(_)||_===null)&&n.append(g===!0?rp([x],C,d):g===null?x:x+"[]",a(_))}),!1}return np(b)?!0:(n.append(rp(I,x,d),a(b)),!1)}const c=Object.assign(H$,{defaultVisitor:i,convertValue:a,isVisitable:np});function m(b,x,I=0){if(!me.isUndefined(b)){if(u(I),s.indexOf(b)!==-1)throw new Error("Circular reference detected in "+x.join("."));s.push(b),me.forEach(b,function($,_){(!(me.isUndefined($)||$===null)&&h.call(n,$,me.isString(_)?_.trim():_,x,c))===!0&&m($,x?x.concat(_):[_],I+1)}),s.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return m(e),n}function i0(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(t){return n[t]})}function ip(e,n){this._pairs=[],e&&su(e,this,n)}const o0=ip.prototype;o0.append=function(e,n){this._pairs.push([e,n])},o0.toString=function(e){const n=e?t=>e.call(this,t,i0):i0;return this._pairs.map(function(t){return n(t[0])+"="+n(t[1])},"").join("&")};function U$(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function s0(e,n,t){if(!n)return e;e=e||"";const r=me.isFunction(t)?{serialize:t}:t,h=me.getSafeProp(r,"encode")||U$,d=me.getSafeProp(r,"serialize");let g;if(d?g=d(n,r):g=me.isURLSearchParams(n)?n.toString():new ip(n,r).toString(h),g){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}let a0=class{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,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){me.forEach(this.handlers,function(t){t!==null&&n(t)})}};const op={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},V$=typeof URLSearchParams<"u"?URLSearchParams:ip,q$=typeof FormData<"u"?FormData:null,G$=typeof Blob<"u"?Blob:null,K$={isBrowser:!0,classes:{URLSearchParams:V$,FormData:q$,Blob:G$},protocols:["http","https","file","blob","url","data"]},sp=typeof window<"u"&&typeof document<"u",ap=typeof navigator=="object"&&navigator||void 0,Y$=sp&&(!ap||["ReactNative","NativeScript","NS"].indexOf(ap.product)<0),J$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Z$=sp&&window.location.href||"http://localhost",X$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sp,hasStandardBrowserEnv:Y$,hasStandardBrowserWebWorkerEnv:J$,navigator:ap,origin:Z$},Symbol.toStringTag,{value:"Module"})),Kr={...X$,...K$};function Q$(e,n){return su(e,new Kr.classes.URLSearchParams,{visitor:function(t,r,h,d){return Kr.isNode&&me.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...n})}const l0=n0;function c0(e){if(e>l0)throw new et("FormData field is too deeply nested ("+e+" levels). Max depth: "+l0,et.ERR_FORM_DATA_DEPTH_EXCEEDED)}function eT(e){const n=[],t=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=t.exec(e))!==null;)c0(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function tT(e){const n={},t=Object.keys(e);let r;const h=t.length;let d;for(r=0;r<h;r++)d=t[r],n[d]=e[d];return n}function u0(e){function n(t,r,h,d){c0(d);let g=t[d++];if(g==="__proto__")return!0;const v=Number.isFinite(+g),l=d>=t.length;return g=!g&&me.isArray(h)?h.length:g,l?(me.hasOwnProp(h,g)?h[g]=me.isArray(h[g])?h[g].concat(r):[h[g],r]:h[g]=r,!v):((!me.hasOwnProp(h,g)||!me.isObject(h[g]))&&(h[g]=[]),n(t,r,h[g],d)&&me.isArray(h[g])&&(h[g]=tT(h[g])),!v)}if(me.isFormData(e)&&me.isFunction(e.entries)){const t={};return me.forEachEntry(e,(r,h)=>{n(eT(r),h,t,0)}),t}return null}const el=(e,n)=>e!=null&&me.hasOwnProp(e,n)?e[n]:void 0;function nT(e,n,t){if(me.isString(e))try{return(n||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const Gl={transitional:op,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",r=t.indexOf("application/json")>-1,h=me.isObject(e);if(h&&me.isHTMLForm(e)&&(e=new FormData(e)),me.isFormData(e))return r?JSON.stringify(u0(e)):e;if(me.isArrayBuffer(e)||me.isBuffer(e)||me.isStream(e)||me.isFile(e)||me.isBlob(e)||me.isReadableStream(e))return e;if(me.isArrayBufferView(e))return e.buffer;if(me.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(h){const g=el(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return Q$(e,g).toString();if((d=me.isFileList(e))||t.indexOf("multipart/form-data")>-1){const v=el(this,"env"),l=v&&v.FormData;return su(d?{"files[]":e}:e,l&&new l,g)}}return h||r?(n.setContentType("application/json",!1),nT(e)):e}],transformResponse:[function(e){const n=el(this,"transitional")||Gl.transitional,t=n&&n.forcedJSONParsing,r=el(this,"responseType"),h=r==="json";if(me.isResponse(e)||me.isReadableStream(e))return e;if(e&&me.isString(e)&&(t&&!r||h)){const d=!(n&&n.silentJSONParsing)&&h;try{return JSON.parse(e,el(this,"parseReviver"))}catch(g){if(d)throw g.name==="SyntaxError"?et.from(g,et.ERR_BAD_RESPONSE,this,null,el(this,"response")):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kr.classes.FormData,Blob:Kr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch","query"],e=>{Gl.headers[e]={}});function lp(e,n){const t=this||Gl,r=n||t,h=ii.from(r.headers);let d=r.data;return me.forEach(e,function(g){d=g.call(t,d,h.normalize(),n?n.status:void 0)}),h.normalize(),d}function h0(e){return!!(e&&e.__CANCEL__)}let Kl=class extends et{constructor(n,t,r){super(n??"canceled",et.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function d0(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new et("Request failed with status code "+t.status,t.status>=400&&t.status<500?et.ERR_BAD_REQUEST:et.ERR_BAD_RESPONSE,t.config,t.request,t))}function rT(e){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return n&&n[1]||""}function iT(e,n){e=e||10;const t=new Array(e),r=new Array(e);let h=0,d=0,g;return n=n!==void 0?n:1e3,function(v){const l=Date.now(),f=r[d];g||(g=l),t[h]=v,r[h]=l;let s=d,a=0;for(;s!==h;)a+=t[s++],s=s%e;if(h=(h+1)%e,h===d&&(d=(d+1)%e),l-g<n)return;const u=f&&l-f;return u?Math.round(a*1e3/u):void 0}}function oT(e,n){let t=0,r=1e3/n,h,d;const g=(v,l=Date.now())=>{t=l,h=null,d&&(clearTimeout(d),d=null),e(...v)};return[(...v)=>{const l=Date.now(),f=l-t;f>=r?g(v,l):(h=v,d||(d=setTimeout(()=>{d=null,g(h)},r-f)))},()=>h&&g(h)]}const au=(e,n,t=3)=>{let r=0;const h=iT(50,250);return oT(d=>{if(!d||typeof d.loaded!="number")return;const g=d.loaded,v=d.lengthComputable?d.total:void 0,l=Math.max(0,v!=null?Math.min(g,v):g),f=Math.max(0,l-r),s=h(f);r=Math.max(r,l);const a={loaded:l,total:v,progress:v?l/v:void 0,bytes:f,rate:s||void 0,estimated:s&&v?(v-l)/s:void 0,event:d,lengthComputable:v!=null,[n?"download":"upload"]:!0};e(a)},t)},p0=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},f0=(e,n=me.asap)=>(...t)=>n(()=>e(...t)),sT=Kr.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,Kr.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(Kr.origin),Kr.navigator&&/(msie|trident)/i.test(Kr.navigator.userAgent)):()=>!0,aT=Kr.hasStandardBrowserEnv?{write(e,n,t,r,h,d,g){if(typeof document>"u")return;const v=[`${e}=${encodeURIComponent(n)}`];me.isNumber(t)&&v.push(`expires=${new Date(t).toUTCString()}`),me.isString(r)&&v.push(`path=${r}`),me.isString(h)&&v.push(`domain=${h}`),d===!0&&v.push("secure"),me.isString(g)&&v.push(`SameSite=${g}`),document.cookie=v.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),h=r.indexOf("=");if(h!==-1&&r.slice(0,h)===e)try{return decodeURIComponent(r.slice(h+1))}catch{return r.slice(h+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function lT(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cT(e,n){if(!n)return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return e.slice(0,t)+"/"+n.replace(/^\/+/,"")}const uT=/^https?:(?!\/\/)/i,hT=/[\t\n\r]/g;function dT(e){let n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;return e.slice(n)}function pT(e){return dT(e).replace(hT,"")}function fT(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(n,t,r="")=>`${t}${r}${ou}`)}function gT(e){const n=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ou}@`),t=n.indexOf("#"),r=(t===-1?n:n.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ou}`);return t===-1?r:`${r}#${fT(n.slice(t+1))}`}function g0(e,n){if(typeof e=="string"){const t=pT(e);if(uT.test(t))throw new et(`Invalid URL ${JSON.stringify(gT(t))}: missing "//" after protocol`,et.ERR_INVALID_URL,n)}}function m0(e,n,t,r){g0(n,r);let h=!lT(n);return e&&(h||t===!1)?(g0(e,r),cT(e,n)):n}const v0=e=>e instanceof ii?{...e}:e,mT=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(n=>Object.getOwnPropertyDescriptor(e,n).enumerable)):Object.keys(e);function aa(e,n){e=e||{},n=n||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(s,a,u,p){return me.isPlainObject(s)&&me.isPlainObject(a)?me.merge.call({caseless:p},s,a):me.isPlainObject(a)?me.merge({},a):me.isArray(a)?a.slice():a}function h(s,a,u,p){if(me.isUndefined(a)){if(!me.isUndefined(s))return r(void 0,s,u,p)}else return r(s,a,u,p)}function d(s,a){if(!me.isUndefined(a))return r(void 0,a)}function g(s,a){if(me.isUndefined(a)){if(!me.isUndefined(s))return r(void 0,s)}else return r(void 0,a)}function v(s){const a=me.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!me.isUndefined(a))if(me.isPlainObject(a)){if(me.hasOwnProp(a,s))return a[s]}else return;const u=me.hasOwnProp(e,"transitional")?e.transitional:void 0;if(me.isPlainObject(u)&&me.hasOwnProp(u,s))return u[s]}function l(s,a,u){if(me.hasOwnProp(n,u))return r(s,a);if(me.hasOwnProp(e,u))return r(void 0,s)}const f={url:d,method:d,data:d,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:l,headers:(s,a,u)=>h(v0(s),v0(a),u,!0)};return me.forEach(mT({...e,...n}),function(s){if(s==="__proto__"||s==="constructor"||s==="prototype")return;const a=me.hasOwnProp(f,s)?f[s]:h,u=me.hasOwnProp(e,s)?e[s]:void 0,p=me.hasOwnProp(n,s)?n[s]:void 0,i=a(u,p,s);me.isUndefined(i)&&a!==l||(t[s]=i)}),me.hasOwnProp(n,"validateStatus")&&me.isUndefined(n.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(me.hasOwnProp(e,"validateStatus")?t.validateStatus=r(void 0,e.validateStatus):delete t.validateStatus),t}const vT=["content-type","content-length"];function yT(e,n,t){if(t!=="content-only"){e.set(n);return}Object.entries(n||{}).forEach(([r,h])=>{vT.includes(r.toLowerCase())&&e.set(r,h)})}const bT=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16)));function y0(e){const n=aa({},e),t=u=>me.hasOwnProp(n,u)?n[u]:void 0,r=t("data");let h=t("withXSRFToken");const d=t("xsrfHeaderName"),g=t("xsrfCookieName");let v=t("headers");const l=t("auth"),f=t("baseURL"),s=t("allowAbsoluteUrls"),a=t("url");if(n.headers=v=ii.from(v),n.url=s0(m0(f,a,s,n),t("params"),t("paramsSerializer")),l){const u=me.getSafeProp(l,"username")||"",p=me.getSafeProp(l,"password")||"";try{v.set("Authorization","Basic "+btoa(u+":"+(p?bT(p):"")))}catch(i){throw et.from(i,et.ERR_BAD_OPTION_VALUE,e)}}if(me.isFormData(r)&&(Kr.hasStandardBrowserEnv||Kr.hasStandardBrowserWebWorkerEnv||me.isReactNative(r)?v.setContentType(void 0):me.isFunction(r.getHeaders)&&yT(v,r.getHeaders(),t("formDataHeaderPolicy"))),Kr.hasStandardBrowserEnv&&(me.isFunction(h)&&(h=h(n)),h===!0||h==null&&sT(n.url))){const u=d&&g&&aT.read(g);u&&v.set(d,u)}return n}const wT=typeof XMLHttpRequest<"u",xT=wT&&function(e){return new Promise(function(n,t){const r=y0(e);let h=r.data;const d=ii.from(r.headers).normalize();let{responseType:g,onUploadProgress:v,onDownloadProgress:l}=r,f,s,a,u,p;function i(){u&&u(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=ii.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),I={data:!g||g==="text"||g==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:e,request:c};d0(function($){n($),i()},function($){t($),i()},I),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(m)},c.onabort=function(){c&&(t(new et("Request aborted",et.ECONNABORTED,e,c)),i(),c=null)},c.onerror=function(x){const I=x&&x.message?x.message:"Network Error",$=new et(I,et.ERR_NETWORK,e,c);$.event=x||null,t($),i(),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||op;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new et(x,I.clarifyTimeoutError?et.ETIMEDOUT:et.ECONNABORTED,e,c)),i(),c=null},h===void 0&&d.setContentType(null),"setRequestHeader"in c&&me.forEach(Qy(d),function(x,I){c.setRequestHeader(I,x)}),me.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),g&&g!=="json"&&(c.responseType=r.responseType),l&&([a,p]=au(l,!0),c.addEventListener("progress",a)),v&&c.upload&&([s,u]=au(v),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{c&&(t(!x||x.type?new Kl(null,e,c):x),c.abort(),i(),c=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const b=rT(r.url);if(b&&!Kr.protocols.includes(b)){t(new et("Unsupported protocol "+b+":",et.ERR_BAD_REQUEST,e)),i();return}c.send(h||null)})},CT=(e,n)=>{if(e=e?e.filter(Boolean):[],!n&&!e.length)return;const t=new AbortController;let r=!1;const h=function(l){if(!r){r=!0,g();const f=l instanceof Error?l:this.reason;t.abort(f instanceof et?f:new Kl(f instanceof Error?f.message:f))}};let d=n&&setTimeout(()=>{d=null,h(new et(`timeout of ${n}ms exceeded`,et.ETIMEDOUT))},n);const g=()=>{e&&(d&&clearTimeout(d),d=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(h):l.removeEventListener("abort",h)}),e=null)};e.forEach(l=>{if(!r){if(l.aborted){h.call(l);return}l.addEventListener("abort",h,{once:!0})}});const{signal:v}=t;return v.unsubscribe=()=>me.asap(g),v},_T=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,h;for(;r<t;)h=r+n,yield e.slice(r,h),r=h},kT=async function*(e,n){for await(const t of AT(e))yield*_T(t,n)},AT=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},b0=(e,n,t,r)=>{const h=kT(e,n);let d=0,g,v=l=>{g||(g=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:s}=await h.next();if(f){v(),l.close();return}let a=s.byteLength;if(t){let u=d+=a;t(u)}l.enqueue(new Uint8Array(s))}catch(f){throw v(f),f}},cancel(l){return v(l),h.return()}},{highWaterMark:2})},w0=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,x0=(e,n,t)=>n+2<t&&w0(e.charCodeAt(n+1))&&w0(e.charCodeAt(n+2)),C0=e=>e<=57?e-48:(e&223)-55,ST=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,$T=e=>e===9||e===10||e===12||e===13||e===32,TT=e=>{const n=Math.floor(e/4),t=e%4;return n*3+(t===2?1:t===3?2:0)},ET=e=>{const n=e.length;let t=0;return n>0&&e.charCodeAt(n-1)===61&&(t++,n>1&&e.charCodeAt(n-2)===61&&t++),Math.floor((n-t)*3/4)},RT=e=>{const n=e.length;let t=0,r=0,h=!1;for(let d=0;d<n;d++){let g=e.charCodeAt(d);if(g===37&&x0(e,d,n)&&(g=C0(e.charCodeAt(d+1))*16+C0(e.charCodeAt(d+2)),d+=2),!$T(g)){if(g===61){r++;continue}if(!ST(g)||r>0){h=!0;continue}t++}}return h||r>2||r>0&&(t+r)%4!==0||t%4===1?ET(e):TT(t)},IT=(e,n)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),h=e.slice(t+1);if(/;base64/i.test(r))return n(h);let d=0;for(let g=0,v=h.length;g<v;g++){const l=h.charCodeAt(g);if(l===37&&x0(h,g,v))d+=1,g+=2;else if(l<128)d+=1;else if(l<2048)d+=2;else if(l>=55296&&l<=56319&&g+1<v){const f=h.charCodeAt(g+1);f>=56320&&f<=57343?(d+=4,g++):d+=3}else d+=3}return d};function MT(e){const n=typeof e=="string"?e.indexOf("#"):-1;return IT(n===-1?e:e.slice(0,n),RT)}const cp="1.19.0",_0=64*1024,{isFunction:lu}=me,LT=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16))),k0=e=>{if(!me.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},A0=(e,...n)=>{try{return!!e(...n)}catch{return!1}},OT=e=>{const n=e.indexOf("://");let t=e;return n!==-1&&(t=t.slice(n+3)),t.includes("@")||t.includes(":")},NT=e=>{const n=me.global!==void 0&&me.global!==null?me.global:globalThis,{ReadableStream:t,TextEncoder:r}=n;e=me.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);const{fetch:h,Request:d,Response:g}=e,v=h?lu(h):typeof fetch=="function",l=lu(d),f=lu(g);if(!v)return!1;const s=v&&lu(t),a=v&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new d(b).arrayBuffer())),u=l&&s&&A0(()=>{let b=!1;const x=new d(Kr.origin,{body:new t,method:"POST",get duplex(){return b=!0,"half"}}),I=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!I}),p=f&&s&&A0(()=>me.isReadableStream(new g("").body)),i={stream:p&&(b=>b.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!i[b]&&(i[b]=(x,I)=>{let $=x&&x[b];if($)return $.call(x);throw new et(`Response type '${b}' is not supported`,et.ERR_NOT_SUPPORT,I)})});const c=async b=>{if(b==null)return 0;if(me.isBlob(b))return b.size;if(me.isSpecCompliantForm(b))return(await new d(Kr.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(me.isArrayBufferView(b)||me.isArrayBuffer(b))return b.byteLength;if(me.isURLSearchParams(b)&&(b=b+""),me.isString(b))return(await a(b)).byteLength},m=async(b,x)=>me.toFiniteNumber(b.getContentLength())??c(x);return async b=>{let{url:x,method:I,data:$,signal:_,cancelToken:C,timeout:O,onDownloadProgress:P,onUploadProgress:L,responseType:T,headers:F,withCredentials:D="same-origin",fetchOptions:M,maxContentLength:S,maxBodyLength:k}=y0(b);const N=me.isNumber(S)&&S>-1,j=me.isNumber(k)&&k>-1,U=oe=>me.hasOwnProp(b,oe)?b[oe]:void 0;let G=h||fetch;T=T?(T+"").toLowerCase():"text";let J=CT([_,C&&C.toAbortSignal()],O),Q=null;const le=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let ie,ue=null;const pe=()=>new et("Request body larger than maxBodyLength limit",et.ERR_BAD_REQUEST,b,Q);try{let oe;const re=U("auth");if(re){const Ie=me.getSafeProp(re,"username")||"",Tt=me.getSafeProp(re,"password")||"";oe={username:Ie,password:Tt}}if(OT(x)){const Ie=new URL(x,Kr.origin);if(!oe&&(Ie.username||Ie.password)){const Tt=k0(Ie.username),mt=k0(Ie.password);oe={username:Tt,password:mt}}(Ie.username||Ie.password)&&(Ie.username="",Ie.password="",x=Ie.href)}if(oe&&(F.delete("authorization"),F.set("Authorization","Basic "+btoa(LT((oe.username||"")+":"+(oe.password||""))))),N&&typeof x=="string"&&x.startsWith("data:")&&MT(x)>S)throw new et("maxContentLength size of "+S+" exceeded",et.ERR_BAD_RESPONSE,b,Q);if(j&&I!=="get"&&I!=="head"){const Ie=await c($);if(typeof Ie=="number"&&isFinite(Ie)&&(ie=Ie,Ie>k))throw pe()}const Ce=j&&(me.isReadableStream($)||me.isStream($)),ke=(Ie,Tt,mt)=>b0(Ie,_0,Wt=>{if(j&&Wt>k)throw ue=pe();Tt&&Tt(Wt)},mt);if(u&&I!=="get"&&I!=="head"&&(L||Ce)){if(ie=ie??await m(F,$),ie!==0||Ce){let Ie=new d(x,{method:"POST",body:$,duplex:"half"}),Tt;if(me.isFormData($)&&(Tt=Ie.headers.get("content-type"))&&F.setContentType(Tt),Ie.body){const[mt,Wt]=L&&p0(ie,au(f0(L)))||[];$=ke(Ie.body,mt,Wt)}}}else if(Ce&&!l&&s&&I!=="get"&&I!=="head")$=ke($);else if(Ce&&l&&!u&&I!=="get"&&I!=="head")throw new et("Stream request bodies are not supported by the current fetch implementation",et.ERR_NOT_SUPPORT,b,Q);me.isString(D)||(D=D?"include":"omit");const Ee=l&&"credentials"in d.prototype;if(me.isFormData($)){const Ie=F.getContentType();Ie&&/^multipart\/form-data/i.test(Ie)&&!/boundary=/i.test(Ie)&&F.delete("content-type")}F.set("User-Agent","axios/"+cp,!1);const Ve={...M,signal:J,method:I.toUpperCase(),headers:Qy(F.normalize()),body:$,duplex:"half",credentials:Ee?D:void 0};Q=l&&new d(x,Ve);let Me=await(l?G(Q,M):G(x,Ve));const ot=ii.from(Me.headers);if(N){const Ie=me.toFiniteNumber(ot.getContentLength());if(Ie!=null&&Ie>S)throw new et("maxContentLength size of "+S+" exceeded",et.ERR_BAD_RESPONSE,b,Q)}const Ge=p&&(T==="stream"||T==="response");if(p&&Me.body&&(P||N||Ge&&le)){const Ie={};["status","statusText","headers"].forEach(Ht=>{Ie[Ht]=Me[Ht]});const Tt=me.toFiniteNumber(ot.getContentLength()),[mt,Wt]=P&&p0(Tt,au(f0(P),!0))||[];let An=0;const er=Ht=>{if(N&&(An=Ht,An>S))throw new et("maxContentLength size of "+S+" exceeded",et.ERR_BAD_RESPONSE,b,Q);mt&&mt(Ht)};Me=new g(b0(Me.body,_0,er,()=>{Wt&&Wt(),le&&le()}),Ie)}T=T||"text";let Ze=await i[me.findKey(i,T)||"text"](Me,b);if(N&&!p&&!Ge){let Ie;if(Ze!=null&&(typeof Ze.byteLength=="number"?Ie=Ze.byteLength:typeof Ze.size=="number"?Ie=Ze.size:typeof Ze=="string"&&(Ie=typeof r=="function"?new r().encode(Ze).byteLength:Ze.length)),typeof Ie=="number"&&Ie>S)throw new et("maxContentLength size of "+S+" exceeded",et.ERR_BAD_RESPONSE,b,Q)}return!Ge&&le&&le(),await new Promise((Ie,Tt)=>{d0(Ie,Tt,{data:Ze,headers:ii.from(Me.headers),status:Me.status,statusText:Me.statusText,config:b,request:Q})})}catch(oe){if(le&&le(),J&&J.aborted&&J.reason instanceof et){const re=J.reason;throw re.config=b,Q&&(re.request=Q),oe!==re&&Object.defineProperty(re,"cause",{__proto__:null,value:oe,writable:!0,enumerable:!1,configurable:!0}),re}if(ue)throw Q&&!ue.request&&(ue.request=Q),ue;if(oe instanceof et)throw Q&&!oe.request&&(oe.request=Q),oe;if(oe&&oe.name==="TypeError"&&/Load failed|fetch/i.test(oe.message)){const re=new et("Network Error",et.ERR_NETWORK,b,Q,oe&&oe.response);throw Object.defineProperty(re,"cause",{__proto__:null,value:oe.cause||oe,writable:!0,enumerable:!1,configurable:!0}),re}throw et.from(oe,oe&&oe.code,b,Q,oe&&oe.response)}}},DT=new Map,S0=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:h}=n,d=[r,h,t];let g=d.length,v=g,l,f,s=DT;for(;v--;)l=d[v],f=s.get(l),f===void 0&&s.set(l,f=v?new Map:NT(n)),s=f;return f};S0();const up={http:j$,xhr:xT,fetch:{get:S0}};me.forEach(up,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:n})}});const $0=e=>`- ${e}`,PT=e=>me.isFunction(e)||e===null||e===!1;function BT(e,n){e=me.isArray(e)?e:[e];const{length:t}=e;let r,h;const d={};for(let g=0;g<t;g++){r=e[g];let v;if(h=r,!PT(r)&&(h=up[(v=String(r)).toLowerCase()],h===void 0))throw new et(`Unknown adapter '${v}'`);if(h&&(me.isFunction(h)||(h=h.get(n))))break;d[v||"#"+g]=h}if(!h){const g=Object.entries(d).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=t?g.length>1?`since :
1474
+ `+g.map($0).join(`
1475
+ `):" "+$0(g[0]):"as no adapter specified";throw new et("There is no suitable adapter to dispatch the request "+v,et.ERR_NOT_SUPPORT)}return h}const T0={getAdapter:BT,adapters:up};function hp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kl(null,e)}function dp(e){return hp(e),e.headers=ii.from(e.headers),e.data=lp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),T0.getAdapter(e.adapter||Gl.adapter,e)(e).then(function(n){hp(e),e.response=n;try{n.data=lp.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=ii.from(n.headers),n},function(n){if(!h0(n)&&(hp(e),n&&n.response)){e.response=n.response;try{n.response.data=lp.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=ii.from(n.response.headers)}return Promise.reject(n)})}const cu={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{cu[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}});const E0={};cu.transitional=function(e,n,t){function r(h,d){return"[Axios v"+cp+"] Transitional option '"+h+"'"+d+(t?". "+t:"")}return(h,d,g)=>{if(e===!1)throw new et(r(d," has been removed"+(n?" in "+n:"")),et.ERR_DEPRECATED);return n&&!E0[d]&&(E0[d]=!0,console.warn(r(d," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(h,d,g):!0}},cu.spelling=function(e){return(n,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function zT(e,n,t){if(typeof e!="object"||e===null)throw new et("options must be an object",et.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let h=r.length;for(;h-- >0;){const d=r[h],g=Object.prototype.hasOwnProperty.call(n,d)?n[d]:void 0;if(g){const v=e[d],l=v===void 0||g(v,d,e);if(l!==!0)throw new et("option "+d+" must be "+l,et.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new et("Unknown option "+d,et.ERR_BAD_OPTION)}}const uu={assertOptions:zT,validators:cu},oi=uu.validators;let la=class{constructor(n){this.defaults=n||{},this.interceptors={request:new a0,response:new a0}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error){let h={};Error.captureStackTrace?Error.captureStackTrace(h):h=new Error;const d=(()=>{if(!h.stack)return"";const g=h.stack.indexOf(`
1476
+ `);return g===-1?"":h.stack.slice(g+1)})();try{if(!r.stack)r.stack=d;else if(d){const g=d.indexOf(`
1477
+ `),v=g===-1?-1:d.indexOf(`
1478
+ `,g+1),l=v===-1?"":d.slice(v+1);String(r.stack).endsWith(l)||(r.stack+=`
1479
+ `+d)}}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=aa(this.defaults,t);const{transitional:r,paramsSerializer:h,headers:d}=t;r!==void 0&&uu.assertOptions(r,{silentJSONParsing:oi.transitional(oi.boolean),forcedJSONParsing:oi.transitional(oi.boolean),clarifyTimeoutError:oi.transitional(oi.boolean),legacyInterceptorReqResOrdering:oi.transitional(oi.boolean),advertiseZstdAcceptEncoding:oi.transitional(oi.boolean),validateStatusUndefinedResolves:oi.transitional(oi.boolean)},!1),h!=null&&(me.isFunction(h)?t.paramsSerializer={serialize:h}:uu.assertOptions(h,{encode:oi.function,serialize:oi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),uu.assertOptions(t,{baseUrl:oi.spelling("baseURL"),withXsrfToken:oi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=d&&me.merge(d.common,d[t.method]);d&&me.forEach(["delete","get","head","post","put","patch","query","common"],i=>{delete d[i]}),t.headers=ii.concat(g,d);const v=[];let l=!0;this.interceptors.request.forEach(function(i){if(typeof i.runWhen=="function"&&i.runWhen(t)===!1)return;l=l&&i.synchronous;const c=t.transitional||op;c&&c.legacyInterceptorReqResOrdering?v.unshift(i.fulfilled,i.rejected):v.push(i.fulfilled,i.rejected)});const f=[];this.interceptors.response.forEach(function(i){f.push(i.fulfilled,i.rejected)});let s,a=0,u;if(!l){const i=[dp.bind(this),void 0];for(i.unshift(...v),i.push(...f),u=i.length,s=Promise.resolve(t);a<u;)s=s.then(i[a++],i[a++]);return s}u=v.length;let p=t;for(;a<u;){const i=v[a++],c=v[a++];try{p=i?i(p):p}catch(m){if(!c){s=Promise.reject(m);break}try{const b=c.call(this,m);me.isThenable(b)&&(s=Promise.resolve(b).then(()=>dp.call(this,p)))}catch(b){s=Promise.reject(b)}break}}if(!s)try{s=dp.call(this,p)}catch(i){s=Promise.reject(i)}for(a=0,u=f.length;a<u;)s=s.then(f[a++],f[a++]);return s}getUri(n){n=aa(this.defaults,n);const t=m0(n.baseURL,n.url,n.allowAbsoluteUrls,n);return s0(t,n.params,n.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(e){la.prototype[e]=function(n,t){return this.request(aa(t||{},{method:e,url:n,data:t&&me.hasOwnProp(t,"data")?t.data:void 0}))}}),me.forEach(["post","put","patch","query"],function(e){function n(t){return function(r,h,d){return this.request(aa(d||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}la.prototype[e]=n(),e!=="query"&&(la.prototype[e+"Form"]=n(!0))});let FT=class _C{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(h){t=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](h);r._listeners=null}),this.promise.then=h=>{let d;const g=new Promise(v=>{r.subscribe(v),d=v}).then(h);return g.cancel=function(){r.unsubscribe(d)},g},n(function(h,d,g){r.reason||(r.reason=new Kl(h,d,g),t(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 t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new _C(function(t){n=t}),cancel:n}}};function jT(e){return function(n){return e.apply(null,n)}}function WT(e){return me.isObject(e)&&e.isAxiosError===!0}const pp={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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pp).forEach(([e,n])=>{pp[n]=e});function R0(e){const n=new la(e),t=Wy(la.prototype.request,n);return me.extend(t,la.prototype,n,{allOwnKeys:!0}),me.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return R0(aa(e,r))},t}const lr=R0(Gl);lr.Axios=la,lr.CanceledError=Kl,lr.CancelToken=FT,lr.isCancel=h0,lr.VERSION=cp,lr.toFormData=su,lr.AxiosError=et,lr.Cancel=lr.CanceledError,lr.all=function(e){return Promise.all(e)},lr.spread=jT,lr.isAxiosError=WT,lr.mergeConfig=aa,lr.AxiosHeaders=ii,lr.formToJSON=e=>u0(me.isHTMLForm(e)?new FormData(e):e),lr.getAdapter=T0.getAdapter,lr.HttpStatusCode=pp,lr.default=lr;const{Axios:f3,AxiosError:g3,CanceledError:m3,isCancel:v3,CancelToken:y3,VERSION:b3,all:w3,Cancel:x3,isAxiosError:C3,spread:_3,toFormData:k3,AxiosHeaders:A3,HttpStatusCode:S3,formToJSON:$3,getAdapter:T3,mergeConfig:E3,create:R3}=lr,fp=lr.create({baseURL:location.origin,timeout:6e4,params:{}});fp.interceptors.response.use(e=>e,e=>{if(e.response){if(e.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(h){h&&OpenC3Auth.setTokens()}),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);const n=e.response?.data?.error?.data?.class;if(n==="HazardousError"||n==="CriticalCmdError")return Promise.reject(e);let t=`HTTP ${e.response.status} - `;e.response?.statusText&&(t+=`${e.response.statusText} `),e.response?.config?.data&&(t+=`${e.response.config.data} `),e.response?.data?.message?t+=`${e.response.data.message}`:e.response?.data?.exception?t+=`${e.response.data.exception}`:e.response?.data?.error?.message?(e.response.data.error.class&&(t+=`${e.response.data.error.class} `),t+=`${e.response.data.error.message}`):t+=`${e.response?.data}`;const{$cosmosNotify:r}=window;throw r&&r.serious({title:"Network error",body:t}),e}else throw e});const hu=async function(e,n,{data:t,params:r={},headers:h,noAuth:d=!1,noScope:g=!1,onUploadProgress:v=!1,responseType:l}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}h.Authorization=localStorage.openc3Token}return h.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),fp({method:e,url:n,data:t,params:r,headers:h,onUploadProgress:v,responseType:l})},gp={Accept:"application/json"},I0={...gp,"Content-Type":"application/json"},I3=ar("S",{get:function(e,{params:n,headers:t=gp,noScope:r,noAuth:h,onUploadProgress:d,responseType:g}={}){return hu("get",e,{params:n,headers:t,noScope:r,noAuth:h,onUploadProgress:d,responseType:g})},put:function(e,{data:n,params:t,headers:r=I0,noScope:h,noAuth:d,onUploadProgress:g}={}){return hu("put",e,{data:n,params:t,headers:r,noScope:h,noAuth:d,onUploadProgress:g})},post:function(e,{data:n,params:t,headers:r=I0,noScope:h,noAuth:d,onUploadProgress:g,responseType:v}={}){return hu("post",e,{data:n,params:t,headers:r,noScope:h,noAuth:d,onUploadProgress:g,responseType:v})},delete:function(e,{params:n,headers:t=gp,noScope:r,noAuth:h,onUploadProgress:d}={}){return hu("delete",e,{params:n,headers:t,noScope:r,noAuth:h,onUploadProgress:d})}});let du=()=>({emit(e,...n){for(let t=this.events[e]||[],r=0,h=t.length;r<h;r++)t[r](...n)},events:{},on(e,n){return(this.events[e]||=[]).push(n),()=>{this.events[e]=this.events[e]?.filter(t=>n!==t)}}}),Yl=class extends Error{constructor(n,t){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=t,this.name="ReasonError"}},mp=class extends Yl{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}},HT=class extends Yl{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}},Lo=class extends Yl{constructor(n,t){t?super(n,t):super("Disconnected",n),this.name="DisconnectedError"}},UT=class extends Lo{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}};function M0(e){return e?`{${Object.keys(e).sort().filter(n=>e[n]!==void 0).map(n=>{let t=JSON.stringify(e[n]);return`${JSON.stringify(n)}:${t}`}).join(",")}}`:""}let VT=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,t){if(!this._info)return this._info={id:String(n),info:t},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((t,{id:r,info:h})=>(t[r]=h,t),{})}};const ca=Symbol("state");let L0=class{constructor(n={}){this.emitter=du(),this.params=Object.freeze(n),this.presence=new VT(this),this.initialConnect=!0,this[ca]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=M0({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ca]}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[ca]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ca]="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[ca]="connected";let n=!0,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[ca]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[ca]="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,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,t)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(n,t){this.emit("message",n,t)}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...h)=>{r(),t(...h)});return r}emit(n,...t){return this.emitter.emit(n,...t)}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,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(h=>h()),n()})),r.push(this.on("close",h=>{r.forEach(d=>d()),t(h||new Yl("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}},qT=class{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 t=this.channels.indexOf(n);t>-1&&this.channels.splice(t,1)}notify(n,...t){this.state=n==="restored"?"connected":n,t.length===1?this.channels.forEach(r=>r[n](t[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let t=this._pendings[0];return!t||t.intent!==n?Promise.resolve():t.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 t,r={promise:new Promise(d=>{t=d}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},h=this._pendingTop;return this._pendings.push(r),h&&await h.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 t=this._pendingTop;return!t||t.acquired||t.intent!==n?!1:(this._pendings.pop(),t.canceled=!0,!0)}},GT=class{constructor(){this.queue=[]}async acquire(n,t){t==="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])}},KT=class{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new GT),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:t,unsubscribe:r}){let h=this._subscriptions[n]=new qT(n);return h.remoteId=this._localToRemote[n],h.subscriber=t,h.unsubscriber=r,h.gvl=this.glv,h}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,t){this._localToRemote[n]=t;let r=this.get(n);r&&(r.remoteId=t)}},YT=class{constructor(n={}){this.subscriptions=new KT(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,t){this._remoteToLocal[t]=n,this.subscriptions.storeRemoteId(n,t),this.flush(t)}unsubscribe(n){let t=this.subscriptions.get(n);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,t,r){let h=this._remoteToLocal[n];if(!h){this._pendingMessages.push([n,t,r]);return}let d=this.subscriptions.get(h);d&&d.channels.forEach(g=>{g.receive(t,r)})}notify(n,t,r){let h=this._remoteToLocal[n];if(!h)return;let d=this.subscriptions.get(h);d&&d.channels.forEach(g=>g.emit(t,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 t=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}};const O0={debug:0,info:1,warn:2,error:3};let N0=class{constructor(n){this.level=n||"warn"}log(n,t,r){O0[n]<O0[this.level]||this.writeLogEntry(n,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,t){this.log("debug",n,t)}info(n,t){this.log("info",n,t)}warn(n,t){this.log("warn",n,t)}error(n,t){this.log("error",n,t)}},Jl=class extends N0{writeLogEntry(){}},JT=class{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}},ZT=0,D0=class{constructor(n={}){let{logger:t}=n;this.logger=t||new Jl,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,t){let r={channel:n};t&&Object.assign(r,t);let h=M0(r);if(this.pendingUnsubscriptions[h]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,h),new Promise(v=>{setTimeout(()=>{v(this.subscribe(n,t))},g)})}if(this.pendingSubscriptions[h])return this.logger.warn("subscription is already pending, skipping",h),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((g,v)=>{let l=++ZT;this.pendingSubscriptions[h]={resolve:g,reject:v,id:l},this.cable.send(this.buildSubscribeRequest(h)),this.maybeRetrySubscribe(l,h,d)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,t,r){setTimeout(()=>{let h=this.pendingSubscriptions[t];h&&h.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(n,t,r))},r)}maybeExpireSubscribe(n,t,r){setTimeout(()=>{let h=this.pendingSubscriptions[t];h&&h.id===n&&(delete this.pendingSubscriptions[t],h.reject(new HT(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},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,t,r){return t==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=t,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,t){return this.cable.send({command:"whisper",identifier:n,data:t}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:t,identifier:r,message:h,reason:d,reconnect:g}=n;if(t==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),t==="welcome"){let v=n.sid;return v&&this.cable.setSessionId(v),this.cable.connected()}if(t==="disconnect"){let v=new Lo(d);this.reset(v),g===!1?this.cable.closed(v):this.cable.disconnected(v);return}if(t==="confirm_subscription"){let v=this.pendingSubscriptions[r];if(!v){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],v.resolve(r)}if(t==="reject_subscription"){let v=this.pendingSubscriptions[r];return v?(delete this.pendingSubscriptions[r],v.reject(new mp)):this.logger.error("subscription not found",{type:t,identifier:r})}if(h)return{identifier:r,message:h};this.logger.warn(`unknown message type: ${t}`,{message:n})}reset(n){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const P0=()=>Date.now()/1e3|0;let XT=class extends D0{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=P0()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let t in this.pendingPresence)this.pendingPresence[t].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:t,identifier:r,message:h}=n;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(t==="reject_subscription")return super.receive(n);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(t==="ping")return this.restoreSince&&(this.restoreSince=P0()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(t==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let d=n.restored_ids||Object.keys(this.subscriptionStreams);for(let g of d)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(d)}return this.cable.connected(this.sessionId)}if(t==="presence"){let d=h.type;if(d==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(h))}else if(d==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:h}}if(h){let d=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:h,meta:d}}this.logger.warn(`unknown message type: ${t}`,{message:n})}perform(n,t,r){switch(t){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,t,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let t=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(t.history=r,this.pendingHistory[n]=!0);let h=this.presenceInfo[n];return h&&(t.presence=h),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let t={},r=!1;if(this.subscriptionStreams[n])for(let h of this.subscriptionStreams[n]){let d=this.streamsPositions[h];d&&(r=!0,t[h]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(n,t,r,h){if(!(!t||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(t),this.streamsPositions[t]={epoch:r,offset:h},{stream:t,epoch:r,offset:h}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,t){return this.presenceInfo[n]=t,this.cable.send({command:"join",identifier:n,presence:t}),Promise.resolve()}async leave(n,t){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:t}),Promise.resolve()}presence(n,t){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,h)=>{this.pendingPresence[n]={resolve:r,reject:h},this.cable.send({command:"presence",identifier:n,data:t})})}},QT=class extends Yl{constructor(){super("No connection","closed"),this.name="NoConnectionError"}},B0=class extends L0{static identifier="__ghost__";constructor(n,t){super(t),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}};const eE="$pubsub";let z0=class extends L0{static identifier=eE;async perform(n,t){if(n.startsWith("$"))return super.perform(n,t);throw Error("not implemented")}};const ua=Symbol("state");let tE=class{constructor({transport:n,protocol:t,encoder:r,logger:h,lazy:d,hubOptions:g,performFailures:v,transportConfigurator:l}){this.emitter=du(),this.transport=n,this.encoder=r,this.logger=h||new Jl,this.protocol=t,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new YT(g||{}),this[ua]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=l,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,d===!1&&this.connect().catch(()=>{})}get state(){return this[ua]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[ua]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(r){this.handleClose(r)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[ua]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Lo("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[ua]="connected",this.hub.subscriptions.all().forEach(h=>{n&&h.remoteId&&n.includes(h.remoteId)?h.notify("restored"):(h.notify("disconnected",new Lo("recovery_failed")),this._resubscribe(h))});let t=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:r})}notify(n,t,r){t&&typeof t!="string"&&(r=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:r}):this.emit("info",{type:n,data:r})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Lo(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[ua]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Lo?n:new Lo(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[ua]="closed";let r=t||new Lo("cable_closed");this.hub.subscriptions.all().forEach(h=>h.notify("disconnected",r)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let r=this.protocol.receive(t);if(r){this.logger.debug("processed incoming message",r);let{type:h,identifier:d,message:g,meta:v}=r;h?this.hub.notify(d,h,g):this.hub.transmit(d,g,v)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new z0({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new z0({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let r,h;return typeof n=="string"&&(h=n,n=B0),r=h?new n(h,t):new n(t),this.subscribe(r)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let r=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:h=>this._subscribe(h,n.channelId,n.params),unsubscribe:h=>this._unsubscribe(h)});return r.add(n),r.intent==="subscribed"&&r.state==="connected"&&n.connected(),r.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,r){let h=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:h});return}this.logger.debug("acquiring subscribe lock",{identifier:h});let d=await n.acquire("subscribed");if(d.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:h}),d.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:h}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),d.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:h}),d.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:h}),n.notify("connected"),d.release();return}let g={identifier:t,params:r};this.logger.debug("subscribing",g);try{let v=await this.protocol.subscribe(t,r);this.hub.subscribe(h,v),this.logger.debug("subscribed",{...g,remoteId:v}),n.notify("connected")}catch(v){if(v){if(v instanceof mp&&this.logger.warn("rejected",g),v instanceof Lo){this.logger.debug("disconnected during subscription; will retry on connect",g),d.release();return}this.logger.error("failed to subscribe",{error:v,...g})}n.close(v),this.hub.unsubscribe(h)}d.release()}unsubscribe(n){let t=n.identifier,r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);r.remove(n),n.closed(),r.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let r=await n.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),r.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),r.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),r.release();return}let h=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:h}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),r.release();return}try{await this.protocol.unsubscribe(h),this.logger.debug("unsubscribed remotely",{id:t})}catch(d){d&&(d instanceof Lo?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:d}):this.logger.error("unsubscribe failed",{id:t,error:d}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",r.release()}async perform(n,t,r){if(this.performFailures==="throw")return this._perform(n,t,r);try{return await this._perform(n,t,r)}catch(h){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:h});return}}async _perform(n,t,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new QT;let h=this.hub.subscriptions.get(n);if(!h)throw Error(`Subscription not found: ${n}`);if(await h.pending("subscribed"),h.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let d=h.remoteId,g={id:d,action:t,payload:r};this.logger.debug("perform",g);try{let v=await this.protocol.perform(d,t,r);return v&&this.logger.debug("perform result",{message:v,request:g}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:g}),v}}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...h)=>{r(),t(...h)});return r}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(h=>h()),n()})),r.push(this.on("close",h=>{r.forEach(d=>d()),t(h)})),r.push(this.on("disconnect",h=>{r.forEach(d=>d()),t(h)}))}),this._pendingConnect)}};const nE={maxMissingPings:2,maxReconnectAttempts:1/0},tl=()=>Date.now(),F0=(e,n)=>{n=n||{};let{backoffRate:t,jitterRatio:r,maxInterval:h}=n;return t=t||2,r===void 0&&(r=.5),d=>{let g=e*t**d,v=g*t,l=g+(v-g)*Math.random(),f=2*(Math.random()-.5)*r;return l=l*(1+f),h&&h<l&&(l=h),l}};let j0=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},nE,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new Jl,this.state="pending_connect",this.attempts=0,this.disconnectedAt=tl()}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=tl(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=tl(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=tl(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=tl()})),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=tl()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new UT))}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)}},rE=class{constructor(n,t={}){this.transports=n,this.transport=null,this.emitter=du(),this.unbind=[],this.logger=t.logger||new Jl}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let t=this.transports[n];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.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,t){this.transports.forEach(r=>{r.setParam(n,t)})}setToken(n,t){this.transports.forEach(r=>{r.setToken(n,t)})}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...h)=>{r(),t(...h)});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)}))}},iE=class{constructor(n,t={}){this.url=n;let r=t.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=du();let{format:h,subprotocol:d,authStrategy:g}=t;this.format=h||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=d}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((t,r)=>{let h=[];h.push(this.once("open",()=>{h.forEach(d=>d()),t()})),h.push(this.once("close",()=>{h.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,t){let r=new URL(this.url);r.searchParams.set(n,t);let h=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(h)}setToken(n,t="jid"){if(this.authStrategy==="param")this.setParam(t,n);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(h=>h.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,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...h)=>{r(),t(...h)});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 t=n.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},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")}},oE=class{constructor(n){this.channel=n}notify(n,...t){typeof this[n]=="function"&&this[n](...t)}perform(n,t={}){this.channel.perform(n,t)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}},sE=class extends B0{constructor(n,t,r){super(n,t),this.subscription=new oE(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:h})=>this.subscription.notify("connected",{reconnected:h})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",h=>this.subscription.notify("received",h)),this.on("close",h=>{h&&h instanceof mp?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}},aE=class{constructor(n){this.cable=n}create(n,t){let r,h;typeof n=="object"?(r=n.channel,delete n.channel,h=n):(r=n,h={});let d=new sE(r,h,t);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(n){return this.cable.hub.channels.filter(t=>t.identifier===n).map(t=>t.subscription)}},lE=class{constructor(n){this.cable=n,this.subscriptions=new aE(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}};const W0={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function cE(e,n){if(typeof e=="object"&&typeof n>"u"&&(n=e,e=void 0),n=n||{},!e&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},W0,n);let{protocol:t,websocketImplementation:r,websocketFormat:h,websocketOptions:d,websocketAuthStrategy:g,fallbacks:v,logLevel:l,logger:f,transport:s,encoder:a,lazy:u,monitor:p,pingInterval:i,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:b,subprotocol:x,tokenRefresher:I,historyTimestamp:$,protocolOptions:_,concurrentSubscribes:C,performFailures:O,transportConfigurator:P,auth:L}=n;if(f=f||new Jl(l),typeof t=="string"){x=x||t;let D=t.substring(0,t.lastIndexOf("-")),M=t.substring(t.lastIndexOf("-")+1);if(_=_||{},D==="actioncable-v1")t=new D0({logger:f,..._});else if(D==="actioncable-v1-ext")t=new XT({logger:f,historyTimestamp:$,..._});else throw Error(`Protocol is not supported yet: ${t}`);if(M==="json")a=a||new JT,h=h||"text";else if(M==="msgpack"){if(h="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(M==="protobuf"){if(h=h||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${t}`)}if(!t)throw Error("Protocol must be specified");s=s||new iE(e,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:g,format:h}),v&&(s=new rE([s,...v],{logger:f})),L&&L.token&&s.setToken(L.token,L.param||"jid"),c=c||F0(i),p!==!1&&(p=p||new j0({pingInterval:i,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:b,logger:f}));let T={concurrentSubscribes:C},F=new tE({protocol:t,transport:s,encoder:a,logger:f,lazy:u,hubOptions:T,performFailures:O,transportConfigurator:P});return p&&(p.watch(F),F.monitor=p),I&&uE(F,async()=>{try{await I(s)}catch(D){return f.error("Failed to refresh authentication token: "+D),!1}return F.connect().catch(()=>{}),!0}),F}function uE(e,n){let t=!1;e.on("connect",()=>t=!1),e.on("close",async r=>{if(r){if(t){e.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await n())}})}let hE=class extends N0{writeLogEntry(n,t,r){r?console[n](t,r):console[n](t)}},dE=class extends j0{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")},t=h=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:h})},r=()=>this.disconnect(new Lo("page_frozen"));document.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",n,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!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 pE=["cable","action-cable"],fE="/cable",pu=(e,n)=>{for(let t of pE){let r=e.head.querySelector(`meta[name='${t}-${n}']`);if(r)return r.getAttribute("content")}},H0=e=>e.match(/wss?:\/\//)?e:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${e}`:e,gE=()=>{if(typeof document<"u"&&document.head){let e=pu(document,"url");if(e)return H0(e)}return H0(fE)},mE=()=>{if(typeof document<"u"&&document.head){let e=pu(document,"history-timestamp");if(e)return e|0}},vE=()=>{if(typeof document<"u"&&document.head)return pu(document,"token")},yE=()=>{if(typeof document<"u"&&document.head)return pu(document,"token-param")};function bE(e,n){typeof e=="object"&&typeof n>"u"&&(n=e,e=void 0),e=e||gE(),n=n||{},n.historyTimestamp||=mE();let t=vE();if(t){let f=yE();n.auth=Object.assign({token:t,param:f},n.auth||{})}n=Object.assign({},W0,n);let{logLevel:r,logger:h,pingInterval:d,reconnectStrategy:g,maxMissingPings:v,maxReconnectAttempts:l}=n;return h=n.logger=n.logger||new hE(r),g=n.reconnectStrategy=n.reconnectStrategy||F0(d),n.monitor!==!1&&(n.monitor=n.monitor||new dE({pingInterval:d,reconnectStrategy:g,maxMissingPings:v,maxReconnectAttempts:l,logger:h})),cE(e,n)}function wE(e,n){let t=bE(e,n);return new lE(t)}let U0=class{constructor(n="/openc3-api/cable"){this._cable=null,this._url=n}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,t,r={},h={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){const g=new URL(this._url,document.baseURI);g.searchParams.set("scope",t),this._cable=wE(g.href)}return this._cable.subscriptions.create({channel:n,token:localStorage.openc3Token,...h},r)})}recordPing(){}};ar("v",U0),ar("J",class{constructor(n,t,r="",h=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=t,this.usage=r,this.url=h}});function Zl(e){return xE.test(e)}const xE=/^-?[0-9]+$/;function V0(e){return CE.test(e)}const CE=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function q0(e,n){if(Zl(e))return Number.isSafeInteger(Number.parseInt(e,10));const t=Number.parseFloat(e),r=String(t);if(e===r)return!0;const h=G0(e),d=G0(r);return!!(h===d||n?.approx===!0&&!Zl(e)&&d.length>=14&&h.startsWith(d.substring(0,14)))}let Xl=(function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e})({});function _E(e){if(q0(e,{approx:!1}))return;if(Zl(e))return Xl.truncate_integer;const n=Number.parseFloat(e);return Number.isFinite(n)?n===0?Xl.underflow:Xl.truncate_float:Xl.overflow}function G0(e){const{start:n,end:t}=kE(e),r=e.substring(n,t),h=r.indexOf(".");return h===-1?r:r.substring(0,h)+r.substring(h+1)}function kE(e){let n=0;for(e[0]==="-"&&n++;e[n]==="0"||e[n]===".";)n++;let t=e.lastIndexOf("e");for(t===-1&&(t=e.lastIndexOf("E")),t===-1&&(t=e.length);(e[t-1]==="0"||e[t-1]===".")&&t>n;)t--;return{start:n,end:t}}let AE=class{isLosslessNumber=!0;constructor(n){if(!V0(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=_E(this.value);if(n===void 0||n===Xl.truncate_float)return Number.parseFloat(this.value);if(Zl(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 SE(e){return e&&typeof e=="object"&&e.isLosslessNumber||!1}function $E(e){return new AE(e)}function TE(e,n){return vp({"":e},"",e,n)}function vp(e,n,t,r){return Array.isArray(t)?r.call(e,n,RE(t,r)):t&&typeof t=="object"&&!SE(t)?r.call(e,n,EE(t,r)):r.call(e,n,t)}function EE(e,n){for(const t of Object.keys(e)){const r=vp(e,t,e[t],n);r!==void 0?e[t]=r:delete e[t]}return e}function RE(e,n){for(let t=0;t<e.length;t++)e[t]=vp(e,String(t),e[t],n);return e}function IE(e,n,t){const r=typeof t=="function"?{parseNumber:t}:t,h=r?.parseNumber??$E,d=r?.onDuplicateKey??O;let g=0;const v=s();return b(v),I(),n?TE(v,n):v;function l(){if(e.charCodeAt(g)===PE){g++,u();const j={};let U=!0;for(;g<e.length&&e.charCodeAt(g)!==Y0;){U?U=!1:(c(),u());const G=g,J=p();if(J===void 0){C();return}u(),m();const Q=s();if(Q===void 0){D();return}if(Object.prototype.hasOwnProperty.call(j,J)&&!yp(Q,j[J])){const le=d({key:J,position:G+1,oldValue:j[J],newValue:Q});le!==void 0&&(j[J]=le)}else j[J]=Q}return e.charCodeAt(g)!==Y0&&P(),g++,j}}function f(){if(e.charCodeAt(g)===BE){g++,u();const j=[];let U=!0;for(;g<e.length&&e.charCodeAt(g)!==J0;){U?U=!1:c();const G=s();x(G),j.push(G)}return e.charCodeAt(g)!==J0&&L(),g++,j}}function s(){u();const j=p()??i()??l()??f()??a("true",!0)??a("false",!1)??a("null",null);return u(),j}function a(j,U){if(e.slice(g,g+j.length)===j)return g+=j.length,U}function u(){for(;ME(e.charCodeAt(g));)g++}function p(){if(e.charCodeAt(g)===bp){g++;let j="";for(;g<e.length&&e.charCodeAt(g)!==bp;){if(e.charCodeAt(g)===DE){const U=e[g+1],G=NE[U];G!==void 0?(j+=G,g++):U==="u"?fu(e.charCodeAt(g+2))&&fu(e.charCodeAt(g+3))&&fu(e.charCodeAt(g+4))&&fu(e.charCodeAt(g+5))?(j+=String.fromCharCode(Number.parseInt(e.slice(g+2,g+6),16)),g+=5):M(g):F(g)}else OE(e.charCodeAt(g))?j+=e[g]:T(e[g]);g++}return _(),g++,j}}function i(){const j=g;if(e.charCodeAt(g)===Z0&&(g++,$(j)),e.charCodeAt(g)===wp)g++;else if(LE(e.charCodeAt(g)))for(g++;gu(e.charCodeAt(g));)g++;if(e.charCodeAt(g)===qE)for(g++,$(j);gu(e.charCodeAt(g));)g++;if(e.charCodeAt(g)===ZE||e.charCodeAt(g)===JE)for(g++,(e.charCodeAt(g)===Z0||e.charCodeAt(g)===HE)&&g++,$(j);gu(e.charCodeAt(g));)g++;if(g>j)return h(e.slice(j,g))}function c(){if(e.charCodeAt(g)!==VE)throw new SyntaxError(`Comma ',' expected after value ${N()}`);g++}function m(){if(e.charCodeAt(g)!==GE)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);g++}function b(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function x(j){if(j===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function I(){if(g<e.length)throw new SyntaxError(`Expected end of input ${N()}`)}function $(j){if(!gu(e.charCodeAt(g))){const U=e.slice(j,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${N()}`)}}function _(){if(e.charCodeAt(g)!==bp)throw new SyntaxError(`End of string '"' expected ${N()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function O(j){let{key:U,position:G}=j;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${G}`)}function P(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function L(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function T(j){throw new SyntaxError(`Invalid character '${j}' ${S()}`)}function F(j){const U=e.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${U}' ${S()}`)}function D(){throw new SyntaxError(`Object value expected after ':' ${S()}`)}function M(j){const U=e.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${U}' ${S()}`)}function S(){return`at position ${g}`}function k(){return g<e.length?`but got '${e[g]}'`:"but reached end of input"}function N(){return`${k()} ${S()}`}}function ME(e){return e===zE||e===FE||e===jE||e===WE}function fu(e){return e>=wp&&e<=xp||e>=KE&&e<=XE||e>=YE&&e<=QE}function gu(e){return e>=wp&&e<=xp}function LE(e){return e>=UE&&e<=xp}function OE(e){return e>=32&&e<=1114111}function yp(e,n){return e===n?!0:Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every((t,r)=>yp(t,n[r])):K0(e)&&K0(n)?[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>yp(e[t],n[t])):!1}function K0(e){return typeof e=="object"&&e!==null}const NE={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1480
+ `,r:"\r",t:" "},DE=92,PE=123,Y0=125,BE=91,J0=93,zE=32,FE=10,jE=9,WE=13,bp=34,HE=43,Z0=45,wp=48,UE=49,xp=57,VE=44,qE=46,GE=58,KE=65,YE=97,JE=69,ZE=101,XE=70,QE=102;function X0(e,n,t,r){return h(e);function h(l,f){if(Array.isArray(r)){const s=r.find(a=>a.test(l));if(s){const a=s.stringify(l);if(typeof a!="string"||!V0(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l?.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return d(l);if(l&&typeof l=="object")return g(l)}function d(l,f){if(l.length===0)return"[]";let s="[";for(let a=0;a<l.length;a++){const u=l[a];typeof u<"u"&&typeof u!="function"?s+=h(u):s+="null",a<l.length-1&&(s+=",")}return s+="]",s}function g(l,f){if(typeof l.toJSON=="function")return X0(l.toJSON(),n,t,void 0);const s=Array.isArray(n)?n.map(String):Object.keys(l);if(s.length===0)return"{}";let a=!0,u="{";for(const p of s){const i=l[p];if(v(p,i)){a?a=!1:u+=",";const c=JSON.stringify(p);u+=`${c}:`,u+=h(i)}}return u+="}",u}function v(l,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function eR(e){return Zl(e)&&!q0(e)?BigInt(e):parseFloat(e)}ar("f",class{id=1;constructor(){}async exec(n,t,r={},h={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,h.manual=!0,(await fp.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...h},timeout:d,transformRequest:[(g,v)=>X0(g)],transformResponse:[g=>{try{return IE(g,void 0,eR)}catch{const v=typeof g=="string"?g.substring(0,200):String(g),l=new Error(`Server returned non-JSON response: ${v}`);throw l.name="ServerError",l}}]})).data.result}catch(g){let v=new Error;throw g.response?(v.name=g.response.data.error.data.class,v.message=g.response.data.error.data.message,v.object=g.response.data.error):g.request?(v.name="Request error",v.message="Request error, no response received"):v=g,v}}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,t,r,h,d){return this.exec("map_target_to_interface",[n,t],{cmd_only:r,tlm_only:h,unmap_old:d})}unmap_target_from_interface(n,t,r,h){return this.exec("unmap_target_from_interface",[n,t],{cmd_only:r,tlm_only:h})}connect_interface(n,...t){return t.length>0?this.exec("connect_interface",[n,...t]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,t,...r){return this.exec("interface_cmd",[n,t,...r])}interface_target_enable(n,t,r=!1,h=!1){return this.exec("interface_target_enable",[n,t],{cmd_only:r,tlm_only:h})}interface_target_disable(n,t,r=!1,h=!1){return this.exec("interface_target_disable",[n,t],{cmd_only:r,tlm_only:h})}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,t,r,h,d){return this.exec("map_target_to_router",[n,t],{cmd_only:r,tlm_only:h,unmap_old:d})}unmap_target_from_router(n,t,r,h){return this.exec("unmap_target_from_router",[n,t],{cmd_only:r,tlm_only:h})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,t,r=!1,h=!1){return this.exec("router_target_enable",[n,t],{cmd_only:r,tlm_only:h})}router_target_disable(n,t,r=!1,h=!1){return this.exec("router_target_disable",[n,t],{cmd_only:r,tlm_only:h})}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,t,r){return this.exec("get_item",[n,t,r])}get_param(n,t,r){return this.exec("get_param",[n,t,r])}get_parameter(n,t,r){return this.exec("get_param",[n,t,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])}delete_limits_set(n){return this.exec("delete_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,t){return this.exec("get_tlm",[n,t])}get_telemetry(n,t){return this.exec("get_tlm",[n,t])}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,t=!1){return this.exec("get_all_tlm_names",[n],{hidden:t})}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,t,r,h=30){const d=await this.exec("get_tlm_packet",[n,t],{type:r,stale_time:h});if(d!=null){let g=d.length,v=null;for(let l=0;l<g;l++)v=this.decode_openc3_type(d[l][1]),v!==null&&(d[l][1]=v)}return d}get_packet_derived_items(n,t){return this.exec("get_packet_derived_items",[n,t])}get_tlm_buffer(n,t){return this.exec("get_tlm_buffer",[n,t])}get_tlm_available(n){return this.exec("get_tlm_available",[n])}async get_tlm_values(n,t=30,r=null,h=null,d=null){let g={stale_time:t};r!==null&&(g.cache_timeout=r),h!==null&&(g.start_time=h.toISOString()),d!==null&&(g.end_time=d.toISOString());const v=await this.exec("get_tlm_values",[n],g,{},1e4);if(v&&v.length>0){let l=v.length,f=null;for(let s=0;s<l;s++)f=this.decode_openc3_type(v[s][0]),f!==null&&(v[s][0]=f)}return v}get_limits(n,t,r){return this.exec("get_limits",[n,t,r])}async tlm(n,t,r,h="CONVERTED"){let d=null;if(t===void 0)d=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(t))d=await this.exec("tlm",[n],{type:t});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else d=await this.exec("tlm",[n,t,r],{type:h});let g=this.decode_openc3_type(d);return g!==null&&(d=g),d}async inject_tlm(n,t,r=null,h="CONVERTED",d=!1){await this.exec("inject_tlm",[n,t,r],{type:h,stored:d})}set_tlm(n,t,r,h){return this.exec("set_tlm",[n,t,r],{type:h})}override_tlm(n,t,r,h){return this.exec("override_tlm",[n,t,r],{type:h})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,t,r,h){return this.exec("normalize_tlm",[n,t,r],{type:h})}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,t=!1){return this.exec("get_all_cmd_names",[n],{hidden:t})}get_all_command_names(n){return this.exec("get_all_cmd_names",[n])}get_cmd(n,t){return this.exec("get_cmd",[n,t])}get_command(n,t){return this.exec("get_cmd",[n,t])}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,t,r,h="CONVERTED"){return this.exec("get_cmd_value",[n,t,r,h])}get_cmd_buffer(n,t){return this.exec("get_cmd_buffer",[n,t])}_cmd(n,t,r,h,d,g={}){let v=null;for(let l in h)Object.prototype.hasOwnProperty.call(h,l)&&(v=this.encode_openc3_type(h[l]),v!==null&&(h[l]=v));return this.exec(n,[t,r,h],g,d)}get_cmd_hazardous(n,t,r,h={}){return t===void 0?this.exec("get_cmd_hazardous",n,{},h):this._cmd("get_cmd_hazardous",n,t,r,h)}cmd(n,t,r,h={},d={}){return t===void 0?this.exec("cmd",n,d,h):this._cmd("cmd",n,t,r,h,d)}cmd_no_range_check(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_no_range_check",n,d,h):this._cmd("cmd_no_range_check",n,t,r,h,d)}cmd_raw(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_raw",n,d,h):this._cmd("cmd_raw",n,t,r,h,d)}cmd_raw_no_range_check(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_raw_no_range_check",n,d,h):this._cmd("cmd_raw_no_range_check",n,t,r,h,d)}cmd_no_hazardous_check(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_no_hazardous_check",n,d,h):this._cmd("cmd_no_hazardous_check",n,t,r,h,d)}cmd_no_checks(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_no_checks",n,d,h):this._cmd("cmd_no_checks",n,t,r,h,d)}cmd_raw_no_hazardous_check(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",n,d,h):this._cmd("cmd_raw_no_hazardous_check",n,t,r,h,d)}cmd_raw_no_checks(n,t,r,h={},d={}){return t===void 0?this.exec("cmd_raw_no_checks",n,d,h):this._cmd("cmd_raw_no_checks",n,t,r,h,d)}build_cmd(n,t,r,h={},d={}){return t===void 0?this.exec("build_cmd",n,d,h):this._cmd("build_cmd",n,t,r,h,d)}build_command(n,t,r,h={},d={}){return t===void 0?this.exec("build_cmd",n,d,h):this._cmd("build_cmd",n,t,r,h,d)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,t){return this.exec("send_raw",[n,t])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,t){return this.exec("load_config",[n,t])}save_config(n,t,r){return this.exec("save_config",[n,t,r])}delete_config(n,t){return this.exec("delete_config",[n,t])}enable_limits(n,t,r){return this.exec("enable_limits",[n,t,r])}disable_limits(n,t,r){return this.exec("disable_limits",[n,t,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,t){return this.exec("get_setting",[n],t)}get_settings(n,t){return this.exec("get_settings",n,t)}set_setting(n,t){return this.exec("set_setting",[n,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,t){return this.exec("set_setting",[n,t])}get_metrics(){return this.exec("get_metrics",[])}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const t=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",t),h=new Uint8Array(r);return Array.from(h).map(d=>d.toString(16).padStart(2,"0")).join("")}}});function Q0(e,n){return function(){return e.apply(n,arguments)}}const{toString:tR}=Object.prototype,{getPrototypeOf:nl}=Object,{iterator:Ql,toStringTag:eb}=Symbol,mu=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),ec=(e,n)=>{let t=e;const r=[];for(;t!=null&&t!==Object.prototype;){if(r.indexOf(t)!==-1)return!1;if(r.push(t),mu(t,n))return!0;t=nl(t)}return!1},nR=(e,n)=>e!=null&&ec(e,n)?e[n]:void 0,Cp=(e=>n=>{const t=tR.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ao=e=>(e=e.toLowerCase(),n=>Cp(n)===e),vu=e=>n=>typeof n===e,{isArray:ha}=Array,da=vu("undefined");function rl(e){return e!==null&&!da(e)&&e.constructor!==null&&!da(e.constructor)&&Ii(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tb=ao("ArrayBuffer");function rR(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&tb(e.buffer),n}const iR=vu("string"),Ii=vu("function"),nb=vu("number"),il=e=>e!==null&&typeof e=="object",oR=e=>e===!0||e===!1,yu=e=>{if(!il(e))return!1;const n=nl(e);return(n===null||n===Object.prototype||nl(n)===null)&&!ec(e,eb)&&!ec(e,Ql)},sR=e=>{if(!il(e)||rl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},aR=ao("Date"),lR=ao("File"),cR=e=>!!(e&&typeof e.uri<"u"),uR=e=>e&&typeof e.getParts<"u",hR=ao("Blob"),dR=ao("FileList"),pR=ao("Set"),fR=e=>il(e)&&Ii(e.pipe);function gR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const rb=gR(),ib=typeof rb.FormData<"u"?rb.FormData:void 0,mR=e=>{if(!e)return!1;if(ib&&e instanceof ib)return!0;const n=nl(e);if(!n||n===Object.prototype||!Ii(e.append))return!1;const t=Cp(e);return t==="formdata"||t==="object"&&Ii(e.toString)&&e.toString()==="[object FormData]"},vR=ao("URLSearchParams"),[yR,bR,wR,xR]=["ReadableStream","Request","Response","Headers"].map(ao),CR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tc(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,h;if(typeof e!="object"&&(e=[e]),ha(e))for(r=0,h=e.length;r<h;r++)n.call(null,e[r],r,e);else{if(rl(e))return;const d=t?Object.getOwnPropertyNames(e):Object.keys(e),g=d.length;let v;for(r=0;r<g;r++)v=d[r],n.call(null,e[v],v,e)}}function ob(e,n){if(rl(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,h;for(;r-- >0;)if(h=t[r],n===h.toLowerCase())return h;return null}const pa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sb=e=>!da(e)&&e!==pa;function _p(...e){const{caseless:n,skipUndefined:t}=sb(this)&&this||{},r={},h=(d,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=n&&typeof g=="string"&&ob(r,g)||g,l=mu(r,v)?r[v]:void 0;yu(l)&&yu(d)?r[v]=_p(l,d):yu(d)?r[v]=_p({},d):ha(d)?r[v]=d.slice():(!t||!da(d))&&(r[v]=d)};for(let d=0,g=e.length;d<g;d++){const v=e[d];if(!v||rl(v)||(tc(v,h),typeof v!="object"||ha(v)))continue;const l=Object.getOwnPropertySymbols(v);for(let f=0;f<l.length;f++){const s=l[f];OR.call(v,s)&&h(v[s],s)}}return r}const _R=(e,n,t,{allOwnKeys:r}={})=>(tc(n,(h,d)=>{t&&Ii(h)?Object.defineProperty(e,d,{__proto__:null,value:Q0(h,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,d,{__proto__:null,value:h,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),kR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),AR=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:n.prototype}),t&&Object.assign(e.prototype,t)},SR=(e,n,t,r)=>{let h,d,g;const v={};if(n=n||{},e==null)return n;do{for(h=Object.getOwnPropertyNames(e),d=h.length;d-- >0;)g=h[d],(!r||r(g,e,n))&&!v[g]&&(n[g]=e[g],v[g]=!0);e=t!==!1&&nl(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},$R=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},TR=e=>{if(!e)return null;if(ha(e))return e;let n=e.length;if(!nb(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},ER=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&nl(Uint8Array)),RR=(e,n)=>{const t=(e&&e[Ql]).call(e);let r;for(;(r=t.next())&&!r.done;){const h=r.value;n.call(e,h[0],h[1])}},IR=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},MR=ao("HTMLFormElement"),LR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,t,r){return t.toUpperCase()+r}),{propertyIsEnumerable:OR}=Object.prototype,NR=ao("RegExp"),ab=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};tc(t,(h,d)=>{let g;(g=n(h,d,e))!==!1&&(r[d]=g||h)}),Object.defineProperties(e,r)},DR=e=>{ab(e,(n,t)=>{if(Ii(e)&&["arguments","caller","callee"].includes(t))return!1;const r=e[t];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 '"+t+"'")})}})},PR=(e,n)=>{const t={},r=h=>{h.forEach(d=>{t[d]=!0})};return ha(e)?r(e):r(String(e).split(n)),t},BR=()=>{},zR=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function FR(e){return!!(e&&Ii(e.append)&&e[eb]==="FormData"&&e[Ql])}const jR=e=>{const n=new WeakSet,t=r=>{if(il(r)){if(n.has(r))return;if(rl(r))return r;if(!("toJSON"in r)){n.add(r);let h;if(pR(r)){h=[];for(const d of r){const g=t(d);!da(g)&&h.push(g)}}else h=ha(r)?[]:{},tc(r,(d,g)=>{const v=t(d);!da(v)&&(h[g]=v)});return n.delete(r),h}}return r};return t(e)},WR=ao("AsyncFunction"),HR=e=>e&&(il(e)||Ii(e))&&Ii(e.then)&&Ii(e.catch),lb=((e,n)=>e?setImmediate:n?((t,r)=>(pa.addEventListener("message",({source:h,data:d})=>{h===pa&&d===t&&r.length&&r.shift()()},!1),h=>{r.push(h),pa.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ii(pa.postMessage)),UR=typeof queueMicrotask<"u"?queueMicrotask.bind(pa):typeof process<"u"&&process.nextTick||lb,cb=e=>e!=null&&Ii(e[Ql]),VR=e=>e!=null&&ec(e,Ql)&&cb(e),ve={isArray:ha,isArrayBuffer:tb,isBuffer:rl,isFormData:mR,isArrayBufferView:rR,isString:iR,isNumber:nb,isBoolean:oR,isObject:il,isPlainObject:yu,isEmptyObject:sR,isReadableStream:yR,isRequest:bR,isResponse:wR,isHeaders:xR,isUndefined:da,isDate:aR,isFile:lR,isReactNativeBlob:cR,isReactNative:uR,isBlob:hR,isRegExp:NR,isFunction:Ii,isStream:fR,isURLSearchParams:vR,isTypedArray:ER,isFileList:dR,forEach:tc,merge:_p,extend:_R,trim:CR,stripBOM:kR,inherits:AR,toFlatObject:SR,kindOf:Cp,kindOfTest:ao,endsWith:$R,toArray:TR,forEachEntry:RR,matchAll:IR,isHTMLForm:MR,hasOwnProperty:mu,hasOwnProp:mu,hasOwnInPrototypeChain:ec,getSafeProp:nR,reduceDescriptors:ab,freezeMethods:DR,toObjectSet:PR,toCamelCase:LR,noop:BR,toFiniteNumber:zR,findKey:ob,global:pa,isContextDefined:sb,isSpecCompliantForm:FR,toJSONObject:jR,isAsyncFn:WR,isThenable:HR,setImmediate:lb,asap:UR,isIterable:cb,isSafeIterable:VR},qR=ve.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"]),GR=e=>{const n={};let t,r,h;return e&&e.split(`
1481
+ `).forEach(function(d){h=d.indexOf(":"),t=d.substring(0,h).trim().toLowerCase(),r=d.substring(h+1).trim();const g=ve.hasOwnProp(n,t);!t||g&&ve.hasOwnProp(qR,t)||(t==="set-cookie"?g?n[t].push(r):n[t]=[r]:n[t]=g?n[t]+", "+r:r)}),n};function KR(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}const YR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),JR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function kp(e,n){return ve.isArray(e)?e.map(t=>kp(t,n)):KR(String(e).replace(n,""))}const ZR=e=>kp(e,YR),XR=e=>kp(e,JR);function ub(e){const n=Object.create(null);return ve.forEach(e.toJSON(),(t,r)=>{n[r]=XR(t)}),n}const hb=Symbol("internals");function nc(e){return e&&String(e).trim().toLowerCase()}function bu(e){return e===!1||e==null?e:ve.isArray(e)?e.map(bu):ZR(String(e))}function QR(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const eI=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Ap(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}function tI(e){const n=e.length-1;if(n<1||e.charCodeAt(0)!==34||e.charCodeAt(n)!==34)return e;let t="";for(let r=1;r<n;r++){const h=e.charCodeAt(r);if(h===34||h===92&&(r+=1,r>=n))return e;t+=e[r]}return t}function nI(e){const n=Object.create(null),t=String(e);let r=0,h=!1,d=!1;function g(v){const l=Ap(t.slice(r,v)),f=l.indexOf("=");if(f<1)return;const s=Ap(l.slice(0,f));if(!eI.test(s))return;const a=s.toLowerCase();if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=Ap(l.slice(f+1));n[a]=tI(u)}for(let v=0;v<t.length;v++){const l=t.charCodeAt(v);h?d?d=!1:l===92?d=!0:l===34&&(h=!1):l===34?h=!0:(l===44||l===59)&&(g(v),r=v+1)}return g(t.length),n}const rI=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Sp(e,n,t,r,h){if(ve.isFunction(r))return r.call(this,n,t);if(h&&(n=t),!!ve.isString(n)){if(ve.isString(r))return n.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(n)}}function iI(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function oI(e,n){const t=ve.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{__proto__:null,value:function(h,d,g){return this[r].call(this,n,h,d,g)},configurable:!0})})}let si=class{constructor(n){n&&this.set(n)}set(n,t,r){const h=this;function d(v,l,f){const s=nc(l);if(!s)return;const a=ve.findKey(h,s);(!a||h[a]===void 0||f===!0||f===void 0&&h[a]!==!1)&&(h[a||l]=bu(v))}const g=(v,l)=>ve.forEach(v,(f,s)=>d(f,s,l));if(ve.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(ve.isString(n)&&(n=n.trim())&&!rI(n))g(GR(n),t);else if(ve.isObject(n)&&ve.isSafeIterable(n)){let v=Object.create(null),l,f;for(const s of n){if(!ve.isArray(s))throw new TypeError("Object iterator must return a key-value pair");f=s[0],ve.hasOwnProp(v,f)?(l=v[f],v[f]=ve.isArray(l)?[...l,s[1]]:[l,s[1]]):v[f]=s[1]}g(v,t)}else n!=null&&d(t,n,r);return this}get(n,t){if(n=nc(n),n){const r=ve.findKey(this,n);if(r){const h=this[r];if(!t)return h;if(t===!0)return QR(h);if(ve.isFunction(t))return t.call(this,h,r);if(ve.isRegExp(t))return t.exec(h);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=nc(n),n){const r=ve.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||Sp(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let h=!1;function d(g){if(g=nc(g),g){const v=ve.findKey(r,g);v&&(!t||Sp(r,r[v],v,t))&&(delete r[v],h=!0)}}return ve.isArray(n)?n.forEach(d):d(n),h}clear(n){const t=Object.keys(this);let r=t.length,h=!1;for(;r--;){const d=t[r];(!n||Sp(this,this[d],d,n,!0))&&(delete this[d],h=!0)}return h}normalize(n){const t=this,r={};return ve.forEach(this,(h,d)=>{const g=ve.findKey(r,d);if(g){t[g]=bu(h),delete t[d];return}const v=n?iI(d):String(d).trim();v!==d&&delete t[d],t[v]=bu(h),r[v]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return ve.forEach(this,(r,h)=>{r!=null&&r!==!1&&(t[h]=n&&ve.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
1482
+ `)}getSetCookie(){const n=this.get("set-cookie");return ve.isArray(n)?n:n==null||n===!1?[]:[n]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static parseParameters(n){return nI(n)}static concat(n,...t){const r=new this(n);return t.forEach(h=>r.set(h)),r}static accessor(n){const t=(this[hb]=this[hb]={accessors:{}}).accessors,r=this.prototype;function h(d){const g=nc(d);t[g]||(oI(r,d),t[g]=!0)}return ve.isArray(n)?n.forEach(h):h(n),this}};si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(si.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),ve.freezeMethods(si);const wu="[REDACTED ****]";function sI(e){if(ve.hasOwnProp(e,"toJSON"))return!0;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;){if(ve.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function aI(e,n){const t=new Set(n.map(d=>String(d).toLowerCase())),r=[],h=d=>{if(d===null||typeof d!="object"||ve.isBuffer(d))return d;if(r.indexOf(d)!==-1)return;d instanceof si&&(d=d.toJSON()),r.push(d);let g;if(ve.isArray(d))g=[],d.forEach((v,l)=>{const f=h(v);ve.isUndefined(f)||(g[l]=f)});else{if(!ve.isPlainObject(d)&&sI(d))return r.pop(),d;g=Object.create(null);for(const[v,l]of Object.entries(d)){const f=t.has(v.toLowerCase())?wu:h(l);ve.isUndefined(f)||(g[v]=f)}}return r.pop(),g};return h(e)}function db(e){try{return String(e)}catch{return""}}function lI(e){return e.errors.map(n=>{try{return n&&n.message?db(n.message):db(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let tt=class kC extends Error{static from(n,t,r,h,d,g){let v=n.message;!v&&ve.isArray(n.errors)&&n.errors.length&&(v=lI(n));const l=new kC(v,t||n.code,r,h,d);return Object.defineProperty(l,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),l.name=n.name,n.status!=null&&l.status==null&&(l.status=n.status),g&&Object.assign(l,g),l}constructor(n,t,r,h,d){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),h&&(this.request=h),d&&(this.response=d,this.status=d.status)}toJSON(){const n=this.config,t=n&&ve.hasOwnProp(n,"redact")?n.redact:void 0,r=ve.isArray(t)&&t.length>0?aI(n,t):ve.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}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",tt.ERR_BAD_OPTION="ERR_BAD_OPTION",tt.ECONNABORTED="ECONNABORTED",tt.ETIMEDOUT="ETIMEDOUT",tt.ECONNREFUSED="ECONNREFUSED",tt.ERR_NETWORK="ERR_NETWORK",tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",tt.ERR_DEPRECATED="ERR_DEPRECATED",tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",tt.ERR_CANCELED="ERR_CANCELED",tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",tt.ERR_INVALID_URL="ERR_INVALID_URL",tt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cI=null,pb=100;function $p(e){return ve.isPlainObject(e)||ve.isArray(e)}function fb(e){return ve.endsWith(e,"[]")?e.slice(0,-2):e}function Tp(e,n,t){return e?e.concat(n).map(function(r,h){return r=fb(r),!t&&h?"["+r+"]":r}).join(t?".":""):n}function uI(e){return ve.isArray(e)&&!e.some($p)}const hI=ve.toFlatObject(ve,{},null,function(e){return/^is[A-Z]/.test(e)});function xu(e,n,t){if(!ve.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=ve.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!ve.isUndefined(x[b])});const r=t.metaTokens,h=t.visitor||i,d=t.dots,g=t.indexes,v=t.Blob||typeof Blob<"u"&&Blob,l=t.maxDepth===void 0?pb:t.maxDepth,f=v&&ve.isSpecCompliantForm(n),s=[];if(!ve.isFunction(h))throw new TypeError("visitor must be a function");function a(b){if(b===null)return"";if(ve.isDate(b))return b.toISOString();if(ve.isBoolean(b))return b.toString();if(!f&&ve.isBlob(b))throw new tt("Blob is not supported. Use a Buffer instead.");if(ve.isArrayBuffer(b)||ve.isTypedArray(b)){if(f&&typeof v=="function")return new v([b]);throw new tt("Blob is not supported. Use a Buffer instead.",tt.ERR_NOT_SUPPORT)}return b}function u(b){if(b>l)throw new tt("Object is too deeply nested ("+b+" levels). Max depth: "+l,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(b,x){if(l===1/0)return JSON.stringify(b);const I=[];return JSON.stringify(b,function($,_){if(!ve.isObject(_))return _;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(_),u(x+I.length-1),_})}function i(b,x,I){let $=b;if(ve.isReactNative(n)&&ve.isReactNativeBlob(b))return n.append(Tp(I,x,d),a(b)),!1;if(b&&!I&&typeof b=="object"){if(ve.endsWith(x,"{}"))x=r?x:x.slice(0,-2),b=p(b,1);else if(ve.isArray(b)&&uI(b)||(ve.isFileList(b)||ve.endsWith(x,"[]"))&&($=ve.toArray(b)))return x=fb(x),$.forEach(function(_,C){!(ve.isUndefined(_)||_===null)&&n.append(g===!0?Tp([x],C,d):g===null?x:x+"[]",a(_))}),!1}return $p(b)?!0:(n.append(Tp(I,x,d),a(b)),!1)}const c=Object.assign(hI,{defaultVisitor:i,convertValue:a,isVisitable:$p});function m(b,x,I=0){if(!ve.isUndefined(b)){if(u(I),s.indexOf(b)!==-1)throw new Error("Circular reference detected in "+x.join("."));s.push(b),ve.forEach(b,function($,_){(!(ve.isUndefined($)||$===null)&&h.call(n,$,ve.isString(_)?_.trim():_,x,c))===!0&&m($,x?x.concat(_):[_],I+1)}),s.pop()}}if(!ve.isObject(e))throw new TypeError("data must be an object");return m(e),n}function gb(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(t){return n[t]})}function Ep(e,n){this._pairs=[],e&&xu(e,this,n)}const mb=Ep.prototype;mb.append=function(e,n){this._pairs.push([e,n])},mb.toString=function(e){const n=e?t=>e.call(this,t,gb):gb;return this._pairs.map(function(t){return n(t[0])+"="+n(t[1])},"").join("&")};function dI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vb(e,n,t){if(!n)return e;e=e||"";const r=ve.isFunction(t)?{serialize:t}:t,h=ve.getSafeProp(r,"encode")||dI,d=ve.getSafeProp(r,"serialize");let g;if(d?g=d(n,r):g=ve.isURLSearchParams(n)?n.toString():new Ep(n,r).toString(h),g){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}class yb{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,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){ve.forEach(this.handlers,function(t){t!==null&&n(t)})}}const Rp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},pI=typeof URLSearchParams<"u"?URLSearchParams:Ep,fI=typeof FormData<"u"?FormData:null,gI=typeof Blob<"u"?Blob:null,mI={isBrowser:!0,classes:{URLSearchParams:pI,FormData:fI,Blob:gI},protocols:["http","https","file","blob","url","data"]},Ip=typeof window<"u"&&typeof document<"u",Mp=typeof navigator=="object"&&navigator||void 0,vI=Ip&&(!Mp||["ReactNative","NativeScript","NS"].indexOf(Mp.product)<0),yI=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bI=Ip&&window.location.href||"http://localhost",wI=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ip,hasStandardBrowserEnv:vI,hasStandardBrowserWebWorkerEnv:yI,navigator:Mp,origin:bI},Symbol.toStringTag,{value:"Module"})),Yr={...wI,...mI};function xI(e,n){return xu(e,new Yr.classes.URLSearchParams,{visitor:function(t,r,h,d){return Yr.isNode&&ve.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...n})}const bb=pb;function wb(e){if(e>bb)throw new tt("FormData field is too deeply nested ("+e+" levels). Max depth: "+bb,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function CI(e){const n=[],t=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=t.exec(e))!==null;)wb(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function _I(e){const n={},t=Object.keys(e);let r;const h=t.length;let d;for(r=0;r<h;r++)d=t[r],n[d]=e[d];return n}function xb(e){function n(t,r,h,d){wb(d);let g=t[d++];if(g==="__proto__")return!0;const v=Number.isFinite(+g),l=d>=t.length;return g=!g&&ve.isArray(h)?h.length:g,l?(ve.hasOwnProp(h,g)?h[g]=ve.isArray(h[g])?h[g].concat(r):[h[g],r]:h[g]=r,!v):((!ve.hasOwnProp(h,g)||!ve.isObject(h[g]))&&(h[g]=[]),n(t,r,h[g],d)&&ve.isArray(h[g])&&(h[g]=_I(h[g])),!v)}if(ve.isFormData(e)&&ve.isFunction(e.entries)){const t={};return ve.forEachEntry(e,(r,h)=>{n(CI(r),h,t,0)}),t}return null}const ol=(e,n)=>e!=null&&ve.hasOwnProp(e,n)?e[n]:void 0;function kI(e,n,t){if(ve.isString(e))try{return(n||JSON.parse)(e),ve.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const rc={transitional:Rp,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",r=t.indexOf("application/json")>-1,h=ve.isObject(e);if(h&&ve.isHTMLForm(e)&&(e=new FormData(e)),ve.isFormData(e))return r?JSON.stringify(xb(e)):e;if(ve.isArrayBuffer(e)||ve.isBuffer(e)||ve.isStream(e)||ve.isFile(e)||ve.isBlob(e)||ve.isReadableStream(e))return e;if(ve.isArrayBufferView(e))return e.buffer;if(ve.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(h){const g=ol(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return xI(e,g).toString();if((d=ve.isFileList(e))||t.indexOf("multipart/form-data")>-1){const v=ol(this,"env"),l=v&&v.FormData;return xu(d?{"files[]":e}:e,l&&new l,g)}}return h||r?(n.setContentType("application/json",!1),kI(e)):e}],transformResponse:[function(e){const n=ol(this,"transitional")||rc.transitional,t=n&&n.forcedJSONParsing,r=ol(this,"responseType"),h=r==="json";if(ve.isResponse(e)||ve.isReadableStream(e))return e;if(e&&ve.isString(e)&&(t&&!r||h)){const d=!(n&&n.silentJSONParsing)&&h;try{return JSON.parse(e,ol(this,"parseReviver"))}catch(g){if(d)throw g.name==="SyntaxError"?tt.from(g,tt.ERR_BAD_RESPONSE,this,null,ol(this,"response")):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yr.classes.FormData,Blob:Yr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(["delete","get","head","post","put","patch","query"],e=>{rc.headers[e]={}});function Lp(e,n){const t=this||rc,r=n||t,h=si.from(r.headers);let d=r.data;return ve.forEach(e,function(g){d=g.call(t,d,h.normalize(),n?n.status:void 0)}),h.normalize(),d}function Cb(e){return!!(e&&e.__CANCEL__)}let ic=class extends tt{constructor(n,t,r){super(n??"canceled",tt.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function _b(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new tt("Request failed with status code "+t.status,t.status>=400&&t.status<500?tt.ERR_BAD_REQUEST:tt.ERR_BAD_RESPONSE,t.config,t.request,t))}function AI(e){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return n&&n[1]||""}function SI(e,n){e=e||10;const t=new Array(e),r=new Array(e);let h=0,d=0,g;return n=n!==void 0?n:1e3,function(v){const l=Date.now(),f=r[d];g||(g=l),t[h]=v,r[h]=l;let s=d,a=0;for(;s!==h;)a+=t[s++],s=s%e;if(h=(h+1)%e,h===d&&(d=(d+1)%e),l-g<n)return;const u=f&&l-f;return u?Math.round(a*1e3/u):void 0}}function $I(e,n){let t=0,r=1e3/n,h,d;const g=(v,l=Date.now())=>{t=l,h=null,d&&(clearTimeout(d),d=null),e(...v)};return[(...v)=>{const l=Date.now(),f=l-t;f>=r?g(v,l):(h=v,d||(d=setTimeout(()=>{d=null,g(h)},r-f)))},()=>h&&g(h)]}const Cu=(e,n,t=3)=>{let r=0;const h=SI(50,250);return $I(d=>{if(!d||typeof d.loaded!="number")return;const g=d.loaded,v=d.lengthComputable?d.total:void 0,l=Math.max(0,v!=null?Math.min(g,v):g),f=Math.max(0,l-r),s=h(f);r=Math.max(r,l);const a={loaded:l,total:v,progress:v?l/v:void 0,bytes:f,rate:s||void 0,estimated:s&&v?(v-l)/s:void 0,event:d,lengthComputable:v!=null,[n?"download":"upload"]:!0};e(a)},t)},kb=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},Ab=(e,n=ve.asap)=>(...t)=>n(()=>e(...t)),TI=Yr.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,Yr.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(Yr.origin),Yr.navigator&&/(msie|trident)/i.test(Yr.navigator.userAgent)):()=>!0,EI=Yr.hasStandardBrowserEnv?{write(e,n,t,r,h,d,g){if(typeof document>"u")return;const v=[`${e}=${encodeURIComponent(n)}`];ve.isNumber(t)&&v.push(`expires=${new Date(t).toUTCString()}`),ve.isString(r)&&v.push(`path=${r}`),ve.isString(h)&&v.push(`domain=${h}`),d===!0&&v.push("secure"),ve.isString(g)&&v.push(`SameSite=${g}`),document.cookie=v.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),h=r.indexOf("=");if(h!==-1&&r.slice(0,h)===e)try{return decodeURIComponent(r.slice(h+1))}catch{return r.slice(h+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function RI(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function II(e,n){if(!n)return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return e.slice(0,t)+"/"+n.replace(/^\/+/,"")}const MI=/^https?:(?!\/\/)/i,LI=/[\t\n\r]/g;function OI(e){let n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;return e.slice(n)}function NI(e){return OI(e).replace(LI,"")}function DI(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(n,t,r="")=>`${t}${r}${wu}`)}function PI(e){const n=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${wu}@`),t=n.indexOf("#"),r=(t===-1?n:n.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${wu}`);return t===-1?r:`${r}#${DI(n.slice(t+1))}`}function Sb(e,n){if(typeof e=="string"){const t=NI(e);if(MI.test(t))throw new tt(`Invalid URL ${JSON.stringify(PI(t))}: missing "//" after protocol`,tt.ERR_INVALID_URL,n)}}function $b(e,n,t,r){Sb(n,r);let h=!RI(n);return e&&(h||t===!1)?(Sb(e,r),II(e,n)):n}const Tb=e=>e instanceof si?{...e}:e,BI=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(n=>Object.getOwnPropertyDescriptor(e,n).enumerable)):Object.keys(e);function fa(e,n){e=e||{},n=n||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(s,a,u,p){return ve.isPlainObject(s)&&ve.isPlainObject(a)?ve.merge.call({caseless:p},s,a):ve.isPlainObject(a)?ve.merge({},a):ve.isArray(a)?a.slice():a}function h(s,a,u,p){if(ve.isUndefined(a)){if(!ve.isUndefined(s))return r(void 0,s,u,p)}else return r(s,a,u,p)}function d(s,a){if(!ve.isUndefined(a))return r(void 0,a)}function g(s,a){if(ve.isUndefined(a)){if(!ve.isUndefined(s))return r(void 0,s)}else return r(void 0,a)}function v(s){const a=ve.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ve.isUndefined(a))if(ve.isPlainObject(a)){if(ve.hasOwnProp(a,s))return a[s]}else return;const u=ve.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ve.isPlainObject(u)&&ve.hasOwnProp(u,s))return u[s]}function l(s,a,u){if(ve.hasOwnProp(n,u))return r(s,a);if(ve.hasOwnProp(e,u))return r(void 0,s)}const f={url:d,method:d,data:d,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:l,headers:(s,a,u)=>h(Tb(s),Tb(a),u,!0)};return ve.forEach(BI({...e,...n}),function(s){if(s==="__proto__"||s==="constructor"||s==="prototype")return;const a=ve.hasOwnProp(f,s)?f[s]:h,u=ve.hasOwnProp(e,s)?e[s]:void 0,p=ve.hasOwnProp(n,s)?n[s]:void 0,i=a(u,p,s);ve.isUndefined(i)&&a!==l||(t[s]=i)}),ve.hasOwnProp(n,"validateStatus")&&ve.isUndefined(n.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(ve.hasOwnProp(e,"validateStatus")?t.validateStatus=r(void 0,e.validateStatus):delete t.validateStatus),t}const zI=["content-type","content-length"];function FI(e,n,t){if(t!=="content-only"){e.set(n);return}Object.entries(n||{}).forEach(([r,h])=>{zI.includes(r.toLowerCase())&&e.set(r,h)})}const jI=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16)));function Eb(e){const n=fa({},e),t=u=>ve.hasOwnProp(n,u)?n[u]:void 0,r=t("data");let h=t("withXSRFToken");const d=t("xsrfHeaderName"),g=t("xsrfCookieName");let v=t("headers");const l=t("auth"),f=t("baseURL"),s=t("allowAbsoluteUrls"),a=t("url");if(n.headers=v=si.from(v),n.url=vb($b(f,a,s,n),t("params"),t("paramsSerializer")),l){const u=ve.getSafeProp(l,"username")||"",p=ve.getSafeProp(l,"password")||"";try{v.set("Authorization","Basic "+btoa(u+":"+(p?jI(p):"")))}catch(i){throw tt.from(i,tt.ERR_BAD_OPTION_VALUE,e)}}if(ve.isFormData(r)&&(Yr.hasStandardBrowserEnv||Yr.hasStandardBrowserWebWorkerEnv||ve.isReactNative(r)?v.setContentType(void 0):ve.isFunction(r.getHeaders)&&FI(v,r.getHeaders(),t("formDataHeaderPolicy"))),Yr.hasStandardBrowserEnv&&(ve.isFunction(h)&&(h=h(n)),h===!0||h==null&&TI(n.url))){const u=d&&g&&EI.read(g);u&&v.set(d,u)}return n}const WI=typeof XMLHttpRequest<"u",HI=WI&&function(e){return new Promise(function(n,t){const r=Eb(e);let h=r.data;const d=si.from(r.headers).normalize();let{responseType:g,onUploadProgress:v,onDownloadProgress:l}=r,f,s,a,u,p;function i(){u&&u(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=si.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),I={data:!g||g==="text"||g==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:e,request:c};_b(function($){n($),i()},function($){t($),i()},I),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(m)},c.onabort=function(){c&&(t(new tt("Request aborted",tt.ECONNABORTED,e,c)),i(),c=null)},c.onerror=function(x){const I=x&&x.message?x.message:"Network Error",$=new tt(I,tt.ERR_NETWORK,e,c);$.event=x||null,t($),i(),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||Rp;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new tt(x,I.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,c)),i(),c=null},h===void 0&&d.setContentType(null),"setRequestHeader"in c&&ve.forEach(ub(d),function(x,I){c.setRequestHeader(I,x)}),ve.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),g&&g!=="json"&&(c.responseType=r.responseType),l&&([a,p]=Cu(l,!0),c.addEventListener("progress",a)),v&&c.upload&&([s,u]=Cu(v),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{c&&(t(!x||x.type?new ic(null,e,c):x),c.abort(),i(),c=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const b=AI(r.url);if(b&&!Yr.protocols.includes(b)){t(new tt("Unsupported protocol "+b+":",tt.ERR_BAD_REQUEST,e)),i();return}c.send(h||null)})},UI=(e,n)=>{if(e=e?e.filter(Boolean):[],!n&&!e.length)return;const t=new AbortController;let r=!1;const h=function(l){if(!r){r=!0,g();const f=l instanceof Error?l:this.reason;t.abort(f instanceof tt?f:new ic(f instanceof Error?f.message:f))}};let d=n&&setTimeout(()=>{d=null,h(new tt(`timeout of ${n}ms exceeded`,tt.ETIMEDOUT))},n);const g=()=>{e&&(d&&clearTimeout(d),d=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(h):l.removeEventListener("abort",h)}),e=null)};e.forEach(l=>{if(!r){if(l.aborted){h.call(l);return}l.addEventListener("abort",h,{once:!0})}});const{signal:v}=t;return v.unsubscribe=()=>ve.asap(g),v},VI=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,h;for(;r<t;)h=r+n,yield e.slice(r,h),r=h},qI=async function*(e,n){for await(const t of GI(e))yield*VI(t,n)},GI=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Rb=(e,n,t,r)=>{const h=qI(e,n);let d=0,g,v=l=>{g||(g=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:s}=await h.next();if(f){v(),l.close();return}let a=s.byteLength;if(t){let u=d+=a;t(u)}l.enqueue(new Uint8Array(s))}catch(f){throw v(f),f}},cancel(l){return v(l),h.return()}},{highWaterMark:2})},Ib=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Mb=(e,n,t)=>n+2<t&&Ib(e.charCodeAt(n+1))&&Ib(e.charCodeAt(n+2)),Lb=e=>e<=57?e-48:(e&223)-55,KI=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,YI=e=>e===9||e===10||e===12||e===13||e===32,JI=e=>{const n=Math.floor(e/4),t=e%4;return n*3+(t===2?1:t===3?2:0)},ZI=e=>{const n=e.length;let t=0;return n>0&&e.charCodeAt(n-1)===61&&(t++,n>1&&e.charCodeAt(n-2)===61&&t++),Math.floor((n-t)*3/4)},XI=e=>{const n=e.length;let t=0,r=0,h=!1;for(let d=0;d<n;d++){let g=e.charCodeAt(d);if(g===37&&Mb(e,d,n)&&(g=Lb(e.charCodeAt(d+1))*16+Lb(e.charCodeAt(d+2)),d+=2),!YI(g)){if(g===61){r++;continue}if(!KI(g)||r>0){h=!0;continue}t++}}return h||r>2||r>0&&(t+r)%4!==0||t%4===1?ZI(e):JI(t)},QI=(e,n)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),h=e.slice(t+1);if(/;base64/i.test(r))return n(h);let d=0;for(let g=0,v=h.length;g<v;g++){const l=h.charCodeAt(g);if(l===37&&Mb(h,g,v))d+=1,g+=2;else if(l<128)d+=1;else if(l<2048)d+=2;else if(l>=55296&&l<=56319&&g+1<v){const f=h.charCodeAt(g+1);f>=56320&&f<=57343?(d+=4,g++):d+=3}else d+=3}return d};function eM(e){const n=typeof e=="string"?e.indexOf("#"):-1;return QI(n===-1?e:e.slice(0,n),XI)}const Op="1.19.0",Ob=64*1024,{isFunction:_u}=ve,tM=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16))),Nb=e=>{if(!ve.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Db=(e,...n)=>{try{return!!e(...n)}catch{return!1}},nM=e=>{const n=e.indexOf("://");let t=e;return n!==-1&&(t=t.slice(n+3)),t.includes("@")||t.includes(":")},rM=e=>{const n=ve.global!==void 0&&ve.global!==null?ve.global:globalThis,{ReadableStream:t,TextEncoder:r}=n;e=ve.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);const{fetch:h,Request:d,Response:g}=e,v=h?_u(h):typeof fetch=="function",l=_u(d),f=_u(g);if(!v)return!1;const s=v&&_u(t),a=v&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new d(b).arrayBuffer())),u=l&&s&&Db(()=>{let b=!1;const x=new d(Yr.origin,{body:new t,method:"POST",get duplex(){return b=!0,"half"}}),I=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!I}),p=f&&s&&Db(()=>ve.isReadableStream(new g("").body)),i={stream:p&&(b=>b.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!i[b]&&(i[b]=(x,I)=>{let $=x&&x[b];if($)return $.call(x);throw new tt(`Response type '${b}' is not supported`,tt.ERR_NOT_SUPPORT,I)})});const c=async b=>{if(b==null)return 0;if(ve.isBlob(b))return b.size;if(ve.isSpecCompliantForm(b))return(await new d(Yr.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(ve.isArrayBufferView(b)||ve.isArrayBuffer(b))return b.byteLength;if(ve.isURLSearchParams(b)&&(b=b+""),ve.isString(b))return(await a(b)).byteLength},m=async(b,x)=>ve.toFiniteNumber(b.getContentLength())??c(x);return async b=>{let{url:x,method:I,data:$,signal:_,cancelToken:C,timeout:O,onDownloadProgress:P,onUploadProgress:L,responseType:T,headers:F,withCredentials:D="same-origin",fetchOptions:M,maxContentLength:S,maxBodyLength:k}=Eb(b);const N=ve.isNumber(S)&&S>-1,j=ve.isNumber(k)&&k>-1,U=oe=>ve.hasOwnProp(b,oe)?b[oe]:void 0;let G=h||fetch;T=T?(T+"").toLowerCase():"text";let J=UI([_,C&&C.toAbortSignal()],O),Q=null;const le=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let ie,ue=null;const pe=()=>new tt("Request body larger than maxBodyLength limit",tt.ERR_BAD_REQUEST,b,Q);try{let oe;const re=U("auth");if(re){const Ie=ve.getSafeProp(re,"username")||"",Tt=ve.getSafeProp(re,"password")||"";oe={username:Ie,password:Tt}}if(nM(x)){const Ie=new URL(x,Yr.origin);if(!oe&&(Ie.username||Ie.password)){const Tt=Nb(Ie.username),mt=Nb(Ie.password);oe={username:Tt,password:mt}}(Ie.username||Ie.password)&&(Ie.username="",Ie.password="",x=Ie.href)}if(oe&&(F.delete("authorization"),F.set("Authorization","Basic "+btoa(tM((oe.username||"")+":"+(oe.password||""))))),N&&typeof x=="string"&&x.startsWith("data:")&&eM(x)>S)throw new tt("maxContentLength size of "+S+" exceeded",tt.ERR_BAD_RESPONSE,b,Q);if(j&&I!=="get"&&I!=="head"){const Ie=await c($);if(typeof Ie=="number"&&isFinite(Ie)&&(ie=Ie,Ie>k))throw pe()}const Ce=j&&(ve.isReadableStream($)||ve.isStream($)),ke=(Ie,Tt,mt)=>Rb(Ie,Ob,Wt=>{if(j&&Wt>k)throw ue=pe();Tt&&Tt(Wt)},mt);if(u&&I!=="get"&&I!=="head"&&(L||Ce)){if(ie=ie??await m(F,$),ie!==0||Ce){let Ie=new d(x,{method:"POST",body:$,duplex:"half"}),Tt;if(ve.isFormData($)&&(Tt=Ie.headers.get("content-type"))&&F.setContentType(Tt),Ie.body){const[mt,Wt]=L&&kb(ie,Cu(Ab(L)))||[];$=ke(Ie.body,mt,Wt)}}}else if(Ce&&!l&&s&&I!=="get"&&I!=="head")$=ke($);else if(Ce&&l&&!u&&I!=="get"&&I!=="head")throw new tt("Stream request bodies are not supported by the current fetch implementation",tt.ERR_NOT_SUPPORT,b,Q);ve.isString(D)||(D=D?"include":"omit");const Ee=l&&"credentials"in d.prototype;if(ve.isFormData($)){const Ie=F.getContentType();Ie&&/^multipart\/form-data/i.test(Ie)&&!/boundary=/i.test(Ie)&&F.delete("content-type")}F.set("User-Agent","axios/"+Op,!1);const Ve={...M,signal:J,method:I.toUpperCase(),headers:ub(F.normalize()),body:$,duplex:"half",credentials:Ee?D:void 0};Q=l&&new d(x,Ve);let Me=await(l?G(Q,M):G(x,Ve));const ot=si.from(Me.headers);if(N){const Ie=ve.toFiniteNumber(ot.getContentLength());if(Ie!=null&&Ie>S)throw new tt("maxContentLength size of "+S+" exceeded",tt.ERR_BAD_RESPONSE,b,Q)}const Ge=p&&(T==="stream"||T==="response");if(p&&Me.body&&(P||N||Ge&&le)){const Ie={};["status","statusText","headers"].forEach(Ht=>{Ie[Ht]=Me[Ht]});const Tt=ve.toFiniteNumber(ot.getContentLength()),[mt,Wt]=P&&kb(Tt,Cu(Ab(P),!0))||[];let An=0;const er=Ht=>{if(N&&(An=Ht,An>S))throw new tt("maxContentLength size of "+S+" exceeded",tt.ERR_BAD_RESPONSE,b,Q);mt&&mt(Ht)};Me=new g(Rb(Me.body,Ob,er,()=>{Wt&&Wt(),le&&le()}),Ie)}T=T||"text";let Ze=await i[ve.findKey(i,T)||"text"](Me,b);if(N&&!p&&!Ge){let Ie;if(Ze!=null&&(typeof Ze.byteLength=="number"?Ie=Ze.byteLength:typeof Ze.size=="number"?Ie=Ze.size:typeof Ze=="string"&&(Ie=typeof r=="function"?new r().encode(Ze).byteLength:Ze.length)),typeof Ie=="number"&&Ie>S)throw new tt("maxContentLength size of "+S+" exceeded",tt.ERR_BAD_RESPONSE,b,Q)}return!Ge&&le&&le(),await new Promise((Ie,Tt)=>{_b(Ie,Tt,{data:Ze,headers:si.from(Me.headers),status:Me.status,statusText:Me.statusText,config:b,request:Q})})}catch(oe){if(le&&le(),J&&J.aborted&&J.reason instanceof tt){const re=J.reason;throw re.config=b,Q&&(re.request=Q),oe!==re&&Object.defineProperty(re,"cause",{__proto__:null,value:oe,writable:!0,enumerable:!1,configurable:!0}),re}if(ue)throw Q&&!ue.request&&(ue.request=Q),ue;if(oe instanceof tt)throw Q&&!oe.request&&(oe.request=Q),oe;if(oe&&oe.name==="TypeError"&&/Load failed|fetch/i.test(oe.message)){const re=new tt("Network Error",tt.ERR_NETWORK,b,Q,oe&&oe.response);throw Object.defineProperty(re,"cause",{__proto__:null,value:oe.cause||oe,writable:!0,enumerable:!1,configurable:!0}),re}throw tt.from(oe,oe&&oe.code,b,Q,oe&&oe.response)}}},iM=new Map,Pb=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:h}=n,d=[r,h,t];let g=d.length,v=g,l,f,s=iM;for(;v--;)l=d[v],f=s.get(l),f===void 0&&s.set(l,f=v?new Map:rM(n)),s=f;return f};Pb();const Np={http:cI,xhr:HI,fetch:{get:Pb}};ve.forEach(Np,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:n})}});const Bb=e=>`- ${e}`,oM=e=>ve.isFunction(e)||e===null||e===!1;function sM(e,n){e=ve.isArray(e)?e:[e];const{length:t}=e;let r,h;const d={};for(let g=0;g<t;g++){r=e[g];let v;if(h=r,!oM(r)&&(h=Np[(v=String(r)).toLowerCase()],h===void 0))throw new tt(`Unknown adapter '${v}'`);if(h&&(ve.isFunction(h)||(h=h.get(n))))break;d[v||"#"+g]=h}if(!h){const g=Object.entries(d).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=t?g.length>1?`since :
1483
+ `+g.map(Bb).join(`
1484
+ `):" "+Bb(g[0]):"as no adapter specified";throw new tt("There is no suitable adapter to dispatch the request "+v,tt.ERR_NOT_SUPPORT)}return h}const zb={getAdapter:sM,adapters:Np};function Dp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ic(null,e)}function Pp(e){return Dp(e),e.headers=si.from(e.headers),e.data=Lp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zb.getAdapter(e.adapter||rc.adapter,e)(e).then(function(n){Dp(e),e.response=n;try{n.data=Lp.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=si.from(n.headers),n},function(n){if(!Cb(n)&&(Dp(e),n&&n.response)){e.response=n.response;try{n.response.data=Lp.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=si.from(n.response.headers)}return Promise.reject(n)})}const ku={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{ku[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}});const Fb={};ku.transitional=function(e,n,t){function r(h,d){return"[Axios v"+Op+"] Transitional option '"+h+"'"+d+(t?". "+t:"")}return(h,d,g)=>{if(e===!1)throw new tt(r(d," has been removed"+(n?" in "+n:"")),tt.ERR_DEPRECATED);return n&&!Fb[d]&&(Fb[d]=!0,console.warn(r(d," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(h,d,g):!0}},ku.spelling=function(e){return(n,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function aM(e,n,t){if(typeof e!="object"||e===null)throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let h=r.length;for(;h-- >0;){const d=r[h],g=Object.prototype.hasOwnProperty.call(n,d)?n[d]:void 0;if(g){const v=e[d],l=v===void 0||g(v,d,e);if(l!==!0)throw new tt("option "+d+" must be "+l,tt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new tt("Unknown option "+d,tt.ERR_BAD_OPTION)}}const Au={assertOptions:aM,validators:ku},ai=Au.validators;let ga=class{constructor(e){this.defaults=e||{},this.interceptors={request:new yb,response:new yb}}async request(e,n){try{return await this._request(e,n)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const h=(()=>{if(!r.stack)return"";const d=r.stack.indexOf(`
1485
+ `);return d===-1?"":r.stack.slice(d+1)})();try{if(!t.stack)t.stack=h;else if(h){const d=h.indexOf(`
1486
+ `),g=d===-1?-1:h.indexOf(`
1487
+ `,d+1),v=g===-1?"":h.slice(g+1);String(t.stack).endsWith(v)||(t.stack+=`
1488
+ `+h)}}catch{}}throw t}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=fa(this.defaults,n);const{transitional:t,paramsSerializer:r,headers:h}=n;t!==void 0&&Au.assertOptions(t,{silentJSONParsing:ai.transitional(ai.boolean),forcedJSONParsing:ai.transitional(ai.boolean),clarifyTimeoutError:ai.transitional(ai.boolean),legacyInterceptorReqResOrdering:ai.transitional(ai.boolean),advertiseZstdAcceptEncoding:ai.transitional(ai.boolean),validateStatusUndefinedResolves:ai.transitional(ai.boolean)},!1),r!=null&&(ve.isFunction(r)?n.paramsSerializer={serialize:r}:Au.assertOptions(r,{encode:ai.function,serialize:ai.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Au.assertOptions(n,{baseUrl:ai.spelling("baseURL"),withXsrfToken:ai.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let d=h&&ve.merge(h.common,h[n.method]);h&&ve.forEach(["delete","get","head","post","put","patch","query","common"],p=>{delete h[p]}),n.headers=si.concat(d,h);const g=[];let v=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(n)===!1)return;v=v&&p.synchronous;const i=n.transitional||Rp;i&&i.legacyInterceptorReqResOrdering?g.unshift(p.fulfilled,p.rejected):g.push(p.fulfilled,p.rejected)});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,s=0,a;if(!v){const p=[Pp.bind(this),void 0];for(p.unshift(...g),p.push(...l),a=p.length,f=Promise.resolve(n);s<a;)f=f.then(p[s++],p[s++]);return f}a=g.length;let u=n;for(;s<a;){const p=g[s++],i=g[s++];try{u=p?p(u):u}catch(c){if(!i){f=Promise.reject(c);break}try{const m=i.call(this,c);ve.isThenable(m)&&(f=Promise.resolve(m).then(()=>Pp.call(this,u)))}catch(m){f=Promise.reject(m)}break}}if(!f)try{f=Pp.call(this,u)}catch(p){f=Promise.reject(p)}for(s=0,a=l.length;s<a;)f=f.then(l[s++],l[s++]);return f}getUri(e){e=fa(this.defaults,e);const n=$b(e.baseURL,e.url,e.allowAbsoluteUrls,e);return vb(n,e.params,e.paramsSerializer)}};ve.forEach(["delete","get","head","options"],function(e){ga.prototype[e]=function(n,t){return this.request(fa(t||{},{method:e,url:n,data:t&&ve.hasOwnProp(t,"data")?t.data:void 0}))}}),ve.forEach(["post","put","patch","query"],function(e){function n(t){return function(r,h,d){return this.request(fa(d||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}ga.prototype[e]=n(),e!=="query"&&(ga.prototype[e+"Form"]=n(!0))});let lM=class AC{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(h){t=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](h);r._listeners=null}),this.promise.then=h=>{let d;const g=new Promise(v=>{r.subscribe(v),d=v}).then(h);return g.cancel=function(){r.unsubscribe(d)},g},n(function(h,d,g){r.reason||(r.reason=new ic(h,d,g),t(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 t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new AC(function(t){n=t}),cancel:n}}};function cM(e){return function(n){return e.apply(null,n)}}function uM(e){return ve.isObject(e)&&e.isAxiosError===!0}const Bp={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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bp).forEach(([e,n])=>{Bp[n]=e});function jb(e){const n=new ga(e),t=Q0(ga.prototype.request,n);return ve.extend(t,ga.prototype,n,{allOwnKeys:!0}),ve.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return jb(fa(e,r))},t}const fr=ar("T",jb(rc));fr.Axios=ga,fr.CanceledError=ic,fr.CancelToken=lM,fr.isCancel=Cb,fr.VERSION=Op,fr.toFormData=xu,fr.AxiosError=tt,fr.Cancel=fr.CanceledError,fr.all=function(e){return Promise.all(e)},fr.spread=cM,fr.isAxiosError=uM,fr.mergeConfig=fa,fr.AxiosHeaders=si,fr.formToJSON=e=>xb(ve.isHTMLForm(e)?new FormData(e):e),fr.getAdapter=zb.getAdapter,fr.HttpStatusCode=Bp,fr.default=fr;const{Axios:O3,AxiosError:N3,CanceledError:D3,isCancel:P3,CancelToken:B3,VERSION:z3,all:F3,Cancel:j3,isAxiosError:W3,spread:H3,toFormData:U3,AxiosHeaders:V3,HttpStatusCode:q3,formToJSON:G3,getAdapter:K3,mergeConfig:Y3,create:J3}=fr;function Wb(){return Object.assign({},Ba())}function hM(e,n,t){const r=vi(e,t?.in);return r.setTime(r.getTime()+n*Dc),r}function dM(e,n){const t=()=>Zo(n?.in,NaN),r=mM(e);let h;if(r.date){const l=vM(r.date,2);h=yM(l.restDateString,l.year)}if(!h||isNaN(+h))return t();const d=+h;let g=0,v;if(r.time&&(g=bM(r.time),isNaN(g)))return t();if(r.timezone){if(v=wM(r.timezone),isNaN(v))return t()}else{const l=new Date(d+g),f=vi(0,n?.in);return f.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),f.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),f}return vi(d+g+v,n?.in)}const Su={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},pM=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,fM=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,gM=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mM(e){const n={},t=e.split(Su.dateTimeDelimiter);let r;if(t.length>2)return n;if(/:/.test(t[0])?r=t[0]:(n.date=t[0],r=t[1],Su.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Su.timeZoneDelimiter)[0],r=e.substr(n.date.length,e.length))),r){const h=Su.timezone.exec(r);h?(n.time=r.replace(h[1],""),n.timezone=h[1]):n.time=r}return n}function vM(e,n){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=e.match(t);if(!r)return{year:NaN,restDateString:""};const h=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?h:d*100,restDateString:e.slice((r[1]||r[2]).length)}}function yM(e,n){if(n===null)return new Date(NaN);const t=e.match(pM);if(!t)return new Date(NaN);const r=!!t[4],h=oc(t[1]),d=oc(t[2])-1,g=oc(t[3]),v=oc(t[4]),l=oc(t[5])-1;if(r)return AM(n,v,l)?xM(n,v,l):new Date(NaN);{const f=new Date(0);return!_M(n,d,g)||!kM(n,h)?new Date(NaN):(f.setUTCFullYear(n,d,Math.max(h,g)),f)}}function oc(e){return e?parseInt(e):1}function bM(e){const n=e.match(fM);if(!n)return NaN;const t=zp(n[1]),r=zp(n[2]),h=zp(n[3]);return SM(t,r,h)?t*Bh+r*Dc+h*1e3:NaN}function zp(e){return e&&parseFloat(e.replace(",","."))||0}function wM(e){if(e==="Z")return 0;const n=e.match(gM);if(!n)return 0;const t=n[1]==="+"?-1:1,r=parseInt(n[2]),h=n[3]&&parseInt(n[3])||0;return $M(r,h)?t*(r*Bh+h*Dc):NaN}function xM(e,n,t){const r=new Date(0);r.setUTCFullYear(e,0,4);const h=r.getUTCDay()||7,d=(n-1)*7+t+1-h;return r.setUTCDate(r.getUTCDate()+d),r}const CM=[31,null,31,30,31,30,31,31,30,31,30,31];function Hb(e){return e%400===0||e%4===0&&e%100!==0}function _M(e,n,t){return n>=0&&n<=11&&t>=1&&t<=(CM[n]||(Hb(e)?29:28))}function kM(e,n){return n>=1&&n<=(Hb(e)?366:365)}function AM(e,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function SM(e,n,t){return e===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&e>=0&&e<25}function $M(e,n){return n>=0&&n<=59}function TM(e,n,t){return hM(e,-n,t)}function Ub(e,n,t){const r=Wb(),h=IM(e,t.timeZone,t.locale??r.locale);return"formatToParts"in h?EM(h,n):RM(h,n)}function EM(e,n){const t=e.formatToParts(n);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function RM(e,n){const t=e.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function IM(e,n,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:n,timeZoneName:e})}function MM(e,n){const t=PM(n);return"formatToParts"in t?OM(t,e):NM(t,e)}const LM={year:0,month:1,day:2,hour:3,minute:4,second:5};function OM(e,n){try{const t=e.formatToParts(n),r=[];for(let h=0;h<t.length;h++){const d=LM[t[h].type];d!==void 0&&(r[d]=parseInt(t[h].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function NM(e,n){const t=e.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);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 Fp={},Vb=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")),DM=Vb==="06/25/2014, 00:00:00"||Vb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function PM(e){return Fp[e]||(Fp[e]=DM?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Fp[e]}function qb(e,n,t,r,h,d,g){const v=new Date(0);return v.setUTCFullYear(e,n,t),v.setUTCHours(r,h,d,g),v}const Gb=36e5,BM=6e4,jp={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Wp(e,n,t){if(!e)return 0;let r=jp.timezoneZ.exec(e);if(r)return 0;let h,d;if(r=jp.timezoneHH.exec(e),r)return h=parseInt(r[1],10),Kb(h)?-(h*Gb):NaN;if(r=jp.timezoneHHMM.exec(e),r){h=parseInt(r[2],10);const g=parseInt(r[3],10);return Kb(h,g)?(d=Math.abs(h)*Gb+g*BM,r[1]==="+"?-d:d):NaN}if(jM(e)){n=new Date(n||Date.now());const g=t?n:zM(n),v=Hp(g,e);return-(t?v:FM(n,v,e))}return NaN}function zM(e){return qb(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Hp(e,n){const t=MM(e,n),r=qb(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let h=e.getTime();const d=h%1e3;return h-=d>=0?d:1e3+d,r-h}function FM(e,n,t){let r=e.getTime()-n;const h=Hp(new Date(r),t);if(n===h)return n;r-=h-n;const d=Hp(new Date(r),t);return h===d?h:Math.max(h,d)}function Kb(e,n){return-23<=e&&e<=23&&(n==null||0<=n&&n<=59)}const Yb={};function jM(e){if(Yb[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Yb[e]=!0,!0}catch{return!1}}const WM=60*1e3,HM={X:function(e,n,t){const r=Up(t.timeZone,e);if(r===0)return"Z";switch(n){case"X":return Jb(r);case"XXXX":case"XX":return sl(r);default:return sl(r,":")}},x:function(e,n,t){const r=Up(t.timeZone,e);switch(n){case"x":return Jb(r);case"xxxx":case"xx":return sl(r);default:return sl(r,":")}},O:function(e,n,t){const r=Up(t.timeZone,e);switch(n){case"O":case"OO":case"OOO":return"GMT"+UM(r,":");default:return"GMT"+sl(r,":")}},z:function(e,n,t){switch(n){case"z":case"zz":case"zzz":return Ub("short",e,t);default:return Ub("long",e,t)}}};function Up(e,n){const t=e?Wp(e,n,!0)/WM:n?.getTimezoneOffset()??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+e);return t}function $u(e,n){const t=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<n;)r="0"+r;return t+r}function sl(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),h=$u(Math.floor(r/60),2),d=$u(Math.floor(r%60),2);return t+h+n+d}function Jb(e,n){return e%60===0?(e>0?"-":"+")+$u(Math.abs(e)/60,2):sl(e,n)}function UM(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),h=Math.floor(r/60),d=r%60;return d===0?t+String(h):t+String(h)+n+$u(d,2)}function Zb(e){const n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+e-+n}const VM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Vp=36e5,Xb=6e4,qM=2,bi={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:VM};function Qb(e,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const t=n.additionalDigits==null?qM:Number(n.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=GM(e),{year:h,restDateString:d}=KM(r.date,t),g=YM(d,h);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const v=g.getTime();let l=0,f;if(r.time&&(l=JM(r.time),l===null||isNaN(l)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=Wp(r.timeZone||n.timeZone,new Date(v+l)),isNaN(f))return new Date(NaN)}else f=Zb(new Date(v+l)),f=Zb(new Date(v+l+f));return new Date(v+l+f)}else return new Date(NaN)}function GM(e){const n={};let t=bi.dateTimePattern.exec(e),r;if(t?(n.date=t[1],r=t[3]):(t=bi.datePattern.exec(e),t?(n.date=t[1],r=t[2]):(n.date=null,r=e)),r){const h=bi.timeZone.exec(r);h?(n.time=r.replace(h[1],""),n.timeZone=h[1].trim()):n.time=r}return n}function KM(e,n){if(e){const t=bi.YYY[n],r=bi.YYYYY[n];let h=bi.YYYY.exec(e)||r.exec(e);if(h){const d=h[1];return{year:parseInt(d,10),restDateString:e.slice(d.length)}}if(h=bi.YY.exec(e)||t.exec(e),h){const d=h[1];return{year:parseInt(d,10)*100,restDateString:e.slice(d.length)}}}return{year:null}}function YM(e,n){if(n===null)return null;let t,r,h;if(!e||!e.length)return t=new Date(0),t.setUTCFullYear(n),t;let d=bi.MM.exec(e);if(d)return t=new Date(0),r=parseInt(d[1],10)-1,nw(n,r)?(t.setUTCFullYear(n,r),t):new Date(NaN);if(d=bi.DDD.exec(e),d){t=new Date(0);const g=parseInt(d[1],10);return QM(n,g)?(t.setUTCFullYear(n,0,g),t):new Date(NaN)}if(d=bi.MMDD.exec(e),d){t=new Date(0),r=parseInt(d[1],10)-1;const g=parseInt(d[2],10);return nw(n,r,g)?(t.setUTCFullYear(n,r,g),t):new Date(NaN)}if(d=bi.Www.exec(e),d)return h=parseInt(d[1],10)-1,rw(h)?ew(n,h):new Date(NaN);if(d=bi.WwwD.exec(e),d){h=parseInt(d[1],10)-1;const g=parseInt(d[2],10)-1;return rw(h,g)?ew(n,h,g):new Date(NaN)}return null}function JM(e){let n,t,r=bi.HH.exec(e);if(r)return n=parseFloat(r[1].replace(",",".")),qp(n)?n%24*Vp:NaN;if(r=bi.HHMM.exec(e),r)return n=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),qp(n,t)?n%24*Vp+t*Xb:NaN;if(r=bi.HHMMSS.exec(e),r){n=parseInt(r[1],10),t=parseInt(r[2],10);const h=parseFloat(r[3].replace(",","."));return qp(n,t,h)?n%24*Vp+t*Xb+h*1e3:NaN}return null}function ew(e,n,t){n=n||0,t=t||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const h=r.getUTCDay()||7,d=n*7+t+1-h;return r.setUTCDate(r.getUTCDate()+d),r}const ZM=[31,28,31,30,31,30,31,31,30,31,30,31],XM=[31,29,31,30,31,30,31,31,30,31,30,31];function tw(e){return e%400===0||e%4===0&&e%100!==0}function nw(e,n,t){if(n<0||n>11)return!1;if(t!=null){if(t<1)return!1;const r=tw(e);if(r&&t>XM[n]||!r&&t>ZM[n])return!1}return!0}function QM(e,n){if(n<1)return!1;const t=tw(e);return!(t&&n>366||!t&&n>365)}function rw(e,n){return!(e<0||e>52||n!=null&&(n<0||n>6))}function qp(e,n,t){return!(e<0||e>=25||n!=null&&(n<0||n>=60)||t!=null&&(t<0||t>=60))}const eL=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function tL(e,n,t={}){n=String(n);const r=n.match(eL);if(r){const h=Qb(t.originalDate||e,t);n=r.reduce(function(d,g){if(g[0]==="'")return d;const v=d.indexOf(g),l=d[v-1]==="'",f=d.replace(g,"'"+HM[g[0]](h,g,t)+"'");return l?f.substring(0,v-1)+f.substring(v+1):f},n)}return Es(e,n,t)}function nL(e,n,t){e=Qb(e,t);const r=Wp(n,e,!0),h=new Date(e.getTime()-r),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}function Tu(e,n,t,r){return r={...r,timeZone:n,originalDate:e},tL(nL(e,n,{timeZone:r.timeZone}),t,r)}const Eu="yyyy-MM-dd",iw="HH:mm:ss.SSS",ow="HH:mm:ss",Ru=`${Eu} ${iw}`,sw=`${Eu} ${ow}`,rL=ar("R",{methods:{parseDateTime(e,n){return e.includes(" ")&&(e=e.replace(" ","T")),n&&n==="UTC"&&(e+="Z"),Date.parse(e)},formatUtcToLocal(e,n){return Es(!n||n==="local"?TM(e,e.getTimezoneOffset()):e,Ru)},formatDateTime(e,n){return!n||n==="local"?Es(e,Ru):Tu(e,n,Ru)},formatDateTimeHMS(e,n){return!n||n==="local"?Es(e,sw):Tu(e,n,sw)},formatDate:function(e,n){return!n||n==="local"?Es(e,Eu):Tu(e,this.timeZone,Eu)},formatTime:function(e,n,t=iw){return!n||n==="local"?Es(e,t):Tu(e,this.timeZone,t)},formatTimeHMS:function(e,n){return this.formatTime(e,n,ow)},formatTimestamp(e,n){return this.formatDateTime(dM(e),n)},formatSeconds(e,n){return this.formatDateTime(new Date(e*1e3),n)},formatNanoseconds(e,n){return this.formatDateTime(new Date(parseInt(e)/1e6),n)}}}),aw=100,lw=ar("j",Vg("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:e=>n=>e.namedWidgets[n]},actions:{notifyAddHistory(e){this.notifyHistory.length>=aw&&(this.notifyHistory.length=aw-1),this.notifyHistory.unshift(e)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(e){Object.assign(this.namedWidgets,e)},clearNamedWidget(e){delete this.namedWidgets[e]},updatePlayback(e){Object.assign(this.playback,e)}}})),al=qg();al.use(({store:e})=>{e.commit=(n,t)=>{typeof e[n]=="function"&&e[n](t)},e.dispatch=(n,t)=>{if(typeof e[n]=="function")return e[n](t)}});const iL=al.install.bind(al);al.install=e=>{iL(e);const n=lw(al);e.config.globalProperties.$store={state:new Proxy({},{get(t,r){return n.$state}}),getters:new Proxy({},{get(t,r){if(r.includes("/")){const[,h]=r.split("/");return n[h]}return n[r]}}),commit(t,r){if(t.includes("/")){const[,h]=t.split("/");n[h]?.(r)}else n[t]?.(r)},dispatch(t,r){if(t.includes("/")){const[,h]=t.split("/");return n[h]?.(r)}else return n[t]?.(r)}}};const oL="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=",sL={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return oL},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const e=pL.indexOf(sc[this.status]),n=1-(e-1)*.05,t=224*this.scaleFactor*n,r=32*this.scaleFactor*n,h=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${e*h}px;`,`background-size: ${t}px ${r}px;`,`height: ${h}px;`,`width: ${h}px;`,`padding-top: ${e-1}px;`].join("")}}};function aL(e,n,t,r,h,d){return gt(),Zt("div",{style:Pn(d.iconStyle)},null,4)}const lL=Js(sL,[["render",aL]]),cL={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function uL(e,n,t,r,h,d){const g=kn("rux-icon");return gt(),qn(g,{size:t.size,icon:t.icon,style:Pn(d.colorStyle)},null,8,["size","icon","style"])}const hL=Js(cL,[["render",uL],["__scopeId","data-v-bb4cd487"]]),sc={fatal:"fatal",FATAL:"fatal",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"},ac={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},dL=function(e){const n="#000000",t="#ffffff",r=ac[sc[e]];if(r){const h=+`0x${r.slice(1,3)}`,d=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((h*299+d*587+g*114)/1e3>128)return n}return t},pL=Object.keys(ac),fL={astro:{component:e=>Eo(hL,{...e})},"astro-status":{component:e=>Eo(lL,{...e,status:e.icon})}},gL={extras:{component:e=>Eo(WC,{...e})}},mL={mixins:[rL],props:{historyCount:{type:Number,default:200},timeZone:{type:String,default:"local"}},data(){return{AstroStatusColors:ac,data:[],shownData:[],logLevels:["DEBUG","INFO","WARN","ERROR","FATAL"],logLevel:"INFO",search:"",headers:[{title:"Time",value:"timestamp",nowrap:!0},{title:"Level",value:"level"},{title:"Source",value:"microservice_name"},{title:"Message",value:"message"}],cable:new U0,subscription:null,paused:!1}},computed:{buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},watch:{logLevel:function(e,n){this.createSubscription()}},created(){this.createSubscription()},unmounted(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{pause:function(){this.paused=!this.paused},createSubscription(){this.subscription&&(this.subscription.unsubscribe(),this.data=[],this.shownData=this.data),this.cable.createSubscription("MessagesChannel",window.openc3Scope,{received:e=>{this.cable.recordPing(),e.length>this.historyCount&&e.splice(0,e.length-this.historyCount),e=e.filter(n=>{switch(this.logLevel){case"DEBUG":return!0;case"INFO":if(n.level!=="DEBUG")return!0;break;case"WARN":if(n.level!=="DEBUG"&&n.level!=="INFO")return!0;break;case"ERROR":if(n.level!=="DEBUG"&&n.level!=="INFO"&&n.level!=="WARN")return!0;break;case"FATAL":if(n.level!=="DEBUG"&&n.level!=="INFO"&&n.level!=="WARN"&&n.level!=="ERROR")return!0;break}return!1}),e.map(n=>{if(n.timestamp=this.formatTimestamp(n["@timestamp"],this.timeZone),n.message.raw&&n.message.json_class==="String"){let t="0x";for(let r=0;r<n.message.raw.length;r++)t+=n.message.raw[r].toString(16).padStart(2,"0").toUpperCase();n.message=t}else n.message=n.message.replaceAll("\\n",`
1489
+ `)}),this.data=e.reverse().concat(this.data),this.data.length>this.historyCount&&(this.data.length=this.historyCount),this.paused||(this.shownData=this.data)}},{history_count:this.historyCount,types:["log","notification","alert"]}).then(e=>{this.subscription=e})},getColor(e){return ac[sc[e]]},getStatus(e){return sc[e]},downloadLog(){const e=this.shownData.sort((r,h)=>r.time-h.time).map(r=>`${r.timestamp} | ${r.level} | ${r.microservice_name} | ${r.message}`).join(`
1490
+ `),n=new Blob([e],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(n),t.setAttribute("download",Es(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_message_log.txt"),t.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(e=>{this.data=[],this.shownData=[]}).catch(function(e){})}}},vL={class:"d-flex align-baseline"},yL=["title","datetime"],bL={style:{"white-space":"pre-wrap"}};function wL(e,n,t,r,h,d){const g=kn("v-btn"),v=kn("v-spacer"),l=kn("v-select"),f=kn("v-text-field"),s=kn("v-card-title"),a=kn("v-icon"),u=kn("rux-status"),p=kn("v-data-table"),i=kn("v-card");return gt(),qn(i,null,{default:on(()=>[He(s,{class:"d-flex align-center justify-content-space-between"},{default:on(()=>[ht("div",vL,[He(g,{icon:"mdi-download",variant:"text",size:"small",class:"mr-2","data-test":"download-log",onClick:d.downloadLog},null,8,["onClick"]),n[2]||(n[2]=ht("span",null," Log Messages ",-1)),He(g,{icon:d.buttonIcon,variant:"text","data-test":"pause",onClick:d.pause},null,8,["icon","onClick"])]),He(v),He(l,{modelValue:h.logLevel,"onUpdate:modelValue":n[0]||(n[0]=c=>h.logLevel=c),label:"Filter by log level","hide-details":"",variant:"outlined",density:"compact",items:h.logLevels,class:"mr-2",style:{"max-width":"150px"},"data-test":"log-messages-level"},null,8,["modelValue","items"]),He(v),He(f,{modelValue:h.search,"onUpdate:modelValue":n[1]||(n[1]=c=>h.search=c),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"},class:"search","data-test":"search-log-messages"},null,8,["modelValue"]),He(g,{icon:"mdi-delete-sweep",variant:"text",class:"ml-2","data-test":"clear-log",onClick:d.clearLog},null,8,["onClick"])]),_:1}),He(p,{headers:h.headers,items:h.shownData,search:h.search,"items-per-page":-1,"hide-default-footer":"","sort-by":[{key:"time",order:"desc"}],density:"compact","fixed-header":"",hover:"","data-test":"log-messages"},{"item.timestamp":on(({item:c})=>[ht("time",{title:c.timestamp,datetime:c.timestamp},_r(c.timestamp),9,yL)]),"item.level":on(({item:c})=>[ht("span",{style:Pn("display: inline-flex; align-items: center; color:"+d.getColor(c.level))},[c.level==="FATAL"?(gt(),qn(a,{key:0,size:"16",class:"mr-1",style:{"margin-left":"-2px"}},{default:on(()=>[...n[3]||(n[3]=[ji(" mdi-alert-octagon ",-1)])]),_:1})):(gt(),qn(u,{key:1,class:"mr-1",status:d.getStatus(c.level)},null,8,["status"])),ji(" "+_r(c.level),1)],4)]),"item.message":on(({item:c})=>[ht("div",bL,_r(c.message),1)]),_:1},8,["headers","items","search"])]),_:1})}const Z3=ar("E",Js(mL,[["render",wL],["__scopeId","data-v-e8d11557"]])),xL=50,CL=2e3,cw="single-spa:app-change",_L={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(cw,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},CL)},unmounted(){window.removeEventListener(cw,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(e){this.show=!e.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Dh().length>0,Dh().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},xL)}}},kL={class:"mx-1"},AL={key:1,class:"d-flex justify-center align-center"};function SL(e,n,t,r,h,d){const g=kn("v-card-title"),v=kn("v-card-text"),l=kn("v-card"),f=kn("v-progress-circular");return gt(),Zt(Pr,null,[h.show?(gt(),qn(l,{key:0},{default:on(()=>[He(g,null,{default:on(()=>[...n[0]||(n[0]=[ji(" 404 Not Found ",-1)])]),_:1}),He(v,{class:"d-flex align-center mt-3"},{default:on(()=>[n[1]||(n[1]=ji(" The requested URL ",-1)),ht("code",kL,_r(e.$route.fullPath),1),n[2]||(n[2]=ji(" was not routable. ",-1)),n[3]||(n[3]=ht("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):ni("",!0),d.showSpinner?(gt(),Zt("div",AL,[He(f,{indeterminate:""})])):ni("",!0)],64)}const uw=[{path:"",component:()=>lt(()=>at.import("./CmdTlmServer-be4dac6eeb7a6b184fd0.js"),void 0),children:[{component:()=>lt(()=>at.import("./InterfacesTab-0950a7dc993d1ae87cf5.js"),void 0),path:""},{component:()=>lt(()=>at.import("./InterfacesTab-0950a7dc993d1ae87cf5.js"),void 0),name:"InterfacesTab",path:"interfaces"},{component:()=>lt(()=>at.import("./TargetsTab-8def00628316dacb10b9.js"),void 0),name:"TargetsTab",path:"targets"},{component:()=>lt(()=>at.import("./CmdPacketsTab-0e324d15546779b36cbe.js"),void 0),name:"CmdPacketsTab",path:"cmd-packets"},{component:()=>lt(()=>at.import("./TlmPacketsTab-348ca696bec8218d392e.js"),void 0),name:"TlmPacketsTab",path:"tlm-packets"},{component:()=>lt(()=>at.import("./RoutersTab-542302486cd961ede002.js"),void 0),name:"RoutersTab",path:"routers"},{component:()=>lt(()=>at.import("./DataFlowsTab-88fea14a23c13f784f4e.js"),void 0),name:"DataFlowsTab",path:"data-flows"},{component:()=>lt(()=>at.import("./StatusTab-0dbcf0b1411d44f21f50.js"),void 0),name:"StatusTab",props:{refreshInterval:5e3},path:"status"}]},{path:"/:pathMatch(.*)*",name:"NotFound",component:Js(_L,[["render",SL]])}];uw.forEach(e=>Yg(e));const $L=Hg({history:Ug(),routes:uw});function hw(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function TL(e){if(Array.isArray(e))return e}function EL(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,h,d,g,v=[],l=!0,f=!1;try{if(d=(t=t.call(e)).next,n!==0)for(;!(l=(r=d.call(t)).done)&&(v.push(r.value),v.length!==n);l=!0);}catch(s){f=!0,h=s}finally{try{if(!l&&t.return!=null&&(g=t.return(),Object(g)!==g))return}finally{if(f)throw h}}return v}}function RL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1491
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IL(e,n){return TL(e)||EL(e,n)||ML(e,n)||RL()}function ML(e,n){if(e){if(typeof e=="string")return hw(e,n);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?hw(e,n):void 0}}const dw=Object.entries,pw=Object.setPrototypeOf,LL=Object.isFrozen,OL=Object.getPrototypeOf,NL=Object.getOwnPropertyDescriptor;let Jr=Object.freeze,Zr=Object.seal,ll=Object.create,fw=typeof Reflect<"u"&&Reflect,Gp=fw.apply,Kp=fw.construct;Jr||(Jr=function(e){return e}),Zr||(Zr=function(e){return e}),Gp||(Gp=function(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),h=2;h<t;h++)r[h-2]=arguments[h];return e.apply(n,r)}),Kp||(Kp=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return new e(...t)});const cl=gr(Array.prototype.forEach),DL=gr(Array.prototype.lastIndexOf),gw=gr(Array.prototype.pop),ul=gr(Array.prototype.push),PL=gr(Array.prototype.splice),Ls=Array.isArray,lc=gr(String.prototype.toLowerCase),Yp=gr(String.prototype.toString),mw=gr(String.prototype.match),cc=gr(String.prototype.replace),vw=gr(String.prototype.indexOf),BL=gr(String.prototype.trim),zL=gr(Number.prototype.toString),FL=gr(Boolean.prototype.toString),yw=typeof BigInt>"u"?null:gr(BigInt.prototype.toString),bw=typeof Symbol>"u"?null:gr(Symbol.prototype.toString),Br=gr(Object.prototype.hasOwnProperty),uc=gr(Object.prototype.toString),zr=gr(RegExp.prototype.test),ma=jL(TypeError);function gr(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),h=1;h<t;h++)r[h-1]=arguments[h];return Gp(e,n,r)}}function jL(e){return function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return Kp(e,t)}}function an(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lc;if(pw&&pw(e,null),!Ls(n))return e;let r=n.length;for(;r--;){let h=n[r];if(typeof h=="string"){const d=t(h);d!==h&&(LL(n)||(n[r]=d),h=d)}e[h]=!0}return e}function WL(e){for(let n=0;n<e.length;n++)Br(e,n)||(e[n]=null);return e}function li(e){const n=ll(null);for(const r of dw(e)){var t=IL(r,2);const h=t[0],d=t[1];Br(e,h)&&(Ls(d)?n[h]=WL(d):d&&typeof d=="object"&&d.constructor===Object?n[h]=li(d):n[h]=d)}return n}function HL(e){switch(typeof e){case"string":return e;case"number":return zL(e);case"boolean":return FL(e);case"bigint":return yw?yw(e):"0";case"symbol":return bw?bw(e):"Symbol()";case"undefined":return uc(e);case"function":case"object":{if(e===null)return uc(e);const n=e,t=Oo(n,"toString");if(typeof t=="function"){const r=t(n);return typeof r=="string"?r:uc(r)}return uc(e)}default:return uc(e)}}function Oo(e,n){for(;e!==null;){const r=NL(e,n);if(r){if(r.get)return gr(r.get);if(typeof r.value=="function")return gr(r.value)}e=OL(e)}function t(){return null}return t}function UL(e){try{return zr(e,""),!0}catch{return!1}}const ww=Jr(["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"]),Jp=Jr(["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"]),Zp=Jr(["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"]),VL=Jr(["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"]),Xp=Jr(["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"]),qL=Jr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xw=Jr(["#text"]),Cw=Jr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Qp=Jr(["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","dominant-baseline","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-orientation","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"]),_w=Jr(["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"]),Iu=Jr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),GL=Zr(/{{[\w\W]*|^[\w\W]*}}/g),KL=Zr(/<%[\w\W]*|^[\w\W]*%>/g),YL=Zr(/\${[\w\W]*/g),JL=Zr(/^data-[\-\w.\u00B7-\uFFFF]+$/),ZL=Zr(/^aria-[\-\w]+$/),kw=Zr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),XL=Zr(/^(?:\w+script|data):/i),QL=Zr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eO=Zr(/^html$/i),tO=Zr(/^[a-z][.\w]*(-[.\w]+)+$/i),Aw=Zr(/<[/\w!]/g),Sw=Zr(/<[/\w]/g),nO=Zr(/<\/no(script|embed|frames)/i),rO=Zr(/\/>/i),qi={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},iO=function(){return typeof window>"u"?null:window},oO=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let t=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));const h="dompurify"+(t?"#"+t:"");try{return e.createPolicy(h,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},$w=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Os=function(e,n,t,r){return Br(e,n)&&Ls(e[n])?an(r.base?li(r.base):{},e[n],r.transform):t};function Tw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:iO();const n=te=>Tw(te);if(n.version="3.4.13",n.removed=[],!e||!e.document||e.document.nodeType!==qi.document||!e.Element)return n.isSupported=!1,n;let t=e.document;const r=t,h=r.currentScript;e.DocumentFragment;const d=e.HTMLTemplateElement,g=e.Node,v=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const s=e.DOMParser,a=e.trustedTypes,u=v.prototype,p=Oo(u,"cloneNode"),i=Oo(u,"remove"),c=Oo(u,"nextSibling"),m=Oo(u,"childNodes"),b=Oo(u,"parentNode"),x=Oo(u,"shadowRoot"),I=Oo(u,"attributes"),$=g&&g.prototype?Oo(g.prototype,"nodeType"):null,_=g&&g.prototype?Oo(g.prototype,"nodeName"):null,C=g&&g.prototype?Oo(g.prototype,"ownerDocument"):null;if(typeof d=="function"){const te=t.createElement("template");te.content&&te.content.ownerDocument&&(t=te.content.ownerDocument)}let O,P="",L,T=!1,F=0;const D=function(){if(F>0)throw ma('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},M=function(te){D(),F++;try{return O.createHTML(te)}finally{F--}},S=function(te){D(),F++;try{return O.createScriptURL(te)}finally{F--}},k=function(){return T||(L=oO(a,h),T=!0),L},N=t,j=N.implementation,U=N.createNodeIterator,G=N.createDocumentFragment,J=N.getElementsByTagName,Q=r.importNode;let le=$w();n.isSupported=typeof dw=="function"&&typeof b=="function"&&j&&j.createHTMLDocument!==void 0;const ie=GL,ue=KL,pe=YL,oe=JL,re=ZL,Ce=XL,ke=QL,Ee=tO;let Ve=kw,Me=null;const ot=an({},[...ww,...Jp,...Zp,...Xp,...xw]);let Ge=null;const Ze=an({},[...Cw,...Qp,..._w,...Iu]);let Ie=Object.seal(ll(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}})),Tt=null,mt=null;const Wt=Object.seal(ll(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let An=!0,er=!0,Ht=!1,Tr=!0,vt=!1,Je=!0,Dt=!1,On=!1,Bn=null,Gn=null,mr=!1,mn=!1,zn=!1,Kn=!1,hn=!0,tr=!1;const lo="user-content-";let wi=!0,Fr=!1,jr={},vr=null;const yr=an({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let co=null;const uo=an({},["audio","video","img","source","image","track"]);let hs=null;const ci=an({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qo="http://www.w3.org/1998/Math/MathML",Po="http://www.w3.org/2000/svg",Wr="http://www.w3.org/1999/xhtml";let Hr=Wr,Nn=!1,Ur=null;const xi=an({},[Qo,Po,Wr],Yp),Fn=Jr(["mi","mo","mn","ms","mtext"]);let nr=an({},Fn);const Yi=Jr(["annotation-xml"]);let Ci=an({},Yi);const ds=an({},["title","style","font","a","script"]);let ho=null;const Ca=["application/xhtml+xml","text/html"],Ds="text/html";let nn=null,Er=null;const Ut=t.createElement("form"),ps=function(te){return te instanceof RegExp||te instanceof Function},br=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Er&&Er===te)return;(!te||typeof te!="object")&&(te={}),te=li(te),ho=Ca.indexOf(te.PARSER_MEDIA_TYPE)===-1?Ds:te.PARSER_MEDIA_TYPE,nn=ho==="application/xhtml+xml"?Yp:lc,Me=Os(te,"ALLOWED_TAGS",ot,{transform:nn}),Ge=Os(te,"ALLOWED_ATTR",Ze,{transform:nn}),Ur=Os(te,"ALLOWED_NAMESPACES",xi,{transform:Yp}),hs=Os(te,"ADD_URI_SAFE_ATTR",ci,{transform:nn,base:ci}),co=Os(te,"ADD_DATA_URI_TAGS",uo,{transform:nn,base:uo}),vr=Os(te,"FORBID_CONTENTS",yr,{transform:nn}),Tt=Os(te,"FORBID_TAGS",li({}),{transform:nn}),mt=Os(te,"FORBID_ATTR",li({}),{transform:nn}),jr=Br(te,"USE_PROFILES")?te.USE_PROFILES&&typeof te.USE_PROFILES=="object"?li(te.USE_PROFILES):te.USE_PROFILES:!1,An=te.ALLOW_ARIA_ATTR!==!1,er=te.ALLOW_DATA_ATTR!==!1,Ht=te.ALLOW_UNKNOWN_PROTOCOLS||!1,Tr=te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,vt=te.SAFE_FOR_TEMPLATES||!1,Je=te.SAFE_FOR_XML!==!1,Dt=te.WHOLE_DOCUMENT||!1,mn=te.RETURN_DOM||!1,zn=te.RETURN_DOM_FRAGMENT||!1,Kn=te.RETURN_TRUSTED_TYPE||!1,mr=te.FORCE_BODY||!1,hn=te.SANITIZE_DOM!==!1,tr=te.SANITIZE_NAMED_PROPS||!1,wi=te.KEEP_CONTENT!==!1,Fr=te.IN_PLACE||!1,Ve=UL(te.ALLOWED_URI_REGEXP)?te.ALLOWED_URI_REGEXP:kw,Hr=typeof te.NAMESPACE=="string"?te.NAMESPACE:Wr,nr=Br(te,"MATHML_TEXT_INTEGRATION_POINTS")&&te.MATHML_TEXT_INTEGRATION_POINTS&&typeof te.MATHML_TEXT_INTEGRATION_POINTS=="object"?li(te.MATHML_TEXT_INTEGRATION_POINTS):an({},Fn),Ci=Br(te,"HTML_INTEGRATION_POINTS")&&te.HTML_INTEGRATION_POINTS&&typeof te.HTML_INTEGRATION_POINTS=="object"?li(te.HTML_INTEGRATION_POINTS):an({},Yi);const Se=Br(te,"CUSTOM_ELEMENT_HANDLING")&&te.CUSTOM_ELEMENT_HANDLING&&typeof te.CUSTOM_ELEMENT_HANDLING=="object"?li(te.CUSTOM_ELEMENT_HANDLING):ll(null);if(Ie=ll(null),Br(Se,"tagNameCheck")&&ps(Se.tagNameCheck)&&(Ie.tagNameCheck=Se.tagNameCheck),Br(Se,"attributeNameCheck")&&ps(Se.attributeNameCheck)&&(Ie.attributeNameCheck=Se.attributeNameCheck),Br(Se,"allowCustomizedBuiltInElements")&&typeof Se.allowCustomizedBuiltInElements=="boolean"&&(Ie.allowCustomizedBuiltInElements=Se.allowCustomizedBuiltInElements),Zr(Ie),vt&&(er=!1),zn&&(mn=!0),jr&&(Me=an({},xw),Ge=ll(null),jr.html===!0&&(an(Me,ww),an(Ge,Cw)),jr.svg===!0&&(an(Me,Jp),an(Ge,Qp),an(Ge,Iu)),jr.svgFilters===!0&&(an(Me,Zp),an(Ge,Qp),an(Ge,Iu)),jr.mathMl===!0&&(an(Me,Xp),an(Ge,_w),an(Ge,Iu))),Wt.tagCheck=null,Wt.attributeCheck=null,Br(te,"ADD_TAGS")&&(typeof te.ADD_TAGS=="function"?Wt.tagCheck=te.ADD_TAGS:Ls(te.ADD_TAGS)&&(Me===ot&&(Me=li(Me)),an(Me,te.ADD_TAGS,nn))),Br(te,"ADD_ATTR")&&(typeof te.ADD_ATTR=="function"?Wt.attributeCheck=te.ADD_ATTR:Ls(te.ADD_ATTR)&&(Ge===Ze&&(Ge=li(Ge)),an(Ge,te.ADD_ATTR,nn))),Br(te,"ADD_URI_SAFE_ATTR")&&Ls(te.ADD_URI_SAFE_ATTR)&&an(hs,te.ADD_URI_SAFE_ATTR,nn),Br(te,"FORBID_CONTENTS")&&Ls(te.FORBID_CONTENTS)&&(vr===yr&&(vr=li(vr)),an(vr,te.FORBID_CONTENTS,nn)),Br(te,"ADD_FORBID_CONTENTS")&&Ls(te.ADD_FORBID_CONTENTS)&&(vr===yr&&(vr=li(vr)),an(vr,te.ADD_FORBID_CONTENTS,nn)),wi&&(Me["#text"]=!0),Dt&&an(Me,["html","head","body"]),Me.table&&(an(Me,["tbody"]),delete Tt.tbody),te.TRUSTED_TYPES_POLICY){if(typeof te.TRUSTED_TYPES_POLICY.createHTML!="function")throw ma('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof te.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ma('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Le=O;O=te.TRUSTED_TYPES_POLICY;try{P=M("")}catch(Ke){throw O=Le,Ke}}else te.TRUSTED_TYPES_POLICY===null?(O=void 0,P=""):(O===void 0&&(O=k()),O&&typeof P=="string"&&(P=M("")));Jr&&Jr(te),Er=te},jn=an({},[...Jp,...Zp,...VL]),Cn=an({},[...Xp,...qL]),Wn=function(te,Se,Le){return Se.namespaceURI===Wr?te==="svg":Se.namespaceURI===Qo?te==="svg"&&(Le==="annotation-xml"||nr[Le]):!!jn[te]},Bo=function(te,Se,Le){return Se.namespaceURI===Wr?te==="math":Se.namespaceURI===Po?te==="math"&&Ci[Le]:!!Cn[te]},cr=function(te,Se,Le){return Se.namespaceURI===Po&&!Ci[Le]||Se.namespaceURI===Qo&&!nr[Le]?!1:!Cn[te]&&(ds[te]||!jn[te])},zo=function(te){let Se=b(te);(!Se||!Se.tagName)&&(Se={namespaceURI:Hr,tagName:"template"});const Le=lc(te.tagName),Ke=lc(Se.tagName);return Ur[te.namespaceURI]?te.namespaceURI===Po?Wn(Le,Se,Ke):te.namespaceURI===Qo?Bo(Le,Se,Ke):te.namespaceURI===Wr?cr(Le,Se,Ke):!!(ho==="application/xhtml+xml"&&Ur[te.namespaceURI]):!1},Rr=function(te){ul(n.removed,{element:te});try{b(te).removeChild(te)}catch{if(i(te),!b(te))throw ma("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},po=function(te){ki(te);const Se=m(te);if(Se){const Ke=[];cl(Se,xt=>{ul(Ke,xt)}),cl(Ke,xt=>{try{i(xt)}catch{}})}const Le=I(te);if(Le)for(let Ke=Le.length-1;Ke>=0;--Ke){const xt=Le[Ke],St=xt&&xt.name;if(typeof St=="string")try{te.removeAttribute(St)}catch{}}},Vr=function(te,Se){try{ul(n.removed,{attribute:Se.getAttributeNode(te),from:Se})}catch{ul(n.removed,{attribute:null,from:Se})}if(Se.removeAttribute(te),te==="is")if(mn||zn)try{Rr(Se)}catch{}else try{Se.setAttribute(te,"")}catch{}},_i=function(te){const Se=I(te);if(Se)for(let Le=Se.length-1;Le>=0;--Le){const Ke=Se[Le],xt=Ke&&Ke.name;if(!(typeof xt!="string"||Ge[nn(xt)]))try{te.removeAttribute(xt)}catch{}}},ki=function(te){const Se=[te];for(;Se.length>0;){const Le=Se.pop();($?$(Le):Le.nodeType)===qi.element&&_i(Le);const Ke=m(Le);if(Ke)for(let xt=Ke.length-1;xt>=0;--xt)Se.push(Ke[xt])}},es=function(te){if(!Je)return;const Se=[te];for(;Se.length>0;){const Le=Se.pop(),Ke=$?$(Le):Le.nodeType;if(Ke===qi.processingInstruction||Ke===qi.comment&&zr(Sw,Le.data)){try{i(Le)}catch{}continue}if(Ke===qi.element){const St=Le,It=nn(_?_(Le):Le.nodeName);try{St.hasAttribute&&St.hasAttribute("patchsrc")&&St.removeAttribute("patchsrc"),St.hasAttribute&&St.hasAttribute("for")&&It!=="label"&&It!=="output"&&St.removeAttribute("for")}catch{}}const xt=m(Le);if(xt)for(let St=xt.length-1;St>=0;--St)Se.push(xt[St])}},qr=function(te){let Se=null,Le=null;if(mr)te="<remove></remove>"+te;else{const St=mw(te,/^[\r\n\t ]+/);Le=St&&St[0]}ho==="application/xhtml+xml"&&Hr===Wr&&(te='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+te+"</body></html>");const Ke=O?M(te):te;if(Hr===Wr)try{Se=new s().parseFromString(Ke,ho)}catch{}if(!Se||!Se.documentElement){Se=j.createDocument(Hr,"template",null);try{Se.documentElement.innerHTML=Nn?P:Ke}catch{}}const xt=Se.body||Se.documentElement;return te&&Le&&xt.insertBefore(t.createTextNode(Le),xt.childNodes[0]||null),Hr===Wr?J.call(Se,Dt?"html":"body")[0]:Dt?Se.documentElement:xt},Fo=function(te){const Se=C?C(te):te.ownerDocument;return U.call(Se||te,te,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},fo=function(te){return te=cc(te,ie," "),te=cc(te,ue," "),te=cc(te,pe," "),te},jo=function(te){var Se;te.normalize();const Le=C?C(te):te.ownerDocument,Ke=U.call(Le||te,te,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let xt=Ke.nextNode();for(;xt;)xt.data=fo(xt.data),xt=Ke.nextNode();const St=(Se=te.querySelectorAll)===null||Se===void 0?void 0:Se.call(te,"template");St&&cl(St,It=>{Rn(It.content)&&jo(It.content)})},go=function(te){const Se=_?_(te):null;return typeof Se!="string"||nn(Se)!=="form"?!1:typeof te.nodeName!="string"||typeof te.textContent!="string"||typeof te.removeChild!="function"||te.attributes!==I(te)||typeof te.removeAttribute!="function"||typeof te.setAttribute!="function"||typeof te.namespaceURI!="string"||typeof te.insertBefore!="function"||typeof te.hasChildNodes!="function"||te.nodeType!==$(te)||te.childNodes!==m(te)},Rn=function(te){if(!$||typeof te!="object"||te===null)return!1;try{return $(te)===qi.documentFragment}catch{return!1}},Ji=function(te){if(!$||typeof te!="object"||te===null)return!1;try{return typeof $(te)=="number"}catch{return!1}};function Ir(te,Se,Le){te.length!==0&&cl(te,Ke=>{Ke.call(n,Se,Le,Er)})}const mo=function(te,Se){return!!(Je&&te.hasChildNodes()&&!Ji(te.firstElementChild)&&zr(Aw,te.textContent)&&zr(Aw,te.innerHTML)||Je&&te.namespaceURI===Wr&&Se==="style"&&Ji(te.firstElementChild)||te.nodeType===qi.processingInstruction||Je&&te.nodeType===qi.comment&&zr(Sw,te.data))},fs=function(te,Se,Le){if(!Tt[Se]&&Ho(Se)&&(Ie.tagNameCheck instanceof RegExp&&zr(Ie.tagNameCheck,Se)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(Se)))return!1;if(wi&&!vr[Se]){const Ke=b(te),xt=m(te);if(xt&&Ke){const St=xt.length;for(let It=St-1;It>=0;--It){const Mr=te===Le?p(xt[It],!0):xt[It];Ke.insertBefore(Mr,c(te))}}}return Rr(te),!0},Wo=function(te,Se,Le,Ke){return te.length===0?Se:Se===Le||Se===Ke?li(Se):Se},vo=function(te,Se){if(Ir(le.beforeSanitizeElements,te,null),te!==Se&&b(te)===null)return Fr&&ki(te),!0;if(go(te))return Rr(te),!0;const Le=nn(_?_(te):te.nodeName);if(Me=Wo(le.uponSanitizeElement,Me,ot,Bn),Ir(le.uponSanitizeElement,te,{tagName:Le,allowedTags:Me}),te!==Se&&b(te)===null)return Fr&&ki(te),!0;if(mo(te,Le))return Rr(te),!0;if(Tt[Le]||!(Wt.tagCheck instanceof Function&&Wt.tagCheck(Le))&&!Me[Le]){const Ke=fs(te,Le,Se);return Ke===!1&&Ir(le.afterSanitizeElements,te,null),Ke}if(($?$(te):te.nodeType)===qi.element&&!zo(te)||(Le==="noscript"||Le==="noembed"||Le==="noframes")&&zr(nO,te.innerHTML))return Rr(te),!0;if(vt&&te.nodeType===qi.text){const Ke=fo(te.textContent);te.textContent!==Ke&&(ul(n.removed,{element:te.cloneNode()}),te.textContent=Ke)}return Ir(le.afterSanitizeElements,te,null),!1},ts=function(te,Se,Le){if(mt[Se]||Je&&Se==="patchsrc"||Je&&Se==="for"&&te!=="label"&&te!=="output"||hn&&(Se==="id"||Se==="name")&&(Le in t||Le in Ut))return!1;const Ke=Ge[Se]||Wt.attributeCheck instanceof Function&&Wt.attributeCheck(Se,te);if(!(er&&zr(oe,Se))&&!(An&&zr(re,Se))){if(Ke){if(!hs[Se]&&!zr(Ve,cc(Le,ke,""))&&!((Se==="src"||Se==="xlink:href"||Se==="href")&&te!=="script"&&vw(Le,"data:")===0&&co[te])&&!(Ht&&!zr(Ce,cc(Le,ke,"")))&&Le)return!1}else if(!(Ho(te)&&(Ie.tagNameCheck instanceof RegExp&&zr(Ie.tagNameCheck,te)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(te))&&(Ie.attributeNameCheck instanceof RegExp&&zr(Ie.attributeNameCheck,Se)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(Se,te))||Se==="is"&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&zr(Ie.tagNameCheck,Le)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(Le))))return!1}return!0},gs=an({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ho=function(te){return!gs[lc(te)]&&zr(Ee,te)},Ps=function(te,Se,Le,Ke){if(O&&typeof a=="object"&&typeof a.getAttributeType=="function"&&!Le)switch(a.getAttributeType(te,Se)){case"TrustedHTML":return M(Ke);case"TrustedScriptURL":return S(Ke)}return Ke},yo=function(te,Se,Le,Ke){try{Le?te.setAttributeNS(Le,Se,Ke):te.setAttribute(Se,Ke),go(te)?Rr(te):gw(n.removed)}catch{Vr(Se,te)}},Uo=function(te){Ir(le.beforeSanitizeAttributes,te,null);const Se=te.attributes;if(!Se||go(te))return;Ge=Wo(le.uponSanitizeAttribute,Ge,Ze,Gn);const Le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ge,forceKeepAttr:void 0};let Ke=Se.length;const xt=nn(te.nodeName);for(;Ke--;){const St=Se[Ke],It=St.name,Mr=St.namespaceURI,Lr=St.value,Jn=nn(It),rr=Lr;let Be=It==="value"?rr:BL(rr);if(Le.attrName=Jn,Le.attrValue=Be,Le.keepAttr=!0,Le.forceKeepAttr=void 0,Ir(le.uponSanitizeAttribute,te,Le),Be=Le.attrValue,tr&&(Jn==="id"||Jn==="name")&&vw(Be,lo)!==0&&(Vr(It,te),Be=lo+Be),Je&&zr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){Vr(It,te);continue}if(Jn==="attributename"&&mw(Be,"href")){Vr(It,te);continue}if(!Le.forceKeepAttr){if(!Le.keepAttr){Vr(It,te);continue}if(!Tr&&zr(rO,Be)){Vr(It,te);continue}if(vt&&(Be=fo(Be)),!ts(xt,Jn,Be)){Vr(It,te);continue}Be=Ps(xt,Jn,Mr,Be),Be!==rr&&yo(te,It,Mr,Be)}}Ir(le.afterSanitizeAttributes,te,null)},ui=function(te){let Se=null;const Le=Fo(te);for(Ir(le.beforeSanitizeShadowDOM,te,null);Se=Le.nextNode();)if(Ir(le.uponSanitizeShadowNode,Se,null),vo(Se,te),Uo(Se),Rn(Se.content)&&ui(Se.content),($?$(Se):Se.nodeType)===qi.element){const Ke=x(Se);Rn(Ke)&&(Yn(Ke),ui(Ke))}Ir(le.afterSanitizeShadowDOM,te,null)},Yn=function(te){const Se=[{node:te,shadow:null}];for(;Se.length>0;){const Le=Se.pop();if(Le.shadow){ui(Le.shadow);continue}const Ke=Le.node,xt=($?$(Ke):Ke.nodeType)===qi.element,St=m(Ke);if(St)for(let It=St.length-1;It>=0;--It)Se.push({node:St[It],shadow:null});if(xt){const It=_?_(Ke):null;if(typeof It=="string"&&nn(It)==="template"){const Mr=Ke.content;Rn(Mr)&&Se.push({node:Mr,shadow:null})}}if(xt){const It=x(Ke);Rn(It)&&Se.push({node:null,shadow:It},{node:It,shadow:null})}}};return n.sanitize=function(te){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=null,Ke=null,xt=null,St=null;if(Nn=!te,Nn&&(te="<!-->"),typeof te!="string"&&!Ji(te)&&(te=HL(te),typeof te!="string"))throw ma("dirty is not a string, aborting");if(!n.isSupported)return te;On?(Me=Bn,Ge=Gn):br(Se),(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&(Me=li(Me)),le.uponSanitizeAttribute.length>0&&(Ge=li(Ge)),n.removed=[];const It=Fr&&typeof te!="string"&&Ji(te);if(It){es(te);const Jn=_?_(te):te.nodeName;if(typeof Jn=="string"){const rr=nn(Jn);if(!Me[rr]||Tt[rr])throw po(te),ma("root node is forbidden and cannot be sanitized in-place")}if(go(te))throw po(te),ma("root node is clobbered and cannot be sanitized in-place");try{Yn(te)}catch(rr){throw po(te),rr}}else if(Ji(te))Le=qr("<!---->"),Ke=Le.ownerDocument.importNode(te,!0),Ke.nodeType===qi.element&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Le=Ke:Le.appendChild(Ke),Yn(Ke);else{if(!mn&&!vt&&!Dt&&te.indexOf("<")===-1)return O&&Kn?M(te):te;if(Le=qr(te),!Le)return mn?null:Kn?P:""}Le&&mr&&Rr(Le.firstChild);const Mr=It?te:Le;try{const Jn=Fo(Mr);for(;xt=Jn.nextNode();)vo(xt,Mr),Uo(xt),Rn(xt.content)&&ui(xt.content)}catch(Jn){throw It&&(po(te),cl(n.removed,rr=>{rr.element&&ki(rr.element)})),Jn}if(It)return cl(n.removed,Jn=>{Jn.element&&ki(Jn.element)}),vt&&jo(te),te;if(mn){if(vt&&jo(Le),zn)for(St=G.call(Le.ownerDocument);Le.firstChild;)St.appendChild(Le.firstChild);else St=Le;return(Ge.shadowroot||Ge.shadowrootmode)&&(St=Q.call(r,St,!0)),St}let Lr=Dt?Le.outerHTML:Le.innerHTML;return Dt&&Me["!doctype"]&&Le.ownerDocument&&Le.ownerDocument.doctype&&Le.ownerDocument.doctype.name&&zr(eO,Le.ownerDocument.doctype.name)&&(Lr="<!DOCTYPE "+Le.ownerDocument.doctype.name+`>
1492
+ `+Lr),vt&&(Lr=fo(Lr)),O&&Kn?M(Lr):Lr},n.setConfig=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};br(te),On=!0,Bn=Me,Gn=Ge},n.clearConfig=function(){Er=null,On=!1,Bn=null,Gn=null,O=L,P=""},n.isValidAttribute=function(te,Se,Le){Er||br({});const Ke=nn(te),xt=nn(Se);return ts(Ke,xt,Le)},n.addHook=function(te,Se){typeof Se=="function"&&Br(le,te)&&ul(le[te],Se)},n.removeHook=function(te,Se){if(Br(le,te)){if(Se!==void 0){const Le=DL(le[te],Se);return Le===-1?void 0:PL(le[te],Le,1)[0]}return gw(le[te])}},n.removeHooks=function(te){Br(le,te)&&(le[te]=[])},n.removeAllHooks=function(){le=$w()},n}var Ew=Tw();const sO={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"}},aO={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:e=>!!e||"Required.",match:e=>e===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 Ew.sanitize(this.params.text)}},methods:{dialog:function(e,n,t){this.params=e,this.show=!0,this.resolve=n,this.reject=t},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=""}}},lO=["innerHTML"],cO={key:2},uO={key:3,class:"validate mt-4"};function hO(e,n,t,r,h,d){const g=kn("v-spacer"),v=kn("v-toolbar"),l=kn("v-icon"),f=kn("v-text-field"),s=kn("v-card-text"),a=kn("v-btn"),u=kn("v-card-actions"),p=kn("v-card"),i=kn("v-dialog"),c=kn("v-app");return gt(),qn(c,null,{default:on(()=>[He(i,{modelValue:e.show,"onUpdate:modelValue":n[1]||(n[1]=m=>e.show=m),persistent:"",width:"600",onKeydown:Fg(d.cancel,["esc"])},{default:on(()=>[He(p,null,{default:on(()=>[He(v,{height:"24"},{default:on(()=>[He(g),ht("span",null,_r(e.params.title),1),He(g)]),_:1}),He(s,{class:"mt-4 pa-3"},{default:on(()=>[e.params.validateText?(gt(),qn(l,{key:0,class:"mr-2"},{default:on(()=>[...n[2]||(n[2]=[ji(" mdi-alert ",-1)])]),_:1})):ni("",!0),e.params.html?(gt(),Zt("span",{key:1,innerHTML:d.sanitizedText},null,8,lO)):(gt(),Zt("span",cO,_r(d.sanitizedText),1)),e.params.validateText?(gt(),Zt("div",uO,[ji(" Enter "+_r(e.params.validateText)+" to confirm! ",1),He(f,{modelValue:e.validationText,"onUpdate:modelValue":n[0]||(n[0]=m=>e.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[e.rules.required,e.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):ni("",!0)]),_:1}),He(u,{class:"px-2"},{default:on(()=>[He(g),e.params.cancelText?(gt(),qn(a,{key:0,variant:"outlined","data-test":d.dataTestCancel,onClick:d.cancel},{default:on(()=>[ji(_r(e.params.cancelText),1)]),_:1},8,["data-test","onClick"])):ni("",!0),He(a,{variant:"flat",color:e.params.okClass,"data-test":d.dataTestOk,onClick:d.ok},{default:on(()=>[ji(_r(e.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const dO=Js(aO,[["render",hO],["__scopeId","data-v-53691296"]]);class pO{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(dO);n.use(If);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=n.mount(t),this.mounted=!0}open({title:n,text:t,okText:r,okClass:h,validateText:d,cancelText:g,html:v}){return this.mount(),new Promise((l,f)=>{this.$root.dialog({title:n,text:t,okText:r,okClass:h,validateText:d,cancelText:g,html:v},l,f)})}confirm(n,{okText:t="Ok",cancelText:r="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:n,okText:t,okClass:h,validateText:null,cancelText:r,html:!1})}alert(n,{okText:t="Ok",html:r=!1,okClass:h="primary"}){return this.open({title:"Alert",text:n,okText:t,okClass:h,validateText:null,cancelText:null,html:r})}validate(n,{okText:t="Ok",validateText:r="CONFIRM",cancelText:h="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:n,okText:t,okClass:d,validateText:r,cancelText:h,html:!1})}}const fO={install(e,n){const t=new pO;e.provide("dialog",t),e.config.globalProperties.hasOwnProperty("$dialog")||(e.config.globalProperties.$dialog=t)}};let ef=1;var gO=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)});publish=e=>{this.subscribers.forEach(n=>n(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:n,...t}=e,r=typeof e.id=="number"||e.id&&e.id?.length>0?e.id:ef++,h=this.toasts.find(g=>g.id===r),d=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),h?this.toasts=this.toasts.map(g=>g.id===r?(this.publish({...g,...e,id:r,title:n}),{...g,...e,id:r,dismissible:d,title:n}):g):this.addToast({title:n,...t,dismissible:d,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(t=>t({id:n.id,dismiss:!0}))}),e);message=(e,n)=>this.create({...n,message:e,type:"default"});error=(e,n)=>this.create({...n,type:"error",message:e});success=(e,n)=>this.create({...n,type:"success",message:e});info=(e,n)=>this.create({...n,type:"info",message:e});warning=(e,n)=>this.create({...n,type:"warning",message:e});loading=(e,n)=>this.create({...n,type:"loading",message:e});promise=(e,n)=>{if(!n)return;let t;n.loading!==void 0&&(t=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let h=t!==void 0,d;const g=r.then(async l=>{if(d=["resolve",l],Oa(l))h=!1,this.create({id:t,type:"default",message:l});else if(vO(l)&&!l.ok){h=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,s=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,a=typeof f=="object"&&!Oa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"error",description:s,...a})}else if(l instanceof Error){h=!1;const f=typeof n.error=="function"?await n.error(l):n.error,s=typeof n.description=="function"?await n.description(l):n.description,a=typeof f=="object"&&!Oa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"error",description:s,...a})}else if(n.success!==void 0){h=!1;const f=typeof n.success=="function"?await n.success(l):n.success,s=typeof n.description=="function"?await n.description(l):n.description,a=typeof f=="object"&&!Oa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"success",description:s,...a})}}).catch(async l=>{if(d=["reject",l],n.error!==void 0){h=!1;const f=typeof n.error=="function"?await n.error(l):n.error,s=typeof n.description=="function"?await n.description(l):n.description,a=typeof f=="object"&&!Oa(f)?f:{message:f||"",id:t||""};this.create({id:t,type:"error",description:s,...a})}}).finally(()=>{h&&(this.dismiss(t),t=void 0),n.finally?.()}),v=()=>new Promise((l,f)=>g.then(()=>d[0]==="reject"?f(d[1]):l(d[1])).catch(f));return typeof t!="string"&&typeof t!="number"?{unwrap:v}:Object.assign(t,{unwrap:v})};custom=(e,n)=>{const t=n?.id||ef++,r=this.toasts.find(d=>d.id===t),h=n?.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(t)&&this.dismissedToasts.delete(t),r?this.toasts=this.toasts.map(d=>d.id===t?(this.publish({...d,component:e,dismissible:h,id:t,...n}),{...d,component:e,dismissible:h,id:t,...n}):d):this.addToast({component:e,dismissible:h,id:t,...n}),t};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const Mi=new gO;function mO(e,n){const t=n?.id||ef++;return Mi.create({message:e,id:t,type:"default",...n}),t}const vO=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yO=mO,bO=()=>Mi.toasts,wO=()=>Mi.getActiveToasts(),tf=Object.assign(yO,{success:Mi.success,info:Mi.info,warning:Mi.warning,error:Mi.error,custom:Mi.custom,message:Mi.message,promise:Mi.promise,dismiss:Mi.dismiss,loading:Mi.loading},{getHistory:bO,getToasts:wO});function Mu(e){return e.label!==void 0}const xO=3,Rw="24px",Iw="16px",Mw=4e3,CO=356,_O=14,kO=45,Lw=200;function AO(){const e=tn(!1);return mi(()=>{const n=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)}),{isDocumentHidden:e}}function Ns(...e){return e.filter(Boolean).join(" ")}function SO(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}function $O(e,n){const t={};return[e,n].forEach((r,h)=>{const d=h===1,g=d?"--mobile-offset":"--offset",v=d?Iw:Rw;function l(f){["top","right","bottom","left"].forEach(s=>{t[`${g}-${s}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?t[`${g}-${f}`]=v:t[`${g}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):l(v)}),t}const TO=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],EO=["aria-label","data-disabled","data-close-button-position"];var RO=$s({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:n}){const t=e,r=n,h=tn(null),d=tn(null),g=tn(!1),v=tn(!1),l=tn(!1),f=tn(!1),s=tn(!1),a=tn(0),u=tn(0),p=tn(t.toast.duration||t.duration||Mw),i=tn(null),c=tn(null),m=dt(()=>t.index===0),b=dt(()=>t.index+1<=t.visibleToasts),x=dt(()=>t.toast.type),I=dt(()=>t.toast.dismissible!==!1),$=dt(()=>t.toast.class||""),_=dt(()=>t.descriptionClass||""),C=dt(()=>{const re=t.toast.position||t.position,Ce=t.heights.filter(ke=>ke.position===re).findIndex(ke=>ke.toastId===t.toast.id);return Ce>=0?Ce:0}),O=dt(()=>{const re=t.toast.position||t.position;return t.heights.filter(Ce=>Ce.position===re).reduce((Ce,ke,Ee)=>Ee>=C.value?Ce:Ce+ke.height,0)}),P=dt(()=>C.value*t.gap+O.value||0),L=dt(()=>t.toast.closeButton??t.closeButton),T=dt(()=>t.toast.duration||t.duration||Mw),F=tn(0),D=tn(0),M=tn(null),S=dt(()=>t.position.split("-")),k=dt(()=>S.value[0]),N=dt(()=>S.value[1]),j=dt(()=>typeof t.toast.title!="string"),U=dt(()=>typeof t.toast.description!="string"),{isDocumentHidden:G}=AO(),J=dt(()=>x.value&&x.value==="loading");Da(()=>{g.value=!0,p.value=T.value}),mi(async()=>{if(!g.value||!c.value)return;await Tl();const re=c.value,Ce=re.style.height;re.style.height="auto";const ke=re.getBoundingClientRect().height;re.style.height=Ce,u.value=ke,r("update:height",{toastId:t.toast.id,height:ke,position:t.toast.position||t.position})});function Q(){v.value=!0,a.value=P.value,setTimeout(()=>{r("removeToast",t.toast)},Lw)}function le(){if(J.value||!I.value)return{};Q(),t.toast.onDismiss?.(t.toast)}function ie(re){re.button!==2&&(J.value||!I.value||(i.value=new Date,a.value=P.value,re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(l.value=!0,M.value={x:re.clientX,y:re.clientY})))}function ue(){if(f.value||!I.value)return;M.value=null;const re=Number(c.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),Ce=Number(c.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),ke=new Date().getTime()-(i.value?.getTime()||0),Ee=h.value==="x"?re:Ce,Ve=Math.abs(Ee)/ke;if(Math.abs(Ee)>=kO||Ve>.11){a.value=P.value,t.toast.onDismiss?.(t.toast),h.value==="x"?d.value=re>0?"right":"left":d.value=Ce>0?"down":"up",Q(),f.value=!0;return}else c.value?.style.setProperty("--swipe-amount-x","0px"),c.value?.style.setProperty("--swipe-amount-y","0px");s.value=!1,l.value=!1,h.value=null}function pe(re){if(!M.value||!I.value||(window?.getSelection()?.toString()?.length??!1))return;const Ce=re.clientY-M.value.y,ke=re.clientX-M.value.x,Ee=t.swipeDirections??SO(t.position);!h.value&&(Math.abs(ke)>1||Math.abs(Ce)>1)&&(h.value=Math.abs(ke)>Math.abs(Ce)?"x":"y");let Ve={x:0,y:0};const Me=ot=>1/(1.5+Math.abs(ot)/20);if(h.value==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&Ce<0||Ee.includes("bottom")&&Ce>0)Ve.y=Ce;else{const ot=Ce*Me(Ce);Ve.y=Math.abs(ot)<Math.abs(Ce)?ot:Ce}}else if(h.value==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&ke<0||Ee.includes("right")&&ke>0)Ve.x=ke;else{const ot=ke*Me(ke);Ve.x=Math.abs(ot)<Math.abs(ke)?ot:ke}(Math.abs(Ve.x)>0||Math.abs(Ve.y)>0)&&(s.value=!0),c.value?.style.setProperty("--swipe-amount-x",`${Ve.x}px`),c.value?.style.setProperty("--swipe-amount-y",`${Ve.y}px`)}Da(()=>{if(g.value=!0,!c.value)return;const re=c.value.getBoundingClientRect().height;u.value=re;const Ce=[{toastId:t.toast.id,height:re,position:t.toast.position},...t.heights];r("update:heights",Ce)}),Vs(()=>{c.value&&r("removeToast",t.toast)}),mi(re=>{if(t.toast.promise&&x.value==="loading"||t.toast.duration===1/0||t.toast.type==="loading")return;let Ce;const ke=()=>{if(D.value<F.value){const Ve=new Date().getTime()-F.value;p.value=p.value-Ve}D.value=new Date().getTime()},Ee=()=>{p.value!==1/0&&(F.value=new Date().getTime(),Ce=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),Q()},p.value))};t.expanded||t.interacting||G.value?ke():Ee(),re(()=>{clearTimeout(Ce)})}),Ti(()=>t.toast.delete,re=>{re!==void 0&&re&&(Q(),t.toast.onDismiss?.(t.toast))},{deep:!0});function oe(){l.value=!1,h.value=null,M.value=null}return(re,Ce)=>(gt(),Zt("li",{tabindex:"0",ref_key:"toastRef",ref:c,class:sn(Ft(Ns)(t.class,$.value,re.classes?.toast,re.toast.classes?.toast,re.classes?.[x.value],re.toast?.classes?.[x.value])),"data-sonner-toast":"","data-rich-colors":re.toast.richColors??re.defaultRichColors,"data-styled":!(re.toast.component||re.toast?.unstyled||re.unstyled),"data-mounted":g.value,"data-promise":!!re.toast.promise,"data-swiped":s.value,"data-removed":v.value,"data-visible":b.value,"data-y-position":k.value,"data-x-position":N.value,"data-index":re.index,"data-front":m.value,"data-swiping":l.value,"data-dismissible":I.value,"data-type":x.value,"data-invert":re.toast.invert||re.invert,"data-swipe-out":f.value,"data-swipe-direction":d.value,"data-expanded":!!(re.expanded||re.expandByDefault&&g.value),"data-testid":re.toast.testId,style:Pn({"--index":re.index,"--toasts-before":re.index,"--z-index":re.toasts.length-re.index,"--offset":`${v.value?a.value:P.value}px`,"--initial-height":re.expandByDefault?"auto":`${u.value}px`,...re.style,...t.toast.style}),onDragend:oe,onPointerdown:ie,onPointerup:ue,onPointermove:pe},[L.value&&!re.toast.component&&x.value!=="loading"?(gt(),Zt("button",{key:0,"aria-label":re.closeButtonAriaLabel||"Close toast","data-disabled":J.value,"data-close-button":"true","data-close-button-position":re.closeButtonPosition,class:sn(Ft(Ns)(re.classes?.closeButton,re.toast?.classes?.closeButton)),onClick:le},[re.icons?.close?(gt(),qn(Gs(re.icons?.close),{key:0})):Ei(re.$slots,"close-icon",{key:1})],10,EO)):ni("v-if",!0),re.toast.component?(gt(),qn(Gs(re.toast.component),dr({key:1},re.toast.componentProps,{onCloseToast:le,isPaused:re.$props.expanded||re.$props.interacting||Ft(G)}),null,16,["isPaused"])):(gt(),Zt(Pr,{key:2},[x.value!=="default"||re.toast.icon||re.toast.promise?(gt(),Zt("div",{key:0,"data-icon":"",class:sn(Ft(Ns)(re.classes?.icon,re.toast?.classes?.icon))},[re.toast.icon?(gt(),qn(Gs(re.toast.icon),{key:0})):(gt(),Zt(Pr,{key:1},[x.value==="loading"?Ei(re.$slots,"loading-icon",{key:0}):x.value==="success"?Ei(re.$slots,"success-icon",{key:1}):x.value==="error"?Ei(re.$slots,"error-icon",{key:2}):x.value==="warning"?Ei(re.$slots,"warning-icon",{key:3}):x.value==="info"?Ei(re.$slots,"info-icon",{key:4}):ni("v-if",!0)],64))],2)):ni("v-if",!0),ht("div",{"data-content":"",class:sn(Ft(Ns)(re.classes?.content,re.toast?.classes?.content))},[ht("div",{"data-title":"",class:sn(Ft(Ns)(re.classes?.title,re.toast.classes?.title))},[j.value?(gt(),qn(Gs(re.toast.title),Nc(dr({key:0},re.toast.componentProps)),null,16)):(gt(),Zt(Pr,{key:1},[ji(_r(re.toast.title),1)],64))],2),re.toast.description?(gt(),Zt("div",{key:0,"data-description":"",class:sn(Ft(Ns)(re.descriptionClass,_.value,re.classes?.description,re.toast.classes?.description))},[U.value?(gt(),qn(Gs(re.toast.description),Nc(dr({key:0},re.toast.componentProps)),null,16)):(gt(),Zt(Pr,{key:1},[ji(_r(re.toast.description),1)],64))],2)):ni("v-if",!0)],2),re.toast.cancel?(gt(),Zt("button",{key:1,style:Pn(re.toast.cancelButtonStyle||re.cancelButtonStyle),class:sn(Ft(Ns)(re.classes?.cancelButton,re.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:Ce[0]||(Ce[0]=ke=>{Ft(Mu)(re.toast.cancel)&&I.value&&(re.toast.cancel.onClick?.(ke),Q())})},_r(Ft(Mu)(re.toast.cancel)?re.toast.cancel?.label:re.toast.cancel),7)):ni("v-if",!0),re.toast.action?(gt(),Zt("button",{key:2,style:Pn(re.toast.actionButtonStyle||re.actionButtonStyle),class:sn(Ft(Ns)(re.classes?.actionButton,re.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:Ce[1]||(Ce[1]=ke=>{Ft(Mu)(re.toast.action)&&(re.toast.action.onClick?.(ke),!ke.defaultPrevented&&Q())})},_r(Ft(Mu)(re.toast.action)?re.toast.action?.label:re.toast.action),7)):ni("v-if",!0)],64))],46,TO))}}),IO=RO,hc=(e,n)=>{const t=e.__vccOpts||e;for(const[r,h]of n)t[r]=h;return t};const MO={},LO={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function OO(e,n){return gt(),Zt("svg",LO,n[0]||(n[0]=[ht("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ht("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var NO=hc(MO,[["render",OO]]);const DO=["data-visible"],PO={class:"sonner-spinner"};var BO=$s({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const n=Array(12).fill(0);return(t,r)=>(gt(),Zt("div",{class:"sonner-loading-wrapper","data-visible":t.visible},[ht("div",PO,[(gt(!0),Zt(Pr,null,Il(Ft(n),h=>(gt(),Zt("div",{key:`spinner-bar-${h}`,class:"sonner-loading-bar"}))),128))])],8,DO))}}),zO=BO;const FO={},jO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function WO(e,n){return gt(),Zt("svg",jO,n[0]||(n[0]=[ht("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var HO=hc(FO,[["render",WO]]);const UO={},VO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function qO(e,n){return gt(),Zt("svg",VO,n[0]||(n[0]=[ht("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var GO=hc(UO,[["render",qO]]);const KO={},YO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function JO(e,n){return gt(),Zt("svg",YO,n[0]||(n[0]=[ht("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var ZO=hc(KO,[["render",JO]]);const XO={},QO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function e2(e,n){return gt(),Zt("svg",QO,n[0]||(n[0]=[ht("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var t2=hc(XO,[["render",e2]]);const n2=["aria-label"],r2=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],i2=typeof window<"u"&&typeof document<"u";function o2(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var s2=$s({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},closeButtonPosition:{default:"top-left"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:_O},visibleToasts:{default:xO},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:Rw},mobileOffset:{default:Iw},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const n=e,t=jg(),r=tn([]),h=dt(()=>n.id?r.value.filter(T=>T.toasterId===n.id):r.value.filter(T=>!T.toasterId));function d(T,F){return h.value.filter(D=>!D.position&&F===0||D.position===T)}const g=dt(()=>{const T=h.value.filter(F=>F.position).map(F=>F.position);return T.length>0?Array.from(new Set([n.position].concat(T))):[n.position]}),v=dt(()=>{const T={};return g.value.forEach(F=>{T[F]=r.value.filter(D=>D.position===F)}),T}),l=tn([]),f=tn({}),s=tn(!1);mi(()=>{g.value.forEach(T=>{T in f.value||(f.value[T]=!1)})});const a=tn(n.theme!=="system"?n.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),u=tn(null),p=tn(null),i=tn(!1),c=n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function m(T){r.value.find(F=>F.id===T.id)?.delete||Mi.dismiss(T.id),r.value=r.value.filter(({id:F})=>F!==T.id),setTimeout(()=>{r.value.find(F=>F.id===T.id)||(l.value=l.value.filter(F=>F.toastId!==T.id))},Lw+50)}function b(T){i.value&&!T.currentTarget?.contains?.(T.relatedTarget)&&(i.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function x(T){T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||i.value||(i.value=!0,p.value=T.relatedTarget)}function I(T){T.target&&T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||(s.value=!0)}mi(T=>{const F=Mi.subscribe(D=>{if(D.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(M=>M.id===D.id?{...M,delete:!0}:M)});return}Tl(()=>{const M=r.value.findIndex(S=>S.id===D.id);M!==-1?r.value=[...r.value.slice(0,M),{...r.value[M],...D},...r.value.slice(M+1)]:r.value=[D,...r.value]})});T(F)}),mi(T=>{if(typeof window>"u")return;if(n.theme!=="system"){a.value=n.theme;return}const F=window.matchMedia("(prefers-color-scheme: dark)"),D=S=>{a.value=S?"dark":"light"};D(F.matches);const M=S=>{D(S.matches)};try{F.addEventListener("change",M)}catch{F.addListener(M)}T(()=>{try{F.removeEventListener("change",M)}catch{F.removeListener(M)}})}),mi(()=>{u.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,i.value=!1)}),mi(()=>{r.value.length<=1&&Object.keys(f.value).forEach(T=>{f.value[T]=!1})}),mi(T=>{function F(D){const M=n.hotkey.every(N=>D[N]||D.code===N),S=Array.isArray(u.value)?u.value[0]:u.value;M&&(g.value.forEach(N=>{f.value[N]=!0}),S?.focus());const k=document.activeElement===u.value||S?.contains(document.activeElement);D.code==="Escape"&&k&&g.value.forEach(N=>{f.value[N]=!1})}i2&&(document.addEventListener("keydown",F),T(()=>{document.removeEventListener("keydown",F)}))});function $(T){const F=T.currentTarget,D=F.getAttribute("data-y-position")+"-"+F.getAttribute("data-x-position");f.value[D]=!0}function _(T){if(!s.value){const F=T.currentTarget,D=F.getAttribute("data-y-position")+"-"+F.getAttribute("data-x-position");f.value[D]=!1}}function C(){Object.keys(f.value).forEach(T=>{f.value[T]=!1})}function O(){s.value=!1}function P(T){l.value=T}function L(T){const F=l.value.findIndex(D=>D.toastId===T.toastId);if(F!==-1)l.value[F]=T;else{const D=l.value.findIndex(M=>M.position===T.position);D!==-1?l.value.splice(D,0,T):l.value.unshift(T)}}return(T,F)=>(gt(),Zt(Pr,null,[ni(" Remove item from normal navigation flow, only available via hotkey "),ht("section",{"aria-label":`${T.containerAriaLabel} ${Ft(c)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(gt(!0),Zt(Pr,null,Il(g.value,(D,M)=>(gt(),Zt("ol",dr({key:D,ref_for:!0,ref_key:"listRef",ref:u,"data-sonner-toaster":"","data-sonner-theme":a.value,class:n.class,dir:T.dir==="auto"?o2():T.dir,tabIndex:-1,"data-theme":T.theme,"data-rich-colors":T.richColors,"data-y-position":D.split("-")[0],"data-x-position":D.split("-")[1],style:{"--front-toast-height":`${l.value[0]?.height||0}px`,"--width":`${Ft(CO)}px`,"--gap":`${T.gap}px`,...T.style,...Ft(t).style,...Ft($O)(T.offset,T.mobileOffset)}},{ref_for:!0},T.$attrs,{onBlur:b,onFocus:x,onMouseenter:$,onMousemove:$,onMouseleave:_,onDragend:C,onPointerdown:I,onPointerup:O}),[(gt(!0),Zt(Pr,null,Il(d(D,M),(S,k)=>(gt(),qn(IO,{key:S.id,heights:l.value,icons:T.icons,index:k,toast:S,defaultRichColors:T.richColors,duration:T.toastOptions?.duration??T.duration,class:sn(T.toastOptions?.class??""),descriptionClass:T.toastOptions?.descriptionClass,invert:T.invert,visibleToasts:T.visibleToasts,closeButton:T.toastOptions?.closeButton??T.closeButton,interacting:s.value,position:D,closeButtonPosition:T.toastOptions?.closeButtonPosition??T.closeButtonPosition,style:Pn(T.toastOptions?.style),unstyled:T.toastOptions?.unstyled,classes:T.toastOptions?.classes,cancelButtonStyle:T.toastOptions?.cancelButtonStyle,actionButtonStyle:T.toastOptions?.actionButtonStyle,"close-button-aria-label":T.toastOptions?.closeButtonAriaLabel,toasts:v.value[D],expandByDefault:T.expand,gap:T.gap,expanded:f.value[D]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":P,"onUpdate:height":L,onRemoveToast:m},{"close-icon":on(()=>[Ei(T.$slots,"close-icon",{},()=>[He(NO)])]),"loading-icon":on(()=>[Ei(T.$slots,"loading-icon",{},()=>[He(zO,{visible:S.type==="loading"},null,8,["visible"])])]),"success-icon":on(()=>[Ei(T.$slots,"success-icon",{},()=>[He(HO)])]),"error-icon":on(()=>[Ei(T.$slots,"error-icon",{},()=>[He(t2)])]),"warning-icon":on(()=>[Ei(T.$slots,"warning-icon",{},()=>[He(ZO)])]),"info-icon":on(()=>[Ei(T.$slots,"info-icon",{},()=>[He(GO)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","closeButtonPosition","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,r2))),128))],8,n2)],2112))}}),a2=s2;function Yt(e,n){return t=>Object.keys(e).reduce((r,h)=>{const d=typeof e[h]=="object"&&e[h]!=null&&!Array.isArray(e[h])?e[h]:{type:e[h]};return t&&h in t?r[h]={...d,default:t[h]}:r[h]=d,n&&!r[h].source&&(r[h].source=n),r},{})}const Li=Yt({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function hl(e){Bg(`Vuetify: ${e}`)}const nf=typeof window<"u",rf=nf&&"IntersectionObserver"in window,l2=nf&&"matchMedia"in window&&typeof window.matchMedia=="function",Ow=()=>l2&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function En(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const t=Number(e);return isNaN(t)?String(e):isFinite(t)?`${t}${n}`:void 0}function of(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Nw(e){let n;return e!==null&&typeof e=="object"&&((n=Object.getPrototypeOf(e))===Object.prototype||n===null)}function c2(e){if(e&&"$el"in e){const n=e.$el;return n?.nodeType===Node.TEXT_NODE?n.nextElementSibling:n}return e}function sf(e,n){return n.every(t=>e.hasOwnProperty(t))}function u2(e,n){const t={};for(const r of n)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function h2(e){return e==null?[]:Array.isArray(e)?e:[e]}function Lu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(n,Math.min(t,e))}function Dw(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+t.repeat(Math.max(0,n-e.length))}function d2(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const t=[];let r=0;for(;r<e.length;)t.push(e.substr(r,n)),r+=n;return t}function dl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const r={};for(const h in e)r[h]=e[h];for(const h in n){const d=e[h],g=n[h];if(Nw(d)&&Nw(g)){r[h]=dl(d,g,t);continue}if(t&&Array.isArray(d)&&Array.isArray(g)){r[h]=t(d,g);continue}r[h]=g}return r}function Pw(e){return e.map(n=>n.type===Pr?Pw(n.children):n).flat()}function va(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(va.cache.has(e))return va.cache.get(e);const n=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return va.cache.set(e,n),n}va.cache=new Map;function dc(e,n){if(!n||typeof n!="object")return[];if(Array.isArray(n))return n.map(t=>dc(e,t)).flat(1);if(n.suspense)return dc(e,n.ssContent);if(Array.isArray(n.children))return n.children.map(t=>dc(e,t)).flat(1);if(n.component){if(Object.getOwnPropertyDescriptor(n.component.provides,e))return[n.component];if(n.component.subTree)return dc(e,n.component.subTree).flat(1)}return[]}function Bw(e){const n=Rl({});mi(()=>{const r=e();for(const h in r)n[h]=r[h]},{flush:"sync"});const t={};for(const r in n)t[r]=Lt(()=>n[r]);return t}function af(e,n){return e.includes(n)}function zw(e,n){return n="on"+Lh(n),!!(e[n]||e[`${n}Once`]||e[`${n}Capture`]||e[`${n}OnceCapture`]||e[`${n}CaptureOnce`])}function p2(){const e=Wi(),n=t=>{e.value=t};return Object.defineProperty(n,"value",{enumerable:!0,get:()=>e.value,set:t=>e.value=t}),Object.defineProperty(n,"el",{enumerable:!0,get:()=>c2(e.value)}),n}function Ou(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function f2(e){const n=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(t=>{let[r,h]=t;return n.includes(r)?!!h:h!==void 0}))}const g2=["top","bottom"],m2=["start","end","left","right"];function v2(e,n){let[t,r]=e.split(" ");return r||(r=af(g2,t)?"start":af(m2,t)?"top":"center"),{side:Fw(t,n),align:Fw(r,n)}}function Fw(e,n){return e==="start"?n?"right":"left":e==="end"?n?"left":"right":e}class lf{constructor(n){const t=document.body.currentCSSZoom??1,r=n instanceof Element,h=r?1+(1-t)/t:1,{x:d,y:g,width:v,height:l}=r?n.getBoundingClientRect():n;this.x=d*h,this.y=g*h,this.width=v*h,this.height=l*h}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function y2(e){if(Array.isArray(e)){const n=document.body.currentCSSZoom??1,t=1+(1-n)/n;return new lf({x:e[0]*t,y:e[1]*t,width:0*t,height:0*t})}else return new lf(e)}const pl=2.4,jw=.2126729,Ww=.7151522,Hw=.072175,b2=.55,w2=.58,x2=.57,C2=.62,Nu=.03,Uw=1.45,_2=5e-4,k2=1.25,A2=1.25,Vw=.078,qw=12.82051282051282,Du=.06,Gw=.001;function Kw(e,n){const t=(e.r/255)**pl,r=(e.g/255)**pl,h=(e.b/255)**pl,d=(n.r/255)**pl,g=(n.g/255)**pl,v=(n.b/255)**pl;let l=t*jw+r*Ww+h*Hw,f=d*jw+g*Ww+v*Hw;if(l<=Nu&&(l+=(Nu-l)**Uw),f<=Nu&&(f+=(Nu-f)**Uw),Math.abs(f-l)<_2)return 0;let s;if(f>l){const a=(f**b2-l**w2)*k2;s=a<Gw?0:a<Vw?a-a*qw*Du:a-Du}else{const a=(f**C2-l**x2)*A2;s=a>-Gw?0:a>-Vw?a-a*qw*Du:a+Du}return s*100}function cf(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function S2(e){return cf(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Yw=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,$2={rgb:(e,n,t,r)=>({r:e,g:n,b:t,a:r}),rgba:(e,n,t,r)=>({r:e,g:n,b:t,a:r}),hsl:(e,n,t,r)=>Jw({h:e,s:n,l:t,a:r}),hsla:(e,n,t,r)=>Jw({h:e,s:n,l:t,a:r}),hsv:(e,n,t,r)=>fc({h:e,s:n,v:t,a:r}),hsva:(e,n,t,r)=>fc({h:e,s:n,v:t,a:r})};function pc(e){if(typeof e=="number")return(isNaN(e)||e<0||e>16777215)&&hl(`'${e}' is not a valid hex color`),{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Yw.test(e)){const{groups:n}=e.match(Yw),{fn:t,values:r}=n,h=r.split(/,\s*|\s*\/\s*|\s+/).map((d,g)=>d.endsWith("%")||g>0&&g<3&&["hsl","hsla","hsv","hsva"].includes(t)?parseFloat(d)/100:parseFloat(d));return $2[t](...h)}else if(typeof e=="string"){let n=e.startsWith("#")?e.slice(1):e;[3,4].includes(n.length)?n=n.split("").map(r=>r+r).join(""):[6,8].includes(n.length)||hl(`'${e}' is not a valid hex(a) color`);const t=parseInt(n,16);return(isNaN(t)||t<0||t>4294967295)&&hl(`'${e}' is not a valid hex(a) color`),T2(n)}else if(typeof e=="object"){if(sf(e,["r","g","b"]))return e;if(sf(e,["h","s","l"]))return fc(Zw(e));if(sf(e,["h","s","v"]))return fc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
1493
+ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function fc(e){const{h:n,s:t,v:r,a:h}=e,d=v=>{const l=(v+n/60)%6;return r-r*t*Math.max(Math.min(l,4-l,1),0)},g=[d(5),d(3),d(1)].map(v=>Math.round(v*255));return{r:g[0],g:g[1],b:g[2],a:h}}function Jw(e){return fc(Zw(e))}function Zw(e){const{h:n,s:t,l:r,a:h}=e,d=r+t*Math.min(r,1-r),g=d===0?0:2-2*r/d;return{h:n,s:g,v:d,a:h}}function T2(e){e=E2(e);let[n,t,r,h]=d2(e,2).map(d=>parseInt(d,16));return h=h===void 0?h:h/255,{r:n,g:t,b:r,a:h}}function E2(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(n=>n+n).join("")),e.length!==6&&(e=Dw(Dw(e,6),8,"F")),e}function R2(e){const n=Math.abs(Kw(pc(0),pc(e)));return Math.abs(Kw(pc(16777215),pc(e)))>Math.min(n,50)?"#fff":"#000"}function No(e,n){const t=Ig();if(!t)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return t}function ya(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const n=No(e).type;return va(n?.aliasName||n?.name)}function I2(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:No("injectSelf");const{provides:t}=n;if(t&&e in t)return t[e]}const Pu=Symbol.for("vuetify:defaults");function uf(){const e=qs(Pu);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function hf(e,n){const t=uf(),r=tn(e),h=dt(()=>{if(Ft(n?.disabled))return t.value;const d=Ft(n?.scoped),g=Ft(n?.reset),v=Ft(n?.root);if(r.value==null&&!(d||g||v))return t.value;let l=dl(r.value,{prev:t.value});if(d)return l;if(g||v){const f=Number(g||1/0);for(let s=0;s<=f&&!(!l||!("prev"in l));s++)l=l.prev;return l&&typeof v=="string"&&v in l&&(l=dl(dl(l,{prev:l}),l[v])),l}return l.prev?dl(l.prev,l):l});return Na(Pu,h),h}function M2(e,n){return e.props&&(typeof e.props[n]<"u"||typeof e.props[va(n)]<"u")}function L2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:uf();const r=No("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const h=dt(()=>t.value?.[e._as??n]),d=new Proxy(e,{get(l,f){const s=Reflect.get(l,f);if(f==="class"||f==="style")return[h.value?.[f],s].filter(p=>p!=null);if(M2(r.vnode,f))return s;const a=h.value?.[f];if(a!==void 0)return a;const u=t.value?.global?.[f];return u!==void 0?u:s}}),g=Wi();mi(()=>{if(h.value){const l=Object.entries(h.value).filter(f=>{let[s]=f;return s.startsWith(s[0].toUpperCase())});g.value=l.length?Object.fromEntries(l):void 0}else g.value=void 0});function v(){const l=I2(Pu,r);Na(Pu,dt(()=>g.value?dl(l?.value??{},g.value):l?.value))}return{props:d,provideSubDefaults:v}}function Bu(e){if(e._setup=e._setup??e.setup,!e.name)return hl("The component is missing an explicit name, unable to generate default prop value"),e;if(e._setup){e.props=Yt(e.props??{},e.name)();const n=Object.keys(e.props).filter(t=>t!=="class"&&t!=="style");e.filterProps=function(t){return u2(t,n)},e.props._as=String,e.setup=function(t,r){const h=uf();if(!h.value)return e._setup(t,r);const{props:d,provideSubDefaults:g}=L2(t,t._as??e.name,h),v=e._setup(d,r);return g(),v}}return e}function $r(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(e?Bu:$s)(n)}function Xw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return $r()({name:t??Lh(Dg(e.replace(/__/g,"-"))),props:{tag:{type:String,default:n},...Li()},setup(r,h){let{slots:d}=h;return()=>Eo(r.tag,{class:[e,r.class],style:r.style},d.default?.())}})}function O2(e,n,t,r){if(!t||Ou(e)||Ou(n))return;const h=t.get(e);if(h)h.set(n,r);else{const d=new WeakMap;d.set(n,r),t.set(e,d)}}function N2(e,n,t){if(!t||Ou(e)||Ou(n))return null;const r=t.get(e)?.get(n);if(typeof r=="boolean")return r;const h=t.get(n)?.get(e);return typeof h=="boolean"?h:null}function df(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakMap;if(e===n)return!0;if(e instanceof Date&&n instanceof Date&&e.getTime()!==n.getTime()||e!==Object(e)||n!==Object(n))return!1;const r=Object.keys(e);return r.length!==Object.keys(n).length?!1:N2(e,n,t)||(O2(e,n,t,!0),r.every(d=>df(e[d],n[d],t)))}function Oi(e){const n=No("useRender");n.render=e}function Qw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const t=p2(),r=tn();if(nf){const h=new ResizeObserver(d=>{e?.(d,h),d.length&&(n==="content"?r.value=d[0].contentRect:r.value=d[0].target.getBoundingClientRect())});Vs(()=>{h.disconnect()}),Ti(()=>t.el,(d,g)=>{g&&(h.unobserve(g),r.value=void 0),d&&h.observe(d)},{flush:"post"})}return{resizeRef:t,contentRect:Lg(r)}}function ex(e,n){let t;function r(){t=zg(),t.run(()=>n.length?n(()=>{t?.stop(),r()}):n())}Ti(e,h=>{h&&!t?r():h||(t?.stop(),t=void 0)},{immediate:!0}),Mh(()=>{t?.stop()})}function tx(e,n,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:s=>s,h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:s=>s;const d=No("useProxiedModel"),g=tn(e[n]!==void 0?e[n]:t),v=va(n),l=dt(v!==n?()=>(e[n],!!((d.vnode.props?.hasOwnProperty(n)||d.vnode.props?.hasOwnProperty(v))&&(d.vnode.props?.hasOwnProperty(`onUpdate:${n}`)||d.vnode.props?.hasOwnProperty(`onUpdate:${v}`)))):()=>(e[n],!!(d.vnode.props?.hasOwnProperty(n)&&d.vnode.props?.hasOwnProperty(`onUpdate:${n}`))));ex(()=>!l.value,()=>{Ti(()=>e[n],s=>{g.value=s})});const f=dt({get(){const s=e[n];return r(l.value?s:g.value)},set(s){const a=h(s),u=Og(l.value?e[n]:g.value);u===a||r(u)===s||(g.value=a,d?.emit(`update:${n}`,a))}});return Object.defineProperty(f,"externalValue",{get:()=>l.value?e[n]:g.value}),f}const D2=Symbol.for("vuetify:locale");function nx(){const e=qs(D2);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const pf=Symbol.for("vuetify:theme"),ba=Yt({theme:String},"theme");function fl(e){No("provideTheme");const n=qs(pf,null);if(!n)throw new Error("Could not find Vuetify theme injection");const t=Lt(()=>e.theme??n.name.value),r=Lt(()=>n.themes.value[t.value]),h=Lt(()=>n.isDisabled?void 0:`${n.prefix}theme--${t.value}`),d={...n,name:t,current:r,themeClasses:h};return Na(pf,d),d}function P2(){No("useTheme");const e=qs(pf,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}const Do=Yt({tag:{type:[String,Object,Function],default:"div"}},"tag"),B2=Yt({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Gi(e,n,t){return $r()({name:e,props:B2({mode:t,origin:n}),setup(r,h){let{slots:d}=h;const g={onBeforeEnter(v){r.origin&&(v.style.transformOrigin=r.origin)},onLeave(v){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:f,offsetWidth:s,offsetHeight:a}=v;v._transitionInitialStyles={position:v.style.position,top:v.style.top,left:v.style.left,width:v.style.width,height:v.style.height},v.style.position="absolute",v.style.top=`${l}px`,v.style.left=`${f}px`,v.style.width=`${s}px`,v.style.height=`${a}px`}r.hideOnLeave&&v.style.setProperty("display","none","important")},onAfterLeave(v){if(r.leaveAbsolute&&v?._transitionInitialStyles){const{position:l,top:f,left:s,width:a,height:u}=v._transitionInitialStyles;delete v._transitionInitialStyles,v.style.position=l||"",v.style.top=f||"",v.style.left=s||"",v.style.width=a||"",v.style.height=u||""}}};return()=>{const v=r.group?Lc:El;return Eo(v,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:g},d.default)}}})}function ff(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return $r()({name:e,props:{mode:{type:String,default:t},disabled:{type:Boolean,default:Ow()},group:Boolean,hideOnLeave:Boolean},setup(r,h){let{slots:d}=h;const g=r.group?Lc:El;return()=>Eo(g,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:{...n,onLeave:v=>{r.hideOnLeave?v.style.setProperty("display","none","important"):n.onLeave?.(v)}}},d.default)}})}function gf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";return{onBeforeEnter(h){h._parent=h.parentNode,h._initialStyle={transition:h.style.transition,overflow:h.style.overflow,width:h.style.width,height:h.style.height}},onEnter(h){const d=h._initialStyle;if(!d)return;h.style.setProperty("transition","none","important"),h.style.overflow="hidden";const g=`${h.offsetWidth}px`,v=`${h.offsetHeight}px`;["x","both"].includes(n)&&(h.style.width="0"),["y","both"].includes(n)&&(h.style.height="0"),h.offsetHeight,h.style.transition=d.transition,e&&h._parent&&h._parent.classList.add(e),requestAnimationFrame(()=>{["x","both"].includes(n)&&(h.style.width=g),["y","both"].includes(n)&&(h.style.height=v)})},onAfterEnter:r,onEnterCancelled:r,onLeave(h){h._initialStyle={transition:"",overflow:h.style.overflow,width:h.style.width,height:h.style.height},h.style.overflow="hidden",["x","both"].includes(n)&&(h.style.width=`${h.offsetWidth}px`),["y","both"].includes(n)&&(h.style.height=`${h.offsetHeight}px`),h.offsetHeight,requestAnimationFrame(()=>{["x","both"].includes(n)&&(h.style.width="0"),["y","both"].includes(n)&&(h.style.height="0")})},onAfterLeave:t,onLeaveCancelled:t};function t(h){e&&h._parent&&h._parent.classList.remove(e),r(h)}function r(h){if(!h._initialStyle)return;const{width:d,height:g}=h._initialStyle;h.style.overflow=h._initialStyle.overflow,d!=null&&["x","both"].includes(n)&&(h.style.width=d),g!=null&&["y","both"].includes(n)&&(h.style.height=g),delete h._initialStyle}}Gi("fab-transition","center center","out-in"),Gi("dialog-bottom-transition"),Gi("dialog-top-transition"),Gi("fade-transition"),Gi("scale-transition"),Gi("scroll-x-transition"),Gi("scroll-x-reverse-transition"),Gi("scroll-y-transition"),Gi("scroll-y-reverse-transition"),Gi("slide-x-transition"),Gi("slide-x-reverse-transition"),Gi("slide-y-transition"),Gi("slide-y-reverse-transition");const z2=ff("expand-transition",gf());ff("expand-x-transition",gf("","x")),ff("expand-both-transition",gf("","both"));const F2=Yt({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),wa=$r(!1)({name:"VDefaultsProvider",props:F2(),setup(e,n){let{slots:t}=n;const{defaults:r,disabled:h,reset:d,root:g,scoped:v}=Eg(e);return hf(r,{reset:d,root:g,scoped:v,disabled:h}),()=>t.default?.()}}),mf=Yt({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function vf(e){return{dimensionStyles:dt(()=>{const n={},t=En(e.height),r=En(e.maxHeight),h=En(e.maxWidth),d=En(e.minHeight),g=En(e.minWidth),v=En(e.width);return t!=null&&(n.height=t),r!=null&&(n.maxHeight=r),h!=null&&(n.maxWidth=h),d!=null&&(n.minHeight=d),g!=null&&(n.minWidth=g),v!=null&&(n.width=v),n})}}function j2(e){return{aspectStyles:dt(()=>{const n=Number(e.aspectRatio);return n?{paddingBottom:String(1/n*100)+"%"}:void 0})}}const rx=Yt({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Li(),...mf()},"VResponsive"),ix=$r()({name:"VResponsive",props:rx(),setup(e,n){let{slots:t}=n;const{aspectStyles:r}=j2(e),{dimensionStyles:h}=vf(e);return Oi(()=>ht("div",{class:sn(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:Pn([h.value,e.style])},[ht("div",{class:"v-responsive__sizer",style:Pn(r.value)},null),t.additional?.(),t.default&&ht("div",{class:sn(["v-responsive__content",e.contentClass])},[t.default()])])),{}}});function yf(e){return Bw(()=>{const{class:n,style:t}=H2(e);return{colorClasses:n,colorStyles:t}})}function zu(e){const{colorClasses:n,colorStyles:t}=yf(()=>({text:as(e)}));return{textColorClasses:n,textColorStyles:t}}function Fu(e){const{colorClasses:n,colorStyles:t}=yf(()=>({background:as(e)}));return{backgroundColorClasses:n,backgroundColorStyles:t}}function W2(e){return{text:typeof e.text=="string"?e.text.replace(/^text-/,""):e.text,background:typeof e.background=="string"?e.background.replace(/^bg-/,""):e.background}}function H2(e){const n=W2(as(e)),t=[],r={};if(n.background)if(cf(n.background)){if(r.backgroundColor=n.background,!n.text&&S2(n.background)){const h=pc(n.background);if(h.a==null||h.a===1){const d=R2(h);r.color=d,r.caretColor=d}}}else t.push(`bg-${n.background}`);return n.text&&(cf(n.text)?(r.color=n.text,r.caretColor=n.text):t.push(`text-${n.text}`)),{class:t,style:r}}const gl=Yt({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function ml(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();return{roundedClasses:dt(()=>{const t=Oc(e)?e.value:e.rounded,r=Oc(e)?!1:e.tile,h=[];if(r||t===!1)h.push("rounded-0");else if(t===!0||t==="")h.push(`${n}--rounded`);else if(typeof t=="string"||t===0)for(const d of String(t).split(" "))h.push(`rounded-${d}`);return h})}}const U2=Yt({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),ju=(e,n)=>{let{slots:t}=n;const{transition:r,disabled:h,group:d,target:g,...v}=e,{component:l=d?Lc:El,...f}=of(r)?r:{};let s;return of(r)?s=dr(f,f2({disabled:h,group:d,target:g}),v):s=dr({name:h||!r?"":r},v),Eo(l,s,t)};function ox(e,n){if(!rf)return;const t=n.modifiers||{},r=n.value,{handler:h,options:d}=typeof r=="object"?r:{handler:r,options:{}},g=new IntersectionObserver(function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const f=e._observe?.[n.instance.$.uid];if(!f)return;const s=v.some(a=>a.isIntersecting);h&&(!t.quiet||f.init)&&(!t.once||s||f.init)&&h(s,v,l),s&&t.once?bf(e,n):f.init=!0},d);e._observe=Object(e._observe),e._observe[n.instance.$.uid]={init:!1,observer:g},g.observe(e)}function bf(e,n){const t=e._observe?.[n.instance.$.uid];t&&(t.observer.unobserve(e),delete e._observe[n.instance.$.uid])}const sx={mounted:ox,unmounted:bf,updated:(e,n)=>{e._observe?.[n.instance.$.uid]&&(bf(e,n),ox(e,n))}},V2=Yt({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,imageClass:null,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...rx(),...Li(),...gl(),...U2()},"VImg"),Wu=$r()({name:"VImg",directives:{vIntersect:sx},props:V2(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,n){let{emit:t,slots:r}=n;const{backgroundColorClasses:h,backgroundColorStyles:d}=Fu(()=>e.color),{roundedClasses:g}=ml(e),v=No("VImg"),l=Wi(""),f=tn(),s=Wi(e.eager?"loading":"idle"),a=Wi(),u=Wi();let p=!1;const i=dt(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),c=dt(()=>i.value.aspect||a.value/u.value||0);Ti(()=>e.src,()=>{m(s.value!=="idle")}),Ti(c,(M,S)=>{!M&&S&&f.value&&_(f.value)}),Ti(f,M=>{!M||s.value==="idle"||(c.value||_(M),I(M),p&&(p=!1,t("load",M.currentSrc||i.value.src)))}),Rg(()=>m());function m(M){if(!(e.eager&&M)&&!(rf&&!M&&!e.eager)){if(s.value="loading",i.value.lazySrc){const S=new Image;S.src=i.value.lazySrc,_(S,null)}i.value.src&&Tl(()=>{t("loadstart",f.value?.currentSrc||i.value.src),setTimeout(()=>{if(!v.isUnmounted)if(f.value?.complete){if(f.value.naturalWidth||x(),s.value==="error")return;c.value||_(f.value,null),s.value==="loading"&&b()}else f.value&&(c.value||_(f.value),I(f.value))})})}}function b(){v.isUnmounted||(f.value?(I(f.value),_(f.value),t("load",f.value.currentSrc||i.value.src)):p=!0,s.value="loaded")}function x(){v.isUnmounted||(s.value="error",t("error",f.value?.currentSrc||i.value.src))}function I(M){l.value=M.currentSrc||M.src}let $=-1;Vs(()=>{clearTimeout($)});function _(M){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const k=()=>{if(clearTimeout($),v.isUnmounted)return;const{naturalHeight:N,naturalWidth:j}=M;N||j?(a.value=j,u.value=N):!M.complete&&s.value==="loading"&&S!=null?$=window.setTimeout(k,S):(M.currentSrc.endsWith(".svg")||M.currentSrc.startsWith("data:image/svg+xml"))&&(a.value=1,u.value=1)};k()}const C=Lt(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),O=()=>{if(!i.value.src||s.value==="idle")return null;const M=ht("img",{class:sn(["v-img__img",C.value,e.imageClass]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:i.value.src,srcset:i.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:f,onLoad:b,onError:x},null),S=r.sources?.();return He(ju,{transition:e.transition,appear:!0},{default:()=>[Pa(S?ht("picture",{class:"v-img__picture"},[S,M]):M,[[Nh,s.value==="loaded"]])]})},P=()=>He(ju,{transition:e.transition},{default:()=>[i.value.lazySrc&&s.value!=="loaded"&&ht("img",{class:sn(["v-img__img","v-img__img--preload",C.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:i.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),L=()=>r.placeholder?He(ju,{transition:e.transition,appear:!0},{default:()=>[(s.value==="loading"||s.value==="error"&&!r.error)&&ht("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,T=()=>r.error?He(ju,{transition:e.transition,appear:!0},{default:()=>[s.value==="error"&&ht("div",{class:"v-img__error"},[r.error()])]}):null,F=()=>e.gradient?ht("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,D=Wi(!1);{const M=Ti(c,S=>{S&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{D.value=!0})}),M())})}return Oi(()=>{const M=ix.filterProps(e);return Pa(He(ix,dr({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!D.value,"v-img--fit-content":e.width==="fit-content"},h.value,g.value,e.class],style:[{width:En(e.width==="auto"?a.value:e.width)},d.value,e.style]},M,{aspectRatio:c.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>ht(Pr,null,[He(O,null,null),He(P,null,null),He(F,null,null),He(L,null,null),He(T,null,null)]),default:r.default}),[[sx,{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:f,state:s,naturalWidth:a,naturalHeight:u}}}),Hu=Yt({border:[Boolean,Number,String]},"border");function Uu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();return{borderClasses:dt(()=>{const t=e.border;return t===!0||t===""?`${n}--border`:typeof t=="string"||t===0?String(t).split(" ").map(r=>`border-${r}`):[]})}}const wf=Yt({elevation:{type:[Number,String],validator(e){const n=parseInt(e);return!isNaN(n)&&n>=0&&n<=24}}},"elevation");function xf(e){return{elevationClasses:Lt(()=>{const n=Oc(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const ax={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Cf=Yt({location:String},"location");function _f(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=nx();return{locationStyles:dt(()=>{if(!e.location)return{};const{side:h,align:d}=v2(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function g(l){return t?t(l):0}const v={};return h!=="center"&&(n?v[ax[h]]=`calc(100% - ${g(h)}px)`:v[h]=0),d!=="center"?n?v[ax[d]]=`calc(100% - ${g(d)}px)`:v[d]=0:(h==="center"?v.top=v.left="50%":v[{top:"left",bottom:"left",left:"top",right:"top"}[h]]="50%",v.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[h]),v})}}const q2=[null,"default","comfortable","compact"],gc=Yt({density:{type:String,default:"default",validator:e=>q2.includes(e)}},"density");function Vu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();return{densityClasses:Lt(()=>`${n}--density-${e.density}`)}}const G2=["x-small","small","default","large","x-large"],mc=Yt({size:{type:[String,Number],default:"default"}},"size");function qu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();return Bw(()=>{const t=e.size;let r,h;return af(G2,t)?r=`${n}--size-${t}`:t&&(h={width:En(t),height:En(t)}),{sizeClasses:r,sizeStyles:h}})}const K2=["elevated","flat","tonal","outlined","text","plain"];function kf(e,n){return ht(Pr,null,[e&&ht("span",{key:"overlay",class:sn(`${n}__overlay`)},null),ht("span",{key:"underlay",class:sn(`${n}__underlay`)},null)])}const Gu=Yt({color:String,variant:{type:String,default:"elevated",validator:e=>K2.includes(e)}},"variant");function Af(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();const t=Lt(()=>{const{variant:d}=as(e);return`${n}--variant-${d}`}),{colorClasses:r,colorStyles:h}=yf(()=>{const{variant:d,color:g}=as(e);return{[["elevated","flat"].includes(d)?"background":"text"]:g}});return{colorClasses:r,colorStyles:h,variantClasses:t}}const lx=Yt({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...Hu(),...Li(),...gc(),...wf(),...gl(),...mc({size:void 0}),...Do(),...ba(),...Gu()},"VBtnGroup"),cx=$r()({name:"VBtnGroup",props:lx(),setup(e,n){let{slots:t}=n;const{themeClasses:r}=fl(e),{densityClasses:h}=Vu(e),{borderClasses:d}=Uu(e),{elevationClasses:g}=xf(e),{roundedClasses:v}=ml(e);hf({VBtn:{height:Lt(()=>e.direction==="horizontal"&&e.size==null?"auto":null),baseColor:Lt(()=>e.baseColor),color:Lt(()=>e.color),density:Lt(()=>e.density),flat:!0,size:Lt(()=>e.size),variant:Lt(()=>e.variant)}}),Oi(()=>He(e.tag,{class:sn(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided,"v-btn-group--has-size":e.size!=null},r.value,d.value,h.value,g.value,v.value,e.class]),style:Pn(e.style)},t))}}),Y2=Yt({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),J2=Yt({value:null,disabled:Boolean,selectedClass:String},"group-item");function Z2(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=No("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const h=Ng();Na(Symbol.for(`${n.description}:id`),h);const d=qs(n,null);if(!d){if(!t)return d;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${n.description}`)}const g=Lt(()=>e.value),v=dt(()=>!!(d.disabled.value||e.disabled));function l(){d?.register({id:h,value:g,disabled:v},r)}function f(){d?.unregister(h)}l(),Vs(()=>f());const s=dt(()=>d.isSelected(h)),a=dt(()=>d.items.value[0].id===h),u=dt(()=>d.items.value[d.items.value.length-1].id===h),p=dt(()=>s.value&&[d.selectedClass.value,e.selectedClass]);return Ti(s,i=>{r.emit("group:selected",{value:i})},{flush:"sync"}),{id:h,isSelected:s,isFirst:a,isLast:u,toggle:()=>d.select(h,!s.value),select:i=>d.select(h,i),selectedClass:p,value:g,disabled:v,group:d,register:l,unregister:f}}function X2(e,n){let t=!1;const r=Rl([]),h=tx(e,"modelValue",[],u=>u===void 0?[]:ux(r,u===null?[null]:h2(u)),u=>{const p=eN(r,u);return e.multiple?p:p[0]}),d=No("useGroup");function g(u,p){const i=u,c=Symbol.for(`${n.description}:id`),m=dc(c,d?.vnode).indexOf(p);Ft(i.value)===void 0&&(i.value=m,i.useIndexAsValue=!0),m>-1?r.splice(m,0,i):r.push(i)}function v(u){if(t)return;l();const p=r.findIndex(i=>i.id===u);r.splice(p,1)}function l(){const u=r.find(p=>!p.disabled);u&&e.mandatory==="force"&&!h.value.length&&(h.value=[u.id])}Da(()=>{l()}),Vs(()=>{t=!0}),Mg(()=>{for(let u=0;u<r.length;u++)r[u].useIndexAsValue&&(r[u].value=u)});function f(u,p){const i=r.find(c=>c.id===u);if(!(p&&i?.disabled))if(e.multiple){const c=h.value.slice(),m=c.findIndex(x=>x===u),b=~m;if(p=p??!b,b&&e.mandatory&&c.length<=1||!b&&e.max!=null&&c.length+1>e.max)return;m<0&&p?c.push(u):m>=0&&!p&&c.splice(m,1),h.value=c}else{const c=h.value.includes(u);if(e.mandatory&&c||!c&&!p)return;h.value=p??!c?[u]:[]}}function s(u){if(e.multiple&&hl('This method is not supported when using "multiple" prop'),h.value.length){const p=h.value[0],i=r.findIndex(b=>b.id===p);let c=(i+u)%r.length,m=r[c];for(;m.disabled&&c!==i;)c=(c+u)%r.length,m=r[c];if(m.disabled)return;h.value=[r[c].id]}else{const p=r.find(i=>!i.disabled);p&&(h.value=[p.id])}}const a={register:g,unregister:v,selected:h,select:f,disabled:Lt(()=>e.disabled),prev:()=>s(r.length-1),next:()=>s(1),isSelected:u=>h.value.includes(u),selectedClass:Lt(()=>e.selectedClass),items:Lt(()=>r),getItemIndex:u=>Q2(r,u)};return Na(n,a),a}function Q2(e,n){const t=ux(e,[n]);return t.length?e.findIndex(r=>r.id===t[0]):-1}function ux(e,n){const t=[];return n.forEach(r=>{const h=e.find(g=>df(r,g.value)),d=e[r];h?.value!==void 0?t.push(h.id):d?.useIndexAsValue&&t.push(d.id)}),t}function eN(e,n){const t=[];return n.forEach(r=>{const h=e.findIndex(d=>d.id===r);if(~h){const d=e[h];t.push(d.value!==void 0?d.value:h)}}),t}const hx=Symbol.for("vuetify:v-btn-toggle"),tN=Yt({...lx(),...Y2()},"VBtnToggle");$r()({name:"VBtnToggle",props:tN(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:t}=n;const{isSelected:r,next:h,prev:d,select:g,selected:v}=X2(e,hx);return Oi(()=>{const l=cx.filterProps(e);return He(cx,dr({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>[t.default?.({isSelected:r,next:h,prev:d,select:g,selected:v})]})}),{next:h,prev:d,select:g}}});const us=[String,Function,Object,Array],nN=Symbol.for("vuetify:icons"),Ku=Yt({icon:{type:us},tag:{type:[String,Object,Function],required:!0}},"icon"),dx=$r()({name:"VComponentIcon",props:Ku(),setup(e,n){let{slots:t}=n;return()=>{const r=e.icon;return He(e.tag,null,{default:()=>[e.icon?He(r,null,null):t.default?.()]})}}}),rN=Bu({name:"VSvgIcon",inheritAttrs:!1,props:Ku(),setup(e,n){let{attrs:t}=n;return()=>He(e.tag,dr(t,{style:null}),{default:()=>[ht("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?ht("path",{d:r[0],"fill-opacity":r[1]},null):ht("path",{d:r},null)):ht("path",{d:e.icon},null)])]})}});Bu({name:"VLigatureIcon",props:Ku(),setup(e){return()=>He(e.tag,null,{default:()=>[e.icon]})}});const iN=Bu({name:"VClassIcon",props:Ku(),setup(e){return()=>He(e.tag,{class:sn(e.icon)},null)}}),oN=e=>{const n=qs(nN);if(!n)throw new Error("Missing Vuetify Icons provide!");return{iconData:dt(()=>{const t=as(e);if(!t)return{component:dx};let r=t;if(typeof r=="string"&&(r=r.trim(),r.startsWith("$")&&(r=n.aliases?.[r.slice(1)])),r||hl(`Could not find aliased icon "${t}"`),Array.isArray(r))return{component:rN,icon:r};if(typeof r!="string")return{component:dx,icon:r};const h=Object.keys(n.sets).find(g=>typeof r=="string"&&r.startsWith(`${g}:`)),d=h?r.slice(h.length+1):r;return{component:n.sets[h??n.defaultSet].component,icon:d}})}},sN=Yt({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:us,opacity:[String,Number],...Li(),...mc(),...Do({tag:"i"}),...ba()},"VIcon"),xa=$r()({name:"VIcon",props:sN(),setup(e,n){let{attrs:t,slots:r}=n;const h=Wi(),{themeClasses:d}=P2(),{iconData:g}=oN(()=>h.value||e.icon),{sizeClasses:v}=qu(e),{textColorClasses:l,textColorStyles:f}=zu(()=>e.color);return Oi(()=>{const s=r.default?.();s&&(h.value=Pw(s).filter(u=>u.type===Wg&&u.children&&typeof u.children=="string")[0]?.children);const a=!!(t.onClick||t.onClickOnce);return He(g.value.component,{tag:e.tag,icon:g.value.icon,class:sn(["v-icon","notranslate",d.value,v.value,l.value,{"v-icon--clickable":a,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:Pn([{"--v-icon-opacity":e.opacity},v.value?void 0:{fontSize:En(e.size),height:En(e.size),width:En(e.size)},f.value,e.style]),role:a?"button":void 0,"aria-hidden":!a,tabindex:a?e.disabled?-1:0:void 0},{default:()=>[s]})}),{}}});function px(e,n){const t=tn(),r=Wi(!1);if(rf){const h=new IntersectionObserver(d=>{r.value=!!d.find(g=>g.isIntersecting)},n);Mh(()=>{h.disconnect()}),Ti(t,(d,g)=>{g&&(h.unobserve(g),r.value=!1),d&&h.observe(d)},{flush:"post"})}return{intersectionRef:t,isIntersecting:r}}const aN=Yt({reveal:{type:[Boolean,Object],default:!1}},"reveal");function lN(e){const n=Lt(()=>typeof e.reveal=="object"?Math.max(0,Number(e.reveal.duration??900)):900),t=Wi(e.reveal?"initial":"disabled");return Da(async()=>{e.reveal&&(t.value="initial",await new Promise(r=>requestAnimationFrame(r)),t.value="pending",await new Promise(r=>setTimeout(r,n.value)),t.value="done")}),{duration:n,state:t}}const cN=Yt({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Li(),...aN(),...mc(),...Do({tag:"div"}),...ba()},"VProgressCircular"),Sf=$r()({name:"VProgressCircular",props:cN(),setup(e,n){let{slots:t}=n;const r=20,h=2*Math.PI*r,d=tn(),{themeClasses:g}=fl(e),{sizeClasses:v,sizeStyles:l}=qu(e),{textColorClasses:f,textColorStyles:s}=zu(()=>e.color),{textColorClasses:a,textColorStyles:u}=zu(()=>e.bgColor),{intersectionRef:p,isIntersecting:i}=px(),{resizeRef:c,contentRect:m}=Qw(),{state:b,duration:x}=lN(e),I=Lt(()=>b.value==="initial"?0:Lu(parseFloat(e.modelValue),0,100)),$=Lt(()=>Number(e.width)),_=Lt(()=>l.value?Number(e.size):m.value?m.value.width:Math.max($.value,32)),C=Lt(()=>r/(1-$.value/_.value)*2),O=Lt(()=>$.value/_.value*C.value),P=Lt(()=>{const T=(100-I.value)/100*h;return e.rounded&&I.value>0&&I.value<100?En(Math.min(h-.01,T+O.value)):En(T)}),L=dt(()=>{const T=Number(e.rotate);return e.rounded?T+O.value/2/h*360:T});return mi(()=>{p.value=d.value,c.value=d.value}),Oi(()=>He(e.tag,{ref:d,class:sn(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":i.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||Ow()),"v-progress-circular--revealing":["initial","pending"].includes(b.value)},g.value,v.value,f.value,e.class]),style:Pn([l.value,s.value,{"--progress-reveal-duration":`${x.value}ms`},e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:I.value},{default:()=>[ht("svg",{style:{transform:`rotate(calc(-90deg + ${L.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${C.value} ${C.value}`},[ht("circle",{class:sn(["v-progress-circular__underlay",a.value]),style:Pn(u.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":O.value,"stroke-dasharray":h,"stroke-dashoffset":0},null),ht("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":O.value,"stroke-dasharray":h,"stroke-dashoffset":P.value,"stroke-linecap":e.rounded?"round":void 0},null)]),t.default&&ht("div",{class:"v-progress-circular__content"},[t.default({value:I.value})])]})),{}}}),uN=Yt({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function hN(e,n){const t=Lt(()=>!!e.chunkCount||!!e.chunkWidth),r=dt(()=>{const v=as(n);if(!v)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const l=Number(e.chunkCount);return(v-Number(e.chunkGap)*(l-1))/l}),h=Lt(()=>Number(e.chunkGap)),d=dt(()=>{if(!t.value)return{};const v=En(h.value),l=En(r.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${l}, transparent ${l}, transparent)`,maskSize:`calc(${l} + ${v}) 100%`}});function g(v){const l=as(n);if(!l)return v;const f=100*h.value/l,s=100*(r.value+h.value)/l,a=Math.floor((v+f)/s+1e-9);return Lu(a*s-f/2,0,100)}return{hasChunks:t,chunksMaskStyles:d,snapValueToChunk:g}}const dN=Yt({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...uN(),...Li(),...Cf({location:"top"}),...gl(),...Do(),...ba()},"VProgressLinear"),fx=$r()({name:"VProgressLinear",props:dN(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:t}=n;const r=tn(),h=tx(e,"modelValue"),{isRtl:d,rtlClasses:g}=nx(),{themeClasses:v}=fl(e),{locationStyles:l}=_f(e),{textColorClasses:f,textColorStyles:s}=zu(()=>e.color),{backgroundColorClasses:a,backgroundColorStyles:u}=Fu(()=>e.bgColor||e.color),{backgroundColorClasses:p,backgroundColorStyles:i}=Fu(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:c,backgroundColorStyles:m}=Fu(()=>e.color),{roundedClasses:b}=ml(e),{intersectionRef:x,isIntersecting:I}=px(),$=dt(()=>parseFloat(e.max)),_=dt(()=>parseFloat(e.height)),C=dt(()=>Lu(parseFloat(e.bufferValue)/$.value*100,0,100)),O=dt(()=>Lu(parseFloat(h.value)/$.value*100,0,100)),P=dt(()=>d.value!==e.reverse),L=dt(()=>e.indeterminate?"fade-transition":"slide-x-transition"),T=Wi(0),{hasChunks:F,chunksMaskStyles:D,snapValueToChunk:M}=hN(e,T);ex(F,()=>{const{resizeRef:j}=Qw(U=>T.value=U[0].contentRect.width);mi(()=>j.value=r.value)});const S=dt(()=>F.value?M(C.value):C.value),k=dt(()=>F.value?M(O.value):O.value);function N(j){if(!x.value)return;const{left:U,right:G,width:J}=x.value.getBoundingClientRect(),Q=P.value?J-j.clientX+(G-J):j.clientX-U;h.value=Math.round(Q/J*$.value)}return mi(()=>{x.value=r.value}),Oi(()=>He(e.tag,{ref:r,class:sn(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&I.value,"v-progress-linear--reverse":P.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},b.value,v.value,g.value,e.class]),style:Pn([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?En(_.value):0,"--v-progress-linear-height":En(_.value),...e.absolute?l.value:{}},D.value,e.style]),role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(h.value),$.value),onClick:e.clickable&&N},{default:()=>[e.stream&&ht("div",{key:"stream",class:sn(["v-progress-linear__stream",f.value]),style:{...s.value,[P.value?"left":"right"]:En(-_.value),borderTop:`${En(_.value/2)} dotted`,opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,top:`calc(50% - ${En(_.value/4)})`,width:En(100-C.value,"%"),"--v-progress-linear-stream-to":En(_.value*(P.value?1:-1))}},null),ht("div",{class:sn(["v-progress-linear__background",a.value]),style:Pn([u.value,{opacity:e.bgOpacity!=null?parseFloat(e.bgOpacity):void 0,width:e.stream?0:void 0}])},null),ht("div",{class:sn(["v-progress-linear__buffer",p.value]),style:Pn([i.value,{opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,width:En(S.value,"%")}])},null),He(El,{name:L.value},{default:()=>[e.indeterminate?ht("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(j=>ht("div",{key:j,class:sn(["v-progress-linear__indeterminate",j,c.value]),style:Pn(m.value)},null))]):ht("div",{class:sn(["v-progress-linear__determinate",c.value]),style:Pn([m.value,{width:En(k.value,"%")}])},null)]}),t.default&&ht("div",{class:"v-progress-linear__content"},[t.default({value:O.value,buffer:C.value})])]})),{}}}),gx=Yt({loading:[Boolean,String]},"loader");function mx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();return{loaderClasses:Lt(()=>({[`${n}--loading`]:e.loading}))}}function pN(e,n){let{slots:t}=n;return ht("div",{class:sn(`${e.name}__loader`)},[t.default?.({color:e.color,isActive:e.active})||He(fx,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const fN=["static","relative","fixed","absolute","sticky"],vx=Yt({position:{type:String,validator:(e=>fN.includes(e))}},"position");function yx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya();return{positionClasses:Lt(()=>e.position?`${n}--${e.position}`:void 0)}}function gN(){const e=No("useRoute");return dt(()=>e?.proxy?.$route)}function bx(e,n){const t=Gs("RouterLink"),r=Lt(()=>!!(e.href||e.to)),h=dt(()=>r?.value||zw(n,"click")||zw(e,"click"));if(typeof t=="string"||!("useLink"in t)){const a=Lt(()=>e.href);return{isLink:r,isRouterLink:Lt(()=>!1),isClickable:h,href:a,linkProps:Rl({href:a}),route:Lt(()=>{}),navigate:Lt(()=>{})}}const d=t.useLink({to:Lt(()=>e.to||""),replace:Lt(()=>e.replace)}),g=dt(()=>e.to?d:void 0),v=gN(),l=dt(()=>g.value?e.exact?v.value?g.value.isExactActive?.value&&df(g.value.route.value.query,v.value.query):g.value.isExactActive?.value??!1:g.value.isActive?.value??!1:!1),f=dt(()=>e.to?g.value?.route.value.href:e.href),s=Lt(()=>!!e.to);return{isLink:r,isRouterLink:s,isClickable:h,isActive:l,route:Lt(()=>g.value?.route.value),navigate:Lt(()=>g.value?.navigate),href:f,linkProps:Rl({href:f,"aria-current":Lt(()=>l.value?"page":void 0),"aria-disabled":Lt(()=>e.disabled&&r.value?"true":void 0),tabindex:Lt(()=>e.disabled&&r.value?"-1":void 0)})}}const wx=Yt({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");function mN(e,n){Ti(()=>e.isActive?.value,t=>{e.isLink.value&&t!=null&&n&&Tl(()=>{n(t)})},{immediate:!0})}const $f=Symbol("rippleStop"),vN=80;function xx(e,n){e.style.transform=n,e.style.webkitTransform=n}function Tf(e){return e.constructor.name==="TouchEvent"}function Cx(e){return e.constructor.name==="KeyboardEvent"}const yN=function(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,h=0;if(!Cx(e)){const a=new lf(n),u=Tf(e)?e.touches[e.touches.length-1]:e,p=y2([u.clientX,u.clientY]);r=p.x-a.left,h=p.y-a.top}let d=0,g=.3;n._ripple?.circle?(g=.15,d=n.clientWidth/2,d=t.center?d:d+Math.sqrt((r-d)**2+(h-d)**2)/4):d=Math.sqrt(n.clientWidth**2+n.clientHeight**2)/2;const v=`${(n.clientWidth-d*2)/2}px`,l=`${(n.clientHeight-d*2)/2}px`,f=t.center?v:`${r-d}px`,s=t.center?l:`${h-d}px`;return{radius:d,scale:g,x:f,y:s,centerX:v,centerY:l}},Yu={show(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!n?._ripple?.enabled)return;const r=document.createElement("span"),h=document.createElement("span");r.appendChild(h),r.className="v-ripple__container",t.class&&(r.className+=` ${t.class}`);const{radius:d,scale:g,x:v,y:l,centerX:f,centerY:s}=yN(e,n,t),a=`${d*2}px`;h.className="v-ripple__animation",h.style.width=a,h.style.height=a,n.appendChild(r);const u=window.getComputedStyle(n);u&&u.position==="static"&&(n.style.position="relative",n.dataset.previousPosition="static"),h.classList.add("v-ripple__animation--enter"),h.classList.add("v-ripple__animation--visible"),xx(h,`translate(${v}, ${l}) scale3d(${g},${g},${g})`),h.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{h.classList.remove("v-ripple__animation--enter"),h.classList.add("v-ripple__animation--in"),xx(h,`translate(${f}, ${s}) scale3d(1,1,1)`)})})},hide(e){if(!e?._ripple?.enabled)return;const n=e.getElementsByClassName("v-ripple__animation");if(n.length===0)return;const t=Array.from(n).findLast(d=>!d.dataset.isHiding);if(t)t.dataset.isHiding="true";else return;const r=performance.now()-Number(t.dataset.activated),h=Math.max(250-r,0);setTimeout(()=>{t.classList.remove("v-ripple__animation--in"),t.classList.add("v-ripple__animation--out"),setTimeout(()=>{e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),t.parentNode?.parentNode===e&&e.removeChild(t.parentNode)},300)},h)}};function _x(e){return typeof e>"u"||!!e}function vc(e){const n={},t=e.currentTarget;if(!(!t?._ripple||t._ripple.touched||e[$f])){if(e[$f]=!0,Tf(e))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(n.center=t._ripple.centered||Cx(e),t._ripple.class&&(n.class=t._ripple.class),Tf(e)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{Yu.show(e,t,n)},t._ripple.showTimer=window.setTimeout(()=>{t?._ripple?.showTimerCommit&&(t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null)},vN)}else Yu.show(e,t,n)}}function Ju(e){e[$f]=!0}function Ki(e){const n=e.currentTarget;if(n?._ripple){if(window.clearTimeout(n._ripple.showTimer),e.type==="touchend"&&n._ripple.showTimerCommit){n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null,n._ripple.showTimer=window.setTimeout(()=>{Ki(e)});return}window.setTimeout(()=>{n._ripple&&(n._ripple.touched=!1)}),Yu.hide(n)}}function kx(e){const n=e.currentTarget;n?._ripple&&(n._ripple.showTimerCommit&&(n._ripple.showTimerCommit=null),window.clearTimeout(n._ripple.showTimer))}let yc=!1;function bN(e,n){!yc&&n.includes(e.key)&&(yc=!0,vc(e))}function Ax(e){yc=!1,Ki(e)}function Sx(e){yc&&(yc=!1,Ki(e))}function $x(e,n,t){const{value:r,modifiers:h}=n,d=_x(r);d||Yu.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=d,e._ripple.centered=h.center,e._ripple.circle=h.circle;const g=of(r)?r:{};g.class&&(e._ripple.class=g.class);const v=g.keys??["Enter","Space"];if(e._ripple.keyDownHandler=l=>bN(l,v),d&&!t){if(h.stop){e.addEventListener("touchstart",Ju,{passive:!0}),e.addEventListener("mousedown",Ju);return}e.addEventListener("touchstart",vc,{passive:!0}),e.addEventListener("touchend",Ki,{passive:!0}),e.addEventListener("touchmove",kx,{passive:!0}),e.addEventListener("touchcancel",Ki),e.addEventListener("mousedown",vc),e.addEventListener("mouseup",Ki),e.addEventListener("mouseleave",Ki),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",Ax),e.addEventListener("blur",Sx),e.addEventListener("dragstart",Ki,{passive:!0})}else!d&&t&&Tx(e)}function Tx(e){e.removeEventListener("touchstart",Ju),e.removeEventListener("mousedown",Ju),e.removeEventListener("touchstart",vc),e.removeEventListener("touchend",Ki),e.removeEventListener("touchmove",kx),e.removeEventListener("touchcancel",Ki),e.removeEventListener("mousedown",vc),e.removeEventListener("mouseup",Ki),e.removeEventListener("mouseleave",Ki),e._ripple?.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",Ax),e.removeEventListener("blur",Sx),e.removeEventListener("dragstart",Ki)}function wN(e,n){$x(e,n,!1)}function xN(e){Tx(e),delete e._ripple}function CN(e,n){if(n.value===n.oldValue)return;const t=_x(n.oldValue);$x(e,n,t)}const Ef={mounted:wN,unmounted:xN,updated:CN},_N=Yt({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:hx},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:us,appendIcon:us,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...Hu(),...Li(),...gc(),...mf(),...wf(),...J2(),...gx(),...Cf(),...vx(),...gl(),...wx(),...mc(),...Do({tag:"button"}),...ba(),...Gu({variant:"elevated"})},"VBtn"),kN=$r()({name:"VBtn",props:_N(),emits:{"group:selected":e=>!0},setup(e,n){let{attrs:t,slots:r}=n;const{themeClasses:h}=fl(e),{borderClasses:d}=Uu(e),{densityClasses:g}=Vu(e),{dimensionStyles:v}=vf(e),{elevationClasses:l}=xf(e),{loaderClasses:f}=mx(e),{locationStyles:s}=_f(e),{positionClasses:a}=yx(e),{roundedClasses:u}=ml(e),{sizeClasses:p,sizeStyles:i}=qu(e),c=Z2(e,e.symbol,!1),m=bx(e,t),b=dt(()=>e.active!==void 0?e.active:m.isRouterLink.value?m.isActive?.value:c?.isSelected.value),x=Lt(()=>b.value?e.activeColor??e.color:e.color),I=dt(()=>({color:c?.isSelected.value&&(!m.isLink.value||m.isActive?.value)||!c||m.isActive?.value?x.value??e.baseColor:e.baseColor,variant:e.variant})),{colorClasses:$,colorStyles:_,variantClasses:C}=Af(I),O=dt(()=>c?.disabled.value||e.disabled),P=Lt(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),L=dt(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function T(F){O.value||m.isLink.value&&(F.metaKey||F.ctrlKey||F.shiftKey||F.button!==0||t.target==="_blank")||(m.isRouterLink.value?m.navigate.value?.(F):c?.toggle())}return mN(m,c?.select),Oi(()=>{const F=m.isLink.value?"a":e.tag,D=!!(e.prependIcon||r.prepend),M=!!(e.appendIcon||r.append),S=!!(e.icon&&e.icon!==!0);return Pa(He(F,dr(m.linkProps,{type:F==="a"?void 0:"button",class:["v-btn",c?.selectedClass.value,{"v-btn--active":b.value,"v-btn--block":e.block,"v-btn--disabled":O.value,"v-btn--elevated":P.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],h.value,d.value,$.value,g.value,l.value,f.value,a.value,u.value,p.value,C.value,e.class],style:[_.value,v.value,s.value,i.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:O.value&&F!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:T,value:L.value}),{default:()=>[kf(!0,"v-btn"),!e.icon&&D&&ht("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?He(wa,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):He(xa,{key:"prepend-icon",icon:e.prependIcon},null)]),ht("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&S?He(xa,{key:"content-icon",icon:e.icon},null):He(wa,{key:"content-defaults",disabled:!S,defaults:{VIcon:{icon:e.icon}}},{default:()=>[r.default?.()??_r(e.text)]})]),!e.icon&&M&&ht("span",{key:"append",class:"v-btn__append"},[r.append?He(wa,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):He(xa,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&ht("span",{key:"loader",class:"v-btn__loader"},[r.loader?.()??He(Sf,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}),[[Ef,!O.value&&e.ripple,"",{center:!!e.icon}]])}),{group:c}}}),AN=Yt({start:Boolean,end:Boolean,icon:us,image:String,text:String,...Hu(),...Li(),...gc(),...gl(),...mc(),...Do(),...ba(),...Gu({variant:"flat"})},"VAvatar"),Zu=$r()({name:"VAvatar",props:AN(),setup(e,n){let{slots:t}=n;const{themeClasses:r}=fl(e),{borderClasses:h}=Uu(e),{colorClasses:d,colorStyles:g,variantClasses:v}=Af(e),{densityClasses:l}=Vu(e),{roundedClasses:f}=ml(e),{sizeClasses:s,sizeStyles:a}=qu(e);return Oi(()=>He(e.tag,{class:sn(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,h.value,d.value,l.value,f.value,s.value,v.value,e.class]),style:Pn([g.value,a.value,e.style])},{default:()=>[t.default?He(wa,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[t.default()]}):e.image?He(Wu,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?He(xa,{key:"icon",icon:e.icon},null):e.text,kf(!1,"v-avatar")]})),{}}}),SN=Yt({...Li(),...Do()},"VCardActions"),Ex=$r()({name:"VCardActions",props:SN(),setup(e,n){let{slots:t}=n;return hf({VBtn:{slim:!0,variant:"text"}}),Oi(()=>He(e.tag,{class:sn(["v-card-actions",e.class]),style:Pn(e.style)},t)),{}}}),$N=Yt({opacity:[Number,String],...Li(),...Do()},"VCardSubtitle"),TN=$r()({name:"VCardSubtitle",props:$N(),setup(e,n){let{slots:t}=n;return Oi(()=>He(e.tag,{class:sn(["v-card-subtitle",e.class]),style:Pn([{"--v-card-subtitle-opacity":e.opacity},e.style])},t)),{}}}),EN=Xw("v-card-title"),RN=Yt({appendAvatar:String,appendIcon:us,prependAvatar:String,prependIcon:us,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Li(),...gc(),...Do()},"VCardItem"),IN=$r()({name:"VCardItem",props:RN(),setup(e,n){let{slots:t}=n;return Oi(()=>{const r=!!(e.prependAvatar||e.prependIcon),h=!!(r||t.prepend),d=!!(e.appendAvatar||e.appendIcon),g=!!(d||t.append),v=!!(e.title!=null||t.title),l=!!(e.subtitle!=null||t.subtitle);return He(e.tag,{class:sn(["v-card-item",e.class]),style:Pn(e.style)},{default:()=>[h&&ht("div",{key:"prepend",class:"v-card-item__prepend"},[t.prepend?He(wa,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},t.prepend):ht(Pr,null,[e.prependAvatar&&He(Zu,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&He(xa,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),ht("div",{class:"v-card-item__content"},[v&&He(EN,{key:"title"},{default:()=>[t.title?.()??_r(e.title)]}),l&&He(TN,{key:"subtitle"},{default:()=>[t.subtitle?.()??_r(e.subtitle)]}),t.default?.()]),g&&ht("div",{key:"append",class:"v-card-item__append"},[t.append?He(wa,{key:"append-defaults",disabled:!d,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},t.append):ht(Pr,null,[e.appendIcon&&He(xa,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&He(Zu,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]})}),{}}}),MN=Yt({opacity:[Number,String],...Li(),...Do()},"VCardText"),Rx=$r()({name:"VCardText",props:MN(),setup(e,n){let{slots:t}=n;return Oi(()=>He(e.tag,{class:sn(["v-card-text",e.class]),style:Pn([{"--v-card-text-opacity":e.opacity},e.style])},t)),{}}}),LN=Yt({appendAvatar:String,appendIcon:us,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:us,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Hu(),...Li(),...gc(),...mf(),...wf(),...gx(),...Cf(),...vx(),...gl(),...wx(),...Do(),...ba(),...Gu({variant:"elevated"})},"VCard"),ON=$r()({name:"VCard",directives:{vRipple:Ef},props:LN(),setup(e,n){let{attrs:t,slots:r}=n;const{themeClasses:h}=fl(e),{borderClasses:d}=Uu(e),{colorClasses:g,colorStyles:v,variantClasses:l}=Af(e),{densityClasses:f}=Vu(e),{dimensionStyles:s}=vf(e),{elevationClasses:a}=xf(e),{loaderClasses:u}=mx(e),{locationStyles:p}=_f(e),{positionClasses:i}=yx(e),{roundedClasses:c}=ml(e),m=bx(e,t),b=Wi(void 0);return Ti(()=>e.loading,(x,I)=>{b.value=!x&&typeof I=="string"?I:typeof x=="boolean"?void 0:x},{immediate:!0}),Oi(()=>{const x=e.link!==!1&&m.isLink.value,I=!e.disabled&&e.link!==!1&&(e.link||m.isClickable.value),$=x?"a":e.tag,_=!!(r.title||e.title!=null),C=!!(r.subtitle||e.subtitle!=null),O=_||C,P=!!(r.append||e.appendAvatar||e.appendIcon),L=!!(r.prepend||e.prependAvatar||e.prependIcon),T=!!(r.image||e.image),F=O||L||P,D=!!(r.text||e.text!=null);return Pa(He($,dr(m.linkProps,{class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":I},h.value,d.value,g.value,f.value,a.value,u.value,i.value,c.value,l.value,e.class],style:[v.value,s.value,p.value,{"--v-card-height":En(e.height)},e.style],onClick:I&&m.navigate.value,tabindex:e.disabled?-1:void 0}),{default:()=>[T&&ht("div",{key:"image",class:"v-card__image"},[r.image?He(wa,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):He(Wu,{key:"image-img",cover:!0,src:e.image},null)]),He(pN,{name:"v-card",active:!!e.loading,color:b.value},{default:r.loader}),F&&He(IN,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:r.item,prepend:r.prepend,title:r.title,subtitle:r.subtitle,append:r.append}),D&&He(Rx,{key:"text"},{default:()=>[r.text?.()??e.text]}),r.default?.(),r.actions&&He(Ex,null,{default:r.actions}),kf(I,"v-card")]}),[[Ef,I&&e.ripple]])}),{}}}),NN=Xw("v-spacer","div","VSpacer"),DN=$s({__name:"VSonner",props:{id:{},invert:{type:Boolean},position:{default:"bottom-center"},closeButtonPosition:{},hotkey:{default:()=>["altKey","KeyT"]},expand:{type:Boolean,default:!1},duration:{},gap:{},visibleToasts:{default:3},toastOptions:{},class:{},offset:{default:32},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){return(n,t)=>(gt(),Zt(Pr,null,[He(Ft(a2),{position:e.position,hotkey:e.hotkey,expand:e.expand,"visible-toasts":e.visibleToasts,duration:e.duration,"toast-options":e.toastOptions,offset:e.offset},null,8,["position","hotkey","expand","visible-toasts","duration","toast-options","offset"]),Ei(n.$slots,"default")],64))}}),PN=$s({__name:"ProgressBar",props:{duration:{default:5e3},progressBarProps:{},isPaused:{type:Boolean,default:!1},reverseProgressBar:{type:Boolean,default:!1}},setup(e){const n=e,t=n.reverseProgressBar?tn(0):tn(5e3);let r;Ti(()=>n.isPaused,d=>{!d&&!n.progressBarProps?.indeterminate&&h()});function h(){r=setTimeout(()=>{n.isPaused||(n.reverseProgressBar?t.value+=120:t.value-=120,t.value<=0&&!n.reverseProgressBar?(t.value=0,clearInterval(r)):t.value>=n.duration&&n.reverseProgressBar?(t.value=n.duration,clearInterval(r)):h())},100)}return Da(()=>{n.progressBarProps?.indeterminate||(t.value=n.reverseProgressBar?0:n.duration,h())}),Vs(()=>{clearInterval(r)}),(d,g)=>(gt(),qn(Ft(fx),dr(n.progressBarProps,{"model-value":Math.floor(100*(Ft(t)/n.duration))}),null,16,["model-value"]))}}),BN={class:"d-flex align-center justify-center fill-height"},zN={key:1,class:"d-flex align-center mr-8"},FN={class:"d-flex align-center justify-center fill-height"},jN={key:3},WN={class:"pb-1"},HN=["innerHTML"],UN=$s({inheritAttrs:!1,__name:"Toast",props:{text:{},description:{},vertical:{type:Boolean,default:!1},cardProps:{},cardTextProps:{},cardActionsProps:{default:()=>({})},action:{},prependIcon:{},prependIconProps:{},avatar:{},multipleAvatars:{},avatarProps:{},progressBar:{type:Boolean,default:!1},reverseProgressBar:{type:Boolean},progressDuration:{default:5e3},progressBarProps:{},loading:{type:Boolean}},emits:["closeToast"],setup(e){const n=tn(!1);return(t,r)=>(gt(),qn(Ft(ON),dr({class:"card-snackbar"},e.cardProps,{onMouseenter:r[1]||(r[1]=h=>n.value=!0),onMouseleave:r[2]||(r[2]=h=>n.value=!1)}),{default:on(()=>[ht("div",{class:sn({"d-flex flex-no-wrap justify-space-between":!e.vertical})},[He(Ft(Rx),dr(e.cardTextProps,{class:{"d-flex align-center":e.prependIcon||e.avatar||e.multipleAvatars}}),{default:on(()=>[e.avatar?(gt(),qn(Ft(Zu),dr({key:0,class:"mr-2"},e.avatarProps),{default:on(()=>[He(Ft(Wu),{src:e.avatar,cover:""},{placeholder:on(()=>[ht("div",BN,[He(Ft(Sf),{color:"grey-lighten-2",indeterminate:""})])]),_:1},8,["src"])]),_:1},16)):e.multipleAvatars?(gt(),Zt("div",zN,[(gt(!0),Zt(Pr,null,Il(e.multipleAvatars.length<=5?e.multipleAvatars:e.multipleAvatars.slice(0,5),(h,d)=>(gt(),qn(Ft(Zu),dr({ref_for:!0},e.avatarProps,{key:d,class:"mr-n6",style:{zIndex:5-d}}),{default:on(()=>[He(Ft(Wu),{src:h,cover:""},{placeholder:on(()=>[ht("div",FN,[He(Ft(Sf),{color:"grey-lighten-2",indeterminate:""})])]),_:1},8,["src"])]),_:2},1040,["style"]))),128))])):ni("",!0),e.prependIcon?(gt(),qn(Ft(xa),dr({key:2,class:"mr-2",icon:e.prependIcon},e.prependIconProps),null,16,["icon"])):ni("",!0),e.description?(gt(),Zt("div",jN,[ht("div",WN,_r(e.text),1),ht("p",{class:"font-weight-light",innerHTML:e.description},null,8,HN)])):(gt(),Zt(Pr,{key:4},[ji(_r(e.text),1)],64))]),_:1},16,["class"]),e.action?(gt(),qn(Ft(Ex),Nc(dr({key:0},e.cardActionsProps)),{default:on(()=>[He(Ft(NN)),He(Ft(kN),dr(e.action.buttonProps,{text:e.action.label,onClick:r[0]||(r[0]=()=>{t.$emit("closeToast"),e.action?.onClick?.()})}),null,16,["text"])]),_:1},16)):ni("",!0)],2),He(Ft(z2),null,{default:on(()=>[Pa(He(PN,{duration:e.progressDuration,"progress-bar-props":e.progressBarProps,"is-paused":n.value,"reverse-progress-bar":e.reverseProgressBar},null,8,["duration","progress-bar-props","is-paused","reverse-progress-bar"]),[[Nh,e.progressBar]])]),_:1})]),_:1},16))}}),VN=(e,n)=>{const t=e.__vccOpts||e;for(const[r,h]of n)t[r]=h;return t},qN=VN(UN,[["__scopeId","data-v-c014bbd8"]]);function Ix(e,n){const{description:t,action:r,...h}=n||{};return tf.custom(Pg(Eo(qN,{...h,progressBar:n?.progressBar??!1,progressDuration:n?.duration??5e3,progressBarProps:{...n?.progressBarProps,indeterminate:n?.loading},description:t,action:r,text:e})),{...h,unstyled:!0})}function vl(e,n){return function(t,r){return Ix(t,{prependIcon:n,cardProps:{color:e,...r?.cardProps},...r})}}const Rf=Object.assign(Ix,{success:vl("success","mdi-check-circle"),error:vl("error","mdi-cancel"),warning:vl("warning","mdi-alert"),info:vl("info","mdi-alert-circle"),primary:vl("primary","mdi-bell"),secondary:vl("secondary","mdi-bell"),dismiss(e){return tf.dismiss(e)},toastOriginal:tf}),GN={components:{VSonner:DN},data:function(){return{active:new Map,nextId:0,noToastPaths:["/login"],position:localStorage.toastPosition==="bottom"?"bottom":"top"}},created:function(){window.addEventListener("openc3-toast-position",this.onPositionChange)},unmounted:function(){window.removeEventListener("openc3-toast-position",this.onPositionChange)},methods:{onPositionChange:function(e){const n=e.detail?.position;(n==="top"||n==="bottom")&&(this.position=n)},toast:function(e,n){if(this.noToastPaths.includes(window.location.pathname))return;n===void 0&&(n=5e3);const t=!n,r=`openc3-toast-${this.nextId++}`;this.active.set(r,e);const h=dL(e.level),d=ac[sc[e.level]];Rf(this.toastText(e),{id:r,description:this.toastDescription(e),duration:t?1/0:n,prependIcon:this.toastNotificationIcon(e),prependIconProps:{style:`color:${h}`},cardProps:{style:`background-color:${d}!important;color:${h}!important;`,"data-test":"toast"},action:{label:t?"Acknowledge":"Dismiss",buttonProps:{variant:"text",style:`color:${h}`,"data-test":"dismiss-toast","aria-label":t?"Acknowledge":"Dismiss"},onClick:()=>{t&&e.msg_id&&window.dispatchEvent(new CustomEvent("openc3-ack-alert",{detail:{msg_id:e.msg_id}}))}},onDismiss:()=>this.active.delete(r),onAutoClose:()=>this.active.delete(r)})},dismissAll:function(){Rf.dismiss(),this.active.clear()},dismissMatching:function(e){for(const[n,t]of this.active)e(t)&&(Rf.dismiss(n),this.active.delete(n))},toastText:function(e){return e.title||e.message||e.body||""},toastDescription:function(e){const n=this.toastText(e),t=[];e.body&&e.body!==n&&t.push(e.body),e.message&&e.message!==n&&t.push(e.message);const r=this.toastTime(e);if(r&&t.push(r),!!t.length)return Ew.sanitize(t.join("<br>"))},toastTime:function(e){return e["@timestamp"]?e["@timestamp"]:e.time?new Date(e.time/1e6).toISOString():""},toastNotificationIcon:function(e){switch(String(e.level).toUpperCase()){case"FATAL":return"mdi-alert-octagon";case"ERROR":return"mdi-alert-circle";case"WARN":return"mdi-alert";default:return"mdi-information"}}}};function KN(e,n,t,r,h,d){const g=kn("VSonner");return gt(),qn(g,{position:e.position==="bottom"?"bottom-center":"top-center","visible-toasts":3},null,8,["position"])}const YN=Js(GN,[["render",KN]]);class JN{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=lw()),this.store}mount(){if(this.mounted)return;const n=Oh(YN);n.use(If);const t=document.createElement("div");document.body.appendChild(t),this.$root=n.mount(t),this.mounted=!0}open({method:n,title:t,body:r,message:h,level:d,duration:g,type:v="alert",logToConsole:l=!1,saveToHistory:f=!0,...s}){this.mount(),l&&console.log(h?`${d.toUpperCase()} - ${h}`:`${d.toUpperCase()} - ${t}: ${r}`),f&&this.getStore().notifyAddHistory({title:t,body:r,message:h,level:d}),this[n]({title:t,body:r,message:h,level:d,duration:g,type:v,...s})}toast({title:n,body:t,message:r,level:h,duration:d,type:g,...v}){this.$root.toast({title:n,body:t,message:r,level:h,type:g,...v},d)}critical(n){this.open({...n,method:"toast",level:"critical"})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious(n){this.open({...n,method:"toast",level:"serious"})}caution(n){this.open({...n,method:"toast",level:"caution"})}WARN(n){this.caution(n)}normal(n){this.open({...n,method:"toast",level:"normal"})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby(n){this.open({...n,method:"toast",level:"standby"})}off(n){this.open({...n,method:"toast",level:"off"})}dismissAll(){this.$root?.dismissAll()}dismiss(n){this.$root?.dismissMatching(n)}}const ZN={install(e,n){const t=new JN(n);e.provide("notify",t),e.config.globalProperties.hasOwnProperty("$notify")||(e.config.globalProperties.$notify=t)}},XN={component:e=>Eo(iN,{...e,class:"mdi"})},QN={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"}},eD={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"}},tD={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"}},nD={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"}},If=Gg({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:sO,cosmosDarkCobalt:QN,cosmosDarkIndigo:eD,cosmosDarkSlate:tD,cosmosDarkEmerald:nD}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:XN,...fL,...gL}}}),Mf=TC({createApp:Oh,appOptions:{render(){return Eo(DC,{})},el:"#openc3-tool"},handleInstance:e=>{e.use($L),e.use(al),e.use(If),e.use(fO),e.use(ZN)}}),Q3=ar("i",Mf.bootstrap),eW=ar("p",Mf.mount),tW=ar("u",Mf.unmount)})}}));