openc3-cosmos-tool-tlmviewer 6.7.0 → 6.8.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.
- checksums.yaml +4 -4
- data/tools/tlmviewer/ArrayWidget-j3ncPuPx-865525dca96fa962e762.js +2 -0
- data/tools/tlmviewer/ArrayplotWidget-DuLaiGa9-77ae8df1449985468989.js +1 -0
- data/tools/tlmviewer/BarColumn-BWJ0Dd4O-c8deca73f31b512db2e8.js +1 -0
- data/tools/tlmviewer/BlockWidget-Bf5Dd6Cr-d31f08e10f403a7bf57e.js +2 -0
- data/tools/tlmviewer/ButtonWidget-bl_mGFYh-82796ecacf78983ad30e.js +2 -0
- data/tools/tlmviewer/CanvasWidget-boDemgx1-8a67031c4b3c917a3158.js +1 -0
- data/tools/tlmviewer/CanvasdotWidget-BZBbJcER-e3de717adbeef34c908c.js +1 -0
- data/tools/tlmviewer/CanvasimageWidget-6ywvT5jd-24d197071b0846d6a605.js +1 -0
- data/tools/tlmviewer/CanvasimagevalueWidget-DjWrA3gX-71f90cb6bbc826d99b8a.js +1 -0
- data/tools/tlmviewer/CanvaslabelWidget-Bq4V2BQh-8b94bda4ac0a22474886.js +1 -0
- data/tools/tlmviewer/CanvaslabelvalueWidget-C8oNcFLi-b32e4701922dd65885cf.js +1 -0
- data/tools/tlmviewer/CanvaslineWidget-nvbL2GoL-fd7a69454aa7d7a60607.js +1 -0
- data/tools/tlmviewer/CanvaslinevalueWidget-ZACQedKx-a17f05593215133352bf.js +1 -0
- data/tools/tlmviewer/CheckbuttonWidget-B82UE8AB-33f6a3ea5cdc2c0678ec.js +1 -0
- data/tools/tlmviewer/ComboboxWidget-4OFiSkI6-35bffbe5024f8960eac0.js +1 -0
- data/tools/tlmviewer/DateWidget-BmwtdirF-953012a0d842c67dc3d8.js +1 -0
- data/tools/tlmviewer/DetailsDialog-CLKEfU0s-9c30e6067e198613276d.js +1 -0
- data/tools/tlmviewer/DynamicWidget-CfMtj7H8-487bbed699f6e446d841.js +1 -0
- data/tools/tlmviewer/FormatvalueWidget-C8exC3bj-10c0ce0b8b3d442b8a1d.js +1 -0
- data/tools/tlmviewer/Graph-CWcrowaT-3bb7192c903951da0c46.js +1 -0
- data/tools/tlmviewer/GraphWidget-CvzxZYVx-c9ef3d3d7a536d3d0727.js +1 -0
- data/tools/tlmviewer/HorizontalWidget-Ck151zVw-1243b4b90d91a17e7861.js +1 -0
- data/tools/tlmviewer/HorizontalboxWidget-D3P-cl9V-20e854a3684b472674b8.js +1 -0
- data/tools/tlmviewer/HorizontallineWidget-BE1TjPU8-9dba1d47ffa1e8a62741.js +1 -0
- data/tools/tlmviewer/IframeWidget-BgJCgues-1ffd2afa1139696f840b.js +1 -0
- data/tools/tlmviewer/ImageLoader-CWn-PLOk-abb2d4bd59378d315315.js +1 -0
- data/tools/tlmviewer/ImageviewerWidget-BlhFZD2f-90bf255b9b089f01df20.js +1 -0
- data/tools/tlmviewer/LabelWidget-Cwosk4x2-8edae57c0a81b5eeb5ee.js +1 -0
- data/tools/tlmviewer/LabelledWidget-Dl6rAFTQ-93da4c5c8ee8689f3291.js +1 -0
- data/tools/tlmviewer/LabelprogressbarWidget-MuAKesOz-2b152f4472c33f2264dc.js +1 -0
- data/tools/tlmviewer/LabelsparklineWidget-6LA6Ox3d-1fe13567a708870deb65.js +1 -0
- data/tools/tlmviewer/LabelvalueWidget-BxAXx-Tf-a16a9d20a266bded417c.js +1 -0
- data/tools/tlmviewer/LabelvaluedescWidget-Dwwlnd1g-fb185069e912f0539320.js +1 -0
- data/tools/tlmviewer/LabelvaluelimitsbarWidget-Dv8Qk8kK-406b23da4cf57817d7db.js +1 -0
- data/tools/tlmviewer/LabelvaluelimitscolumnWidget-D-_gl6fq-b342cc11675c69499e02.js +1 -0
- data/tools/tlmviewer/LabelvaluerangebarWidget-B3MKT-3Y-c7babec553bec293207e.js +1 -0
- data/tools/tlmviewer/Layout-Bkb6VP3e-db8b70e54b2f2ec1f254.js +1 -0
- data/tools/tlmviewer/LedWidget-DOuDD8LI-8b640a840ccd6cdd9607.js +1 -0
- data/tools/tlmviewer/LimitsbarWidget-D1U6SvVL-da676dbdf603be66efed.js +1 -0
- data/tools/tlmviewer/LimitscolorWidget-iSMGusqt-7f95925708f6e95ac8ad.js +1 -0
- data/tools/tlmviewer/LimitscolumnWidget-DjxZTt_r-d089a9d1ef10ec10695e.js +1 -0
- data/tools/tlmviewer/LinegraphWidget-BHKU6zlT-78a7e66257f817f12863.js +1 -0
- data/tools/tlmviewer/MatrixbycolumnsWidget-BKO-A2QD-5263bf466c5203a8c262.js +1 -0
- data/tools/tlmviewer/ProgressbarWidget-fbr2qu_N-906ff59566a2a3475213.js +1 -0
- data/tools/tlmviewer/RadiobuttonWidget-DL08zcQT-134058082bc9e0a3521c.js +1 -0
- data/tools/tlmviewer/RadiogroupWidget-DW9Xpj3c-9fee4d667f36906f17e1.js +1 -0
- data/tools/tlmviewer/RangebarWidget-o9q55kjc-3ef1228b915927e02cbe.js +1 -0
- data/tools/tlmviewer/RollupWidget-BHnjj-DF-c7a1da0eaaafd250f85f.js +1 -0
- data/tools/tlmviewer/ScrollwindowWidget-D-QVwztC-5b125e6689ad00c88146.js +1 -0
- data/tools/tlmviewer/SignalWidget-CsWuufdx-3b9c80bbbbc0db4cf138.js +1 -0
- data/tools/tlmviewer/SpacerWidget-Di9-qunj-ffee3b9914d4d2f53a0a.js +1 -0
- data/tools/tlmviewer/SparklineWidget-B6-zhdPW-324f8a37cf23a1bf2f6c.js +1 -0
- data/tools/tlmviewer/TabbookWidget-B1E1_mzA-39fe579408eef8b7fe3f.js +1 -0
- data/tools/tlmviewer/TextboxWidget-CBVEXPw_-1a126e1502cdddc80137.js +1 -0
- data/tools/tlmviewer/TextfieldWidget-DZMHrtQa-b64ac3c1daada731c4bf.js +1 -0
- data/tools/tlmviewer/TimeWidget-K4MNmJ7J-7cc31b4f9829e8bd8251.js +1 -0
- data/tools/tlmviewer/TitleWidget-8IcwweFE-1799fc0aaa9c6275b2f0.js +1 -0
- data/tools/tlmviewer/TlmViewer-50d5ae8dc4223c22dd1c.js +36 -0
- data/tools/tlmviewer/VWidget-CoIgX3hM-5a671ff2315ab06f913f.js +1 -0
- data/tools/tlmviewer/ValueWidget-BvT1ASar-49fc1dceecd7340294d9.js +1 -0
- data/tools/tlmviewer/ValuelimitsbarWidget-C5lBnUmB-fb438e345923524a0ab4.js +1 -0
- data/tools/tlmviewer/ValuelimitscolumnWidget-DHYI0WBL-48b303b9678a7a1602f6.js +1 -0
- data/tools/tlmviewer/ValuerangebarWidget-BSszZhlE-010b800a154df935a5a2.js +1 -0
- data/tools/tlmviewer/VerticalWidget-1GhgYrC3-1db88bc681d02b219042.js +1 -0
- data/tools/tlmviewer/VerticalboxWidget-DYHJqEzd-6c29930e2d3eede3cd28.js +1 -0
- data/tools/tlmviewer/Widget-B8t93Oid-598b1b892171c5aeb007.js +1 -0
- data/tools/tlmviewer/main-d13363c9eebc731df597.js +1504 -0
- data/tools/tlmviewer/main.js +1 -1
- metadata +69 -69
- data/tools/tlmviewer/ArrayWidget-BSG8KEtf-c624ce46a8d08666e5a1.js +0 -2
- data/tools/tlmviewer/ArrayplotWidget-WVu76Kqn-76288ce02d5dc141b96b.js +0 -1
- data/tools/tlmviewer/BarColumn-Cflh9pUz-c9f9a7f80753169c3dcd.js +0 -1
- data/tools/tlmviewer/BlockWidget-B7ryWGCq-842682d3f32270b92f9b.js +0 -2
- data/tools/tlmviewer/ButtonWidget-BKih3ix9-01859a3629836b11c866.js +0 -2
- data/tools/tlmviewer/CanvasWidget-DT9xMSfb-e3919bea207193936889.js +0 -1
- data/tools/tlmviewer/CanvasdotWidget-7H5Hvcn--e174ba4a9ab78fb8ae9d.js +0 -1
- data/tools/tlmviewer/CanvasimageWidget-BbWYx6Gj-42aebfbdf4286f3c3da3.js +0 -1
- data/tools/tlmviewer/CanvasimagevalueWidget-Blvoe2X4-fa153ce4e6f8a134c94c.js +0 -1
- data/tools/tlmviewer/CanvaslabelWidget-BPx_Rm4o-d93d361640c23b12b9b7.js +0 -1
- data/tools/tlmviewer/CanvaslabelvalueWidget-DzdWvL0W-773d3a8b1d227144ed9b.js +0 -1
- data/tools/tlmviewer/CanvaslineWidget-CqskilGk-11502894d392acf4ae65.js +0 -1
- data/tools/tlmviewer/CanvaslinevalueWidget-C0JIKdvZ-86773a5465e0ea6465b2.js +0 -1
- data/tools/tlmviewer/CheckbuttonWidget-C9FbJx2v-eb8bcdd4523bc23a79eb.js +0 -1
- data/tools/tlmviewer/ComboboxWidget-BbNKT0s8-e275602e7ba4c92b39c5.js +0 -1
- data/tools/tlmviewer/DateWidget-CBMsdRUE-399c453000fa73edc15a.js +0 -1
- data/tools/tlmviewer/DetailsDialog-DRVahE5z-ece52b95357c98fc1b0c.js +0 -1
- data/tools/tlmviewer/DynamicWidget-CfMtj7H8-5992014ef4fc18a7fc78.js +0 -1
- data/tools/tlmviewer/FormatvalueWidget-BLWsqhIZ-4a7ebeb8f5dbe3562187.js +0 -1
- data/tools/tlmviewer/Graph-BiU56Qj2-f808a035fa6eb1113968.js +0 -1
- data/tools/tlmviewer/GraphWidget-Ga0AEfrJ-4c4b8505661ce49414a0.js +0 -1
- data/tools/tlmviewer/HorizontalWidget-CsVhLwZO-c6b85f212fdcb2220e31.js +0 -1
- data/tools/tlmviewer/HorizontalboxWidget-xC6PADl3-256be52a8fa142ad9f8e.js +0 -1
- data/tools/tlmviewer/HorizontallineWidget-NZIxmRVN-93a021218d7b5e123fe8.js +0 -1
- data/tools/tlmviewer/IframeWidget-BgzjSfag-a8789c88fd05e55e27ed.js +0 -1
- data/tools/tlmviewer/ImageLoader-DbFVK1Ui-84dcd6030cf14ca8b860.js +0 -1
- data/tools/tlmviewer/ImageviewerWidget-BnT5m-nw-522ac790b85b188fbd9f.js +0 -1
- data/tools/tlmviewer/LabelWidget-DSDYmz6X-a1e70dcc3a8e1fad0f5f.js +0 -1
- data/tools/tlmviewer/LabelledWidget-DMb-myxs-8a02b15d4dae4fafc140.js +0 -1
- data/tools/tlmviewer/LabelprogressbarWidget-CkjDJBao-46cf45425e4d72123d4e.js +0 -1
- data/tools/tlmviewer/LabelsparklineWidget-DBYPFz3Y-7e8514ee620df37dba5f.js +0 -1
- data/tools/tlmviewer/LabelvalueWidget-DlTkJC4i-8e50d80f49c912f5273e.js +0 -1
- data/tools/tlmviewer/LabelvaluedescWidget-dRqnGZub-5d6226950d9afbdab488.js +0 -1
- data/tools/tlmviewer/LabelvaluelimitsbarWidget-CS4NAPJ1-bb2de96f91086be4c995.js +0 -1
- data/tools/tlmviewer/LabelvaluelimitscolumnWidget-D9x4Ppv8-9861a2abcd2a4502f66f.js +0 -1
- data/tools/tlmviewer/LabelvaluerangebarWidget-Dhyng4-n-49b238f4b2e65c8450fa.js +0 -1
- data/tools/tlmviewer/Layout-mWR35VAD-cd9a7c3fa80c1f4059b8.js +0 -1
- data/tools/tlmviewer/LedWidget-D8cq4pUv-18f58b1cbdad74286038.js +0 -1
- data/tools/tlmviewer/LimitsbarWidget-VGJnDuVM-f989fb5a07900e987ef4.js +0 -1
- data/tools/tlmviewer/LimitscolorWidget-CG6Pqi12-4a7a9580e03214e88d9f.js +0 -1
- data/tools/tlmviewer/LimitscolumnWidget-DjovQdiT-f011c49d7d9c3f7991b3.js +0 -1
- data/tools/tlmviewer/LinegraphWidget-DSWAhXgZ-f3f74d268e4a0321577a.js +0 -1
- data/tools/tlmviewer/MatrixbycolumnsWidget-C3cuhRxz-9c9a4162a5814d79e596.js +0 -1
- data/tools/tlmviewer/ProgressbarWidget-oCgAEFBO-e7494eb041c7463ac28e.js +0 -1
- data/tools/tlmviewer/RadiobuttonWidget-D4Dak3lc-3233d8f3f23b02fa4597.js +0 -1
- data/tools/tlmviewer/RadiogroupWidget-Dbe9T4fp-5c489c0cd1a294094906.js +0 -1
- data/tools/tlmviewer/RangebarWidget-CIVrgqrW-6b772d15402042edb4e8.js +0 -1
- data/tools/tlmviewer/RollupWidget-CH1-XNLV-677d4d076fe1f3c93787.js +0 -1
- data/tools/tlmviewer/ScrollwindowWidget-BwFG6Wn8-a78d9bc3a2caca381465.js +0 -1
- data/tools/tlmviewer/SignalWidget-Gz2gHrUm-b430a98fa532c148c6dc.js +0 -1
- data/tools/tlmviewer/SpacerWidget-Bg7VDB0k-9cc7551f124aa6dd9d6d.js +0 -1
- data/tools/tlmviewer/SparklineWidget-D_b5rfJv-88f19da5cd4229e4998b.js +0 -1
- data/tools/tlmviewer/TabbookWidget-C30f9B6z-739c2f41d0e9f185f496.js +0 -1
- data/tools/tlmviewer/TextboxWidget-CDqxsgys-e4a14510baab1a3d9070.js +0 -1
- data/tools/tlmviewer/TextfieldWidget-CAyjKJs6-8a89a908663afbd5aab2.js +0 -1
- data/tools/tlmviewer/TimeWidget-BQsP0G2X-1ad96a0d3c35768c9c35.js +0 -1
- data/tools/tlmviewer/TitleWidget-DXVba53S-672507a2be1bff366f14.js +0 -1
- data/tools/tlmviewer/TlmViewer-924ac76ed3042e6bd9e6.js +0 -36
- data/tools/tlmviewer/VWidget-CFTCukCL-8ef8894c81152c550859.js +0 -1
- data/tools/tlmviewer/ValueWidget-B-TWLPdM-1a02502087e600bfbce5.js +0 -1
- data/tools/tlmviewer/ValuelimitsbarWidget-jsDXdPdC-a09cb266a86fb7d8ff3a.js +0 -1
- data/tools/tlmviewer/ValuelimitscolumnWidget-I-uwnXM2-283db74b3677b3a6a1b6.js +0 -1
- data/tools/tlmviewer/ValuerangebarWidget-OyhSTScu-9417a19ce70e3ee4b1f4.js +0 -1
- data/tools/tlmviewer/VerticalWidget-CkFbX1Gq-8e4dfed128e84fe99a27.js +0 -1
- data/tools/tlmviewer/VerticalboxWidget-FEQgPM9r-f0f7870c4791647380eb.js +0 -1
- data/tools/tlmviewer/Widget-C3-TBgP7-1cef0d967ff625cbfc7d.js +0 -1
- data/tools/tlmviewer/main-600634c211e41f2e4c50.js +0 -1504
@@ -0,0 +1,1504 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],(function(In,tt){"use strict";var yt,Hi,mn,Mt,st,Dr,nr,op,sp,Fs,ba,gl,oo,gr,Fr,Qc,Ps,fl,ml,ap,lp,cp,Zc,up,hp,dp,pp,gp,Jc,fp,mp,vp,eu,yp,wp;return{setters:[St=>{yt=St.resolveComponent,Hi=St.createBlock,mn=St.openBlock,Mt=St.withCtx,st=St.createVNode,Dr=St.createElementBlock,nr=St.createElementVNode,op=St.useCssVars,sp=St.defineAsyncComponent,Fs=St.h,ba=St.normalizeStyle,gl=St.Fragment,oo=St.createCommentVNode,gr=St.createTextVNode,Fr=St.toDisplayString,Qc=St.withKeys,Ps=St.withModifiers,fl=St.withDirectives,ml=St.vShow,ap=St.defineComponent,lp=St.warn,cp=St.inject,Zc=St.computed,up=St.shallowRef,hp=St.watchEffect,dp=St.normalizeClass,pp=St.getCurrentInstance,gp=St.provide,Jc=St.createApp,fp=St.mergeProps},St=>{mp=St.createRouter,vp=St.createWebHistory},St=>{eu=St.getMountedApps},St=>{yp=St.createStore},St=>{wp=St.createVuetify}],execute:(function(){In({$:$p,c:h$,f:mr,l:dn,y:Bn,z:qh});var St=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(m){return Object.getOwnPropertyDescriptor(n,m).enumerable}))),e.push.apply(e,r)}return e}function es(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?bp(Object(e),!0).forEach((function(r){Ab(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):bp(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function Ab(n,t,e){return(t=(function(r){var m=(function(g,y){if(ts(g)!=="object"||g===null)return g;var x=g[Symbol.toPrimitive];if(x!==void 0){var h=x.call(g,y);if(ts(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(g)})(r,"string");return ts(m)==="symbol"?m:String(m)})(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function ts(n){return ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ts(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,m=String(e),g=m.length,y=-1,x="",h=m.charCodeAt(0);++y<g;)(r=m.charCodeAt(y))!=0?x+=r>=1&&r<=31||r==127||y==0&&r>=48&&r<=57||y==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":y==0&&g==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+m.charAt(y):m.charAt(y):x+="�";return x};n.CSS||(n.CSS={}),n.CSS.escape=t})(St);var _b={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function $b(n){if(ts(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=es(es({},_b),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ts(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:Mb.bind(null,t,e),mount:Tb.bind(null,t,e),unmount:Eb.bind(null,t,e),update:Ib.bind(null,t,e)}}function Mb(n){return n.loadRootComponent?n.loadRootComponent().then((function(t){return n.rootComponent=t})):Promise.resolve()}function Tb(n,t,e){var r={};return Promise.resolve().then((function(){return(function(m,g){return typeof m.appOptions=="function"?m.appOptions(g):Promise.resolve(es({},m.appOptions))})(n,e).then((function(m){var g;if(e.domElement&&!m.el&&(m.el=e.domElement),m.el)if(typeof m.el=="string"){if(!(g=document.querySelector(m.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(m.el))}else(g=m.el).id||(g.id="single-spa-application:".concat(e.name)),m.el="#".concat(CSS.escape(g.id));else{var y="single-spa-application:".concat(e.name);m.el="#".concat(CSS.escape(y)),(g=document.getElementById(y))||((g=document.createElement("div")).id=y,document.body.appendChild(g))}if(!n.replaceMode&&(m.el=m.el+" .single-spa-container",!g.querySelector(".single-spa-container"))){var x=document.createElement("div");x.className="single-spa-container",g.appendChild(x)}r.domEl=g,m.render||m.template||!n.rootComponent||(m.render=function(p){return p(n.rootComponent)}),m.data||(m.data={});var h=m.data;if(m.data=function(){return es(es({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(m),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(m.el),t[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(m.el)}else if(r.vueInstance=new n.Vue(m),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return t[e.name]=r,r.vueInstance}));return t[e.name]=r,r.vueInstance}))}))}function Ib(n,t,e){return Promise.resolve().then((function(){var r=t[e.name],m=es(es({},n.appOptions.data||{}),e),g=r.root||r.vueInstance;for(var y in m)g[y]=m[y]}))}function Eb(n,t,e){return Promise.resolve().then((function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const Lb=In("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,m]of t)e[r]=m;return e}),Rb={};function Ob(n,t){const e=yt("router-view"),r=yt("v-app");return mn(),Hi(r,{id:"innerapp"},{default:Mt(()=>[st(e)]),_:1})}const Nb=Lb(Rb,[["render",Ob]]),K2="modulepreload",q2=function(n){return"/"+n},G2={},nt=function(t,e,r){let m=Promise.resolve();function g(y){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=y,window.dispatchEvent(x),!x.defaultPrevented)throw y}return m.then(y=>{for(const x of y||[])x.status==="rejected"&&g(x.reason);return t().catch(g)})},xp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/tlmviewer/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(xp)},Io=In("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,m]of t)e[r]=m;return e}),Db="/icons/customIcons.svg",tu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Db+"#"+this.icon}}},Cp=()=>{op(n=>({"259824e2":n.color}))},kp=tu.setup;tu.setup=kp?(n,t)=>(Cp(),kp(n,t)):Cp;const Fb={class:"cosmos-custom-icon"},Pb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Wb=["href"];function Bb(n,t,e,r,m,g){return mn(),Dr("span",Fb,[(mn(),Dr("svg",Pb,[nr("use",{href:g.iconSrc},null,8,Wb)]))])}const zb=Io(tu,[["render",Bb],["__scopeId","data-v-4b6f1199"]]),vl=6e4,nu=36e5,jb=1e3,Sp=Symbol.for("constructDateFrom");function Bn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&Sp in n?n[Sp](t):n instanceof Date?new n.constructor(t):new Date(t)}function dn(n,t){return Bn(t||n,n)}let Hb={};function Ws(){return Hb}function Eo(n,t){var e,r,m,g;const y=Ws(),x=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??y.weekStartsOn??((g=(m=y.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,h=dn(n,t==null?void 0:t.in),p=h.getDay(),s=(p<x?7:0)+p-x;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Bs(n,t){return Eo(n,{...t,weekStartsOn:1})}function Ap(n,t){const e=dn(n,void 0),r=e.getFullYear(),m=Bn(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const g=Bs(m),y=Bn(e,0);y.setFullYear(r,0,4),y.setHours(0,0,0,0);const x=Bs(y);return e.getTime()>=g.getTime()?r+1:e.getTime()>=x.getTime()?r:r-1}function yl(n){const t=dn(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function Ub(n,...t){const e=Bn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function _p(n,t){const e=dn(n,void 0);return e.setHours(0,0,0,0),e}function Vb(n,t,e){const[r,m]=Ub(void 0,n,t),g=_p(r),y=_p(m),x=+g-yl(g),h=+y-yl(y);return Math.round((x-h)/864e5)}function Kb(n,t){const e=Ap(n),r=Bn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Bs(r)}function qb(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function $p(n){return!(!qb(n)&&typeof n!="number"||isNaN(+dn(n)))}function Gb(n,t){const e=dn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Yb={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"}},Xb=(n,t,e)=>{let r;const m=Yb[n];return typeof m=="string"?r=m:t===1?r=m.one:r=m.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function ru(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Qb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},e0={date:ru({formats:Qb,defaultWidth:"full"}),time:ru({formats:Zb,defaultWidth:"full"}),dateTime:ru({formats:Jb,defaultWidth:"full"})},t0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},n0=(n,t,e,r)=>t0[n];function xa(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let m;if(r==="formatting"&&n.formattingValues){const y=n.defaultFormattingWidth||n.defaultWidth,x=e!=null&&e.width?String(e.width):y;m=n.formattingValues[x]||n.formattingValues[y]}else{const y=n.defaultWidth,x=e!=null&&e.width?String(e.width):n.defaultWidth;m=n.values[x]||n.values[y]}const g=n.argumentCallback?n.argumentCallback(t):t;return m[g]}}const r0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},i0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},o0={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"]},s0={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"]},a0={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"}},l0={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"}},c0=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},u0={ordinalNumber:c0,era:xa({values:r0,defaultWidth:"wide"}),quarter:xa({values:i0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:xa({values:o0,defaultWidth:"wide"}),day:xa({values:s0,defaultWidth:"wide"}),dayPeriod:xa({values:a0,defaultWidth:"wide",formattingValues:l0,defaultFormattingWidth:"wide"})};function Ca(n){return(t,e={})=>{const r=e.width,m=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],g=t.match(m);if(!g)return null;const y=g[0],x=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(x)?d0(x,a=>a.test(y)):h0(x,a=>a.test(y));let p;p=n.valueCallback?n.valueCallback(h):h,p=e.valueCallback?e.valueCallback(p):p;const s=t.slice(y.length);return{value:p,rest:s}}}function h0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function d0(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function p0(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const m=r[0],g=t.match(n.parsePattern);if(!g)return null;let y=n.valueCallback?n.valueCallback(g[0]):g[0];y=e.valueCallback?e.valueCallback(y):y;const x=t.slice(m.length);return{value:y,rest:x}}}const g0=/^(\d+)(th|st|nd|rd)?/i,f0=/\d+/i,m0={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},v0={any:[/^b/i,/^(a|c)/i]},y0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},w0={any:[/1/i,/2/i,/3/i,/4/i]},b0={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},x0={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]},C0={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},k0={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]},S0={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},A0={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}},_0={ordinalNumber:p0({matchPattern:g0,parsePattern:f0,valueCallback:n=>parseInt(n,10)}),era:Ca({matchPatterns:m0,defaultMatchWidth:"wide",parsePatterns:v0,defaultParseWidth:"any"}),quarter:Ca({matchPatterns:y0,defaultMatchWidth:"wide",parsePatterns:w0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ca({matchPatterns:b0,defaultMatchWidth:"wide",parsePatterns:x0,defaultParseWidth:"any"}),day:Ca({matchPatterns:C0,defaultMatchWidth:"wide",parsePatterns:k0,defaultParseWidth:"any"}),dayPeriod:Ca({matchPatterns:S0,defaultMatchWidth:"any",parsePatterns:A0,defaultParseWidth:"any"})},Mp={code:"en-US",formatDistance:Xb,formatLong:e0,formatRelative:n0,localize:u0,match:_0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $0(n,t){const e=dn(n,void 0);return Vb(e,Gb(e))+1}function Tp(n,t){const e=dn(n,void 0),r=+Bs(e)-+Kb(e);return Math.round(r/6048e5)+1}function iu(n,t){var e,r,m,g;const y=dn(n,t==null?void 0:t.in),x=y.getFullYear(),h=Ws(),p=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((g=(m=h.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,s=Bn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,p),s.setHours(0,0,0,0);const a=Eo(s,t),u=Bn((t==null?void 0:t.in)||n,0);u.setFullYear(x,0,p),u.setHours(0,0,0,0);const c=Eo(u,t);return+y>=+a?x+1:+y>=+c?x:x-1}function M0(n,t){var e,r,m,g;const y=Ws(),x=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??y.firstWeekContainsDate??((g=(m=y.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,h=iu(n,t),p=Bn((t==null?void 0:t.in)||n,0);return p.setFullYear(h,0,x),p.setHours(0,0,0,0),Eo(p,t)}function Ip(n,t){const e=dn(n,t==null?void 0:t.in),r=+Eo(e,t)-+M0(e,t);return Math.round(r/6048e5)+1}function Xt(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Lo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return Xt(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):Xt(e+1,2)},d(n,t){return Xt(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return Xt(n.getHours()%12||12,t.length)},H(n,t){return Xt(n.getHours(),t.length)},m(n,t){return Xt(n.getMinutes(),t.length)},s(n,t){return Xt(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return Xt(m,t.length)}},zs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ep={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),m=r>0?r:1-r;return e.ordinalNumber(m,{unit:"year"})}return Lo.y(n,t)},Y:function(n,t,e,r){const m=iu(n,r),g=m>0?m:1-m;if(t==="YY"){const y=g%100;return Xt(y,2)}return t==="Yo"?e.ordinalNumber(g,{unit:"year"}):Xt(g,t.length)},R:function(n,t){const e=Ap(n);return Xt(e,t.length)},u:function(n,t){const e=n.getFullYear();return Xt(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Xt(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Xt(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Lo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return Xt(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const m=Ip(n,r);return t==="wo"?e.ordinalNumber(m,{unit:"week"}):Xt(m,t.length)},I:function(n,t,e){const r=Tp(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):Xt(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Lo.d(n,t)},D:function(n,t,e){const r=$0(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):Xt(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const m=n.getDay(),g=(m-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(g);case"ee":return Xt(g,2);case"eo":return e.ordinalNumber(g,{unit:"day"});case"eee":return e.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(m,{width:"short",context:"formatting"});case"eeee":default:return e.day(m,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const m=n.getDay(),g=(m-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(g);case"cc":return Xt(g,t.length);case"co":return e.ordinalNumber(g,{unit:"day"});case"ccc":return e.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(m,{width:"narrow",context:"standalone"});case"cccccc":return e.day(m,{width:"short",context:"standalone"});case"cccc":default:return e.day(m,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),m=r===0?7:r;switch(t){case"i":return String(m);case"ii":return Xt(m,t.length);case"io":return e.ordinalNumber(m,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let m;switch(r===12?m=zs.noon:r===0?m=zs.midnight:m=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let m;switch(r>=17?m=zs.evening:r>=12?m=zs.afternoon:r>=4?m=zs.morning:m=zs.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Lo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Lo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):Xt(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):Xt(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Lo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Lo.s(n,t)},S:function(n,t){return Lo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Rp(r);case"XXXX":case"XX":return ns(r);case"XXXXX":case"XXX":default:return ns(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Rp(r);case"xxxx":case"xx":return ns(r);case"xxxxx":case"xxx":default:return ns(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Lp(r,":");case"OOOO":default:return"GMT"+ns(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Lp(r,":");case"zzzz":default:return"GMT"+ns(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return Xt(r,t.length)},T:function(n,t,e){return Xt(+n,t.length)}};function Lp(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Math.trunc(r/60),g=r%60;return g===0?e+String(m):e+String(m)+t+Xt(g,2)}function Rp(n,t){return n%60===0?(n>0?"-":"+")+Xt(Math.abs(n)/60,2):ns(n,t)}function ns(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Xt(Math.trunc(r/60),2),g=Xt(r%60,2);return e+m+t+g}const Op=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Np=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},T0=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return Op(n,t);let g;switch(r){case"P":g=t.dateTime({width:"short"});break;case"PP":g=t.dateTime({width:"medium"});break;case"PPP":g=t.dateTime({width:"long"});break;case"PPPP":default:g=t.dateTime({width:"full"});break}return g.replace("{{date}}",Op(r,t)).replace("{{time}}",Np(m,t))},ou={p:Np,P:T0},I0=/^D+$/,E0=/^Y+$/,L0=["D","DD","YY","YYYY"];function Dp(n){return I0.test(n)}function Fp(n){return E0.test(n)}function su(n,t,e){const r=R0(n,t,e);if(console.warn(r),L0.includes(n))throw new RangeError(r)}function R0(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const O0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,D0=/^'([^]*?)'?$/,F0=/''/g,P0=/[a-zA-Z]/;function rs(n,t,e){var r,m,g,y,x,h,p,s;const a=Ws(),u=(e==null?void 0:e.locale)??a.locale??Mp,c=(e==null?void 0:e.firstWeekContainsDate)??((m=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((y=(g=a.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)??1,o=(e==null?void 0:e.weekStartsOn)??((h=(x=e==null?void 0:e.locale)==null?void 0:x.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(p=a.locale)==null?void 0:p.options)==null?void 0:s.weekStartsOn)??0,l=dn(n,e==null?void 0:e.in);if(!$p(l))throw new RangeError("Invalid time value");let d=t.match(N0).map(b=>{const E=b[0];if(E==="p"||E==="P"){const M=ou[E];return M(b,u.formatLong)}return b}).join("").match(O0).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const E=b[0];if(E==="'")return{isToken:!1,value:W0(b)};if(Ep[E])return{isToken:!0,value:b};if(E.match(P0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:b}});u.localize.preprocessor&&(d=u.localize.preprocessor(l,d));const w={firstWeekContainsDate:c,weekStartsOn:o,locale:u};return d.map(b=>{if(!b.isToken)return b.value;const E=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Fp(E)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Dp(E))&&su(E,t,String(n));const M=Ep[E[0]];return M(l,E,u.localize,w)}).join("")}function W0(n){const t=n.match(D0);return t?t[1].replace(F0,"'"):n}var Ro=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pp={exports:{}},Wp;function B0(){return Wp||(Wp=1,(function(n,t){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var m=function(s,a,u){if(typeof s!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),m.modules[s]||(m.payloads[s]=u,m.modules[s]=null)};m.modules={},m.payloads={};var g=function(s,a,u){if(typeof a=="string"){var c=h(s,a);if(c!=null)return u&&u(),c}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],l=0,d=a.length;l<d;++l){var w=h(s,a[l]);if(w==null&&y.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},y=function(s,a){var u=g("",s,a);return u==null&&y.original?y.original.apply(this,arguments):u},x=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return x(s,u[0])+"!"+x(s,u[1])}if(a.charAt(0)=="."){var c=s.split("/").slice(0,-1).join("/");for(a=c+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=x(s,a);var u=m.modules[a];if(!u){if(u=m.payloads[a],typeof u=="function"){var c={},o={id:a,uri:"",exports:c,packaged:!0},l=function(w,b){return g(a,w,b)},d=u(l,c,o);c=d||o.exports,m.modules[a]=c,delete m.payloads[a]}u=m.modules[a]=c||u}return u};function p(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(m.original=a.define,a.define=m,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(y.original=a.require,a.require=y,a.require.packaged=!0)}p(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,m){function g(y,x,h){Object.defineProperty(y,x,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||g(String.prototype,"startsWith",function(y,x){return x=x||0,this.lastIndexOf(y,x)===x}),String.prototype.endsWith||g(String.prototype,"endsWith",function(y,x){var h=this;(x===void 0||x>h.length)&&(x=h.length),x-=y.length;var p=h.indexOf(y,x);return p!==-1&&p===x}),String.prototype.repeat||g(String.prototype,"repeat",function(y){for(var x="",h=this;y>0;)y&1&&(x+=h),(y>>=1)&&(h+=h);return x}),String.prototype.includes||g(String.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Object.assign||(Object.assign=function(y){if(y==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(y),h=1;h<arguments.length;h++){var p=arguments[h];p!=null&&Object.keys(p).forEach(function(s){x[s]=p[s]})}return x}),Object.values||(Object.values=function(y){return Object.keys(y).map(function(x){return y[x]})}),Array.prototype.find||g(Array.prototype,"find",function(y){for(var x=this.length,h=arguments[1],p=0;p<x;p++){var s=this[p];if(y.call(h,s,p,this))return s}}),Array.prototype.findIndex||g(Array.prototype,"findIndex",function(y){for(var x=this.length,h=arguments[1],p=0;p<x;p++){var s=this[p];if(y.call(h,s,p,this))return p}}),Array.prototype.includes||g(Array.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Array.prototype.fill||g(Array.prototype,"fill",function(y){for(var x=this,h=x.length>>>0,p=arguments[1],s=p>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],c=u===void 0?h:u>>0,o=c<0?Math.max(h+c,0):Math.min(c,h);a<o;)x[a]=y,a++;return x}),Array.of||g(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,m){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,m){r.deepCopy=function g(y){if(typeof y!="object"||!y)return y;var x;if(Array.isArray(y)){x=[];for(var h=0;h<y.length;h++)x[h]=g(y[h]);return x}if(Object.prototype.toString.call(y)!=="[object Object]")return y;x={};for(var h in y)x[h]=g(y[h]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){r.last=function(x){return x[x.length-1]},r.stringReverse=function(x){return x.split("").reverse().join("")},r.stringRepeat=function(x,h){for(var p="";h>0;)h&1&&(p+=x),(h>>=1)&&(x+=x);return p};var g=/^\s\s*/,y=/\s\s*$/;r.stringTrimLeft=function(x){return x.replace(g,"")},r.stringTrimRight=function(x){return x.replace(y,"")},r.copyObject=function(x){var h={};for(var p in x)h[p]=x[p];return h},r.copyArray=function(x){for(var h=[],p=0,s=x.length;p<s;p++)x[p]&&typeof x[p]=="object"?h[p]=this.copyObject(x[p]):h[p]=x[p];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(x){for(var h={},p=0;p<x.length;p++)h[x[p]]=1;return h},r.createMap=function(x){var h=Object.create(null);for(var p in x)h[p]=x[p];return h},r.arrayRemove=function(x,h){for(var p=0;p<=x.length;p++)h===x[p]&&x.splice(p,1)},r.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(x){return(""+x).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(x,h){var p=[];return x.replace(h,function(s){p.push({offset:arguments[arguments.length-2],length:s.length})}),p},r.deferredCall=function(x){var h=null,p=function(){h=null,x()},s=function(a){return s.cancel(),h=setTimeout(p,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),x(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(x,h){var p=null,s=function(){p=null,x()},a=function(u){p==null&&(p=setTimeout(s,u||h))};return a.delay=function(u){p&&clearTimeout(p),p=setTimeout(s,u||h)},a.schedule=a,a.call=function(){this.cancel(),x()},a.cancel=function(){p&&clearTimeout(p),p=null},a.isPending=function(){return p},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(x,h,p){return p&&x.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,m){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var g=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(g.platform)||["other"])[0].toLowerCase(),x=g.userAgent||"",h=g.appName||"";r.isWin=y=="win",r.isMac=y=="mac",r.isLinux=y=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=x.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(x.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,r.isAIR=x.indexOf("AdobeAIR")>=0,r.isAndroid=x.indexOf("Android")>=0,r.isChromeOS=x.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(x)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,m){var g=e("./useragent"),y="http://www.w3.org/1999/xhtml";r.buildDom=function u(c,o,l){if(typeof c=="string"&&c){var d=document.createTextNode(c);return o&&o.appendChild(d),d}if(!Array.isArray(c))return c&&c.appendChild&&o&&o.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var w=[],b=0;b<c.length;b++){var E=u(c[b],o,l);E&&w.push(E)}return w}var M=document.createElement(c[0]),k=c[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var b=C;b<c.length;b++)u(c[b],M,l);return C==2&&Object.keys(k).forEach(function(R){var O=k[R];R==="class"?M.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||R=="value"||R[0]=="$"?M[R]=O:R==="ref"?l&&(l[O]=M):R==="style"?typeof O=="string"&&(M.style.cssText=O):O!=null&&M.setAttribute(R,O)}),o&&o.appendChild(M),M},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,c){return document.createElementNS?document.createElementNS(c||y,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,c){var o=c?c.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var c=u?u.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(u,c){var o=(u.className+"").split(/\s+/g);return o.indexOf(c)!==-1},r.addCssClass=function(u,c){r.hasCssClass(u,c)||(u.className+=" "+c)},r.removeCssClass=function(u,c){for(var o=u.className.split(/\s+/g);;){var l=o.indexOf(c);if(l==-1)break;o.splice(l,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,c){for(var o=u.className.split(/\s+/g),l=!0;;){var d=o.indexOf(c);if(d==-1)break;l=!1,o.splice(d,1)}return l&&o.push(c),u.className=o.join(" "),l},r.setCssClass=function(u,c,o){o?r.addCssClass(u,c):r.removeCssClass(u,c)},r.hasCssString=function(u,c){var o=0,l;if(c=c||document,l=c.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===u)return!0}},r.removeElementById=function(u,c){c=c||document,c.getElementById(u)&&c.getElementById(u).remove()};var x,h=[];r.useStrictCSP=function(u){x=u,u==!1?p():h||(h=[])};function p(){var u=h;h=null,u&&u.forEach(function(c){s(c[0],c[1])})}function s(u,c,o){if(!(typeof document>"u")){if(h){if(o)p();else if(o===!1)return h.push([u,c])}if(!x){var l=o;!o||!o.getRootNode?l=document:(l=o.getRootNode(),(!l||l==o)&&(l=document));var d=l.ownerDocument||l;if(c&&r.hasCssString(c,l))return null;c&&(u+=`
|
2
|
+
/*# sourceURL=ace/css/`+c+" */");var w=r.createElement("style");w.appendChild(d.createTextNode(u)),c&&(w.id=c),l==d&&(l=r.getDocumentHead(d)),l.insertBefore(w,l.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,c){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(c))},r.scrollbarWidth=function(u){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var o=r.createElement("ace_outer"),l=o.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",o.appendChild(c);var d=u&&u.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(o);var w=c.offsetWidth;l.overflow="scroll";var b=c.offsetWidth;return w===b&&(b=o.clientWidth),d.removeChild(o),w-b},r.computedStyle=function(u,c){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,c,o){u[c]!==o&&(u[c]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=g.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,g.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),!g.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,c,o){u.style.transform="translate("+Math.round(c)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,c,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(c)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,m){/*
|
3
|
+
* based on code from:
|
4
|
+
*
|
5
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
6
|
+
* Available via the MIT or new BSD license.
|
7
|
+
* see: http://github.com/jrburke/requirejs for details
|
8
|
+
*/var g=e("./dom");r.get=function(y,x){var h=new XMLHttpRequest;h.open("GET",y,!0),h.onreadystatechange=function(){h.readyState===4&&x(h.responseText)},h.send(null)},r.loadScript=function(y,x){var h=g.getDocumentHead(),p=document.createElement("script");p.src=y,h.appendChild(p),p.onload=p.onreadystatechange=function(s,a){(a||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,a||x())}},r.qualifyURL=function(y){var x=document.createElement("a");return x.href=y,x.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,m){r.inherits=function(g,y){g.super_=y,g.prototype=Object.create(y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(g,y){for(var x in y)g[x]=y[x];return g},r.implement=function(g,y){r.mixin(g,y)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,m){var g={},y=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(h,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],a=this._defaultHandlers[h];if(!(!s.length&&!a)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=h),p.stopPropagation||(p.stopPropagation=y),p.preventDefault||(p.preventDefault=x),s=s.slice();for(var u=0;u<s.length&&(s[u](p,this),!p.propagationStopped);u++);if(a&&!p.defaultPrevented)return a(p,this)}},g._signal=function(h,p){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](p,this)}},g.once=function(h,p){var s=this;if(this.on(h,function a(){s.off(h,a),p.apply(null,arguments)}),!p)return new Promise(function(a){p=a})},g.setDefaultHandler=function(h,p){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var a=s[h],u=s._disabled_[h];u||(s._disabled_[h]=u=[]),u.push(a);var c=u.indexOf(p);c!=-1&&u.splice(c,1)}s[h]=p},g.removeDefaultHandler=function(h,p){var s=this._defaultHandlers;if(s){var a=s._disabled_[h];if(s[h]==p)a&&this.setDefaultHandler(h,a.pop());else if(a){var u=a.indexOf(p);u!=-1&&a.splice(u,1)}}},g.on=g.addEventListener=function(h,p,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];return a||(a=this._eventRegistry[h]=[]),a.indexOf(p)==-1&&a[s?"unshift":"push"](p),p},g.off=g.removeListener=g.removeEventListener=function(h,p){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var a=s.indexOf(p);a!==-1&&s.splice(a,1)}},g.removeAllListeners=function(h){h||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[h]=void 0),this._defaultHandlers&&(this._defaultHandlers[h]=void 0)},r.EventEmitter=g}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,m){r.reportError=function(g,y){var x=new Error(g);x.data=y,typeof console=="object"&&console.error&&console.error(x),setTimeout(function(){throw x})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,m){var g={"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=g}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,r,m){"no use strict";var g=e("./oop"),y=e("./event_emitter").EventEmitter,x=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,p={setOptions:function(o){Object.keys(o).forEach(function(l){this.setOption(l,o[l])},this)},getOptions:function(o){var l={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var d=this.$options;o=Object.keys(d).filter(function(w){return!d[w].hidden})}return o.forEach(function(w){l[w]=this.getOption(w)},this),l},setOption:function(o,l){if(this["$"+o]!==l){var d=this.$options[o];if(!d)return s('misspelled option "'+o+'"');if(d.forwardTo)return this[d.forwardTo]&&this[d.forwardTo].setOption(o,l);d.handlesSet||(this["$"+o]=l),d&&d.set&&d.set.call(this,l)}},getOption:function(o){var l=this.$options[o];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(o):l&&l.get?l.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,c=(function(){function o(){this.$defaultOptions={},a=h,u="dollarSigns"}return o.prototype.defineOptions=function(l,d,w){return l.$options||(this.$defaultOptions[d]=l.$options={}),Object.keys(w).forEach(function(b){var E=w[b];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=b),l.$options[E.name]=E,"initialValue"in E&&(l["$"+E.name]=E.initialValue)}),g.implement(l,p),this},o.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(d){var w=l.$options[d];"value"in w&&l.setOption(d,w.value)})},o.prototype.setDefaultValue=function(l,d,w){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][d])break;if(!this.$defaultOptions[l][d])return!1}var b=this.$defaultOptions[l]||(this.$defaultOptions[l]={});b[d]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,d,w):b[d].value=w)},o.prototype.setDefaultValues=function(l,d){Object.keys(d).forEach(function(w){this.setDefaultValue(l,w,d[w])},this)},o.prototype.setMessages=function(l,d){a=l,d&&d.placeholders&&(u=d.placeholders)},o.prototype.nls=function(l,d,w){a[l]||(s("No message found for the key '"+l+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+d+"'."),a[d]||s("No message found for the default string '"+d+"' in the provided messages. Falling back to the default English message."));var b=a[l]||a[d]||d;return w&&(u==="dollarSigns"&&(b=b.replace(/\$(\$|[\d]+)/g,function(E,M){return M=="$"?"$":w[M]})),u==="curlyBrackets"&&(b=b.replace(/\{([^\}]+)\}/g,function(E,M){return w[M]}))),b},o})();c.prototype.warn=s,c.prototype.reportError=x,g.implement(c.prototype,y),r.AppConfig=c}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-tm .ace_gutter {
|
9
|
+
background: #f0f0f0;
|
10
|
+
color: #333;
|
11
|
+
}
|
12
|
+
|
13
|
+
.ace-tm .ace_print-margin {
|
14
|
+
width: 1px;
|
15
|
+
background: #e8e8e8;
|
16
|
+
}
|
17
|
+
|
18
|
+
.ace-tm .ace_fold {
|
19
|
+
background-color: #6B72E6;
|
20
|
+
}
|
21
|
+
|
22
|
+
.ace-tm {
|
23
|
+
background-color: #FFFFFF;
|
24
|
+
color: black;
|
25
|
+
}
|
26
|
+
|
27
|
+
.ace-tm .ace_cursor {
|
28
|
+
color: black;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ace-tm .ace_invisible {
|
32
|
+
color: rgb(191, 191, 191);
|
33
|
+
}
|
34
|
+
|
35
|
+
.ace-tm .ace_storage,
|
36
|
+
.ace-tm .ace_keyword {
|
37
|
+
color: blue;
|
38
|
+
}
|
39
|
+
|
40
|
+
.ace-tm .ace_constant {
|
41
|
+
color: rgb(197, 6, 11);
|
42
|
+
}
|
43
|
+
|
44
|
+
.ace-tm .ace_constant.ace_buildin {
|
45
|
+
color: rgb(88, 72, 246);
|
46
|
+
}
|
47
|
+
|
48
|
+
.ace-tm .ace_constant.ace_language {
|
49
|
+
color: rgb(88, 92, 246);
|
50
|
+
}
|
51
|
+
|
52
|
+
.ace-tm .ace_constant.ace_library {
|
53
|
+
color: rgb(6, 150, 14);
|
54
|
+
}
|
55
|
+
|
56
|
+
.ace-tm .ace_invalid {
|
57
|
+
background-color: rgba(255, 0, 0, 0.1);
|
58
|
+
color: red;
|
59
|
+
}
|
60
|
+
|
61
|
+
.ace-tm .ace_support.ace_function {
|
62
|
+
color: rgb(60, 76, 114);
|
63
|
+
}
|
64
|
+
|
65
|
+
.ace-tm .ace_support.ace_constant {
|
66
|
+
color: rgb(6, 150, 14);
|
67
|
+
}
|
68
|
+
|
69
|
+
.ace-tm .ace_support.ace_type,
|
70
|
+
.ace-tm .ace_support.ace_class {
|
71
|
+
color: rgb(109, 121, 222);
|
72
|
+
}
|
73
|
+
|
74
|
+
.ace-tm .ace_keyword.ace_operator {
|
75
|
+
color: rgb(104, 118, 135);
|
76
|
+
}
|
77
|
+
|
78
|
+
.ace-tm .ace_string {
|
79
|
+
color: rgb(3, 106, 7);
|
80
|
+
}
|
81
|
+
|
82
|
+
.ace-tm .ace_comment {
|
83
|
+
color: rgb(76, 136, 107);
|
84
|
+
}
|
85
|
+
|
86
|
+
.ace-tm .ace_comment.ace_doc {
|
87
|
+
color: rgb(0, 102, 255);
|
88
|
+
}
|
89
|
+
|
90
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
91
|
+
color: rgb(128, 159, 191);
|
92
|
+
}
|
93
|
+
|
94
|
+
.ace-tm .ace_constant.ace_numeric {
|
95
|
+
color: rgb(0, 0, 205);
|
96
|
+
}
|
97
|
+
|
98
|
+
.ace-tm .ace_variable {
|
99
|
+
color: rgb(49, 132, 149);
|
100
|
+
}
|
101
|
+
|
102
|
+
.ace-tm .ace_xml-pe {
|
103
|
+
color: rgb(104, 104, 91);
|
104
|
+
}
|
105
|
+
|
106
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
107
|
+
color: #0000A2;
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
.ace-tm .ace_heading {
|
112
|
+
color: rgb(12, 7, 255);
|
113
|
+
}
|
114
|
+
|
115
|
+
.ace-tm .ace_list {
|
116
|
+
color:rgb(185, 6, 144);
|
117
|
+
}
|
118
|
+
|
119
|
+
.ace-tm .ace_meta.ace_tag {
|
120
|
+
color:rgb(0, 22, 142);
|
121
|
+
}
|
122
|
+
|
123
|
+
.ace-tm .ace_string.ace_regex {
|
124
|
+
color: rgb(255, 0, 0)
|
125
|
+
}
|
126
|
+
|
127
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
128
|
+
background: rgb(181, 213, 255);
|
129
|
+
}
|
130
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
131
|
+
box-shadow: 0 0 3px 0px white;
|
132
|
+
}
|
133
|
+
.ace-tm .ace_marker-layer .ace_step {
|
134
|
+
background: rgb(252, 255, 0);
|
135
|
+
}
|
136
|
+
|
137
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
138
|
+
background: rgb(164, 229, 101);
|
139
|
+
}
|
140
|
+
|
141
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
142
|
+
margin: -1px 0 0 -1px;
|
143
|
+
border: 1px solid rgb(192, 192, 192);
|
144
|
+
}
|
145
|
+
|
146
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
147
|
+
background: rgba(0, 0, 0, 0.07);
|
148
|
+
}
|
149
|
+
|
150
|
+
.ace-tm .ace_gutter-active-line {
|
151
|
+
background-color : #dcdcdc;
|
152
|
+
}
|
153
|
+
|
154
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
155
|
+
background: rgb(250, 250, 255);
|
156
|
+
border: 1px solid rgb(200, 200, 250);
|
157
|
+
}
|
158
|
+
|
159
|
+
.ace-tm .ace_indent-guide {
|
160
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
161
|
+
}
|
162
|
+
|
163
|
+
.ace-tm .ace_indent-guide-active {
|
164
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
165
|
+
}
|
166
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,m){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var g=e("../lib/dom");g.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,r,m){"no use strict";var g=e("./lib/lang"),y=e("./lib/net"),x=e("./lib/dom"),h=e("./lib/app_config").AppConfig;m.exports=r=new h;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!p.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return p[c]},r.set=function(c,o){if(p.hasOwnProperty(c))p[c]=o;else if(this.setDefaultValue("",c,o)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&x.useStrictCSP(o)},r.all=function(){return g.copyObject(p)},r.$modes={},r.moduleUrl=function(c,o){if(p.$moduleUrls[c])return p.$moduleUrls[c];var l=c.split("/");o=o||l[l.length-2]||"";var d=o=="snippets"?"/":"-",w=l[l.length-1];if(o=="worker"&&d=="-"){var b=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(b,"")}(!w||w==o)&&l.length>1&&(w=l[l.length-2]);var E=p[o+"Path"];return E==null?E=p.basePath:d=="/"&&(o=d=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+d+w+this.get("suffix")},r.setModuleUrl=function(c,o){return p.$moduleUrls[c]=o};var s=function(c,o){if(c==="ace/theme/textmate"||c==="./theme/textmate")return o(null,e("./theme/textmate"));if(a)return a(c,o);console.error("loader is not configured")},a;r.setLoader=function(c){a=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,o){var l;if(Array.isArray(c))var d=c[0],w=c[1];else if(typeof c=="string")var w=c;var b=function(E){if(E&&!r.$loading[w])return o&&o(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var M=function(){s(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var R=r.$loading[w];r.$loading[w]=null,R.forEach(function(O){O&&O(C)})})};if(!r.get("packaged"))return M();y.loadScript(r.moduleUrl(w,d),M),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?b(E.default):b(E)});else{try{l=this.$require(w)}catch{}b(l||r.$loaded[w])}},r.$require=function(c){if(typeof m.require=="function"){var o="require";return m[o](c)}},r.setModuleLoader=function(c,o){r.dynamicModules[c]=o};var u=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,m){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(p,s){e([p],function(a){s(null,a)})});var y=(function(){return this||typeof window<"u"&&window})();m.exports=function(p){g.init=x,g.$require=e,p.require=e},x(!0);function x(p){if(!(!y||!y.document)){g.set("packaged",p||e.packaged||m.packaged||y.define&&(void 0).packaged);var s={},a="",u=document.currentScript||document._currentScript,c=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=c.getElementsByTagName("script"),l=0;l<o.length;l++){var d=o[l],w=d.src||d.getAttribute("src");if(w){for(var b=d.attributes,E=0,M=b.length;E<M;E++){var k=b[E];k.name.indexOf("data-ace-")===0&&(s[h(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.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 R in s)typeof s[R]<"u"&&g.set(R,s[R])}}function h(p){return p.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,m){var g=(function(){function y(x,h,p,s){this.start={row:x,column:h},this.end={row:p,column:s}}return y.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},y.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},y.prototype.contains=function(x,h){return this.compare(x,h)==0},y.prototype.compareRange=function(x){var h,p=x.end,s=x.start;return h=this.compare(p.row,p.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},y.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},y.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},y.prototype.intersects=function(x){var h=this.compareRange(x);return h==-1||h==0||h==1},y.prototype.isEnd=function(x,h){return this.end.row==x&&this.end.column==h},y.prototype.isStart=function(x,h){return this.start.row==x&&this.start.column==h},y.prototype.setStart=function(x,h){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=h)},y.prototype.setEnd=function(x,h){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=h)},y.prototype.inside=function(x,h){return this.compare(x,h)==0?!(this.isEnd(x,h)||this.isStart(x,h)):!1},y.prototype.insideStart=function(x,h){return this.compare(x,h)==0?!this.isEnd(x,h):!1},y.prototype.insideEnd=function(x,h){return this.compare(x,h)==0?!this.isStart(x,h):!1},y.prototype.compare=function(x,h){return!this.isMultiLine()&&x===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?h>=this.start.column?0:-1:this.end.row===x?h<=this.end.column?0:1:0},y.prototype.compareStart=function(x,h){return this.start.row==x&&this.start.column==h?-1:this.compare(x,h)},y.prototype.compareEnd=function(x,h){return this.end.row==x&&this.end.column==h?1:this.compare(x,h)},y.prototype.compareInside=function(x,h){return this.end.row==x&&this.end.column==h?1:this.start.row==x&&this.start.column==h?-1:this.compare(x,h)},y.prototype.clipRows=function(x,h){if(this.end.row>h)var p={row:h+1,column:0};else if(this.end.row<x)var p={row:x,column:0};if(this.start.row>h)var s={row:h+1,column:0};else if(this.start.row<x)var s={row:x,column:0};return y.fromPoints(s||this.start,p||this.end)},y.prototype.extend=function(x,h){var p=this.compare(x,h);if(p==0)return this;if(p==-1)var s={row:x,column:h};else var a={row:x,column:h};return y.fromPoints(s||this.start,a||this.end)},y.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},y.prototype.isMultiLine=function(){return this.start.row!==this.end.row},y.prototype.clone=function(){return y.fromPoints(this.start,this.end)},y.prototype.collapseRows=function(){return this.end.column==0?new y(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new y(this.start.row,0,this.end.row,0)},y.prototype.toScreenRange=function(x){var h=x.documentToScreenPosition(this.start),p=x.documentToScreenPosition(this.end);return new y(h.row,h.column,p.row,p.column)},y.prototype.moveBy=function(x,h){this.start.row+=x,this.start.column+=h,this.end.row+=x,this.end.column+=h},y})();g.fromPoints=function(y,x){return new g(y.row,y.column,x.row,x.column)},g.comparePoints=function(y,x){return y.row-x.row||y.column-x.column},r.Range=g}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,m){for(var g=e("./oop"),y={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},x={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},h=0;h<10;h++)x["Digit"+h]=48+h,x["Numpad"+h]=96+h,y.PRINTABLE_KEYS[48+h]=""+h,y.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var p=String.fromCharCode(h+32);x["Key"+p.toUpperCase()]=h,y.PRINTABLE_KEYS[h]=p}for(var h=1;h<13;h++)x["F"+h]=111+h,y.FUNCTION_KEYS[111+h]="F"+h;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var a in s)x[a]=x[a+"Left"]=x[a+"Right"]=s[a];r.$codeToKeyCode=x,y.PRINTABLE_KEYS[173]="-";for(var u in y.FUNCTION_KEYS){var c=y.FUNCTION_KEYS[u].toLowerCase();y[c]=parseInt(u,10)}for(var u in y.PRINTABLE_KEYS){var c=y.PRINTABLE_KEYS[u].toLowerCase();y[c]=parseInt(u,10)}g.mixin(y,y.MODIFIER_KEYS),g.mixin(y,y.PRINTABLE_KEYS),g.mixin(y,y.FUNCTION_KEYS),y.enter=y.return,y.escape=y.esc,y.del=y.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)y.KEY_MODS[l]=o.filter(function(d){return l&y.KEY_MODS[d]}).join("-")+"-"})(),y.KEY_MODS[0]="",y.KEY_MODS[-1]="input-",g.mixin(r,y),r.default=r,r.keyCodeToString=function(o){var l=y[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var g=e("./keys"),y=e("./useragent"),x=null,h=0,p;function s(){p=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return p={passive:!1},!0}})}catch{}}function a(){return p==null&&s(),p}function u(E,M,k){this.elem=E,this.type=M,this.callback=k}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(E,M,k,C){E.addEventListener(M,k,a()),C&&C.$toDestroy.push(new u(E,M,k))},o=r.removeListener=function(E,M,k){E.removeEventListener(M,k,a())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||y.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,M,k){var C=E&&E.ownerDocument||document;function R(O){M&&M(O),k&&k(O),o(C,"mousemove",M),o(C,"mouseup",R),o(C,"dragstart",R)}return c(C,"mousemove",M),c(C,"mouseup",R),c(C,"dragstart",R),R},r.addMouseWheelListener=function(E,M,k){c(E,"wheel",function(C){var R=.15,O=C.deltaX||0,L=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=O*R,C.wheelY=L*R;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=O*I,C.wheelY=L*I;break;case C.DOM_DELTA_PAGE:var z=150;C.wheelX=O*z,C.wheelY=L*z;break}M(C)},k)},r.addMultiMouseDownListener=function(E,M,k,C,R){var O=0,L,I,z,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function N(_){if(r.getButton(_)!==0?O=0:_.detail>1?(O++,O>4&&(O=1)):O=1,y.isIE){var S=Math.abs(_.clientX-L)>5||Math.abs(_.clientY-I)>5;(!z||S)&&(O=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},M[O-1]||600),O==1&&(L=_.clientX,I=_.clientY)}if(_._clicks=O,k[C]("mousedown",_),O>4)O=0;else if(O>1)return k[C](P[O],_)}Array.isArray(E)||(E=[E]),E.forEach(function(_){c(_,"mousedown",N,R)})};function l(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return g.KEY_MODS[l(E)]};function d(E,M,k){var C=l(M);if(!k&&M.code&&(k=g.$codeToKeyCode[M.code]||k),!y.isMac&&x){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(C|=8),x.altGr)if((3&C)!=3)x.altGr=0;else return;if(k===18||k===17){var R=M.location;if(k===17&&R===1)x[k]==1&&(h=M.timeStamp);else if(k===18&&C===3&&R===2){var O=M.timeStamp-h;O<50&&(x.altGr=!0)}}}if(k in g.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&M.location===3&&(E(M,C,-k),M.defaultPrevented))){if(y.isChromeOS&&C&8){if(E(M,C,k),M.defaultPrevented)return;C&=-9}return!C&&!(k in g.FUNCTION_KEYS)&&!(k in g.PRINTABLE_KEYS)?!1:E(M,C,k)}}r.addCommandKeyListener=function(E,M,k){var C=null;c(E,"keydown",function(R){x[R.keyCode]=(x[R.keyCode]||0)+1;var O=d(M,R,R.keyCode);return C=R.defaultPrevented,O},k),c(E,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},k),c(E,"keyup",function(R){x[R.keyCode]=null},k),x||(w(),c(window,"focus",w))};function w(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!y.isOldIE){var b=1;r.nextTick=function(E,M){M=M||window;var k="zero-timeout-message-"+b++,C=function(R){R.data==k&&(r.stopPropagation(R),o(M,"message",C),E())};c(M,"message",C),M.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,M){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):E()},M)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||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(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,m){var g;m.exports={lineMode:!1,pasteCancelled:function(){return g&&g>Date.now()-50?!0:g=!1},cancel:function(){g=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,m){var g=e("../lib/event"),y=e("../config").nls,x=e("../lib/useragent"),h=e("../lib/dom"),p=e("../lib/lang"),s=e("../clipboard"),a=x.isChrome<18,u=x.isIE,c=x.isChrome>63,o=400,l=e("../lib/keys"),d=l.KEY_MODS,w=x.isIOS,b=w?/\s/:/\n/,E=x.isMobile,M=(function(){function k(C,R){var O=this;this.host=R,this.text=h.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="",E||(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"}),g.addListener(this.text,"blur",function(L){O.ignoreFocusEvents||(R.onBlur(L),O.$isFocused=!1)},R),g.addListener(this.text,"focus",function(L){if(!O.ignoreFocusEvents){if(O.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(L),x.isEdge?setTimeout(O.resetSelection.bind(O)):O.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var L=R.curOp,I=L&&L.command&&L.command.name;if(I!="insertstring"){var z=I&&(L.docChanged||L.selectionChanged);O.inComposition&&z&&(O.lastValue=O.text.value="",O.onCompositionEnd()),O.resetSelection()}}),R.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&R.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,g.addCommandKeyListener(this.text,function(L,I,z){if(!O.inComposition)return R.onCommandKey(L,I,z)},R),g.addListener(this.text,"select",this.onSelect.bind(this),R),g.addListener(this.text,"input",this.onInput.bind(this),R),g.addListener(this.text,"cut",this.onCut.bind(this),R),g.addListener(this.text,"copy",this.onCopy.bind(this),R),g.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&g.addListener(C,"keydown",function(L){if(!(x.isMac&&!L.metaKey||!L.ctrlKey))switch(L.keyCode){case 67:O.onCopy(L);break;case 86:O.onPaste(L);break;case 88:O.onCut(L);break}},R),this.syncComposition=p.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),g.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),g.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),g.addListener(this.text,"keyup",this.onKeyup.bind(this),R),g.addListener(this.text,"keydown",this.syncComposition.bind(this),R),g.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,g.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),g.addListener(this.text,"mousedown",function(L){L.preventDefault(),O.onContextMenuClose()},R),g.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),g.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),w&&this.addIosSelectionHandler(C,R,this.text)}return k.prototype.addIosSelectionHandler=function(C,R,O){var L=this,I=null,z=!1;O.addEventListener("keydown",function(N){I&&clearTimeout(I),z=!0},!0),O.addEventListener("keyup",function(N){I=setTimeout(function(){z=!1},100)},!0);var P=function(N){if(document.activeElement===O&&!(z||L.inComposition||R.$mouseHandler.isMousePressed)&&!L.copied){var _=O.selectionStart,S=O.selectionEnd,D=null,j=0;if(_==0?D=l.up:_==1?D=l.home:S>L.lastSelectionEnd&&L.lastValue[S]==`
|
167
|
+
`?D=l.end:_<L.lastSelectionStart&&L.lastValue[_-1]==" "?(D=l.left,j=d.option):_<L.lastSelectionStart||_==L.lastSelectionStart&&L.lastSelectionEnd!=L.lastSelectionStart&&_==S?D=l.left:S>L.lastSelectionEnd&&L.lastValue.slice(0,S).split(`
|
168
|
+
`).length>2?D=l.down:S>L.lastSelectionEnd&&L.lastValue[S-1]==" "?(D=l.right,j=d.option):(S>L.lastSelectionEnd||S==L.lastSelectionEnd&&L.lastSelectionEnd!=L.lastSelectionStart&&_==S)&&(D=l.right),_!==S&&(j|=d.shift),D){var U=R.onCommandKey({},j,D);if(!U&&R.commands){D=l.keyCodeToString(D);var G=R.commands.findKeyCommand(j,D);G&&R.execCommand(G)}L.lastSelectionStart=_,L.lastSelectionEnd=S,L.resetSelection("")}}};document.addEventListener("selectionchange",P),R.on("destroy",function(){document.removeEventListener("selectionchange",P)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var R=this.host.getSelectionRange();R.end.row=R.start.row,R.end.column=R.start.column,this.inComposition.markerRange=R,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var R=this.handleClipboardData(C);s.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,C),x.isIE&&setTimeout(this.resetSelection),g.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,R){var O=this,L=this.host.getCopyText();if(!L)return g.preventDefault(C);this.handleClipboardData(C,L)?(w&&(this.resetSelection(L),this.copied=L,setTimeout(function(){O.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),g.preventDefault(C)):(this.copied=!0,this.text.value=L,this.text.select(),setTimeout(function(){O.copied=!1,O.resetSelection(),R?O.host.onCut():O.host.onCopy()}))},k.prototype.handleClipboardData=function(C,R,O){var L=C.clipboardData||window.clipboardData;if(!(!L||a)){var I=u||O?"Text":"text/plain";try{return R?L.setData(I,R)!==!1:L.getData(I)}catch(z){if(!O)return this.handleClipboardData(z,R,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var R=this.text.value,O=this.sendText(R,!0);(R.length>o+100||b.test(O)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(C,R){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var O=this.text.selectionStart,L=this.text.selectionEnd,I=this.lastSelectionStart,z=this.lastValue.length-this.lastSelectionEnd,P=C,N=C.length-O,_=C.length-L,S=0;I>0&&this.lastValue[S]==C[S];)S++,I--;for(P=P.slice(S),S=1;z>0&&this.lastValue.length-S>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-S]==C[C.length-S];)S++,z--;N-=S-1,_-=S-1;var D=P.length-S+1;if(D<0&&(I=-D,D=0),P=P.slice(0,D),!R&&!P&&!N&&!I&&!z&&!_)return"";this.sendingText=!0;var j=!1;return x.isAndroid&&P==". "&&(P=" ",j=!0),P&&!I&&!z&&!N&&!_||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:I,extendRight:z,restoreStart:N,restoreEnd:_}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=O,this.lastSelectionEnd=L,this.lastRestoreEnd=_,j?`
|
169
|
+
`:P},k.prototype.onSelect=function(C){var R=this;if(!this.inComposition){var O=function(L){return L.selectionStart===0&&L.selectionEnd>=R.lastValue.length&&L.value===R.lastValue&&R.lastValue&&L.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:O(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var R=`
|
170
|
+
ab`+C+`cde fg
|
171
|
+
`;R!=this.text.value&&(this.text.value=this.lastValue=R);var O=4,L=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=O||this.lastSelectionEnd!=L)&&this.text.setSelectionRange(O,L),this.lastSelectionStart=O,this.lastSelectionEnd=L}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,O=0,L="",I=function(G,Z){for(var te=Z,he=1;he<=G-C.rowStart&&he<2*C.numberOfExtraLines+1;he++)te+=C.host.session.getLine(G-he).length+1;return te};if(this.host.session){var z=this.host.selection,P=z.getRange(),N=z.cursor.row;N===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):N===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(N<this.rowStart-1||N>this.rowEnd+1)&&(this.rowStart=N>this.numberOfExtraLines?N-this.numberOfExtraLines:0,this.rowEnd=N>this.numberOfExtraLines?N+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var _=[],S=this.rowStart;S<=this.rowEnd;S++)_.push(this.host.session.getLine(S));if(L=_.join(`
|
172
|
+
`),R=I(P.start.row,P.start.column),O=I(P.end.row,P.end.column),P.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);R=P.start.row<this.rowStart-1?0:R,O+=D.length+1,L=D+`
|
173
|
+
`+L}else if(P.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);O=P.end.row>this.rowEnd+1?j.length:P.end.column,O+=L.length+1,L=L+`
|
174
|
+
`+j}else E&&N>0&&(L=`
|
175
|
+
`+L,O+=1,R+=1);L.length>o&&(R<o&&O<o?L=L.slice(0,o):(L=`
|
176
|
+
`,R==O?R=O=0:(R=0,O=1)));var U=L+`
|
177
|
+
|
178
|
+
`;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!=O||this.lastSelectionStart!=R||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(R,O),this.lastSelectionStart=R,this.lastSelectionEnd=O}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;C+=y("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",y("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||c||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var R=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var O=this.text.getBoundingClientRect().top!=0}catch{return}var L=[];if(O)for(var I=this.text.parentElement;I&&I.nodeType==1;)L.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),O&&L.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=R)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,R){var O=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(R?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var L=this.host.container.getBoundingClientRect(),I=h.computedStyle(this.host.container),z=L.top+(parseInt(I.borderTopWidth)||0),P=L.left+(parseInt(I.borderLeftWidth)||0),N=L.bottom-z-this.text.clientHeight-2,_=function(S){h.translate(O.text,S.clientX-P-2,Math.min(S.clientY-z-2,N))};_(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&g.capture(this.host.container,_,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();r.TextInput=M,r.$setUserAgentForTests=function(k,C){E=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,m){var g=e("../lib/useragent"),y=0,x=550,h=(function(){function a(u){u.$clickSelection=null;var c=u.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){u[l]=this[l]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var c=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var l=this.editor,d=u.getButton();if(d!==0){var w=l.getSelectionRange(),b=w.isEmpty();(b||d==1)&&l.selection.moveToPosition(o),d==2&&(l.textInput.onContextMenu(u.domEvent),g.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,c){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):c||o.selection.moveToPosition(u),c||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,c=this.editor,o=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)u=this.$clickSelection.end;else if(l==1)u=this.$clickSelection.start;else{var d=s(this.$clickSelection,o);o=d.cursor,u=d.anchor}c.selection.setSelectionAnchor(u.row,u.column)}c.selection.selectToPosition(o),c.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var c,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),d=o.selection[u](l.row,l.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),b=this.$clickSelection.comparePoint(d.end);if(w==-1&&b<=0)c=this.$clickSelection.end,(d.end.row!=l.row||d.end.column!=l.column)&&(l=d.start);else if(b==1&&w>=0)c=this.$clickSelection.start,(d.start.row!=l.row||d.start.column!=l.column)&&(l=d.end);else if(w==-1&&b==1)l=d.end,c=d.start;else{var E=s(this.$clickSelection,l);l=E.cursor,c=E.anchor}o.selection.setSelectionAnchor(c.row,c.column)}o.selection.selectToPosition(l),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(u>y||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var c=u.getDocumentPosition(),o=this.editor,l=o.session,d=l.getBracketRange(c);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=o.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},a.prototype.onTripleClick=function(u){var c=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var l=o.getSelectionRange();l.isMultiLine()&&l.contains(c.row,c.column)?(this.$clickSelection=o.selection.getLineRange(l.start.row),this.$clickSelection.end=o.selection.getLineRange(l.end.row).end):this.$clickSelection=o.selection.getLineRange(c.row),this.select()},a.prototype.onQuadClick=function(u){var c=this.editor;c.selectAll(),this.$clickSelection=c.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 c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=u.domEvent.timeStamp,d=l-o.t,w=d?u.wheelX/d:o.vx,b=d?u.wheelY/d:o.vy;d<x&&(w=(w+o.vx)/2,b=(b+o.vy)/2);var E=Math.abs(w/b),M=!1;if(E>=1&&c.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(M=!0),E<=1&&c.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(M=!0),M)o.allowed=l;else if(l-o.allowed<x){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);k?(M=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=w,o.vy=b,M)return c.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function p(a,u,c,o){return Math.sqrt(Math.pow(c-a,2)+Math.pow(o-u,2))}function s(a,u){if(a.start.row==a.end.row)var c=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 c=u.column-4;else var c=2*u.row-a.start.row-a.end.row;return c<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,m){r.preventParentScroll=function(g){g.stopPropagation();var y=g.currentTarget,x=y.scrollHeight>y.clientHeight;x||g.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,m){var g=this&&this.__extends||(function(){var l=function(d,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(b[M]=E[M])},l(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}})(),y=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&l[d],b=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&b>=l.length&&(l=void 0),{value:l&&l[b++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var h=e("./range").Range,p=e("./lib/scroll").preventParentScroll,s="ace_tooltip",a=(function(){function l(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return l.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(d){this.getElement().textContent=d},l.prototype.setHtml=function(d){this.getElement().innerHTML=d},l.prototype.setPosition=function(d,w){var b=this.getElement(),E=b.offsetParent&&b.offsetParent.getBoundingClientRect();b.style.left=d-(E?E.left:0)+"px",b.style.top=w-(E?E.top:0)+"px"},l.prototype.setClassName=function(d){x.addCssClass(this.getElement(),d)},l.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},l.prototype.show=function(d,w,b){d!=null&&this.setText(d),w!=null&&b!=null&&this.setPosition(w,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l})(),u=(function(){function l(){this.popups=[]}return l.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},l.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},l.prototype.updatePopups=function(){var d,w,b,E;this.popups.sort(function(P,N){return N.priority-P.priority});var M=[];try{for(var k=y(this.popups),C=k.next();!C.done;C=k.next()){var R=C.value,O=!0;try{for(var L=(b=void 0,y(M)),I=L.next();!I.done;I=L.next()){var z=I.value;if(this.doPopupsOverlap(z,R)){O=!1;break}}}catch(P){b={error:P}}finally{try{I&&!I.done&&(E=L.return)&&E.call(L)}finally{if(b)throw b.error}}O?M.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(d)throw d.error}}},l.prototype.doPopupsOverlap=function(d,w){var b=d.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return b.left<E.right&&b.right>E.left&&b.top<E.bottom&&b.bottom>E.top},l})(),c=new u;r.popupManager=c,r.Tooltip=a;var o=(function(l){g(d,l);function d(w){w===void 0&&(w=document.body);var b=l.call(this,w)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var E=b.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",b.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(b)),E.addEventListener("wheel",p),b}return d.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(w,b){this.lastEvent=w,this.lastT=Date.now();var E=b.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},d.prototype.isOutsideOfText=function(w){var b=w.editor,E=w.getDocumentPosition(),M=b.session.getLine(E.row);if(E.column==M.length){var k=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(E.row,E.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,b,E,M){var k=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(b,w.session),this.range=h.fromPoints(b.start,b.end);var R=C.textToScreenCoordinates(b.start.row,b.start.column),O=C.scroller.getBoundingClientRect();R.pageX<O.left&&(R.pageX=O.left);var L=this.getElement();L.innerHTML="",L.appendChild(E),L.style.maxHeight="",L.style.display="block";var I=L.clientHeight,z=L.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,N=!0;R.pageY-I<0&&R.pageY<P&&(N=!1),L.style.maxHeight=(N?R.pageY:P)-k+"px",L.style.top=N?"":R.pageY+C.lineHeight+"px",L.style.bottom=N?window.innerHeight-R.pageY+"px":"",L.style.left=Math.min(R.pageX,window.innerWidth-z-k)+"px"}},d.prototype.addMarker=function(w,b){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=b,this.marker=b&&b.addMarker(w,"ace_highlight-marker","text")},d.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},d})(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,m){var g=this&&this.__extends||(function(){var l=function(d,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(b[M]=E[M])},l(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}})(),y=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&l[d],b=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&b>=l.length&&(l=void 0),{value:l&&l[b++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),h=e("../lib/event"),p=e("../tooltip").Tooltip,s=e("../config").nls,a=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function c(l){var d=l.editor,w=d.renderer.$gutterLayer,b=new o(d,!0);l.editor.setDefaultHandler("guttermousedown",function(O){if(!(!d.isFocused()||O.getButton()!=0)){var L=w.getRegion(O);if(L!="foldWidgets"){var I=O.getDocumentPosition().row,z=d.session.selection;if(O.getShiftKey())z.selectTo(I,0);else{if(O.domEvent.detail==2)return d.selectAll(),O.preventDefault();l.$clickSelection=d.selection.getLineRange(I)}return l.setState("selectByLines"),l.captureMouse(O),O.preventDefault()}}});var E,M;function k(){var O=M.getDocumentPosition().row,L=d.session.getLength();if(O==L){var I=d.renderer.pixelToScreenCoordinates(0,M.y).row,z=M.$pos;if(I>d.session.documentToScreenRow(z.row,z.column))return C()}if(b.showTooltip(O),!!b.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),l.$tooltipFollowsMouse)R(M);else{var P=M.getGutterRow(),N=w.$lines.get(P);if(N){var _=N.element.querySelector(".ace_gutter_annotation"),S=_.getBoundingClientRect(),D=b.getElement().style;D.left=S.right-a+"px",D.top=S.bottom-u+"px"}else R(M)}}function C(O){O&&O.type==="keydown"&&(O.ctrlKey||O.metaKey)||O&&O.type==="mouseout"&&(!O.relatedTarget||b.getElement().contains(O.relatedTarget))||(E&&(E=clearTimeout(E)),b.isOpen&&(b.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(O){b.setPosition(O.x,O.y)}l.editor.setDefaultHandler("guttermousemove",function(O){var L=O.domEvent.target||O.domEvent.srcElement;if(x.hasCssClass(L,"ace_fold-widget")||x.hasCssClass(L,"ace_custom-widget"))return C();b.isOpen&&l.$tooltipFollowsMouse&&R(O),M=O,!E&&(E=setTimeout(function(){E=null,M&&!l.isMousePressed&&k()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(O){M=null,b.isOpen&&(E=setTimeout(function(){E=null,C(O)},50))},d)}r.GutterHandler=c;var o=(function(l){g(d,l);function d(w,b){b===void 0&&(b=!1);var E=l.call(this,w.container)||this;E.id="gt"+ ++d.$uid,E.editor=w,E.visibleTooltipRow;var M=E.getElement();return M.setAttribute("role","tooltip"),M.setAttribute("id",E.id),M.style.pointerEvents="auto",b&&(E.onMouseOut=E.onMouseOut.bind(E),M.addEventListener("mouseout",E.onMouseOut)),E}return d.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},d.prototype.setPosition=function(w,b){var E=window.innerWidth||document.documentElement.clientWidth,M=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+k>E&&(w-=w+k-E),b+C>M&&(b-=20+C),p.prototype.setPosition.call(this,w,b)},Object.defineProperty(d,"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}),d.prototype.showTooltip=function(w){var b,E=this.editor.renderer.$gutterLayer,M=E.$annotations[w],k;M?k={displayText:Array.from(M.displayText),type:Array.from(M.type)}:k={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},L,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var z=0;z<E.$annotations[I].text.length;z++){var P=E.$annotations[I].type[z];R[P].push(E.$annotations[I].text[z]),(!L||O[P]<O[L])&&(L=P)}if(["error","security","warning"].includes(L)){var N="".concat(d.annotationsToSummaryString(R)," in folded code.");k.displayText.push(N),k.type.push(L+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var _={error:[],security:[],warning:[],info:[],hint:[]},S=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var D=x.createElement("span"),j=x.createElement("span");(b=j.classList).add.apply(b,["ace_".concat(k.type[I]),S]),j.setAttribute("aria-label","".concat(d.annotationLabels[k.type[I].replace("_fold","")].singular)),j.setAttribute("role","img"),j.appendChild(x.createTextNode(" ")),D.appendChild(j),D.appendChild(x.createTextNode(k.displayText[I])),D.appendChild(x.createElement("br")),_[k.type[I].replace("_fold","")].push(D)}var U=this.getElement();x.removeChildren(U),_.error.forEach(function(Z){return U.appendChild(Z)}),_.security.forEach(function(Z){return U.appendChild(Z)}),_.warning.forEach(function(Z){return U.appendChild(Z)}),_.info.forEach(function(Z){return U.appendChild(Z)}),_.hint.forEach(function(Z){return U.appendChild(Z)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var G=this.$findLinkedAnnotationNode(w);G&&G.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.$findLinkedAnnotationNode=function(w){var b=this.$findCellByRow(w);if(b){var E=b.element;if(E.childNodes.length>2)return E.childNodes[2]}},d.prototype.$findCellByRow=function(w){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===w})},d.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},d.annotationsToSummaryString=function(w){var b,E,M=[],k=["error","security","warning","info","hint"];try{for(var C=y(k),R=C.next();!R.done;R=C.next()){var O=R.value;if(w[O].length){var L=w[O].length===1?d.annotationLabels[O].singular:d.annotationLabels[O].plural;M.push("".concat(w[O].length," ").concat(L))}}}catch(I){b={error:I}}finally{try{R&&!R.done&&(E=C.return)&&E.call(C)}finally{if(b)throw b.error}}return M.join(", ")},d})(p);o.$uid=0,r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var g=e("../lib/event"),y=e("../lib/useragent"),x=(function(){function h(p,s){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=s,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){g.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(p,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,s=p.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return g.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return y.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h})();r.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,m){var g=e("../lib/dom"),y=e("../lib/event"),x=e("../lib/useragent"),h=200,p=200,s=5;function a(c){var o=c.editor,l=g.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(ne){c[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(c));var w=o.container,b,E,M,k,C,R,O=0,L,I,z,P,N;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(l),ue.setDragImage&&ue.setDragImage(l,0,0),setTimeout(function(){o.container.removeChild(l)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var le=ne.dataTransfer.dropEffect;!L&&le=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,M=ne.clientY,b||j(),O++,ne.dataTransfer.dropEffect=L=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,M=ne.clientY,b||(j(),O++),G!==null&&(G=null),ne.dataTransfer.dropEffect=L=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&b)return U(),L=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var le=ne.dataTransfer;if(I)switch(L){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=o.moveText(C,R);break;case"copy":C=o.moveText(C,R,!0);break}else{var ue=le.getData("Text");C={start:R,end:o.session.insert(R,ue)},o.focus(),L=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(c),o),y.addListener(w,"dragend",this.onDragEnd.bind(c),o),y.addListener(w,"dragenter",this.onDragEnter.bind(c),o),y.addListener(w,"dragover",this.onDragOver.bind(c),o),y.addListener(w,"dragleave",this.onDragLeave.bind(c),o),y.addListener(w,"drop",this.onDrop.bind(c),o);function _(ne,le){var ue=Date.now(),ce=!le||ne.row!=le.row,fe=!le||ne.column!=le.column;if(!P||ce||fe)o.moveCursorToPosition(ne),P=ue,N={x:E,y:M};else{var _e=u(N.x,N.y,E,M);_e>s?P=null:ue-P>=p&&(o.renderer.scrollCursorIntoView(),P=null)}}function S(ne,le){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,_e=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:E-_e.left,right:_e.right-E},y:{top:M-_e.top,bottom:_e.bottom-M}},Te=Math.min($e.x.left,$e.x.right),Ge=Math.min($e.y.top,$e.y.bottom),Ve={row:ne.row,column:ne.column};Te/fe<=2&&(Ve.column+=$e.x.left<$e.x.right?-3:2),Ge/ce<=1&&(Ve.row+=$e.y.top<$e.y.bottom?-1:1);var ct=ne.row!=Ve.row,Je=ne.column!=Ve.column,dt=!le||ne.row!=le.row;ct||Je&&!dt?z?ue-z>=h&&o.renderer.scrollCursorIntoView(Ve):z=ue:z=null}function D(){var ne=R;R=o.renderer.screenToTextCoordinates(E,M),_(R,ne),S(R,ne)}function j(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),O=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(k),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,R=null,O=0,z=null,P=null,y.removeListener(document,"mousemove",Z)}var G=null;function Z(){G==null&&(G=setTimeout(function(){G!=null&&b&&U()},20))}function te(ne){var le=ne.types;return!le||Array.prototype.some.call(le,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var le=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=x.isMac?ne.altKey:ne.ctrlKey,fe="uninitialized";try{fe=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return ce&&le.indexOf(fe)>=0?_e="copy":ue.indexOf(fe)>=0?_e="move":le.indexOf(fe)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,o=c.container;o.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var l=x.isWin?"default":"move";c.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(c){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var o=this.editor,l=c.inSelection(),d=c.getButton(),w=c.domEvent.detail||1;if(w===1&&d===0&&l){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(a.prototype);function u(c,o,l,d){return Math.sqrt(Math.pow(l-c,2)+Math.pow(d-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,m){var g=e("./mouse_event").MouseEvent,y=e("../lib/event"),x=e("../lib/dom");r.addTouchListeners=function(h,p){var s="scroll",a,u,c,o,l,d,w=0,b,E=0,M=0,k=0,C,R;function O(){var _=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var G=p.getCopyText(),Z=p.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(S?["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"],_&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&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"]),R.firstChild)},j=function(G){return p.commands.canExecute(G,p)},U=function(G){var Z=G.target.getAttribute("action");if(Z=="more"||!S)return S=!S,D();Z=="paste"?_.readText().then(function(te){p.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(_?_.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(Z)),R.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&p.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(G){s="menu",G.stopPropagation(),G.preventDefault(),p.textInput.focus()},ontouchend:function(G){G.stopPropagation(),G.preventDefault(),U(G)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function L(){if(!p.getOption("enableMobileMenu")){R&&I();return}R||O();var _=p.selection.cursor,S=p.renderer.textToScreenCoordinates(_.row,_.column),D=p.renderer.textToScreenCoordinates(0,0).pageX,j=p.renderer.scrollLeft,U=p.container.getBoundingClientRect();R.style.top=S.pageY-U.top-3+"px",S.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=D+j-U.left+"px"),R.style.display="",R.firstChild.style.display="none",p.on("input",I)}function I(_){R&&(R.style.display="none"),p.off("input",I)}function z(){l=null,clearTimeout(l);var _=p.selection.getRange(),S=_.contains(b.row,b.column);(_.isEmpty()||!S)&&(p.selection.moveToPosition(b),p.selection.selectWord()),s="wait",L()}function P(){l=null,clearTimeout(l),p.selection.moveToPosition(b);var _=E>=2?p.selection.getLineRange(b.row):p.session.getBracketRange(b);_&&!_.isEmpty()?p.selection.setRange(_):p.selection.selectWord(),s="wait"}y.addListener(h,"contextmenu",function(_){if(C){var S=p.textInput.getElement();S.focus()}},p),y.addListener(h,"touchstart",function(_){var S=_.touches;if(l||S.length>1){clearTimeout(l),l=null,c=-1,s="zoom";return}C=p.$mouseHandler.isMousePressed=!0;var D=p.renderer.layerConfig.lineHeight,j=p.renderer.layerConfig.lineHeight,U=_.timeStamp;o=U;var G=S[0],Z=G.clientX,te=G.clientY;Math.abs(a-Z)+Math.abs(u-te)>D&&(c=-1),a=_.clientX=Z,u=_.clientY=te,M=k=0;var he=new g(_,p);if(b=he.getDocumentPosition(),U-c<500&&S.length==1&&!w)E++,_.preventDefault(),_.button=0,P();else{E=0;var ne=p.selection.cursor,le=p.selection.isEmpty()?ne:p.selection.anchor,ue=p.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=p.renderer.$cursorLayer.getPixelPosition(le,!0),fe=p.renderer.scroller.getBoundingClientRect(),_e=p.renderer.layerConfig.offset,$e=p.renderer.scrollLeft,Te=function(ct,Je){return ct=ct/j,Je=Je/D-.75,ct*ct+Je*Je};if(_.clientX<fe.left){s="zoom";return}var Ge=Te(_.clientX-fe.left-ue.left+$e,_.clientY-fe.top-ue.top+_e),Ve=Te(_.clientX-fe.left-ce.left+$e,_.clientY-fe.top-ce.top+_e);Ge<3.5&&Ve<3.5&&(s=Ge>Ve?"cursor":"anchor"),Ve<3.5?s="anchor":Ge<3.5?s="cursor":s="scroll",l=setTimeout(z,450)}c=U},p),y.addListener(h,"touchend",function(_){C=p.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):l?(p.selection.moveToPosition(b),w=0,L()):s=="scroll"?(N(),I()):L(),clearTimeout(l),l=null},p),y.addListener(h,"touchmove",function(_){l&&(clearTimeout(l),l=null);var S=_.touches;if(!(S.length>1||s=="zoom")){var D=S[0],j=a-D.clientX,U=u-D.clientY;if(s=="wait")if(j*j+U*U>4)s="cursor";else return _.preventDefault();a=D.clientX,u=D.clientY,_.clientX=D.clientX,_.clientY=D.clientY;var G=_.timeStamp,Z=G-o;if(o=G,s=="scroll"){var te=new g(_,p);te.speed=1,te.wheelX=j,te.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Z!=0&&(M=j/Z,k=U/Z),p._emit("mousewheel",te),te.propagationStopped||(M=k=0)}else{var he=new g(_,p),ne=he.getDocumentPosition();s=="cursor"?p.selection.moveCursorToPosition(ne):s=="anchor"&&p.selection.setSelectionAnchor(ne.row,ne.column),p.renderer.scrollCursorIntoView(ne),_.preventDefault()}}},p);function N(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs(M)<.01&&(M=0),Math.abs(k)<.01&&(k=0),w<20&&(M=.9*M),w<20&&(k=.9*k);var _=p.session.getScrollTop();p.renderer.scrollBy(10*M,10*k),_==p.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,m){var g=e("../lib/event"),y=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,p=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),c=(function(){function o(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=l,new x(this),new h(this),new s(this);var w=function(M){var k=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());k&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},b=l.renderer.getMouseEventTarget();g.addListener(b,"click",this.onMouseEvent.bind(this,"click"),l),g.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),g.addMultiMouseDownListener([b,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),g.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),a(l.container,l);var E=l.renderer.$gutter;g.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),g.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),l),g.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),g.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),g.addListener(b,"mousedown",w,l),g.addListener(E,"mousedown",w,l),y.isIE&&l.renderer.scrollBarV&&(g.addListener(l.renderer.scrollBarV.element,"mousedown",w,l),g.addListener(l.renderer.scrollBarH.element,"mousedown",w,l)),l.on("mousemove",function(M){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var k=l.renderer.screenToTextCoordinates(M.x,M.y),C=l.session.selection.getRange(),R=l.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},l)}return o.prototype.onMouseEvent=function(l,d){this.editor.session&&this.editor._emit(l,new p(d,this.editor))},o.prototype.onMouseMove=function(l,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(l,new p(d,this.editor))},o.prototype.onMouseWheel=function(l,d){var w=new p(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(l,w)},o.prototype.setState=function(l){this.state=l},o.prototype.captureMouse=function(l,d){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var E=this,M=!0,k=function(I){if(I){if(y.isWebKit&&!I.which&&E.releaseMouse)return E.releaseMouse();E.x=I.clientX,E.y=I.clientY,d&&d(I),E.mouseEvent=new p(I,E.editor),E.$mouseMoved=!0}},C=function(I){w.off("beforeEndOperation",L),M=!1,w.session&&R(),E[E.state+"End"]&&E[E.state+"End"](I),E.state="",E.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,I&&E.onMouseEvent("mouseup",I),w.endOperation()},R=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},O=function(){M&&(R(),g.nextFrame(O))};if(y.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){C(l)});var L=function(I){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=k,E.releaseMouse=g.capture(this.editor.container,k,C),O()},o.prototype.cancelContextMenu=function(){var l=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),d&&d.domEvent&&g.stopEvent(d.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o})();c.prototype.releaseMouse=null,u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("../lib/dom"),y=(function(){function x(h){h.on("click",function(p){var s=p.getDocumentPosition(),a=h.session,u=a.getFoldAt(s.row,s.column,1);u&&(p.getAccelKey()?a.removeFold(u):a.expandFold(u),p.stop());var c=p.domEvent&&p.domEvent.target;c&&g.hasCssClass(c,"ace_inline_button")&&g.hasCssClass(c,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(p){var s=h.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var a=p.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[a]&&h.session.onFoldWidgetClick(a,p),h.isFocused()||h.focus(),p.stop()}}),h.on("gutterdblclick",function(p){var s=h.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var a=p.getDocumentPosition().row,u=h.session,c=u.getParentFoldRangeData(a,!0),o=c.range||c.firstRange;if(o){a=o.start.row;var l=u.getFoldAt(a,u.getLine(a).length,1);l?u.removeFold(l):(u.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}p.stop()}})}return x})();r.FoldHandler=y}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,m){var g=e("../lib/keys"),y=e("../lib/event"),x=(function(){function h(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return h.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},h.prototype.setKeyboardHandler=function(p){var s=this.$handlers;if(s[s.length-1]!=p){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(p,1)}},h.prototype.addKeyboardHandler=function(p,s){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var a=this.$handlers.indexOf(p);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(p):this.$handlers.splice(s,0,p),a==-1&&p.attach&&p.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(p){var s=this.$handlers.indexOf(p);return s==-1?!1:(this.$handlers.splice(s,1),p.detach&&p.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var p=this.$data,s=p.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,p)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(p,s,a,u){for(var c,o=!1,l=this.$editor.commands,d=this.$handlers.length;d--&&(c=this.$handlers[d].handleKeyboard(this.$data,p,s,a,u),!(!(!c||!c.command)&&(c.command=="null"?o=!0:o=l.exec(c.command,this.$editor,c.args,u),o&&u&&p!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&y.stopEvent(u),o))););return!o&&p==-1&&(c={command:"insertstring"},o=l.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),o},h.prototype.onCommandKey=function(p,s,a){var u=g.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,a,p)},h.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},h})();r.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,m){var g=0,y=0,x=!1,h=!1,p=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],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,c=1,o=0,l=1,d=2,w=3,b=4,E=5,M=6,k=7,C=8,R=9,O=10,L=11,I=12,z=13,P=14,N=15,_=16,S=17,D=18,j=[D,D,D,D,D,D,D,D,D,M,E,M,C,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,E,E,E,M,C,b,b,L,L,L,b,b,b,b,b,O,R,O,R,R,d,d,d,d,d,d,d,d,d,d,R,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,D,D,D,D,D,D,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,R,b,L,L,L,L,b,b,b,b,o,b,b,D,b,b,L,L,d,d,b,o,b,b,b,d,o,b,b,b,b,b],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,l,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,E,z,P,N,_,S,R,L,L,L,L,L,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,R,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C];function G(ne,le,ue,ce){var fe=g?a:s,_e=null,$e=null,Te=null,Ge=0,Ve=null,ct=null,Je=-1,dt=null,Qt=null,On=[];if(!ce)for(dt=0,ce=[];dt<ue;dt++)ce[dt]=he(ne[dt]);for(y=g,x=!1,h=!1,p=!1,Qt=0;Qt<ue;Qt++){if(_e=Ge,On[Qt]=$e=te(ne,ce,On,Qt),Ge=fe[_e][$e],Ve=Ge&240,Ge&=15,le[Qt]=Te=fe[Ge][5],Ve>0)if(Ve==16){for(dt=Je;dt<Qt;dt++)le[dt]=1;Je=-1}else Je=-1;if(ct=fe[Ge][6],ct)Je==-1&&(Je=Qt);else if(Je>-1){for(dt=Je;dt<Qt;dt++)le[dt]=Te;Je=-1}ce[Qt]==E&&(le[Qt]=0),y|=Te}if(p){for(dt=0;dt<ue;dt++)if(ce[dt]==M){le[dt]=g;for(var Gt=dt-1;Gt>=0&&ce[Gt]==C;Gt--)le[Gt]=g}}}function Z(ne,le,ue){if(!(y<ne)){if(ne==1&&g==c&&!h){ue.reverse();return}for(var ce=ue.length,fe=0,_e,$e,Te,Ge;fe<ce;){if(le[fe]>=ne){for(_e=fe+1;_e<ce&&le[_e]>=ne;)_e++;for($e=fe,Te=_e-1;$e<Te;$e++,Te--)Ge=ue[$e],ue[$e]=ue[Te],ue[Te]=Ge;fe=_e}fe++}}}function te(ne,le,ue,ce){var fe=le[ce],_e,$e,Te,Ge;switch(fe){case o:case l:x=!1;case b:case w:return fe;case d:return x?w:d;case k:return x=!0,l;case C:return b;case R:return ce<1||ce+1>=le.length||(_e=ue[ce-1])!=d&&_e!=w||($e=le[ce+1])!=d&&$e!=w?b:(x&&($e=w),$e==_e?$e:b);case O:return _e=ce>0?ue[ce-1]:E,_e==d&&ce+1<le.length&&le[ce+1]==d?d:b;case L:if(ce>0&&ue[ce-1]==d)return d;if(x)return b;for(Ge=ce+1,Te=le.length;Ge<Te&&le[Ge]==L;)Ge++;return Ge<Te&&le[Ge]==d?d:b;case I:for(Te=le.length,Ge=ce+1;Ge<Te&&le[Ge]==I;)Ge++;if(Ge<Te){var Ve=ne[ce],ct=Ve>=1425&&Ve<=2303||Ve==64286;if(_e=le[Ge],ct&&(_e==l||_e==k))return l}return ce<1||(_e=le[ce-1])==E?b:ue[ce-1];case E:return x=!1,h=!0,g;case M:return p=!0,b;case z:case P:case _:case S:case N:x=!1;case D:return b}}function he(ne){var le=ne.charCodeAt(0),ue=le>>8;return ue==0?le>191?o:j[le]:ue==5?/[\u0591-\u05f4]/.test(ne)?l:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:le==1642?L:/[\u06f0-\u06f9]/.test(ne)?d:k:ue==32&&le<=8287?U[le&255]:ue==254&&le>=65136?k:b}r.L=o,r.R=l,r.EN=d,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,le,ue){if(ne.length<2)return{};var ce=ne.split(""),fe=new Array(ce.length),_e=new Array(ce.length),$e=[];g=ue?c:u,G(ce,$e,ce.length,le);for(var Te=0;Te<fe.length;fe[Te]=Te,Te++);Z(2,$e,fe),Z(1,$e,fe);for(var Te=0;Te<fe.length-1;Te++)le[Te]===w?$e[Te]=r.AN:$e[Te]===l&&(le[Te]>k&&le[Te]<z||le[Te]===b||le[Te]===D)?$e[Te]=r.ON_R:Te>0&&ce[Te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Te])&&($e[Te-1]=$e[Te]=r.R_H,Te++);ce[ce.length-1]===r.DOT&&($e[ce.length-1]=r.B),ce[0]===""&&($e[0]=r.RLE);for(var Te=0;Te<fe.length;Te++)_e[Te]=$e[fe[Te]];return{logicalFromVisual:fe,bidiLevels:_e}},r.hasBidiCharacters=function(ne,le){for(var ue=!1,ce=0;ce<ne.length;ce++)le[ce]=he(ne.charAt(ce)),!ue&&(le[ce]==l||le[ce]==k||le[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,le){for(var ue=0;ue<le.logicalFromVisual.length;ue++)if(le.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,m){var g=e("./lib/bidiutil"),y=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=(function(){function p(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=g,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(s.getValue())}return p.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},p.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},p.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var u,c=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===c);)c=u,s++;else s=this.currentRow;return s},p.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,c=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 o=this.session.$wrapData[s];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?c:g.DOT))}else this.line+=this.showInvisibles?c:g.DOT;var l=this.session,d=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,E){return b===" "||l.isFullWidth(b.charCodeAt(0))?(w=b===" "?l.getScreenTabSize(E+d):2,d+=w-1,y.stringRepeat(g.DOT,w)):b}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==g.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},p.prototype.updateBidiMap=function(){var s=[];g.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=g.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[g.L]=this.charWidths[g.EN]=this.charWidths[g.ON_R]=a,this.charWidths[g.R]=this.charWidths[g.AN]=u,this.charWidths[g.R_H]=u*.45,this.charWidths[g.B]=this.charWidths[g.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},p.prototype.setEolChar=function(s){this.EOL=s},p.prototype.setContentWidth=function(s){this.contentWidth=s},p.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(s,a){for(var u=s.getCursorPosition(),c=s.selection.getSelectionAnchor().row;c<=u.row;c++)!a&&s.session.getLine(c).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(c,0,1):a&&s.session.getLine(c).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:c},s.session.$bidiHandler.RLE)},p.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,c=g.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&s<=a&&o[c]%2!==0&&c++;for(var d=0;d<c;d++)l+=this.charWidths[o[d]];return!this.session.getOverwrite()&&s>a&&o[c]%2===0&&(l+=this.charWidths[o[c]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},p.prototype.getSelections=function(s,a){var u=this.bidiMap,c=u.bidiLevels,o,l=[],d=0,w=Math.min(s,a)-this.wrapIndent,b=Math.max(s,a)-this.wrapIndent,E=!1,M=!1,k=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<c.length;R++)C=u.logicalFromVisual[R],o=c[R],E=C>=w&&C<b,E&&!M?k=d:!E&&M&&l.push({left:k,width:d-k}),d+=this.charWidths[o],M=E;if(E&&R===c.length&&l.push({left:k,width:d-k}),this.isRtlDir)for(var O=0;O<l.length;O++)l[O].left+=this.rtlLineOffset;return l},p.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),c=0,o=0,l=this.bidiMap.bidiLevels,d=this.charWidths[l[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>c+d/2;){if(c+=d,o===l.length-1){d=0;break}d=this.charWidths[l[++o]]}return o>0&&l[o-1]%2!==0&&l[o]%2===0?(u<c&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?a=1+(u>c?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===l.length-1&&d===0&&l[o-1]%2===0||!this.isRtlDir&&o===0&&l[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&l[o-1]%2!==0&&d!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},p})();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,m){var g=e("./lib/oop"),y=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,p=(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(c){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&c.old.column!=c.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?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,a):h.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 c=u?a.end:a.start,o=u?a.start:a.end;this.$setSelection(c.row,c.column,o.row,o.column)},s.prototype.$setSelection=function(a,u,c,o){if(!this.$silent){var l=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(c,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||d)&&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 c=a||this.lead;a=c.row,u=c.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 c=typeof a=="number"?a:this.lead.row,o,l=this.session.getFoldLine(c);return l?(c=l.start.row,o=l.end.row):o=c,u===!0?new h(c,0,o,this.session.getLine(o).length):new h(c,0,o+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,c){var o=a.column,l=a.column+u;return c<0&&(o=a.column-u,l=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,l).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 c=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):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 c=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,c=this.session.documentToScreenRow(a,u),o=this.session.screenToDocumentPosition(c,0),l=this.session.getDisplayLine(a,null,o.row,o.column),d=l.match(/^\s*/);d[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=d[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var c=this.session.getLine(u.row);if(u.column==c.length){var o=c.search(/\s+$/);o>0&&(u.column=o)}}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,c=this.doc.getLine(a),o=c.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(a,u,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=c.substring(u)),u>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var o=this.session.getFoldStringAt(a,u,-1);o==null&&(o=this.doc.getLine(a).substring(0,u));var l=y.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(u-=this.session.nonTokenRe.lastIndex,l=l.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(l)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,c,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(c=a[u])&&o.test(c);)u++;if(u<1){for(l.lastIndex=0;(c=a[u])&&!l.test(c);)if(l.lastIndex=0,u++,o.test(c))if(u>2){u--;break}else{for(;(c=a[u])&&o.test(c);)u++;if(u>2)break}}}return l.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),o=c.substring(u),l=this.session.getFoldAt(a,u,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(u==c.length){var d=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<d&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,u+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(c.start.row,c.start.column);var o=this.session.getLine(a).substring(0,u);if(u===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var l=y.stringReverse(o),d=this.$shortWordEndIndex(l);return this.moveCursorTo(a,u-d)},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 c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];a<0?a-=l.rowsAbove||0:a>0&&(a+=l.rowCount-(l.rowsAbove||0))}var d=this.session.screenToDocumentPosition(c.row+a,c.column,o);a!==0&&u===0&&d.row===this.lead.row&&(d.column,this.lead.column),this.moveCursorTo(d.row,d.column+u,u===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,u,c){var o=this.session.getFoldAt(a,u,1);o&&(a=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(l.charAt(u))&&l.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,c||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,c){var o=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(o.row,o.column,c)},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 c=this.getCursor();return h.fromPoints(u,c)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var c=u.clone();return c.isBackwards=u.cursor==u.start,c});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 c=h.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(c.cursor=c.start),this.addRange(c,!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})();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,g.implement(p.prototype,x),r.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,m){var g=e("./lib/report_error").reportError,y=2e3,x=(function(){function h(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],u=[],c=0,o=this.matchMappings[s]={defaultToken:"text"},l="g",d=[],w=0;w<a.length;w++){var b=a[w];if(b.defaultToken&&(o.defaultToken=b.defaultToken),b.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),b.unicode&&l.indexOf("u")===-1&&(l+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var E=b.regex,M=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||M==1?b.token=b.token[0]:M-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:M-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&(M>1?b.onMatch=this.$applyToken:b.onMatch=b.token),M>1&&(/\\\d/.test(b.regex)?E=b.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+c+1)}):(M=1,E=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&d.push(b)),o[c]=w,c+=M,u.push(E),b.onMatch||(b.onMatch=null)}}u.length||(o[0]=0,u.push("$")),d.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,l)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",l)}}return h.prototype.$setMaxTokenCount=function(p){y=p|0},h.prototype.$applyToken=function(p){var s=this.splitRegex.exec(p).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:p}];for(var u=[],c=0,o=a.length;c<o;c++)s[c]&&(u[u.length]={type:a[c],value:s[c]});return u},h.prototype.$arrayTokens=function(p){if(!p)return[];var s=this.splitRegex.exec(p);if(!s)return"text";for(var a=[],u=this.tokenArray,c=0,o=u.length;c<o;c++)s[c+1]&&(a[a.length]={type:u[c],value:s[c+1]});return a},h.prototype.removeCapturingGroups=function(p){var s=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return s},h.prototype.createSplitterRegexp=function(p,s){if(p.indexOf("(?=")!=-1){var a=0,u=!1,c={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,d,w,b,E){return u?u=b!="]":b?u=!0:w?(a==c.stack&&(c.end=E+1,c.stack=-1),a--):d&&(a++,d.length!=1&&(c.stack=a,c.start=E)),o}),c.end!=null&&/^\)*$/.test(p.substr(c.end))&&(p=p.substring(0,c.start)+p.substr(c.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(s||"").replace("g",""))},h.prototype.getLineTokens=function(p,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",c=this.states[u];c||(u="start",c=this.states[u]);var o=this.matchMappings[u],l=this.regExps[u];l.lastIndex=0;for(var d,w=[],b=0,E=0,M={type:null,value:""};d=l.exec(p);){var k=o.defaultToken,C=null,R=d[0],O=l.lastIndex;if(O-R.length>b){var L=p.substring(b,O-R.length);M.type==k?M.value+=L:(M.type&&w.push(M),M={type:k,value:L})}for(var I=0;I<d.length-2;I++)if(d[I+1]!==void 0){C=c[o[I]],C.onMatch?k=C.onMatch(R,u,a,p):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),c=this.states[u],c||(this.reportError("state doesn't exist",u),u="start",c=this.states[u]),o=this.matchMappings[u],b=O,l=this.regExps[u],l.lastIndex=O),C.consumeLineEnd&&(b=O);break}if(R){if(typeof k=="string")(!C||C.merge!==!1)&&M.type===k?M.value+=R:(M.type&&w.push(M),M={type:k,value:R});else if(k){M.type&&w.push(M),M={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(b==p.length)break;if(b=O,E++>y){for(E>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:p});b<p.length;)M.type&&w.push(M),M={value:p.substring(b,b+=500),type:"overflow"};u="start",a=[];break}}return M.type&&w.push(M),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},h})();x.prototype.reportError=g,r.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){var g=e("../lib/deep_copy").deepCopy,y;y=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,s){if(!s){for(var a in p)this.$rules[a]=p[a];return}for(var a in p){for(var u=p[a],c=0;c<u.length;c++){var o=u[c];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(p,s,a,u,c){var o=typeof p=="function"?new p().getRules():p;if(u)for(var l=0;l<u.length;l++)u[l]=s+u[l];else{u=[];for(var d in o)u.push(s+d)}if(this.addRules(o,s),a)for(var w=Array.prototype[c?"push":"unshift"],l=0;l<u.length;l++)w.apply(this.$rules[u[l]],g(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var x=function(p,s){return(p!="start"||s.length)&&s.unshift(this.nextState,p),this.nextState},h=function(p,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var p=0,s=this.$rules;function a(u){var c=s[u];c.processed=!0;for(var o=0;o<c.length;o++){var l=c[o],d=null;Array.isArray(l)&&(d=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var w=l.next||l.push;if(w&&Array.isArray(w)){var b=l.stateName;b||(b=l.token,typeof b!="string"&&(b=b[0]||""),s[b]&&(b+=p++)),s[b]=w,l.next=b,a(b)}else w=="pop"&&(l.next=h);if(l.push&&(l.nextState=l.next||l.push,l.next=x,delete l.push),l.rules)for(var E in l.rules)s[E]?s[E].push&&s[E].push.apply(s[E],l.rules[E]):s[E]=l.rules[E];var M=typeof l=="string"?l:l.include;if(M&&(M==="$self"&&(M="start"),Array.isArray(M)?d=M.map(function(C){return s[C]}):d=s[M]),d){var k=[o,1].concat(d);l.noEscape&&(k=k.filter(function(C){return!C.next})),c.splice.apply(c,k),o--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(p,s,a,u){var c=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(o){for(var l=p[o],d=l.split(u||"|"),w=d.length;w--;){var b=d[w];this.$keywordList.push(b),a&&(b=b.toLowerCase()),c[b]=o}},this),p=null,a?function(o){return c[o.toLowerCase()]||s}:function(o){return c[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(y.prototype),r.TextHighlightRules=y}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,m){var g;g=function(){this.$behaviours={}},(function(){this.add=function(y,x,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[y]:this.$behaviours[y]={}}this.$behaviours[y][x]=h},this.addBehaviours=function(y){for(var x in y)for(var h in y[x])this.add(x,h,y[x][h])},this.remove=function(y){this.$behaviours&&this.$behaviours[y]&&delete this.$behaviours[y]},this.inherit=function(y,x){if(typeof y=="function")var h=new y().getBehaviours(x);else var h=y.getBehaviours(x);this.addBehaviours(h)},this.getBehaviours=function(y){if(y){for(var x={},h=0;h<y.length;h++)this.$behaviours[y[h]]&&(x[y[h]]=this.$behaviours[y[h]]);return x}else return this.$behaviours}}).call(g.prototype),r.Behaviour=g}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,m){var g=e("./range").Range,y=(function(){function x(h,p,s){this.$session=h,this.$row=p,this.$rowTokens=h.getTokens(p);var a=h.getTokenAt(p,s);this.$tokenIndex=a?a.index:-1}return x.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,p=this.$tokenIndex,s=h[p].start;if(s!==void 0)return s;for(s=0;p>0;)p-=1,s+=h[p].value.length;return s},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new g(this.$row,p,this.$row,p+h.value.length)},x})();r.TokenIterator=y}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,m){var g=e("../../lib/oop"),y=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},c={'"':'"',"'":"'"},o=function(w){var b=-1;if(w.multiSelect&&(b=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[b])return a=u[b];a=u[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(w,b,E,M){var k=w.end.row-w.start.row;return{text:E+b+M,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},d;d=function(w){w=w||{},this.add("braces","insertion",function(b,E,M,k,C){var R=M.getCursorPosition(),O=k.doc.getLine(R.row);if(C=="{"){o(M);var L=M.getSelectionRange(),I=k.doc.getTextRange(L),z=k.getTokenAt(R.row,R.column);if(I!==""&&I!=="{"&&M.getWrapBehavioursEnabled())return l(L,I,"{","}");if(z&&/(?:string)\.quasi|\.xml/.test(z.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(G){return G.test(z.type)})||/(string)\.quasi/.test(z.type)&&z.value[R.column-z.start-1]!=="$"?void 0:(d.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion(M,k))return/[\]\}\)]/.test(O[R.column])||M.inMultiSelectMode||w.braces?(d.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(M,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(M);var N=O.substring(R.column,R.column+1);if(N=="}"){var _=k.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(_!==null&&d.isAutoInsertedClosing(R,O,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){o(M);var S="";d.isMaybeInsertedClosing(R,O)&&(S=h.stringRepeat("}",a.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var N=O.substring(R.column,R.column+1);if(N==="}"){var D=k.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!D)return null;var j=this.$getIndent(k.getLine(D.row))}else if(S)var j=this.$getIndent(O);else{d.clearMaybeInsertedClosing();return}var U=j+k.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+j+S,selection:[1,U.length,1,U.length]}}else d.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,E,M,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){o(M);var O=k.doc.getLine(C.start.row),L=O.substring(C.end.column,C.end.column+1);if(L=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,E,M,k,C){if(C=="("){o(M);var R=M.getSelectionRange(),O=k.doc.getTextRange(R);if(O!==""&&M.getWrapBehavioursEnabled())return l(R,O,"(",")");if(d.isSaneInsertion(M,k))return d.recordAutoInsert(M,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(M);var L=M.getCursorPosition(),I=k.doc.getLine(L.row),z=I.substring(L.column,L.column+1);if(z==")"){var P=k.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(P!==null&&d.isAutoInsertedClosing(L,I,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,E,M,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){o(M);var O=k.doc.getLine(C.start.row),L=O.substring(C.start.column+1,C.start.column+2);if(L==")")return C.end.column++,C}}),this.add("brackets","insertion",function(b,E,M,k,C){if(C=="["){o(M);var R=M.getSelectionRange(),O=k.doc.getTextRange(R);if(O!==""&&M.getWrapBehavioursEnabled())return l(R,O,"[","]");if(d.isSaneInsertion(M,k))return d.recordAutoInsert(M,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(M);var L=M.getCursorPosition(),I=k.doc.getLine(L.row),z=I.substring(L.column,L.column+1);if(z=="]"){var P=k.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(P!==null&&d.isAutoInsertedClosing(L,I,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,E,M,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){o(M);var O=k.doc.getLine(C.start.row),L=O.substring(C.start.column+1,C.start.column+2);if(L=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(b,E,M,k,C){var R=k.$mode.$quotes||c;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(M);var O=C,L=M.getSelectionRange(),I=k.doc.getTextRange(L);if(I!==""&&(I.length!=1||!R[I])&&M.getWrapBehavioursEnabled())return l(L,I,O,O);if(!I){var z=M.getCursorPosition(),P=k.doc.getLine(z.row),N=P.substring(z.column-1,z.column),_=P.substring(z.column,z.column+1),S=k.getTokenAt(z.row,z.column),D=k.getTokenAt(z.row,z.column+1);if(N=="\\"&&S&&/escape/.test(S.type))return null;var j=S&&/string|escape/.test(S.type),U=!D||/string|escape/.test(D.type),G;if(_==O)G=j!==U,G&&/string\.end/.test(D.type)&&(G=!1);else{if(j&&!U||j&&U)return null;var Z=k.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(N);Z.lastIndex=0;var he=Z.test(_),ne=k.$mode.$pairQuotesAfter,le=ne&&ne[O]&&ne[O].test(N);if(!le&&te||he||_&&!/[\s;,.})\]\\]/.test(_))return null;var ue=P[z.column-2];if(N==O&&(ue==O||Z.test(ue)))return null;G=!0}return{text:G?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,E,M,k,C){var R=k.$mode.$quotes||c,O=k.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(O)){o(M);var L=k.doc.getLine(C.start.row),I=L.substring(C.start.column+1,C.start.column+2);if(I==O)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,E,M,k,C){if(b==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&M.selection.isEmpty()){var R=M.getCursorPosition();if(R.column===0)return;for(var O=k.doc.getLine(R.row),L=k.doc.getLine(R.row+1),I=k.getTokens(R.row),z=0,P=0;P<I.length;P++){z+=I[P].value.length;var N=I[P];if(z>=R.column){if(z===R.column){if(!/\.doc/.test(N.type))return;if(/\*\//.test(N.value)){var _=I[P+1];if(!_||!/\.doc/.test(_.type))return}}var S=R.column-(z-N.value.length),D=N.value.indexOf("*/"),j=N.value.indexOf("/**",D>-1?D+2:0);if(j!==-1&&S>j&&S<j+3||D!==-1&&j!==-1&&S>=D&&S<=j||!/\.doc/.test(N.type))return;break}}var U=this.$getIndent(O);if(/\s*\*/.test(L))return/^\s*\*/.test(O)?{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(O.substring(0,R.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},d.isSaneInsertion=function(w,b){var E=w.getCursorPosition(),M=new x(b,E.row,E.column);if(!this.$matchTokenType(M.getCurrentToken()||"text",p)){if(/[)}\]]/.test(w.session.getLine(E.row)[E.column]))return!0;var k=new x(b,E.row,E.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",p))return!1}return M.stepForward(),M.getCurrentTokenRow()!==E.row||this.$matchTokenType(M.getCurrentToken()||"text",s)},d.$matchTokenType=function(w,b){return b.indexOf(w.type||w)>-1},d.recordAutoInsert=function(w,b,E){var M=w.getCursorPosition(),k=b.doc.getLine(M.row);this.isAutoInsertedClosing(M,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=M.row,a.autoInsertedLineEnd=E+k.substr(M.column),a.autoInsertedBrackets++},d.recordMaybeInsert=function(w,b,E){var M=w.getCursorPosition(),k=b.doc.getLine(M.row);this.isMaybeInsertedClosing(M,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=M.row,a.maybeInsertedLineStart=k.substr(0,M.column)+E,a.maybeInsertedLineEnd=k.substr(M.column),a.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(w,b,E){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&E===a.autoInsertedLineEnd[0]&&b.substr(w.column)===a.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(w,b){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&b.substr(w.column)===a.maybeInsertedLineEnd&&b.substr(0,w.column)==a.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},g.inherits(d,y),r.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(e,r,m){for(var g=[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],y=0,x=[],h=0;h<g.length;h+=2)x.push(y+=g[h]),g[h+1]&&x.push(45,y+=g[h+1]);r.wordChars=String.fromCharCode.apply(null,x)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,r,m){var g=e("../config"),y=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,p=e("../unicode"),s=e("../lib/lang"),a=e("../token_iterator").TokenIterator,u=e("../range").Range,c;c=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new y(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,d,w){var b=l.doc,E=!0,M=!0,k=1/0,C=l.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(s.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var O=s.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),R=l.getUseSoftTabs();var I=function(G,Z){var te=G.match(O);if(te){var he=te[1].length,ne=te[0].length;!_(G,he,ne)&&te[0][ne-1]==" "&&ne--,b.removeInLine(Z,he,ne)}},z=L+" ",P=function(G,Z){(!E||/\S/.test(G))&&(_(G,k,k)?b.insertInLine({row:Z,column:k},z):b.insertInLine({row:Z,column:k},L))},N=function(G,Z){return O.test(G)},_=function(G,Z,te){for(var he=0;Z--&&G.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;G.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,S=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+s.escapeRegExp(L)+")"),D=new RegExp("(?:"+s.escapeRegExp(S)+")\\s*$"),P=function(le,ue){N(le,ue)||(!E||/\S/.test(le))&&(b.insertInLine({row:ue,column:le.length},S),b.insertInLine({row:ue,column:k},L))},I=function(le,ue){var ce;(ce=le.match(D))&&b.removeInLine(ue,le.length-ce[0].length,le.length),(ce=le.match(O))&&b.removeInLine(ue,ce[1].length,ce[0].length)},N=function(le,ue){if(O.test(le))return!0;for(var ce=l.getTokens(ue),fe=0;fe<ce.length;fe++)if(ce[fe].type==="comment")return!0}}function j(G){for(var Z=d;Z<=w;Z++)G(b.getLine(Z),Z)}var U=1/0;j(function(G,Z){var te=G.search(/\S/);te!==-1?(te<k&&(k=te),M&&!N(G,Z)&&(M=!1)):U>G.length&&(U=G.length)}),k==1/0&&(k=U,E=!1,M=!1),R&&k%C!=0&&(k=Math.floor(k/C)*C),j(M?I:P)},this.toggleBlockComment=function(o,l,d,w){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var E=new a(l,w.row,w.column),M=E.getCurrentToken();l.selection;var k=l.selection.toOrientedRange(),C,R;if(M&&/comment/.test(M.type)){for(var O,L;M&&/comment/.test(M.type);){var I=M.value.indexOf(b.start);if(I!=-1){var z=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;O=new u(z,P,z,P+b.start.length);break}M=E.stepBackward()}for(var E=new a(l,w.row,w.column),M=E.getCurrentToken();M&&/comment/.test(M.type);){var I=M.value.indexOf(b.end);if(I!=-1){var z=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;L=new u(z,P,z,P+b.end.length);break}M=E.stepForward()}L&&l.remove(L),O&&(l.remove(O),C=O.start.row,R=-b.start.length)}else R=b.start.length,C=d.start.row,l.insert(d.end,b.end),l.insert(d.start,b.start);k.start.row==C&&(k.start.column+=R),k.end.row==C&&(k.end.column+=R),l.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(o,l,d){return this.$getIndent(l)},this.checkOutdent=function(o,l,d){return!1},this.autoOutdent=function(o,l,d){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var l in o)if(o[l]){var d=o[l],w=d.prototype.$id,b=g.$modes[w];b||(g.$modes[w]=b=new d),g.$modes[l]||(g.$modes[l]=b),this.$embeds.push(l),this.$modes[l]=b}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],M=function(R){(function(O){var L=E[R],I=O[L];O[E[R]]=function(){return this.$delegator(L,arguments,I)}})(k)},k=this,l=0;l<E.length;l++)M(l)},this.$delegator=function(o,l,d){var w=l[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var b=w[2][w[2].length-1],E=this.$modes[b];if(E)return E[o].apply(E,[w[1]].concat([].slice.call(l,1)))}w=w[0]||"start"}for(var M=0;M<this.$embeds.length;M++)if(this.$modes[this.$embeds[M]]){var k=w.split(this.$embeds[M]);if(!k[0]&&k[1]){l[0]=k[1];var E=this.$modes[this.$embeds[M]];return E[o].apply(E,l)}}var C=d.apply(this,l);return d?C:void 0},this.transformAction=function(o,l,d,w,b){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var M in E)if(E[M][l]){var k=E[M][l].apply(this,arguments);if(k)return k}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,d=[];for(var w in l)for(var b=l[w],E=0,M=b.length;E<M;E++)if(typeof b[E].token=="string")/keyword|support|storage/.test(b[E].token)&&d.push(b[E].regex);else if(typeof b[E].token=="object"){for(var k=0,C=b[E].token.length;k<C;k++)if(/keyword|support|storage/.test(b[E].token[k])){var w=b[E].regex.match(/\(.+?\)/g)[k];d.push(w.substr(1,w.length-2))}}this.completionKeywords=d}return o?d.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,l,d,w){var b=this.$keywordList||this.$createKeywordList();return b.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("./lib/dom"),y=(function(){function x(h){this.session=h,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return x.prototype.getRowLength=function(h){var p;return this.lineWidgets?p=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[h]?1+p:this.$wrapData[h].length+1+p},x.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(h+=p.rowCount)}),h},x.prototype.$onChangeEditor=function(h){this.attach(h.editor)},x.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h,h&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(h){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},x.prototype.updateOnFold=function(h,p){var s=p.lineWidgets;if(!(!s||!h.action)){for(var a=h.data,u=a.start.row,c=a.end.row,o=h.action=="add",l=u+1;l<c;l++)s[l]&&(s[l].hidden=o);s[c]&&(o?s[u]?s[c].hidden=o:s[u]=s[c]:(s[u]==s[c]&&(s[u]=void 0),s[c].hidden=o))}},x.prototype.updateOnChange=function(h){var p=this.session.lineWidgets;if(p){var s=h.start.row,a=h.end.row-s;if(a!==0)if(h.action=="remove"){var u=p.splice(s+1,a);!p[s]&&u[u.length-1]&&(p[s]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var c=new Array(a);p[s]&&p[s].column!=null&&h.start.column>p[s].column&&s++,c.unshift(s,0),p.splice.apply(p,c),this.$updateRows()}}},x.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var p=!0;h.forEach(function(s,a){if(s)for(p=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),p&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[h.row];return p&&(h.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},x.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var p=this.editor.renderer;h.html&&!h.el&&(h.el=g.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=g.createElement("div"),h.el.textContent=h.text),h.el&&(g.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&g.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",p.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex="3"),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/p.layerConfig.lineHeight);var s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var a=this.session.lineWidgets;h.row==s.end.row&&!a[s.start.row]?a[s.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(h),h},x.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[h.row];if(p==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;p;){if(p.$oldWidget==h){p.$oldWidget=h.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(h){for(var p=this.session.lineWidgets,s=p&&p[h],a=[];s;)a.push(s),s=s.$oldWidget;return a},x.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(h,p){var s=this.session._changedWidgets,a=p.layerConfig;if(!(!s||!s.length)){for(var u=1/0,c=0;c<s.length;c++){var o=s[c];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,p.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var l=o.h/a.lineHeight;o.coverLine&&(l-=this.session.getRowLineCount(o.row),l<0&&(l=0)),o.rowCount!=l&&(o.rowCount=l,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(h,p){var s=p.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,s.firstRow),c=Math.max(this.lastRow,s.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,p.$cursorLayer.config=s;for(var o=u;o<=c;o++){var l=a[o];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,p.container.appendChild(l.el));var d=p.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;l.coverLine||(d+=s.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=d-s.offset+"px";var w=l.coverGutter?0:p.gutterWidth;l.fixedWidth||(w-=p.scrollLeft),l.el.style.left=w+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=s.width+2*s.padding+"px"),l.fixedWidth?l.el.style.right=p.scrollBar.getWidth()+"px":l.el.style.right=""}}}},x})();r.LineWidgets=y}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,m){r.applyDelta=function(g,y,x){var h=y.start.row,p=y.start.column,s=g[h]||"";switch(y.action){case"insert":var a=y.lines;if(a.length===1)g[h]=s.substring(0,p)+y.lines[0]+s.substring(p);else{var u=[h,1].concat(y.lines);g.splice.apply(g,u),g[h]=s.substring(0,p)+g[h],g[h+y.lines.length-1]+=s.substring(p)}break;case"remove":var c=y.end.column,o=y.end.row;h===o?g[h]=s.substring(0,p)+s.substring(c):g.splice(h,o-h+1,s.substring(0,p)+g[o].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var g=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=(function(){function s(a,u,c){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,c)}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=p(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},s.prototype.setPosition=function(a,u,c){var o;if(c?o={row:a,column:u}:o=this.$clipPositionToDocument(a,u),!(this.row==o.row&&this.column==o.column)){var l={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:l,value:o})}},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 c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,u))),u<0&&(c.column=0),c},s})();x.prototype.$insertRight=!1,g.implement(x.prototype,y);function h(s,a,u){var c=u?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&c}function p(s,a,u){var c=s.action=="insert",o=(c?1:-1)*(s.end.row-s.start.row),l=(c?1:-1)*(s.end.column-s.start.column),d=s.start,w=c?d:s.end;return h(a,d,u)?{row:a.row,column:a.column}:h(w,a,!u)?{row:a.row+o,column:a.column+(a.row==w.row?l:0)}:{row:d.row,column:d.column}}r.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,m){var g=e("./lib/oop"),y=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,p=e("./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 c=this.getLength()-1;this.remove(new h(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,c){return new p(this,u,c)},a.prototype.$detectNewLine=function(u){var c=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
|
186
|
+
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
187
|
+
`;case"unix":return`
|
188
|
+
`;default:return this.$autoNewLine||`
|
189
|
+
`}},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
|
190
|
+
`||u=="\r"||u==`
|
191
|
+
`},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,c){return this.$lines.slice(u,c+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 c;if(u.start.row===u.end.row)c=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{c=this.getLines(u.start.row,u.end.row),c[0]=(c[0]||"").substring(u.start.column);var o=c.length-1;u.end.row-u.start.row==o&&(c[o]=c[o].substring(0,u.end.column))}return c},a.prototype.insertLines=function(u,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,c)},a.prototype.removeLines=function(u,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,c)},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,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(u,this.$split(c))},a.prototype.insertInLine=function(u,c){var o=this.clippedPos(u.row,u.column),l=this.pos(u.row,u.column+c.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[c]},!0),this.clonePos(l)},a.prototype.clippedPos=function(u,c){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,c=void 0);var l=this.getLine(u);return c==null&&(c=l.length),c=Math.min(Math.max(c,0),l.length),{row:u,column:c}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,c){return{row:u,column:c}},a.prototype.$clipPosition=function(u){var c=this.getLength();return u.row>=c?(u.row=Math.max(0,c-1),u.column=this.getLine(c-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,c){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(c=c.concat([""]),o=0):(c=[""].concat(c),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},c)},a.prototype.insertMergedLines=function(u,c){var o=this.clippedPos(u.row,u.column),l={row:o.row+c.length-1,column:(c.length==1?o.column:0)+c[c.length-1].length};return this.applyDelta({start:o,end:l,action:"insert",lines:c}),this.clonePos(l)},a.prototype.remove=function(u){var c=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:c,end:o,action:"remove",lines:this.getLinesForRange({start:c,end:o})}),this.clonePos(c)},a.prototype.removeInLine=function(u,c,o){var l=this.clippedPos(u,c),d=this.clippedPos(u,o);return this.applyDelta({start:l,end:d,action:"remove",lines:this.getLinesForRange({start:l,end:d})},!0),this.clonePos(l)},a.prototype.removeFullLines=function(u,c){u=Math.min(Math.max(0,u),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var o=c==this.getLength()-1&&u>0,l=c<this.getLength()-1,d=o?u-1:u,w=o?this.getLine(d).length:0,b=l?c+1:c,E=l?0:this.getLine(b).length,M=new h(d,w,b,E),k=this.$lines.slice(u,c+1);return this.applyDelta({start:M.start,end:M.end,action:"remove",lines:this.getLinesForRange(M)}),k},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,c){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),c.length===0&&u.isEmpty())return u.start;if(c==this.getTextRange(u))return u.end;this.remove(u);var o;return c?o=this.insert(u.start,c):o=u.start,o},a.prototype.applyDeltas=function(u){for(var c=0;c<u.length;c++)this.applyDelta(u[c])},a.prototype.revertDeltas=function(u){for(var c=u.length-1;c>=0;c--)this.revertDelta(u[c])},a.prototype.applyDelta=function(u,c){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!h.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(y(this.$lines,u,c),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var c=this.$lines.length;(u.action=="remove"&&u.start.row<c&&u.end.row<c||u.action=="insert"&&u.start.row<=c)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,c){for(var o=u.lines,l=o.length-c+1,d=u.start.row,w=u.start.column,b=0,E=0;b<l;b=E){E+=c-1;var M=o.slice(b,E);M.push(""),this.applyDelta({start:this.pos(d+b,w),end:this.pos(d+E,w=0),action:u.action,lines:M},!0)}u.lines=o.slice(b),u.start.row=d+b,u.start.column=w,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,d=c||0,w=o.length;d<w;d++)if(u-=o[d].length+l,u<0)return{row:d,column:u+o[d].length+l};return{row:w-1,column:u+o[w-1].length+l}},a.prototype.positionToIndex=function(u,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,d=0,w=Math.min(u.row,o.length),b=c||0;b<w;++b)d+=o[b].length+l;return d+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",g.implement(s.prototype,x),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var g=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=(function(){function h(p,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,c=a.currentLine,o=-1,l=a.doc,d=c;a.lines[c];)c++;var w=l.getLength(),b=0;for(a.running=!1;c<w;){a.$tokenizeRow(c),o=c;do c++;while(a.lines[c]);if(b++,b%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=c,o==-1&&(o=c),d<=o&&a.fireUpdateEvent(d,o)}}}return h.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(p,s){var a={first:p,last:s};this._signal("update",{data:a})},h.prototype.start=function(p){this.currentLine=Math.min(p||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},h.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},h.prototype.$updateOnChange=function(p){var s=p.start.row,a=p.end.row-s;if(a===0)this.lines[s]=null;else if(p.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()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},h.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},h.prototype.$tokenizeRow=function(p){var s=this.doc.getLine(p),a=this.states[p-1],u=this.tokenizer.getLineTokens(s,a,p);return this.states[p]+""!=u.state+""?(this.states[p]=u.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=u.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h})();g.implement(x.prototype,y),r.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,m){var g=e("./lib/lang"),y=e("./range").Range,x=(function(){function h(p,s,a){a===void 0&&(a="text"),this.setRegexp(p),this.clazz=s,this.type=a,this.docLen=0}return h.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},h.prototype.update=function(p,s,a,u){if(this.regExp){for(var c=u.firstRow,o=u.lastRow,l={},d=a.$editor&&a.$editor.$search,w=d&&d.$isMultilineSearch(a.$editor.getLastSearchOptions()),b=c;b<=o;b++){var E=this.cache[b];if(E==null||a.getValue().length!=this.docLen){if(w){E=[];var M=d.$multiLineForward(a,this.regExp,b,o);if(M){var k=M.endRow<=o?M.endRow-1:o;k>b&&(b=k),E.push(new y(M.startRow,M.startCol,M.endRow,M.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=g.getMatchOffsets(a.getLine(b),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(L){return new y(b,L.offset,b,L.offset+L.length)});this.cache[b]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var R=E[C].toScreenRange(a),O=R.toString();l[O]||(l[O]=!0,s.drawSingleLineMarker(p,R,this.clazz,u))}}this.docLen=a.getValue().length}},h})();x.prototype.MAX_RANGES=500,r.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,m){var g=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,R,O){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!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)}},k.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var O=this.$undoStack,L=O.length;L--;){var I=O[L][0];if(I.id<=C)break;I.id<R&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,R){for(var O=this.selections,L=O.length;L--;){var I=O[L];if(I.rev<C)return R&&(I=O[L+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var O=this.$undoStack,L=null,I=0,z=O.length;z--;){var P=O[z][0];if(P.id<R&&!L&&(L=z+1),P.id<=C){I=z+1;break}}return O.slice(I,L)},k.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.undo=function(C,R){this.lastDeltas=null;var O=this.$undoStack;if(y(O,O.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var L=O.pop(),I=null;return L&&(I=C.undoChanges(L,R),this.$redoStack.push(L),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var O=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);M(this.$redoStack,O),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(z){z[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),I=null;return L&&(I=C.redoChanges(L,R),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],O=R&&R[0].id||0;this.$redoStackBaseRev=O,this.$rev=O},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+a(this.$redoStack)},k})();g.prototype.hasUndo=g.prototype.canUndo,g.prototype.hasRedo=g.prototype.canRedo,g.prototype.isClean=g.prototype.isAtBookmark,g.prototype.markClean=g.prototype.bookmark;function y(k,C){for(var R=C;R--;){var O=k[R];if(O&&!O[0].ignore){for(;R<C-1;){var L=o(k[R],k[R+1]);k[R]=L[0],k[R+1]=L[1],R++}return!0}}}var x=e("./range").Range,h=x.comparePoints;x.comparePoints;function p(k){return{row:k.row,column:k.column}}function s(k){return{start:p(k.start),end:p(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
|
194
|
+
`);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(u).join(`
|
195
|
+
`):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function c(k,C){var R=k.action=="insert",O=C.action=="insert";if(R&&O)if(h(C.start,k.end)>=0)d(C,k,-1);else if(h(C.start,k.start)<=0)d(k,C,1);else return null;else if(R&&!O)if(h(C.start,k.end)>=0)d(C,k,-1);else if(h(C.end,k.start)<=0)d(k,C,-1);else return null;else if(!R&&O)if(h(C.start,k.start)>=0)d(C,k,1);else if(h(C.start,k.start)<=0)d(k,C,1);else return null;else if(!R&&!O)if(h(C.start,k.start)>=0)d(C,k,1);else if(h(C.end,k.start)<=0)d(k,C,-1);else return null;return[C,k]}function o(k,C){for(var R=k.length;R--;)for(var O=0;O<C.length;O++)if(!c(k[R],C[O])){for(;R<k.length;){for(;O--;)c(C[O],k[R]);O=C.length,R++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function l(k,C){var R=k.action=="insert",O=C.action=="insert";if(R&&O)h(k.start,C.start)<0?d(C,k,1):d(k,C,1);else if(R&&!O)h(k.start,C.end)>=0?d(k,C,-1):(h(k.start,C.start)<=0||d(k,x.fromPoints(C.start,k.start),-1),d(C,k,1));else if(!R&&O)h(C.start,k.end)>=0?d(C,k,-1):(h(C.start,k.start)<=0||d(C,x.fromPoints(k.start,C.start),-1),d(k,C,1));else if(!R&&!O)if(h(C.start,k.end)>=0)d(C,k,-1);else if(h(C.end,k.start)<=0)d(k,C,-1);else{var L,I;return h(k.start,C.start)<0&&(L=k,k=b(k,C.start)),h(k.end,C.end)>0&&(I=b(k,C.end)),w(C.end,k.start,k.end,-1),I&&!L&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,L,I].filter(Boolean)}return[C,k]}function d(k,C,R){w(k.start,C.start,C.end,R),w(k.end,C.start,C.end,R)}function w(k,C,R,O){k.row==(O==1?C:R).row&&(k.column+=O*(R.column-C.column)),k.row+=O*(R.row-C.row)}function b(k,C){var R=k.lines,O=k.end;k.end=p(C);var L=k.end.row-k.start.row,I=R.splice(L,R.length),z=L?C.column:C.column-k.start.column;R.push(I[0].substring(0,z)),I[0]=I[0].substr(z);var P={start:p(C),end:O,lines:I,action:k.action};return P}function E(k,C){C=s(C);for(var R=k.length;R--;){for(var O=k[R],L=0;L<O.length;L++){var I=O[L],z=l(I,C);C=z[0],z.length!=2&&(z[2]?(O.splice(L+1,1,z[1],z[2]),L++):z[1]||(O.splice(L,1),L--))}O.length||k.splice(R,1)}return k}function M(k,C){for(var R=0;R<C.length;R++)for(var O=C[R],L=0;L<O.length;L++)E(k,O[L])}r.UndoManager=g}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,m){var g=e("../range").Range,y=(function(){function x(h,p){this.foldData=h,Array.isArray(p)?this.folds=p:p=this.folds=[p];var s=p[p.length-1];this.range=new g(p[0].start.row,p[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return x.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(p){p.start.row+=h,p.end.row+=h})},x.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(p,s){return-p.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},x.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},x.prototype.walk=function(h,p,s){var a=0,u=this.folds,c,o,l,d=!0;p==null&&(p=this.end.row,s=this.end.column);for(var w=0;w<u.length;w++){if(c=u[w],o=c.range.compareStart(p,s),o==-1){h(null,p,s,a,d);return}if(l=h(null,c.start.row,c.start.column,a,d),l=!l&&h(c.placeholder,c.start.row,c.start.column,a),l||o===0)return;d=!c.sameRow,a=c.end.column}h(null,p,s,a,d)},x.prototype.getNextFoldTo=function(h,p){for(var s,a,u=0;u<this.folds.length;u++){if(s=this.folds[u],a=s.range.compareEnd(h,p),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},x.prototype.addRemoveChars=function(h,p,s){var a=this.getNextFoldTo(h,p),u,c;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=p&&u.start.row!=h)window.console&&window.console.log(h,p,u);else if(u.start.row==h){c=this.folds;var o=c.indexOf(u);for(o===0&&(this.start.column+=s),o;o<c.length;o++){if(u=c[o],u.start.column+=s,!u.sameRow)return;u.end.column+=s}this.end.column+=s}}},x.prototype.split=function(h,p){var s=this.getNextFoldTo(h,p);if(!s||s.kind=="inside")return null;var a=s.fold,u=this.folds,c=this.foldData,o=u.indexOf(a),l=u[o-1];this.end.row=l.end.row,this.end.column=l.end.column,u=u.splice(o,u.length-o);var d=new x(c,u);return c.splice(c.indexOf(this)+1,0,d),d},x.prototype.merge=function(h){for(var p=h.folds,s=0;s<p.length;s++)this.addFold(p[s]);var a=this.foldData;a.splice(a.indexOf(h),1)},x.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(p){h.push(" "+p.toString())}),h.push("]"),h.join(`
|
196
|
+
`)},x.prototype.idxToPosition=function(h){for(var p=0,s=0;s<this.folds.length;s++){var a=this.folds[s];if(h-=a.start.column-p,h<0)return{row:a.start.row,column:a.start.column+h};if(h-=a.placeholder.length,h<0)return a.start;p=a.end.column}return{row:this.end.row,column:this.end.column+h}},x})();r.FoldLine=y}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,m){var g=e("./range").Range,y=g.comparePoints,x=(function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(p,s,a){for(var u=this.ranges,c=a||0;c<u.length;c++){var o=u[c],l=y(p,o.end);if(!(l>0)){var d=y(p,o.start);return l===0?s&&d!==0?-c-2:c:d>0||d===0&&!s?c:-c-1}}return-c-1},h.prototype.add=function(p){var s=!p.isEmpty(),a=this.pointIndex(p.start,s);a<0&&(a=-a-1);var u=this.pointIndex(p.end,s,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,p)},h.prototype.addList=function(p){for(var s=[],a=p.length;a--;)s.push.apply(s,this.add(p[a]));return s},h.prototype.substractPoint=function(p){var s=this.pointIndex(p);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var p=[],s=this.ranges;s=s.sort(function(l,d){return y(l.start,d.start)});for(var a=s[0],u,c=1;c<s.length;c++){u=a,a=s[c];var o=y(u.end,a.start);o<0||o==0&&!u.isEmpty()&&!a.isEmpty()||(y(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),s.splice(c,1),p.push(a),a=u,c--)}return this.ranges=s,p},h.prototype.contains=function(p,s){return this.pointIndex({row:p,column:s})>=0},h.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},h.prototype.rangeAtPoint=function(p){var s=this.pointIndex(p);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(p,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<p)return[];var u=this.pointIndex({row:p,column:0});u<0&&(u=-u-1);var c=this.pointIndex({row:s,column:0},u);c<0&&(c=-c-1);for(var o=[],l=u;l<c;l++)o.push(a[l]);return o},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(p){this.session&&this.detach(),this.session=p,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(p){for(var s=p.start,a=p.end,u=s.row,c=a.row,o=this.ranges,l=0,d=o.length;l<d;l++){var w=o[l];if(w.end.row>=u)break}if(p.action=="insert")for(var b=c-u,E=-s.column+a.column;l<d;l++){var w=o[l];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=b)),w.end.row==u&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&E>0&&l<d-1&&w.end.column>w.start.column&&w.end.column==o[l+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=b}}else for(var b=u-c,E=s.column-a.column;l<d;l++){var w=o[l];if(w.start.row>c)break;w.end.row<c&&(u<w.end.row||u==w.end.row&&s.column<w.end.column)?(w.end.row=u,w.end.column=s.column):w.end.row==c?w.end.column<=a.column?(b||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=E,w.end.row+=b):w.end.row>c&&(w.end.row+=b),w.start.row<c&&(u<w.start.row||u==w.start.row&&s.column<w.start.column)?(w.start.row=u,w.start.column=s.column):w.start.row==c?w.start.column<=a.column?(b||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=E,w.start.row+=b):w.start.row>c&&(w.start.row+=b)}if(b!=0&&l<d)for(;l<d;l++){var w=o[l];w.start.row+=b,w.end.row+=b}},h})();x.prototype.comparePoints=y,r.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,m){var g=this&&this.__extends||(function(){var u=function(c,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(l[w]=d[w])},u(c,o)};return function(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),y=e("../range_list").RangeList,x=(function(u){g(c,u);function c(o,l){var d=u.call(this)||this;return d.foldLine=null,d.placeholder=l,d.range=o,d.start=o.start,d.end=o.end,d.sameRow=o.start.row==o.end.row,d.subFolds=d.ranges=[],d}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(l){l.setFoldLine(o)})},c.prototype.clone=function(){var o=this.range.clone(),l=new c(o,this.placeholder);return this.subFolds.forEach(function(d){l.subFolds.push(d.clone())}),l.collapseChildren=this.collapseChildren,l},c.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){p(o,this.start);for(var l=o.start.row,d=o.start.column,w=0,b=-1;w<this.subFolds.length&&(b=this.subFolds[w].range.compare(l,d),b==1);w++);var E=this.subFolds[w],M=0;if(b==0){if(E.range.containsRange(o))return E.addSubFold(o);M=1}for(var l=o.range.end.row,d=o.range.end.column,k=w,b=-1;k<this.subFolds.length&&(b=this.subFolds[k].range.compare(l,d),b==1);k++);b==0&&k++;for(var C=this.subFolds.splice(w,k-w,o),R=b==0?C.length-1:C.length,O=M;O<R;O++)o.addSubFold(C[O]);return o.setFoldLine(this.foldLine),o}},c.prototype.restoreRange=function(o){return a(o,this.start)},c})(y);function h(u,c){u.row-=c.row,u.row==0&&(u.column-=c.column)}function p(u,c){h(u.start,c),h(u.end,c)}function s(u,c){u.row==0&&(u.column+=c.column),u.row+=c.row}function a(u,c){s(u.start,c),s(u.end,c)}r.Fold=x}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,r,m){var g=e("../range").Range,y=e("./fold_line").FoldLine,x=e("./fold").Fold,h=e("../token_iterator").TokenIterator,p=e("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,u,c){var o=this.getFoldLine(a);if(!o)return null;for(var l=o.folds,d=0;d<l.length;d++){var w=l[d].range;if(w.contains(a,u)){if(c==1&&w.isEnd(a,u)&&!w.isEmpty()||c==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return l[d]}}},this.getFoldsInRange=function(a){var u=a.start,c=a.end,o=this.$foldData,l=[];u.column+=1,c.column-=1;for(var d=0;d<o.length;d++){var w=o[d].range.compareRange(a);if(w!=2){if(w==-2)break;for(var b=o[d].folds,E=0;E<b.length;E++){var M=b[E];if(w=M.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;l.push(M)}}}}return u.column-=1,c.column+=1,l},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,c=0;c<u.length;c++)for(var o=0;o<u[c].folds.length;o++)a.push(u[c].folds[o]);return a},this.getFoldStringAt=function(a,u,c,o){if(o=o||this.getFoldLine(a),!o)return null;for(var l={end:{column:0}},d,w,b=0;b<o.folds.length;b++){w=o.folds[b];var E=w.range.compareEnd(a,u);if(E==-1){d=this.getLine(w.start.row).substring(l.end.column,w.start.column);break}else if(E===0)return null;l=w}return d||(d=this.getLine(w.start.row).substring(l.end.column)),c==-1?d.substring(0,u-l.end.column):c==1?d.substring(u-l.end.column):d},this.getFoldLine=function(a,u){var c=this.$foldData,o=0;for(u&&(o=c.indexOf(u)),o==-1&&(o=0),o;o<c.length;o++){var l=c[o];if(l.start.row<=a&&l.end.row>=a)return l;if(l.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var c=this.$foldData,o=0;for(u&&(o=c.indexOf(u)),o==-1&&(o=0),o;o<c.length;o++){var l=c[o];if(l.end.row>=a)return l}return null},this.getFoldedRowCount=function(a,u){for(var c=this.$foldData,o=u-a+1,l=0;l<c.length;l++){var d=c[l],w=d.end.row,b=d.start.row;if(w>=u){b<u&&(b>=a?o-=u-b:o=0);break}else w>=a&&(b>=a?o-=w-b:o-=w-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,c){return u.start.row-c.start.row}),a},this.addFold=function(a,u){var c=this.$foldData,o=!1,l;a instanceof x?l=a:(l=new x(u,a),l.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(l.range);var d=l.start.row,w=l.start.column,b=l.end.row,E=l.end.column,M=this.getFoldAt(d,w,1),k=this.getFoldAt(b,E,-1);if(M&&k==M)return M.addSubFold(l);M&&!M.range.isStart(d,w)&&this.removeFold(M),k&&!k.range.isEnd(b,E)&&this.removeFold(k);var C=this.getFoldsInRange(l.range);C.length>0&&(this.removeFolds(C),l.collapseChildren||C.forEach(function(I){l.addSubFold(I)}));for(var R=0;R<c.length;R++){var O=c[R];if(b==O.start.row){O.addFold(l),o=!0;break}else if(d==O.end.row){if(O.addFold(l),o=!0,!l.sameRow){var L=c[R+1];if(L&&L.start.row==b){O.merge(L);break}}break}else if(b<=O.start.row)break}return o||(O=this.$addFoldLine(new y(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(O.start.row,O.start.row):this.$updateRowLengthCache(O.start.row,O.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,c=u.start.row,o=u.end.row,l=this.$foldData,d=u.folds;if(d.length==1)l.splice(l.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))d.pop(),u.end.row=d[d.length-1].end.row,u.end.column=d[d.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))d.shift(),u.start.row=d[0].start.row,u.start.column=d[0].start.column;else if(a.sameRow)d.splice(d.indexOf(a),1);else{var w=u.split(a.start.row,a.start.column);d=w.folds,d.shift(),w.start.row=d[0].start.row,w.start.column=d[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,o):this.$updateRowLengthCache(c,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],c=0;c<a.length;c++)u.push(a[c]);u.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var c,o;if(a==null)c=new g(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")c=new g(a,0,a,this.getLine(a).length);else if("row"in a)c=g.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(d){o=o.concat(this.unfold(d))},this),o;c=a}o=this.getFoldsInRangeList(c);for(var l=o;o.length==1&&g.comparePoints(o[0].start,c.start)<0&&g.comparePoints(o[0].end,c.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(c);if(u!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var c=this.getFoldLine(a,u);return c?c.end.row:a},this.getRowFoldStart=function(a,u){var c=this.getFoldLine(a,u);return c?c.start.row:a},this.getFoldDisplayLine=function(a,u,c,o,l){o==null&&(o=a.start.row),l==null&&(l=0),u==null&&(u=a.end.row),c==null&&(c=this.getLine(u).length);var d=this.doc,w="";return a.walk(function(b,E,M,k){if(!(E<o)){if(E==o){if(M<l)return;k=Math.max(l,k)}b!=null?w+=b:w+=d.getLine(E).substring(k,M)}},u,c),w},this.getDisplayLine=function(a,u,c,o){var l=this.getFoldLine(a);if(l)return this.getFoldDisplayLine(l,a,u,c,o);var d;return d=this.doc.getLine(a),d.substring(o||0,u||d.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var c=u.folds.map(function(o){return o.clone()});return new y(a,c)}),a},this.toggleFold=function(a){var u=this.selection,c=u.getRange(),o,l;if(c.isEmpty()){var d=c.start;if(o=this.getFoldAt(d.row,d.column),o){this.expandFold(o);return}else if(a){var w=this.getFoldLine(d.row);w&&this.expandFolds(w.folds);return}else(l=this.findMatchingBracket(d))?c.comparePoint(l)==1?c.end=l:(c.start=l,c.start.column++,c.end.column--):(l=this.findMatchingBracket({row:d.row,column:d.column+1}))?(c.comparePoint(l)==1?c.end=l:c.start=l,c.start.column++):c=this.getCommentFoldRange(d.row,d.column)||c}else{var b=this.getFoldsInRange(c);if(a&&b.length){this.expandFolds(b);return}else b.length==1&&(o=b[0])}if(o||(o=this.getFoldAt(c.start.row,c.start.column)),o&&o.range.toString()==c.toString()){this.expandFold(o);return}var E="...";if(!c.isMultiLine()){if(E=this.getTextRange(c),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,c)},this.getCommentFoldRange=function(a,u,c){var o=new h(this,a,u),l=o.getCurrentToken(),d=l&&l.type;if(l&&/^comment|string/.test(d)){d=d.match(/comment|string/)[0],d=="comment"&&(d+="|doc-start|\\.doc");var w=new RegExp(d),b=new g;if(c!=1){do l=o.stepBackward();while(l&&w.test(l.type));l=o.stepForward()}b.start.row=o.getCurrentTokenRow(),b.start.column=o.getCurrentTokenColumn()+l.value.length,o=new h(this,a,u);var E=this.getState(o.$row);if(c!=-1){var M=-1;do if(l=o.stepForward(),M==-1){var k=this.getState(o.$row);E.toString()!==k.toString()&&(M=o.$row)}else if(o.$row>M)break;while(l&&w.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return b.end.row=o.getCurrentTokenRow(),b.end.column=o.getCurrentTokenColumn(),b.start.row==b.end.row&&b.start.column>b.end.column?void 0:b}},this.foldAll=function(a,u,c,o){c==null&&(c=1e5);var l=this.foldWidgets;if(l){u=u||this.getLength(),a=a||0;for(var d=a;d<u;d++)if(l[d]==null&&(l[d]=this.getFoldWidget(d)),l[d]=="start"&&!(o&&!o(d))){var w=this.getFoldWidgetRange(d);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(d=w.end.row,w.collapseChildren=c,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var c=a.getTokens(u),o=0;o<c.length;o++){var l=c[o];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.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 c=this.foldWidgets;if(!c||u&&c[a])return{};for(var o=a-1,l;o>=0;){var d=c[o];if(d==null&&(d=c[o]=this.getFoldWidget(o)),d=="start"){var w=this.getFoldWidgetRange(o);if(l||(l=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:l}},this.onFoldWidgetClick=function(a,u){u instanceof p&&(u=u.domEvent);var c={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(a,c);if(!o){var l=u.target||u.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var c=this.getFoldWidget(a),o=this.getLine(a),l=c==="end"?-1:1,d=this.getFoldAt(a,l===-1?0:o.length,l);if(d)return u.children||u.all?this.removeFold(d):this.expandFold(d),d;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(d=this.getFoldAt(w.start.row,w.start.column,1),d&&w.isEqual(d.range)))return this.removeFold(d),d;if(u.siblings){var b=this.getParentFoldRangeData(a);if(b.range)var E=b.range.start.row+1,M=b.range.end.row;this.foldAll(E,M,u.all?1e4:0)}else u.children?(M=w?w.end.row:this.getLength(),this.foldAll(a+1,M,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var c=this.$toggleFoldWidget(u,{});if(!c){var o=this.getParentFoldRangeData(u,!0);if(c=o.range||o.firstRange,c){u=c.start.row;var l=this.getFoldAt(u,this.getLine(u).length,1);l?this.removeFold(l):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var u=a.start.row,c=a.end.row-u;if(c===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,c+1,null);else{var o=Array(c+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,m){var g=e("../token_iterator").TokenIterator,y=e("../range").Range;function x(){this.findMatchingBracket=function(h,p){if(h.column==0)return null;var s=p||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h):null},this.getBracketRange=function(h){var p=this.getLine(h.row),s=!0,a,u=p.charAt(h.column-1),c=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(c||(u=p.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!c)return null;if(c[1]){var o=this.$findClosingBracket(c[1],h);if(!o)return null;a=y.fromPoints(h,o),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(c[2],h);if(!o)return null;a=y.fromPoints(o,h),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,p){var s=this.getLine(h.row),a=/([\(\[\{])|([\)\]\}])/,u=!p&&s.charAt(h.column-1),c=u&&u.match(a);if(c||(u=(p===void 0||p)&&s.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(a)),!c)return null;var o=new y(h.row,h.column-1,h.row,h.column),l=c[1]?this.$findClosingBracket(c[1],h):this.$findOpeningBracket(c[2],h);if(!l)return[o];var d=new y(l.row,l.column,l.row,l.column+1);return[o,d]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,p,s){var a=this.$brackets[h],u=1,c=new g(this,p.row,p.column),o=c.getCurrentToken();if(o||(o=c.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=p.column-c.getCurrentTokenColumn()-2,d=o.value;;){for(;l>=0;){var w=d.charAt(l);if(w==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else w==h&&(u+=1);l-=1}do o=c.stepBackward();while(o&&!s.test(o.type));if(o==null)break;d=o.value,l=d.length-1}return null}},this.$findClosingBracket=function(h,p,s){var a=this.$brackets[h],u=1,c=new g(this,p.row,p.column),o=c.getCurrentToken();if(o||(o=c.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=p.column-c.getCurrentTokenColumn();;){for(var d=o.value,w=d.length;l<w;){var b=d.charAt(l);if(b==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else b==h&&(u+=1);l+=1}do o=c.stepForward();while(o&&!s.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(h){var p=new g(this,h.row,h.column),s=this.$findTagName(p);if(s){var a=p.stepBackward();return a.value==="<"?this.$findClosingTag(p,s):this.$findOpeningTag(p,s)}},this.$findTagName=function(h){var p=h.getCurrentToken(),s=!1,a=!1;if(p&&p.type.indexOf("tag-name")===-1)do a?p=h.stepBackward():p=h.stepForward(),p&&(p.value==="/>"?a=!0:p.type.indexOf("tag-name")!==-1&&(s=!0));while(p&&!s);return p},this.$findClosingTag=function(h,p){var s,a=p.value,u=p.value,c=0,o=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);p=h.stepForward();var l=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+p.value.length),d=!1;do{if(s=p,s.type.indexOf("tag-close")!==-1&&!d){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(p=h.stepForward(),p){if(p.value===">"&&!d){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(p.type.indexOf("tag-name")!==-1){if(a=p.value,u===a){if(s.value==="<")c++;else if(s.value==="</"&&(c--,c<0)){h.stepBackward();var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);p=h.stepForward();var E=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=h.stepForward()),p&&p.value===">")var M=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(u===a&&p.value==="/>"&&(c--,c<0))var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),E=b,M=E,w=new y(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(p&&c>=0);if(o&&w&&b&&M&&l&&E)return{openTag:new y(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new y(b.start.row,b.start.column,M.end.row,M.end.column),openTagName:l,closeTagName:E}},this.$findOpeningTag=function(h,p){var s=h.getCurrentToken(),a=p.value,u=0,c=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),l=o+2,d=new y(c,o,c,l);h.stepForward();var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=h.stepForward()),!(!p||p.value!==">")){var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(p=s,c=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),l=o+p.value.length,s=h.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(a===p.value)if(s.value==="<"){if(u++,u>0){var E=new y(c,o,c,l),M=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do p=h.stepForward();while(p&&p.value!==">");var k=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&u--}else if(p.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){u--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var O=0;O<C;O++)h.stepForward()}}while(s&&u<=0);if(M&&k&&d&&b&&E&&w)return{openTag:new y(M.start.row,M.start.column,k.end.row,k.end.column),closeTag:new y(d.start.row,d.start.column,b.end.row,b.end.column),openTagName:E,closeTagName:w}}}}r.BracketMatch=x}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,r,m){var g=e("./lib/oop"),y=e("./lib/lang"),x=e("./bidihandler").BidiHandler,h=e("./config"),p=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,a=e("./mode/text").Mode,u=e("./range").Range,c=e("./line_widgets").LineWidgets,o=e("./document").Document,l=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,b=(function(){function P(N,_){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"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
|
197
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new a().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(D){S._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof N!="object"||!N.getLine)&&(N=new o(N)),this.setDocument(N),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),h.resetOptions(this),this.setMode(_),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var N=this;this.curOp=null,this.on("change",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.docChanged=!0},!0),this.on("changeSelection",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.selectionChanged=!0},!0),this.$operationResetTimer=y.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(N){if(this.curOp){if(!N||this.curOp.command)return;this.prevOp=this.curOp}N||(N={}),this.$operationResetTimer.schedule(),this.curOp={command:N.command||{},args:N.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",N)},P.prototype.endOperation=function(N){if(this.curOp){if(N&&N.returnValue===!1){this.curOp=null,this._signal("endOperation",N);return}if(N==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(_),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",N)}},P.prototype.setDocument=function(N){this.doc&&this.doc.off("change",this.$onChange),this.doc=N,N.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var N=new c(this);return this.widgetManager=N,this.$editor&&N.attach(this.$editor),N},set:function(N){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:N})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(N){if(!N){this.$docRowCache=[],this.$screenRowCache=[];return}var _=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,N)+1;_>S&&(this.$docRowCache.splice(S,_),this.$screenRowCache.splice(S,_))},P.prototype.$getRowCacheIndex=function(N,_){for(var S=0,D=N.length-1;S<=D;){var j=S+D>>1,U=N[j];if(_>U)S=j+1;else if(_<U)D=j-1;else return j}return S-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(N){var _=N.data;this.$resetRowCache(_.start.row)},P.prototype.onChange=function(N){this.$modified=!0,this.$bidiHandler.onChange(N),this.$resetRowCache(N.start.row);var _=this.$updateInternalDataOnChange(N);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(N,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(N),this._signal("change",N)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(N){this.doc.setValue(N),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(N){typeof N=="string"&&(N=JSON.parse(N));var _=new w;_.$undoStack=N.history.undo,_.$redoStack=N.history.redo,_.mark=N.history.mark,_.$rev=N.history.rev;var S=new P(N.value);return N.folds.forEach(function(D){S.addFold("...",u.fromPoints(D.start,D.end))}),S.setAnnotations(N.annotations),S.setBreakpoints(N.breakpoints),S.setMode(N.mode),S.setScrollLeft(N.scrollLeft),S.setScrollTop(N.scrollTop),S.setUndoManager(_),S.selection.fromJSON(N.selection),S},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(N){return N.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(N){return this.bgTokenizer.getState(N)},P.prototype.getTokens=function(N){return this.bgTokenizer.getTokens(N)},P.prototype.getTokenAt=function(N,_){var S=this.bgTokenizer.getTokens(N),D,j=0;if(_==null){var U=S.length-1;j=this.getLine(N).length}else for(var U=0;U<S.length&&(j+=S[U].value.length,!(j>=_));U++);return D=S[U],D?(D.index=U,D.start=j-D.value.length,D):null},P.prototype.setUndoManager=function(N){if(this.$undoManager=N,this.$informUndoManager&&this.$informUndoManager.cancel(),N){var _=this;N.addSession(this),this.$syncInformUndoManager=function(){_.$informUndoManager.cancel(),_.mergeUndoDeltas=!1},this.$informUndoManager=y.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?y.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(N){this.setOption("useSoftTabs",N)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(N){this.setOption("tabSize",N)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(N){return this.$useSoftTabs&&N.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(N){this.setOption("navigateWithinSoftTabs",N)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(N){this.setOption("overwrite",N)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(N,_){this.$decorations[N]||(this.$decorations[N]=""),this.$decorations[N]+=" "+_,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(N){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(N)},P.prototype.addGutterCustomWidget=function(N,_){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(N,_)},P.prototype.removeGutterDecoration=function(N,_){this.$decorations[N]=(this.$decorations[N]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(N){this.$breakpoints=[];for(var _=0;_<N.length;_++)this.$breakpoints[N[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(N,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[N]=_:delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(N){delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(N,_,S,D){var j=this.$markerId++,U={range:N,type:S||"line",renderer:typeof S=="function"?S:null,clazz:_,inFront:!!D,id:j};return D?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},P.prototype.addDynamicMarker=function(N,_){if(N.update){var S=this.$markerId++;return N.id=S,N.inFront=!!_,_?(this.$frontMarkers[S]=N,this._signal("changeFrontMarker")):(this.$backMarkers[S]=N,this._signal("changeBackMarker")),N}},P.prototype.removeMarker=function(N){var _=this.$frontMarkers[N]||this.$backMarkers[N];if(_){var S=_.inFront?this.$frontMarkers:this.$backMarkers;delete S[N],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(N){return N?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(N){if(!this.$searchHighlight){var _=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(N)},P.prototype.highlightLines=function(N,_,S,D){typeof _!="number"&&(S=_,_=N),S||(S="ace_step");var j=new u(N,0,_,1/0);return j.id=this.addMarker(j,S,"fullLine",D),j},P.prototype.setAnnotations=function(N){this.$annotations=N,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(N){var _=N.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(N,_){var S=this.getLine(N),D=!1;if(_>0&&(D=!!S.charAt(_-1).match(this.tokenRe)),D||(D=!!S.charAt(_).match(this.tokenRe)),D)var j=this.tokenRe;else if(/^\s+$/.test(S.slice(_-1,_+1)))var j=/\s/;else var j=this.nonTokenRe;var U=_;if(U>0){do U--;while(U>=0&&S.charAt(U).match(j));U++}for(var G=_;G<S.length&&S.charAt(G).match(j);)G++;return new u(N,U,N,G)},P.prototype.getAWordRange=function(N,_){for(var S=this.getWordRange(N,_),D=this.getLine(S.end.row);D.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},P.prototype.setNewLineMode=function(N){this.doc.setNewLineMode(N)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(N){this.setOption("useWorker",N)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(N){var _=N.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",N)},P.prototype.setMode=function(N,_){if(N&&typeof N=="object"){if(N.getTokenizer)return this.$onChangeMode(N);var S=N,D=S.path}else D=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!S){this.$onChangeMode(this.$modes[D]),_&&_();return}this.$modeId=D,h.loadModule(["mode",D],(function(j){if(!this.destroyed){if(this.$modeId!==D)return _&&_();this.$modes[D]&&!S?this.$onChangeMode(this.$modes[D]):j&&j.Mode&&(j=new j.Mode(S),S||(this.$modes[D]=j,j.$id=D),this.$onChangeMode(j)),_&&_()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(N,_){if(_||(this.$modeId=N.$id),this.$mode!==N){var S=this.$mode;this.$mode=N,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=N.getTokenizer();if(D.on!==void 0){var j=this.onReloadTokenizer.bind(this);D.on("update",j)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=N.tokenRe,this.nonTokenRe=N.nonTokenRe,_||(N.attachToSession&&N.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(N.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:S,mode:N}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(N){h.warn("Could not load worker",N),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(N){this.$scrollTop===N||isNaN(N)||(this.$scrollTop=N,this._signal("changeScrollTop",N))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(N){this.$scrollLeft===N||isNaN(N)||(this.$scrollLeft=N,this._signal("changeScrollLeft",N))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var N=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>N&&(N=_.screenWidth)}),this.lineWidgetWidth=N},P.prototype.$computeWidth=function(N){if(this.$modified||N){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),S=this.$rowLengthCache,D=0,j=0,U=this.$foldData[j],G=U?U.start.row:1/0,Z=_.length,te=0;te<Z;te++){if(te>G){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[j++],G=U?U.start.row:1/0}S[te]==null&&(S[te]=this.$getStringScreenWidth(_[te])[0]),S[te]>D&&(D=S[te])}this.screenWidth=D}},P.prototype.getLine=function(N){return this.doc.getLine(N)},P.prototype.getLines=function(N,_){return this.doc.getLines(N,_)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(N){return this.doc.getTextRange(N||this.selection.getRange())},P.prototype.insert=function(N,_){return this.doc.insert(N,_)},P.prototype.remove=function(N){return this.doc.remove(N)},P.prototype.removeFullLines=function(N,_){return this.doc.removeFullLines(N,_)},P.prototype.undoChanges=function(N,_){if(N.length){this.$fromUndo=!0;for(var S=N.length-1;S!=-1;S--){var D=N[S];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!_&&this.$undoSelect&&(N.selectionBefore?this.selection.fromJSON(N.selectionBefore):this.selection.setRange(this.$getUndoSelection(N,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(N,_){if(N.length){this.$fromUndo=!0;for(var S=0;S<N.length;S++){var D=N[S];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!_&&this.$undoSelect&&(N.selectionAfter?this.selection.fromJSON(N.selectionAfter):this.selection.setRange(this.$getUndoSelection(N,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(N){this.$undoSelect=N},P.prototype.$getUndoSelection=function(N,_){function S(Z){return _?Z.action!=="insert":Z.action==="insert"}for(var D,j,U=0;U<N.length;U++){var G=N[U];if(G.start){if(!D){S(G)?D=u.fromPoints(G.start,G.end):D=u.fromPoints(G.start,G.start);continue}S(G)?(j=G.start,D.compare(j.row,j.column)==-1&&D.setStart(j),j=G.end,D.compare(j.row,j.column)==1&&D.setEnd(j)):(j=G.start,D.compare(j.row,j.column)==-1&&(D=u.fromPoints(G.start,G.start)))}}return D},P.prototype.replace=function(N,_){return this.doc.replace(N,_)},P.prototype.moveText=function(N,_,S){var D=this.getTextRange(N),j=this.getFoldsInRange(N),U=u.fromPoints(_,_);if(!S){this.remove(N);var G=N.start.row-N.end.row,Z=G?-N.end.column:N.start.column-N.end.column;Z&&(U.start.row==N.end.row&&U.start.column>N.end.column&&(U.start.column+=Z),U.end.row==N.end.row&&U.end.column>N.end.column&&(U.end.column+=Z)),G&&U.start.row>=N.end.row&&(U.start.row+=G,U.end.row+=G)}if(U.end=this.insert(U.start,D),j.length){var te=N.start,he=U.start,G=he.row-te.row,Z=he.column-te.column;this.addFolds(j.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Z),ue.end.row==te.row&&(ue.end.column+=Z),ue.start.row+=G,ue.end.row+=G,ue}))}return U},P.prototype.indentRows=function(N,_,S){S=S.replace(/\t/g,this.getTabString());for(var D=N;D<=_;D++)this.doc.insertInLine({row:D,column:0},S)},P.prototype.outdentRows=function(N){for(var _=N.collapseRows(),S=new u(0,0,0,0),D=this.getTabSize(),j=_.start.row;j<=_.end.row;++j){var U=this.getLine(j);S.start.row=j,S.end.row=j;for(var G=0;G<D&&U.charAt(G)==" ";++G);G<D&&U.charAt(G)==" "?(S.start.column=G,S.end.column=G+1):(S.start.column=0,S.end.column=G),this.remove(S)}},P.prototype.$moveLines=function(N,_,S){if(N=this.getRowFoldStart(N),_=this.getRowFoldEnd(_),S<0){var D=this.getRowFoldStart(N+S);if(D<0)return 0;var j=D-N}else if(S>0){var D=this.getRowFoldEnd(_+S);if(D>this.doc.getLength()-1)return 0;var j=D-_}else{N=this.$clipRowToDocument(N),_=this.$clipRowToDocument(_);var j=_-N+1}var U=new u(N,0,_,Number.MAX_VALUE),G=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=j,te.end.row+=j,te}),Z=S==0?this.doc.getLines(N,_):this.doc.removeFullLines(N,_);return this.doc.insertFullLines(N+j,Z),G.length&&this.addFolds(G),j},P.prototype.moveLinesUp=function(N,_){return this.$moveLines(N,_,-1)},P.prototype.moveLinesDown=function(N,_){return this.$moveLines(N,_,1)},P.prototype.duplicateLines=function(N,_){return this.$moveLines(N,_,0)},P.prototype.$clipRowToDocument=function(N){return Math.max(0,Math.min(N,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(N,_){return _<0?0:Math.min(this.doc.getLine(N).length,_)},P.prototype.$clipPositionToDocument=function(N,_){if(_=Math.max(0,_),N<0)N=0,_=0;else{var S=this.doc.getLength();N>=S?(N=S-1,_=this.doc.getLine(S-1).length):_=Math.min(this.doc.getLine(N).length,_)}return{row:N,column:_}},P.prototype.$clipRangeToDocument=function(N){N.start.row<0?(N.start.row=0,N.start.column=0):N.start.column=this.$clipColumnToRow(N.start.row,N.start.column);var _=this.doc.getLength()-1;return N.end.row>_?(N.end.row=_,N.end.column=this.doc.getLine(_).length):N.end.column=this.$clipColumnToRow(N.end.row,N.end.column),N},P.prototype.setUseWrapMode=function(N){if(N!=this.$useWrapMode){if(this.$useWrapMode=N,this.$modified=!0,this.$resetRowCache(0),N){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(N,_){(this.$wrapLimitRange.min!==N||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:N,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(N,_){var S=this.$wrapLimitRange;S.max<0&&(S={min:_,max:_});var D=this.$constrainWrapLimit(N,S.min,S.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(N,_,S){return _&&(N=Math.max(_,N)),S&&(N=Math.min(S,N)),N},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(N){this.setWrapLimitRange(N,N)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(N){var _=this.$useWrapMode,S=N.action,D=N.start,j=N.end,U=D.row,G=j.row,Z=G-U,te=null;if(this.$updating=!0,Z!=0)if(S==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(N),this.removeFolds(te);var ne=this.getFoldLine(j.row),le=0;if(ne){ne.addRemoveChars(j.row,j.column,D.column-j.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=j.row&&ne.shiftRow(-Z)}G=U}else{var ce=Array(Z);ce.unshift(U,0);var fe=_?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ce);var he=this.$foldData,ne=this.getFoldLine(U),le=0;if(ne){var _e=ne.range.compareInside(D.row,D.column);_e==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(G,0,j.column-D.column))):_e==-1&&(ne.addRemoveChars(U,0,j.column-D.column),ne.shiftRow(Z)),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(N.start.column-N.end.column),S==="remove"&&(te=this.getFoldsInRange(N),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Z)}return _&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,_?this.$updateWrapData(U,G):this.$updateRowLengthCache(U,G),te},P.prototype.$updateRowLengthCache=function(N,_){this.$rowLengthCache[N]=null,this.$rowLengthCache[_]=null},P.prototype.$updateWrapData=function(N,_){var S=this.doc.getAllLines(),D=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,G,Z,te=N;for(_=Math.min(_,S.length-1);te<=_;)Z=this.getFoldLine(te,Z),Z?(G=[],Z.walk((function(he,ne,le,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,G.length),ce[0]=k;for(var fe=1;fe<ce.length;fe++)ce[fe]=C}else ce=this.$getDisplayTokens(S[ne].substring(ue,le),G.length);G=G.concat(ce)}).bind(this),Z.end.row,S[Z.end.row].length+1),j[Z.start.row]=this.$computeWrapSplits(G,U,D),te=Z.end.row+1):(G=this.$getDisplayTokens(S[te]),j[te]=this.$computeWrapSplits(G,U,D),te++)},P.prototype.$computeWrapSplits=function(N,_,S){if(N.length==0)return[];var D=[],j=N.length,U=0,G=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=_<=Math.max(2*S,8)||te===!1?0:Math.floor(_/2);function ne(){var _e=0;if(he===0)return _e;if(te)for(var $e=0;$e<N.length;$e++){var Te=N[$e];if(Te==O)_e+=1;else if(Te==L)_e+=S;else{if(Te==I)continue;break}}return Z&&te!==!1&&(_e+=S),Math.min(_e,he)}function le(_e){for(var $e=_e-U,Te=U;Te<_e;Te++){var Ge=N[Te];(Ge===12||Ge===2)&&($e-=1)}D.length||(ue=ne(),D.indent=ue),G+=$e,D.push(G),U=_e}for(var ue=0;j-U>_-ue;){var ce=U+_-ue;if(N[ce-1]>=O&&N[ce]>=O){le(ce);continue}if(N[ce]==k||N[ce]==C){for(ce;ce!=U-1&&N[ce]!=k;ce--);if(ce>U){le(ce);continue}for(ce=U+_,ce;ce<N.length&&N[ce]==C;ce++);if(ce==N.length)break;le(ce);continue}for(var fe=Math.max(ce-(_-(_>>2)),U-1);ce>fe&&N[ce]<k;)ce--;if(Z){for(;ce>fe&&N[ce]<k;)ce--;for(;ce>fe&&N[ce]==R;)ce--}else for(;ce>fe&&N[ce]<O;)ce--;if(ce>fe){le(++ce);continue}ce=U+_,N[ce]==M&&ce--,le(ce-ue)}return D},P.prototype.$getDisplayTokens=function(N,_){var S=[],D;_=_||0;for(var j=0;j<N.length;j++){var U=N.charCodeAt(j);if(U==9){D=this.getScreenTabSize(S.length+_),S.push(L);for(var G=1;G<D;G++)S.push(I)}else U==32?S.push(O):U>39&&U<48||U>57&&U<64?S.push(R):U>=4352&&z(U)?S.push(E,M):S.push(E)}return S},P.prototype.$getStringScreenWidth=function(N,_,S){if(_==0)return[0,0];_==null&&(_=1/0),S=S||0;var D,j;for(j=0;j<N.length&&(D=N.charCodeAt(j),D==9?S+=this.getScreenTabSize(S):D>=4352&&z(D)?S+=2:S+=1,!(S>_));j++);return[S,j]},P.prototype.getRowLength=function(N){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[N]&&this.lineWidgets[N].rowCount||0),!this.$useWrapMode||!this.$wrapData[N]?_:this.$wrapData[N].length+_},P.prototype.getRowLineCount=function(N){return!this.$useWrapMode||!this.$wrapData[N]?1:this.$wrapData[N].length+1},P.prototype.getRowWrapIndent=function(N){if(this.$useWrapMode){var _=this.screenToDocumentPosition(N,Number.MAX_VALUE),S=this.$wrapData[_.row];return S.length&&S[0]<_.column?S.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(N){var _=this.screenToDocumentPosition(N,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},P.prototype.getDocumentLastRowColumn=function(N,_){var S=this.documentToScreenRow(N,_);return this.getScreenLastRowColumn(S)},P.prototype.getDocumentLastRowColumnPosition=function(N,_){var S=this.documentToScreenRow(N,_);return this.screenToDocumentPosition(S,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(N){if(this.$useWrapMode)return this.$wrapData[N]},P.prototype.getScreenTabSize=function(N){return this.$tabSize-(N%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(N,_){return this.screenToDocumentPosition(N,_).row},P.prototype.screenToDocumentColumn=function(N,_){return this.screenToDocumentPosition(N,_).column},P.prototype.screenToDocumentPosition=function(N,_,S){if(N<0)return{row:0,column:0};var D,le=0,j=0,U,ne=0,G=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,N),he=Z.length;if(he&&te>=0)var ne=Z[te],le=this.$docRowCache[te],ue=N>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,fe=this.getNextFoldLine(le),_e=fe?fe.start.row:1/0;ne<=N&&(G=this.getRowLength(le),!(ne+G>N||le>=ce));)ne+=G,le++,le>_e&&(le=fe.end.row+1,fe=this.getNextFoldLine(le,fe),_e=fe?fe.start.row:1/0),ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne));if(fe&&fe.start.row<=le)D=this.getFoldDisplayLine(fe),le=fe.start.row;else{if(ne+G<=N||le>ce)return{row:ce,column:this.getLine(ce).length};D=this.getLine(le),fe=null}var $e=0,Te=Math.floor(N-ne);if(this.$useWrapMode){var Ge=this.$wrapData[le];Ge&&(U=Ge[Te],Te>0&&Ge.length&&($e=Ge.indent,j=Ge[Te-1]||Ge[Ge.length-1],D=D.substring(j)))}return S!==void 0&&this.$bidiHandler.isBidiRow(ne+Te,le,Te)&&(_=this.$bidiHandler.offsetToCol(S)),j+=this.$getStringScreenWidth(D,_-$e)[1],this.$useWrapMode&&j>=U&&(j=U-1),fe?fe.idxToPosition(j):{row:le,column:j}},P.prototype.documentToScreenPosition=function(N,_){if(typeof _>"u")var S=this.$clipPositionToDocument(N.row,N.column);else S=this.$clipPositionToDocument(N,_);N=S.row,_=S.column;var ne=0,D=null,j=null;j=this.getFoldAt(N,_,1),j&&(N=j.start.row,_=j.start.column);var U,he=0,G=this.$docRowCache,Z=this.$getRowCacheIndex(G,N),te=G.length;if(te&&Z>=0)var he=G[Z],ne=this.$screenRowCache[Z],le=N>G[te-1];else var le=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<N;){if(he>=ce){if(U=ue.end.row+1,U>N)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,le&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var fe="";ue&&he>=ce?(fe=this.getFoldDisplayLine(ue,N,_),D=ue.start.row):(fe=this.getLine(N).substring(0,_),D=N);var _e=0;if(this.$useWrapMode){var $e=this.$wrapData[D];if($e){for(var Te=0;fe.length>=$e[Te];)ne++,Te++;fe=fe.substring($e[Te-1]||0,fe.length),_e=Te>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:_e+this.$getStringScreenWidth(fe)[0]}},P.prototype.documentToScreenColumn=function(N,_){return this.documentToScreenPosition(N,_).column},P.prototype.documentToScreenRow=function(N,_){return this.documentToScreenPosition(N,_).row},P.prototype.getScreenLength=function(){var N=0,_=null;if(this.$useWrapMode)for(var S=this.$wrapData.length,D=0,j=0,_=this.$foldData[j++],U=_?_.start.row:1/0;D<S;){var G=this.$wrapData[D];N+=G?G.length+1:1,D++,D>U&&(D=_.end.row+1,_=this.$foldData[j++],U=_?_.start.row:1/0)}else{N=this.getLength();for(var Z=this.$foldData,j=0;j<Z.length;j++)_=Z[j],N-=_.end.row-_.start.row}return this.lineWidgets&&(N+=this.$getWidgetScreenLength()),N},P.prototype.$setFontMetrics=function(N){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,S,D){if(S===0)return[0,0];S||(S=1/0),D=D||0;var j,U;for(U=0;U<_.length&&(j=_.charAt(U),j===" "?D+=this.getScreenTabSize(D):D+=N.getCharacterWidth(j),!(D>S));U++);return[D,U]})},P.prototype.getPrecedingCharacter=function(){var N=this.selection.getCursor();if(N.column===0)return N.row===0?"":this.doc.getNewLineCharacter();var _=this.getLine(N.row);return _[N.column-1]},P.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()},P})();b.$uid=0,b.prototype.$modes=h.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=z,g.implement(b.prototype,p);var E=1,M=2,k=3,C=4,R=9,O=10,L=11,I=12;function z(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}e("./edit_session/folding").Folding.call(b.prototype),e("./edit_session/bracket_match").BracketMatch.call(b.prototype),h.defineOptions(b.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var N=typeof P=="number"?P:null;this.setWrapLimitRange(N,N),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,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(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,m){var g=e("./lib/lang"),y=e("./lib/oop"),x=e("./range").Range,h=(function(){function u(){this.$options={}}return u.prototype.set=function(c){return y.mixin(this.$options,c),this},u.prototype.getOptions=function(){return g.copyObject(this.$options)},u.prototype.setOptions=function(c){this.$options=c},u.prototype.find=function(c){var o=this.$options,l=this.$matchIterator(c,o);if(!l)return!1;var d=null;return l.forEach(function(w,b,E,M){return d=new x(w,b,E,M),b==M&&o.start&&o.start.start&&o.skipCurrent!=!1&&d.isEqual(o.start)?(d=null,!1):!0}),d},u.prototype.findAll=function(c){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var l=o.range,d=l?c.getLines(l.start.row,l.end.row):c.doc.getAllLines(),w=[],b=o.re;if(o.$isMultiLine){var E=b.length,M=d.length-E,k;e:for(var C=b.offset||0;C<=M;C++){for(var R=0;R<E;R++)if(d[C+R].search(b[R])==-1)continue e;var O=d[C],L=d[C+E-1],I=O.length-O.match(b[0])[0].length,z=L.match(b[E-1])[0].length;k&&k.end.row===C&&k.end.column>I||(w.push(k=new x(C,I,C+E-1,z)),E>2&&(C=C+E-2))}}else for(var P,N=0;N<d.length;N++)if(this.$isMultilineSearch(o)){var _=d.length-1;if(P=this.$multiLineForward(c,b,N,_),P){var S=P.endRow<=_?P.endRow-1:_;S>N&&(N=S),w.push(new x(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=g.getMatchOffsets(d[N],b);for(var R=0;R<P.length;R++){var D=P[R];w.push(new x(N,D.offset,N,D.offset+D.length))}}if(l){for(var j=l.start.column,U=l.end.column,N=0,R=w.length-1;N<R&&w[N].start.column<j&&w[N].start.row==0;)N++;for(var G=l.end.row-l.start.row;N<R&&w[R].end.column>U&&w[R].end.row==G;)R--;for(w=w.slice(N,R+1),N=0,R=w.length;N<R;N++)w[N].start.row+=l.start.row,w[N].end.row+=l.start.row}return w},u.prototype.parseReplaceString=function(c){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",d=0,w=c.length;d<w;d++){var b=c.charCodeAt(d);if(b===o.Backslash){if(d++,d>=w){l+="\\";break}var E=c.charCodeAt(d);switch(E){case o.Backslash:l+="\\";break;case o.n:l+=`
|
199
|
+
`;break;case o.t:l+=" ";break}continue}if(b===o.DollarSign){if(d++,d>=w){l+="$";break}var M=c.charCodeAt(d);if(M===o.DollarSign){l+="$$";continue}if(M===o.Digit0||M===o.Ampersand){l+="$&";continue}if(o.Digit1<=M&&M<=o.Digit9){l+="$"+c[d];continue}}l+=c[d]}return l||c},u.prototype.replace=function(c,o){var l=this.$options,d=this.$assembleRegExp(l);if(l.$isMultiLine)return o;if(d){var w=this.$isMultilineSearch(l);w&&(c=c.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var b=d.exec(c);if(!b||!w&&b[0].length!=c.length)return null;if(o=l.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=c.replace(d,o),l.preserveCase){o=o.split("");for(var E=Math.min(c.length,c.length);E--;){var M=c[E];M&&M.toLowerCase()!=M?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(c,o){if(c.needle instanceof RegExp)return c.re=c.needle;var l=c.needle;if(!c.needle)return c.re=!1;c.regExp||(l=g.escapeRegExp(l));var d=c.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),c.$supportsUnicodeFlag=!0,d+="u"}catch{c.$supportsUnicodeFlag=!1}if(c.wholeWord&&(l=p(l,c)),c.$isMultiLine=!o&&/[\n\r]/.test(l),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(l,d);try{var w=new RegExp(l,d)}catch{w=!1}return c.re=w},u.prototype.$assembleMultilineRegExp=function(c,o){for(var l=c.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),d=[],w=0;w<l.length;w++)try{d.push(new RegExp(l[w],o))}catch{return!1}return d},u.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},u.prototype.$multiLineForward=function(c,o,l,d){for(var w,b=a(c,l),E=l;E<=d;){for(var M=0;M<b&&!(E>d);M++){var k=c.getLine(E++);w=w==null?k:w+`
|
203
|
+
`+k}var C=o.exec(w);if(o.lastIndex=0,C){var R=w.slice(0,C.index).split(`
|
204
|
+
`),O=C[0].split(`
|
205
|
+
`),L=l+R.length-1,I=R[R.length-1].length,z=L+O.length-1,P=O.length==1?I+O[0].length:O[O.length-1].length;return{startRow:L,startCol:I,endRow:z,endCol:P}}}return null},u.prototype.$multiLineBackward=function(c,o,l,d,w){for(var b,E=a(c,d),M=c.getLine(d).length-l,k=d;k>=w;){for(var C=0;C<E&&k>=w;C++){var R=c.getLine(k--);b=b==null?R:R+`
|
206
|
+
`+b}var O=s(b,o,M);if(O){var L=b.slice(0,O.index).split(`
|
207
|
+
`),I=O[0].split(`
|
208
|
+
`),z=k+L.length,P=L[L.length-1].length,N=z+I.length-1,_=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:z,startCol:P,endRow:N,endCol:_}}}return null},u.prototype.$matchIterator=function(c,o){var l=this.$assembleRegExp(o);if(!l)return!1;var d=this.$isMultilineSearch(o),w=this.$multiLineForward,b=this.$multiLineBackward,E=o.backwards==!0,M=o.skipCurrent!=!1,k=l.unicode,C=o.range,R=o.start;R||(R=C?C[E?"end":"start"]:c.selection.getRange()),R.start&&(R=R[M!=E?"end":"start"]);var O=C?C.start.row:0,L=C?C.end.row:c.getLength()-1;if(E)var I=function(N){var _=R.row;if(!P(_,R.column,N)){for(_--;_>=O;_--)if(P(_,Number.MAX_VALUE,N))return;if(o.wrap!=!1){for(_=L,O=R.row;_>=O;_--)if(P(_,Number.MAX_VALUE,N))return}}};else var I=function(N){var _=R.row;if(!P(_,R.column,N)){for(_=_+1;_<=L;_++)if(P(_,0,N))return;if(o.wrap!=!1){for(_=O,L=R.row;_<=L;_++)if(P(_,0,N))return}}};if(o.$isMultiLine)var z=l.length,P=function(N,_,S){var D=E?N-z+1:N;if(!(D<0||D+z>c.getLength())){var j=c.getLine(D),U=j.search(l[0]);if(!(!E&&U<_||U===-1)){for(var G=1;G<z;G++)if(j=c.getLine(D+G),j.search(l[G])==-1)return;var Z=j.match(l[z-1])[0].length;if(!(E&&Z>_)&&S(D,U,D+z-1,Z))return!0}}};else if(E)var P=function(N,_,S){if(d){var D=b(c,l,_,N,O);if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var j=c.getLine(N),U=[],G,Z=0;for(l.lastIndex=0;G=l.exec(j);){var te=G[0].length;if(Z=G.index,!te){if(Z>=j.length)break;l.lastIndex=Z+=g.skipEmptyMatch(j,Z,k)}if(G.index+te>_)break;U.push(G.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(S(N,ne,N,ne+te))return!0}}};else var P=function(N,_,S){if(l.lastIndex=_,d){var D=w(c,l,N,L);if(D){var j=D.endRow<=L?D.endRow-1:L;j>N&&(N=j)}if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=c.getLine(N),G,Z;Z=l.exec(U);){var te=Z[0].length;if(G=Z.index,S(N,G,N,G+te))return!0;if(!te&&(l.lastIndex=G+=g.skipEmptyMatch(U,G,k),G>=U.length))return!1}};return{forEach:I}},u})();function p(u,c){var o=g.supportsLookbehind();function l(E,M){M===void 0&&(M=!0);var k=o&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(E)||c.regExp?o&&c.$supportsUnicodeFlag?M?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var d=Array.from(u),w=d[0],b=d[d.length-1];return l(w)+u+l(b,!1)}function s(u,c,o){for(var l=null,d=0;d<=u.length;){c.lastIndex=d;var w=c.exec(u);if(!w)break;var b=w.index+w[0].length;if(b>u.length-o)break;(!l||b>l.index+l[0].length)&&(l=w),d=w.index+1}return l}function a(u,c){var o=5e3,l={row:c,column:0},d=u.doc.positionToIndex(l),w=d+o,b=u.doc.indexToPosition(w),E=b.row;return E+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var g=this&&this.__extends||(function(){var u=function(c,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(l[w]=d[w])},u(c,o)};return function(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),y=e("../lib/keys"),x=e("../lib/useragent"),h=y.KEY_MODS,p=(function(){function u(c,o){this.$init(c,o,!1)}return u.prototype.$init=function(c,o,l){this.platform=o||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=l},u.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},u.prototype.removeCommand=function(c,o){var l=c&&(typeof c=="string"?c:c.name);c=this.commands[l],o||delete this.commands[l];var d=this.commandKeyBinding;for(var w in d){var b=d[w];if(b==c)delete d[w];else if(Array.isArray(b)){var E=b.indexOf(c);E!=-1&&(b.splice(E,1),b.length==1&&(d[w]=b[0]))}}},u.prototype.bindKey=function(c,o,l){if(typeof c=="object"&&c&&(l==null&&(l=c.position),c=c[this.platform]),!!c){if(typeof o=="function")return this.addCommand({exec:o,bindKey:c,name:o.name||c});c.split("|").forEach(function(d){var w="";if(d.indexOf(" ")!=-1){var b=d.split(/\s+/);d=b.pop(),b.forEach(function(k){var C=this.parseKeys(k),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(d),M=h[E.hashId]+E.key;this._addCommandToBinding(w+M,o,l)},this)}},u.prototype._addCommandToBinding=function(c,o,l){var d=this.commandKeyBinding,w;if(!o)delete d[c];else if(!d[c]||this.$singleCommand)d[c]=o;else{Array.isArray(d[c])?(w=d[c].indexOf(o))!=-1&&d[c].splice(w,1):d[c]=[d[c]],typeof l!="number"&&(l=s(o));var b=d[c];for(w=0;w<b.length;w++){var E=b[w],M=s(E);if(M>l)break}b.splice(w,0,o)}},u.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(o){var l=c[o];if(l){if(typeof l=="string")return this.bindKey(l,o);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=o),this.addCommand(l))}},this)},u.prototype.removeCommands=function(c){Object.keys(c).forEach(function(o){this.removeCommand(c[o])},this)},u.prototype.bindKeys=function(c){Object.keys(c).forEach(function(o){this.bindKey(o,c[o])},this)},u.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},u.prototype.parseKeys=function(c){var o=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(M){return M}),l=o.pop(),d=y[l];if(y.FUNCTION_KEYS[d])l=y.FUNCTION_KEYS[d].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var w=0,b=o.length;b--;){var E=y.KEY_MODS[o[b]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[b]+" in "+c),!1;w|=E}return{key:l,hashId:w}},u.prototype.findKeyCommand=function(c,o){var l=h[c]+o;return this.commandKeyBinding[l]},u.prototype.handleKeyboard=function(c,o,l,d){if(!(d<0)){var w=h[o]+l,b=this.commandKeyBinding[w];return c.$keyChain&&(c.$keyChain+=" "+w,b=this.commandKeyBinding[c.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||w,{command:"null"}):(c.$keyChain&&((!o||o==4)&&l.length==1?c.$keyChain=c.$keyChain.slice(0,-w.length-1):(o==-1||d>0)&&(c.$keyChain="")),{command:b})}},u.prototype.getStatusText=function(c,o){return o.$keyChain||""},u})();function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){g(c,u);function c(o,l){var d=u.call(this,o,l)||this;return d.$singleCommand=!0,d}return c})(p);a.call=function(u,c,o){p.prototype.$init.call(u,c,o,!0)},p.call=function(u,c,o){p.prototype.$init.call(u,c,o,!1)},r.HashHandler=a,r.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,m){var g=this&&this.__extends||(function(){var s=function(a,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,o){c.__proto__=o}||function(c,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(c[l]=o[l])},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 c(){this.constructor=a}a.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),y=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,p=(function(s){g(a,s);function a(u,c){var o=s.call(this,c,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),o}return a.prototype.exec=function(u,c,o){if(Array.isArray(u)){for(var l=u.length;l--;)if(this.exec(u[l],c,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var d={editor:c,command:u,args:o};return this.canExecute(u,c)?(d.returnValue=this._emit("exec",d),this._signal("afterExec",d),d.returnValue!==!1):(this._signal("commandUnavailable",d),!1)},a.prototype.canExecute=function(u,c){return typeof u=="string"&&(u=this.commands[u]),!(!u||c&&c.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(c))},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(c){this.macro.push([c.command,c.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(c){typeof c=="string"?this.exec(c,u):this.exec(c[0],u,c[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},a})(x);y.implement(p.prototype,h),r.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,m){var g=e("../lib/lang"),y=e("../config"),x=e("../range").Range;function h(s,a){return{win:s,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(s){y.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("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:h("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:h("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:h("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("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:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("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:h("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:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(s){y.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:h("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:h("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:h("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:h("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:h("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:h("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:h("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:h("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:h("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:h("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("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:h("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:h("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:h("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:h("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:h("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("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:h("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:h("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("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:h(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("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:h(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:h("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("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:h("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("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:h("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:h(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:h("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("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:h("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:h("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("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:h("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:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("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(g.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("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:h("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(s){for(var a=s.selection.isBackwards(),u=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),c=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(u.row).length,l=s.session.doc.getTextRange(s.selection.getRange()),d=l.replace(/\n\s*/," ").length,w=s.session.doc.getLine(u.row),b=u.row+1;b<=c.row+1;b++){var E=g.stringTrimLeft(g.stringTrimRight(s.session.doc.getLine(b)));E.length!==0&&(E=" "+E),w+=E}c.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new x(u.row,0,c.row+2,0),w),d>0?(s.selection.moveCursorTo(u.row,u.column),s.selection.selectTo(u.row,u.column+d)):(o=s.session.doc.getLine(u.row).length>o?o+1:o,s.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var a=s.session.doc.getLength()-1,u=s.session.doc.getLine(a).length,c=s.selection.rangeList.ranges,o=[];c.length<1&&(c=[s.selection.getRange()]);for(var l=0;l<c.length;l++)l==c.length-1&&(c[l].end.row===a&&c[l].end.column===u||o.push(new x(c[l].end.row,c[l].end.column,a,u))),l===0?c[l].start.row===0&&c[l].start.column===0||o.push(new x(0,0,c[l].start.row,c[l].start.column)):o.push(new x(c[l-1].end.row,c[l-1].end.column,c[l].start.row,c[l].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var l=0;l<o.length;l++)s.selection.addRange(o[l],!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(`
|
209
|
+
`)},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(`
|
210
|
+
`),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:h("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)r.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,r,m){var g=e("../lib/keys"),y=e("../mouse/default_gutter_handler").GutterTooltip,x=(function(){function p(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new y(this.editor)}return p.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))},p.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))},p.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===g.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=g.enter)return;s.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(u),o=this.$findNearestAnnotation(u);if(!(c===null&&o===null)){var l=this.$findClosestNumber(c,o,u);if(l===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(s),setTimeout((function(){this.editor._signal("gutterkeydown",new h(s,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===g.tab){s.preventDefault();return}if(s.keyCode===g.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===g.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===g.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===g.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===g.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===g.enter||s.keyCode===g.space){switch(s.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),u=this.editor.session.$gutterCustomWidgets[a];if(u)u.callbacks&&u.callbacks.onClick&&u.callbacks.onClick(s,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),s),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var c=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=c.getBoundingClientRect(),l=this.annotationTooltip.getElement().style;l.left=o.right+"px",l.top=o.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},p.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.hideTooltip()},p.prototype.$isFoldWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getFoldWidget(s).style.display!=="none";return a&&u},p.prototype.$isCustomWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=!!this.$getCustomWidget(s);return a&&u},p.prototype.$isAnnotationVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getAnnotation(s).style.display!=="none";return a&&u},p.prototype.$getFoldWidget=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[1]},p.prototype.$getCustomWidget=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[3]},p.prototype.$getAnnotation=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[2]},p.prototype.$findNearestFoldLaneWidget=function(s){if(this.$isCustomWidgetVisible(s)||this.$isFoldWidgetVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isCustomWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(s+a))return s+a;if(s-a>=0&&this.$isFoldWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+a))return s+a}return null},p.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isAnnotationVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+a))return s+a}return null},p.prototype.$focusFoldWidget=function(s){if(s!=null){var a=this.$getFoldWidget(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},p.prototype.$focusCustomWidget=function(s){if(s!=null){var a=this.$getCustomWidget(s);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},p.prototype.$focusAnnotation=function(s){if(s!=null){var a=this.$getAnnotation(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},p.prototype.$blurFoldWidget=function(s){var a=this.$getFoldWidget(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},p.prototype.$blurCustomWidget=function(s){var a=this.$getCustomWidget(s);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},p.prototype.$blurAnnotation=function(s){var a=this.$getAnnotation(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)||this.$isCustomWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$isFoldWidgetVisible(s)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isFoldWidgetVisible(s)||this.$isCustomWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$isFoldWidgetVisible(s)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$findClosestNumber=function(s,a,u){return s===null?a:a===null||Math.abs(u-s)<=Math.abs(u-a)?s:a},p.prototype.$switchLane=function(s){switch(s){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(u===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$isCustomWidgetVisible(u)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},p.prototype.$rowIndexToRow=function(s){var a=this.lines.get(s);return a?a.row:null},p.prototype.$rowToRowIndex=function(s){for(var a=0;a<this.lines.getLength();a++){var u=this.lines.get(a);if(u.row==s)return a}return null},p})();r.GutterKeyboardHandler=x;var h=(function(){function p(s,a){this.gutterKeyboardHandler=a,this.domEvent=s}return p.prototype.getKey=function(){return g.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p})();r.GutterKeyboardEvent=h}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,r,m){var g=this&&this.__values||function(_){var S=typeof Symbol=="function"&&Symbol.iterator,D=S&&_[S],j=0;if(D)return D.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&j>=_.length&&(_=void 0),{value:_&&_[j++],done:!_}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/lang"),p=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,l=e("./search").Search,d=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,E=e("./commands/default_commands").commands,M=e("./config"),k=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,O=e("./clipboard"),L=e("./lib/keys"),I=e("./lib/event"),z=e("./tooltip").HoverTooltip,P=(function(){function _(S,D,j){this.id="editor"+ ++_.$uid,this.session,this.$toDestroy=[];var U=S.getContainerElement();this.container=U,this.renderer=S,this.commands=new b(p.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new s(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new c(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(D||j&&j.session||new o("")),M.resetOptions(this),j&&this.setOptions(j),M._signal("editor",this)}return _.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},_.prototype.startOperation=function(S){this.session.startOperation(S)},_.prototype.endOperation=function(S){this.session.endOperation(S)},_.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},_.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var D=this.curOp.command,j=D&&D.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}},_.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var D=this.prevOp,j=this.$mergeableCommands,U=D.command&&S.command.name==D.command.name;if(S.command.name=="insertstring"){var G=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&j.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(S,D){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var j=this;M.loadModule(["keybinding",S],function(U){j.$keybindingId==S&&j.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),D&&D()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){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=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=S.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(S)),this._signal("changeSession",{session:S,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(S,D){return this.session.doc.setValue(S),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),S},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(S){this.renderer.onResize(S)},_.prototype.setTheme=function(S,D){this.renderer.setTheme(S,D)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(S,D){this.renderer.setStyle(S,D)},_.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(S){this.setOption("fontSize",S)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var D=S.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(ue){D.removeMarker(ue)}),D.$bracketHighlight=null);var j=S.getCursorPosition(),U=S.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(S),Z=D.getMatchingBracketRanges(j,G);if(!Z){var te=new k(D,j.row,j.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=D.getMatchingTags(j);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&D.$mode.getMatching&&(Z=D.$mode.getMatching(S.session)),!Z){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(Z)?Z.length==1&&(le="ace_error_bracket"):Z=[Z],Z.length==2&&(d.comparePoints(Z[0].end,Z[1].start)==0?Z=[d.fromPoints(Z[0].start,Z[1].end)]:d.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[d.fromPoints(Z[1].start,Z[0].end)])),D.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return D.addMarker(ue,le,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},_.prototype.focus=function(){this.textInput.focus()},_.prototype.isFocused=function(){return this.textInput.isFocused()},_.prototype.blur=function(){this.textInput.blur()},_.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},_.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(S){var D=this.session.$useWrapMode,j=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,j,D),this._signal("change",S),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(S){var D=S.data;this.renderer.updateLines(D.first,D.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),S.$highlightLineMarker&&!D)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&D){var j=new d(D.row,D.column,D.row,1/0);j.id=S.addMarker(j,"ace_active-line","screenLine"),S.$highlightLineMarker=j}else D&&(S.$highlightLineMarker.start.row=D.row,S.$highlightLineMarker.end.row=D.row,S.$highlightLineMarker.start.column=D.column,S._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(S){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(j,"ace_selection",U)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var j=D.start.column,U=D.end.column,G=S.getLine(D.start.row),Z=G.substring(j,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=G.substring(j-1,U+1);if(te.test(he))return te}}},_.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},_.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},_.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},_.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},_.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},_.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},_.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},_.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},_.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},_.prototype.getCopyText=function(){var S=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),j=!1;if(!S&&this.$copyWithEmptySelection){j=!0;for(var U=this.selection.getAllRanges(),G=0;G<U.length;G++){var Z=U[G];G&&U[G-1].start.row==Z.start.row||(S+=this.session.getLine(Z.start.row)+D)}}var te={text:S};return this._signal("copy",te),O.lineMode=j?te.text:!1,te.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(S,D){var j={text:S,event:D};this.commands.exec("paste",this,j)},_.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var D=S.text,j=D===O.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(j)this.selection.rangeList.ranges.forEach(function(le){U.insert({row:le.start.row,column:0},D)});else{var G=D.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=G.length==2&&(!G[0]||!G[1]);if(G.length!=Z.length||te)return this.commands.exec("insertstring",this,D);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,G[he])}}},_.prototype.execCommand=function(S,D){return this.commands.exec(S,this,D)},_.prototype.insert=function(S,D){var j=this.session,U=j.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Z=U.transformAction(j.getState(G.row),"insertion",this,j,S);Z&&(S!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Z.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
|
211
|
+
`)==-1){var te=d.fromPoints(G,G);te.end.column+=S.length,this.session.remove(te)}}else{var te=this.getSelectionRange();G=this.session.remove(te),this.clearSelection()}if(S==`
|
212
|
+
`||S==`\r
|
213
|
+
`){var ue=j.getLine(G.row);if(G.column>ue.search(/\S|$/)){var he=ue.substr(G.column).search(/\S|$/);j.doc.removeInLine(G.row,G.column,G.column+he)}}this.clearSelection();var ne=G.column,le=j.getState(G.row),ue=j.getLine(G.row),ce=U.checkOutdent(le,ue,S);if(j.insert(G,S),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new d(G.row,ne+Z.selection[0],G.row,ne+Z.selection[1])):this.selection.setSelectionRange(new d(G.row+Z.selection[0],Z.selection[1],G.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(S)){var fe=U.getNextLineIndent(le,ue.slice(0,G.column),j.getTabString());j.insert({row:G.row+1,column:0},fe)}ce&&U.autoOutdent(le,j,G.row)}},_.prototype.autoIndent=function(){for(var S=this.session,D=S.getMode(),j=this.selection.isEmpty()?[new d(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",Z="",te=S.getTabString(),he=0;he<j.length;he++)for(var ne=j[he].start.row,le=j[he].end.row,ue=ne;ue<=le;ue++){ue>0&&(U=S.getState(ue-1),G=S.getLine(ue-1),Z=D.getNextLineIndent(U,G,te));var ce=S.getLine(ue),fe=D.$getIndent(ce);if(Z!==fe){if(fe.length>0){var _e=new d(ue,0,ue,fe.length);S.remove(_e)}Z.length>0&&S.insert({row:ue,column:0},Z)}D.autoOutdent(U,S,ue)}},_.prototype.onTextInput=function(S,D){if(!D)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,S,D);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},_.prototype.applyComposition=function(S,D){if(D.extendLeft||D.extendRight){var j=this.selection.getRange();j.start.column-=D.extendLeft,j.end.column+=D.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!S&&!j.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),D.restoreStart||D.restoreEnd){var j=this.selection.getRange();j.start.column-=D.restoreStart,j.end.column-=D.restoreEnd,this.selection.setRange(j)}},_.prototype.onCommandKey=function(S,D,j){return this.keyBinding.onCommandKey(S,D,j)},_.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(D.start.row),G=j.getMode().transformAction(U,"deletion",this,j,D);if(D.end.column===0){var Z=j.getTextRange(D);if(Z[Z.length-1]==`
|
214
|
+
`){var te=j.getLine(D.end.row);/^\s+$/.test(te)&&(D.end.column=te.length)}}G&&(D=G)}this.session.remove(D),this.clearSelection()},_.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(S)},_.prototype.setGhostText=function(S,D){this.renderer.setGhostText(S,D)},_.prototype.removeGhostText=function(){this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),D=S.column;if(D!==0){var j=this.session.getLine(S.row),U,G;D<j.length?(U=j.charAt(D)+j.charAt(D-1),G=new d(S.row,D-1,S.row,D+1)):(U=j.charAt(D-1)+j.charAt(D-2),G=new d(S.row,D-2,S.row,D)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},_.prototype.toLowerCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toLowerCase()),this.selection.setSelectionRange(S)},_.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toUpperCase()),this.selection.setSelectionRange(S)},_.prototype.indent=function(){var S=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var j=this.$getSelectedRows();S.indentRows(j.first,j.last," ");return}else if(D.start.column<D.end.column){var U=S.getTextRange(D);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();S.indentRows(j.first,j.last," ");return}}var G=S.getLine(D.start.row),Z=D.start,te=S.getTabSize(),he=S.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,le=h.stringRepeat(" ",ne);else{for(var ne=he%te;G[D.start.column-1]==" "&≠)D.start.column--,ne--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},_.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},_.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},_.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),D=this.session,j=[],U=S.first;U<=S.last;U++)j.push(D.getLine(U));j.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var G=new d(0,0,0,0),U=S.first;U<=S.last;U++){var Z=D.getLine(U);G.start.row=U,G.end.row=U,G.end.column=Z.length,D.replace(G,j[U-S.first])}},_.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,D.first,D.last)},_.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),D=this.session.getState(S.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,j,S)},_.prototype.getNumberAt=function(S,D){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(S);j.lastIndex<D;){var G=j.exec(U);if(G.index<=D&&G.index+G[0].length>=D){var Z={value:G[0],start:G.index,end:G.index+G[0].length};return Z}}return null},_.prototype.modifyNumber=function(S){var D=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new d(D,j-1,D,j),G=this.session.getTextRange(U);if(!isNaN(parseFloat(G))&&isFinite(G)){var Z=this.getNumberAt(D,j);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&j<te?S*=Math.pow(10,Z.end-j-1):S*=Math.pow(10,Z.end-j),ne+=S,ne/=Math.pow(10,he);var le=ne.toFixed(he),ue=new d(D,Z.start,D,Z.end);this.session.replace(ue,le),this.moveCursorTo(D,Math.max(Z.start+1,j+le.length-Z.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var S=this.selection.getCursor().row,D=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/),Z=D-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;j.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Ve,ct){he=te+Ve.length,Z>=te&&Z<=he&&(j=Ve,ne.selection.clearSelection(),ne.moveCursorTo(S,te+U),ne.selection.selectTo(S,he+U)),te=he});for(var le=this.$toggleWordPairs,ue,ce=0;ce<le.length;ce++)for(var fe=le[ce],_e=0;_e<=1;_e++){var $e=+!_e,Te=j.match(new RegExp("^\\s?_?("+h.escapeRegExp(fe[_e])+")\\s?$","i"));if(Te){var Ge=j.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Te[1])+")($|\\s)","g"));Ge&&(ue=j.replace(new RegExp(h.escapeRegExp(fe[_e]),"i"),function(Ve){var ct=fe[$e];return Ve.toUpperCase()==Ve?ct=ct.toUpperCase():Ve.charAt(0).toUpperCase()==Ve.charAt(0)&&(ct=ct.substr(0,0)+fe[$e].charAt(0).toUpperCase()+ct.substr(1)),ct}),this.insert(ue),ue="")}}},_.prototype.findLinkAt=function(S,D){var j,U,G=this.session.getLine(S),Z=G.split(/((?:https?|ftp):\/\/[\S]+)/),te=D;te<0&&(te=0);var he=0,ne=0,le;try{for(var ue=g(Z),ce=ue.next();!ce.done;ce=ue.next()){var fe=ce.value;if(ne=he+fe.length,te>=he&&te<=ne&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){le=fe.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(_e){j={error:_e}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(j)throw j.error}}return le},_.prototype.openLink=function(){var S=this.selection.getCursor(),D=this.findLinkAt(S.row,S.column);return D&&window.open(D,"_blank"),D!=null},_.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var S=this.selection,D=this.session,j=S.getRange(),U=S.isBackwards();if(j.isEmpty()){var G=j.start.row;D.duplicateLines(G,G)}else{var Z=U?j.start:j.end,te=D.insert(Z,D.getTextRange(j));j.start=Z,j.end=te,S.setSelectionRange(j,U)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(S,D,j){return this.session.moveText(S,D,j)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(S,D){var j,U,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var Z=G.toOrientedRange();j=this.$getSelectedRows(Z),U=this.session.$moveLines(j.first,j.last,D?0:S),D&&S==-1&&(U=0),Z.moveBy(U,0),G.fromOrientedRange(Z)}else{var te=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,le=te.length,ue=0;ue<le;ue++){var ce=ue;te[ue].moveBy(he,0),j=this.$getSelectedRows(te[ue]);for(var fe=j.first,_e=j.last;++ue<le;){ne&&te[ue].moveBy(ne,0);var $e=this.$getSelectedRows(te[ue]);if(D&&$e.first!=_e||!D&&$e.first>_e+1)break;_e=$e.last}for(ue--,he=this.session.$moveLines(fe,_e,D?0:S),D&&S==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;D||(he=0),ne+=he}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},_.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},_.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(S,D){var j=this.renderer,U=this.renderer.layerConfig,G=S*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):D===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var Z=j.scrollTop;j.scrollBy(0,G*U.lineHeight),D!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(Z)},_.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},_.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},_.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},_.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},_.prototype.scrollPageDown=function(){this.$moveByPage(1)},_.prototype.scrollPageUp=function(){this.$moveByPage(-1)},_.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},_.prototype.scrollToLine=function(S,D,j,U){this.renderer.scrollToLine(S,D,j,U)},_.prototype.centerSelection=function(){var S=this.getSelectionRange(),D={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(D,.5)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(S,D){this.selection.moveCursorTo(S,D)},_.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},_.prototype.jumpToMatching=function(S,D){var j=this.getCursorPosition(),U=new k(this.session,j.row,j.column),G=U.getCurrentToken(),Z=0;G&&G.type.indexOf("tag-name")!==-1&&(G=U.stepBackward());var te=G||U.stepForward();if(te){var he,ne=!1,le={},ue=j.column-te.start,ce,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(fe[te.value[ue]])switch(ce=fe[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(le[ce])&&(le[ce]=0),te.value[ue]){case"(":case"[":case"{":le[ce]++;break;case")":case"]":case"}":le[ce]--,le[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(le[te.value])&&(le[te.value]=0),G.value==="<"&&Z>1?le[te.value]++:G.value==="</"&&le[te.value]--,le[te.value]===-1&&(he="tag",ne=!0));ne||(G=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var _e,$e;if(he==="bracket")_e=this.session.getBracketRange(j),_e||(_e=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),$e=_e.start,(D||$e.row===j.row&&Math.abs($e.column-j.column)<2)&&(_e=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(_e=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),_e.compare(j.row,j.column)===0){var Te=this.session.getMatchingTags(j);Te&&(Te.openTag.contains(j.row,j.column)?(_e=Te.closeTag,$e=_e.start):(_e=Te.openTag,Te.closeTag.start.row===j.row&&Te.closeTag.start.column===j.column?$e=_e.end:$e=_e.start))}$e=$e||_e.start}$e=_e&&_e.cursor||$e,$e&&(S?_e&&D?this.selection.setRange(_e):_e&&_e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},_.prototype.gotoLine=function(S,D,j){this.selection.clearSelection(),this.session.unfold({row:S-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,D||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,j)},_.prototype.navigateTo=function(S,D){this.selection.moveTo(S,D)},_.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},_.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},_.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},_.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.prototype.replace=function(S,D){D&&this.$search.set(D);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,S)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},_.prototype.replaceAll=function(S,D){D&&this.$search.set(D);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 Z=j.length-1;Z>=0;--Z)this.$tryReplace(j[Z],S)&&U++;return this.selection.setSelectionRange(G),U},_.prototype.$tryReplace=function(S,D){var j=this.session.getTextRange(S);return D=this.$search.replace(j,D),D!==null?(S.end=this.session.replace(S,D),S):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(S,D,j){D||(D={}),typeof S=="string"||S instanceof RegExp?D.needle=S:typeof S=="object"&&y.mixin(D,S);var U=this.selection.getRange();D.needle==null&&(S=this.session.getTextRange(U)||this.$search.$options.needle,S||(U=this.session.getWordRange(U.start.row,U.start.column),S=this.session.getTextRange(U)),this.$search.set({needle:S})),this.$search.set(D),D.start||this.$search.set({start:U});var G=this.$search.find(this.session);if(D.preventScroll)return G;if(G)return this.revealRange(G,j),G;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},_.prototype.findNext=function(S,D){this.find({skipCurrent:!0,backwards:!1},S,D)},_.prototype.findPrevious=function(S,D){this.find(S,{skipCurrent:!0,backwards:!0},D)},_.prototype.revealRange=function(S,D){this.session.unfold(S),this.selection.setSelectionRange(S);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),D!==!1&&this.renderer.animateScrolling(j)},_.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},_.prototype.setAutoScrollEditorIntoView=function(S){if(S){var D,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 Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(D=j.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&D&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ne=j.renderer,le=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=le.top-ue.offset;le.top>=0&&ce+D.top<0?U=!0:le.top<ue.height&&le.top+D.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(G.style.top=ce+"px",G.style.left=le.left+"px",G.style.height=ue.lineHeight+"px",G.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},_.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(S)),D.isBlinking=!this.$readOnly&&S!="wide",x.setCssClass(D.element,"ace_slim-cursors",/slim/.test(S)))},_.prototype.prompt=function(S,D,j){var U=this;M.loadModule("ace/ext/prompt",function(G){G.prompt(U,S,D,j)})},_})();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.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"],["&&","||"],["==","!="]],y.implement(P.prototype,w),M.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){var S=this;if(this.textInput.setReadOnly(_),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(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){S.hoverTooltip||(S.hoverTooltip=new z);var G=x.createElement("div");G.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),G)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var D=this.textInput.getElement();_?(I.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?N.attach(this):N.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?N.attach(this):N.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var D=x.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},D=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;_?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.bind(this)),this.commands.addCommand(S),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),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",D.bind(this)),this.commands.removeCommand(S),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(_){this.$textInputAriaLabel=_},initialValue:""},enableMobileMenu:{set:function(_){this.$enableMobileMenu=_},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var N={getText:function(_,S){return(Math.abs(_.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(_,S,D){return Math.max(S.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(_,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("../lib/dom"),y=(function(){function x(h,p){this.element=h,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(h){g.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(h,p){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(h,p,s){var a=p.firstRowScreen*p.lineHeight,u=Math.floor(a/this.canvasHeight),c=s.documentToScreenRow(h,0)*p.lineHeight;return c-u*this.canvasHeight},x.prototype.computeLineHeight=function(h,p,s){return p.lineHeight*s.getRowLineCount(h)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(h){return this.cells[h]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var p=g.createFragment(this.element),s=0;s<h.length;s++)p.appendChild(h[s].element);this.element.appendChild(p)}else this.cells.push(h),this.element.appendChild(h.element)},x.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var p=g.createFragment(this.element),s=0;s<h.length;s++)p.appendChild(h[s].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},x.prototype.createCell=function(h,p,s,a){var u=this.cellCache.pop();if(!u){var c=g.createElement("div");a&&a(c),this.element.appendChild(c),u={element:c,text:"",row:h}}return u.row=h,u},x})();r.Lines=y}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,r,m){var g=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,p=e("./lines").Lines,s=e("../config").nls,a=(function(){function c(o){this.element=g.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new p(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,l)},c.prototype.removeGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,l)},c.prototype.setAnnotations=function(o){this.$annotations=[];for(var l=0;l<o.length;l++){var d=o[l],w=d.row,b=this.$annotations[w];b||(b=this.$annotations[w]={text:[],type:[],displayText:[]});var E=d.text,M=d.text,k=d.type;E=E?x.escapeHTML(E):d.html||"",M=M||d.html||"",b.text.indexOf(E)===-1&&(b.text.push(E),b.type.push(k),b.displayText.push(M));var C=d.className;C?b.className=C:k==="error"?b.className=" ace_error":k==="security"&&!/\bace_error\b/.test(b.className)?b.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(b.className)?b.className=" ace_warning":k==="info"&&!b.className?b.className=" ace_info":k==="hint"&&!b.className&&(b.className=" ace_hint")}},c.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var l=o.start.row,d=o.end.row-l;if(d!==0)if(o.action=="remove")this.$annotations.splice(l,d+1,null);else{var w=new Array(d+1);w.unshift(l,1),this.$annotations.splice.apply(this.$annotations,w)}}},c.prototype.update=function(o){this.config=o;var l=this.session,d=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,l.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var b=l.getNextFoldLine(d),E=b?b.start.row:1/0,M=null,k=-1,C=d;;){if(C>E&&(C=b.end.row+1,b=l.getNextFoldLine(C,b),E=b?b.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}M=this.$lines.get(++k),M?M.row=C:(M=this.$lines.createCell(C,o,this.session,u),this.$lines.push(M)),this.$renderCell(M,o,b,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},c.prototype.$updateGutterWidth=function(o){var l=this.session,d=l.gutterRenderer||this.$renderer,w=l.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(b=l.getLength()+w-1);var E=d?d.getWidth(l,b,o):b.toString().length*o.characterWidth,M=this.$padding||this.$computePadding();E+=M.left+M.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var d=0;d<l.length;d++){var w=l[d];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(d>0&&b&&b.start.row==l[d-1].row)w=l[d-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},c.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var d=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=d,!l||w<o.firstRow)return this.update(o);if(d<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(w>d)for(var b=this.session.getFoldedRowCount(d+1,w);b>0;b--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,l.firstRow-1)),d>w&&this.$lines.push(this.$renderLines(o,w+1,d)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},c.prototype.$renderLines=function(o,l,d){for(var w=[],b=l,E=this.session.getNextFoldLine(b),M=E?E.start.row:1/0;b>M&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),M=E?E.start.row:1/0),!(b>d);){var k=this.$lines.createCell(b,o,this.session,u);this.$renderCell(k,o,E,b),w.push(k),b++}return w},c.prototype.$renderCell=function(o,l,d,w){var b=o.element,E=this.session,M=b.childNodes[0],k=b.childNodes[1],C=b.childNodes[2],R=b.childNodes[3],O=C.firstChild,L=E.$firstLineNumber,I=E.$breakpoints,z=E.$decorations,P=E.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&E.foldWidgets,_=d?d.start.row:Number.MAX_VALUE,S=l.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(E,w):w+L).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||d&&w<this.$cursorRow&&w>=_&&this.$cursorRow<=d.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),I[w]&&(D+=I[w]),z[w]&&(D+=z[w]),this.$annotations[w]&&w!==_&&(D+=this.$annotations[w].className),N){var G=N[w];G==null&&(G=N[w]=E.getFoldWidget(w))}if(G){var Z="ace_fold-widget ace_"+G,te=G=="start"&&w==_&&w<d.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,le=w+1;le<=d.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}D+=he}else Z+=" ace_open";k.className!=Z&&(k.className=Z),g.setStyle(k.style,"height",S),g.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ue=E.getFoldWidgetRange(w);ue?k.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):d?k.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[d.start.row+1,d.end.row+1])):k.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),te?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else k&&(g.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[w];if(ce?this.$addCustomWidget(w,ce,o):R&&this.$removeCustomWidget(w,o),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",O.className=j,O.className+=he,g.setStyle(O.style,"height",S),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",S);var fe;switch(he){case" ace_error_fold":fe=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":fe=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":fe=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",O.className=j,this.$useSvgGutterIcons?O.className+=this.$annotations[w].className:b.classList.add(this.$annotations[w].className.replace(" ","")),g.setStyle(O.style,"height",S),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",S);var fe;switch(this.$annotations[w].className){case" ace_error":fe=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":fe=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":fe=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":fe=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":fe=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else g.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==M.data&&(M.data=U),b.className!=D&&(b.className=D),g.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,l,E)+"px"),g.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,l,E)+"px"),o.text=U,C.style.display==="none"&&k.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},c.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},c.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(o){o?g.addCssClass(this.element,"ace_folding-enabled"):g.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$hideFoldWidget=function(o,l){var d=l||this.$getGutterCell(o);if(d&&d.element){var w=d.element.childNodes[1];w&&g.setStyle(w.style,"display","none")}},c.prototype.$showFoldWidget=function(o,l){var d=l||this.$getGutterCell(o);if(d&&d.element){var w=d.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[d.row]&&g.setStyle(w.style,"display","inline-block")}},c.prototype.$getGutterCell=function(o){var l=this.$lines.cells,d=this.session.documentToScreenRow(o,0);return l[o-this.config.firstRowScreen-(o-d)]},c.prototype.$addCustomWidget=function(o,l,d){var w=l.className,b=l.label,E=l.title,M=l.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:b,title:E,callbacks:M},this.$hideFoldWidget(o,d);var k=d||this.$getGutterCell(o);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=g.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",b),C.setAttribute("title",E),g.setStyle(C.style,"display","inline-block"),g.setStyle(C.style,"height","inherit"),M&&M.onClick&&C.addEventListener("click",function(R){M.onClick(R,o),R.stopPropagation()}),k.element.appendChild(C)}},c.prototype.$removeCustomWidget=function(o,l){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,l);var d=l||this.$getGutterCell(o);if(d&&d.element){var w=d.element.querySelector(".ace_custom-widget");w&&d.element.removeChild(w)}},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=g.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},c.prototype.getRegion=function(o){var l=this.$padding||this.$computePadding(),d=this.element.getBoundingClientRect();if(o.x<l.left+d.left)return"markers";if(this.$showFoldWidgets&&o.x>d.right-l.right)return"foldWidgets"},c})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,y.implement(a.prototype,h);function u(c){var o=document.createTextNode("");c.appendChild(o);var l=g.createElement("span");c.appendChild(l);var d=g.createElement("span");c.appendChild(d);var w=g.createElement("span");return d.appendChild(w),c}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,m){var g=e("../range").Range,y=e("../lib/dom"),x=(function(){function p(s){this.element=y.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return p.prototype.setPadding=function(s){this.$padding=s},p.prototype.setSession=function(s){this.session=s},p.prototype.setMarkers=function(s){this.markers=s},p.prototype.elt=function(s,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},p.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var u in this.markers){var c=this.markers[u];if(!c.range){c.update(a,this,this.session,s);continue}var o=c.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),c.renderer){var l=this.$getTop(o.start.row,s),d=this.$padding+o.start.column*s.characterWidth;c.renderer(a,o,d,l,s)}else c.type=="fullLine"?this.drawFullLineMarker(a,o,c.clazz,s):c.type=="screenLine"?this.drawScreenLineMarker(a,o,c.clazz,s):o.isMultiLine()?c.type=="text"?this.drawTextMarker(a,o,c.clazz,s):this.drawMultiLineMarker(a,o,c.clazz,s):this.drawSingleLineMarker(a,o,c.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},p.prototype.drawTextMarker=function(s,a,u,c,o){for(var l=this.session,d=a.start.row,w=a.end.row,b=d,E=0,M=0,k=l.getScreenLastRowColumn(b),C=new g(b,a.start.column,b,M);b<=w;b++)C.start.row=C.end.row=b,C.start.column=b==d?a.start.column:l.getRowWrapIndent(b),C.end.column=k,E=M,M=k,k=b+1<w?l.getScreenLastRowColumn(b+1):b==w?0:a.end.column,this.drawSingleLineMarker(s,C,u+(b==d?" ace_start":"")+" ace_br"+h(b==d||b==d+1&&a.start.column,E<M,M>k,b==w),c,b==w?0:1,o)},p.prototype.drawMultiLineMarker=function(s,a,u,c,o){var l=this.$padding,d=c.lineHeight,w=this.$getTop(a.start.row,c),b=l+a.start.column*c.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var E=a.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(s,E,u+" ace_br1 ace_start",c,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+d+"px;right:"+l+"px;top:"+w+"px;left:"+b+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var E=a.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(s,E,u+" ace_br12",c,null,o)}else{w=this.$getTop(a.end.row,c);var M=a.end.column*c.characterWidth;this.elt(u+" ace_br12","height:"+d+"px;width:"+M+"px;top:"+w+"px;left:"+l+"px;"+(o||""))}if(d=(a.end.row-a.start.row-1)*c.lineHeight,!(d<=0)){w=this.$getTop(a.start.row+1,c);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+d+"px;right:"+l+"px;top:"+w+"px;left:"+l+"px;"+(o||""))}},p.prototype.drawSingleLineMarker=function(s,a,u,c,o,l){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,u,c,o,l);var d=c.lineHeight,w=(a.end.column+(o||0)-a.start.column)*c.characterWidth,b=this.$getTop(a.start.row,c),E=this.$padding+a.start.column*c.characterWidth;this.elt(u,"height:"+d+"px;width:"+w+"px;top:"+b+"px;left:"+E+"px;"+(l||""))},p.prototype.drawBidiSingleLineMarker=function(s,a,u,c,o,l){var d=c.lineHeight,w=this.$getTop(a.start.row,c),b=this.$padding,E=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);E.forEach(function(M){this.elt(u,"height:"+d+"px;width:"+(M.width+(o||0))+"px;top:"+w+"px;left:"+(b+M.left)+"px;"+(l||""))},this)},p.prototype.drawFullLineMarker=function(s,a,u,c,o){var l=this.$getTop(a.start.row,c),d=c.lineHeight;a.start.row!=a.end.row&&(d+=this.$getTop(a.end.row,c)-l),this.elt(u,"height:"+d+"px;top:"+l+"px;left:0;right:0;"+(o||""))},p.prototype.drawScreenLineMarker=function(s,a,u,c,o){var l=this.$getTop(a.start.row,c),d=c.lineHeight;this.elt(u,"height:"+d+"px;top:"+l+"px;left:0;right:0;"+(o||""))},p})();x.prototype.$padding=0;function h(p,s,a,u){return(p?1:0)|(s?2:0)|(a?4:0)|(u?8:0)}r.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,m){var g=new Set(["text","rparen","lparen"]);r.isTextToken=function(y){return g.has(y)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,m){var g=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("./lines").Lines,p=e("../lib/event_emitter").EventEmitter,s=e("../config").nls,a=e("./text_util").isTextToken,u=(function(){function c(o){this.dom=y,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return c.prototype.$updateEolChar=function(){var o=this.session.doc,l=o.getNewLineCharacter()==`
|
216
|
+
`&&o.getNewLineMode()!="windows",d=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},c.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},c.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},c.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var l=this.$tabStrings=[0],d=1;d<o+1;d++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=x.stringRepeat(this.TAB_CHAR,d),l.push(w)}else l.push(this.dom.createTextNode(x.stringRepeat(" ",d),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var b="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",M=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):M,w=this.dom.createElement("span");w.className=b+E,w.textContent=M,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=b+k,w.textContent=C,this.$tabStrings[" "]=w}},c.prototype.updateLines=function(o,l,d){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(l,o.firstRow),b=Math.min(d,o.lastRow),E=this.element.childNodes,M=0,k=o.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;M++}for(var R=!1,k=w,C=this.session.getNextFoldLine(k),O=C?C.start.row:1/0;k>O&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),O=C?C.start.row:1/0),!(k>b);){var L=E[M++];if(L){this.dom.removeChildren(L),this.$renderLine(L,k,k==O?C:!1),R&&(L.style.top=this.$lines.computeLineTop(k,o,this.session)+"px");var I=o.lineHeight*this.session.getRowLength(k)+"px";L.style.height!=I&&(R=!0,L.style.height=I)}k++}if(R)for(;M<this.$lines.cells.length;){var z=this.$lines.cells[M++];z.element.style.top=this.$lines.computeLineTop(z.row,o,this.session)+"px"}},c.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var d=o.lastRow,w=l?l.lastRow:-1;if(!l||w<o.firstRow)return this.update(o);if(d<l.firstRow)return this.update(o);if(!l||l.lastRow<o.firstRow)return this.update(o);if(o.lastRow<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var b=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);b>0;b--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,l.firstRow-1)),o.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(o,l.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(o,l,d){for(var w=[],b=l,E=this.session.getNextFoldLine(b),M=E?E.start.row:1/0;b>M&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),M=E?E.start.row:1/0),!(b>d);){var k=this.$lines.createCell(b,o,this.session),C=k.element;this.dom.removeChildren(C),y.setStyle(C.style,"height",this.$lines.computeLineHeight(b,o,this.session)+"px"),y.setStyle(C.style,"top",this.$lines.computeLineTop(b,o,this.session)+"px"),this.$renderLine(C,b,b==M?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),b++}return w},c.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var l=o.firstRow,d=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,l,d))},c.prototype.$renderToken=function(o,l,d,w){for(var b=this,E=/(\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,M=this.dom.createFragment(this.element),k,C=0;k=E.exec(w);){var R=k[1],O=k[2],L=k[3],I=k[4],z=k[5];if(!(!b.showSpaces&&O)){var P=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,P&&M.appendChild(this.dom.createTextNode(P,this.element)),R){var N=b.session.getScreenTabSize(l+k.index),_=b.$tabStrings[N].cloneNode(!0);_.charCount=1,M.appendChild(_),l+=N-1}else if(O)if(b.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=x.stringRepeat(b.SPACE_CHAR,O.length),M.appendChild(S)}else M.appendChild(this.dom.createTextNode(O,this.element));else if(L){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=x.stringRepeat(b.SPACE_CHAR,L.length),M.appendChild(S)}else if(I){l+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=b.showSpaces?b.SPACE_CHAR:I,M.appendChild(S)}else if(z){l+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=z,M.appendChild(S)}}}if(M.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(d.type))o.appendChild(M);else{var D="ace_"+d.type.replace(/\./g," ace_"),S=this.dom.createElement("span");d.type=="fold"&&(S.style.width=d.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=D,S.appendChild(M),o.appendChild(S)}return l+w.length},c.prototype.renderIndentGuide=function(o,l,d){var w=l.search(this.$indentGuideRe);if(w<=0||w>=d)return l;if(l[0]==" "){w-=w%this.tabSize;for(var b=w/this.tabSize,E=0;E<b;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}else if(l[0]==" "){for(var E=0;E<w;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}return this.$highlightIndentGuide(),l},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var l=this.session.selection.getCursor(),d=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,w=Math.floor(d/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:l.row};var b=this.session.$bracketHighlight;if(b){for(var E=this.session.$bracketHighlight.ranges,M=0;M<E.length;M++)if(l.row!==E[M].start.row){this.$highlightIndentGuideMarker.end=E[M].start.row+1,l.row>E[M].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var M=l.row+1;M<o.length;M++){var k=o[M],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=M,C<=d))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<o.length;l++)o[l].classList.remove("ace_indent-guide-active")},c.prototype.$setIndentGuideActive=function(o,l){var d=this.session.doc.getLine(o.row);if(d!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var b=w.childNodes;if(b){var E=b[l-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var d=0;d<o.length;d++){var w=o[d];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}else for(var d=o.length-1;d>=0;d--){var w=o[d];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}}},c.prototype.$createLineElement=function(o){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},c.prototype.$renderWrappedLine=function(o,l,d){var w=0,b=0,E=d[0],M=0,k=this.$createLineElement();o.appendChild(k);for(var C=0;C<l.length;C++){var R=l[C],O=R.value;if(C==0&&this.displayIndentGuides){if(w=O.length,O=this.renderIndentGuide(k,O,E),!O)continue;w-=O.length}if(w+O.length<E)M=this.$renderToken(k,M,R,O),w+=O.length;else{for(;w+O.length>=E;){M=this.$renderToken(k,M,R,O.substring(0,E-w)),O=O.substring(E-w),w=E,k=this.$createLineElement(),o.appendChild(k);var L=this.dom.createTextNode(x.stringRepeat(" ",d.indent),this.element);L.charCount=0,k.appendChild(L),b++,M=0,E=d[b]||Number.MAX_VALUE}O.length!=0&&(w+=O.length,M=this.$renderToken(k,M,R,O))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,M,null,"",!0)},c.prototype.$renderSimpleLine=function(o,l){for(var d=0,w=0;w<l.length;w++){var b=l[w],E=b.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(d+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,d,b,E);d=this.$renderToken(o,d,b,E)}}},c.prototype.$renderOverflowMessage=function(o,l,d,w,b){d&&this.$renderToken(o,l,d,w.slice(0,this.MAX_LINE_LENGTH-l));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=b?"<hide>":"<click to see more...>",o.appendChild(E)},c.prototype.$renderLine=function(o,l,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(l)),d)var w=this.$getFoldLineTokens(l,d);else var w=this.session.getTokens(l);var b=o;if(w.length){var E=this.session.getRowSplitData(l);if(E&&E.length){this.$renderWrappedLine(o,w,E);var b=o.lastChild}else{var b=o;this.$useLineGroups()&&(b=this.$createLineElement(),o.appendChild(b)),this.$renderSimpleLine(b,w)}}else this.$useLineGroups()&&(b=this.$createLineElement(),o.appendChild(b));if(this.showEOL&&b){d&&(l=d.end.row);var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_eol",M.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(M)}},c.prototype.$getFoldLineTokens=function(o,l){var d=this.session,w=[];function b(M,k,C){for(var R=0,O=0;O+M[R].value.length<k;)if(O+=M[R].value.length,R++,R==M.length)return;if(O!=k){var L=M[R].value.substring(k-O);L.length>C-k&&(L=L.substring(0,C-k)),w.push({type:M[R].type,value:L}),O=k+L.length,R+=1}for(;O<C&&R<M.length;){var L=M[R].value;L.length+O>C?w.push({type:M[R].type,value:L.substring(0,C-O)}):w.push(M[R]),O+=L.length,R+=1}}var E=d.getTokens(o);return l.walk(function(M,k,C,R,O){M!=null?w.push({type:"fold",value:M}):(O&&(E=d.getTokens(k)),E.length&&b(E,R,C))},l.end.row,this.session.getLine(l.end.row).length),w},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c})();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,g.implement(u.prototype,p),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("../lib/dom"),y=(function(){function x(h){this.element=g.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(h){for(var p=this.cursors,s=p.length;s--;)g.setStyle(p[s].style,"opacity",h?"":"0")},x.prototype.$startCssAnimation=function(){for(var h=this.cursors,p=h.length;p--;)h[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(h){this.$padding=h},x.prototype.setSession=function(h){this.session=h},x.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},x.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},x.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,g.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var h=g.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},x.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},x.prototype.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&g.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),p()},this.blinkInterval),p()}},x.prototype.getPixelPosition=function(h,p){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(h),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),u=(s.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},x.prototype.isCursorInView=function(h,p){return h.top>=0&&h.top<p.maxHeight},x.prototype.update=function(h){this.config=h;var p=this.session.$selectionMarkers,s=0,a=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var s=0,u=p.length;s<u;s++){var c=this.getPixelPosition(p[s].cursor,!0);if(!((c.top>h.height+h.offset||c.top<0)&&s>1)){var o=this.cursors[a++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,c,h,p[s],this.session):this.isCursorInView(c,h)?(g.setStyle(l,"display","block"),g.translate(o,c.left,c.top),g.setStyle(l,"width",Math.round(h.characterWidth)+"px"),g.setStyle(l,"height",h.lineHeight+"px")):g.setStyle(l,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=c,this.restartTimer()},x.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x})();y.prototype.$padding=0,y.prototype.drawCursor=null,r.Cursor=y}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var g=this&&this.__extends||(function(){var o=function(l,d){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(w[E]=b[E])},o(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");o(l,d);function w(){this.constructor=l}l.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}})(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),p=e("./lib/event_emitter").EventEmitter,s=32768,a=(function(){function o(l,d){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o})();y.implement(a.prototype,p);var u=(function(o){g(l,o);function l(d,w){var b=o.call(this,d,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,w.$scrollbarWidth=b.width=x.scrollbarWidth(d.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var d=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-d)/(this.coeff-d)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(d){this.element.style.height=d+"px"},l.prototype.setScrollHeight=function(d){this.scrollHeight=d,d>s?(this.coeff=s/d,d=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=d+"px"},l.prototype.setScrollTop=function(d){this.scrollTop!=d&&(this.skipEvent=!0,this.scrollTop=d,this.element.scrollTop=d*this.coeff)},l})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var c=(function(o){g(l,o);function l(d,w){var b=o.call(this,d,"-h")||this;return b.scrollLeft=0,b.height=w.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(d){this.element.style.width=d+"px"},l.prototype.setInnerWidth=function(d){this.inner.style.width=d+"px"},l.prototype.setScrollWidth=function(d){this.inner.style.width=d+"px"},l.prototype.setScrollLeft=function(d){this.scrollLeft!=d&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=d)},l})(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=c,r.VScrollBar=u,r.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var g=this&&this.__extends||(function(){var c=function(o,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,w){d.__proto__=w}||function(d,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(d[b]=w[b])},c(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");c(o,l);function d(){this.constructor=o}o.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}})(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),p=e("./lib/event_emitter").EventEmitter;x.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
217
|
+
position: absolute;
|
218
|
+
background: rgba(128, 128, 128, 0.6);
|
219
|
+
-moz-box-sizing: border-box;
|
220
|
+
box-sizing: border-box;
|
221
|
+
border: 1px solid #bbb;
|
222
|
+
border-radius: 2px;
|
223
|
+
z-index: 8;
|
224
|
+
}
|
225
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
226
|
+
position: absolute;
|
227
|
+
z-index: 6;
|
228
|
+
background: none;
|
229
|
+
overflow: hidden!important;
|
230
|
+
}
|
231
|
+
.ace_editor>.ace_sb-v {
|
232
|
+
z-index: 6;
|
233
|
+
right: 0;
|
234
|
+
top: 0;
|
235
|
+
width: 12px;
|
236
|
+
}
|
237
|
+
.ace_editor>.ace_sb-v div {
|
238
|
+
z-index: 8;
|
239
|
+
right: 0;
|
240
|
+
width: 100%;
|
241
|
+
}
|
242
|
+
.ace_editor>.ace_sb-h {
|
243
|
+
bottom: 0;
|
244
|
+
left: 0;
|
245
|
+
height: 12px;
|
246
|
+
}
|
247
|
+
.ace_editor>.ace_sb-h div {
|
248
|
+
bottom: 0;
|
249
|
+
height: 100%;
|
250
|
+
}
|
251
|
+
.ace_editor>.ace_sb_grabbed {
|
252
|
+
z-index: 8;
|
253
|
+
background: #000;
|
254
|
+
}`,"ace_scrollbar.css",!1);var s=(function(){function c(o,l){this.element=x.createElement("div"),this.element.className="ace_sb"+l,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},c})();y.implement(s.prototype,p);var a=(function(c){g(o,c);function o(l,d){var w=c.call(this,l,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=l,w.width=w.VScrollWidth,w.renderer=d,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(l,d){if(l==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientY,E=function(I){b=I.clientY},M=function(){clearInterval(O)},k=d.clientY,C=this.thumbTop,R=function(){if(b!==void 0){var I=w.scrollTopFromThumbTop(C+b-k);I!==w.scrollTop&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,M);var O=setInterval(R,20);return h.preventDefault(d)}var L=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(l){var d=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return d=d>>0,d<0?d=0:d>this.pageHeight-this.viewHeight&&(d=this.pageHeight-this.viewHeight),d},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(l,d){this.pageHeight===l&&!d||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(c){g(o,c);function o(l,d){var w=c.call(this,l,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=d,w}return o.prototype.onMouseDown=function(l,d){if(l==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientX,E=function(I){b=I.clientX},M=function(){clearInterval(O)},k=d.clientX,C=this.thumbLeft,R=function(){if(b!==void 0){var I=w.scrollLeftFromThumbLeft(C+b-k);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,M);var O=setInterval(R,20);return h.preventDefault(d)}var L=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(l){var d=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return d=d>>0,d<0?d=0:d>this.pageWidth-this.viewWidth&&(d=this.pageWidth-this.viewWidth),d},o.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(l,d){this.pageWidth===l&&!d||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(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(e,r,m){var g=e("./lib/event"),y=(function(){function x(h,p){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var s=this;this._flush=function(a){s.pending=!1;var u=s.changes;if(u&&(g.blockIdle(100),s.changes=0,s.onRender(u)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return x.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(h){var p=this.changes;return this.changes=0,p},x})();r.RenderLoop=y}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,m){var g=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("../lib/event"),p=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",c=200,o=(function(){function l(d){this.el=y.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=y.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=y.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),d.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(d,w){d.width=d.height="auto",d.left=d.top="0px",d.visibility="hidden",d.position="absolute",d.whiteSpace="pre",p.isIE<8?d["font-family"]="inherit":d.font="inherit",d.overflow=w?"hidden":"visible"},l.prototype.checkForSizeChanges=function(d){if(d===void 0&&(d=this.$measureSizes()),d&&(this.$characterSize.width!==d.width||this.$characterSize.height!==d.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=d,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===d.width&&w.height===d.height,this._emit("changeCharacterSize",{data:d})}},l.prototype.$addObserver=function(){var d=this;this.$observer=new window.ResizeObserver(function(w){d.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var d=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){d.checkForSizeChanges(),h.onIdle(w,500)},500)},l.prototype.setPolling=function(d){d?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(d){var w={height:(d||this.$measureNode).clientHeight,width:(d||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},l.prototype.$measureCharWidth=function(d){this.$main.textContent=x.stringRepeat(d,a);var w=this.$main.getBoundingClientRect();return w.width/a},l.prototype.getCharacterWidth=function(d){var w=this.charSizes[d];return w===void 0&&(w=this.charSizes[d]=this.$measureCharWidth(d)/this.$characterSize.width),w},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(d){return!d||!d.parentElement?1:(Number(window.getComputedStyle(d).zoom)||1)*this.$getZoom(d.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var d=function(w,b){return["div",{style:"position: absolute;top:"+w+"px;left:"+b+"px;"}]};this.els=y.buildDom([d(0,0),d(c,0),d(0,c),d(c,c)],this.el)},l.prototype.transformCoordinates=function(d,w){if(d){var b=this.$getZoom(this.el);d=C(1/b,d)}function E(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function M(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function k(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function R(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var O=R(this.els[0]),L=R(this.els[1]),I=R(this.els[2]),z=R(this.els[3]),P=E(M(z,L),M(z,I),M(k(L,I),k(z,O))),N=C(1+P[0],M(L,O)),_=C(1+P[1],M(I,O));if(w){var S=w,D=P[0]*S[0]/c+P[1]*S[1]/c+1,j=k(C(S[0],N),C(S[1],_));return k(C(1/D/c,j),O)}var U=M(d,O),G=E(M(N,C(P[0],U)),M(_,C(P[1],U)),U);return C(c,G)},l})();o.prototype.$characterSize={width:0,height:0},g.implement(o.prototype,s),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,m){m.exports=`
|
255
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
256
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
257
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
258
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
259
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
260
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
261
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
262
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
263
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
264
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
265
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
266
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
267
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
268
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
269
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
270
|
+
|
271
|
+
|
272
|
+
.ace_editor {
|
273
|
+
position: relative;
|
274
|
+
overflow: hidden;
|
275
|
+
padding: 0;
|
276
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
277
|
+
direction: ltr;
|
278
|
+
text-align: left;
|
279
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
280
|
+
forced-color-adjust: none;
|
281
|
+
}
|
282
|
+
|
283
|
+
.ace_scroller {
|
284
|
+
position: absolute;
|
285
|
+
overflow: hidden;
|
286
|
+
top: 0;
|
287
|
+
bottom: 0;
|
288
|
+
background-color: inherit;
|
289
|
+
-ms-user-select: none;
|
290
|
+
-moz-user-select: none;
|
291
|
+
-webkit-user-select: none;
|
292
|
+
user-select: none;
|
293
|
+
cursor: text;
|
294
|
+
}
|
295
|
+
|
296
|
+
.ace_content {
|
297
|
+
position: absolute;
|
298
|
+
box-sizing: border-box;
|
299
|
+
min-width: 100%;
|
300
|
+
contain: style size layout;
|
301
|
+
font-variant-ligatures: no-common-ligatures;
|
302
|
+
}
|
303
|
+
.ace_invisible {
|
304
|
+
font-variant-ligatures: none;
|
305
|
+
}
|
306
|
+
|
307
|
+
.ace_keyboard-focus:focus {
|
308
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
309
|
+
outline: none;
|
310
|
+
}
|
311
|
+
|
312
|
+
.ace_dragging .ace_scroller:before{
|
313
|
+
position: absolute;
|
314
|
+
top: 0;
|
315
|
+
left: 0;
|
316
|
+
right: 0;
|
317
|
+
bottom: 0;
|
318
|
+
content: '';
|
319
|
+
background: rgba(250, 250, 250, 0.01);
|
320
|
+
z-index: 1000;
|
321
|
+
}
|
322
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
323
|
+
background: rgba(0, 0, 0, 0.01);
|
324
|
+
}
|
325
|
+
|
326
|
+
.ace_gutter {
|
327
|
+
position: absolute;
|
328
|
+
overflow : hidden;
|
329
|
+
width: auto;
|
330
|
+
top: 0;
|
331
|
+
bottom: 0;
|
332
|
+
left: 0;
|
333
|
+
cursor: default;
|
334
|
+
z-index: 4;
|
335
|
+
-ms-user-select: none;
|
336
|
+
-moz-user-select: none;
|
337
|
+
-webkit-user-select: none;
|
338
|
+
user-select: none;
|
339
|
+
contain: style size layout;
|
340
|
+
}
|
341
|
+
|
342
|
+
.ace_gutter-active-line {
|
343
|
+
position: absolute;
|
344
|
+
left: 0;
|
345
|
+
right: 0;
|
346
|
+
}
|
347
|
+
|
348
|
+
.ace_scroller.ace_scroll-left:after {
|
349
|
+
content: "";
|
350
|
+
position: absolute;
|
351
|
+
top: 0;
|
352
|
+
right: 0;
|
353
|
+
bottom: 0;
|
354
|
+
left: 0;
|
355
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
356
|
+
pointer-events: none;
|
357
|
+
}
|
358
|
+
|
359
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
360
|
+
position: absolute;
|
361
|
+
top: 0;
|
362
|
+
left: 0;
|
363
|
+
right: 0;
|
364
|
+
padding-left: 19px;
|
365
|
+
padding-right: 6px;
|
366
|
+
background-repeat: no-repeat;
|
367
|
+
}
|
368
|
+
|
369
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
370
|
+
margin-left: -14px;
|
371
|
+
float: left;
|
372
|
+
}
|
373
|
+
|
374
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
375
|
+
margin-left: -19px;
|
376
|
+
float: left;
|
377
|
+
}
|
378
|
+
|
379
|
+
.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 {
|
380
|
+
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==");
|
381
|
+
background-repeat: no-repeat;
|
382
|
+
background-position: 2px center;
|
383
|
+
}
|
384
|
+
|
385
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
386
|
+
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==");
|
387
|
+
background-repeat: no-repeat;
|
388
|
+
background-position: 2px center;
|
389
|
+
}
|
390
|
+
|
391
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
392
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
393
|
+
background-repeat: no-repeat;
|
394
|
+
background-position: 2px center;
|
395
|
+
}
|
396
|
+
|
397
|
+
.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 {
|
398
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
399
|
+
}
|
400
|
+
|
401
|
+
.ace_icon_svg.ace_error {
|
402
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
403
|
+
background-color: crimson;
|
404
|
+
}
|
405
|
+
.ace_icon_svg.ace_security {
|
406
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
407
|
+
background-color: crimson;
|
408
|
+
}
|
409
|
+
.ace_icon_svg.ace_warning {
|
410
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
411
|
+
background-color: darkorange;
|
412
|
+
}
|
413
|
+
.ace_icon_svg.ace_info {
|
414
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
415
|
+
background-color: royalblue;
|
416
|
+
}
|
417
|
+
.ace_icon_svg.ace_hint {
|
418
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
419
|
+
background-color: silver;
|
420
|
+
}
|
421
|
+
|
422
|
+
.ace_icon_svg.ace_error_fold {
|
423
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
424
|
+
background-color: crimson;
|
425
|
+
}
|
426
|
+
.ace_icon_svg.ace_security_fold {
|
427
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
428
|
+
background-color: crimson;
|
429
|
+
}
|
430
|
+
.ace_icon_svg.ace_warning_fold {
|
431
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
432
|
+
background-color: darkorange;
|
433
|
+
}
|
434
|
+
|
435
|
+
.ace_scrollbar {
|
436
|
+
contain: strict;
|
437
|
+
position: absolute;
|
438
|
+
right: 0;
|
439
|
+
bottom: 0;
|
440
|
+
z-index: 6;
|
441
|
+
}
|
442
|
+
|
443
|
+
.ace_scrollbar-inner {
|
444
|
+
position: absolute;
|
445
|
+
cursor: text;
|
446
|
+
left: 0;
|
447
|
+
top: 0;
|
448
|
+
}
|
449
|
+
|
450
|
+
.ace_scrollbar-v{
|
451
|
+
overflow-x: hidden;
|
452
|
+
overflow-y: scroll;
|
453
|
+
top: 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
.ace_scrollbar-h {
|
457
|
+
overflow-x: scroll;
|
458
|
+
overflow-y: hidden;
|
459
|
+
left: 0;
|
460
|
+
}
|
461
|
+
|
462
|
+
.ace_print-margin {
|
463
|
+
position: absolute;
|
464
|
+
height: 100%;
|
465
|
+
}
|
466
|
+
|
467
|
+
.ace_text-input {
|
468
|
+
position: absolute;
|
469
|
+
z-index: 0;
|
470
|
+
width: 0.5em;
|
471
|
+
height: 1em;
|
472
|
+
opacity: 0;
|
473
|
+
background: transparent;
|
474
|
+
-moz-appearance: none;
|
475
|
+
appearance: none;
|
476
|
+
border: none;
|
477
|
+
resize: none;
|
478
|
+
outline: none;
|
479
|
+
overflow: hidden;
|
480
|
+
font: inherit;
|
481
|
+
padding: 0 1px;
|
482
|
+
margin: 0 -1px;
|
483
|
+
contain: strict;
|
484
|
+
-ms-user-select: text;
|
485
|
+
-moz-user-select: text;
|
486
|
+
-webkit-user-select: text;
|
487
|
+
user-select: text;
|
488
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
489
|
+
white-space: pre!important;
|
490
|
+
}
|
491
|
+
.ace_text-input.ace_composition {
|
492
|
+
background: transparent;
|
493
|
+
color: inherit;
|
494
|
+
z-index: 1000;
|
495
|
+
opacity: 1;
|
496
|
+
}
|
497
|
+
.ace_composition_placeholder { color: transparent }
|
498
|
+
.ace_composition_marker {
|
499
|
+
border-bottom: 1px solid;
|
500
|
+
position: absolute;
|
501
|
+
border-radius: 0;
|
502
|
+
margin-top: 1px;
|
503
|
+
}
|
504
|
+
|
505
|
+
[ace_nocontext=true] {
|
506
|
+
transform: none!important;
|
507
|
+
filter: none!important;
|
508
|
+
clip-path: none!important;
|
509
|
+
mask : none!important;
|
510
|
+
contain: none!important;
|
511
|
+
perspective: none!important;
|
512
|
+
mix-blend-mode: initial!important;
|
513
|
+
z-index: auto;
|
514
|
+
}
|
515
|
+
|
516
|
+
.ace_layer {
|
517
|
+
z-index: 1;
|
518
|
+
position: absolute;
|
519
|
+
overflow: hidden;
|
520
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
521
|
+
word-wrap: normal;
|
522
|
+
white-space: pre;
|
523
|
+
height: 100%;
|
524
|
+
width: 100%;
|
525
|
+
box-sizing: border-box;
|
526
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
527
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
528
|
+
pointer-events: none;
|
529
|
+
}
|
530
|
+
|
531
|
+
.ace_gutter-layer {
|
532
|
+
position: relative;
|
533
|
+
width: auto;
|
534
|
+
text-align: right;
|
535
|
+
pointer-events: auto;
|
536
|
+
height: 1000000px;
|
537
|
+
contain: style size layout;
|
538
|
+
}
|
539
|
+
|
540
|
+
.ace_text-layer {
|
541
|
+
font: inherit !important;
|
542
|
+
position: absolute;
|
543
|
+
height: 1000000px;
|
544
|
+
width: 1000000px;
|
545
|
+
contain: style size layout;
|
546
|
+
}
|
547
|
+
|
548
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
549
|
+
contain: style size layout;
|
550
|
+
position: absolute;
|
551
|
+
top: 0;
|
552
|
+
left: 0;
|
553
|
+
right: 0;
|
554
|
+
}
|
555
|
+
|
556
|
+
.ace_hidpi .ace_text-layer,
|
557
|
+
.ace_hidpi .ace_gutter-layer,
|
558
|
+
.ace_hidpi .ace_content,
|
559
|
+
.ace_hidpi .ace_gutter {
|
560
|
+
contain: strict;
|
561
|
+
}
|
562
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
563
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
564
|
+
contain: strict;
|
565
|
+
}
|
566
|
+
|
567
|
+
.ace_cjk {
|
568
|
+
display: inline-block;
|
569
|
+
text-align: center;
|
570
|
+
}
|
571
|
+
|
572
|
+
.ace_cursor-layer {
|
573
|
+
z-index: 4;
|
574
|
+
}
|
575
|
+
|
576
|
+
.ace_cursor {
|
577
|
+
z-index: 4;
|
578
|
+
position: absolute;
|
579
|
+
box-sizing: border-box;
|
580
|
+
border-left: 2px solid;
|
581
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
582
|
+
transform: translatez(0);
|
583
|
+
}
|
584
|
+
|
585
|
+
.ace_multiselect .ace_cursor {
|
586
|
+
border-left-width: 1px;
|
587
|
+
}
|
588
|
+
|
589
|
+
.ace_slim-cursors .ace_cursor {
|
590
|
+
border-left-width: 1px;
|
591
|
+
}
|
592
|
+
|
593
|
+
.ace_overwrite-cursors .ace_cursor {
|
594
|
+
border-left-width: 0;
|
595
|
+
border-bottom: 1px solid;
|
596
|
+
}
|
597
|
+
|
598
|
+
.ace_hidden-cursors .ace_cursor {
|
599
|
+
opacity: 0.2;
|
600
|
+
}
|
601
|
+
|
602
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
603
|
+
opacity: 0;
|
604
|
+
}
|
605
|
+
|
606
|
+
.ace_smooth-blinking .ace_cursor {
|
607
|
+
transition: opacity 0.18s;
|
608
|
+
}
|
609
|
+
|
610
|
+
.ace_animate-blinking .ace_cursor {
|
611
|
+
animation-duration: 1000ms;
|
612
|
+
animation-timing-function: step-end;
|
613
|
+
animation-name: blink-ace-animate;
|
614
|
+
animation-iteration-count: infinite;
|
615
|
+
}
|
616
|
+
|
617
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
618
|
+
animation-duration: 1000ms;
|
619
|
+
animation-timing-function: ease-in-out;
|
620
|
+
animation-name: blink-ace-animate-smooth;
|
621
|
+
}
|
622
|
+
|
623
|
+
@keyframes blink-ace-animate {
|
624
|
+
from, to { opacity: 1; }
|
625
|
+
60% { opacity: 0; }
|
626
|
+
}
|
627
|
+
|
628
|
+
@keyframes blink-ace-animate-smooth {
|
629
|
+
from, to { opacity: 1; }
|
630
|
+
45% { opacity: 1; }
|
631
|
+
60% { opacity: 0; }
|
632
|
+
85% { opacity: 0; }
|
633
|
+
}
|
634
|
+
|
635
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
636
|
+
position: absolute;
|
637
|
+
z-index: 3;
|
638
|
+
}
|
639
|
+
|
640
|
+
.ace_marker-layer .ace_selection {
|
641
|
+
position: absolute;
|
642
|
+
z-index: 5;
|
643
|
+
}
|
644
|
+
|
645
|
+
.ace_marker-layer .ace_bracket {
|
646
|
+
position: absolute;
|
647
|
+
z-index: 6;
|
648
|
+
}
|
649
|
+
|
650
|
+
.ace_marker-layer .ace_error_bracket {
|
651
|
+
position: absolute;
|
652
|
+
border-bottom: 1px solid #DE5555;
|
653
|
+
border-radius: 0;
|
654
|
+
}
|
655
|
+
|
656
|
+
.ace_marker-layer .ace_active-line {
|
657
|
+
position: absolute;
|
658
|
+
z-index: 2;
|
659
|
+
}
|
660
|
+
|
661
|
+
.ace_marker-layer .ace_selected-word {
|
662
|
+
position: absolute;
|
663
|
+
z-index: 4;
|
664
|
+
box-sizing: border-box;
|
665
|
+
}
|
666
|
+
|
667
|
+
.ace_line .ace_fold {
|
668
|
+
box-sizing: border-box;
|
669
|
+
|
670
|
+
display: inline-block;
|
671
|
+
height: 11px;
|
672
|
+
margin-top: -2px;
|
673
|
+
vertical-align: middle;
|
674
|
+
|
675
|
+
background-image:
|
676
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
677
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
678
|
+
background-repeat: no-repeat, repeat-x;
|
679
|
+
background-position: center center, top left;
|
680
|
+
color: transparent;
|
681
|
+
|
682
|
+
border: 1px solid black;
|
683
|
+
border-radius: 2px;
|
684
|
+
|
685
|
+
cursor: pointer;
|
686
|
+
pointer-events: auto;
|
687
|
+
}
|
688
|
+
|
689
|
+
.ace_dark .ace_fold {
|
690
|
+
}
|
691
|
+
|
692
|
+
.ace_fold:hover{
|
693
|
+
background-image:
|
694
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
695
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
696
|
+
}
|
697
|
+
|
698
|
+
.ace_tooltip {
|
699
|
+
background-color: #f5f5f5;
|
700
|
+
border: 1px solid gray;
|
701
|
+
border-radius: 1px;
|
702
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
703
|
+
color: black;
|
704
|
+
padding: 3px 4px;
|
705
|
+
position: absolute;
|
706
|
+
z-index: 999999;
|
707
|
+
box-sizing: border-box;
|
708
|
+
cursor: default;
|
709
|
+
white-space: pre-wrap;
|
710
|
+
word-wrap: break-word;
|
711
|
+
line-height: normal;
|
712
|
+
font-style: normal;
|
713
|
+
font-weight: normal;
|
714
|
+
letter-spacing: normal;
|
715
|
+
pointer-events: none;
|
716
|
+
overflow: auto;
|
717
|
+
max-width: min(33em, 66vw);
|
718
|
+
overscroll-behavior: contain;
|
719
|
+
}
|
720
|
+
.ace_tooltip pre {
|
721
|
+
white-space: pre-wrap;
|
722
|
+
}
|
723
|
+
|
724
|
+
.ace_tooltip.ace_dark {
|
725
|
+
background-color: #636363;
|
726
|
+
color: #fff;
|
727
|
+
}
|
728
|
+
|
729
|
+
.ace_tooltip:focus {
|
730
|
+
outline: 1px solid #5E9ED6;
|
731
|
+
}
|
732
|
+
|
733
|
+
.ace_icon {
|
734
|
+
display: inline-block;
|
735
|
+
width: 18px;
|
736
|
+
vertical-align: top;
|
737
|
+
}
|
738
|
+
|
739
|
+
.ace_icon_svg {
|
740
|
+
display: inline-block;
|
741
|
+
width: 12px;
|
742
|
+
vertical-align: top;
|
743
|
+
-webkit-mask-repeat: no-repeat;
|
744
|
+
-webkit-mask-size: 12px;
|
745
|
+
-webkit-mask-position: center;
|
746
|
+
}
|
747
|
+
|
748
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
749
|
+
padding-right: 13px;
|
750
|
+
}
|
751
|
+
|
752
|
+
.ace_fold-widget, .ace_custom-widget {
|
753
|
+
box-sizing: border-box;
|
754
|
+
|
755
|
+
margin: 0 -12px 0 1px;
|
756
|
+
display: none;
|
757
|
+
width: 11px;
|
758
|
+
vertical-align: top;
|
759
|
+
|
760
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
761
|
+
background-repeat: no-repeat;
|
762
|
+
background-position: center;
|
763
|
+
|
764
|
+
border-radius: 3px;
|
765
|
+
|
766
|
+
border: 1px solid transparent;
|
767
|
+
cursor: pointer;
|
768
|
+
pointer-events: auto;
|
769
|
+
}
|
770
|
+
|
771
|
+
.ace_custom-widget {
|
772
|
+
background: none;
|
773
|
+
}
|
774
|
+
|
775
|
+
.ace_folding-enabled .ace_fold-widget {
|
776
|
+
display: inline-block;
|
777
|
+
}
|
778
|
+
|
779
|
+
.ace_fold-widget.ace_end {
|
780
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
781
|
+
}
|
782
|
+
|
783
|
+
.ace_fold-widget.ace_closed {
|
784
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
785
|
+
}
|
786
|
+
|
787
|
+
.ace_fold-widget:hover {
|
788
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
789
|
+
background-color: rgba(255, 255, 255, 0.2);
|
790
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
791
|
+
}
|
792
|
+
|
793
|
+
.ace_fold-widget:active {
|
794
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
795
|
+
background-color: rgba(0, 0, 0, 0.05);
|
796
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
797
|
+
}
|
798
|
+
/**
|
799
|
+
* Dark version for fold widgets
|
800
|
+
*/
|
801
|
+
.ace_dark .ace_fold-widget {
|
802
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
803
|
+
}
|
804
|
+
.ace_dark .ace_fold-widget.ace_end {
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
806
|
+
}
|
807
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
809
|
+
}
|
810
|
+
.ace_dark .ace_fold-widget:hover {
|
811
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
812
|
+
background-color: rgba(255, 255, 255, 0.1);
|
813
|
+
}
|
814
|
+
.ace_dark .ace_fold-widget:active {
|
815
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
816
|
+
}
|
817
|
+
|
818
|
+
.ace_inline_button {
|
819
|
+
border: 1px solid lightgray;
|
820
|
+
display: inline-block;
|
821
|
+
margin: -1px 8px;
|
822
|
+
padding: 0 5px;
|
823
|
+
pointer-events: auto;
|
824
|
+
cursor: pointer;
|
825
|
+
}
|
826
|
+
.ace_inline_button:hover {
|
827
|
+
border-color: gray;
|
828
|
+
background: rgba(200,200,200,0.2);
|
829
|
+
display: inline-block;
|
830
|
+
pointer-events: auto;
|
831
|
+
}
|
832
|
+
|
833
|
+
.ace_fold-widget.ace_invalid {
|
834
|
+
background-color: #FFB4B4;
|
835
|
+
border-color: #DE5555;
|
836
|
+
}
|
837
|
+
|
838
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
839
|
+
transition: opacity 0.4s ease 0.05s;
|
840
|
+
opacity: 0;
|
841
|
+
}
|
842
|
+
|
843
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
844
|
+
transition: opacity 0.05s ease 0.05s;
|
845
|
+
opacity:1;
|
846
|
+
}
|
847
|
+
|
848
|
+
.ace_underline {
|
849
|
+
text-decoration: underline;
|
850
|
+
}
|
851
|
+
|
852
|
+
.ace_bold {
|
853
|
+
font-weight: bold;
|
854
|
+
}
|
855
|
+
|
856
|
+
.ace_nobold .ace_bold {
|
857
|
+
font-weight: normal;
|
858
|
+
}
|
859
|
+
|
860
|
+
.ace_italic {
|
861
|
+
font-style: italic;
|
862
|
+
}
|
863
|
+
|
864
|
+
|
865
|
+
.ace_error-marker {
|
866
|
+
background-color: rgba(255, 0, 0,0.2);
|
867
|
+
position: absolute;
|
868
|
+
z-index: 9;
|
869
|
+
}
|
870
|
+
|
871
|
+
.ace_highlight-marker {
|
872
|
+
background-color: rgba(255, 255, 0,0.2);
|
873
|
+
position: absolute;
|
874
|
+
z-index: 8;
|
875
|
+
}
|
876
|
+
|
877
|
+
.ace_mobile-menu {
|
878
|
+
position: absolute;
|
879
|
+
line-height: 1.5;
|
880
|
+
border-radius: 4px;
|
881
|
+
-ms-user-select: none;
|
882
|
+
-moz-user-select: none;
|
883
|
+
-webkit-user-select: none;
|
884
|
+
user-select: none;
|
885
|
+
background: white;
|
886
|
+
box-shadow: 1px 3px 2px grey;
|
887
|
+
border: 1px solid #dcdcdc;
|
888
|
+
color: black;
|
889
|
+
}
|
890
|
+
.ace_dark > .ace_mobile-menu {
|
891
|
+
background: #333;
|
892
|
+
color: #ccc;
|
893
|
+
box-shadow: 1px 3px 2px grey;
|
894
|
+
border: 1px solid #444;
|
895
|
+
|
896
|
+
}
|
897
|
+
.ace_mobile-button {
|
898
|
+
padding: 2px;
|
899
|
+
cursor: pointer;
|
900
|
+
overflow: hidden;
|
901
|
+
}
|
902
|
+
.ace_mobile-button:hover {
|
903
|
+
background-color: #eee;
|
904
|
+
opacity:1;
|
905
|
+
}
|
906
|
+
.ace_mobile-button:active {
|
907
|
+
background-color: #ddd;
|
908
|
+
}
|
909
|
+
|
910
|
+
.ace_placeholder {
|
911
|
+
position: relative;
|
912
|
+
font-family: arial;
|
913
|
+
transform: scale(0.9);
|
914
|
+
transform-origin: left;
|
915
|
+
white-space: pre;
|
916
|
+
opacity: 0.7;
|
917
|
+
margin: 0 10px;
|
918
|
+
z-index: 1;
|
919
|
+
}
|
920
|
+
|
921
|
+
.ace_ghost_text {
|
922
|
+
opacity: 0.5;
|
923
|
+
font-style: italic;
|
924
|
+
}
|
925
|
+
|
926
|
+
.ace_ghost_text_container > div {
|
927
|
+
white-space: pre;
|
928
|
+
}
|
929
|
+
|
930
|
+
.ghost_text_line_wrapped::after {
|
931
|
+
content: "↩";
|
932
|
+
position: absolute;
|
933
|
+
}
|
934
|
+
|
935
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
936
|
+
margin: 0px 4px
|
937
|
+
}
|
938
|
+
|
939
|
+
.ace_screenreader-only {
|
940
|
+
position:absolute;
|
941
|
+
left:-10000px;
|
942
|
+
top:auto;
|
943
|
+
width:1px;
|
944
|
+
height:1px;
|
945
|
+
overflow:hidden;
|
946
|
+
}
|
947
|
+
|
948
|
+
.ace_hidden_token {
|
949
|
+
display: none;
|
950
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var g=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,h=(function(){function p(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 p.prototype.$createCanvas=function(){this.canvas=g.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},p.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},p.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var u=this.canvas.getContext("2d");function c(N,_){return N.priority<_.priority?-1:N.priority>_.priority?1:0}var o=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),o){var l={info:1,warning:2,error:3};o.forEach(function(N){N.priority=l[N.type]||null}),o=o.sort(c);for(var d=0;d<o.length;d++){var w=o[d].row,b=this.getVerticalOffsetForRow(w),E=b+this.lineHeight,M=Math.round(this.heightRatio*b),k=Math.round(this.heightRatio*E),C=Math.round((M+k)/2),R=k-C;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),C-R<0&&(C=R),C+R>this.canvasHeight&&(C=this.canvasHeight-R);var O=C-R,L=C+R,I=L-O;u.fillStyle=a[o[d].type]||null,u.fillRect(0,O,Math.round(this.oneZoneWidth-1),I)}}var z=this.renderer.session.selection.getCursor();if(z){var P=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,P,this.canvasWidth,2)}},p.prototype.getVerticalOffsetForRow=function(s){s=s|0;var a=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return a},p.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},p.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},p.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},p})();y.implement(h.prototype,x),r.Decorator=h}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,r,m){var g=e("./lib/oop"),y=e("./lib/dom"),x=e("./lib/lang"),h=e("./config"),p=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,a=e("./layer/text").Text,u=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,l=e("./scrollbar_custom").HScrollBar,d=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,E=e("./lib/event_emitter").EventEmitter,M=e("./css/editor-css"),k=e("./layer/decorators").Decorator,C=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;y.importCssString(M,"ace_editor.css",!1);var O=(function(){function L(I,z){var P=this;this.container=I||y.createElement("div"),y.addCssClass(this.container,"ace_editor"),y.HI_DPI&&y.addCssClass(this.container,"ace_hidpi"),this.setTheme(z),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=y.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=y.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=y.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var N=this.$textLayer=new a(this.content);this.canvas=N.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollTop(_.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollLeft(_.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),h.resetOptions(this),h._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(),y.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},L.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(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(I,z,P){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:I,lastRow:z},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)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(I){I?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(I,z,P,N){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var _=this.container;N||(N=_.clientHeight||_.scrollHeight),!N&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",N=_.clientHeight||_.scrollHeight),P||(P=_.clientWidth||_.scrollWidth);var S=this.$updateCachedSize(I,z,P,N);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!N)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(I,z,P,N){N-=this.$extraHeight||0;var _=0,S=this.$size,D={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(N&&(I||S.height!=N)&&(S.height=N,_|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),P&&(I||S.width!=P)){_|=this.CHANGE_SIZE,S.width=P,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,y.setStyle(this.scrollBarH.element.style,"left",z+"px"),y.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),S.scrollerWidth=Math.max(0,P-z-this.scrollBarV.getWidth()-this.margin.h),y.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";y.setStyle(this.scrollBarH.element.style,"right",j),y.setStyle(this.scroller.style,"right",j),y.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(_|=this.CHANGE_FULL)}return S.$dirty=!P||!N,_&&this._signal("resize",D),_},L.prototype.onGutterResize=function(I){var z=this.$showGutter?I:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},L.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},L.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},L.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=y.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=y.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},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 I=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){y.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){z&&z.markerRange&&(P=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var N=this.layerConfig,_=P.top,S=P.left;_-=N.offset;var D=z&&z.useTextareaForIME||C.isMobile?this.lineHeight:1;if(_<0||_>N.height-D){y.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-D;if(!z)_+=this.lineHeight;else if(z.useTextareaForIME){var G=this.textarea.value;j=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else _+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-j&&(S=this.$size.scrollerWidth-j),S+=this.gutterWidth+this.margin.left,y.setStyle(I,"height",D+"px"),y.setStyle(I,"width",j+"px"),y.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-j),Math.min(_,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 I=this.layerConfig,z=I.lastRow,P=this.session.documentToScreenRow(z,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?z-1:z},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},L.prototype.setScrollMargin=function(I,z,P,N){var _=this.scrollMargin;_.top=I|0,_.bottom=z|0,_.right=N|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},L.prototype.setMargin=function(I,z,P,N){var _=this.margin;_.top=I|0,_.bottom=z|0,_.right=N|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.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(I){this.setOption("hScrollBarAlwaysVisible",I)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},L.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-z&&(I=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+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(I,z){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!z){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var N=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;N>0&&(this.scrollTop=N,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),y.translate(this.content,-this.scrollLeft,-P.offset);var _=P.width+2*this.$padding+"px",S=P.minHeight+"px";y.setStyle(this.content.style,"width",_),y.setStyle(this.content.style,"height",S)}if(I&this.CHANGE_H_SCROLL&&(y.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",I)},L.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,P=Math.min(z,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var N=P<=2*this.lineHeight,_=!N&&I>z;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var S=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,P),this.desiredHeight=P,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var I=this.session,z=this.$size,P=z.height<=2*this.lineHeight,N=this.session.getScreenLength(),_=N*this.lineHeight,S=this.$getLongestLine(),D=!P&&(this.$hScrollBarAlwaysVisible||z.scrollerWidth-S-2*this.$padding<0),j=this.$horizScroll!==D;j&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=z.height<=2*this.lineHeight);var G=z.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,_-z.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,S+2*this.$padding-z.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-_+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var le=this.scrollTop%this.lineHeight,ue=Math.ceil(G/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),fe=ce+ue,_e,$e,Te=this.lineHeight;ce=I.screenToDocumentRow(ce,0);var Ge=I.getFoldLine(ce);Ge&&(ce=Ge.start.row),_e=I.documentToScreenRow(ce,0),$e=I.getRowLength(ce)*Te,fe=Math.min(I.screenToDocumentRow(fe,0),I.getLength()-1),G=z.scrollerHeight+I.getRowLength(fe)*Te+$e,le=this.scrollTop-_e*Te,le<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(le/Te)),le=this.scrollTop-_e*Te);var Ve=0;return(this.layerConfig.width!=S||j)&&(Ve=this.CHANGE_H_SCROLL),(j||ne)&&(Ve|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:ce,firstRowScreen:_e,lastRow:fe,lineHeight:Te,characterWidth:this.characterWidth,minHeight:G,maxHeight:_,offset:le,gutterOffset:Te?Math.max(0,Math.ceil((le+z.height-z.scrollerHeight)/Te)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Ve},L.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(z<P.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,z),!0}}},L.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*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(I,z){this.$gutterLayer.addGutterDecoration(I,z)},L.prototype.removeGutterDecoration=function(I,z){this.$gutterLayer.removeGutterDecoration(I,z)},L.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),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(I,z,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(z,P)},L.prototype.scrollCursorIntoView=function(I,z,P){if(this.$size.scrollerHeight!==0){var N=this.$cursorLayer.getPixelPosition(I),_=N.left,S=N.top,D=P&&P.top||0,j=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>S?(z&&U+D>S+this.lineHeight&&(S-=z*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):U+this.$size.scrollerHeight-j<S+this.lineHeight&&(z&&U+this.$size.scrollerHeight-j<S-this.lineHeight&&(S+=z*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+j-this.$size.scrollerHeight));var G=this.scrollLeft,Z=2*this.layerConfig.characterWidth;_-Z<G?(_-=Z,_<this.$padding+Z&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=Z,G+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&_-G<this.characterWidth&&this.session.setScrollLeft(0))}},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(I){this.session.setScrollTop(I*this.lineHeight)},L.prototype.alignCursor=function(I,z){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),N=this.$size.scrollerHeight-this.lineHeight,_=P.top-N*(z||0);return this.session.setScrollTop(_),_},L.prototype.$calcSteps=function(I,z){var P=0,N=this.STEPS,_=[],S=function(D,j,U){return U*(Math.pow(D-1,3)+1)+j};for(P=0;P<N;++P)_.push(S(P/this.STEPS,I,z-I));return _},L.prototype.scrollToLine=function(I,z,P,N){var _=this.$cursorLayer.getPixelPosition({row:I,column:0}),S=_.top;z&&(S-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(S),P!==!1&&this.animateScrolling(D,N)},L.prototype.animateScrolling=function(I,z){var P=this.scrollTop;if(!this.$animatedScroll)return;var N=this;if(I==P)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(I=_[0],I==P))return}var S=N.$calcSteps(I,P);this.$scrollAnimation={from:I,to:P,steps:S},clearInterval(this.$timer),N.session.setScrollTop(S.shift()),N.session.$scrollTop=P;function D(){N.$timer=clearInterval(N.$timer),N.$scrollAnimation=null,N.$stopAnimation=!1,z&&z()}this.$timer=setInterval(function(){if(N.$stopAnimation){D();return}if(!N.session)return clearInterval(N.$timer);S.length?(N.session.setScrollTop(S.shift()),N.session.$scrollTop=P):P!=null?(N.session.$scrollTop=-1,N.session.setScrollTop(P),P=null):D()},10)},L.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},L.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(I,z){this.session.setScrollTop(z),this.session.setScrollLeft(I)},L.prototype.scrollBy=function(I,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},L.prototype.isScrollableBy=function(I,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},L.prototype.pixelToScreenCoordinates=function(I,z){var P;if(this.$hasCssTransforms){P={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,z]);I=N[1]-this.gutterWidth-this.margin.left,z=N[0]}else P=this.scroller.getBoundingClientRect();var _=I+this.scrollLeft-P.left-this.$padding,S=_/this.characterWidth,D=Math.floor((z+this.scrollTop-P.top)/this.lineHeight),j=this.$blockCursor?Math.floor(S):Math.round(S);return{row:D,column:j,side:S-j>0?1:-1,offsetX:_}},L.prototype.screenToTextCoordinates=function(I,z){var P;if(this.$hasCssTransforms){P={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,z]);I=N[1]-this.gutterWidth-this.margin.left,z=N[0]}else P=this.scroller.getBoundingClientRect();var _=I+this.scrollLeft-P.left-this.$padding,S=_/this.characterWidth,D=this.$blockCursor?Math.floor(S):Math.round(S),j=Math.floor((z+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(j,Math.max(D,0),_)},L.prototype.textToScreenCoordinates=function(I,z){var P=this.scroller.getBoundingClientRect(),N=this.session.documentToScreenPosition(I,z),_=this.$padding+(this.session.$bidiHandler.isBidiRow(N.row,I)?this.session.$bidiHandler.getPosLeft(N.column):Math.round(N.column*this.characterWidth)),S=N.row*this.lineHeight;return{pageX:P.left+_-this.scrollLeft,pageY:P.top+S-this.scrollTop}},L.prototype.visualizeFocus=function(){y.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){y.removeCssClass(this.container,"ace_focus")},L.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(y.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},L.prototype.setCompositionText=function(I){var z=this.session.selection.cursor;this.addToken(I,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),y.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},L.prototype.setGhostText=function(I,z){var P=this.session.selection.cursor,N=z||{row:P.row,column:P.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(I,N);this.addToken(_[0].text,"ghost_text",N.row,N.column),this.$ghostText={text:I,position:{row:N.row,column:N.column}};var S=y.createElement("div");if(_.length>1){var D=this.hideTokensAfterPosition(N.row,N.column),j;_.slice(1).forEach(function(ne){var le=y.createElement("div"),ue=y.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(le.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(y.createTextNode(ne.text)),le.appendChild(ue),S.appendChild(le),j=le}),D.forEach(function(ne){var le=y.createElement("span");R(ne.type)||(le.className="ace_"+ne.type.replace(/\./g," ace_")),le.appendChild(y.createTextNode(ne.value)),j.appendChild(le)}),this.$ghostTextWidget={el:S,row:N.row,column:N.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(N,!0),G=this.container,Z=G.getBoundingClientRect().height,te=_.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollToRow(N.row)}},L.prototype.$calculateWrappedTextChunks=function(I,z){var P=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(P/this.characterWidth)-2;N=N<=0?60:N;for(var _=I.split(/\r?\n/),S=[],D=0;D<_.length;D++){var j=this.session.$getDisplayTokens(_[D],z.column),U=this.session.$computeWrapSplits(j,N,this.session.$tabSize);if(U.length>0){var G=0;U.push(_[D].length);for(var Z=0;Z<U.length;Z++){var te=_[D].slice(G,U[Z]);S.push({text:te,wrapped:!0}),G=U[Z]}}else S.push({text:_[D],wrapped:!1})}return S},L.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},L.prototype.addToken=function(I,z,P,N){var _=this.session;_.bgTokenizer.lines[P]=null;var S={type:z,value:I},D=_.getTokens(P);if(N==null||!D.length)D.push(S);else for(var j=0,U=0;U<D.length;U++){var G=D[U];if(j+=G.value.length,N<=j){var Z=G.value.length-(j-N),te=G.value.slice(0,Z),he=G.value.slice(Z);D.splice(U,1,{type:G.type,value:te},S,{type:G.type,value:he});break}}this.updateLines(P,P)},L.prototype.hideTokensAfterPosition=function(I,z){for(var P=this.session.getTokens(I),N=0,_=!1,S=[],D=0;D<P.length;D++){var j=P[D];if(N+=j.value.length,j.type!=="ghost_text"){if(_){S.push({type:j.type,value:j.value}),j.type="hidden_token";continue}N===z&&(_=!0)}}return this.updateLines(I,I),S},L.prototype.removeExtraToken=function(I,z){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},L.prototype.setTheme=function(I,z){var P=this;if(this.$themeId=I,P._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var N=I||this.$options.theme.initialValue;h.loadModule(["theme",N],_)}else _(I);function _(S){if(P.$themeId!=I)return z&&z();if(!S||!S.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");S.$id&&(P.$themeId=S.$id),y.importCssString(S.cssText,S.cssClass,P.container),P.theme&&y.removeCssClass(P.container,P.theme.cssClass);var D="padding"in S?S.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&D!=P.$padding&&P.setPadding(D),P.$theme=S.cssClass,P.theme=S,y.addCssClass(P.container,S.cssClass),y.setCssClass(P.container,"ace_dark",S.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:S}),z&&z(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(I,z){y.setCssClass(this.container,I,z!==!1)},L.prototype.unsetStyle=function(I){y.removeCssClass(this.container,I)},L.prototype.setCursorStyle=function(I){y.setStyle(this.scroller.style,"cursor",I)},L.prototype.setMouseCursor=function(I){y.setStyle(this.scroller.style,"cursor",I)},L.prototype.attachToShadowRoot=function(){y.importCssString(M,"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(I){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollTop(P.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollLeft(P.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollTop(P.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollLeft(P.data-z.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=x.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(z){var P=z[0].contentRect.width,N=z[0].contentRect.height;Math.abs(I.$size.width-P)>1||Math.abs(I.$size.height-N)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L})();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,g.implement(O.prototype,E),h.defineOptions(O.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){y.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=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,m){var g=e("../lib/oop"),y=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,h=e("../config");function p(c){var o="importScripts('"+y.qualifyURL(c)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,d=new l;return d.append(o),d.getBlob("application/javascript")}}function s(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var o=p(c),l=window.URL||window.webkitURL,d=l.createObjectURL(o);return new Worker(d)}return new Worker(c)}var a=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,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(){g.implement(this,x),this.$createWorkerFromOldConfig=function(c,o,l,d,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)d=d||h.moduleUrl(o,"worker");else{var b=this.$normalizePath;d=d||b(e.toUrl("ace/worker/worker.js",null,"_"));var E={};c.forEach(function(M){E[M]=b(e.toUrl(M,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(d),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:l}),this.$worker},this.onMessage=function(c){var o=c.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var l=this.callbacks[o.id];l&&(l(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return y.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,o){this.$worker.postMessage({command:c,args:o})},this.call=function(c,o,l){if(l){var d=this.callbackId++;this.callbacks[d]=l,o.push(d)}this.send(c,o)},this.emit=function(c,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:o.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(a.prototype);var u=function(c,o,l){var d=null,w=!1,b=Object.create(x),E=[],M=new a({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),d&&(w?setTimeout(k):k())}});M.setEmitSync=function(C){w=C};var k=function(){var C=E.shift();C.command?d[C.command].apply(d,C.args):C.event&&b._signal(C.event,C.data)};return b.postMessage=function(C){M.onMessage({data:C})},b.callback=function(C,R){this.postMessage({type:"call",id:R,data:C})},b.emit=function(C,R){this.postMessage({type:"event",name:C,data:R})},h.loadModule(["worker",o],function(C){for(d=new C[l](b);E.length;)k()}),M};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(e,r,m){var g=e("./range").Range,y=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),h=(function(){function p(s,a,u,c,o,l){var d=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){d.onCursorChange()})},this.$pos=u;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return p.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 c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=u.addMarker(new g(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var l=a.createAnchor(o.row,o.column);l.$insertRight=!0,l.detach(),s.others.push(l)}),u.setUndoSelect(!1)},p.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 g(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},p.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var 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,c=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(s),c&&(this.length+=u),c&&!this.session.$fromUndo){if(s.action==="insert")for(var l=this.others.length-1;l>=0;l--){var d=this.others[l],w={row:d.row,column:d.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var l=this.others.length-1;l>=0;l--){var d=this.others[l],w={row:d.row,column:d.column+o};this.doc.remove(new g(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,u=function(o,l){a.removeMarker(o.markerId),o.markerId=a.addMarker(new g(o.row,o.column,o.row,o.column+s.length),l,null,!1)};u(this.pos,this.mainClass);for(var c=this.others.length;c--;)u(this.others[c],this.othersClass)}},p.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))}},p.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),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)}},p})();x.implement(h.prototype,y),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var g=e("../lib/event"),y=e("../lib/useragent");function x(p,s){return p.row==s.row&&p.column==s.column}function h(p){var s=p.domEvent,a=s.altKey,u=s.shiftKey,c=s.ctrlKey,o=p.getAccelKey(),l=p.getButton();if(c&&y.isMac&&(l=s.button),p.editor.inMultiSelectMode&&l==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!c&&!a&&!o){l===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(l===0){var d=p.editor,w=d.selection,b=d.inMultiSelectMode,E=p.getDocumentPosition(),M=w.getCursor(),k=p.inSelection()||w.isEmpty()&&x(E,M),C=p.x,R=p.y,O=function(te){C=te.clientX,R=te.clientY},L=d.session,I=d.renderer.pixelToScreenCoordinates(C,R),z=I,P;if(d.$mouseHandler.$enableJumpToDef)c&&a||o&&a?P=u?"block":"add":a&&d.$blockSelectEnabled&&(P="block");else if(o&&!a){if(P="add",!b&&u)return}else a&&d.$blockSelectEnabled&&(P="block");if(P&&y.isMac&&s.ctrlKey&&d.$mouseHandler.cancelContextMenu(),P=="add"){if(!b&&k)return;if(!b){var N=w.toOrientedRange();d.addSelectionMarker(N)}var _=w.rangeList.rangeAtPoint(E);d.inVirtualSelectionMode=!0,u&&(_=null,N=w.ranges[0]||N,d.removeSelectionMarker(N)),d.once("mouseup",function(){var te=w.toOrientedRange();_&&te.isEmpty()&&x(_.cursor,te.cursor)?w.substractPoint(te.cursor):(u?w.substractPoint(N.cursor):N&&(d.removeSelectionMarker(N),w.addRange(N)),w.addRange(te)),d.inVirtualSelectionMode=!1})}else if(P=="block"){p.stop(),d.inVirtualSelectionMode=!0;var S,D=[],j=function(){var te=d.renderer.pixelToScreenCoordinates(C,R),he=L.screenToDocumentPosition(te.row,te.column,te.offsetX);x(z,te)&&x(he,w.lead)||(z=te,d.selection.moveToPosition(he),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(D),D=w.rectangularRangeBlock(z,I),d.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=d.$mouseHandler.$clickSelection.clone()),D.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};b&&!o?w.toSingleRange():!b&&o&&(S=w.toOrientedRange(),d.addSelectionMarker(S)),u?I=L.documentToScreenPosition(w.lead):w.moveToPosition(E),z={row:-1,column:-1};var U=function(te){j(),clearInterval(Z),d.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),S&&(d.removeSelectionMarker(S),w.toSingleRange(S));for(var he=0;he<D.length;he++)w.addRange(D[he]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null},G=j;g.capture(d.container,O,U);var Z=setInterval(function(){G()},20);return p.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,m){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(y){y.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(y){y.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(y){y.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(y){y.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(y){y.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(y){y.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(y){y.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(y){y.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(y){y.multiSelect.rangeCount>1?y.multiSelect.joinSelections():y.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(y){y.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(y){y.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(y){y.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(y){y.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(y){return y&&y.inMultiSelectMode}}];var g=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new g(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,m){var g=e("./range_list").RangeList,y=e("./range").Range,x=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,p=e("./lib/event"),s=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=e("./search").Search,c=new u;function o(M,k,C){return c.$options.wrap=!0,c.$options.needle=k,c.$options.backwards=C==-1,c.find(M)}var l=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(M,k){if(M){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(M),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(M);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}M.cursor||(M.cursor=M.end);var R=this.rangeList.add(M);return this.$onAddRange(M),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(M)}},this.toSingleRange=function(M){M=M||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),M&&this.fromOrientedRange(M)},this.substractPoint=function(M){var k=this.rangeList.substractPoint(M);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var M=this.rangeList.merge();M.length&&this.$onRemoveRange(M)},this.$onAddRange=function(M){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(M),this._signal("addRange",{range:M})},this.$onRemoveRange=function(M){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();M.push(k),this.rangeCount=0}for(var C=M.length;C--;){var R=this.ranges.indexOf(M[C]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:M}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var M=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<M.length;C++){var R=M[C],O=R.start.row,L=R.end.row;if(O===L)k.push(R.clone());else{for(k.push(new y(O,R.start.column,O,this.session.getLine(O).length));++O<L;)k.push(this.getLineRange(O,!0));k.push(new y(L,0,L,R.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var M=this.rangeList.ranges,k=M[M.length-1],C=y.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var M=this.rangeList.ranges,k=M[M.length-1],C=y.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var R=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(R,O);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(M,k,C){var R=[],O=M.column<k.column;if(O)var L=M.column,I=k.column,z=M.offsetX,P=k.offsetX;else var L=k.column,I=M.column,z=k.offsetX,P=M.offsetX;var N=M.row<k.row;if(N)var _=M.row,S=k.row;else var _=k.row,S=M.row;L<0&&(L=0),_<0&&(_=0),_==S&&(C=!0);for(var D,j=_;j<=S;j++){var U=y.fromPoints(this.session.screenToDocumentPosition(j,L,z),this.session.screenToDocumentPosition(j,I,P));if(U.isEmpty()){if(D&&w(U.end,D))break;D=U.end}U.cursor=O?U.start:U.end,R.push(U)}if(N&&R.reverse(),!C){for(var G=R.length-1;R[G].isEmpty()&&G>0;)G--;if(G>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var te=G;te>=Z;te--)R[te].isEmpty()&&R.splice(te,1)}return R}}).call(x.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(M){M.cursor||(M.cursor=M.end);var k=this.getSelectionStyle();return M.marker=this.session.addMarker(M,"ace_selection",k),this.session.$selectionMarkers.push(M),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,M},this.removeSelectionMarker=function(M){if(M.marker){this.session.removeMarker(M.marker);var k=this.session.$selectionMarkers.indexOf(M);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(M){for(var k=this.session.$selectionMarkers,C=M.length;C--;){var R=M[C];if(R.marker){this.session.removeMarker(R.marker);var O=k.indexOf(R);O!=-1&&k.splice(O,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(M){this.addSelectionMarker(M.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(M){this.removeSelectionMarkers(M.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(M){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(M){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(M){var k=M.command,C=M.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?R=C.forEachSelection(k,M.args):k.multiSelectAction=="forEachLine"?R=C.forEachSelection(k,M.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=k.exec(C,M.args||{})):R=k.multiSelectAction(C,M.args||{});else{var R=k.exec(C,M.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(M,k,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,O=C==!0||C&&C.$byLines,L=this.session,I=this.selection,z=I.rangeList,P=(R?I:z).ranges,N;if(!P.length)return M.exec?M.exec(this,k||{}):M(this,k||{});var _=I._eventRegistry;I._eventRegistry={};var S=new x(L);this.inVirtualSelectionMode=!0;for(var D=P.length;D--;){if(O)for(;D>0&&P[D].start.row==P[D-1].end.row;)D--;S.fromOrientedRange(P[D]),S.index=D,this.selection=L.selection=S;var j=M.exec?M.exec(this,k||{}):M(this,k||{});!N&&j!==void 0&&(N=j),S.toOrientedRange(P[D])}S.detach(),this.selection=L.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=_,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),N}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var M="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],R=0;R<k.length;R++)C.push(this.session.getTextRange(k[R]));var O=this.session.getDocument().getNewLineCharacter();M=C.join(O),M.length==(C.length-1)*O.length&&(M="")}else this.selection.isEmpty()||(M=this.session.getTextRange(this.getSelectionRange()));return M},this.$checkMultiselectChange=function(M,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var R=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=k.row||this.session.$clipPositionToDocument(R.row,R.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(M,k,C){if(k=k||{},k.needle=M||k.needle,k.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(R)}this.$search.set(k);var O=this.$search.findAll(this.session);if(!O.length)return 0;var L=this.multiSelect;C||L.toSingleRange(O[0]);for(var I=O.length;I--;)L.addRange(O[I],!0);return R&&L.rangeList.rangeAtPoint(R.start)&&L.addRange(R,!0),O.length},this.selectMoreLines=function(M,k){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,O=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(O.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(O.row+M,O.column);if(C.isEmpty())var z=L;else var I=this.session.documentToScreenPosition(R?C.end:C.start),z=this.session.screenToDocumentPosition(I.row+M,I.column);if(R){var P=y.fromPoints(L,z);P.cursor=P.start}else{var P=y.fromPoints(z,L);P.cursor=P.end}if(P.desiredColumn=O.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var N=C.cursor;this.selection.addRange(P),N&&this.selection.substractPoint(N)},this.transposeSelections=function(M){for(var k=this.session,C=k.multiSelect,R=C.ranges,O=R.length;O--;){var L=R[O];if(L.isEmpty()){var I=k.getWordRange(L.start.row,L.start.column);L.start.row=I.start.row,L.start.column=I.start.column,L.end.row=I.end.row,L.end.column=I.end.column}}C.mergeOverlappingRanges();for(var z=[],O=R.length;O--;){var L=R[O];z.unshift(k.getTextRange(L))}M<0?z.unshift(z.pop()):z.push(z.shift());for(var O=R.length;O--;){var L=R[O],P=L.clone();k.replace(L,z[O]),L.start.row=P.start.row,L.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(M,k,C){var R=this.session,O=R.multiSelect,L=O.toOrientedRange();if(!(L.isEmpty()&&(L=R.getWordRange(L.start.row,L.start.column),L.cursor=M==-1?L.start:L.end,this.multiSelect.addRange(L),C))){var I=R.getTextRange(L),z=o(R,I,M);z&&(z.cursor=M==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(L.cursor)}},this.alignCursors=function(){var M=this.session,k=M.multiSelect,C=k.ranges,R=-1,O=C.filter(function(G){if(G.cursor.row==R)return!0;R=G.cursor.row});if(!C.length||O.length==C.length-1){var L=this.selection.getRange(),I=L.start.row,z=L.end.row,P=I==z;if(P){var N=this.session.getLength(),_;do _=this.session.getLine(z);while(/[=:]/.test(_)&&++z<N);do _=this.session.getLine(I);while(/[=:]/.test(_)&&--I>0);I<0&&(I=0),z>=N&&(z=N-1)}var S=this.session.removeFullLines(I,z);S=this.$reAlignText(S,P),this.session.insert({row:I,column:0},S.join(`
|
951
|
+
`)+`
|
952
|
+
`),P||(L.start.column=0,L.end.column=S[S.length-1].length),this.selection.setRange(L)}else{O.forEach(function(G){k.substractPoint(G.cursor)});var D=0,j=1/0,U=C.map(function(G){var Z=G.cursor,te=M.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>D&&(D=Z.column),he<j&&(j=he),he});C.forEach(function(G,Z){var te=G.cursor,he=D-te.column,ne=U[Z]-j;he>ne?M.insert(te,s.stringRepeat(" ",he-ne)):M.remove(new y(te.row,te.column,te.row,te.column-he+ne)),G.start.column=G.end.column=D,G.start.row=G.end.row=te.row,G.cursor=G.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(M,k){var C=!0,R=!0,O,L,I;return M.map(function(S){var D=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?O==null?(O=D[1].length,L=D[2].length,I=D[3].length,D):(O+L+I!=D[1].length+D[2].length+D[3].length&&(R=!1),O!=D[1].length&&(C=!1),O>D[1].length&&(O=D[1].length),L<D[2].length&&(L=D[2].length),I>D[3].length&&(I=D[3].length),D):[S]}).map(k?P:C?R?N:P:_);function z(S){return s.stringRepeat(" ",S)}function P(S){return S[2]?z(O)+S[2]+z(L-S[2].length+I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function N(S){return S[2]?z(O+L-S[2].length)+S[2]+z(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function _(S){return S[2]?z(O)+S[2]+z(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(d.prototype);function w(M,k){return M.row==k.row&&M.column==k.column}r.onSessionChange=function(M){var k=M.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=M.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(M){M.$multiselectOnSessionChange||(M.$onAddRange=M.$onAddRange.bind(M),M.$onRemoveRange=M.$onRemoveRange.bind(M),M.$onMultiSelect=M.$onMultiSelect.bind(M),M.$onSingleSelect=M.$onSingleSelect.bind(M),M.$multiselectOnSessionChange=r.onSessionChange.bind(M),M.$checkMultiselectChange=M.$checkMultiselectChange.bind(M),M.$multiselectOnSessionChange(M),M.on("changeSession",M.$multiselectOnSessionChange),M.on("mousedown",h),M.commands.addCommands(a.defaultCommands),E(M))}function E(M){if(!M.textInput)return;var k=M.textInput.getElement(),C=!1;p.addListener(k,"keydown",function(O){var L=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);M.$blockSelectEnabled&&L?C||(M.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},M),p.addListener(k,"keyup",R,M),p.addListener(k,"blur",R,M);function R(O){C&&(M.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=b,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(M){b(this),M?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function(M){this.$blockSelectEnabled=M},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,m){var g=e("../../range").Range,y=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,h,p){var s=x.getLine(p);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(x,h,p){return null},this.indentationBlock=function(x,h,p){var s=/\S/,a=x.getLine(h),u=a.search(s);if(u!=-1){for(var c=p||a.length,o=x.getLength(),l=h,d=h;++h<o;){var w=x.getLine(h).search(s);if(w!=-1){if(w<=u){var b=x.getTokenAt(h,0);if(!b||b.type!=="string")break}d=h}}if(d>l){var E=x.getLine(d).length;return new g(l,c,d,E)}}},this.openingBracketBlock=function(x,h,p,s,a){var u={row:p,column:s+1},c=x.$findClosingBracket(h,u,a);if(c){var o=x.foldWidgets[c.row];return o==null&&(o=x.getFoldWidget(c.row)),o=="start"&&c.row>u.row&&(c.row--,c.column=x.getLine(c.row).length),g.fromPoints(u,c)}},this.closingBracketBlock=function(x,h,p,s,a){var u={row:p,column:s},c=x.$findOpeningBracket(h,u);if(c)return c.column++,u.column--,g.fromPoints(c,u)}}).call(y.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,m){var g=e("../lib/dom"),y=e("../range").Range,x=e("../config").nls;function h(s,a,u){for(var c=0,o=s.length-1;c<=o;){var l=c+o>>1,d=u(a,s[l]);if(d>0)c=l+1;else if(d<0)o=l-1;else return l}return-(c+1)}function p(s,a,u){var c=s.getAnnotations().sort(y.comparePoints);if(c.length){var o=h(c,{row:a,column:-1},y.comparePoints);o<0&&(o=-o-1),o>=c.length?o=u>0?0:c.length-1:o===0&&u<0&&(o=c.length-1);var l=c[o];if(!(!l||!u)){if(l.row===a){do l=c[o+=u];while(l&&l.row===a);if(!l)return c.slice()}var d=[];a=l.row;do d[u<0?"unshift":"push"](l),l=c[o+=u];while(l&&l.row==a);return d.length&&d}}}r.showErrorMarker=function(s,a){var u=s.session,c=s.getCursorPosition(),o=c.row,l=u.widgetManager.getWidgetsAtRow(o).filter(function(O){return O.type=="errorMarker"})[0];l?l.destroy():o-=a;var d=p(u,o,a),w;if(d){var b=d[0];c.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,c.row=b.row,w=s.renderer.$gutterLayer.$annotations[c.row]}else{if(l)return;w={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(c.row),s.selection.moveToPosition(c);var E={row:c.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div"),type:"errorMarker"},M=E.el.appendChild(g.createElement("div")),k=E.el.appendChild(g.createElement("div"));k.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(c).left;k.style.left=C+s.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",M.className="error_widget "+w.className,w.displayText.forEach(function(O,L){M.appendChild(g.createTextNode(O)),L<w.displayText.length-1&&M.appendChild(g.createElement("br"))}),M.appendChild(g.createElement("div"));var R=function(O,L,I){if(L===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(E),s.off("changeSelection",E.destroy),s.off("changeSession",E.destroy),s.off("mouseup",E.destroy),s.off("change",E.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",E.destroy),s.on("changeSession",E.destroy),s.on("mouseup",E.destroy),s.on("change",E.destroy),s.session.widgetManager.addLineWidget(E),E.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},g.importCssString(`
|
953
|
+
.error_widget_wrapper {
|
954
|
+
background: inherit;
|
955
|
+
color: inherit;
|
956
|
+
border:none
|
957
|
+
}
|
958
|
+
.error_widget {
|
959
|
+
border-top: solid 2px;
|
960
|
+
border-bottom: solid 2px;
|
961
|
+
margin: 5px 0;
|
962
|
+
padding: 10px 40px;
|
963
|
+
white-space: pre-wrap;
|
964
|
+
}
|
965
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
966
|
+
border-color: #ff5a5a
|
967
|
+
}
|
968
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
969
|
+
border-color: #F1D817
|
970
|
+
}
|
971
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
972
|
+
border-color: #5a5a5a
|
973
|
+
}
|
974
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
975
|
+
border-color: #5aaa5a
|
976
|
+
}
|
977
|
+
.error_widget_arrow {
|
978
|
+
position: absolute;
|
979
|
+
border: solid 5px;
|
980
|
+
border-top-color: transparent!important;
|
981
|
+
border-right-color: transparent!important;
|
982
|
+
border-left-color: transparent!important;
|
983
|
+
top: -5px;
|
984
|
+
}
|
985
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,m){e("./loader_build")(r);var g=e("./lib/dom"),y=e("./range").Range,x=e("./editor").Editor,h=e("./edit_session").EditSession,p=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(u,c){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof x)return u.env.editor;var l="";if(u&&/input|textarea/i.test(u.tagName)){var d=u;l=d.value,u=g.createElement("pre"),d.parentNode.replaceChild(u,d)}else u&&(l=u.textContent,u.innerHTML="");var w=r.createEditSession(l),b=new x(new s(u),w,c),E={document:w,editor:b,onResize:b.resize.bind(b,null)};return d&&(E.textarea=d),b.on("destroy",function(){E.editor.container.env=null}),b.container.env=b.env=E,b},r.createEditSession=function(u,c){var o=new h(u,c);return o.setUndoManager(new p),o},r.Range=y,r.Editor=x,r.EditSession=h,r.UndoManager=p,r.VirtualRenderer=s;var a=r.config.version;r.version=a}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var m in e)e.hasOwnProperty(m)&&(r.ace[m]=e[m]);r.ace.default=r.ace,n&&(n.exports=r.ace)})})()})(Pp)),Pp.exports}var Y2=In("x",B0()),Bp={exports:{}},zp;function z0(){return zp||(zp=1,(function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=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 h=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},p=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/},c=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",b="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",E="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",M="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:b,"constant.language":E,"variable.language":M,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex: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(O,L,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,L),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(O,L,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,L),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(O,L,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,L),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(O,L,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,L),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(O,L,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,L),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{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,c,x,h,o,p,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(O,L,I){var z=O[2]=="-"||O[2]=="~"?"indentedHeredoc":"heredoc",P=O.split(this.splitRegex);return I.push(z,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(O,L,I){return O===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(O,L,I){return O===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(O,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:O}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(O,L,I){return this.next="",O=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.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(O,L,I){return I.length&&O===I[0]?(I.unshift(O,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(O,L,I){return I.length&&O===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,L,I){return I.length&&O===I[0]?(I.unshift(O,L),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,L,I){return I.length&&O===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,L,I){return I.length&&O===I[0]?(I.unshift(O,L),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,L,I){return I.length&&O===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,L,I){return I.length&&O===I[0]?(I.unshift(O,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(O,L,I){return I.length&&O===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(O,L,I){return I.length&&O===I[0]?(I.unshift(O,L),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(O,L,I){return I.length&&O[0]===R[I[0]]?(I.shift(),this.next=I.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()};g.inherits(d,y),r.RubyHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var g=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var p=x.getLine(h),s=p.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=x.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),c)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=e("../../token_iterator").TokenIterator,p=r.FoldMode=function(){};g.inherits(p,y),(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 c=s.getLine(u),o=this.foldingStartMarker.test(c),l=this.foldingStopMarker.test(c);if(o&&!l){var d=c.match(this.foldingStartMarker);if(d[1]){if((d[1]=="if"||d[1]=="else"||d[1]=="while"||d[1]=="until"||d[1]=="unless")&&(d[1]=="else"&&/^\s*else\s*$/.test(c)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(c)===!1)||d[1]=="when"&&/\sthen\s/.test(c)===!0)return;if(s.getTokenAt(u,d.index+2).type==="keyword")return"start"}else if(!d[3]||s.getTokenAt(u,d.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!l||o&&l)return"";var d=c.match(this.foldingStopMarker);if(d[3]==="end"){if(s.getTokenAt(u,d.index+1).type==="keyword")return"end"}else if(!d[1]||s.getTokenAt(u,d.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,u){var c=s.doc.getLine(u),o=this.foldingStartMarker.exec(c);if(o)return o[1]||o[3]?this.rubyBlock(s,u,o.index+2):this.openingBracketBlock(s,"{",u,o.index);var o=this.foldingStopMarker.exec(c);if(o)return o[3]==="end"&&s.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(s,u,o.index+1):o[1]==="=end"&&s.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(s,u,o.index+1):this.closingBracketBlock(s,"}",u,o.index+o[0].length)},this.rubyBlock=function(s,a,u,c){var o=new h(s,a,u),l=o.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var d=l.value,w=s.getLine(a);switch(l.value){case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+l.value);if(!b.test(w))return;var E=this.indentKeywords[d];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var b=new RegExp("^\\s*"+l.value+"\\s*$");if(!b.test(w))return;var E=1;break;default:var E=this.indentKeywords[d]}var M=[d];if(E){var k=E===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,R=[];if(R.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(E==1){if(k=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=o.step();){var O=!1;if(l.type==="keyword"){var L=E*this.indentKeywords[l.value];switch(w=s.getLine(o.getCurrentTokenRow()),l.value){case"do":for(var I=o.$tokenIndex-1;I>=0;I--){var z=o.$rowTokens[I];if(z&&(z.value=="while"||z.value=="until"||z.value=="for")){L=0;break}}break;case"else":var b=new RegExp("^\\s*"+l.value+"\\s*$");(!b.test(w)||d=="case")&&(L=0,O=!0);break;case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+l.value);b.test(w)||(L=0,O=!0);break;case"when":(/\sthen\s/.test(w)||d=="case")&&(L=0,O=!0)}if(L>0)M.unshift(l.value);else if(L<=0&&O===!1){if(M.shift(),!M.length&&((d=="while"||d=="until"||d=="for")&&l.value!="do"||l.value=="do"&&E==-1&&L!=0||l.value!="do"))break;L===0&&M.unshift(l.value)}}}if(!l)return null;if(c)return R.push(o.getCurrentTokenRange()),R;var a=o.getCurrentTokenRow();if(E===-1){if(l.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new x(a,P,C-1,k)}return new x(C,k,a-1,s.getLine(a-1).length)}}}}).call(p.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../range").Range,s=e("./folding/ruby").FoldMode,a=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};g.inherits(a,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c),d=this.getTokenizer().getLineTokens(c,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var b=c.match(/^.*[\{\(\[]\s*$/),E=c.match(/^\s*(class|def|module)\s.*$/),M=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(b||E||M||k)&&(l+=o)}return l},this.checkOutdent=function(u,c,o){return/^\s+(end|else|rescue|ensure)$/.test(c+o)||this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(u,c,o){var l=c.getLine(o);if(/}/.test(l))return this.$outdent.autoOutdent(c,o);var d=this.$getIndent(l),w=c.getLine(o-1),b=this.$getIndent(w),E=c.getTabString();b.length<=d.length&&d.slice(-E.length)==E&&c.remove(new p(o,d.length-E.length,o,d.length))},this.getMatching=function(u,c,o){if(c==null){var l=u.selection.lead;o=l.column,c=l.row}var d=u.getTokenAt(c,o);if(d&&d.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,c,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})})()})(Bp)),Bp.exports}z0();var jp={exports:{}},Hp;function j0(){return Hp||(Hp=1,(function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){var h="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",p="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":p,keyword:h},"identifier"),u="[uU]?",c="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",d="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",b="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",M="(?:"+d+"|"+w+"|"+b+"|"+E+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",O="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",L="(?:(?:"+O+"|"+R+")"+k+")",I="(?:"+L+"|"+O+")",z=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex: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:c+'"{3}',next:"rawqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rawqqstring"},{token:"string",regex:c+"'{3}",next:"rawqstring3"},{token:"string",regex:c+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:M+"[lL]\\b"},{token:"constant.numeric",regex:M+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};g.inherits(x,y),r.PythonHighlightRules=x}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};g.inherits(x,y),(function(){this.getFoldWidgetRange=function(h,p,s){var a=h.getLine(s),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(h,u[1],s,u.index):u[2]?this.indentationBlock(h,s,u.index+u[2].length):this.indentationBlock(h,s)}}).call(x.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,p=e("../range").Range,s=function(){this.HighlightRules=x,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};g.inherits(s,y),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c),d=this.getTokenizer().getLineTokens(c,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var b=c.match(/^.*[\{\(\[:]\s*$/);b&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,o){if(o!==`\r
|
986
|
+
`&&o!=="\r"&&o!==`
|
987
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var d=l.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&a[d.value]:!1},this.autoOutdent=function(u,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),d=c.getTabString();l.slice(-d.length)==d&&c.remove(new p(o,l.length-d.length,o,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})})()})(jp)),jp.exports}j0();var Up={exports:{}},Vp;function H0(){return Vp||(Vp=1,(function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};g.inherits(x,y),r.JsonHighlightRules=x}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var g=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var p=x.getLine(h),s=p.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=x.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),c)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var g=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};g.inherits(h,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,s,a){var u=p.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(p,s,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(p,s,a,u){var c=p.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(p,c,a);var o=c.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(p,o[1],a,l);var d=p.getCommentFoldRange(a,l+o[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(p,a):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=c.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(p,o[1],a,l):p.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(p,s){var a=p.getLine(s),u=a.search(/\S/),c=s,o=a.length;s+=1;for(var l=s,d=p.getLength();++s<d;){a=p.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var b=this.getFoldWidgetRange(p,"all",s);if(b){if(b.start.row<=c)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}l=s}}return new y(c,o,l,p.getLine(l).length)},this.getCommentRegionBlock=function(p,s,a){for(var u=s.search(/\s*$/),c=p.getLength(),o=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++a<c;){s=p.getLine(a);var w=l.exec(s);if(w&&(w[1]?d--:d++,!d))break}var b=a;if(b>o)return new y(o,u,b,s.length)}}).call(h.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("./folding/cstyle").FoldMode,s=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};g.inherits(a,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c);if(u=="start"){var d=c.match(/^.*[\{\(\[]\s*$/);d&&(l+=o)}return l},this.checkOutdent=function(u,c,o){return this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(u,c,o){this.$outdent.autoOutdent(c,o)},this.createWorker=function(u){var c=new s(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(u.getDocument()),c.on("annotate",function(o){u.setAnnotations(o.data)}),c.on("terminate",function(){u.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})})()})(Up)),Up.exports}H0();var Kp={exports:{}},qp;function U0(){return qp||(qp=1,(function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop");e("../lib/lang");var y=e("./text_highlight_rules").TextHighlightRules,x=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",h=r.supportFunction="rgb|rgba|url|attr|counter|counters",p=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]+))",c=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var d=this.createKeywordMapper({"support.function":h,"support.constant":p,"support.type":x,"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:c},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:d,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()};g.inherits(l,y),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},x.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};g.inherits(x,y),x.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},x.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},x.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=x}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,r,m){function g(){var u=s.replace("\\d","\\d\\-"),c={onMatch:function(l,d,w){var b=l.charAt(1)=="/"?2:1;return b==1?(d!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):b==2&&d==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(b==1?"":"end-")+"tag-open.xml",value:l.slice(0,b)},{type:"meta.tag.tag-name.xml",value:l.substr(b)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(c);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,c,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,d,w){return d==w[0]&&w.shift(),l.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},o,y("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"}]},c],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function y(u){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var x=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,p=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(u){var c={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(c,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",d="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",b={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(c).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),y("no_regex"),b,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+w+"(\\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*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex: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:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),y("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[y("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:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,M,k){if(this.next=E=="{"?this.nextState:"",E=="{"&&k.length)k.unshift("start",M);else if(E=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{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)&&g.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};x.inherits(a,p),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(h){var p="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+p+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:p},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+p+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+p+":)?"+p+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:p},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===x&&this.normalizeRules()};(function(){this.embedTagRules=function(h,p,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:p+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,c){return c.splice(0),this.token}}],this.embedRules(h,p,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(y.prototype),g.inherits(x,y),r.XmlHighlightRules=x}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("../lib/lang"),x=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,p=e("./xml_highlight_rules").XmlHighlightRules,s=y.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(){p.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,c){var o=s[c];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(x,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};g.inherits(a,p),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,m){var g=e("../config").$modes,y=e("../lib/oop"),x=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,p=e("./html_highlight_rules").HtmlHighlightRules,s=function(u){return"(?:[^"+x.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){p.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,d,w){var b=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(b[3])[0];return g[E]||(E=""),d.unshift("githubblock",[],[b[1],b[2],E],l),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(o,l,d,w){var b=d[1],E=d[2][0],M=d[2][1],k=d[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<E.length+3&&C[2].length>=M.length&&C[2][0]==M[0])return d.splice(0,3),this.next=d.shift(),this.token;if(this.next="",k&&g[k]){var R=g[k].getTokenizer().getLineTokens(o,b.slice(0));return d[1]=R.state,R.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+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:c}),this.normalizeRules()};y.inherits(a,h),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=r.FoldMode=function(){};g.inherits(h,y),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(p,s,a){var u=p.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&p.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(p,s,a){function u(O){return E=p.getTokens(O)[0],E&&E.type.lastIndexOf(M,0)===0}function c(){var O=E.value[0];return O=="="?6:O=="-"?5:7-E.value.search(/[^#]|$/)}var o=p.getLine(a),l=o.length,d=p.getLength(),w=a,b=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(p.bgTokenizer.getState(a)!=="start"){for(;++a<d&&(o=p.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(w,l,a,0)}for(;a-- >0&&(o=p.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(a,o.length,w,0)}var E,M="markup.heading";if(u(a)){for(var k=c();++a<d;)if(u(a)){var C=c();if(C>=k)break}if(b=a-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),b>w)for(;b>w&&/^\s*$/.test(p.getLine(b));)b--;if(b>w){var R=p.getLine(b).length;return new x(w,l,b,R)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var g=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var p=x.getLine(h),s=p.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=x.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),c)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,m){function g(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var y=e("../../lib/oop"),x=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,p=function(){this.add("string_dquotes","insertion",function(s,a,u,c,o){if(o=='"'||o=="'"){var l=o,d=c.doc.getTextRange(u.getSelectionRange());if(d!==""&&d!=="'"&&d!='"'&&u.getWrapBehavioursEnabled())return{text:l+d+l,selection:!1};var w=u.getCursorPosition(),b=c.doc.getLine(w.row),E=b.substring(w.column,w.column+1),M=new h(c,w.row,w.column),k=M.getCurrentToken();if(E==l&&(g(k,"attribute-value")||g(k,"string")))return{text:"",selection:[1,1]};if(k||(k=M.stepBackward()),!k)return;for(;g(k,"tag-whitespace")||g(k,"whitespace");)k=M.stepBackward();var C=!E||E.match(/\s/);if(g(k,"attribute-equals")&&(C||E==">")||g(k,"decl-attribute-equals")&&(C||E=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,u,c,o){var l=c.doc.getTextRange(o);if(!o.isMultiLine()&&(l=='"'||l=="'")){var d=c.doc.getLine(o.start.row),w=d.substring(o.start.column+1,o.start.column+2);if(w==l)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,a,u,c,o){if(o==">"){var l=u.getSelectionRange().start,d=new h(c,l.row,l.column),w=d.getCurrentToken()||d.stepBackward();if(!w||!(g(w,"tag-name")||g(w,"tag-whitespace")||g(w,"attribute-name")||g(w,"attribute-equals")||g(w,"attribute-value"))||g(w,"reference.attribute-value"))return;if(g(w,"attribute-value")){var b=d.getCurrentTokenColumn()+w.value.length;if(l.column<b)return;if(l.column==b){var E=d.stepForward();if(E&&g(E,"attribute-value"))return;d.stepBackward()}}if(/^\s*>/.test(c.getLine(l.row).slice(l.column)))return;for(;!g(w,"tag-name");)if(w=d.stepBackward(),w.value=="<"){w=d.stepForward();break}var M=d.getCurrentTokenRow(),k=d.getCurrentTokenColumn();if(g(d.stepBackward(),"end-tag-open"))return;var C=w.value;return M==l.row&&(C=C.substring(0,l.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,u,c,o){if(o==`
|
988
|
+
`){var l=u.getCursorPosition(),d=c.getLine(l.row),w=new h(c,l.row,l.column),b=w.getCurrentToken();if(g(b,"")&&b.type.indexOf("tag-close")!==-1){if(b.value=="/>")return;for(;b&&b.type.indexOf("tag-name")===-1;)b=w.stepBackward();if(!b)return;var E=b.value,M=w.getCurrentTokenRow();if(b=w.stepBackward(),!b||b.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var k=c.getTokenAt(l.row,l.column+1),d=c.getLine(M),C=this.$getIndent(d),R=C+c.getTabString();return k&&k.value==="</"?{text:`
|
989
|
+
`+R+`
|
990
|
+
`+C,selection:[1,R.length,1,R.length]}:{text:`
|
991
|
+
`+R}}}}})};y.inherits(p,x),r.XmlBehaviour=p}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,m){var g=e("../../lib/oop"),y=e("../../token_iterator").TokenIterator,x=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,p=function(){var s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(x),this.add("autoclosing-fragment","insertion",function(a,u,c,o,l){if(l==">"){var d=c.getSelectionRange().start,w=new y(o,d.row,d.column),b=w.getCurrentToken()||w.stepBackward();if(!b)return;if(b.value=="<")return{text:"></>",selection:[1,1]}}})};g.inherits(p,x),r.JavaScriptBehaviour=p}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){function g(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var y=e("../../lib/oop"),x=e("../../range").Range,h=e("./fold_mode").FoldMode,p=r.FoldMode=function(a,u){h.call(this),this.voidElements=a||{},this.optionalEndTags=y.mixin({},this.voidElements),u&&y.mixin(this.optionalEndTags,u)};y.inherits(p,h);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,c){var o=this._getFirstTagInLine(a,c);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,c,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,c)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var c=a.getTokens(u),o=new s,l=0;l<c.length;l++){var d=c[l];if(g(d,"tag-open")){if(o.end.column=o.start.column+d.value.length,o.closing=g(d,"end-tag-open"),d=c[++l],!d)return null;if(o.tagName=d.value,d.value===""){if(d=c[++l],!d)return null;o.tagName=d.value}for(o.end.column+=d.value.length,l++;l<c.length;l++)if(d=c[l],o.end.column+=d.value.length,g(d,"tag-close")){o.selfClosing=d.value=="/>";break}return o}if(g(d,"tag-close"))return o.selfClosing=d.value=="/>",o;o.start.column+=d.value.length}return null},this._findEndTagInLine=function(a,u,c,o){for(var l=a.getTokens(u),d=0,w=0;w<l.length;w++){var b=l[w];if(d+=b.value.length,!(d<o-1)&&g(b,"end-tag-open")&&(b=l[w+1],g(b,"tag-name")&&b.value===""&&(b=l[w+2]),b&&b.value==c))return!0}return!1},this.getFoldWidgetRange=function(a,u,c){var o=this._getFirstTagInLine(a,c);if(!o)return this.getCommentFoldWidget(a,c)&&a.getCommentFoldRange(c,a.getLine(c).length);var l=a.getMatchingTags({row:c,column:0});if(l)return new x(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(p.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var g=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};g.inherits(h,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,s,a){var u=p.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(p,s,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(p,s,a,u){var c=p.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(p,c,a);var o=c.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(p,o[1],a,l);var d=p.getCommentFoldRange(a,l+o[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(p,a):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=c.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(p,o[1],a,l):p.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(p,s){var a=p.getLine(s),u=a.search(/\S/),c=s,o=a.length;s+=1;for(var l=s,d=p.getLength();++s<d;){a=p.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var b=this.getFoldWidgetRange(p,"all",s);if(b){if(b.start.row<=c)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}l=s}}return new y(c,o,l,p.getLine(l).length)},this.getCommentRegionBlock=function(p,s,a){for(var u=s.search(/\s*$/),c=p.getLength(),o=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++a<c;){s=p.getLine(a);var w=l.exec(s);if(w&&(w[1]?d--:d++,!d))break}var b=a;if(b>o)return new y(o,u,b,s.length)}}).call(h.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var g=e("../../lib/oop"),y=e("./xml").FoldMode,x=e("./cstyle").FoldMode,h=r.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end))),this.xmlFoldMode=new y};g.inherits(h,x),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,s,a){var u=this.getFoldWidgetBase(p,s,a);return u||this.xmlFoldMode.getFoldWidget(p,s,a)},this.getFoldWidgetRange=function(p,s,a,u){var c=this.getFoldWidgetRangeBase(p,s,a,u);return c||this.xmlFoldMode.getFoldWidgetRange(p,s,a)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../worker/worker_client").WorkerClient,s=e("./behaviour/javascript").JavaScriptBehaviour,a=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new a};g.inherits(u,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(c,o,l){var d=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,c),b=w.tokens,E=w.state;if(b.length&&b[b.length-1].type=="comment")return d;if(c=="start"||c=="no_regex"){var M=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);M&&(d+=l)}else if(c=="doc-start"&&(E=="start"||E=="no_regex"))return"";return d},this.checkOutdent=function(c,o,l){return this.$outdent.checkOutdent(o,l)},this.autoOutdent=function(c,o,l){this.$outdent.autoOutdent(o,l)},this.createWorker=function(c){var o=new p(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(c.getDocument()),o.on("annotate",function(l){c.setAnnotations(l.data)}),o.on("terminate",function(){c.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,m){var g={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}},y=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var x=document.createElement("c").style;for(var h in x)if(typeof x[h]=="string"){var p=h.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});g.hasOwnProperty(p)||(g[p]=1)}}this.completionsDefined=!0},this.getCompletions=function(x,h,p,s){if(this.completionsDefined||this.defineCompletions(),x==="ruleset"||h.$mode.$id=="ace/mode/scss"){var a=h.getLine(p.row).substr(0,p.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(x,h,p,s):this.getPropertyCompletions(x,h,p,s,u)}return[]},this.getPropertyCompletions=function(x,h,p,s,a){a=a||!1;var u=Object.keys(g);return u.map(function(c){return{caption:c,snippet:c+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(x,h,p,s){var a=h.getLine(p.row).substr(0,p.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var c=[];return u in g&&typeof g[u]=="object"&&(c=Object.keys(g[u])),c.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(y.prototype),r.CssCompletions=y}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,m){var g=e("../../lib/oop");e("../behaviour").Behaviour;var y=e("./cstyle").CstyleBehaviour,x=e("../../token_iterator").TokenIterator,h=function(){this.inherit(y),this.add("colon","insertion",function(p,s,a,u,c){if(c===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=new x(u,o.row,o.column),d=l.getCurrentToken();if(d&&d.value.match(/\s+/)&&(d=l.stepBackward()),d&&d.type==="support.type"){var w=u.doc.getLine(o.row),b=w.substring(o.column,o.column+1);if(b===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(p,s,a,u,c){var o=u.doc.getTextRange(c);if(!c.isMultiLine()&&o===":"){var l=a.getCursorPosition(),d=new x(u,l.row,l.column),w=d.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=d.stepBackward()),w&&w.type==="support.type"){var b=u.doc.getLine(c.start.row),E=b.substring(c.end.column,c.end.column+1);if(E===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(p,s,a,u,c){if(c===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=u.doc.getLine(o.row),d=l.substring(o.column,o.column+1);if(d===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(p,s,a,u,c){if(c==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(h,y),r.CssBehaviour=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../worker/worker_client").WorkerClient,s=e("./css_completions").CssCompletions,a=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new u};g.inherits(c,y),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,d){var w=this.$getIndent(l),b=this.getTokenizer().getLineTokens(l,o).tokens;if(b.length&&b[b.length-1].type=="comment")return w;var E=l.match(/^.*\{\s*$/);return E&&(w+=d),w},this.checkOutdent=function(o,l,d){return this.$outdent.checkOutdent(l,d)},this.autoOutdent=function(o,l,d){this.$outdent.autoOutdent(l,d)},this.getCompletions=function(o,l,d,w){return this.$completer.getCompletions(o,l,d,w)},this.createWorker=function(o){var l=new p(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(o.getDocument()),l.on("annotate",function(d){o.setAnnotations(d.data)}),l.on("terminate",function(){o.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h,p){this.defaultMode=h,this.subModes=p};g.inherits(x,y),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var p in this.subModes)if(h.indexOf(p)===0)return this.subModes[p];return null},this.$tryMode=function(h,p,s,a){var u=this.$getMode(h);return u?u.getFoldWidget(p,s,a):""},this.getFoldWidget=function(h,p,s){return this.$tryMode(h.getState(s-1),h,p,s)||this.$tryMode(h.getState(s),h,p,s)||this.defaultMode.getFoldWidget(h,p,s)},this.getFoldWidgetRange=function(h,p,s){var a=this.$getMode(h.getState(s-1));return(!a||!a.getFoldWidget(h,p,s))&&(a=this.$getMode(h.getState(s))),(!a||!a.getFoldWidget(h,p,s))&&(a=this.defaultMode),a.getFoldWidgetRange(h,p,s)}}).call(x.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var g=e("../../lib/oop"),y=e("./mixed").FoldMode,x=e("./xml").FoldMode,h=e("./cstyle").FoldMode,p=r.FoldMode=function(s,a){y.call(this,new x(s,a),{"js-":new h,"css-":new h})};g.inherits(p,y)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,m){function g(l,d){return l.type.lastIndexOf(d+".xml")>-1}function y(l,d){for(var w=new h(l,d.row,d.column),b=w.getCurrentToken();b&&!g(b,"tag-name");)b=w.stepBackward();if(b)return b.value}function x(l,d){for(var w=new h(l,d.row,d.column),b=w.getCurrentToken();b&&!g(b,"attribute-name");)b=w.stepBackward();if(b)return b.value}var h=e("../token_iterator").TokenIterator,p=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=p.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:{}},c=Object.keys(u),o=function(){};(function(){this.getCompletions=function(l,d,w,b){var E=d.getTokenAt(w.row,w.column);if(!E)return[];if(g(E,"tag-name")||g(E,"tag-open")||g(E,"end-tag-open"))return this.getTagCompletions(l,d,w,b);if(g(E,"tag-whitespace")||g(E,"attribute-name"))return this.getAttributeCompletions(l,d,w,b);if(g(E,"attribute-value"))return this.getAttributeValueCompletions(l,d,w,b);var M=d.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(M)?this.getHTMLEntityCompletions(l,d,w,b):[]},this.getTagCompletions=function(l,d,w,b){return c.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,d,w,b){var E=y(d,w);if(!E)return[];var M=a;return E in u&&(M=M.concat(Object.keys(u[E]))),M.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,d,w,b){var E=y(d,w),M=x(d,w);if(!E)return[];var k=[];return E in u&&M in u[E]&&typeof u[E][M]=="object"&&(k=Object.keys(u[E][M])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,d,w,b){var E=["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 E.map(function(M){return{caption:M,snippet:M,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,m){var g=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./javascript").Mode,p=e("./css").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(b){this.fragmentContext=b&&b.fragmentContext,this.HighlightRules=s,this.$behaviour=new a,this.$completer=new c,this.createModeDelegates({"js-":h,"css-":p}),this.foldingRules=new u(this.voidElements,y.arrayToMap(d))};g.inherits(w,x),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=y.arrayToMap(l),this.getNextLineIndent=function(b,E,M){return this.$getIndent(E)},this.checkOutdent=function(b,E,M){return!1},this.getCompletions=function(b,E,M,k){return this.$completer.getCompletions(b,E,M,k)},this.createWorker=function(b){if(this.constructor==w){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(b.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(M){b.setAnnotations(M.data)}),E.on("terminate",function(){b.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=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",h=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",p=function(){var s=this.createKeywordMapper({keyword:x,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",c="(?:\\d+)",o="(?:(?:"+c+"?"+u+")|(?:"+c+"\\.))",l="(?:(?:"+o+"|"+c+"))",d="(?:"+l+"|"+o+")",w="(?:&"+c+")",b="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+b+"(?==))",M="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+b+"\\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,R,O){var L=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return O.push(L,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,R,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,R,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[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:M},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:d},{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()};g.inherits(p,y),r.ShHighlightRules=p}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,p=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=x,this.foldingRules=new p,this.$behaviour=this.$defaultBehaviour};g.inherits(s,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c),d=this.getTokenizer().getLineTokens(c,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var b=c.match(/^.*[\{\(\[:]\s*$/);b&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,o){if(o!==`\r
|
992
|
+
`&&o!=="\r"&&o!==`
|
993
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var d=l.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&a[d.value]:!1},this.autoOutdent=function(u,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),d=c.getTabString();l.slice(-d.length)==d&&c.remove(new h(o,l.length-d.length,o,l.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(e,r,m){var g=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,p=e("./behaviour/xml").XmlBehaviour,s=e("./folding/xml").FoldMode,a=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=h,this.$behaviour=new p,this.foldingRules=new s};g.inherits(u,x),(function(){this.voidElements=y.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(c){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(c.getDocument()),o.on("error",function(l){c.setAnnotations(l.data)}),o.on("terminate",function(){c.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,m){var g=e("../lib/oop"),y=e("./behaviour/cstyle").CstyleBehaviour,x=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,p=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=h,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new p,this.$behaviour=new y({braces:!0})};g.inherits(s,x),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,c){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[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(e){n&&(n.exports=e)})})()})(Kp)),Kp.exports}U0();var Gp={exports:{}},Yp;function V0(){return Yp||(Yp=1,(function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-twilight .ace_gutter {
|
994
|
+
background: #232323;
|
995
|
+
color: #E2E2E2
|
996
|
+
}
|
997
|
+
|
998
|
+
.ace-twilight .ace_print-margin {
|
999
|
+
width: 1px;
|
1000
|
+
background: #232323
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
.ace-twilight {
|
1004
|
+
background-color: #141414;
|
1005
|
+
color: #F8F8F8
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
.ace-twilight .ace_cursor {
|
1009
|
+
color: #A7A7A7
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1013
|
+
background: rgba(221, 240, 255, 0.20)
|
1014
|
+
}
|
1015
|
+
|
1016
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1017
|
+
box-shadow: 0 0 3px 0px #141414;
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1021
|
+
background: rgb(102, 82, 0)
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1025
|
+
margin: -1px 0 0 -1px;
|
1026
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1030
|
+
background: rgba(255, 255, 255, 0.031)
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
.ace-twilight .ace_gutter-active-line {
|
1034
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1038
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
.ace-twilight .ace_invisible {
|
1042
|
+
color: rgba(255, 255, 255, 0.25)
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
.ace-twilight .ace_keyword,
|
1046
|
+
.ace-twilight .ace_meta {
|
1047
|
+
color: #CDA869
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
.ace-twilight .ace_constant,
|
1051
|
+
.ace-twilight .ace_constant.ace_character,
|
1052
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1053
|
+
.ace-twilight .ace_constant.ace_other,
|
1054
|
+
.ace-twilight .ace_heading,
|
1055
|
+
.ace-twilight .ace_markup.ace_heading,
|
1056
|
+
.ace-twilight .ace_support.ace_constant {
|
1057
|
+
color: #CF6A4C
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1061
|
+
color: #F8F8F8;
|
1062
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1066
|
+
text-decoration: underline;
|
1067
|
+
font-style: italic;
|
1068
|
+
color: #D2A8A1
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
.ace-twilight .ace_support {
|
1072
|
+
color: #9B859D
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
.ace-twilight .ace_fold {
|
1076
|
+
background-color: #AC885B;
|
1077
|
+
border-color: #F8F8F8
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
.ace-twilight .ace_support.ace_function {
|
1081
|
+
color: #DAD085
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
.ace-twilight .ace_list,
|
1085
|
+
.ace-twilight .ace_markup.ace_list,
|
1086
|
+
.ace-twilight .ace_storage {
|
1087
|
+
color: #F9EE98
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1091
|
+
.ace-twilight .ace_meta.ace_tag {
|
1092
|
+
color: #AC885B
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
.ace-twilight .ace_string {
|
1096
|
+
color: #8F9D6A
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
.ace-twilight .ace_string.ace_regexp {
|
1100
|
+
color: #E9C062
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
.ace-twilight .ace_comment {
|
1104
|
+
font-style: italic;
|
1105
|
+
color: #5F5A60
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
.ace-twilight .ace_variable {
|
1109
|
+
color: #7587A6
|
1110
|
+
}
|
1111
|
+
|
1112
|
+
.ace-twilight .ace_xml-pe {
|
1113
|
+
color: #494949
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
.ace-twilight .ace_indent-guide {
|
1117
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
.ace-twilight .ace_indent-guide-active {
|
1121
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1122
|
+
}
|
1123
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,m){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var g=e("../lib/dom");g.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})})()})(Gp)),Gp.exports}V0();var Xp={exports:{}},Qp;function K0(){return Qp||(Qp=1,(function(n,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,m){function g(C){var R=new Date().toLocaleString("en-us",C);return R.length==1?"0"+R:R}var y=e("./lib/dom"),x=e("./lib/oop"),h=e("./lib/event_emitter").EventEmitter,p=e("./lib/lang"),s=e("./range").Range,a=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,o=e("./clipboard"),l={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,O){var L=C.session.getTextRange();return O?L.replace(/\n\r?([ \t]*\S)/g,`
|
1124
|
+
`+O+"$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 o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(C){var R=C.session.$mode||{};return R.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var d=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function O(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var L={regex:"/("+O("/")+"+)/",onMatch:function(I,z,P){var N=P[0];return N.fmtString=!0,N.guard=I.slice(1,-1),N.flag="",""},next:"formatString"};return C.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(I,z,P){var N=I[1];return(N=="}"&&P.length||"`$\\".indexOf(N)!=-1)&&(I=N),[I]}},{regex:/}/,onMatch:function(I,z,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,z,P){var N=R(I.substr(1));return P.unshift(N[0]),N},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+O("\\|")+"*\\|",onMatch:function(I,z,P){var N=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return P[0].choices=N,[N[0]]},next:"start"},L,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,z,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,z,P){var N=I[1];return N=="}"&&P.length||"`$\\".indexOf(N)!=-1?I=N:N=="n"?I=`
|
1125
|
+
`:N=="t"?I=" ":"ulULE".indexOf(N)!=-1&&(I={changeCase:N,local:N>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,z,P){var N=P.shift();return N&&(N.flag=I.slice(1,-1)),this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,z,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,z,P){var N={text:I.slice(2)};return P.unshift(N),[N]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,z,P){var N=P.shift();return this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,z,P){var N=P[0];return N.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},L,{regex:/:[\?\-+]?/,onMatch:function(I,z,P){I[1]=="+"&&(P[0].ifEnd=P[0]),I[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(R,O){return this.getTokenizer().getLineTokens(R,O).tokens.map(function(L){return L.value||L})},C.prototype.getVariableValue=function(R,O,L){if(/^\d+$/.test(O))return(this.variables.__||{})[O]||"";if(/^[A-Z]\d+$/.test(O))return(this.variables[O[0]+"__"]||{})[O.substr(1)]||"";if(O=O.replace(/^TM_/,""),!this.variables.hasOwnProperty(O))return"";var I=this.variables[O];return typeof I=="function"&&(I=this.variables[O](R,O,L)),I??""},C.prototype.tmStrFormat=function(R,O,L){if(!O.fmt)return R;var I=O.flag||"",z=O.guard;z=new RegExp(z,I.replace(/[^gim]/g,""));var P=typeof O.fmt=="string"?this.tokenizeTmSnippet(O.fmt,"formatString"):O.fmt,N=this,_=R.replace(z,function(){var S=N.variables.__;N.variables.__=[].slice.call(arguments);for(var D=N.resolveVariables(P,L),j="E",U=0;U<D.length;U++){var G=D[U];if(typeof G=="object")if(D[U]="",G.changeCase&&G.local){var Z=D[U+1];Z&&typeof Z=="string"&&(G.changeCase=="u"?D[U]=Z[0].toUpperCase():D[U]=Z[0].toLowerCase(),D[U+1]=Z.substr(1))}else G.changeCase&&(j=G.changeCase);else j=="U"?D[U]=G.toUpperCase():j=="L"&&(D[U]=G.toLowerCase())}return N.variables.__=S,D.join("")});return _},C.prototype.tmFormatFunction=function(R,O,L){return O.formatFunction=="upcase"?R.toUpperCase():O.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,O){function L(j){var U=R.indexOf(j,N+1);U!=-1&&(N=U)}for(var I=[],z="",P=!0,N=0;N<R.length;N++){var _=R[N];if(typeof _=="string"){I.push(_),_==`
|
1126
|
+
`?(P=!0,z=""):P&&(z=/^\t*/.exec(_)[0],P=/\S/.test(_));continue}if(_){if(P=!1,_.fmtString){var S=R.indexOf(_,N+1);S==-1&&(S=R.length),_.fmt=R.slice(N+1,S),N=S}if(_.text){var D=this.getVariableValue(O,_.text,z)+"";_.fmtString&&(D=this.tmStrFormat(D,_,O)),_.formatFunction&&(D=this.tmFormatFunction(D,_,O)),D&&!_.ifEnd?(I.push(D),L(_)):!D&&_.ifEnd&&L(_.ifEnd)}else _.elseEnd?L(_.elseEnd):(_.tabstopId!=null||_.changeCase!=null)&&I.push(_)}}return I},C.prototype.getDisplayTextForSnippet=function(R,O){var L=w.call(this,R,O);return L.text},C.prototype.insertSnippetForSelection=function(R,O,L){L===void 0&&(L={});var I=w.call(this,R,O,L),z=R.getSelectionRange(),P=R.session.replace(z,I.text),N=new b(R),_=R.inVirtualSelectionMode&&R.selection.index;N.addTabstops(I.tabstops,z.start,P,_)},C.prototype.insertSnippet=function(R,O,L){L===void 0&&(L={});var I=this;if(R.inVirtualSelectionMode)return I.insertSnippetForSelection(R,O,L);R.forEachSelection(function(){I.insertSnippetForSelection(R,O,L)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var O=R.session.$mode.$id||"";if(O=O.split("/").pop(),O==="html"||O==="php"){O==="php"&&!R.session.$mode.inlinePhp&&(O="html");var L=R.getCursorPosition(),I=R.session.getState(L.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?O="javascript":I.substring(0,4)=="css-"?O="css":I.substring(0,4)=="php-"&&(O="php"))}return O},C.prototype.getActiveScopes=function(R){var O=this.$getScope(R),L=[O],I=this.snippetMap;return I[O]&&I[O].includeScopes&&L.push.apply(L,I[O].includeScopes),L.push("_"),L},C.prototype.expandWithTab=function(R,O){var L=this,I=R.forEachSelection(function(){return L.expandSnippetForSelection(R,O)},null,{keepOrder:!0});return I&&R.tabstopManager&&R.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(R,O){var L=R.getCursorPosition(),I=R.session.getLine(L.row),z=I.substring(0,L.column),P=I.substr(L.column),N=this.snippetMap,_;return this.getActiveScopes(R).some(function(S){var D=N[S];return D&&(_=this.findMatchingSnippet(D,z,P)),!!_},this),_?(O&&O.dryRun||(R.session.doc.removeInLine(L.row,L.column-_.replaceBefore.length,L.column+_.replaceAfter.length),this.variables.M__=_.matchBefore,this.variables.T__=_.matchAfter,this.insertSnippetForSelection(R,_.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,O,L){for(var I=R.length;I--;){var z=R[I];if(!(z.startRe&&!z.startRe.test(O))&&!(z.endRe&&!z.endRe.test(L))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(O):[""],z.matchAfter=z.endRe?z.endRe.exec(L):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(O)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(L)[0]:"",z}},C.prototype.register=function(R,O){function L(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function I(S,D,j){return S=L(S),D=L(D),S=D+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function z(S){S.scope||(S.scope=O||"_"),O=S.scope,P[O]||(P[O]=[],N[O]={});var D=N[O];if(S.name){var j=D[S.name];j&&_.unregister(j),D[S.name]=S}P[O].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
|
1127
|
+
`):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=p.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=I(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=I(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var P=this.snippetMap,N=this.snippetNameMap,_=this;R||(R=[]),Array.isArray(R)?R.forEach(z):Object.keys(R).forEach(function(S){z(R[S])}),this._signal("registerSnippets",{scope:O})},C.prototype.unregister=function(R,O){function L(P){var N=z[P.scope||O];if(N&&N[P.name]){delete N[P.name];var _=I[P.scope||O],S=_&&_.indexOf(P);S>=0&&_.splice(S,1)}}var I=this.snippetMap,z=this.snippetNameMap;R.content?L(R):Array.isArray(R)&&R.forEach(L)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var O=[],L={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,z;z=I.exec(R);){if(z[1])try{L=JSON.parse(z[1]),O.push(L)}catch{}if(z[4])L.content=z[4].replace(/^\t/gm,""),O.push(L),L={};else{var P=z[2],N=z[3];if(P=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;L.guard=_.exec(N)[1],L.trigger=_.exec(N)[1],L.endTrigger=_.exec(N)[1],L.endGuard=_.exec(N)[1]}else P=="snippet"?(L.tabTrigger=N.match(/^\S*/)[0],L.name||(L.name=N)):P&&(L[P]=N)}}return O},C.prototype.getSnippetByName=function(R,O){var L=this.snippetNameMap,I;return this.getActiveScopes(O).some(function(z){var P=L[z];return P&&(I=P[R]),!!I},this),I},C})();x.implement(d.prototype,h);var w=function(C,R,O){function L(ce){for(var fe=[],_e=0;_e<ce.length;_e++){var $e=ce[_e];if(typeof $e=="object"){if(D[$e.tabstopId])continue;var Te=ce.lastIndexOf($e,_e-1);$e=fe[Te]||{tabstopId:$e.tabstopId}}fe[_e]=$e}return fe}O===void 0&&(O={});var I=C.getCursorPosition(),z=C.session.getLine(I.row),P=C.session.getTabString(),N=z.match(/^\s*/)[0];I.column<N.length&&(N=N.slice(0,I.column)),R=R.replace(/\r/g,"");var _=this.tokenizeTmSnippet(R);_=this.resolveVariables(_,C),_=_.map(function(ce){return ce==`
|
1128
|
+
`&&!O.excludeExtraIndent?ce+N:typeof ce=="string"?ce.replace(/\t/g,P):ce});var S=[];_.forEach(function(ce,fe){if(typeof ce=="object"){var _e=ce.tabstopId,$e=S[_e];if($e||($e=S[_e]=[],$e.index=_e,$e.value="",$e.parents={}),$e.indexOf(ce)===-1){ce.choices&&!$e.choices&&($e.choices=ce.choices),$e.push(ce);var Te=_.indexOf(ce,fe+1);if(Te!==-1){var Ge=_.slice(fe+1,Te),Ve=Ge.some(function(ct){return typeof ct=="object"});Ve&&!$e.value?$e.value=Ge:Ge.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ge.join(""))}}}}),S.forEach(function(ce){ce.length=0});for(var D={},j=0;j<_.length;j++){var U=_[j];if(typeof U=="object"){var G=U.tabstopId,Z=S[G],te=_.indexOf(U,j+1);if(D[G]){D[G]===U&&(delete D[G],Object.keys(D).forEach(function(ce){Z.parents[ce]=!0}));continue}D[G]=U;var he=Z.value;typeof he!="string"?he=L(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),_.splice.apply(_,[j+1,Math.max(0,te-j)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,le=0,ue="";return _.forEach(function(ce){if(typeof ce=="string"){var fe=ce.split(`
|
1129
|
+
`);fe.length>1?(le=fe[fe.length-1].length,ne+=fe.length-1):le+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:le}:ce.start={row:ne,column:le})}),{text:ue,tabstops:S,tokens:_}},b=(function(){function C(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=p.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(R)}return C.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},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(R){for(var O=R.action[0]=="r",L=this.selectedTabstop||{},I=L.parents||{},z=this.tabstops.slice(),P=0;P<z.length;P++){var N=z[P],_=N==L||I[N.index];if(N.rangeList.$bias=_?0:1,R.action=="remove"&&N!==L){var S=N.parents&&N.parents[L.index],D=N.rangeList.pointIndex(R.start,S);D=D<0?-D-1:D+1;var j=N.rangeList.pointIndex(R.end,S);j=j<0?-j-1:j-1;for(var U=N.rangeList.ranges.slice(D,j),G=0;G<U.length;G++)this.removeRange(U[G])}N.rangeList.$onChange(R)}var Z=this.session;!this.$inChange&&O&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var O=this.session,L=O.getTextRange(R.firstNonLinked),I=0;I<R.length;I++){var z=R[I];if(z.linked){var P=z.original,N=r.snippetManager.tmStrFormat(L,P,this.editor);O.replace(z,N)}}this.$inChange=!1}},C.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,O=this.editor.selection.anchor,L=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var z=this.ranges[I].contains(R.row,R.column),P=L||this.ranges[I].contains(O.row,O.column);if(z&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var O=this.tabstops.length,L=this.index+(R||1);L=Math.min(Math.max(L,1),O),L==O&&(L=0),this.selectTabstop(L),this.updateTabstopMarkers(),L===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var O=this.tabstops[this.index];if(O&&this.addTabstopMarkers(O),this.index=R,O=this.tabstops[this.index],!(!O||!O.length)){this.selectedTabstop=O;var L=O.firstNonLinked||O;if(O.choices&&(L.cursor=L.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(L);else{var I=this.editor.multiSelect;I.toSingleRange(L);for(var z=0;z<O.length;z++)O.hasLinkedRanges&&O[z].linked||I.addRange(O[z].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(R,O,L){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var z=s.fromPoints(L,L);M(z.start,O),M(z.end,O),R[0]=[z],R[0].index=0}var P=this.index,N=[P+1,0],_=this.ranges,S=this.snippetId=(this.snippetId||0)+1;R.forEach(function(D,j){var U=this.$openTabstops[j]||D;U.snippetId=S;for(var G=0;G<D.length;G++){var Z=D[G],te=s.fromPoints(Z.start,Z.end||Z.start);E(te.start,O),E(te.end,O),te.original=Z,te.tabstop=U,_.push(te),U!=D?U.unshift(te):U[G]=te,Z.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(N.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),N.length>2&&(this.tabstops.length&&N.push(N.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,N))},C.prototype.addTabstopMarkers=function(R){var O=this.session;R.forEach(function(L){L.markerId||(L.markerId=O.addMarker(L,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var O=this.session;R.forEach(function(L){O.removeMarker(L.markerId),L.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(O){O.snippetId===R?this.addTabstopMarkers(O):this.removeTabstopMarkers(O)},this)}},C.prototype.removeRange=function(R){var O=R.tabstop.indexOf(R);O!=-1&&R.tabstop.splice(O,1),O=this.ranges.indexOf(R),O!=-1&&this.ranges.splice(O,1),O=R.tabstop.rangeList.ranges.indexOf(R),O!=-1&&R.tabstop.splice(O,1),this.session.removeMarker(R.markerId),R.tabstop.length||(O=this.tabstops.indexOf(R.tabstop),O!=-1&&this.tabstops.splice(O,1),this.tabstops.length||this.detach())},C})();b.prototype.keyboardHandler=new u,b.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 E=function(C,R){C.row==0&&(C.column+=R.column),C.row+=R.row},M=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};y.importCssString(`
|
1130
|
+
.ace_snippet-marker {
|
1131
|
+
-moz-box-sizing: border-box;
|
1132
|
+
box-sizing: border-box;
|
1133
|
+
background: rgba(194, 193, 208, 0.09);
|
1134
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1135
|
+
position: absolute;
|
1136
|
+
}`,"snippets.css",!1),r.snippetManager=new d;var k=e("./editor").Editor;(function(){this.insertSnippet=function(C,R){return r.snippetManager.insertSnippet(this,C,R)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,m){var g=e("../virtual_renderer").VirtualRenderer,y=e("../editor").Editor,x=e("../range").Range,h=e("../lib/event"),p=e("../lib/lang"),s=e("../lib/dom"),a=e("../config").nls,u=e("./../lib/useragent"),c=function(E){return"suggest-aria-id:".concat(E)},o=u.isSafari?"menu":"listbox",l=u.isSafari?"menuitem":"option",d=u.isSafari?"aria-current":"aria-selected",w=function(E){var M=new g(E);M.$maxLines=4;var k=new y(M);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},b=(function(){function E(M){var k=s.createElement("div"),C=w(k);M&&M.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var R=function(){};C.focus=R,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=R,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(_){var S=_.getDocumentPosition();C.selection.moveToPosition(S),I.start.row=I.end.row=S.row,_.stop()});var O,L=new x(-1,0,-1,1/0),I=new x(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(_){_?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(_){if(!O){O=_;return}if(!(O.x==_.x&&O.y==_.y)){O=_,O.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var S=O.getDocumentPosition().row;L.start.row!=S&&(L.id||C.setRow(S),P(S))}}),C.renderer.on("beforeRender",function(){if(O&&L.start.row!=-1){O.$pos=null;var _=O.getDocumentPosition().row;L.id||C.setRow(_),P(_,!0)}}),C.renderer.on("afterRender",function(){for(var _=C.renderer.$textLayer,S=_.config.firstRow,D=_.config.lastRow;S<=D;S++){var j=_.element.childNodes[S-_.config.firstRow];j.setAttribute("role",l),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",S+1);var U=C.getData(S);if(U){var G="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",G)}var Z=j.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var _=C.getRow(),S=C.renderer.$textLayer,D=S.element.childNodes[_-S.config.firstRow],j=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(d),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=c(_);s.addCssClass(D,"ace_selected"),D.id=U,S.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),D.setAttribute(d,"true")}});var z=function(){P(-1)},P=function(_,S){_!==L.start.row&&(L.start.row=L.end.row=_,S||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return L.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,z()}),C.on("hide",z),C.on("changeSelection",z),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(_){var S=C.data[_];return typeof S=="string"?S:S&&S.value||""};var N=C.session.bgTokenizer;return N.$tokenizeRow=function(_){function S(ce,fe){ce&&j.push({type:(D.className||"")+(fe||""),value:ce})}var D=C.data[_],j=[];if(!D)return j;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,G=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(D.matchMask&1<<ne||ne==Z.length)){var le=Z.slice(he,ne);he=ne;var ue=G.indexOf(le,te);if(ue==-1)continue;S(U.slice(te,ue),""),te=ue+le.length,S(U.slice(ue,te),"completion-highlight")}return S(U.slice(te,U.length),""),j.push({type:"completion-spacer",value:" "}),D.meta&&j.push({type:"completion-meta",value:D.meta}),D.message&&j.push({type:"completion-message",value:D.message}),j},N.$updateOnChange=R,N.start=R,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){C.filterText=S||"",C.setValue(p.stringRepeat(`
|
1137
|
+
`,_.length),-1),C.data=_||[],C.setRow(0)},C.getData=function(_){return C.data[_]},C.getRow=function(){return I.start.row},C.setRow=function(_){_=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,_)),I.start.row!=_&&(C.selection.clearSelection(),I.start.row=I.end.row=_||0,C.session._emit("changeBackMarker"),C.moveCursorTo(_||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(_,S,D,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===_.top&&C.anchorPos.left===_.left&&C.anchor===D)return!0;var U=this.container,G=this.renderer.scrollBar.width||10,Z=window.innerHeight-G,te=window.innerWidth-G,he=this.renderer,ne=he.$maxLines*S*1.4,le={top:0,bottom:0},ue=Z-_.top-3*this.$borderSize-S,ce=_.top-3*this.$borderSize;D||(ce<=ue||ue>=ne?D="bottom":D="top"),D==="top"?(le.bottom=_.top-this.$borderSize,le.top=le.bottom-ne):D==="bottom"&&(le.top=_.top+S+this.$borderSize,le.bottom=le.top+ne);var fe=le.top>=0&&le.bottom<=Z;if(!j&&!fe)return!1;fe?he.$maxPixelHeight=null:D==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,U.style.display="";var _e=U.offsetParent&&U.offsetParent.getBoundingClientRect();D==="top"?(U.style.top="",U.style.bottom=Z+G-le.bottom-(_e?Z+G-_e.bottom:0)+"px",C.isTopdown=!1):(U.style.top=le.top-(_e?_e.top:0)+"px",U.style.bottom="",C.isTopdown=!0);var $e=_.left;return $e+U.offsetWidth>te&&($e=te-U.offsetWidth),U.style.left=$e-(_e?_e.left:0)+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),O=null),C.anchorPos=_,C.anchor=D,!0},C.show=function(_,S,D){this.tryShow(_,S,D?"bottom":void 0,!0)},C.goTo=function(_){var S=this.getRow(),D=this.session.getLength()-1;switch(_){case"up":S=S<=0?D:S-1;break;case"down":S=S>=D?-1:S+1;break;case"start":S=0;break;case"end":S=D}this.setRow(S)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E})();s.importCssString(`
|
1138
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1139
|
+
background-color: #CAD6FA;
|
1140
|
+
z-index: 1;
|
1141
|
+
}
|
1142
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1143
|
+
background-color: #3a674e;
|
1144
|
+
}
|
1145
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1146
|
+
border: 1px solid #abbffe;
|
1147
|
+
margin-top: -1px;
|
1148
|
+
background: rgba(233,233,253,0.4);
|
1149
|
+
position: absolute;
|
1150
|
+
z-index: 2;
|
1151
|
+
}
|
1152
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1153
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1154
|
+
background: rgba(58, 103, 78, 0.62);
|
1155
|
+
}
|
1156
|
+
.ace_completion-meta {
|
1157
|
+
opacity: 0.5;
|
1158
|
+
margin-left: 0.9em;
|
1159
|
+
}
|
1160
|
+
.ace_completion-message {
|
1161
|
+
margin-left: 0.9em;
|
1162
|
+
color: blue;
|
1163
|
+
}
|
1164
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1165
|
+
color: #2d69c7;
|
1166
|
+
}
|
1167
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1168
|
+
color: #93ca12;
|
1169
|
+
}
|
1170
|
+
.ace_editor.ace_autocomplete {
|
1171
|
+
width: 300px;
|
1172
|
+
z-index: 200000;
|
1173
|
+
border: 1px lightgray solid;
|
1174
|
+
position: absolute;
|
1175
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1176
|
+
line-height: 1.4;
|
1177
|
+
background: #fefefe;
|
1178
|
+
color: #111;
|
1179
|
+
}
|
1180
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1181
|
+
border: 1px #484747 solid;
|
1182
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1183
|
+
line-height: 1.4;
|
1184
|
+
background: #25282c;
|
1185
|
+
color: #c1c1c1;
|
1186
|
+
}
|
1187
|
+
.ace_autocomplete .ace_text-layer {
|
1188
|
+
width: calc(100% - 8px);
|
1189
|
+
}
|
1190
|
+
.ace_autocomplete .ace_line {
|
1191
|
+
display: flex;
|
1192
|
+
align-items: center;
|
1193
|
+
}
|
1194
|
+
.ace_autocomplete .ace_line > * {
|
1195
|
+
min-width: 0;
|
1196
|
+
flex: 0 0 auto;
|
1197
|
+
}
|
1198
|
+
.ace_autocomplete .ace_line .ace_ {
|
1199
|
+
flex: 0 1 auto;
|
1200
|
+
overflow: hidden;
|
1201
|
+
text-overflow: ellipsis;
|
1202
|
+
}
|
1203
|
+
.ace_autocomplete .ace_completion-spacer {
|
1204
|
+
flex: 1;
|
1205
|
+
}
|
1206
|
+
.ace_autocomplete.ace_loading:after {
|
1207
|
+
content: "";
|
1208
|
+
position: absolute;
|
1209
|
+
top: 0px;
|
1210
|
+
height: 2px;
|
1211
|
+
width: 8%;
|
1212
|
+
background: blue;
|
1213
|
+
z-index: 100;
|
1214
|
+
animation: ace_progress 3s infinite linear;
|
1215
|
+
animation-delay: 300ms;
|
1216
|
+
transform: translateX(-100%) scaleX(1);
|
1217
|
+
}
|
1218
|
+
@keyframes ace_progress {
|
1219
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1220
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1221
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1222
|
+
}
|
1223
|
+
@media (prefers-reduced-motion) {
|
1224
|
+
.ace_autocomplete.ace_loading:after {
|
1225
|
+
transform: translateX(625%) scaleX(2);
|
1226
|
+
animation: none;
|
1227
|
+
}
|
1228
|
+
}
|
1229
|
+
`,"autocompletion.css",!1),r.AcePopup=b,r.$singleLineEditor=w,r.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,m){var g=(function(){function y(x){this.editor=x,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return y.prototype.setScreenReaderContent=function(x){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var p=this.popup.getRow(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[p-s.config.firstRow];if(a){for(var u="doc-tooltip ",c=0;c<this._lines.length;c++)u+="ace-inline-screenreader-line-".concat(c," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=x.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},y.prototype.destroy=function(){this.screenReaderDiv.remove()},y.prototype.createCodeBlock=function(){var x=document.createElement("pre");x.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var p=document.createElement("code");p.setAttribute("id","ace-inline-screenreader-line-".concat(h));var s=document.createTextNode(this._lines[h]);p.appendChild(s),x.appendChild(p)}return x},y})();r.AceInlineScreenReader=g}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,m){var g=e("../snippets").snippetManager,y=e("./inline_screenreader").AceInlineScreenReader,x=(function(){function h(){this.editor=null}return h.prototype.show=function(p,s,a){if(a=a||"",p&&this.editor&&this.editor!==p&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!p||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new y(p));var u=s.snippet?g.getDisplayTextForSnippet(p,s.snippet):s.value;return s.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=p,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?p.removeGhostText():p.setGhostText(u),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h})();r.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,m){r.parForEach=function(y,x,h){var p=0,s=y.length;s===0&&h();for(var a=0;a<s;a++)x(y[a],function(u,c){p++,p===s&&h(u,c)})};var g=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(y,x,h){h=h||g;for(var p=[],s=x-1;s>=0&&h.test(y[s]);s--)p.push(y[s]);return p.reverse().join("")},r.retrieveFollowingIdentifier=function(y,x,h){h=h||g;for(var p=[],s=x;s<y.length&&h.test(y[s]);s++)p.push(y[s]);return p},r.getCompletionPrefix=function(y){var x=y.getCursorPosition(),h=y.session.getLine(x.row),p;return y.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(a){!p&&a&&(p=this.retrievePrecedingIdentifier(h,x.column,a))}).bind(this))}).bind(this)),p||this.retrievePrecedingIdentifier(h,x.column)},r.triggerAutocomplete=function(y,h){var h=h??y.session.getPrecedingCharacter();return y.completers.some(function(p){if(p.triggerCharacters&&Array.isArray(p.triggerCharacters))return p.triggerCharacters.includes(h)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,r,m){var g=e("./keyboard/hash_handler").HashHandler,y=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,p=e("./autocomplete/util"),s=e("./lib/lang"),a=e("./lib/dom"),u=e("./snippets").snippetManager,c=e("./config"),o=e("./lib/event"),l=e("./lib/scroll").preventParentScroll,d=function(M,k){k.completer&&k.completer.destroy()},w=(function(){function M(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new g,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new E(M.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(M,"completionsForLoading",{get:function(){return[{caption:c.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),M.prototype.$init=function(){return this.popup=new y(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},M.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},M.prototype.getPopup=function(){return this.popup||this.$init()},M.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},M.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},M.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},M.prototype.$updateGhostText=function(k){var C=this.base.row,R=this.base.column,O=this.editor.getCursorPosition().column,L=this.editor.session.getLine(C).slice(R,O);this.inlineRenderer.show(this.editor,k,L)?this.$seen(k):this.inlineRenderer.hide()},M.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var R=this.popup.getData(C);R&&(!k||R.hideInlinePreview)&&this.$seen(R)}},M.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},M.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},M.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},M.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},M.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,R=C.layerConfig.lineHeight,O=C.$cursorLayer.getPixelPosition(this.base,!0);O.left-=this.popup.getTextLeftOffset();var L=k.container.getBoundingClientRect();O.top+=L.top-C.layerConfig.offset,O.left+=L.left-k.renderer.scrollLeft,O.left+=C.gutterWidth;var I={top:O.top,left:O.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var z=k.container.getBoundingClientRect().bottom-R,P=z<I.top?{top:z,left:I.left}:I;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(O,R,"top")||this.popup.show(O,R)},M.prototype.openPopup=function(k,C,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var O=this.popup.getRow(),L=this.popup.data[O];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(L)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===O&&L!==this.completions.filtered[I]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(I===O&&z){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},M.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()},M.prototype.changeListener=function(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},M.prototype.blurListener=function(k){var C=document.activeElement,R=this.editor.textInput.getElement(),O=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),L=this.popup&&this.popup.container;C!=R&&C.parentNode!=L&&!O&&C!=this.tooltipNode&&k.relatedTarget!=R&&this.detach()},M.prototype.mousedownListener=function(k){this.detach()},M.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},M.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},M.prototype.goTo=function(k){this.popup.goTo(k)},M.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var R=this.completions,O=this.getCompletionProvider().insertMatch(this.editor,k,R.filterText,C);return this.completions==R&&this.detach(),O},M.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},M.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new b(k)),this.completionProvider},M.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},M.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var O=this.editor.getCursorPosition(),L=this.editor.session.getTextRange({start:this.base,end:O});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,k);return}if(C&&C.matches){var O=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(O.row,O.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var R=this.editor.getSession(),O=this.editor.getCursorPosition(),L=p.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(O.row,O.column-L.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:L,pos:O}).provideCompletions(this.editor,I,(function(z,P,N){var _=P.filtered,S=p.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!_.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(S)),D){var j=[{caption:D,value:""}];this.completions=new E(j),this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(_.length==1&&_[0].value==S&&!_[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&_.length==1)return this.insertMatch(_[0])}this.completions=!N&&this.showLoadingState?new E(M.completionsForLoading.concat(_),P.filterText):P,this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!N)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},M.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},M.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[k.getHoveredRow()]||C[k.getRow()]),O=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var L=this.editor.completers.length,I=0;I<L;I++){var z=this.editor.completers[I];if(z.getDocTooltip&&R.completerId===z.id){O=z.getDocTooltip(R);break}}if(!O&&typeof R!="string"&&(O=R),typeof O=="string"&&(O={docText:O}),!O||!O.docHTML&&!O.docText)return this.hideDocTooltip();this.showDocTooltip(O)},M.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",l));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;k.docHTML?R.innerHTML=k.docHTML:k.docText&&(R.textContent=k.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var O=this.popup,L=O.container.getBoundingClientRect(),I=400,z=300,P=O.renderer.scrollBar.width||10,N=L.left,_=window.innerWidth-L.right-P,S=O.isTopdown?L.top:window.innerHeight-P-L.bottom,D=[Math.min(_/I,1),Math.min(N/I,1),Math.min(S/z*.9)],j=Math.max.apply(Math,D),U=R.style;U.display="block",j==D[0]?(U.left=L.right+1+"px",U.right="",U.maxWidth=I*j+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.top,z)+"px"):j==D[1]?(U.right=window.innerWidth-L.left+"px",U.left="",U.maxWidth=I*j+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.top,z)+"px"):j==D[2]&&(U.left=window.innerWidth-L.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",O.isTopdown?(U.top=L.bottom+"px",U.left=L.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.bottom,z)+"px"):(U.top=O.container.offsetTop-R.offsetHeight+"px",U.left=L.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(O.container.offsetTop,z)+"px"))},M.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},M.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},M.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",d),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},M.for=function(k){return k.completer instanceof M||(k.completer&&(k.completer.destroy(),k.completer=null),c.get("sharedPopups")?(M.$sharedInstance||(M.$sharedInstance=new M),k.completer=M.$sharedInstance):(k.completer=new M,k.once("destroy",d))),k.completer},M})();w.prototype.commands={Up:function(M){M.completer.goTo("up")},Down:function(M){M.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(M){M.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(M){M.completer.goTo("end")},Esc:function(M){M.completer.detach()},Return:function(M){return M.completer.insertMatch()},"Shift-Return":function(M){M.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(M){var k=M.completer.insertMatch();if(k||M.tabstopManager)return k;M.completer.goTo("down")},Backspace:function(M){M.execCommand("backspace");var k=p.getCompletionPrefix(M);!k&&M.completer&&M.completer.detach()},PageUp:function(M){M.completer.popup.gotoPageUp()},PageDown:function(M){M.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(M,k){var C=w.for(M);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(M,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=(function(){function M(k){this.initialPosition=k,this.active=!0}return M.prototype.insertByIndex=function(k,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],R)},M.prototype.insertMatch=function(k,C,R){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var O=this.completions.filterText.length,L=0;if(C.range&&C.range.start.row===C.range.end.row&&(O-=this.initialPosition.prefix.length,O+=this.initialPosition.pos.column-C.range.start.column,L+=C.range.end.column-this.initialPosition.pos.column),O||L){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var z=0,P;P=I[z];z++)P.start.column-=O,P.end.column+=L,k.session.remove(P)}C.snippet?u.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},M.prototype.$insertString=function(k,C){var R=C.value||C;k.execCommand("insertstring",R)},M.prototype.gatherCompletions=function(k,C){var R=k.getSession(),O=k.getCursorPosition(),L=p.getCompletionPrefix(k),I=[];this.completers=k.completers;var z=k.completers.length;return k.completers.forEach(function(P,N){P.getCompletions(k,R,O,L,function(_,S){P.hideInlinePreview&&(S=S.map(function(D){return Object.assign(D,{hideInlinePreview:P.hideInlinePreview})})),!_&&S&&(I=I.concat(S)),C(null,{prefix:p.getCompletionPrefix(k),matches:I,finished:--z===0})})}),!0},M.prototype.provideCompletions=function(k,C,R){var O=(function(P){var N=P.prefix,_=P.matches;this.completions=new E(_),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(N),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),L=!0,I=null;if(this.gatherCompletions(k,(function(P,N){if(this.active){P&&(R(P,[],!0),this.detach());var _=N.prefix;if(_.indexOf(N.prefix)===0){if(L){I=N;return}O(N)}}}).bind(this)),L=!1,I){var z=I;I=null,O(z)}},M.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},M})(),E=(function(){function M(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return M.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(O,L){return L.exactMatch-O.exactMatch||L.$score-O.$score||(O.caption||O.value).localeCompare(L.caption||L.value)});var R=null;C=C.filter(function(O){var L=O.snippet||O.caption||O.value;return L===R?!1:(R=L,!0)}),this.filtered=C},M.prototype.filterCompletions=function(k,C){var R=[],O=C.toUpperCase(),L=C.toLowerCase();e:for(var I=0,z;z=k[I];I++){if(z.skipFilter){z.$score=z.score,R.push(z);continue}var P=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(P){var N=-1,_=0,S=0,D,j;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(L);if(U>-1)S=U;else for(var G=0;G<C.length;G++){var Z=P.indexOf(L[G],N+1),te=P.indexOf(O[G],N+1);if(D=Z>=0&&(te<0||Z<te)?Z:te,D<0)continue e;j=D-N-1,j>0&&(N===-1&&(S+=10),S+=j,_|=1<<G),N=D}}z.matchMask=_,z.exactMatch=S?0:1,z.$score=(z.score||0)-S,R.push(z)}}return R},M})();r.Autocomplete=w,r.CompletionProvider=b,r.FilteredList=E}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,m){var g=(function(){function y(x,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=x,x.addDynamicMarker(this)}return y.prototype.getMarkerAtPosition=function(x){return this.markers.find(function(h){return h.range.contains(x.row,x.column)})},y.prototype.markersComparator=function(x,h){return x.range.start.row-h.range.start.row},y.prototype.setMarkers=function(x){this.markers=x.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},y.prototype.update=function(x,h,p,s){if(!(!this.markers||!this.markers.length))for(var a=s.firstRow,u=s.lastRow,c,o=0,l=0,d=0;d<this.markers.length;d++){var w=this.markers[d];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===l?o++:(l=w.range.start.row,o=0),!(o>200))){var b=w.range.clipRows(a,u);if(!(b.start.row===b.end.row&&b.start.column===b.end.column)){var E=b.toScreenRange(p);if(E.isEmpty()){c=p.getNextFoldLine(b.end.row,c),c&&c.end.row>b.end.row&&(a=c.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(x,E,w.className,s):E.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(x,E,w.className,s):h.drawTextMarker(x,E,w.className,s):h.drawSingleLineMarker(x,E,w.className+" ace_br15",s)}}}},y})();g.prototype.MAX_MARKERS=1e4,r.MarkerGroup=g}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,m){function g(p,s){var a=p.getTextRange(x.fromPoints({row:0,column:0},s));return a.split(h).length-1}function y(p,s){var a=g(p,s),u=p.getValue().split(h),c=Object.create(null),o=u[a];return u.forEach(function(l,d){if(!(!l||l===o)){var w=Math.abs(a-d),b=u.length-w;c[l]?c[l]=Math.max(b,c[l]):c[l]=b}}),c}var x=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(p,s,a,u,c){var o=y(s,a),l=Object.keys(o);c(null,l.map(function(d){return{caption:d,value:d,score:o[d],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,m){var g=e("../snippets").snippetManager,y=e("../autocomplete").Autocomplete,x=e("../config"),h=e("../lib/lang"),p=e("../autocomplete/util"),s=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),u={getCompletions:function(L,I,z,P,N){if(I.$mode.completer)return I.$mode.completer.getCompletions(L,I,z,P,N);var _=L.session.getState(z.row),S=I.$mode.getCompletions(_,I,z,P);S=S.map(function(D){return D.completerId=u.id,D}),N(null,S)},id:"keywordCompleter"},c=function(L){var I={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(z,P,N,_){return I[P]=_||""}).replace(/\$(\d+?)/g,function(z,P){return I[P]})},o={getCompletions:function(L,I,z,P,N){var _=[],S=I.getTokenAt(z.row,z.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?_.push("html-tag"):_=g.getActiveScopes(L);var D=g.snippetMap,j=[];_.forEach(function(U){for(var G=D[U]||[],Z=G.length;Z--;){var te=G[Z],he=te.name||te.tabTrigger;he&&j.push({caption:he,snippet:te.content,meta:te.tabTrigger&&!te.name?te.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),N(null,j)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",h.escapeHTML(L.caption),"</b>","<hr></hr>",h.escapeHTML(c(L.snippet))].join(""))},id:"snippetCompleter"},l=[o,a,u];r.setCompleters=function(L){l.length=0,L&&l.push.apply(l,L)},r.addCompleter=function(L){l.push(L)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=o;var d={name:"expandSnippet",exec:function(L){return g.expandWithTab(L)},bindKey:"Tab"},w=function(L,I){b(I.session.$mode)},b=function(L){typeof L=="string"&&(L=x.$modes[L]),L&&(g.files||(g.files={}),E(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(b))},E=function(L,I){!I||!L||g.files[L]||(g.files[L]={},x.loadModule(I,function(z){z&&(g.files[L]=z,!z.snippets&&z.snippetText&&(z.snippets=g.parseSnippetFile(z.snippetText)),g.register(z.snippets||[],z.scope),z.includeScopes&&(g.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(P){b("ace/mode/"+P)})))}))},M=function(L){var I=L.editor,z=I.completer&&I.completer.activated;if(L.command.name==="backspace")z&&!p.getCompletionPrefix(I)&&I.completer.detach();else if(L.command.name==="insertstring"&&!z){k=L;var P=L.editor.$liveAutocompletionDelay;P?C.delay(P):R(L)}},k,C=h.delayedCall(function(){R(k)},0),R=function(L){var I=L.editor,z=p.getCompletionPrefix(I),P=L.args,N=p.triggerAutocomplete(I,P);if(z&&z.length>=I.$liveAutocompletionThreshold||N){var _=y.for(I);_.autoShown=!0,_.showPopup(I)}},O=e("../editor").Editor;e("../config").defineOptions(O.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(y.for(this),this.completers||(this.completers=Array.isArray(L)?L:l),this.commands.addCommand(y.startCommand)):this.commands.removeCommand(y.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:l),this.commands.on("afterExec",M)):this.commands.off("afterExec",M)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(d),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(d),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=s}),(function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})})()})(Xp)),Xp.exports}K0();var Zp={exports:{}},Jp;function q0(){return Jp||(Jp=1,(function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.exports=`
|
1230
|
+
|
1231
|
+
/* ------------------------------------------------------------------------------------------
|
1232
|
+
* Editor Search Form
|
1233
|
+
* --------------------------------------------------------------------------------------- */
|
1234
|
+
.ace_search {
|
1235
|
+
background-color: #ddd;
|
1236
|
+
color: #666;
|
1237
|
+
border: 1px solid #cbcbcb;
|
1238
|
+
border-top: 0 none;
|
1239
|
+
overflow: hidden;
|
1240
|
+
margin: 0;
|
1241
|
+
padding: 4px 6px 0 4px;
|
1242
|
+
position: absolute;
|
1243
|
+
top: 0;
|
1244
|
+
z-index: 99;
|
1245
|
+
white-space: normal;
|
1246
|
+
}
|
1247
|
+
.ace_search.left {
|
1248
|
+
border-left: 0 none;
|
1249
|
+
border-radius: 0px 0px 5px 0px;
|
1250
|
+
left: 0;
|
1251
|
+
}
|
1252
|
+
.ace_search.right {
|
1253
|
+
border-radius: 0px 0px 0px 5px;
|
1254
|
+
border-right: 0 none;
|
1255
|
+
right: 0;
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
.ace_search_form, .ace_replace_form {
|
1259
|
+
margin: 0 20px 4px 0;
|
1260
|
+
overflow: hidden;
|
1261
|
+
line-height: 1.9;
|
1262
|
+
}
|
1263
|
+
.ace_replace_form {
|
1264
|
+
margin-right: 0;
|
1265
|
+
}
|
1266
|
+
.ace_search_form.ace_nomatch {
|
1267
|
+
outline: 1px solid red;
|
1268
|
+
}
|
1269
|
+
|
1270
|
+
.ace_search_field {
|
1271
|
+
border-radius: 3px 0 0 3px;
|
1272
|
+
background-color: white;
|
1273
|
+
color: black;
|
1274
|
+
border: 1px solid #cbcbcb;
|
1275
|
+
border-right: 0 none;
|
1276
|
+
outline: 0;
|
1277
|
+
padding: 0;
|
1278
|
+
font-size: inherit;
|
1279
|
+
margin: 0;
|
1280
|
+
line-height: inherit;
|
1281
|
+
padding: 0 6px;
|
1282
|
+
min-width: 17em;
|
1283
|
+
vertical-align: top;
|
1284
|
+
min-height: 1.8em;
|
1285
|
+
box-sizing: content-box;
|
1286
|
+
}
|
1287
|
+
.ace_searchbtn {
|
1288
|
+
border: 1px solid #cbcbcb;
|
1289
|
+
line-height: inherit;
|
1290
|
+
display: inline-block;
|
1291
|
+
padding: 0 6px;
|
1292
|
+
background: #fff;
|
1293
|
+
border-right: 0 none;
|
1294
|
+
border-left: 1px solid #dcdcdc;
|
1295
|
+
cursor: pointer;
|
1296
|
+
margin: 0;
|
1297
|
+
position: relative;
|
1298
|
+
color: #666;
|
1299
|
+
}
|
1300
|
+
.ace_searchbtn:last-child {
|
1301
|
+
border-radius: 0 3px 3px 0;
|
1302
|
+
border-right: 1px solid #cbcbcb;
|
1303
|
+
}
|
1304
|
+
.ace_searchbtn:disabled {
|
1305
|
+
background: none;
|
1306
|
+
cursor: default;
|
1307
|
+
}
|
1308
|
+
.ace_searchbtn:hover {
|
1309
|
+
background-color: #eef1f6;
|
1310
|
+
}
|
1311
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1312
|
+
padding: 0px 0.7em
|
1313
|
+
}
|
1314
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1315
|
+
content: "";
|
1316
|
+
border: solid 2px #888;
|
1317
|
+
width: 0.5em;
|
1318
|
+
height: 0.5em;
|
1319
|
+
border-width: 2px 0 0 2px;
|
1320
|
+
display:inline-block;
|
1321
|
+
transform: rotate(-45deg);
|
1322
|
+
}
|
1323
|
+
.ace_searchbtn.next:after {
|
1324
|
+
border-width: 0 2px 2px 0 ;
|
1325
|
+
}
|
1326
|
+
.ace_searchbtn_close {
|
1327
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1328
|
+
border-radius: 50%;
|
1329
|
+
border: 0 none;
|
1330
|
+
color: #656565;
|
1331
|
+
cursor: pointer;
|
1332
|
+
font: 16px/16px Arial;
|
1333
|
+
padding: 0;
|
1334
|
+
height: 14px;
|
1335
|
+
width: 14px;
|
1336
|
+
top: 9px;
|
1337
|
+
right: 7px;
|
1338
|
+
position: absolute;
|
1339
|
+
}
|
1340
|
+
.ace_searchbtn_close:hover {
|
1341
|
+
background-color: #656565;
|
1342
|
+
background-position: 50% 100%;
|
1343
|
+
color: white;
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
.ace_button {
|
1347
|
+
margin-left: 2px;
|
1348
|
+
cursor: pointer;
|
1349
|
+
-webkit-user-select: none;
|
1350
|
+
-moz-user-select: none;
|
1351
|
+
-o-user-select: none;
|
1352
|
+
-ms-user-select: none;
|
1353
|
+
user-select: none;
|
1354
|
+
overflow: hidden;
|
1355
|
+
opacity: 0.7;
|
1356
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1357
|
+
padding: 1px;
|
1358
|
+
box-sizing: border-box!important;
|
1359
|
+
color: black;
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
.ace_button:hover {
|
1363
|
+
background-color: #eee;
|
1364
|
+
opacity:1;
|
1365
|
+
}
|
1366
|
+
.ace_button:active {
|
1367
|
+
background-color: #ddd;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
.ace_button.checked {
|
1371
|
+
border-color: #3399ff;
|
1372
|
+
opacity:1;
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
.ace_search_options{
|
1376
|
+
margin-bottom: 3px;
|
1377
|
+
text-align: right;
|
1378
|
+
-webkit-user-select: none;
|
1379
|
+
-moz-user-select: none;
|
1380
|
+
-o-user-select: none;
|
1381
|
+
-ms-user-select: none;
|
1382
|
+
user-select: none;
|
1383
|
+
clear: both;
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
.ace_search_counter {
|
1387
|
+
float: left;
|
1388
|
+
font-family: arial;
|
1389
|
+
padding: 0 8px;
|
1390
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,m){var g=e("../lib/dom"),y=e("../lib/lang"),x=e("../lib/event"),h=e("./searchbox-css"),p=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys"),a=e("../config").nls,u=999;g.importCssString(h,"ace_searchbox",!1);var c=(function(){function d(w,b,E){this.activeInput,this.element=g.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),g.importCssString(h,"ace_searchbox",w.container),x.addListener(this.element,"touchstart",function(M){M.stopPropagation()},w)}return d.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},d.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},d.prototype.onEditorInput=function(){this.find(!1,!1,!0)},d.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},d.prototype.$init=function(){var w=this.element;this.$initElements(w);var b=this;x.addListener(w,"mousedown",function(E){setTimeout(function(){b.activeInput.focus()},0),x.stopPropagation(E)}),x.addListener(w,"click",function(E){var M=E.target||E.srcElement,k=M.getAttribute("action");k&&b[k]?b[k]():b.$searchBarKb.commands[k]&&b.$searchBarKb.commands[k].exec(b),x.stopPropagation(E)}),x.addCommandKeyListener(w,function(E,M,k){var C=s.keyCodeToString(k),R=b.$searchBarKb.findKeyCommand(M,C);R&&R.exec&&(R.exec(b),x.stopEvent(E))}),this.$onChange=y.delayedCall(function(){b.find(!1,!1)}),x.addListener(this.searchInput,"input",function(){b.$onChange.schedule(20)}),x.addListener(this.searchInput,"focus",function(){b.activeInput=b.searchInput,b.searchInput.value&&b.highlight()}),x.addListener(this.replaceInput,"focus",function(){b.activeInput=b.replaceInput,b.searchInput.value&&b.highlight()})},d.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},d.prototype.$syncOptions=function(w){g.setCssClass(this.replaceOption,"checked",this.searchRange),g.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",g.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),g.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),g.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var b=this.editor.getReadOnly();this.replaceOption.style.display=b?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!b?"":"none",this.find(!1,!1,w)},d.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},d.prototype.find=function(w,b,E){if(this.editor.session){var M=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:b,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),k=!M&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},d.prototype.updateCounter=function(){var w=this.editor,b=w.$search.$options.re,E=b.unicode,M=0,k=0;if(b){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
1391
|
+
`),w.session.doc.$autoNewLine=`
|
1392
|
+
`);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var O=b.lastIndex=0,L;(L=b.exec(C))&&(M++,O=L.index,O<=R&&k++,!(M>u||!L[0]&&(b.lastIndex=O+=y.skipEmptyMatch(C,O,E),O>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,M>u?u+"+":M])},d.prototype.findNext=function(){this.find(!0,!1)},d.prototype.findPrev=function(){this.find(!0,!0)},d.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),b=!w&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.hide()},d.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},d.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},d.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},d.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()},d.prototype.show=function(w,b){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=b,this.editor.$search.$options.regExp&&(w=y.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},d.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},d})(),o=new p;o.bindKeys({"Ctrl-f|Command-f":function(d){var w=d.isReplace=!d.isReplace;d.replaceBox.style.display=w?"":"none",d.replaceOption.checked=!1,d.$syncOptions(),d.searchInput.focus()},"Ctrl-H|Command-Option-F":function(d){d.editor.getReadOnly()||(d.replaceOption.checked=!0,d.$syncOptions(),d.replaceInput.focus())},"Ctrl-G|Command-G":function(d){d.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(d){d.findPrev()},esc:function(d){setTimeout(function(){d.hide()})},Return:function(d){d.activeInput==d.replaceInput&&d.replace(),d.findNext()},"Shift-Return":function(d){d.activeInput==d.replaceInput&&d.replace(),d.findPrev()},"Alt-Return":function(d){d.activeInput==d.replaceInput&&d.replaceAll(),d.findAll()},Tab:function(d){(d.activeInput==d.replaceInput?d.searchInput:d.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(d){d.regExpOption.checked=!d.regExpOption.checked,d.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(d){d.caseSensitiveOption.checked=!d.caseSensitiveOption.checked,d.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(d){d.wholeWordOption.checked=!d.wholeWordOption.checked,d.$syncOptions()}},{name:"toggleReplace",exec:function(d){d.replaceOption.checked=!d.replaceOption.checked,d.$syncOptions()}},{name:"searchInSelection",exec:function(d){d.searchOption.checked=!d.searchRange,d.setSearchRange(d.searchOption.checked&&d.editor.getSelectionRange()),d.$syncOptions()}}]);var l=new p([{bindKey:"Esc",name:"closeSearchBar",exec:function(d){d.searchBox.hide()}}]);c.prototype.$searchBarKb=o,c.prototype.$closeSearchBarKb=l,r.SearchBox=c,r.Search=function(d,w){var b=d.searchBox||new c(d),E=d.session.selection.getRange(),M=E.isMultiLine()?"":d.session.getTextRange(E);b.show(M,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})})()})(Zp)),Zp.exports}q0();var G0=Object.defineProperty,Y0=(n,t,e)=>t in n?G0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ui=(n,t,e)=>Y0(n,typeof t!="symbol"?t+"":t,e);function eg(n,t){return function(){return n.apply(t,arguments)}}const{toString:X0}=Object.prototype,{getPrototypeOf:au}=Object,{iterator:bl,toStringTag:tg}=Symbol,xl=(n=>t=>{const e=X0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ai=n=>(n=n.toLowerCase(),t=>xl(t)===n),Cl=n=>t=>typeof t===n,{isArray:js}=Array,ka=Cl("undefined");function Sa(n){return n!==null&&!ka(n)&&n.constructor!==null&&!ka(n.constructor)&&Pr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ng=Ai("ArrayBuffer");function Q0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&ng(n.buffer),t}const Z0=Cl("string"),Pr=Cl("function"),rg=Cl("number"),Aa=n=>n!==null&&typeof n=="object",J0=n=>n===!0||n===!1,kl=n=>{if(xl(n)!=="object")return!1;const t=au(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(tg in n)&&!(bl in n)},ex=n=>{if(!Aa(n)||Sa(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},tx=Ai("Date"),nx=Ai("File"),rx=Ai("Blob"),ix=Ai("FileList"),ox=n=>Aa(n)&&Pr(n.pipe),sx=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Pr(n.append)&&((t=xl(n))==="formdata"||t==="object"&&Pr(n.toString)&&n.toString()==="[object FormData]"))},ax=Ai("URLSearchParams"),[lx,cx,ux,hx]=["ReadableStream","Request","Response","Headers"].map(Ai),dx=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _a(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,m;if(typeof n!="object"&&(n=[n]),js(n))for(r=0,m=n.length;r<m;r++)t.call(null,n[r],r,n);else{if(Sa(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),y=g.length;let x;for(r=0;r<y;r++)x=g[r],t.call(null,n[x],x,n)}}function ig(n,t){if(Sa(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,m;for(;r-- >0;)if(m=e[r],t===m.toLowerCase())return m;return null}const is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,og=n=>!ka(n)&&n!==is;function lu(){const{caseless:n}=og(this)&&this||{},t={},e=(r,m)=>{const g=n&&ig(t,m)||m;kl(t[g])&&kl(r)?t[g]=lu(t[g],r):kl(r)?t[g]=lu({},r):js(r)?t[g]=r.slice():t[g]=r};for(let r=0,m=arguments.length;r<m;r++)arguments[r]&&_a(arguments[r],e);return t}const px=(n,t,e,{allOwnKeys:r}={})=>(_a(t,(m,g)=>{e&&Pr(m)?n[g]=eg(m,e):n[g]=m},{allOwnKeys:r}),n),gx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),fx=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},mx=(n,t,e,r)=>{let m,g,y;const x={};if(t=t||{},n==null)return t;do{for(m=Object.getOwnPropertyNames(n),g=m.length;g-- >0;)y=m[g],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&au(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},vx=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},yx=n=>{if(!n)return null;if(js(n))return n;let t=n.length;if(!rg(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},wx=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&au(Uint8Array)),bx=(n,t)=>{const e=(n&&n[bl]).call(n);let r;for(;(r=e.next())&&!r.done;){const m=r.value;t.call(n,m[0],m[1])}},xx=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},Cx=Ai("HTMLFormElement"),kx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),sg=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Sx=Ai("RegExp"),ag=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};_a(e,(m,g)=>{let y;(y=t(m,g,n))!==!1&&(r[g]=y||m)}),Object.defineProperties(n,r)},Ax=n=>{ag(n,(t,e)=>{if(Pr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Pr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},_x=(n,t)=>{const e={},r=m=>{m.forEach(g=>{e[g]=!0})};return js(n)?r(n):r(String(n).split(t)),e},$x=()=>{},Mx=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Tx(n){return!!(n&&Pr(n.append)&&n[tg]==="FormData"&&n[bl])}const Ix=n=>{const t=new Array(10),e=(r,m)=>{if(Aa(r)){if(t.indexOf(r)>=0)return;if(Sa(r))return r;if(!("toJSON"in r)){t[m]=r;const g=js(r)?[]:{};return _a(r,(y,x)=>{const h=e(y,m+1);!ka(h)&&(g[x]=h)}),t[m]=void 0,g}}return r};return e(n,0)},Ex=Ai("AsyncFunction"),Lx=n=>n&&(Aa(n)||Pr(n))&&Pr(n.then)&&Pr(n.catch),lg=((n,t)=>n?setImmediate:t?((e,r)=>(is.addEventListener("message",({source:m,data:g})=>{m===is&&g===e&&r.length&&r.shift()()},!1),m=>{r.push(m),is.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Pr(is.postMessage)),Rx=typeof queueMicrotask<"u"?queueMicrotask.bind(is):typeof process<"u"&&process.nextTick||lg,Ox=n=>n!=null&&Pr(n[bl]),ke={isArray:js,isArrayBuffer:ng,isBuffer:Sa,isFormData:sx,isArrayBufferView:Q0,isString:Z0,isNumber:rg,isBoolean:J0,isObject:Aa,isPlainObject:kl,isEmptyObject:ex,isReadableStream:lx,isRequest:cx,isResponse:ux,isHeaders:hx,isUndefined:ka,isDate:tx,isFile:nx,isBlob:rx,isRegExp:Sx,isFunction:Pr,isStream:ox,isURLSearchParams:ax,isTypedArray:wx,isFileList:ix,forEach:_a,merge:lu,extend:px,trim:dx,stripBOM:gx,inherits:fx,toFlatObject:mx,kindOf:xl,kindOfTest:Ai,endsWith:vx,toArray:yx,forEachEntry:bx,matchAll:xx,isHTMLForm:Cx,hasOwnProperty:sg,hasOwnProp:sg,reduceDescriptors:ag,freezeMethods:Ax,toObjectSet:_x,toCamelCase:kx,noop:$x,toFiniteNumber:Mx,findKey:ig,global:is,isContextDefined:og,isSpecCompliantForm:Tx,toJSONObject:Ix,isAsyncFn:Ex,isThenable:Lx,setImmediate:lg,asap:Rx,isIterable:Ox};function bt(n,t,e,r,m){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),m&&(this.response=m,this.status=m.status?m.status:null)}ke.inherits(bt,Error,{toJSON:function(){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:ke.toJSONObject(this.config),code:this.code,status:this.status}}});const cg=bt.prototype,ug={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{ug[n]={value:n}}),Object.defineProperties(bt,ug),Object.defineProperty(cg,"isAxiosError",{value:!0}),bt.from=(n,t,e,r,m,g)=>{const y=Object.create(cg);return ke.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),bt.call(y,n.message,t,e,r,m),y.cause=n,y.name=n.name,g&&Object.assign(y,g),y};const Nx=null;function cu(n){return ke.isPlainObject(n)||ke.isArray(n)}function hg(n){return ke.endsWith(n,"[]")?n.slice(0,-2):n}function dg(n,t,e){return n?n.concat(t).map(function(r,m){return r=hg(r),!e&&m?"["+r+"]":r}).join(e?".":""):t}function Dx(n){return ke.isArray(n)&&!n.some(cu)}const Fx=ke.toFlatObject(ke,{},null,function(n){return/^is[A-Z]/.test(n)});function Sl(n,t,e){if(!ke.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=ke.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!ke.isUndefined(o[c])});const r=e.metaTokens,m=e.visitor||p,g=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(t);if(!ke.isFunction(m))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(ke.isDate(c))return c.toISOString();if(ke.isBoolean(c))return c.toString();if(!x&&ke.isBlob(c))throw new bt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(c)||ke.isTypedArray(c)?x&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function p(c,o,l){let d=c;if(c&&!l&&typeof c=="object"){if(ke.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(ke.isArray(c)&&Dx(c)||(ke.isFileList(c)||ke.endsWith(o,"[]"))&&(d=ke.toArray(c)))return o=hg(o),d.forEach(function(w,b){!(ke.isUndefined(w)||w===null)&&t.append(y===!0?dg([o],b,g):y===null?o:o+"[]",h(w))}),!1}return cu(c)?!0:(t.append(dg(l,o,g),h(c)),!1)}const s=[],a=Object.assign(Fx,{defaultVisitor:p,convertValue:h,isVisitable:cu});function u(c,o){if(!ke.isUndefined(c)){if(s.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(c),ke.forEach(c,function(l,d){(!(ke.isUndefined(l)||l===null)&&m.call(t,l,ke.isString(d)?d.trim():d,o,a))===!0&&u(l,o?o.concat(d):[d])}),s.pop()}}if(!ke.isObject(n))throw new TypeError("data must be an object");return u(n),t}function pg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function uu(n,t){this._pairs=[],n&&Sl(n,this,t)}const gg=uu.prototype;gg.append=function(n,t){this._pairs.push([n,t])},gg.toString=function(n){const t=n?function(e){return n.call(this,e,pg)}:pg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function Px(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fg(n,t,e){if(!t)return n;const r=e&&e.encode||Px;ke.isFunction(e)&&(e={serialize:e});const m=e&&e.serialize;let g;if(m?g=m(t,e):g=ke.isURLSearchParams(t)?t.toString():new uu(t,e).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class mg{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ke.forEach(this.handlers,function(e){e!==null&&t(e)})}}const vg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wx=typeof URLSearchParams<"u"?URLSearchParams:uu,Bx=typeof FormData<"u"?FormData:null,zx=typeof Blob<"u"?Blob:null,jx={isBrowser:!0,classes:{URLSearchParams:Wx,FormData:Bx,Blob:zx},protocols:["http","https","file","blob","url","data"]},hu=typeof window<"u"&&typeof document<"u",du=typeof navigator=="object"&&navigator||void 0,Hx=hu&&(!du||["ReactNative","NativeScript","NS"].indexOf(du.product)<0),Ux=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vx=hu&&window.location.href||"http://localhost",Kx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hu,hasStandardBrowserEnv:Hx,hasStandardBrowserWebWorkerEnv:Ux,navigator:du,origin:Vx},Symbol.toStringTag,{value:"Module"})),fr={...Kx,...jx};function qx(n,t){return Sl(n,new fr.classes.URLSearchParams,{visitor:function(e,r,m,g){return fr.isNode&&ke.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function Gx(n){return ke.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yx(n){const t={},e=Object.keys(n);let r;const m=e.length;let g;for(r=0;r<m;r++)g=e[r],t[g]=n[g];return t}function yg(n){function t(e,r,m,g){let y=e[g++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=g>=e.length;return y=!y&&ke.isArray(m)?m.length:y,h?(ke.hasOwnProp(m,y)?m[y]=[m[y],r]:m[y]=r,!x):((!m[y]||!ke.isObject(m[y]))&&(m[y]=[]),t(e,r,m[y],g)&&ke.isArray(m[y])&&(m[y]=Yx(m[y])),!x)}if(ke.isFormData(n)&&ke.isFunction(n.entries)){const e={};return ke.forEachEntry(n,(r,m)=>{t(Gx(r),m,e,0)}),e}return null}function Xx(n,t,e){if(ke.isString(n))try{return(t||JSON.parse)(n),ke.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const $a={transitional:vg,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,m=ke.isObject(n);if(m&&ke.isHTMLForm(n)&&(n=new FormData(n)),ke.isFormData(n))return r?JSON.stringify(yg(n)):n;if(ke.isArrayBuffer(n)||ke.isBuffer(n)||ke.isStream(n)||ke.isFile(n)||ke.isBlob(n)||ke.isReadableStream(n))return n;if(ke.isArrayBufferView(n))return n.buffer;if(ke.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(m){if(e.indexOf("application/x-www-form-urlencoded")>-1)return qx(n,this.formSerializer).toString();if((g=ke.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Sl(g?{"files[]":n}:n,y&&new y,this.formSerializer)}}return m||r?(t.setContentType("application/json",!1),Xx(n)):n}],transformResponse:[function(n){const t=this.transitional||$a.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(ke.isResponse(n)||ke.isReadableStream(n))return n;if(n&&ke.isString(n)&&(e&&!this.responseType||r)){const m=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(g){if(m)throw g.name==="SyntaxError"?bt.from(g,bt.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fr.classes.FormData,Blob:fr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],n=>{$a.headers[n]={}});const Qx=ke.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"]),Zx=n=>{const t={};let e,r,m;return n&&n.split(`
|
1393
|
+
`).forEach(function(g){m=g.indexOf(":"),e=g.substring(0,m).trim().toLowerCase(),r=g.substring(m+1).trim(),!(!e||t[e]&&Qx[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},wg=Symbol("internals");function Ma(n){return n&&String(n).trim().toLowerCase()}function Al(n){return n===!1||n==null?n:ke.isArray(n)?n.map(Al):String(n)}function Jx(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const e1=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function pu(n,t,e,r,m){if(ke.isFunction(r))return r.call(this,t,e);if(m&&(t=e),!!ke.isString(t)){if(ke.isString(r))return t.indexOf(r)!==-1;if(ke.isRegExp(r))return r.test(t)}}function t1(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function n1(n,t){const e=ke.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(m,g,y){return this[r].call(this,t,m,g,y)},configurable:!0})})}let Wr=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function m(y,x,h){const p=Ma(x);if(!p)throw new Error("header name must be a non-empty string");const s=ke.findKey(r,p);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=Al(y))}const g=(y,x)=>ke.forEach(y,(h,p)=>m(h,p,x));if(ke.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(ke.isString(n)&&(n=n.trim())&&!e1(n))g(Zx(n),t);else if(ke.isObject(n)&&ke.isIterable(n)){let y={},x,h;for(const p of n){if(!ke.isArray(p))throw TypeError("Object iterator must return a key-value pair");y[h=p[0]]=(x=y[h])?ke.isArray(x)?[...x,p[1]]:[x,p[1]]:p[1]}g(y,t)}else n!=null&&m(t,n,e);return this}get(n,t){if(n=Ma(n),n){const e=ke.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return Jx(r);if(ke.isFunction(t))return t.call(this,r,e);if(ke.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Ma(n),n){const e=ke.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||pu(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function m(g){if(g=Ma(g),g){const y=ke.findKey(e,g);y&&(!t||pu(e,e[y],y,t))&&(delete e[y],r=!0)}}return ke.isArray(n)?n.forEach(m):m(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const m=t[e];(!n||pu(this,this[m],m,n,!0))&&(delete this[m],r=!0)}return r}normalize(n){const t=this,e={};return ke.forEach(this,(r,m)=>{const g=ke.findKey(e,m);if(g){t[g]=Al(r),delete t[m];return}const y=n?t1(m):String(m).trim();y!==m&&delete t[m],t[y]=Al(r),e[y]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return ke.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&ke.isArray(e)?e.join(", "):e)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
|
1394
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[wg]=this[wg]={accessors:{}}).accessors,e=this.prototype;function r(m){const g=Ma(m);t[g]||(n1(e,m),t[g]=!0)}return ke.isArray(n)?n.forEach(r):r(n),this}};Wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ke.reduceDescriptors(Wr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ke.freezeMethods(Wr);function gu(n,t){const e=this||$a,r=t||e,m=Wr.from(r.headers);let g=r.data;return ke.forEach(n,function(y){g=y.call(e,g,m.normalize(),t?t.status:void 0)}),m.normalize(),g}function bg(n){return!!(n&&n.__CANCEL__)}function Hs(n,t,e){bt.call(this,n??"canceled",bt.ERR_CANCELED,t,e),this.name="CanceledError"}ke.inherits(Hs,bt,{__CANCEL__:!0});function xg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new bt("Request failed with status code "+e.status,[bt.ERR_BAD_REQUEST,bt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function r1(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function i1(n,t){n=n||10;const e=new Array(n),r=new Array(n);let m=0,g=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),p=r[g];y||(y=h),e[m]=x,r[m]=h;let s=g,a=0;for(;s!==m;)a+=e[s++],s=s%n;if(m=(m+1)%n,m===g&&(g=(g+1)%n),h-y<t)return;const u=p&&h-p;return u?Math.round(a*1e3/u):void 0}}function o1(n,t){let e=0,r=1e3/t,m,g;const y=(x,h=Date.now())=>{e=h,m=null,g&&(clearTimeout(g),g=null),n(...x)};return[(...x)=>{const h=Date.now(),p=h-e;p>=r?y(x,h):(m=x,g||(g=setTimeout(()=>{g=null,y(m)},r-p)))},()=>m&&y(m)]}const _l=(n,t,e=3)=>{let r=0;const m=i1(50,250);return o1(g=>{const y=g.loaded,x=g.lengthComputable?g.total:void 0,h=y-r,p=m(h),s=y<=x;r=y;const a={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:p||void 0,estimated:p&&x&&s?(x-y)/p:void 0,event:g,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(a)},e)},Cg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},kg=n=>(...t)=>ke.asap(()=>n(...t)),s1=fr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,fr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(fr.origin),fr.navigator&&/(msie|trident)/i.test(fr.navigator.userAgent)):()=>!0,a1=fr.hasStandardBrowserEnv?{write(n,t,e,r,m,g){const y=[n+"="+encodeURIComponent(t)];ke.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),ke.isString(r)&&y.push("path="+r),ke.isString(m)&&y.push("domain="+m),g===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function l1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function c1(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Sg(n,t,e){let r=!l1(t);return n&&(r||e==!1)?c1(n,t):t}const Ag=n=>n instanceof Wr?{...n}:n;function os(n,t){t=t||{};const e={};function r(p,s,a,u){return ke.isPlainObject(p)&&ke.isPlainObject(s)?ke.merge.call({caseless:u},p,s):ke.isPlainObject(s)?ke.merge({},s):ke.isArray(s)?s.slice():s}function m(p,s,a,u){if(ke.isUndefined(s)){if(!ke.isUndefined(p))return r(void 0,p,a,u)}else return r(p,s,a,u)}function g(p,s){if(!ke.isUndefined(s))return r(void 0,s)}function y(p,s){if(ke.isUndefined(s)){if(!ke.isUndefined(p))return r(void 0,p)}else return r(void 0,s)}function x(p,s,a){if(a in t)return r(p,s);if(a in n)return r(void 0,p)}const h={url:g,method:g,data:g,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(p,s,a)=>m(Ag(p),Ag(s),a,!0)};return ke.forEach(Object.keys({...n,...t}),function(p){const s=h[p]||m,a=s(n[p],t[p],p);ke.isUndefined(a)&&s!==x||(e[p]=a)}),e}const _g=n=>{const t=os({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:m,xsrfCookieName:g,headers:y,auth:x}=t;t.headers=y=Wr.from(y),t.url=fg(Sg(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(ke.isFormData(e)){if(fr.hasStandardBrowserEnv||fr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[p,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];y.setContentType([p||"multipart/form-data",...s].join("; "))}}if(fr.hasStandardBrowserEnv&&(r&&ke.isFunction(r)&&(r=r(t)),r||r!==!1&&s1(t.url))){const p=m&&g&&a1.read(g);p&&y.set(m,p)}return t},u1=typeof XMLHttpRequest<"u",h1=u1&&function(n){return new Promise(function(t,e){const r=_g(n);let m=r.data;const g=Wr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,p,s,a,u,c;function o(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function d(){if(!l)return;const b=Wr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!y||y==="text"||y==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:b,config:n,request:l};xg(function(M){t(M),o()},function(M){e(M),o()},E),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(e(new bt("Request aborted",bt.ECONNABORTED,n,l)),l=null)},l.onerror=function(){e(new bt("Network Error",bt.ERR_NETWORK,n,l)),l=null},l.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||vg;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new bt(b,E.clarifyTimeoutError?bt.ETIMEDOUT:bt.ECONNABORTED,n,l)),l=null},m===void 0&&g.setContentType(null),"setRequestHeader"in l&&ke.forEach(g.toJSON(),function(b,E){l.setRequestHeader(E,b)}),ke.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),y&&y!=="json"&&(l.responseType=r.responseType),h&&([a,c]=_l(h,!0),l.addEventListener("progress",a)),x&&l.upload&&([s,u]=_l(x),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=b=>{l&&(e(!b||b.type?new Hs(null,n,l):b),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=r1(r.url);if(w&&fr.protocols.indexOf(w)===-1){e(new bt("Unsupported protocol "+w+":",bt.ERR_BAD_REQUEST,n));return}l.send(m||null)})},d1=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,m;const g=function(p){if(!m){m=!0,x();const s=p instanceof Error?p:this.reason;r.abort(s instanceof bt?s:new Hs(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,g(new bt(`timeout ${t} of ms exceeded`,bt.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(g):p.removeEventListener("abort",g)}),n=null)};n.forEach(p=>p.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>ke.asap(x),h}},p1=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,m;for(;r<e;)m=r+t,yield n.slice(r,m),r=m},g1=async function*(n,t){for await(const e of f1(n))yield*p1(e,t)},f1=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},$g=(n,t,e,r)=>{const m=g1(n,t);let g=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:p,value:s}=await m.next();if(p){x(),h.close();return}let a=s.byteLength;if(e){let u=g+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(p){throw x(p),p}},cancel(h){return x(h),m.return()}},{highWaterMark:2})},$l=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mg=$l&&typeof ReadableStream=="function",m1=$l&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Tg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},v1=Mg&&Tg(()=>{let n=!1;const t=new Request(fr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Ig=64*1024,fu=Mg&&Tg(()=>ke.isReadableStream(new Response("").body)),Ml={stream:fu&&(n=>n.body)};$l&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=ke.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new bt(`Response type '${t}' is not supported`,bt.ERR_NOT_SUPPORT,r)})})})(new Response);const y1=async n=>{if(n==null)return 0;if(ke.isBlob(n))return n.size;if(ke.isSpecCompliantForm(n))return(await new Request(fr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(n)||ke.isArrayBuffer(n))return n.byteLength;if(ke.isURLSearchParams(n)&&(n=n+""),ke.isString(n))return(await m1(n)).byteLength},w1=async(n,t)=>ke.toFiniteNumber(n.getContentLength())??y1(t),b1=$l&&(async n=>{let{url:t,method:e,data:r,signal:m,cancelToken:g,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:p,headers:s,withCredentials:a="same-origin",fetchOptions:u}=_g(n);p=p?(p+"").toLowerCase():"text";let c=d1([m,g&&g.toAbortSignal()],y),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let d;try{if(h&&v1&&e!=="get"&&e!=="head"&&(d=await w1(s,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(ke.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[R,O]=Cg(d,_l(kg(h)));r=$g(k.body,Ig,R,O)}}ke.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:c,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o,u);const E=fu&&(p==="stream"||p==="response");if(fu&&(x||E&&l)){const k={};["status","statusText","headers"].forEach(L=>{k[L]=b[L]});const C=ke.toFiniteNumber(b.headers.get("content-length")),[R,O]=x&&Cg(C,_l(kg(x),!0))||[];b=new Response($g(b.body,Ig,R,()=>{O&&O(),l&&l()}),k)}p=p||"text";let M=await Ml[ke.findKey(Ml,p)||"text"](b,n);return!E&&l&&l(),await new Promise((k,C)=>{xg(k,C,{data:M,headers:Wr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new bt("Network Error",bt.ERR_NETWORK,n,o),{cause:w.cause||w}):bt.from(w,w&&w.code,n,o)}}),mu={http:Nx,xhr:h1,fetch:b1};ke.forEach(mu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Eg=n=>`- ${n}`,x1=n=>ke.isFunction(n)||n===null||n===!1,Lg={getAdapter:n=>{n=ke.isArray(n)?n:[n];const{length:t}=n;let e,r;const m={};for(let g=0;g<t;g++){e=n[g];let y;if(r=e,!x1(e)&&(r=mu[(y=String(e)).toLowerCase()],r===void 0))throw new bt(`Unknown adapter '${y}'`);if(r)break;m[y||"#"+g]=r}if(!r){const g=Object.entries(m).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?g.length>1?`since :
|
1395
|
+
`+g.map(Eg).join(`
|
1396
|
+
`):" "+Eg(g[0]):"as no adapter specified";throw new bt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:mu};function vu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Hs(null,n)}function Rg(n){return vu(n),n.headers=Wr.from(n.headers),n.data=gu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Lg.getAdapter(n.adapter||$a.adapter)(n).then(function(t){return vu(n),t.data=gu.call(n,n.transformResponse,t),t.headers=Wr.from(t.headers),t},function(t){return bg(t)||(vu(n),t&&t.response&&(t.response.data=gu.call(n,n.transformResponse,t.response),t.response.headers=Wr.from(t.response.headers))),Promise.reject(t)})}const Og="1.11.0",Tl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Tl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Ng={};Tl.transitional=function(n,t,e){function r(m,g){return"[Axios v"+Og+"] Transitional option '"+m+"'"+g+(e?". "+e:"")}return(m,g,y)=>{if(n===!1)throw new bt(r(g," has been removed"+(t?" in "+t:"")),bt.ERR_DEPRECATED);return t&&!Ng[g]&&(Ng[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(m,g,y):!0}},Tl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function C1(n,t,e){if(typeof n!="object")throw new bt("options must be an object",bt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let m=r.length;for(;m-- >0;){const g=r[m],y=t[g];if(y){const x=n[g],h=x===void 0||y(x,g,n);if(h!==!0)throw new bt("option "+g+" must be "+h,bt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new bt("Unknown option "+g,bt.ERR_BAD_OPTION)}}const Il={assertOptions:C1,validators:Tl},Vi=Il.validators;let ss=class{constructor(n){this.defaults=n||{},this.interceptors={request:new mg,response:new mg}}async request(n,t){try{return await this._request(n,t)}catch(e){if(e instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const m=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?m&&!String(e.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
1397
|
+
`+m):e.stack=m}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=os(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:m}=t;e!==void 0&&Il.assertOptions(e,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean)},!1),r!=null&&(ke.isFunction(r)?t.paramsSerializer={serialize:r}:Il.assertOptions(r,{encode:Vi.function,serialize:Vi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Il.assertOptions(t,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=m&&ke.merge(m.common,m[t.method]);m&&ke.forEach(["delete","get","head","post","put","patch","common"],c=>{delete m[c]}),t.headers=Wr.concat(g,m);const y=[];let x=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(t)===!1||(x=x&&c.synchronous,y.unshift(c.fulfilled,c.rejected))});const h=[];this.interceptors.response.forEach(function(c){h.push(c.fulfilled,c.rejected)});let p,s=0,a;if(!x){const c=[Rg.bind(this),void 0];for(c.unshift(...y),c.push(...h),a=c.length,p=Promise.resolve(t);s<a;)p=p.then(c[s++],c[s++]);return p}a=y.length;let u=t;for(s=0;s<a;){const c=y[s++],o=y[s++];try{u=c(u)}catch(l){o.call(this,l);break}}try{p=Rg.call(this,u)}catch(c){return Promise.reject(c)}for(s=0,a=h.length;s<a;)p=p.then(h[s++],h[s++]);return p}getUri(n){n=os(this.defaults,n);const t=Sg(n.baseURL,n.url,n.allowAbsoluteUrls);return fg(t,n.params,n.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(n){ss.prototype[n]=function(t,e){return this.request(os(e||{},{method:n,url:t,data:(e||{}).data}))}}),ke.forEach(["post","put","patch"],function(n){function t(e){return function(r,m,g){return this.request(os(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}ss.prototype[n]=t(),ss.prototype[n+"Form"]=t(!0)});let k1=class kb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let g=r._listeners.length;for(;g-- >0;)r._listeners[g](m);r._listeners=null}),this.promise.then=m=>{let g;const y=new Promise(x=>{r.subscribe(x),g=x}).then(m);return y.cancel=function(){r.unsubscribe(g)},y},t(function(m,g,y){r.reason||(r.reason=new Hs(m,g,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new kb(function(e){t=e}),cancel:t}}};function S1(n){return function(t){return n.apply(null,t)}}function A1(n){return ke.isObject(n)&&n.isAxiosError===!0}const yu={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};Object.entries(yu).forEach(([n,t])=>{yu[t]=n});function Dg(n){const t=new ss(n),e=eg(ss.prototype.request,t);return ke.extend(e,ss.prototype,t,{allOwnKeys:!0}),ke.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Dg(os(n,r))},e}const En=Dg($a);En.Axios=ss,En.CanceledError=Hs,En.CancelToken=k1,En.isCancel=bg,En.VERSION=Og,En.toFormData=Sl,En.AxiosError=bt,En.Cancel=En.CanceledError,En.all=function(n){return Promise.all(n)},En.spread=S1,En.isAxiosError=A1,En.mergeConfig=os,En.AxiosHeaders=Wr,En.formToJSON=n=>yg(ke.isHTMLForm(n)?new FormData(n):n),En.getAdapter=Lg.getAdapter,En.HttpStatusCode=yu,En.default=En;const{Axios:X2,AxiosError:Q2,CanceledError:Z2,isCancel:J2,CancelToken:eN,VERSION:tN,all:nN,Cancel:rN,isAxiosError:iN,spread:oN,toFormData:sN,AxiosHeaders:aN,HttpStatusCode:lN,formToJSON:cN,getAdapter:uN,mergeConfig:hN}=En,wu=En.create({baseURL:location.origin,timeout:6e4,params:{}});wu.interceptors.response.use(n=>n,n=>{var t,e,r,m,g,y,x,h,p,s,a;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let u=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(u+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(g=(m=n.response)==null?void 0:m.data)!=null&&g.message?u+=`${n.response.data.message}`:(x=(y=n.response)==null?void 0:y.data)!=null&&x.exception?u+=`${n.response.data.exception}`:(s=(p=(h=n.response)==null?void 0:h.data)==null?void 0:p.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:u}),n}else throw n});const El=async function(n,t,{data:e,params:r={},headers:m,noAuth:g=!1,noScope:y=!1,onUploadProgress:x=!1}={}){if(!g){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}m.Authorization=localStorage.openc3Token}return m.manual=!0,!y&&!r.scope&&(r.scope=window.openc3Scope),wu({method:n,url:t,data:e,params:r,headers:m,onUploadProgress:x})},bu={Accept:"application/json"},Fg={...bu,"Content-Type":"application/json"},dN=In("P",{get:function(n,{params:t,headers:e=bu,noScope:r,noAuth:m,onUploadProgress:g}={}){return El("get",n,{params:t,headers:e,noScope:r,noAuth:m,onUploadProgress:g})},put:function(n,{data:t,params:e,headers:r=Fg,noScope:m,noAuth:g,onUploadProgress:y}={}){return El("put",n,{data:t,params:e,headers:r,noScope:m,noAuth:g,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Fg,noScope:m,noAuth:g,onUploadProgress:y}={}){return El("post",n,{data:t,params:e,headers:r,noScope:m,noAuth:g,onUploadProgress:y})},delete:function(n,{params:t,headers:e=bu,noScope:r,noAuth:m,onUploadProgress:g}={}){return El("delete",n,{params:t,headers:e,noScope:r,noAuth:m,onUploadProgress:g})}});let Ll=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,m=e.length;r<m;r++)e[r](...t)},events:{},on(n,t){var e;return((e=this.events)[n]||(e[n]=[])).push(t),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(m=>t!==m)}}});class Ta extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class xu extends Ta{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class _1 extends Ta{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class _i extends Ta{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class $1 extends _i{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Pg(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}class M1{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:t,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:m})=>(e[r]=m,e),{})}}const as=Symbol("state");class Wg{constructor(t={}){this.emitter=Ll(),this.params=Object.freeze(t),this.presence=new M1(this),this.initialConnect=!0,this[as]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Pg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[as]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[as]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[as]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[as]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[as]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[as]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...m)=>{r(),e(...m)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(m=>m()),t()})),r.push(this.on("close",m=>{r.forEach(g=>g()),e(m||new Ta("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class T1{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(g=>{e=g}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},m=this._pendingTop;return this._pendings.push(r),m&&await m.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class I1{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class E1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new I1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let m=this._subscriptions[t]=new T1(t);return m.remoteId=this._localToRemote[t],m.subscriber=e,m.unsubscriber=r,m.gvl=this.glv,m}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class L1{constructor(t={}){this.subscriptions=new E1(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let m=this._remoteToLocal[t];if(!m){this._pendingMessages.push([t,e,r]);return}let g=this.subscriptions.get(m);g&&g.channels.forEach(y=>{y.receive(e,r)})}notify(t,e,r){let m=this._remoteToLocal[t];if(!m)return;let g=this.subscriptions.get(m);g&&g.channels.forEach(y=>y.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const Bg={debug:0,info:1,warn:2,error:3};class zg{constructor(t){this.level=t||"warn"}log(t,e,r){Bg[t]<Bg[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}}class Ia extends zg{writeLogEntry(){}}class R1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let O1=0;class jg{constructor(t={}){let{logger:e}=t;this.logger=e||new Ia,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let m=Pg(r);if(this.pendingUnsubscriptions[m]){let y=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${y}`,m),new Promise(x=>{setTimeout(()=>{x(this.subscribe(t,e))},y)})}if(this.pendingSubscriptions[m])return this.logger.warn("subscription is already pending, skipping",m),Promise.reject(Error("Already subscribing"));let g=this.subscribeRetryInterval;return new Promise((y,x)=>{let h=++O1;this.pendingSubscriptions[m]={resolve:y,reject:x,id:h},this.cable.send(this.buildSubscribeRequest(m)),this.maybeRetrySubscribe(h,m,g)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===t&&(delete this.pendingSubscriptions[e],m.reject(new _1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:m,reason:g,reconnect:y}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let x=t.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new _i(g);this.reset(x),y===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[r];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],x.resolve(r)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[r];return x?(delete this.pendingSubscriptions[r],x.reject(new xu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(m)return{identifier:r,message:m};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Hg=()=>Date.now()/1e3|0;class N1 extends jg{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Hg()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:m}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=Hg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let g=t.restored_ids||Object.keys(this.subscriptionStreams);for(let y of g)this.cable.send({identifier:y,command:"history",history:this.historyRequestFor(y)}),this.presenceInfo[y]&&this.cable.send({identifier:y,command:"join",presence:this.presenceInfo[y]});return this.cable.restored(g)}return this.cable.connected(this.sessionId)}if(e==="presence"){let g=m.type;if(g==="info"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.resolve(m))}else if(g==="error"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:m}}if(m){let g=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:m,meta:g}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let m=this.presenceInfo[t];return m&&(e.presence=m),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let m of this.subscriptionStreams[t]){let g=this.streamsPositions[m];g&&(r=!0,e[m]=g)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,m){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:m},{stream:e,epoch:r,offset:m}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,m)=>{this.pendingPresence[t]={resolve:r,reject:m},this.cable.send({command:"presence",identifier:t,data:e})})}}class D1 extends Ta{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Cu extends Wg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}Ui(Cu,"identifier","__ghost__");const F1="$pubsub";class ku extends Wg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}Ui(ku,"identifier",F1);const ls=Symbol("state");let P1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:m,hubOptions:g,performFailures:y,transportConfigurator:x}){this.emitter=Ll(),this.transport=n,this.encoder=e,this.logger=r||new Ia,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new L1(g||{}),this[ls]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,m===!1&&this.connect().catch(()=>{})}get state(){return this[ls]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[ls]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[ls]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new _i("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[ls]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new _i("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new _i(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[ls]="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 _i?n:new _i(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[ls]="closed";let e=t||new _i("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:m,message:g,meta:y}=e;r?this.hub.notify(m,r,g):this.hub.transmit(m,g,y)}}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 ku({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new ku({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=Cu),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let m=await n.acquire("subscribed");if(m.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),m.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),m.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),m.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),m.release();return}let g={identifier:t,params:e};this.logger.debug("subscribing",g);try{let y=await this.protocol.subscribe(t,e);this.hub.subscribe(r,y),this.logger.debug("subscribed",{...g,remoteId:y}),n.notify("connected")}catch(y){if(y){if(y instanceof xu&&this.logger.warn("rejected",g),y instanceof _i){this.logger.debug("disconnected during subscription; will retry on connect",g),m.release();return}this.logger.error("failed to subscribe",{error:y,...g})}n.close(y),this.hub.unsubscribe(r)}m.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(m){m&&(m instanceof _i?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:m}):this.logger.error("unsubscribe failed",{id:t,error:m}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new D1;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let m=r.remoteId,g={id:m,action:t,payload:e};this.logger.debug("perform",g);try{let y=await this.protocol.perform(m,t,e);return y&&this.logger.debug("perform result",{message:y,request:g}),y}catch(y){throw this.logger.error("perform failed",{error:y,request:g}),y}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(m=>m()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(m=>m()),t(r)}))}),this._pendingConnect)}};const W1={maxMissingPings:2,maxReconnectAttempts:1/0},Us=()=>Date.now(),Ug=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:m}=t;return e=e||2,r===void 0&&(r=.5),g=>{let y=n*e**g,x=y*e,h=y+(x-y)*Math.random(),p=2*(Math.random()-.5)*r;return h=h*(1+p),m&&m<h&&(h=m),h}};let Vg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},W1,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 Ia,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Us()}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=Us(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Us(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Us(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Us()})),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=Us()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new $1))}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)}};class B1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Ll(),this.unbind=[],this.logger=e.logger||new Ia}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...m)=>{r(),e(...m)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}}class z1{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ll();let{format:m,subprotocol:g,authStrategy:y}=e;this.format=m||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=y||"param",this.authProtocol="",this.subprotocol=g}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let m=[];m.push(this.once("open",()=>{m.forEach(g=>g()),e()})),m.push(this.once("close",()=>{m.forEach(g=>g()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let m=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(m)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(m=>m.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...m)=>{r(),e(...m)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Kg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function j1(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},Kg,t);let{protocol:e,websocketImplementation:r,websocketFormat:m,websocketOptions:g,websocketAuthStrategy:y,fallbacks:x,logLevel:h,logger:p,transport:s,encoder:a,lazy:u,monitor:c,pingInterval:o,reconnectStrategy:l,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:E,historyTimestamp:M,protocolOptions:k,concurrentSubscribes:C,performFailures:R,transportConfigurator:O,auth:L}=t;if(p=p||new Ia(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),N=e.substring(e.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")e=new jg({logger:p,...k});else if(P==="actioncable-v1-ext")e=new N1({logger:p,historyTimestamp:M,...k});else throw Error(`Protocol is not supported yet: ${e}`);if(N==="json")a=a||new R1,m=m||"text";else if(N==="msgpack"){if(m="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(m=m||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new z1(n,{websocketImplementation:r,websocketOptions:g,subprotocol:b,authStrategy:y,format:m}),x&&(s=new B1([s,...x],{logger:p})),L&&L.token&&s.setToken(L.token,L.param||"jid"),l=l||Ug(o),c!==!1&&(c=c||new Vg({pingInterval:o,reconnectStrategy:l,maxMissingPings:d,maxReconnectAttempts:w,logger:p}));let I={concurrentSubscribes:C},z=new P1({protocol:e,transport:s,encoder:a,logger:p,lazy:u,hubOptions:I,performFailures:R,transportConfigurator:O});return c&&(c.watch(z),z.monitor=c),E&&H1(z,async()=>{try{await E(s)}catch(P){return p.error("Failed to refresh authentication token: "+P),!1}return z.connect().catch(()=>{}),!0}),z}function H1(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class U1{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class V1 extends Cu{constructor(t,e,r){super(t,e),this.subscription=new U1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:m})=>this.subscription.notify("connected",{reconnected:m})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",m=>this.subscription.notify("received",m)),this.on("close",m=>{m&&m instanceof xu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class K1{constructor(t){this.cable=t}create(t,e){let r,m;typeof t=="object"?(r=t.channel,delete t.channel,m=t):(r=t,m={});let g=new V1(r,m,e);return g.subscription.notify("initialized"),this.cable.subscribe(g),g.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class q1{constructor(t){this.cable=t,this.subscriptions=new K1(t)}}class G1 extends zg{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class Y1 extends Vg{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=m=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:m})},r=()=>this.disconnect(new _i("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const X1=["cable","action-cable"],Q1="/cable",Rl=(n,t)=>{for(let e of X1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},qg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,Z1=()=>{if(typeof document<"u"&&document.head){let n=Rl(document,"url");if(n)return qg(n)}return qg(Q1)},J1=()=>{if(typeof document<"u"&&document.head){let n=Rl(document,"history-timestamp");if(n)return n|0}},eC=()=>{if(typeof document<"u"&&document.head)return Rl(document,"token")},tC=()=>{if(typeof document<"u"&&document.head)return Rl(document,"token-param")};function nC(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||Z1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=J1());let e=eC();if(e){let p=tC();t.auth=Object.assign({token:e,param:p},t.auth||{})}t=Object.assign({},Kg,t);let{logLevel:r,logger:m,pingInterval:g,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return m=t.logger=t.logger||new G1(r),y=t.reconnectStrategy=t.reconnectStrategy||Ug(g),t.monitor!==!1&&(t.monitor=t.monitor||new Y1({pingInterval:g,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:m})),j1(n,t)}function rC(n,t){let e=nC(n,t);return new q1(e)}class iC{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},m={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(g=>{if(g&&OpenC3Auth.setTokens(),this._cable==null){let y=this._url+"?scope="+encodeURIComponent(e)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=rC(y)}return this._cable.subscriptions.create({channel:t,...m},r)})}recordPing(){}}In("W",iC);class Su{constructor(t,e,r="",m=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=m}}In("S",Su);class oC{constructor(){Ui(this,"keyword",null),Ui(this,"parameters",[]),Ui(this,"filename",""),Ui(this,"line",""),Ui(this,"lineNumber",0),Ui(this,"url","https://docs.openc3.com/docs/configuration")}verify_num_parameters(t,e,r=""){for(let m=1;m<=t;m++)if(this.parameters[m-1]===void 0)throw new Su(this,`Not enough parameters for ${this.keyword}.`,r,this.url);if(e&&this.parameters[e]!==void 0)throw new Su(this,`Too many parameters for ${this.keyword}.`,r,this.url)}remove_quotes(t){if(t.length<2)return t;let e=t.charAt(0);if(e!=='"'&&e!=="'")return t;let r=t.charAt(t.length-1);return e!==r?t:t.substring(1,t.length-1)}scan_string(t,e){if(!e.global)throw"rx must have 'global' flag set";let r=[];return t.replace(e,function(m){return r.push(m),m}),r}parse_string(t,e,r,m,g){let y=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=e;let x=t.split(`
|
1398
|
+
`),h=x.length;for(let p=0;p<h;p++){this.lineNumber=p+1;let s=x[p].trim();if(s.length===0){r&&g(null,[],this.line,this.lineNumber);continue}if(y===!0){if(s[0]==="#")continue;s=s.substring(1,s.length)}let a=s.charAt(s.length-1),u=!1;switch(a){case"+":u=!0;case"\\":let w=s.substring(0,s.length-1).trim();this.line+=w.substring(0,w.length-1),u&&(this.line+=`
|
1399
|
+
`),y=!0;continue;case"&":this.line+=s.substring(0,s.length-1);continue;default:this.line+=s}y=!1;let c=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,o=this.scan_string(this.line,c),l="";if(o.length>0&&(l=l+o[0]),l.length===0||l.charAt(0)==="#"?this.keyword=null:this.keyword=l.toUpperCase(),this.parameters=[],this.keyword===null){r&&g(this.keyword,this.parameters,this.line,this.lineNumber),this.line="";continue}let d=o.length;if(d>1)for(let w=1;w<d;w++){let b=o[w];if(b.length>0&&b.charAt(0)==="#")break;m?this.parameters.push(this.remove_quotes(b)):this.parameters.push(b)}g(this.keyword,this.parameters,this.line,this.lineNumber),this.line=""}}}In("B",oC);function Ea(n){return sC.test(n)}const sC=/^-?[0-9]+$/;function Gg(n){return aC.test(n)}const aC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Yg(n,t){if(Ea(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const m=Xg(n),g=Xg(r);return!!(m===g||(t==null?void 0:t.approx)===!0&&!Ea(n)&&g.length>=14&&m.startsWith(g.substring(0,14)))}let La=(function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n})({});function lC(n){if(Yg(n,{approx:!1}))return;if(Ea(n))return La.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?La.underflow:La.truncate_float:La.overflow}function Xg(n){const{start:t,end:e}=cC(n),r=n.substring(t,e),m=r.indexOf(".");return m===-1?r:r.substring(0,m)+r.substring(m+1)}function cC(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}class uC{constructor(t){if(Ui(this,"isLosslessNumber",!0),!Gg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=lC(this.value);if(t===void 0||t===La.truncate_float)return Number.parseFloat(this.value);if(Ea(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function hC(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function dC(n){return new uC(n)}function pC(n,t){return Au({"":n},"",n,t)}function Au(n,t,e,r){return Array.isArray(e)?r.call(n,t,fC(e,r)):e&&typeof e=="object"&&!hC(e)?r.call(n,t,gC(e,r)):r.call(n,t,e)}function gC(n,t){for(const e of Object.keys(n)){const r=Au(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function fC(n,t){for(let e=0;e<n.length;e++)n[e]=Au(n,String(e),n[e],t);return n}function mC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:dC,r=0;const m=x();return o(m),d(),t?pC(m,t):m;function g(){if(n.charCodeAt(r)===CC){r++,p();const _={};let S=!0;for(;r<n.length&&n.charCodeAt(r)!==Zg;){S?S=!1:(u(),p());const D=r,j=s();if(j===void 0){E();return}p(),c();const U=x();if(U===void 0){L();return}Object.prototype.hasOwnProperty.call(_,j)&&!_u(U,_[j])&&M(j,D+1),_[j]=U}return n.charCodeAt(r)!==Zg&&k(),r++,_}}function y(){if(n.charCodeAt(r)===kC){r++,p();const _=[];let S=!0;for(;r<n.length&&n.charCodeAt(r)!==Jg;){S?S=!1:u();const D=x();l(D),_.push(D)}return n.charCodeAt(r)!==Jg&&C(),r++,_}}function x(){p();const _=s()??a()??g()??y()??h("true",!0)??h("false",!1)??h("null",null);return p(),_}function h(_,S){if(n.slice(r,r+_.length)===_)return r+=_.length,S}function p(){for(;vC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===$u){r++;let _="";for(;r<n.length&&n.charCodeAt(r)!==$u;){if(n.charCodeAt(r)===xC){const S=n[r+1],D=bC[S];D!==void 0?(_+=D,r++):S==="u"?Ol(n.charCodeAt(r+2))&&Ol(n.charCodeAt(r+3))&&Ol(n.charCodeAt(r+4))&&Ol(n.charCodeAt(r+5))?(_+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):I(r):O(r)}else wC(n.charCodeAt(r))?_+=n[r]:R(n[r]);r++}return b(),r++,_}}function a(){const _=r;if(n.charCodeAt(r)===ef&&(r++,w(_)),n.charCodeAt(r)===Mu)r++;else if(yC(n.charCodeAt(r)))for(r++;Nl(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===EC)for(r++,w(_);Nl(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===DC||n.charCodeAt(r)===NC)for(r++,(n.charCodeAt(r)===ef||n.charCodeAt(r)===MC)&&r++,w(_);Nl(n.charCodeAt(r));)r++;if(r>_)return e(n.slice(_,r))}function u(){if(n.charCodeAt(r)!==IC)throw new SyntaxError(`Comma ',' expected after value ${N()}`);r++}function c(){if(n.charCodeAt(r)!==LC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);r++}function o(_){if(_===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function l(_){if(_===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${N()}`)}function w(_){if(!Nl(n.charCodeAt(r))){const S=n.slice(_,r);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${N()}`)}}function b(){if(n.charCodeAt(r)!==$u)throw new SyntaxError(`End of string '"' expected ${N()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function M(_,S){throw new SyntaxError(`Duplicate key '${_}' encountered at position ${S}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function R(_){throw new SyntaxError(`Invalid character '${_}' ${z()}`)}function O(_){const S=n.slice(_,_+2);throw new SyntaxError(`Invalid escape character '${S}' ${z()}`)}function L(){throw new SyntaxError(`Object value expected after ':' ${z()}`)}function I(_){const S=n.slice(_,_+6);throw new SyntaxError(`Invalid unicode character '${S}' ${z()}`)}function z(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function N(){return`${P()} ${z()}`}}function vC(n){return n===SC||n===AC||n===_C||n===$C}function Ol(n){return n>=Mu&&n<=Tu||n>=RC&&n<=FC||n>=OC&&n<=PC}function Nl(n){return n>=Mu&&n<=Tu}function yC(n){return n>=TC&&n<=Tu}function wC(n){return n>=32&&n<=1114111}function _u(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>_u(e,t[r])):Qg(n)&&Qg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>_u(n[e],t[e])):!1}function Qg(n){return typeof n=="object"&&n!==null}const bC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1400
|
+
`,r:"\r",t:" "},xC=92,CC=123,Zg=125,kC=91,Jg=93,SC=32,AC=10,_C=9,$C=13,$u=34,MC=43,ef=45,Mu=48,TC=49,Tu=57,IC=44,EC=46,LC=58,RC=65,OC=97,NC=69,DC=101,FC=70,PC=102;function tf(n,t,e,r){return m(n);function m(h,p){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!Gg(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 h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return g(h);if(h&&typeof h=="object")return y(h)}function g(h,p){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const u=h[a];typeof u<"u"&&typeof u!="function"?s+=m(u):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function y(h,p){if(typeof h.toJSON=="function")return tf(h.toJSON(),t,e,void 0);const s=Array.isArray(t)?t.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,u="{";for(const c of s){const o=h[c];if(x(c,o)){a?a=!1:u+=",";const l=JSON.stringify(c);u+=`${l}:`,u+=m(o)}}return u+="}",u}function x(h,p){return typeof p<"u"&&typeof p!="function"&&typeof p!="symbol"}}function WC(n){return Ea(n)&&!Yg(n)?BigInt(n):parseFloat(n)}class cs{constructor(){Ui(this,"id",1)}async exec(t,e,r={},m={},g=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,m.manual=!0,(await wu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...m},timeout:g,transformRequest:[(y,x)=>tf(y)],transformResponse:[y=>mC(y,void 0,WC)]})).data.result}catch(y){let x=new Error;throw y.response?(x.name=y.response.data.error.data.class,x.message=y.response.data.error.data.message,x.object=y.response.data.error):y.request?(x.name="Request error",x.message="Request error, no response received"):x=y,x}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e){return this.exec("map_target_to_interface",[t,e])}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,m=30){const g=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:m});if(g!=null){let y=g.length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(g[h][1]),x!==null&&(g[h][1]=x)}return g}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,m=null,g=null){let y={stale_time:e};r!==null&&(y.cache_timeout=r),m!==null&&(y.start_time=m.toISOString()),g!==null&&(y.end_time=g.toISOString());const x=await this.exec("get_tlm_values",[t],y,{},1e4);if(x&&x.length>0){let h=x[0].length,p=null;for(let s=0;s<h;s++)p=this.decode_openc3_type(x[0][s]),p!==null&&(x[0][s]=p)}return x}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,m="CONVERTED"){let g=null;if(e===void 0)g=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))g=await this.exec("tlm",[t],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else g=await this.exec("tlm",[t,e,r],{type:m});let y=this.decode_openc3_type(g);return y!==null&&(g=y),g}async inject_tlm(t,e,r=null,m="CONVERTED"){await this.exec("inject_tlm",[t,e,r],{type:m})}set_tlm(t,e,r,m){return this.exec("set_tlm",[t,e,r],{type:m})}override_tlm(t,e,r,m){return this.exec("override_tlm",[t,e,r],{type:m})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,m){return this.exec("normalize_tlm",[t,e,r],{type:m})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,m="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,m])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,m,g,y={}){let x=null;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(x=this.encode_openc3_type(m[h]),x!==null&&(m[h]=x));return this.exec(t,[e,r,m],y,g)}get_cmd_hazardous(t,e,r,m={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},m):this._cmd("get_cmd_hazardous",t,e,r,m)}cmd(t,e,r,m={},g={}){return e===void 0?this.exec("cmd",t,{},m):this._cmd("cmd",t,e,r,m,g)}cmd_no_range_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_no_range_check",t,{},m,g):this._cmd("cmd_no_range_check",t,e,r,m,g)}cmd_raw(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw",t,{},m,g):this._cmd("cmd_raw",t,e,r,m,g)}cmd_raw_no_range_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},m,g):this._cmd("cmd_raw_no_range_check",t,e,r,m,g)}cmd_no_hazardous_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},m,g):this._cmd("cmd_no_hazardous_check",t,e,r,m,g)}cmd_no_checks(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_no_checks",t,{},m,g):this._cmd("cmd_no_checks",t,e,r,m,g)}cmd_raw_no_hazardous_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},m,g):this._cmd("cmd_raw_no_hazardous_check",t,e,r,m,g)}cmd_raw_no_checks(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},m,g):this._cmd("cmd_raw_no_checks",t,e,r,m,g)}build_cmd(t,e,r,m={},g={}){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r,m,g)}build_command(t,e,r,m={},g={}){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r,m,g)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),m=new Uint8Array(r);return Array.from(m).map(g=>g.toString(16).padStart(2,"0")).join("")}}}In("H",cs);var nf={exports:{}},rf;function BC(){return rf||(rf=1,(function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,m){function g(p,s){function a(L,I,z){if(!(L.length<I)){var P=L.slice(0,I),N=L.slice(I),_=/^(?:(\s+)|(\S+)(\s+))/.exec(N),S=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,j=0;if(S&&!S[2]&&(D=I-S[1].length,j=I),_&&!_[2]&&(D||(D=I),j=I+_[1].length),D)return{start:D,end:j};if(S&&S[2]&&S.index>z)return{start:S.index,end:S.index+S[2].length};if(_&&_[2])return D=I+_[2].length,{start:D,end:D+_[3].length}}}for(var u=s.column||p.getOption("printMarginColumn"),c=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),l=Math.max(s.startRow,s.endRow),d=p.session;o<=l;){var w=d.getLine(o);if(w.length>u){var b=a(w,u,5);if(b){var E=/^\s*/.exec(w)[0];d.replace(new x(o,b.start,o,b.end),`
|
1401
|
+
`+E)}l++}else if(c&&/\S/.test(w)&&o!=l){var M=d.getLine(o+1);if(M&&/\S/.test(M)){var k=w.replace(/\s+$/,""),C=M.replace(/^\s+/,""),R=k+" "+C,b=a(R,u,5);if(b&&b.start>k.length||R.length<u){var O=new x(o,k.length,o+1,M.length-C.length);d.replace(O," "),o--,l--}else k.length<w.length&&d.remove(new x(o,k.length,o,w.length))}}o++}}function y(p){if(p.command.name=="insertstring"&&/\S/.test(p.args)){var s=p.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;g(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var x=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(p){p?this.commands.on("afterExec",y):this.commands.off("afterExec",y)},value:!1}}),r.hardWrap=g}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,m){function g(v){return{row:v.line,column:v.ch}}function y(v){return new Oe(v.row,v.column)}function x(v,$,A){if($.line===A.line&&$.ch>=A.ch-1){var F=v.getLine($.line),W=F.charCodeAt($.ch);55296<=W&&W<=55551&&(A.ch+=1)}return{start:$,end:A}}function h(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),Fe.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",zo),R(v),Fe.on(v.getInputField(),"paste",s(v))}function p(v){v.setOption("disableInput",!1),v.off("cursorActivity",zo),Fe.off(v.getInputField(),"paste",s(v)),v.state.vim=null,sr&&clearTimeout(sr)}function s(v){var $=v.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(v.setCursor(fe(v.getCursor(),0,1)),$n.enterInsertMode(v,{},$))}),$.onPasteFn}function a(v,$){return $>=v.firstLine()&&$<=v.lastLine()}function u(v){return/^[a-z]$/.test(v)}function c(v){return"()[]{}".indexOf(v)!=-1}function o(v){return ha.test(v)}function l(v){return Kt.test(v)}function d(v){return/^\s*$/.test(v)}function w(v){return".?!".indexOf(v)!=-1}function b(v,$){for(var A=0;A<$.length;A++)if($[A]==v)return!0;return!1}function E(v,$,A,F,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(A||(A="string"),Nt[v]={type:A,defaultValue:$,callback:W},F)for(var B=0;B<F.length;B++)Nt[F[B]]=Nt[v];$&&M(v,$)}function M(v,$,A,F){var W=Nt[v];F=F||{};var B=F.scope;if(!W)return new Error("Unknown option: "+v);if(W.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+v+"="+$);$!==!1&&($=!0)}W.callback?(B!=="local"&&W.callback($,void 0),B!=="global"&&A&&W.callback($,A)):(B!=="local"&&(W.value=W.type=="boolean"?!!$:$),B!=="global"&&A&&(A.state.vim.options[v]={value:$}))}function k(v,$,A){var F=Nt[v];A=A||{};var W=A.scope;if(!F)return new Error("Unknown option: "+v);if(F.callback){var B=$&&F.callback(void 0,$);return W!=="global"&&B!==void 0?B:W!=="local"?F.callback():void 0}var B=W!=="global"&&$&&$.state.vim.options[v];return(B||W!=="local"&&F||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=An()}function R(v){return v.state.vim||(v.state.vim={inputState:new _,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function O(){We={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:mi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Nt){var $=Nt[v];$.value=$.defaultValue}}function L(v){function $(Y){typeof Y=="string"?hn.value=Y:hn=null}if(v[0]=="<"){var A=v.toLowerCase().slice(1,-1),F=A.split("-");if(A=F.pop()||"",A=="lt")v="<";else if(A=="space")v=" ";else if(A=="cr")v=`
|
1402
|
+
`;else if(vi[A]){var W=hn.value,B={key:vi[A],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};hn.onKeyDown&&hn.onKeyDown(B,hn.value,$),hn&&hn.onKeyUp&&hn.onKeyUp(B,hn.value,$);return}}if(v==`
|
1403
|
+
`){var K=hn;hn=null,K.onClose&&K.onClose(K.value)}else hn.value=(hn.value||"")+v}function I(v,$,A){var F=en;if(A){if(Ir.indexOf(A)!=-1)return;Ir.push(A),en=A.noremap!=0}try{for(var W=R(v),B=/<(?:[CSMA]-)*\w+>|./gi,K;K=B.exec($);){var Y=K[0],Q=W.insertMode;if(hn){L(Y);continue}var re=pt.handleKey(v,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1404
|
+
`;else{if(vi.hasOwnProperty(se)){Y=vi[se],Ho(v,Y);continue}Y=Y[0],B.lastIndex=K.index+1}}v.replaceSelection(Y)}}}finally{if(Ir.pop(),en=Ir.length?F:!1,!Ir.length&&hn){var Ce=hn;hn=null,xr(v,Ce)}}}function z(v,$){var A=v.key;if(!Er[A]){A.length>1&&A[0]=="n"&&(A=A.replace("Numpad","")),A=Vn[A]||A;var F="";if(v.ctrlKey&&(F+="C-"),v.altKey&&(F+="A-"),v.metaKey&&(F+="M-"),Fe.isMac&&v.altKey&&!v.metaKey&&!v.ctrlKey&&(F=F.slice(2)),(F||A.length>1)&&v.shiftKey&&(F+="S-"),$&&!$.expectLiteralNext&&A.length==1){if(Fn.keymap&&A in Fn.keymap)(Fn.remapCtrl!=0||!F)&&(A=Fn.keymap[A]);else if(A.charCodeAt(0)>255){var W=v.code&&v.code.slice(-1)||"";v.shiftKey||(W=W.toLowerCase()),W&&(A=W)}}return F+=A,F.length>1&&(F="<"+F+">"),F}}function P(v,$){Fn.string!==v&&(Fn=N(v)),Fn.remapCtrl=$}function N(v){function $(F){return F.split(/\\?(.)/).filter(Boolean)}var A={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var W=F.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var B=$(W[1]),K=$(W[2]);if(B.length!==K.length)return;for(var Y=0;Y<B.length;++Y)A[B[Y]]=K[Y]}else if(W.length==1){var Q=$(F);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)A[Q[Y]]=Q[Y+1]}}}),{keymap:A,string:v}):{keymap:A,string:""}}function _(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function S(v,$){v.state.vim.inputState=new _,v.state.vim.expectLiteralNext=!1,Fe.signal(v,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function j(v,$,A){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!A}function U(v,$){var A=We.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");A[v]=$,Vt.push(v)}function G(v){this.registers=v,this.unnamedRegister=v['"']=new j,v["."]=new j,v[":"]=new j,v["/"]=new j,v["+"]=new j}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(v,$){Ur[v]=$}function he(v,$){for(var A=[],F=0;F<$;F++)A.push(v);return A}function ne(v,$){qo[v]=$}function le(v,$){$n[v]=$}function ue(v,$,A){var F=v.state.vim,W=F.insertMode||F.visualMode,B=Math.min(Math.max(v.firstLine(),$.line),v.lastLine()),K=v.getLine(B),Y=K.length-1+ +!!W,Q=Math.min(Math.max(0,$.ch),Y),re=K.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;A&&A.line==B&&A.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Oe(B,Q)}function ce(v){var $={};for(var A in v)v.hasOwnProperty(A)&&($[A]=v[A]);return $}function fe(v,$,A){return typeof $=="object"&&(A=$.ch,$=$.line),new Oe(v.line+$,v.ch+A)}function _e(v,$,A,F){F.operator&&(A="operatorPending");for(var W,B=[],K=[],Y=en?$.length-yo:0,Q=Y;Q<$.length;Q++){var re=$[Q];A=="insert"&&re.context!="insert"||re.context&&re.context!=A||F.operator&&re.type=="action"||!(W=$e(v,re.keys))||(W=="partial"&&B.push(re),W=="full"&&K.push(re))}return{partial:B.length&&B,full:K.length&&K}}function $e(v,$){var A=$.slice(-11)=="<character>",F=$.slice(-10)=="<register>";if(A||F){var W=$.length-(A?11:10),B=v.slice(0,W),K=$.slice(0,W);return B==K&&v.length>W?"full":K.indexOf(B)==0?"partial":!1}return v==$?"full":$.indexOf(v)==0?"partial":!1}function Te(v){var $=/^.*(<[^>]+>)$/.exec(v),A=$?$[1]:v.slice(-1);if(A.length>1)switch(A){case"<CR>":A=`
|
1405
|
+
`;break;case"<Space>":A=" ";break;default:A=""}return A}function Ge(v,$,A){return function(){for(var F=0;F<A;F++)$(v)}}function Ve(v){return new Oe(v.line,v.ch)}function ct(v,$){return v.ch==$.ch&&v.line==$.line}function Je(v,$){return v.line<$.line?!0:v.line==$.line&&v.ch<$.ch}function dt(v,$){return arguments.length>2&&($=dt.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(v,$)?v:$}function Qt(v,$){return arguments.length>2&&($=Qt.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(v,$)?$:v}function On(v,$,A){var F=Je(v,$),W=Je($,A);return F&&W}function Gt(v,$){return v.getLine($).length}function Zr(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function yn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Hn(v,$,A){var F=Gt(v,$),W=new Array(A-F+1).join(" ");v.setCursor(new Oe($,F)),v.replaceRange(W,v.getCursor())}function rr(v,$){var A=[],F=v.listSelections(),W=Ve(v.clipPos($)),B=!ct($,W),K=v.getCursor("head"),Y=ft(F,K),Q=ct(F[Y].head,F[Y].anchor),re=F.length-1,se=re-Y>Y?re:0,ye=F[se].anchor,Ce=Math.min(ye.line,W.line),me=Math.max(ye.line,W.line),we=ye.ch,Re=W.ch,Le=F[se].head.ch-we,ze=Re-we;Le>0&&ze<=0?(we++,B||Re--):Le<0&&ze>=0?(we--,Q||Re++):Le<0&&ze==-1&&(we--,Re++);for(var rt=Ce;rt<=me;rt++){var qe={anchor:new Oe(rt,we),head:new Oe(rt,Re)};A.push(qe)}return v.setSelections(A),$.ch=Re,ye.ch=we,ye}function Mr(v,$,A){for(var F=[],W=0;W<A;W++){var B=fe($,W,0);F.push({anchor:B,head:B})}v.setSelections(F,0)}function ft(v,$,A){for(var F=0;F<v.length;F++){var W=ct(v[F].anchor,$),B=ct(v[F].head,$);if(W||B)return F}return-1}function He(v,$){var A=$.lastSelection,F=function(){var B=v.listSelections(),K=B[0],Y=B[B.length-1],Q=Je(K.anchor,K.head)?K.anchor:K.head,re=Je(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var B=v.getCursor(),K=v.getCursor(),Y=A.visualBlock;if(Y){var Q=Y.width,re=Y.height;K=new Oe(B.line+re,B.ch+Q);for(var se=[],ye=B.line;ye<K.line;ye++){var Ce=new Oe(ye,B.ch),me=new Oe(ye,K.ch),we={anchor:Ce,head:me};se.push(we)}v.setSelections(se)}else{var Re=A.anchorMark.find(),Le=A.headMark.find(),ze=Le.line-Re.line,rt=Le.ch-Re.ch;K={line:K.line+ze,ch:ze?K.ch:rt+K.ch},A.visualLine&&(B=new Oe(B.line,0),K=new Oe(K.line,Gt(v,K.line))),v.setSelection(B,K)}return[B,K]};return $.visualMode?F():W()}function zt(v,$){var A=$.sel.anchor,F=$.sel.head;$.lastPastedText&&(F=v.posFromIndex(v.indexFromPos(A)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:v.setBookmark(A),headMark:v.setBookmark(F),anchor:Ve(A),head:Ve(F),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function un(v,$,A,F){var W=v.state.vim.sel,B=F?$:W.head,K=F?$:W.anchor,Y;return Je(A,$)&&(Y=A,A=$,$=Y),Je(B,K)?(B=dt($,B),K=Qt(K,A)):(K=dt($,K),B=Qt(B,A),B=fe(B,0,-1),B.ch==-1&&B.line!=v.firstLine()&&(B=new Oe(B.line-1,Gt(v,B.line-1)))),[K,B]}function Un(v,$,W){var F=v.state.vim;$=$||F.sel;var W=W||F.visualLine?"line":F.visualBlock?"block":"char",B=Tr(v,$,W);v.setSelections(B.ranges,B.primary)}function Tr(v,$,A,F){var W=Ve($.head),B=Ve($.anchor);if(A=="char"){var K=!F&&!Je($.head,$.anchor)?1:0,Y=Je($.head,$.anchor)?1:0;return W=fe($.head,0,K),B=fe($.anchor,0,Y),{ranges:[{anchor:B,head:W}],primary:0}}if(A=="line"){if(Je($.head,$.anchor))W.ch=0,B.ch=Gt(v,B.line);else{B.ch=0;var Q=v.lastLine();W.line>Q&&(W.line=Q),W.ch=Gt(v,W.line)}return{ranges:[{anchor:B,head:W}],primary:0}}if(A=="block"){var re=Math.min(B.line,W.line),se=B.ch,ye=Math.max(B.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,we=W.line==re?0:me-1,Re=[],Le=0;Le<me;Le++)Re.push({anchor:new Oe(re+Le,se),head:new Oe(re+Le,Ce)});return{ranges:Re,primary:we}}}function yr(v){var $=v.getCursor("head");return v.getSelection().length==1&&($=dt($,v.getCursor("anchor"))),$}function wn(v,$){var A=v.state.vim;$!==!1&&v.setCursor(ue(v,A.sel.head)),zt(v,A),A.visualMode=!1,A.visualLine=!1,A.visualBlock=!1,A.insertMode||Fe.signal(v,"vim-mode-change",{mode:"normal"})}function Qn(v,$,A){var F=v.getRange($,A);if(/\n\s*$/.test(F)){var W=F.split(`
|
1406
|
+
`);W.pop();for(var B,B=W.pop();W.length>0&&B&&d(B);B=W.pop())A.line--,A.ch=0;B?(A.line--,A.ch=Gt(v,A.line)):A.ch=0}}function ir(v,$,A){$.ch=0,A.ch=0,A.line++}function Zt(v){if(!v)return 0;var $=v.search(/\S/);return $==-1?v.length:$}function Zn(v,$,A){var F=$.inclusive,W=$.innerWord,B=$.bigWord,K=$.noSymbol,Y=$.multiline,Q=A||yr(v),re=v.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,we,Re=K?wo[0]:fi[0];if(W&&/\s/.test(re.charAt(me)))Re=function(ln){return/\s/.test(ln)};else{for(;!Re(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,we=co(v,Q,!0,B,!0);break}B?Re=fi[0]:(Re=wo[0],Re(re.charAt(me))||(Re=wo[1]))}for(var Le=me,ze=me;Re(re.charAt(ze))&&ze>=0;)ze--;if(ze++,we)Le=we.to,Ce=we.line,se=v.getLine(Ce),!se&&Le==0&&Le++;else for(;Re(re.charAt(Le))&&Le<re.length;)Le++;if(F){var rt=Le,qe=Q.ch<=ze&&/\s/.test(re.charAt(Q.ch));if(!qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(rt==Le||qe){for(var Qe=ze;/\s/.test(re.charAt(ze-1))&&ze>0;)ze--;!ze&&!qe&&(ze=Qe)}}return{start:new Oe(ye,ze),end:new Oe(Ce,Le)}}function lo(v,$,A){var F=$;if(!Fe.findMatchingTag||!Fe.findEnclosingTag)return{start:F,end:F};var W=Fe.findMatchingTag(v,$)||Fe.findEnclosingTag(v,$);return!W||!W.open||!W.close?{start:F,end:F}:A?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Ei(v,$,A){ct($,A)||We.jumpList.add(v,$,A)}function Li(v,$){We.lastCharacterSearch.increment=v,We.lastCharacterSearch.forward=$.forward,We.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Ri(v,$,A,F){var W=Ve(v.getCursor()),B=A?1:-1,K=A?v.lineCount():-1,Y=W.ch,Q=W.line,re=v.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(A?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:A,depth:0,curMoveThrough:!1},ye=ni[F];if(!ye)return W;var Ce=ri[ye].init,me=ri[ye].isComplete;for(Ce&&Ce(se);Q!==K&&$;){if(se.index+=B,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=B,se.lineText=v.getLine(Q)||"",B>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(W.line=Q,W.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new Oe(Q,se.index):W}function co(v,$,A,F,W){var B=$.line,K=$.ch,Y=v.getLine(B),Q=A?1:-1,re=F?fi:wo;if(W&&Y==""){if(B+=Q,Y=v.getLine(B),!a(v,B))return null;K=A?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:B};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;K!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(K))){for(ye=K;K!=se&&re[we](Y.charAt(K));)K+=Q;if(Ce=K,me=ye!=Ce,ye==$.ch&&B==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:B}}me||(K+=Q)}if(B+=Q,!a(v,B))return null;Y=v.getLine(B),K=Q>0?0:Y.length}}function ur(v,$,A,F,W,B){var K=Ve($),Y=[];(F&&!W||!F&&W)&&A++;for(var Q=!F||!W,re=0;re<A;re++){var se=co(v,$,F,B,Q);if(!se){var ye=Gt(v,v.lastLine());Y.push(F?{line:v.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new Oe(se.line,F?se.to-1:se.from)}var Ce=Y.length!=A,me=Y[0],we=Y.pop();return F&&!W?(!Ce&&(me.from!=K.ch||me.line!=K.line)&&(we=Y.pop()),new Oe(we.line,we.from)):F&&W?new Oe(we.line,we.to-1):!F&&W?(!Ce&&(me.to!=K.ch||me.line!=K.line)&&(we=Y.pop()),new Oe(we.line,we.to)):new Oe(we.line,we.from)}function uo(v,$,A,F,W){var B=$,K=new Oe(B.line+A.repeat-1,1/0),Y=v.clipPos(K);return Y.ch--,W||(F.lastHPos=1/0,F.lastHSPos=v.charCoords(Y,"div").left),K}function Do(v,$,A,F,W){for(var B=W||v.getCursor(),K=B.ch,Y,Q=0;Q<$;Q++){var re=v.getLine(B.line);if(Y=Xa(K,re,F,A),Y==-1)return null;K=Y}return new Oe(v.getCursor().line,Y)}function Ya(v,$){var A=v.getCursor().line;return ue(v,new Oe(A,$-1))}function Jr(v,$,A,F){!b(A,to)&&!jt.test(A)||($.marks[A]&&$.marks[A].clear(),$.marks[A]=v.setBookmark(F))}function Xa(v,$,A,F,W){var B;return F?(B=$.indexOf(A,v+1),B!=-1):(B=$.lastIndexOf(A,v-1),B!=-1),B}function ws(v,$,A,F,W){function B(ze){return!/\S/.test(v.getLine(ze))}function K(ze,rt,qe){return qe?B(ze)!=B(ze+rt):!B(ze)&&B(ze+rt)}function Y(ze){F=F>0?1:-1;var rt=v.ace.session.getFoldLine(ze);rt&&ze+F>rt.start.row&&ze+F<rt.end.row&&(F=(F>0?rt.end.row:rt.start.row)-ze)}var Q=$.line,re=v.firstLine(),se=v.lastLine(),ye,Ce,me=Q;if(F){for(;re<=me&&me<=se&&A>0;)Y(me),K(me,F)&&A--,me+=F;return new Oe(me,0)}var we=v.state.vim;if(we.visualLine&&K(Q,1,!0)){var Re=we.sel.anchor;K(Re.line,-1,!0)&&(!W||Re.line!=Q)&&(Q+=1)}var Le=B(Q);for(me=Q;me<=se&&A;me++)K(me,1,!0)&&(!W||B(me)!=Le)&&A--;for(Ce=new Oe(me,0),me>se&&!Le?Le=!0:W=!1,me=Q;me>re&&!((!W||B(me)==Le||me==Q)&&K(me,-1,!0));me--);return ye=new Oe(me,0),{start:ye,end:Ce}}function ia(v,$,A,F,W){function B(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function K(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(B(we);we.line!==null;){if(Re=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(B(we);we.line!==null&&d(we.line[we.pos]);)Re=we.pos,B(we);return{ln:we.ln,pos:Re+1}}B(we)}return{ln:we.ln,pos:Re+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(B(we);we.line!==null;){if(!d(we.line[we.pos])&&!w(we.line[we.pos]))Re=we.pos;else if(w(we.line[we.pos]))return W?d(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Re}:{ln:we.ln,pos:Re};B(we)}return we.line=me,W&&d(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Re}}for(var Q={ln:$.line,pos:$.ch};A>0;)F<0?Q=Y(v,Q.ln,Q.pos,F):Q=K(v,Q.ln,Q.pos,F),A--;return new Oe(Q.ln,Q.pos)}function Oi(v,$,A,F){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function B(Q,re,se,ye){var Le=Q.getLine(re),Ce=Le==="",me={line:Le,ln:re,pos:se,dir:ye},we={ln:me.ln,pos:me.pos},Re=me.line==="";for(W(Q,me);me.line!==null;){if(we.ln=me.ln,we.pos=me.pos,me.line===""&&!Re)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!d(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||d(me.line[me.pos+1]))&&(Ce=!0),W(Q,me)}var Le=Q.getLine(we.ln);we.pos=0;for(var ze=Le.length-1;ze>=0;--ze)if(!d(Le[ze])){we.pos=ze;break}return we}function K(Q,re,se,ye){var Re=Q.getLine(re),Ce={line:Re,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},we=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!d(Ce.line[Ce.pos])&&(we=!1,me={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Re=Q.getLine(me.ln);me.pos=0;for(var Le=0;Le<Re.length;++Le)if(!d(Re[Le])){me.pos=Le;break}return me}for(var Y={ln:$.line,pos:$.ch};A>0;)F<0?Y=K(v,Y.ln,Y.pos,F):Y=B(v,Y.ln,Y.pos,F),A--;return new Oe(Y.ln,Y.pos)}function Nn(v,$,A,F){var W=$,B,K,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[A],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[A],re=v.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(B=v.scanForBracket(new Oe(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),K=v.scanForBracket(new Oe(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!B||!K)return null;if(B=B.pos,K=K.pos,B.line==K.line&&B.ch>K.ch||B.line>K.line){var ye=B;B=K,K=ye}return F?K.ch+=1:B.ch+=1,{start:B,end:K}}function wr(v,$,A,F){var W=Ve($),B=v.getLine(W.line),K=B.split(""),Y,Q,re,se,ye=K.indexOf(A);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&K[W.ch]==A){var Ce=/string/.test(v.getTokenTypeAt(fe($,0,1))),me=/string/.test(v.getTokenTypeAt($)),we=Ce&&!me;we||(Q=W.ch,--W.ch)}if(K[W.ch]==A&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)K[re]==A&&(Y=re+1);if(Y&&!Q)for(re=Y,se=K.length;re<se&&!Q;re++)K[re]==A&&(Q=re);return!Y||!Q?{start:W,end:W}:(F&&(--Y,++Q),{start:new Oe(W.line,Y),end:new Oe(W.line,Q)})}function Ni(){}function bn(v){var $=v.state.vim;return $.searchState_||($.searchState_=new Ni)}function br(v){return Di(v,"/")}function Xi(v){return bs(v,"/")}function Di(v,$){var A=bs(v,$)||[];if(!A.length)return[];var F=[];if(A[0]===0){for(var W=0;W<A.length;W++)typeof A[W]=="number"&&F.push(v.substring(A[W]+1,A[W+1]));return F}}function bs(v,$){$||($="/");for(var A=!1,F=[],W=0;W<v.length;W++){var B=v.charAt(W);!A&&B==$&&F.push(W),A=!A&&B=="\\"}return F}function oa(v){for(var $="|(){",A="}",F=!1,W=[],B=-1;B<v.length;B++){var K=v.charAt(B)||"",Y=v.charAt(B+1)||"",Q=Y&&$.indexOf(Y)!=-1;F?((K!=="\\"||!Q)&&W.push(K),F=!1):K==="\\"?(F=!0,Y&&A.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(K)):(W.push(K),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Qa(v){for(var $=!1,A=[],F=-1;F<v.length;F++){var W=v.charAt(F)||"",B=v.charAt(F+1)||"";yi[W+B]?(A.push(yi[W+B]),F++):$?(A.push(W),$=!1):W==="\\"?($=!0,o(B)||B==="$"?A.push("$"):B!=="/"&&B!=="\\"&&A.push("\\")):(W==="$"&&A.push("$"),A.push(W),B==="/"&&A.push("\\"))}return A.join("")}function Za(v){for(var $=new Fe.StringStream(v),A=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)A.push($.next());var F=!1;for(var W in or)if($.match(W,!0)){F=!0,A.push(or[W]);break}F||A.push($.next())}return A.join("")}function Fi(v,$,A){var F=We.registerController.getRegister("/");if(F.setText(v),v instanceof RegExp)return v;var W=Xi(v),B,K;if(!W.length)B=v;else{B=v.substring(0,W[0]);var Y=v.substring(W[0]);K=Y.indexOf("i")!=-1}if(!B)return null;k("pcre")||(B=oa(B)),A&&($=/^[^A-Z]*$/.test(B));var Q=new RegExp(B,$||K?"im":"m");return Q}function ei(v){typeof v=="string"&&(v=document.createElement(v));for(var $,A=1;A<arguments.length;A++)if($=arguments[A])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)v.appendChild($);else for(var F in $)Object.prototype.hasOwnProperty.call($,F)&&(F[0]==="$"?v.style[F.slice(1)]=$[F]:v.setAttribute(F,$[F]));return v}function Ot(v,$){var A=ei("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);v.openNotification?v.openNotification(A,{bottom:!0,duration:5e3}):alert(A.innerText)}function sa(v,$){return ei("div",{$display:"flex"},ei("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},v,ei("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ei("span",{$color:"#888"},$))}function xr(v,$){if(Ir.length){$.value||($.value=""),hn=$;return}var A=sa($.prefix,$.desc);if(v.openDialog)v.openDialog(A,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var F="";typeof $.prefix!="string"&&$.prefix&&(F+=$.prefix.textContent),$.desc&&(F+=" "+$.desc),$.onClose(prompt(F,""))}}function Dn(v,$){if(v instanceof RegExp&&$ instanceof RegExp){for(var A=["global","multiline","ignoreCase","source"],F=0;F<A.length;F++){var W=A[F];if(v[W]!==$[W])return!1}return!0}return!1}function sn(v,$,A,F){if($){var W=bn(v),B=Fi($,!!A,!!F);if(B)return di(v,B),Dn(B,W.getQuery())||W.setQuery(B),B}}function Sn(v){if(v.source.charAt(0)=="^")var $=!0;return{token:function(A){if($&&!A.sol()){A.skipToEnd();return}var F=A.match(v,!1);if(F)return F[0].length==0?(A.next(),"searching"):!A.sol()&&(A.backUp(1),!v.exec(A.next()+F[0]))?(A.next(),null):(A.match(v),"searching");for(;!A.eol()&&(A.next(),!A.match(v,!1)););},query:v}}function di(v,$){clearTimeout(sr);var A=bn(v);A.highlightTimeout=sr,sr=setTimeout(function(){if(v.state.vim){var F=bn(v);F.highlightTimeout=null;var W=F.getOverlay();(!W||$!=W.query)&&(W&&v.removeOverlay(W),W=Sn($),v.addOverlay(W),v.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(v.showMatchesOnScrollbar($))),F.setOverlay(W))}},50)}function Cr(v,$,A,F){return F===void 0&&(F=1),v.operation(function(){for(var W=v.getCursor(),B=v.getSearchCursor(A,W),K=0;K<F;K++){var Y=B.find($);if(K==0&&Y&&ct(B.from(),W)){var Q=$?B.from():B.to();Y=B.find($),Y&&!Y[0]&&ct(B.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=B.find($))}if(!Y&&(B=v.getSearchCursor(A,$?new Oe(v.lastLine()):new Oe(v.firstLine(),0)),!B.find($)))return}return B.from()})}function pi(v,$,A,F,W){return F===void 0&&(F=1),v.operation(function(){var B=v.getCursor(),K=v.getSearchCursor(A,B),Y=K.find(!$);!W.visualMode&&Y&&ct(K.from(),B)&&K.find(!$);for(var Q=0;Q<F;Q++)if(Y=K.find($),!Y&&(K=v.getSearchCursor(A,$?new Oe(v.lastLine()):new Oe(v.firstLine(),0)),!K.find($)))return;return[K.from(),K.to()]})}function Fo(v){var $=bn(v);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),v.removeOverlay(bn(v).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function xs(v,$,A){return typeof v!="number"&&(v=v.line),$ instanceof Array?b(v,$):typeof A=="number"?v>=$&&v<=A:v==$}function Qi(v){var $=v.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function jr(v,$,A){if(A=="'"||A=="`")return We.jumpList.find(v,-1)||new Oe(0,0);if(A==".")return ho(v);var F=$.marks[A];return F&&F.find()}function ho(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var $=v.doc.history.done,A=$.length;A--;)if($[A].changes)return Ve($[A].changes[0].to)}function Po(v,$,A,F,W,B,K,Y,Q){function re(){v.operation(function(){for(;!Re;)se(),Ce();me()})}function se(){var qe=v.getRange(B.from(),B.to()),Qe=qe.replace(K,Y),ln=B.to().line;B.replace(Qe),ze=B.to().line,W+=ze-ln,rt=ze<ln}function ye(){var qe=Le&&Ve(B.to()),Qe=B.findNext();return Qe&&!Qe[0]&&qe&&ct(B.from(),qe)&&(Qe=B.findNext()),Qe}function Ce(){for(;ye()&&xs(B.from(),F,W);)if(!(!A&&B.from().line==ze&&!rt)){v.scrollIntoView(B.from(),30),v.setSelection(B.from(),B.to()),Le=B.from(),Re=!1;return}Re=!0}function me(qe){if(qe&&qe(),v.focus(),Le){v.setCursor(Le);var Qe=v.state.vim;Qe.exMode=!1,Qe.lastHPos=Qe.lastHSPos=Le.ch}Q&&Q()}function we(qe,Qe,ln){Fe.e_stop(qe);var it=z(qe);switch(it){case"y":se(),Ce();break;case"n":Ce();break;case"a":var pn=Q;Q=void 0,v.operation(re),Q=pn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(ln)}return Re&&me(ln),!0}v.state.vim.exMode=!0;var Re=!1,Le,ze,rt;if(Ce(),Re){Ot(v,"No matches for "+K.source);return}if(!$){re(),Q&&Q();return}xr(v,{prefix:ei("span","replace with ",ei("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function Hr(v,$){var A=v.state.vim,F=We.macroModeState,W=We.registerController.getRegister("."),B=F.isPlaying,K=F.lastInsertModeChanges;B||(v.off("change",po),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=null,Fe.off(v.getInputField(),"keydown",As)),!B&&A.insertModeRepeat>1&&(aa(v,A,A.insertModeRepeat-1,!0),A.lastEditInputState.repeatOverride=A.insertModeRepeat),delete A.insertModeRepeat,A.insertMode=!1,$||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),W.setText(K.changes.join("")),Fe.signal(v,"vim-mode-change",{mode:"normal"}),F.isRecording&&Jn(F)}function Wo(v){xn.unshift(v)}function Cs(v,$,A,F,W){var B={keys:v,type:$};B[$]=A,B[$+"Args"]=F;for(var K in W)B[K]=W[K];Wo(B)}function ks(v,$,A,F){var W=We.registerController.getRegister(F);if(F==":"){W.keyBuffer[0]&&dr.processCommand(v,W.keyBuffer[0]),A.isPlaying=!1;return}var B=W.keyBuffer,K=0;A.isPlaying=!0,A.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<B.length;Y++)for(var Q=B[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),pt.handleKey(v,se,"macro"),$.insertMode){var ye=W.insertModeChanges[K++].changes;We.macroModeState.lastInsertModeChanges.changes=ye,Uo(v,ye,1),Hr(v)}A.isPlaying=!1}function Bo(v,$){if(!v.isPlaying){var A=v.latestRegister,F=We.registerController.getRegister(A);F&&F.pushText($)}}function Jn(v){if(!v.isPlaying){var $=v.latestRegister,A=We.registerController.getRegister($);A&&A.pushInsertModeChanges&&A.pushInsertModeChanges(v.lastInsertModeChanges)}}function Ss(v,$){if(!v.isPlaying){var A=v.latestRegister,F=We.registerController.getRegister(A);F&&F.pushSearchQuery&&F.pushSearchQuery($)}}function po(v,$){var A=We.macroModeState,F=A.lastInsertModeChanges;if(!A.isPlaying)for(var W=v.state.vim;$;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var B=v.listSelections().length;B>1&&(F.ignoreCount=B);var K=$.text.join(`
|
1407
|
+
`);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),K)if(v.state.overwrite&&!/\n/.test(K))F.changes.push([K]);else{if(K.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=v.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<K.length&&(F.changes.push([K,re]),K="")}}K&&F.changes.push(K)}}$=$.next}}function zo(v){var $=v.state.vim;if($.insertMode){var A=We.macroModeState;if(A.isPlaying)return;var F=A.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||jo(v,$)}function jo(v,$,A){var F=v.getCursor("anchor"),W=v.getCursor("head");if($.visualMode&&!v.somethingSelected()?wn(v,!1):!$.visualMode&&!$.insertMode&&v.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,Fe.signal(v,"vim-mode-change",{mode:"visual"})),$.visualMode){var B=Je(W,F)?0:-1,K=Je(W,F)?-1:0;W=fe(W,0,B),F=fe(F,0,K),$.sel={anchor:F,head:W},Jr(v,$,"<",dt(W,F)),Jr(v,$,">",Qt(W,F))}else!$.insertMode&&!A&&($.lastHPos=v.getCursor().ch)}function Zi(v,$){this.keyName=v,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function As(v){var $=We.macroModeState,A=$.lastInsertModeChanges,F=Fe.keyName?Fe.keyName(v):v.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(A.maybeReset&&(A.changes=[],A.maybeReset=!1),A.changes.push(new Zi(F,v)))}function aa(v,$,A,F){function W(){Y?_n.processAction(v,$,$.lastEditActionCommand):_n.evalInput(v,$)}function B(se){if(K.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=K.lastInsertModeChanges;Uo(v,ye.changes,se)}}var K=We.macroModeState;K.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<A;re++)W(),B(1);else F||W(),B(A);$.inputState=Q,$.insertMode&&!F&&Hr(v),K.isPlaying=!1}function Ho(v,$){Fe.lookupKey($,"vim-insert",function(A){return typeof A=="string"?Fe.commands[A](v):A(v),!0})}function Uo(v,$,A){var F=v.getCursor("head"),W=We.macroModeState.lastInsertModeChanges.visualBlock;W&&(Mr(v,F,W+1),A=v.listSelections().length,v.setCursor(F));for(var B=0;B<A;B++){W&&v.setCursor(fe(F,B,0));for(var K=0;K<$.length;K++){var Y=$[K];if(Y instanceof Zi)Ho(v,Y.keyName);else if(typeof Y=="string")v.replaceSelection(Y);else{var Q=v.getCursor(),re=fe(Q,0,Y[0].length-(Y[1]||0));v.replaceRange(Y[0],Q,Y[1]?Q:re),v.setCursor(re)}}}W&&v.setCursor(fe(F,0,1))}function _s(v,$,A,F){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=kr[$]||$;var W="";if(A.ctrlKey&&(W+="C-"),A.altKey&&(W+="A-"),(W||$.length>1)&&A.shiftKey&&(W+="S-"),F&&!F.expectLiteralNext&&$.length==1){if(Fn.keymap&&$ in Fn.keymap)(Fn.remapCtrl!==!1||!W)&&($=Fn.keymap[$]);else if($.charCodeAt(0)>255){var B=A.code&&A.code.slice(-1)||"";A.shiftKey||(B=B.toLowerCase()),B&&($=B)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function Vo(v){var $=new v.constructor;return Object.keys(v).forEach(function(A){if(A!="insertEnd"){var F=v[A];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=Vo(F)),$[A]=F}}),v.sel&&($.sel={head:v.sel.head&&Ve(v.sel.head),anchor:v.sel.anchor&&Ve(v.sel.anchor)}),$}function go(v,$,A){var F=!1,W=pt.maybeInitVimState_(v),B=W.visualBlock||W.wasInVisualBlock,K=v.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!K?W.wasInVisualBlock=!1:K&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&K)v.ace.exitMultiSelectMode();else if(B||!K||v.ace.inVirtualSelectionMode)F=pt.handleKey(v,$,A);else{var Y=Vo(W),Q=W.inputState.changeQueueList||[];v.operation(function(){v.curOp.isVimOp=!0;var re=0;v.ace.forEachSelection(function(){var se=v.ace.selection;v.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,v.state.vim.inputState.changeQueue=Q[re];var ye=v.getCursor("head"),Ce=v.getCursor("anchor"),me=Je(ye,Ce)?0:-1,we=Je(ye,Ce)?-1:0;ye=fe(ye,0,me),Ce=fe(Ce,0,we),v.state.vim.sel.head=ye,v.state.vim.sel.anchor=Ce,F=ii(v,$,A),se.$desiredColumn=v.state.vim.lastHPos==-1?null:v.state.vim.lastHPos,v.ace.inVirtualSelectionMode&&(Q[re]=v.state.vim.inputState.changeQueue),v.virtualSelectionMode()&&(v.state.vim=Vo(Y)),re++}),v.curOp.cursorActivity&&!F&&(v.curOp.cursorActivity=!1),W.status=v.state.vim.status,v.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return F&&!W.visualMode&&!W.insert&&W.visualMode!=v.somethingSelected()&&jo(v,W,!0),F}function gi(v,$){$.off("beforeEndOperation",gi);var A=$.state.cm.vimCmd;A&&$.execCommand(A.exec?A:A.name,A.args),$.curOp=$.prevOp}var er=e("../range").Range,Ji=e("../lib/event_emitter").EventEmitter,Pi=e("../lib/dom"),la=e("../lib/oop"),Ja=e("../lib/keys"),fo=e("../lib/event"),Wi=e("../search").Search,mo=e("../lib/useragent"),Ko=e("../search_highlight").SearchHighlight,vo=e("../commands/multi_select_commands"),ca=e("../mode/text").Mode.prototype.tokenRe,eo=e("../ext/hardwrap").hardWrap;e("../multi_select");var Fe=function(v){this.ace=v,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)};Fe.Pos=function(v,$){if(!(this instanceof Oe))return new Oe(v,$);this.line=v,this.ch=$},Fe.defineOption=function(v,$,A){},Fe.commands={redo:function(v){v.ace.redo()},undo:function(v){v.ace.undo()},newlineAndIndent:function(v){v.ace.insert(`
|
1408
|
+
`)},goLineLeft:function(v){v.ace.selection.moveCursorLineStart()},goLineRight:function(v){v.ace.selection.moveCursorLineEnd()}},Fe.keyMap={},Fe.addClass=Fe.rmClass=function(){},Fe.e_stop=Fe.e_preventDefault=fo.stopEvent,Fe.keyName=function(v){var $=Ja[v.keyCode]||v.key||"";return $.length==1&&($=$.toUpperCase()),$=fo.getModifierString(v).replace(/(^|-)\w/g,function(A){return A.toUpperCase()})+$,$},Fe.keyMap.default=function(v){return function($){var A=$.ace.commands.commandKeyBinding[v.toLowerCase()];return A&&$.ace.execCommand(A)!==!1}},Fe.lookupKey=function v($,A,F){A||(A="default"),typeof A=="string"&&(A=Fe.keyMap[A]||Fe.keyMap.default);var W=typeof A=="function"?A($):A[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&F(W))return"handled";if(A.fallthrough){if(!Array.isArray(A.fallthrough))return v($,A.fallthrough,F);for(var B=0;B<A.fallthrough.length;B++){var K=v($,A.fallthrough[B],F);if(K)return K}}},Fe.findMatchingTag=function(v,$){return v.findMatchingTag($)},Fe.findEnclosingTag=function(v,$){},Fe.signal=function(v,$,A){return v._signal($,A)},Fe.on=fo.addListener,Fe.off=fo.removeListener,Fe.isWordChar=function(v){return v<""?/^\w$/.test(v):(ca.lastIndex=0,ca.test(v))},(function(){la.implement(Fe.prototype,Ji),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 F={text:A.action[0]=="i"?A.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=F:W.lastChange=W.change=F,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(vo.keyboardHandler)},this.operation=function(A,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return A();if((F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var B=this.curOp=this.curOp||{};this.curOp.force=F;var K=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(),!B.cursorActivity&&!B.lastChange&&W&&(this.ace.prevOp=W)),(F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),K},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,F,W){var B=W?W[A+"Handlers"]:(this._eventRegistry||{})[A];if(B){B=B.slice();for(var K=0;K<B.length;K++)B[K](this,F)}},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,F){typeof A=="object"&&(F=A.ch,A=A.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:A,column:F}),this.ace.selection.moveTo(A,F),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(A){var F=this.ace.selection,W=A=="anchor"?F.isEmpty()?F.lead:F.anchor:A=="head"||!A?F.lead:F.getRange()[A];return y(W)},this.listSelections=function(A){var F=this.ace.multiSelect.rangeList.ranges;return!F.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:F.map(function(W){return{anchor:this.clipPos(y(W.cursor==W.end?W.start:W.end)),head:this.clipPos(y(W.cursor))}},this)},this.setSelections=function(A,F){var W=this.ace.multiSelect,B=A.map(function(re){var se=g(re.anchor),ye=g(re.head),Ce=er.comparePoints(se,ye)<0?new er.fromPoints(se,ye):new er.fromPoints(ye,se);return Ce.cursor=er.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(B[0]);return}F?B[F]&&B.push(B.splice(F,1)[0]):B=B.reverse(),W.toSingleRange(B[0].clone());for(var K=this.ace.session,Y=0;Y<B.length;Y++){var Q=K.$clipRangeToDocument(B[Y]);W.addRange(Q)}},this.setSelection=function(A,F,W){var B=this.ace.selection;B.moveTo(A.line,A.ch),B.selectTo(F.line,F.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(A){return!this.ace.selection.isEmpty()},this.clipPos=function(A){var F=this.ace.session.$clipPositionToDocument(A.line,A.ch);return y(F)},this.foldCode=function(A){this.ace.session.$toggleFoldWidget(A.line,{})},this.markText=function(A){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(A){var F=A.action=="insert",W=A.start,B=A.end,K=(B.row-W.row)*(F?1:-1),Y=(B.column-W.column)*(F?1:-1);F&&(B=W);for(var Q in this.marks){var re=this.marks[Q],se=er.comparePoints(re,W);if(!(se<0)){if(se===0&&F)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=F?se:er.comparePoints(re,B);if(ye>0){re.row+=K,re.column+=re.row==B.row?Y:0;continue}!F&&ye<=0&&(re.row=W.row,re.column=W.column,ye===0&&(re.bias=1))}}};var v=function(A,F,W,B){this.cm=A,this.id=F,this.row=W,this.column=B,A.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return y(this)},this.setBookmark=function(A,F){var W=new v(this,this.$uid++,A.line,A.ch);return(!F||!F.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(A,F){if(F=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,A)}},this.findPosV=function(A,F,W,B){if(W=="page"){var K=this.ace.renderer,Y=K.layerConfig;F*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(A.line,A.ch);B!=null&&(Q.column=B),Q.row+=F,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return y(re)}debugger},this.charCoords=function(A,F){if(F=="div"||!F){var W=this.ace.session.documentToScreenPosition(A.line,A.ch);return{left:W.column,top:W.row}}if(F=="local"){var B=this.ace.renderer,W=this.ace.session.documentToScreenPosition(A.line,A.ch),K=B.layerConfig.lineHeight,Y=B.layerConfig.characterWidth,Q=K*W.row;return{left:W.column*Y,top:Q,bottom:Q+K}}},this.coordsChar=function(A,F){var W=this.ace.renderer;if(F=="local"){var B=Math.max(0,Math.floor(A.top/W.lineHeight)),K=Math.max(0,Math.floor(A.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(B,K);return y(Y)}if(F=="div")throw"not implemented"},this.getSearchCursor=function(A,F,W){var B=!1,K=!1;A instanceof RegExp&&!A.global&&(B=!A.ignoreCase,A=A.source,K=!0),A=="\\n"&&(A=`
|
1409
|
+
`,K=!1);var Y=new Wi;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:A,caseSensitive:B,wrap:!1,backwards:ye,regExp:K,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&y(se.start)},to:function(){return se&&y(se.end)},replace:function(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(A,F){var W=this.ace.renderer,B=W.layerConfig,K=B.maxHeight;K-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,K))),A!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(A,B.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(A,F){if(A){var W=this.ace.renderer,B={top:0,bottom:F};W.scrollCursorIntoView(g(A),W.lineHeight*2/W.$size.scrollerHeight,B)}},this.getLine=function(A){return this.ace.session.getLine(A)},this.getRange=function(A,F){return this.ace.session.getTextRange(new er(A.line,A.ch,F.line,F.ch))},this.replaceRange=function(A,F,W){W||(W=F);var B=new er(F.line,F.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(B),this.ace.session.replace(B,A)},this.replaceSelection=this.replaceSelections=function(A){var F=Array.isArray(A)&&A,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),F?A[0]||"":A);return}W.inVirtualSelectionMode=!0;var B=W.rangeList.ranges;B.length||(B=[this.ace.multiSelect.getRange()]);for(var K=B.length;K--;)this.ace.session.replace(B[K],F?A[K]||"":A);W.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 $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(A,F){switch(this.state[A]=F,A){case"indentWithTabs":A=$[A],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:A=$[A]}A&&this.ace.setOption(A,F)},this.getOption=function(A){var F,W=$[A];switch(W&&(F=this.ace.getOption(W)),A){case"indentWithTabs":return A=$[A],!F;case"keyMap":return this.state.$keyMap||"vim"}return W?F: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 F=new Ko(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(F);F.id=W.id,F.session=this.ace.session,F.destroy=function(K){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(K){var Y=K.start.row;Y==K.end.row?F.cache[Y]=void 0:F.cache.splice(Y,F.cache.length)},F.session.on("changeEditor",F.destroy),F.session.on("change",F.updateOnChange)}var B=new RegExp(A.query.source,"gmi");this.$searchHighlight=A.highlight=F,this.$searchHighlight.setRegexp(B),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(A){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var A=this.ace.renderer,F=A.layerConfig;return{left:A.scrollLeft,top:A.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(A){return this.ace.setValue(A,-1)},this.getTokenTypeAt=function(A){var F=this.ace.session.getTokenAt(A.line,A.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(A){var F=this.ace.session.findMatchingBracket(g(A));return{to:F&&y(F)}},this.findMatchingTag=function(A){var F=this.ace.session.getMatchingTags(g(A));if(F)return{open:{from:y(F.openTag.start),to:y(F.openTag.end)},close:{from:y(F.closeTag.start),to:y(F.closeTag.end)}}},this.indentLine=function(A,F){F===!0?this.ace.session.indentRows(A,A," "):F===!1&&this.ace.session.outdentRows(new er(A,0,A,0))},this.indexFromPos=function(A){return this.ace.session.doc.positionToIndex(g(A))},this.posFromIndex=function(A){return y(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,F,W,B){var K=B.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==1)var Q=this.ace.session.$findClosingBracket(K.slice(1,2),g(A),Y);else{var Q=this.ace.session.$findOpeningBracket(K.slice(-2,-1),{row:A.line,column:A.ch+1},Y);!Q&&B.bracketRegex&&B.bracketRegex.test(this.getLine(A.line)[A.ch-1])&&(Q={row:A.line,column:A.ch-1})}return Q&&{pos:y(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(A){if(Fe.commands.hasOwnProperty(A))return Fe.commands[A](this);if(A=="indentAuto")return this.ace.execCommand("autoindent");console.log(A+" is not implemented")},this.getLineNumber=function(A){var F=this.$lineHandleChanges;if(!F)return null;for(var W=A.row,B=0;B<F.length;B++){var K=F[B];if(K.start.row!=K.end.row){if(K.action[0]=="i")K.start.row<W&&(W+=K.end.row-K.start.row);else if(K.start.row<W){if(W<K.end.row||W==K.end.row&&K.start.column>0)return null;W-=K.end.row-K.start.row}}}return W},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 y(A.$lastDelta.end)}}).call(Fe.prototype);var ua=Fe.StringStream=function(v,$){this.pos=this.start=0,this.string=v,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ua.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(v){var $=this.string.charAt(this.pos);if(typeof v=="string")var A=$==v;else var A=$&&(v.test?v.test($):v($));if(A)return++this.pos,$},eatWhile:function(v){for(var $=this.pos;this.eat(v););return this.pos>$},eatSpace:function(){for(var v=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>v},skipToEnd:function(){this.pos=this.string.length},skipTo:function(v){var $=this.string.indexOf(v,this.pos);if($>-1)return this.pos=$,!0},backUp:function(v){this.pos-=v},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(v,$,A){if(typeof v!="string"){var F=this.string.slice(this.pos).match(v);return F&&F.index>0?null:(F&&$!==!1&&(this.pos+=F[0].length),F)}var W=function(K){return A?K.toLowerCase():K},B=this.string.substr(this.pos,v.length);if(W(B)==W(v))return $!==!1&&(this.pos+=v.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(v,$){this.lineStart+=v;try{return $()}finally{this.lineStart-=v}}},Fe.defineExtension=function(v,$){Fe.prototype[v]=$},Pi.importCssString(`.normal-mode .ace_cursor{
|
1410
|
+
border: none;
|
1411
|
+
background-color: rgba(255,0,0,0.5);
|
1412
|
+
}
|
1413
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1414
|
+
background-color: transparent;
|
1415
|
+
border: 1px solid red;
|
1416
|
+
opacity: 0.7
|
1417
|
+
}
|
1418
|
+
.ace_dialog {
|
1419
|
+
position: absolute;
|
1420
|
+
left: 0; right: 0;
|
1421
|
+
background: inherit;
|
1422
|
+
z-index: 15;
|
1423
|
+
padding: .1em .8em;
|
1424
|
+
overflow: hidden;
|
1425
|
+
color: inherit;
|
1426
|
+
}
|
1427
|
+
.ace_dialog-top {
|
1428
|
+
border-bottom: 1px solid #444;
|
1429
|
+
top: 0;
|
1430
|
+
}
|
1431
|
+
.ace_dialog-bottom {
|
1432
|
+
border-top: 1px solid #444;
|
1433
|
+
bottom: 0;
|
1434
|
+
}
|
1435
|
+
.ace_dialog input {
|
1436
|
+
border: none;
|
1437
|
+
outline: none;
|
1438
|
+
background: transparent;
|
1439
|
+
width: 20em;
|
1440
|
+
color: inherit;
|
1441
|
+
font-family: monospace;
|
1442
|
+
}`,"vimMode",!1),(function(){function v(A,F,W){var B=A.ace.container,K;return K=B.appendChild(document.createElement("div")),W?K.className="ace_dialog ace_dialog-bottom":K.className="ace_dialog ace_dialog-top",typeof F=="string"?K.innerHTML=F:K.appendChild(F),K}function $(A,F){A.state.currentNotificationClose&&A.state.currentNotificationClose(),A.state.currentNotificationClose=F}Fe.defineExtension("openDialog",function(A,F,W){function B(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==K&&(Q.state.dialog=null,Q.focus()),Y=!0,K.remove(),W.onClose&&W.onClose(K);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),$(this,null);var K=v(this,A,W.bottom),Y=!1,Q=this;this.state.dialog=K;var re=K.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Fe.on(re,"input",function(ye){W.onInput(ye,re.value,B)}),W.onKeyUp&&Fe.on(re,"keyup",function(ye){W.onKeyUp(ye,re.value,B)}),Fe.on(re,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,re.value,B)||(ye.keyCode==13&&F(re.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(Fe.e_stop(ye),B()))}),W.closeOnBlur!==!1&&Fe.on(re,"blur",B),re.focus()):(se=K.getElementsByTagName("button")[0])&&(Fe.on(se,"click",function(){B(),Q.focus()}),W.closeOnBlur!==!1&&Fe.on(se,"blur",B),se.focus()),B}}),Fe.defineExtension("openNotification",function(A,F){function W(){K||(K=!0,clearTimeout(Y),B.remove())}if(!this.virtualSelectionMode()){$(this,W);var B=v(this,A,F&&F.bottom),K=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return Fe.on(B,"click",function(re){Fe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})})();var Oe=Fe.Pos,xn=[{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"}],yo=xn.length,ti=[{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"}],Fn=N(""),ha=/[\d]/,wo=[Fe.isWordChar,function(v){return v&&!Fe.isWordChar(v)&&!/\s/.test(v)}],fi=[function(v){return/\S/.test(v)}],to=["<",">"],Vt=["-",'"',".",":","_","/","+"],jt=/^\w$/,Kt;try{Kt=new RegExp("^[\\p{Lu}]$","u")}catch{Kt=/^[A-Z]$/}var Nt={};E("filetype",void 0,"string",["ft"],function(v,$){if($!==void 0){if(v===void 0){var A=$.getOption("mode");return A=="null"?"":A}var A=v==""?"null":v;$.setOption("mode",A)}}),E("textwidth",80,"number",["tw"],function(v,$){if($!==void 0){if(v===void 0){var A=$.getOption("textwidth");return A}var F=Math.round(v);F>1&&$.setOption("textwidth",F)}});var mi=function(){function v(Q,re,se){function ye(Re){var Le=++W%F,ze=Y[Le];ze&&ze.clear(),Y[Le]=Q.setBookmark(Re)}var Ce=W%F,me=Y[Ce];if(me){var we=me.find();we&&!ct(we,re)&&ye(re)}else ye(re);ye(se),B=W,K=W-F+1,K<0&&(K=0)}function $(Q,re){W+=re,W>B?W=B:W<K&&(W=K);var se=Y[(F+W)%F];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(W+=ye,se=Y[(F+W)%F],se&&(Ce=se.find())&&!ct(me,Ce))break;while(W<B&&W>K)}return se}function A(Q,re){var se=W,ye=$(Q,re);return W=se,ye&&ye.find()}var F=100,W=-1,B=0,K=0,Y=new Array(F);return{cachedCursor:void 0,add:v,find:A,move:$}},An=function(v){return v?{changes:v.changes,expectCursorActivityForChange:v.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var v=We.macroModeState;v.onRecordingDone&&v.onRecordingDone(),v.onRecordingDone=void 0,v.isRecording=!1},enterMacroRecordMode:function(v,$){var A=We.registerController.getRegister($);if(A){if(A.clear(),this.latestRegister=$,v.openDialog){var F=ei("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=v.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var We,an,pt={enterVimMode:h,leaveVimMode:p,buildKeyMap:function(){},getRegisterController:function(){return We.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return We},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Zi,map:function(v,$,A){dr.map(v,$,A)},unmap:function(v,$){return dr.unmap(v,$)},noremap:function(v,$,A){dr.map(v,$,A,!0)},mapclear:function(v){var $=xn.length,A=yo,F=xn.slice(0,$-A);if(xn=xn.slice($-A),v)for(var W=F.length-1;W>=0;W--){var B=F[W];if(v!==B.context)if(B.context)this._mapCommand(B);else{var K=["normal","insert","visual"];for(var Y in K)if(K[Y]!==v){var Q={};for(var re in B)Q[re]=B[re];Q.context=K[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:z,setOption:M,getOption:k,defineOption:E,defineEx:function(v,$,A){if(!$)$=v;else if(v.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+v+'", command not registered');$s[v]=A,dr.commandMap_[$]={name:v,shortName:$,type:"api"}},handleKey:function(v,$,A){var F=this.findKey(v,$,A);if(typeof F=="function")return F()},multiSelectHandleKey:go,findKey:function(v,$,A){function F(){var re=We.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),S(v),!0;A!="mapping"&&Bo(re,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)wn(v);else{if(!Y.insertMode)return;Hr(v)}return S(v),!0}}function B(){if(W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=_n.matchCommand(re,xn,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return S(v),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),an&&window.clearTimeout(an),an=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(v)},k("insertModeEscKeysTimeout")),se){var me=v.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new D),Ce.inserted+=$;for(var we=0;we<me.length;we++){var Re=dt(me[we].anchor,me[we].head),Le=Qt(me[we].anchor,me[we].head),ze=v.getRange(Re,v.state.overwrite?fe(Le,0,1):Le);Ce.removed[we]=(Ce.removed[we]||"")+ze}}return!se}if(Y.expectLiteralNext=!1,an&&window.clearTimeout(an),ye.command&&Ce){for(var me=v.listSelections(),we=0;we<me.length;we++){var rt=me[we].head;v.replaceRange(Ce.removed[we]||"",fe(rt,0,-Ce.inserted.length),rt,"+input")}We.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(v),ye.command}function K(){if(F()||W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return S(v),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=_n.matchCommand(Ce,xn,Y.inputState,ye);return me.type=="none"?(S(v),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(S(v),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=R(v),Q;return Y.insertMode?Q=B():Q=K(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&v.getOption("readOnly")))return v.operation(function(){v.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(v,Q.toKeys,Q):_n.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,R(v),pt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(v,$){dr.processCommand(v,$)},defineMotion:te,defineAction:le,defineOperator:ne,mapCommand:Cs,_mapCommand:Wo,defineRegister:U,exitVisualMode:wn,exitInsertMode:Hr},Ir=[],en=!1,hn,Vn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Er={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},vi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Vn)).forEach(function(v){vi[(Vn[v]||"").toLowerCase()]=vi[v.toLowerCase()]=v}),E("langmap",void 0,"string",["lmap"],function(v,$){if(v===void 0)return Fn.string;P(v)}),_.prototype.pushRepeatDigit=function(v){this.operator?this.motionRepeat=this.motionRepeat.concat(v):this.prefixRepeat=this.prefixRepeat.concat(v)},_.prototype.getRepeat=function(){var v=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(v=1,this.prefixRepeat.length>0&&(v*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(v*=parseInt(this.motionRepeat.join(""),10))),v},j.prototype={setText:function(v,$,A){this.keyBuffer=[v||""],this.linewise=!!$,this.blockwise=!!A},pushText:function(v,$){$&&(this.linewise||this.keyBuffer.push(`
|
1443
|
+
`),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(An(v))},pushSearchQuery:function(v){this.searchQueries.push(v)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(v,$,A,F,W){if(v!=="_"){F&&A.charAt(A.length-1)!==`
|
1444
|
+
`&&(A+=`
|
1445
|
+
`);var B=this.isValidRegister(v)?this.getRegister(v):null;if(!B){switch($){case"yank":this.registers[0]=new j(A,F,W);break;case"delete":case"change":A.indexOf(`
|
1446
|
+
`)==-1?this.registers["-"]=new j(A,F):(this.shiftNumericRegisters_(),this.registers[1]=new j(A,F))}this.unnamedRegister.setText(A,F,W);return}var K=l(v);K?B.pushText(A,F):B.setText(A,F,W),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(A),this.unnamedRegister.setText(B.toString(),F)}},getRegister:function(v){return this.isValidRegister(v)?(v=v.toLowerCase(),this.registers[v]||(this.registers[v]=new j),this.registers[v]):this.unnamedRegister},isValidRegister:function(v){return v&&(b(v,Vt)||jt.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,$){var A=this.historyBuffer,F=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var W=this.iterator+F;$?W>=0:W<A.length;W+=F)for(var B=A[W],K=0;K<=B.length;K++)if(this.initialPrefix==B.substring(0,K))return this.iterator=W,B;if(W>=A.length)return this.iterator=A.length,this.initialPrefix;if(W<0)return v},pushInput:function(v){var $=this.historyBuffer.indexOf(v);$>-1&&this.historyBuffer.splice($,1),v.length&&this.historyBuffer.push(v)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var _n={matchCommand:function(v,$,A,F){var W=_e(v,$,F,A);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var B,K=0;K<W.full.length;K++){var Y=W.full[K];B||(B=Y)}if(B.keys.slice(-11)=="<character>"||B.keys.slice(-10)=="<register>"){var Q=Te(v);if(!Q||Q.length>1)return{type:"clear"};A.selectedCharacter=Q}return{type:"full",command:B}},processCommand:function(v,$,A){switch($.inputState.repeatOverride=A.repeatOverride,A.type){case"motion":this.processMotion(v,$,A);break;case"operator":this.processOperator(v,$,A);break;case"operatorMotion":this.processOperatorMotion(v,$,A);break;case"action":this.processAction(v,$,A);break;case"search":this.processSearch(v,$,A);break;case"ex":case"keyToEx":this.processEx(v,$,A);break}},processMotion:function(v,$,A){$.inputState.motion=A.motion,$.inputState.motionArgs=ce(A.motionArgs),this.evalInput(v,$)},processOperator:function(v,$,A){var F=$.inputState;if(F.operator){if(F.operator==A.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(v,$);return}S(v)}F.operator=A.operator,F.operatorArgs=ce(A.operatorArgs),A.keys.length>1&&(F.operatorShortcut=A.keys),A.exitVisualBlock&&($.visualBlock=!1,Un(v)),$.visualMode&&this.evalInput(v,$)},processOperatorMotion:function(v,$,A){var F=$.visualMode,W=ce(A.operatorMotionArgs);W&&F&&W.visualLine&&($.visualLine=!0),this.processOperator(v,$,A),F||this.processMotion(v,$,A)},processAction:function(v,$,A){var F=$.inputState,W=F.getRepeat(),B=!!W,K=ce(A.actionArgs)||{};F.selectedCharacter&&(K.selectedCharacter=F.selectedCharacter),A.operator&&this.processOperator(v,$,A),A.motion&&this.processMotion(v,$,A),(A.motion||A.operator)&&this.evalInput(v,$),K.repeat=W||1,K.repeatIsExplicit=B,K.registerName=F.registerName,S(v),$.lastMotion=null,A.isEdit&&this.recordLastEdit($,F,A),$n[A.action](v,K,$)},processSearch:function(v,$,A){function F(Le,ze,rt){We.searchHistoryController.pushInput(Le),We.searchHistoryController.reset();try{sn(v,Le,ze,rt)}catch{Ot(v,"Invalid regex: "+Le),S(v);return}_n.processMotion(v,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:A.searchArgs.toJumplist}})}function W(Le){F(Le,!0,!0);var ze=We.macroModeState;ze.isRecording&&Ss(ze,Le)}function B(Le,ze,rt){var qe=z(Le),Qe,ln;qe=="<Up>"||qe=="<Down>"?(Qe=qe=="<Up>",ln=Le.target?Le.target.selectionEnd:0,ze=We.searchHistoryController.nextMatch(ze,Qe)||"",rt(ze),ln&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(ln,Le.target.value.length))):qe&&qe!="<Left>"&&qe!="<Right>"&&We.searchHistoryController.reset();var it;try{it=sn(v,ze,!0,!0)}catch{}it?v.scrollIntoView(Cr(v,!Y,it),30):(Fo(v),v.scrollTo(ye.left,ye.top))}function K(Le,ze,rt){var qe=z(Le);qe=="<Esc>"||qe=="<C-c>"||qe=="<C-[>"||qe=="<BS>"&&ze==""?(We.searchHistoryController.pushInput(ze),We.searchHistoryController.reset(),sn(v,se),Fo(v),v.scrollTo(ye.left,ye.top),Fe.e_stop(Le),S(v),rt(),v.focus()):qe=="<Up>"||qe=="<Down>"?Fe.e_stop(Le):qe=="<C-u>"&&(Fe.e_stop(Le),rt(""))}if(v.getSearchCursor){var Y=A.searchArgs.forward,Q=A.searchArgs.wholeWordOnly;bn(v).setReversed(!Y);var re=Y?"/":"?",se=bn(v).getQuery(),ye=v.getScrollInfo();switch(A.searchArgs.querySrc){case"prompt":var Ce=We.macroModeState;if(Ce.isPlaying){var Re=Ce.replaySearchQueries.shift();F(Re,!0,!1)}else xr(v,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:B,onKeyDown:K});break;case"wordUnderCursor":var me=Zn(v,{noSymbol:!0}),we=!0;if(me||(me=Zn(v,{noSymbol:!1}),we=!1),!me){Ot(v,"No word under cursor"),S(v);return}var Re=v.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Re="\\b"+Re+"\\b":Re=yn(Re),We.jumpList.cachedCursor=v.getCursor(),v.setCursor(me.start),F(Re,!0,!1)}}},processEx:function(v,$,A){function F(B){We.exCommandHistoryController.pushInput(B),We.exCommandHistoryController.reset(),dr.processCommand(v,B),v.state.vim&&S(v)}function W(B,K,Y){var Q=z(B),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&K=="")&&(We.exCommandHistoryController.pushInput(K),We.exCommandHistoryController.reset(),Fe.e_stop(B),S(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(Fe.e_stop(B),re=Q=="<Up>",se=B.target?B.target.selectionEnd:0,K=We.exCommandHistoryController.nextMatch(K,re)||"",Y(K),se&&B.target&&(B.target.selectionEnd=B.target.selectionStart=Math.min(se,B.target.value.length))):Q=="<C-u>"?(Fe.e_stop(B),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&We.exCommandHistoryController.reset()}A.type=="keyToEx"?dr.processCommand(v,A.exArgs.input):$.visualMode?xr(v,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):xr(v,{onClose:F,prefix:":",onKeyDown:W})},evalInput:function(v,$){var A=$.inputState,F=A.motion,W=A.motionArgs||{},B=A.operator,K=A.operatorArgs||{},Y=A.registerName,Q=$.sel,re=Ve($.visualMode?ue(v,Q.head):v.getCursor("head")),se=Ve($.visualMode?ue(v,Q.anchor):v.getCursor("anchor")),ye=Ve(re),Ce=Ve(se),me,we,Re;if(B&&this.recordLastEdit($,A),A.repeatOverride!==void 0?Re=A.repeatOverride:Re=A.getRepeat(),Re>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Re===0)&&(Re=1,W.repeatIsExplicit=!1),A.selectedCharacter&&(W.selectedCharacter=K.selectedCharacter=A.selectedCharacter),W.repeat=Re,S(v),F){var Le=Ur[F](v,re,W,$,A);if($.lastMotion=Ur[F],!Le)return;if(W.toJumplist){!B&&v.ace.curOp!=null&&(v.ace.curOp.command.scrollIntoView="center-animate");var ze=We.jumpList,rt=ze.cachedCursor;rt?(Ei(v,rt,Le),delete ze.cachedCursor):Ei(v,re,Le)}Le instanceof Array?(we=Le[0],me=Le[1]):me=Le,me||(me=Ve(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(v,me,ye)),we&&(we=ue(v,we)),we=we||Ce,Q.anchor=we,Q.head=me,Un(v),Jr(v,$,"<",Je(we,me)?we:me),Jr(v,$,">",Je(we,me)?me:we)):B||(v.ace.curOp&&(v.ace.curOp.vimDialogScroll="center-animate"),me=ue(v,me,ye),v.setCursor(me.line,me.ch))}if(B){if(K.lastSel){we=Ce;var qe=K.lastSel,Qe=Math.abs(qe.head.line-qe.anchor.line),ln=Math.abs(qe.head.ch-qe.anchor.ch);qe.visualLine?me=new Oe(Ce.line+Qe,Ce.ch):qe.visualBlock?me=new Oe(Ce.line+Qe,Ce.ch+ln):qe.head.line==qe.anchor.line?me=new Oe(Ce.line,Ce.ch+ln):me=new Oe(Ce.line+Qe,Ce.ch),$.visualMode=!0,$.visualLine=qe.visualLine,$.visualBlock=qe.visualBlock,Q=$.sel={anchor:we,head:me},Un(v)}else $.visualMode&&(K.lastSel={anchor:Ve(Q.anchor),head:Ve(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var it,pn,mt,Ct,Kn;if($.visualMode){it=dt(Q.head,Q.anchor),pn=Qt(Q.head,Q.anchor),mt=$.visualLine||K.linewise,Ct=$.visualBlock?"block":mt?"line":"char";var ar=x(v,it,pn);if(Kn=Tr(v,{anchor:ar.start,head:ar.end},Ct),mt){var gn=Kn.ranges;if(Ct=="block")for(var V=0;V<gn.length;V++)gn[V].head.ch=Gt(v,gn[V].head.line);else Ct=="line"&&(gn[0].head=new Oe(gn[0].head.line+1,0))}}else{if(it=Ve(we||Ce),pn=Ve(me||ye),Je(pn,it)){var X=it;it=pn,pn=X}mt=W.linewise||K.linewise,mt?ir(v,it,pn):W.forward&&Qn(v,it,pn),Ct="char";var ie=!W.inclusive||mt,ar=x(v,it,pn);Kn=Tr(v,{anchor:ar.start,head:ar.end},Ct,ie)}v.setSelections(Kn.ranges,Kn.primary),$.lastMotion=null,K.repeat=Re,K.registerName=Y,K.linewise=mt;var oe=qo[B](v,K,Kn.ranges,Ce,me);$.visualMode&&wn(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,$,A){var F=We.macroModeState;F.isPlaying||(v.lastEditInputState=$,v.lastEditActionCommand=A,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=v.visualBlock?v.sel.head.line-v.sel.anchor.line:0)}},Ur={moveToTopLine:function(v,$,A){var F=Qi(v).top+A.repeat-1;return new Oe(F,Zt(v.getLine(F)))},moveToMiddleLine:function(v){var $=Qi(v),A=Math.floor(($.top+$.bottom)*.5);return new Oe(A,Zt(v.getLine(A)))},moveToBottomLine:function(v,$,A){var F=Qi(v).bottom-A.repeat+1;return new Oe(F,Zt(v.getLine(F)))},expandToLine:function(v,$,A){var F=$;return new Oe(F.line+A.repeat-1,1/0)},findNext:function(v,$,A){var F=bn(v),W=F.getQuery();if(W){var B=!A.forward;return B=F.isReversed()?!B:B,di(v,W),Cr(v,B,W,A.repeat)}},findAndSelectNextInclusive:function(v,$,A,F,W){var B=bn(v),K=B.getQuery();if(K){var Y=!A.forward;Y=B.isReversed()?!Y:Y;var Q=pi(v,Y,K,A.repeat,F);if(Q){if(W.operator)return Q;var re=Q[0],se=new Oe(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:""}));var ye=F.sel.anchor;if(ye)return B.isReversed()?A.forward?[ye,re]:[ye,se]:A.forward?[ye,se]:[ye,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(v,$,A,F){var W=jr(v,F,A.selectedCharacter);return W?A.linewise?{line:W.line,ch:Zt(v.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(v,$,A,F){if(F.visualBlock&&A.sameLine){var W=F.sel;return[ue(v,new Oe(W.anchor.line,W.head.ch)),ue(v,new Oe(W.head.line,W.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(v,$,A,F){for(var W=$,B=0;B<A.repeat;B++){var K=W;for(var Y in F.marks)if(u(Y)){var Q=F.marks[Y].find(),re=A.forward?Je(Q,K):Je(K,Q);if(!re&&!(A.linewise&&Q.line==K.line)){var se=ct(K,W),ye=A.forward?On(K,Q,W):On(W,Q,K);(se||ye)&&(W=Q)}}}return A.linewise&&(W=new Oe(W.line,Zt(v.getLine(W.line)))),W},moveByCharacters:function(v,$,A){var F=$,W=A.repeat,B=A.forward?F.ch+W:F.ch-W;return new Oe(F.line,B)},moveByLines:function(v,$,A,F){var W=$,B=W.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:B=F.lastHPos;break;default:F.lastHPos=B}var K=A.repeat+(A.repeatOffset||0),Y=A.forward?W.line+K:W.line-K,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(v,$,A,F);if(Y>re&&W.line==re)return uo(v,$,A,F,!0);var se=v.ace.session.getFoldLine(Y);return se&&(A.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),A.toFirstChar&&(B=Zt(v.getLine(Y)),F.lastHPos=B),F.lastHSPos=v.charCoords(new Oe(Y,B),"div").left,new Oe(Y,B)},moveByDisplayLines:function(v,$,A,F){var W=$;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=v.charCoords(W,"div").left}var B=A.repeat,Q=v.findPosV(W,A.forward?B:-B,"line",F.lastHSPos);if(Q.hitSide)if(A.forward)var K=v.charCoords(Q,"div"),Y={top:K.top+8,left:F.lastHSPos},Q=v.coordsChar(Y,"div");else{var re=v.charCoords(new Oe(v.firstLine(),0),"div");re.left=F.lastHSPos,Q=v.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(v,$,A){var F=$,W=A.repeat;return v.findPosV(F,A.forward?W:-W,"page")},moveByParagraph:function(v,$,A){var F=A.forward?1:-1;return ws(v,$,A.repeat,F)},moveBySentence:function(v,$,A){var F=A.forward?1:-1;return Oi(v,$,A.repeat,F)},moveByScroll:function(v,$,A,F){var W=v.getScrollInfo(),B=null,K=A.repeat;K||(K=W.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords($,"local");if(A.repeat=K,B=Ur.moveByDisplayLines(v,$,A,F),!B)return null;var Q=v.charCoords(B,"local");return v.scrollTo(null,W.top+Q.top-Y.top),B},moveByWords:function(v,$,A){return ur(v,$,A.repeat,!!A.forward,!!A.wordEnd,!!A.bigWord)},moveTillCharacter:function(v,$,A){var F=A.repeat,W=Do(v,F,A.forward,A.selectedCharacter,$),B=A.forward?-1:1;return Li(B,A),W?(W.ch+=B,W):null},moveToCharacter:function(v,$,A){var F=A.repeat;return Li(0,A),Do(v,F,A.forward,A.selectedCharacter,$)||$},moveToSymbol:function(v,$,A){var F=A.repeat;return Ri(v,F,A.forward,A.selectedCharacter)||$},moveToColumn:function(v,$,A,F){var W=A.repeat;return F.lastHPos=W-1,F.lastHSPos=v.charCoords($,"div").left,Ya(v,W)},moveToEol:function(v,$,A,F){return uo(v,$,A,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,$){var A=$;return new Oe(A.line,Zt(v.getLine(A.line)))},moveToMatchedSymbol:function(v,$){for(var A=$,F=A.line,W=A.ch,B=v.getLine(F),K;W<B.length;W++)if(K=B.charAt(W),K&&c(K)){var Y=v.getTokenTypeAt(new Oe(F,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<B.length){var Q=/[<>]/.test(B[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=v.findMatchingBracket(new Oe(F,W+1),{bracketRegex:Q});return re.to}return A},moveToStartOfLine:function(v,$){return new Oe($.line,0)},moveToLineOrEdgeOfDocument:function(v,$,A){var F=A.forward?v.lastLine():v.firstLine();return A.repeatIsExplicit&&(F=A.repeat-v.getOption("firstLineNumber")),new Oe(F,Zt(v.getLine(F)))},moveToStartOfDisplayLine:function(v){return v.execCommand("goLineLeft"),v.getCursor()},moveToEndOfDisplayLine:function(v){v.execCommand("goLineRight");var $=v.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(v,$,A,F){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},B={"'":!0,'"':!0,"`":!0},K=A.selectedCharacter;K=="b"?K="(":K=="B"&&(K="{");var Y=!A.textObjectInner,Q,re;if(W[K]){if(re=!0,Q=Nn(v,$,K,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+K,"g"),$);se.find()&&(Q=Nn(v,se.from(),K,Y))}}else if(B[K])re=!0,Q=wr(v,$,K,Y);else if(K==="W"||K==="w")for(var ye=A.repeat||1;ye-- >0;){var Ce=Zn(v,{inclusive:Y,innerWord:!Y,bigWord:K==="W",noSymbol:K==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(K==="p")if(Q=ws(v,$,A.repeat,0,Y),A.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var me=F.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(K==="t")Q=lo(v,$,Y);else if(K==="s"){var we=v.getLine($.line);$.ch>0&&w(we[$.ch])&&($.ch-=1);var Re=ia(v,$,A.repeat,1,Y),Le=ia(v,$,A.repeat,-1,Y);d(v.getLine(Le.line)[Le.ch])&&d(v.getLine(Re.line)[Re.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Re}}return Q?v.state.vim.visualMode?un(v,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(v,$,A){var F=We.lastCharacterSearch,W=A.repeat,B=A.forward===F.forward,K=(F.increment?1:0)*(B?-1:1);v.moveH(-K,"char"),A.inclusive=!!B;var Y=Do(v,W,B,F.selectedCharacter);return Y?(Y.ch+=K,Y):(v.moveH(K,"char"),$)}},qo={change:function(v,$,A){var F,W,B=v.state.vim,K=A[0].anchor,Y=A[0].head;if(B.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(K,Y),W=v.getSelection(),v.replaceSelection(""),F=K;else{W=v.getSelection();var Q=he("",A.length);v.replaceSelections(Q),F=dt(A[0].head,A[0].anchor)}else{W=v.getRange(K,Y);var re=B.lastEditInputState||{};if(re.motion=="moveByWords"&&!d(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=fe(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}$.linewise&&(K=new Oe(K.line,Zt(v.getLine(K.line))),Y.line>K.line&&(Y=new Oe(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",K,Y),F=K}We.registerController.pushText($.registerName,"change",W,$.linewise,A.length>1),$n.enterInsertMode(v,{head:F},v.state.vim)},delete:function(v,$,A){var F,W,B=v.state.vim;if(B.visualBlock){W=v.getSelection();var K=he("",A.length);v.replaceSelections(K),F=dt(A[0].head,A[0].anchor)}else{var Y=A[0].anchor,Q=A[0].head;$.linewise&&Q.line!=v.firstLine()&&Y.line==v.lastLine()&&Y.line==Q.line-1&&(Y.line==v.firstLine()?Y.ch=0:Y=new Oe(Y.line-1,Gt(v,Y.line-1))),W=v.getRange(Y,Q),v.replaceRange("",Y,Q),F=Y,$.linewise&&(F=Ur.moveToFirstNonWhiteSpaceCharacter(v,Y))}return We.registerController.pushText($.registerName,"delete",W,$.linewise,B.visualBlock),ue(v,F)},indent:function(v,$,A){var F=v.state.vim,W=F.visualMode?$.repeat:1;if(F.visualBlock){for(var B=v.getOption("tabSize"),K=v.getOption("indentWithTabs")?" ":" ".repeat(B),Y,Q=A.length-1;Q>=0;Q--)if(Y=dt(A[Q].anchor,A[Q].head),$.indentRight)v.replaceRange(K.repeat(W),Y,Y);else{for(var re=v.getLine(Y.line),se=0,ye=0;ye<W;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<K.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}v.replaceRange("",Y,fe(Y,0,se))}return Y}if(v.indentMore)for(var ye=0;ye<W;ye++)$.indentRight?v.indentMore():v.indentLess();else{var we=A[0].anchor.line,Re=F.visualBlock?A[A.length-1].anchor.line:A[0].head.line;$.linewise&&Re--;for(var Q=we;Q<=Re;Q++)for(var ye=0;ye<W;ye++)v.indentLine(Q,$.indentRight)}return Ur.moveToFirstNonWhiteSpaceCharacter(v,A[0].anchor)},indentAuto:function(v,$,A){return v.execCommand("indentAuto"),Ur.moveToFirstNonWhiteSpaceCharacter(v,A[0].anchor)},hardWrap:function(v,$,A,F,W){if(v.hardWrap){var B=A[0].anchor.line,K=A[0].head.line;$.linewise&&K--;var Y=v.hardWrap({from:B,to:K});return Y>B&&$.linewise&&Y--,$.keepCursor?F:new Oe(Y,0)}},changeCase:function(v,$,A,F,W){for(var B=v.getSelections(),K=[],Y=$.toLower,Q=0;Q<B.length;Q++){var re=B[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=l(Ce)?Ce.toLowerCase():Ce.toUpperCase()}K.push(se)}return v.replaceSelections(K),$.shouldMoveCursor?W:!v.state.vim.visualMode&&$.linewise&&A[0].anchor.line+1==A[0].head.line?Ur.moveToFirstNonWhiteSpaceCharacter(v,F):$.linewise?F:dt(A[0].anchor,A[0].head)},yank:function(v,$,A,F){var W=v.state.vim,B=v.getSelection(),K=W.visualMode?dt(W.sel.anchor,W.sel.head,A[0].head,A[0].anchor):F;return We.registerController.pushText($.registerName,"yank",B,$.linewise,W.visualBlock),K}},$n={jumpListWalk:function(v,$,A){if(!A.visualMode){var F=$.repeat,W=$.forward,B=We.jumpList,K=B.move(v,W?F:-F),Y=K?K.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,$,A){if(!A.visualMode){var F=$.repeat||1,W=v.defaultTextHeight(),B=v.getScrollInfo().top,K=W*F,Y=$.forward?B+K:B-K,Q=Ve(v.getCursor()),re=v.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.top)):v.scrollTo(null,Y);else{var se=Y+v.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.bottom-v.getScrollInfo().clientHeight)):v.scrollTo(null,Y)}}},scrollToCursor:function(v,$){var A=v.getCursor().line,F=v.charCoords(new Oe(A,0),"local"),W=v.getScrollInfo().clientHeight,B=F.top;switch($.position){case"center":B=F.bottom-W/2;break;case"bottom":var K=new Oe(A,v.getLine(A).length-1),Y=v.charCoords(K,"local"),Q=Y.bottom-B;B=B-W+Q}v.scrollTo(null,B)},replayMacro:function(v,$,A){var F=$.selectedCharacter,W=$.repeat,B=We.macroModeState;for(F=="@"?F=B.latestRegister:B.latestRegister=F;W--;)ks(v,A,B,F)},enterMacroRecordMode:function(v,$){var A=We.macroModeState,F=$.selectedCharacter;We.registerController.isValidRegister(F)&&A.enterMacroRecordMode(v,F)},toggleOverwrite:function(v){v.state.overwrite?(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Fe.signal(v,"vim-mode-change",{mode:"insert"})):(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Fe.signal(v,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(v,$,A){if(!v.getOption("readOnly")){A.insertMode=!0,A.insertModeRepeat=$&&$.repeat||1;var F=$?$.insertAt:null,W=A.sel,B=$.head||v.getCursor("head"),K=v.listSelections().length;if(F=="eol")B=new Oe(B.line,Gt(v,B.line));else if(F=="bol")B=new Oe(B.line,0);else if(F=="charAfter"){var Y=x(v,B,fe(B,0,1));B=Y.end}else if(F=="firstNonBlank"){var Y=x(v,B,Ur.moveToFirstNonWhiteSpaceCharacter(v,B));B=Y.end}else if(F=="startOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(B=new Oe(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),K=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?B=W.head:B=new Oe(W.anchor.line,0)}else if(F=="endOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(B=new Oe(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),K=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?B=fe(W.head,0,1):B=new Oe(W.anchor.line,0)}else if(F=="inplace"){if(A.visualMode)return}else F=="lastEdit"&&(B=ho(v)||B);v.setOption("disableInput",!1),$&&$.replace?(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Fe.signal(v,"vim-mode-change",{mode:"replace"})):(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Fe.signal(v,"vim-mode-change",{mode:"insert"})),We.macroModeState.isPlaying||(v.on("change",po),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=v.setBookmark(B,{insertLeft:!0}),Fe.on(v.getInputField(),"keydown",As)),A.visualMode&&wn(v),Mr(v,B,K)}},toggleVisualMode:function(v,$,A){var F=$.repeat,W=v.getCursor(),B;if(A.visualMode)A.visualLine^$.linewise||A.visualBlock^$.blockwise?(A.visualLine=!!$.linewise,A.visualBlock=!!$.blockwise,Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),Un(v)):wn(v);else{A.visualMode=!0,A.visualLine=!!$.linewise,A.visualBlock=!!$.blockwise,B=ue(v,new Oe(W.line,W.ch+F-1));var K=x(v,W,B);A.sel={anchor:K.start,head:K.end},Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),Un(v),Jr(v,A,"<",dt(W,B)),Jr(v,A,">",Qt(W,B))}},reselectLastSelection:function(v,$,A){var F=A.lastSelection;if(A.visualMode&&zt(v,A),F){var W=F.anchorMark.find(),B=F.headMark.find();if(!W||!B)return;A.sel={anchor:W,head:B},A.visualMode=!0,A.visualLine=F.visualLine,A.visualBlock=F.visualBlock,Un(v),Jr(v,A,"<",dt(W,B)),Jr(v,A,">",Qt(W,B)),Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""})}},joinLines:function(v,$,A){var F,W;if(A.visualMode){if(F=v.getCursor("anchor"),W=v.getCursor("head"),Je(W,F)){var B=W;W=F,F=B}W.ch=Gt(v,W.line)-1}else{var K=Math.max($.repeat,2);F=v.getCursor(),W=ue(v,new Oe(F.line+K-1,1/0))}for(var Y=0,Q=F.line;Q<W.line;Q++){Y=Gt(v,F.line);var re="",se=0;if(!$.keepSpaces){var ye=v.getLine(F.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}v.replaceRange(re,new Oe(F.line,Y),new Oe(F.line+1,se))}var Ce=ue(v,new Oe(F.line,Y));A.visualMode&&wn(v,!1),v.setCursor(Ce)},newLineAndEnterInsertMode:function(v,$,A){A.insertMode=!0;var F=Ve(v.getCursor());if(F.line===v.firstLine()&&!$.after)v.replaceRange(`
|
1447
|
+
`,new Oe(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{F.line=$.after?F.line:F.line-1,F.ch=Gt(v,F.line),v.setCursor(F);var W=Fe.commands.newlineAndIndentContinueComment||Fe.commands.newlineAndIndent;W(v)}this.enterInsertMode(v,{repeat:$.repeat},A)},paste:function(v,$,A){var F=this,W=We.registerController.getRegister($.registerName),B=function(){var K=W.toString();F.continuePaste(v,$,A,K,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(K){F.continuePaste(v,$,A,K,W)},function(){B()}):B()},continuePaste:function(v,$,A,F,W){var B=Ve(v.getCursor());if(F){if($.matchIndent){var K=v.getOption("tabSize"),Y=function(gn){var V=gn.split(" ").length-1,X=gn.split(" ").length-1;return V*K+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=F.replace(/\n$/,""),ye=F!==se,Ce=Y(F.match(/^\s*/)[0]),F=se.replace(/^\s*/gm,function(gn){var V=re+(Y(gn)-Ce);if(V<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(V/K);return Array(X+1).join(" ")}return Array(V+1).join(" ")});F+=ye?`
|
1448
|
+
`:""}if($.repeat>1)var F=Array($.repeat+1).join(F);var me=W.linewise,we=W.blockwise;if(we){F=F.split(`
|
1449
|
+
`),me&&F.pop();for(var Re=0;Re<F.length;Re++)F[Re]=F[Re]==""?" ":F[Re];B.ch+=$.after?1:0,B.ch=Math.min(Gt(v,B.line),B.ch)}else me?A.visualMode?F=A.visualLine?F.slice(0,-1):`
|
1450
|
+
`+F.slice(0,F.length-1)+`
|
1451
|
+
`:$.after?(F=`
|
1452
|
+
`+F.slice(0,F.length-1),B.ch=Gt(v,B.line)):B.ch=0:B.ch+=$.after?1:0;var Le;if(A.visualMode){A.lastPastedText=F;var ze,rt=He(v,A),qe=rt[0],Qe=rt[1],ln=v.getSelection(),it=v.listSelections(),pn=new Array(it.length).join("1").split("1");A.lastSelection&&(ze=A.lastSelection.headMark.find()),We.registerController.unnamedRegister.setText(ln),we?(v.replaceSelections(pn),Qe=new Oe(qe.line+F.length-1,qe.ch),v.setCursor(qe),rr(v,Qe),v.replaceSelections(F),Le=qe):A.visualBlock?(v.replaceSelections(pn),v.setCursor(qe),v.replaceRange(F,qe,qe),Le=qe):(v.replaceRange(F,qe,Qe),Le=v.posFromIndex(v.indexFromPos(qe)+F.length-1)),ze&&(A.lastSelection.headMark=v.setBookmark(ze)),me&&(Le.ch=0)}else if(we){v.setCursor(B);for(var Re=0;Re<F.length;Re++){var mt=B.line+Re;mt>v.lastLine()&&v.replaceRange(`
|
1453
|
+
`,new Oe(mt,0));var Ct=Gt(v,mt);Ct<B.ch&&Hn(v,mt,B.ch)}v.setCursor(B),rr(v,new Oe(B.line+F.length-1,B.ch)),v.replaceSelections(F),Le=B}else if(v.replaceRange(F,B),me){var mt=$.after?B.line+1:B.line;Le=new Oe(mt,Zt(v.getLine(mt)))}else Le=Ve(B),/\n/.test(F)||(Le.ch+=F.length-($.after?1:0));A.visualMode&&wn(v,!1),v.setCursor(Le)}},undo:function(v,$){v.operation(function(){Ge(v,Fe.commands.undo,$.repeat)(),v.setCursor(ue(v,v.getCursor("start")))})},redo:function(v,$){Ge(v,Fe.commands.redo,$.repeat)()},setRegister:function(v,$,A){A.inputState.registerName=$.selectedCharacter},insertRegister:function(v,$,A){var F=$.selectedCharacter,W=We.registerController.getRegister(F),B=W&&W.toString();B&&v.replaceSelection(B)},oneNormalCommand:function(v,$,A){Hr(v,!0),A.insertModeReturn=!0,Fe.on(v,"vim-command-done",function F(){A.visualMode||(A.insertModeReturn&&(A.insertModeReturn=!1,A.insertMode||$n.enterInsertMode(v,{},A)),Fe.off(v,"vim-command-done",F))})},setMark:function(v,$,A){var F=$.selectedCharacter;Jr(v,A,F,v.getCursor())},replace:function(v,$,A){var F=$.selectedCharacter,W=v.getCursor(),B,K,Y=v.listSelections();if(A.visualMode)W=v.getCursor("start"),K=v.getCursor("end");else{var Q=v.getLine(W.line);B=W.ch+$.repeat,B>Q.length&&(B=Q.length),K=new Oe(W.line,B)}var re=x(v,W,K);if(W=re.start,K=re.end,F==`
|
1454
|
+
`)A.visualMode||v.replaceRange("",W,K),(Fe.commands.newlineAndIndentContinueComment||Fe.commands.newlineAndIndent)(v);else{var se=v.getRange(W,K);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),se=se.replace(/[^\n]/g,F),A.visualBlock){var ye=new Array(v.getOption("tabSize")+1).join(" ");se=v.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),se=se.replace(/\t/g,ye).replace(/[^\n]/g,F).split(`
|
1455
|
+
`),v.replaceSelections(se)}else v.replaceRange(se,W,K);A.visualMode?(W=Je(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(W),wn(v,!1)):v.setCursor(fe(K,0,-1))}},incrementNumberToken:function(v,$){for(var A=v.getCursor(),F=v.getLine(A.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,B,K,Y,Q;(B=W.exec(F))!==null&&(K=B.index,Y=K+B[0].length,!(A.ch<Y)););if(!(!$.backtrack&&Y<=A.ch)&&B){var re=B[2]||B[4],se=B[3]||B[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(B[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var we=re?new Array(se.length-Q.length+1+B[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Re=new Oe(A.line,K),Le=new Oe(A.line,Y);v.replaceRange(Q,Re,Le),v.setCursor(new Oe(A.line,K+Q.length-1))}},repeatLastEdit:function(v,$,A){var F=A.lastEditInputState;if(F){var W=$.repeat;W&&$.repeatIsExplicit?A.lastEditInputState.repeatOverride=W:W=A.lastEditInputState.repeatOverride||W,aa(v,A,W,!1)}},indent:function(v,$){v.indentLine(v.getCursor().line,$.indentRight)},exitInsertMode:Hr},ni={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ri={bracket:{isComplete:function(v){if(v.nextCh===v.symb){if(v.depth++,v.depth>=1)return!0}else v.nextCh===v.reverseSymb&&v.depth--;return!1}},section:{init:function(v){v.curMoveThrough=!0,v.symb=(v.forward?"]":"[")===v.symb?"{":"}"},isComplete:function(v){return v.index===0&&v.nextCh===v.symb}},comment:{isComplete:function(v){var $=v.lastCh==="*"&&v.nextCh==="/";return v.lastCh=v.nextCh,$}},method:{init:function(v){v.symb=v.symb==="m"?"{":"}",v.reverseSymb=v.symb==="{"?"}":"{"},isComplete:function(v){return v.nextCh===v.symb}},preprocess:{init:function(v){v.index=0},isComplete:function(v){if(v.nextCh==="#"){var $=v.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(v.forward&&v.depth===0)return!0;v.depth++}else if($==="if"){if(!v.forward&&v.depth===0)return!0;v.depth--}if($==="else"&&v.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Ni.prototype={getQuery:function(){return We.query},setQuery:function(v){We.query=v},getOverlay:function(){return this.searchOverlay},setOverlay:function(v){this.searchOverlay=v},isReversed:function(){return We.isReversed},setReversed:function(v){We.isReversed=v},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(v){this.annotate=v}};var yi={"\\n":`
|
1456
|
+
`,"\\r":"\r","\\t":" "},or={"\\/":"/","\\\\":"\\","\\n":`
|
1457
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},sr=0,hr=function(){this.buildCommandMap_()};hr.prototype={processCommand:function(v,$,A){var F=this;v.operation(function(){v.curOp.isVimOp=!0,F._processCommand(v,$,A)})},_processCommand:function(v,$,A){var F=v.state.vim,W=We.registerController.getRegister(":"),B=W.toString(),K=new Fe.StringStream($);W.setText($);var Y=A||{};Y.input=$;try{this.parseInput_(v,K,Y)}catch(se){throw Ot(v,se.toString()),se}F.visualMode&&wn(v);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&W.setText(B),this.parseCommandArgs_(K,Y,Q),Q.type=="exToKey"){I(v,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(v,Q.toInput);return}}if(!re){Ot(v,'Not an editor command ":'+$+'"');return}try{$s[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Ot(v,se.toString()),se}},parseInput_:function(v,$,A){if($.eatWhile(":"),$.eat("%")?(A.line=v.firstLine(),A.lineEnd=v.lastLine()):(A.line=this.parseLineSpec_(v,$),A.line!==void 0&&$.eat(",")&&(A.lineEnd=this.parseLineSpec_(v,$))),A.line==null)if(v.state.vim.visualMode){var F=jr(v,v.state.vim,"<");A.selectionLine=F&&F.line,F=jr(v,v.state.vim,">"),A.selectionLineEnd=F&&F.line}else A.selectionLine=v.getCursor().line;else A.selectionLine=A.line,A.selectionLineEnd=A.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?A.commandName=W[1]:A.commandName=$.match(/.*/)[0],A},parseLineSpec_:function(v,$){var A=$.match(/^(\d+)/);if(A)return parseInt(A[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,v.getCursor().line);case"$":return this.parseLineSpecOffset_($,v.lastLine());case"'":var F=$.next(),W=jr(v,v.state.vim,F);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_($,W.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,v.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(v,$){var A=v.match(/^([+-])?(\d+)/);if(A){var F=parseInt(A[2],10);A[1]=="-"?$-=F:$+=F}return $},parseCommandArgs_:function(v,$,A){if(!v.eol()){$.argString=v.match(/.*/)[0];var F=A.argDelimiter||/\s+/,W=Zr($.argString).split(F);W.length&&W[0]&&($.args=W)}},matchCommand_:function(v){for(var $=v.length;$>0;$--){var A=v.substring(0,$);if(this.commandMap_[A]){var F=this.commandMap_[A];if(F.name.indexOf(v)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<ti.length;v++){var $=ti[v],A=$.shortName||$.name;this.commandMap_[A]=$}},map:function(v,$,A,F){if(v!=":"&&v.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var W=v.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:$,user:!0}}else{var B={keys:v,type:"keyToKey",toKeys:$,noremap:!!F};A&&(B.context=A),xn.unshift(B)}},unmap:function(v,$){if(v!=":"&&v.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var A=v.substring(1);if(this.commandMap_[A]&&this.commandMap_[A].user)return delete this.commandMap_[A],!0}else for(var F=v,W=0;W<xn.length;W++)if(F==xn[W].keys&&xn[W].context===$)return xn.splice(W,1),!0}};var $s={colorscheme:function(v,$){if(!$.args||$.args.length<1){Ot(v,v.getOption("theme"));return}v.setOption("theme",$.args[0])},map:function(v,$,A,F){var W=$.args;if(!W||W.length<2){v&&Ot(v,"Invalid mapping: "+$.input);return}dr.map(W[0],W[1],A,F)},imap:function(v,$){this.map(v,$,"insert")},nmap:function(v,$){this.map(v,$,"normal")},vmap:function(v,$){this.map(v,$,"visual")},omap:function(v,$){this.map(v,$,"operatorPending")},noremap:function(v,$){this.map(v,$,void 0,!0)},inoremap:function(v,$){this.map(v,$,"insert",!0)},nnoremap:function(v,$){this.map(v,$,"normal",!0)},vnoremap:function(v,$){this.map(v,$,"visual",!0)},onoremap:function(v,$){this.map(v,$,"operatorPending",!0)},unmap:function(v,$,A){var F=$.args;(!F||F.length<1||!dr.unmap(F[0],A))&&v&&Ot(v,"No such mapping: "+$.input)},mapclear:function(v,$){pt.mapclear()},imapclear:function(v,$){pt.mapclear("insert")},nmapclear:function(v,$){pt.mapclear("normal")},vmapclear:function(v,$){pt.mapclear("visual")},omapclear:function(v,$){pt.mapclear("operatorPending")},move:function(v,$){_n.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(v,$){var A=$.args,F=$.setCfg||{};if(!A||A.length<1){v&&Ot(v,"Invalid mapping: "+$.input);return}var W=A[0].split("="),B=W[0],K=W[1],Y=!1,Q=!1;if(B.charAt(B.length-1)=="?"){if(K)throw Error("Trailing characters: "+$.argString);B=B.substring(0,B.length-1),Y=!0}else B.charAt(B.length-1)=="!"&&(B=B.substring(0,B.length-1),Q=!0);K===void 0&&B.substring(0,2)=="no"&&(B=B.substring(2),K=!1);var re=Nt[B]&&Nt[B].type=="boolean";if(re&&(Q?K=!k(B,v,F):K==null&&(K=!0)),!re&&K===void 0||Y){var se=k(B,v,F);se instanceof Error?Ot(v,se.message):se===!0||se===!1?Ot(v," "+(se?"":"no")+B):Ot(v," "+B+"="+se)}else{var ye=M(B,K,v,F);ye instanceof Error&&Ot(v,ye.message)}},setlocal:function(v,$){$.setCfg={scope:"local"},this.set(v,$)},setglobal:function(v,$){$.setCfg={scope:"global"},this.set(v,$)},registers:function(v,$){var A=$.args,F=We.registerController.registers,W=`----------Registers----------
|
1458
|
+
|
1459
|
+
`;if(A){var B;A=A.join("");for(var K=0;K<A.length;K++)if(B=A.charAt(K),!!We.registerController.isValidRegister(B)){var Y=F[B]||new j;W+='"'+B+" "+Y.toString()+`
|
1460
|
+
`}}else for(var B in F){var Q=F[B].toString();Q.length&&(W+='"'+B+" "+Q+`
|
1461
|
+
`)}Ot(v,W)},sort:function(v,$){function A(){if($.argString){var mt=new Fe.StringStream($.argString);if(mt.eat("!")&&(B=!0),mt.eol())return;if(!mt.eatSpace())return"Invalid arguments";var Ct=mt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ct&&!mt.eol())return"Invalid arguments";if(Ct[1]){K=Ct[1].indexOf("i")!=-1,Y=Ct[1].indexOf("u")!=-1;var Kn=Ct[1].indexOf("d")!=-1||Ct[1].indexOf("n")!=-1&&1,ar=Ct[1].indexOf("x")!=-1&&1,gn=Ct[1].indexOf("o")!=-1&&1;if(Kn+ar+gn>1)return"Invalid arguments";Q=Kn&&"decimal"||ar&&"hex"||gn&&"octal"}Ct[2]&&(re=new RegExp(Ct[2].substr(1,Ct[2].length-2),K?"i":""))}}function F(mt,Ct){if(B){var Kn;Kn=mt,mt=Ct,Ct=Kn}K&&(mt=mt.toLowerCase(),Ct=Ct.toLowerCase());var ar=Q&&Le.exec(mt),gn=Q&&Le.exec(Ct);return ar?(ar=parseInt((ar[1]+ar[2]).toLowerCase(),ze),gn=parseInt((gn[1]+gn[2]).toLowerCase(),ze),ar-gn):mt<Ct?-1:1}function W(mt,Ct){if(B){var Kn;Kn=mt,mt=Ct,Ct=Kn}return K&&(mt[0]=mt[0].toLowerCase(),Ct[0]=Ct[0].toLowerCase()),mt[0]<Ct[0]?-1:1}var B,K,Y,Q,re,se=A();if(se){Ot(v,se+": "+$.argString);return}var ye=$.line||v.firstLine(),Ce=$.lineEnd||$.line||v.lastLine();if(ye!=Ce){var me=new Oe(ye,0),we=new Oe(Ce,Gt(v,Ce)),Re=v.getRange(me,we).split(`
|
1462
|
+
`),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),ze=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,rt=[],qe=[];if(Q||re)for(var Qe=0;Qe<Re.length;Qe++){var ln=re?Re[Qe].match(re):null;ln&&ln[0]!=""?rt.push(ln):!re&&Le.exec(Re[Qe])?rt.push(Re[Qe]):qe.push(Re[Qe])}else qe=Re;if(rt.sort(re?W:F),re)for(var Qe=0;Qe<rt.length;Qe++)rt[Qe]=rt[Qe].input;else Q||qe.sort(F);if(Re=B?rt.concat(qe):qe.concat(rt),Y){var it=Re,pn;Re=[];for(var Qe=0;Qe<it.length;Qe++)it[Qe]!=pn&&Re.push(it[Qe]),pn=it[Qe]}v.replaceRange(Re.join(`
|
1463
|
+
`),me,we)}},vglobal:function(v,$){this.global(v,$)},normal:function(v,$){var A=$.argString;if(A&&A[0]=="!"&&(A=A.slice(1),en=!0),A=A.trimStart(),!A){Ot(v,"Argument is required.");return}var F=$.line;if(typeof F=="number")for(var W=isNaN($.lineEnd)?F:$.lineEnd,B=F;B<=W;B++)v.setCursor(B,0),I(v,$.argString.trimStart()),v.state.vim.insertMode&&Hr(v,!0);else I(v,$.argString.trimStart()),v.state.vim.insertMode&&Hr(v,!0)},global:function(v,$){var A=$.argString;if(!A){Ot(v,"Regular Expression missing from global");return}var F=$.commandName[0]==="v";A[0]==="!"&&$.commandName[0]==="g"&&(F=!0,A=A.slice(1));var W=$.line!==void 0?$.line:v.firstLine(),B=$.lineEnd||$.line||v.lastLine(),K=br(A),Y=A,Q;if(K.length&&(Y=K[0],Q=K.slice(1,K.length).join("/")),Y)try{sn(v,Y,!0,!0)}catch{Ot(v,"Invalid regex: "+Y);return}for(var re=bn(v).getQuery(),se=[],ye=W;ye<=B;ye++){var Ce=v.getLine(ye),me=re.test(Ce);me!==F&&se.push(Q?v.getLineHandle(ye):Ce)}if(!Q){Ot(v,se.join(`
|
1464
|
+
`));return}var we=0,Re=function(){if(we<se.length){var Le=se[we++],ze=v.getLineNumber(Le);if(ze==null){Re();return}var rt=ze+1+Q;dr.processCommand(v,rt,{callback:Re})}else v.releaseLineHandles&&v.releaseLineHandles()};Re()},substitute:function(v,$){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var A=$.argString,F=A?Di(A,A[0]):[],W,B="",K,Y,Q,re=!1,se=!1;if(F.length)W=F[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),B=F[1],B!==void 0&&(k("pcre")?B=Za(B.replace(/([^\\])&/g,"$1$$&")):B=Qa(B),We.lastSubstituteReplacePart=B),K=F[2]?F[2].split(" "):[];else if(A&&A.length){Ot(v,"Substitutions should be of the form :s/pattern/replace/");return}if(K&&(Y=K[0],Q=parseInt(K[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{sn(v,W,!0,!0)}catch{Ot(v,"Invalid regex: "+W);return}if(B=B||We.lastSubstituteReplacePart,B===void 0){Ot(v,"No previous substitute regular expression");return}var ye=bn(v),Ce=ye.getQuery(),me=$.line!==void 0?$.line:v.getCursor().line,we=$.lineEnd||me;me==v.firstLine()&&we==v.lastLine()&&(we=1/0),Q&&(me=we,we=me+Q-1);var Re=ue(v,new Oe(me,0)),Le=v.getSearchCursor(Ce,Re);Po(v,re,se,me,we,Le,Ce,B,$.callback)},startinsert:function(v,$){I(v,$.argString=="!"?"A":"i",{})},redo:Fe.commands.redo,undo:Fe.commands.undo,write:function(v){Fe.commands.save?Fe.commands.save(v):v.save&&v.save()},nohlsearch:function(v){Fo(v)},yank:function(v){var $=Ve(v.getCursor()),A=$.line,F=v.getLine(A);We.registerController.pushText("0","yank",F,!0,!0)},delete:function(v,$){var A=$.selectionLine,F=isNaN($.selectionLineEnd)?A:$.selectionLineEnd;qo.delete(v,{linewise:!0},[{anchor:new Oe(A,0),head:new Oe(F+1,0)}])},join:function(v,$){var A=$.selectionLine,F=isNaN($.selectionLineEnd)?A:$.selectionLineEnd;v.setCursor(new Oe(A,0)),$n.joinLines(v,{repeat:F-A},v.state.vim)},delmarks:function(v,$){if(!$.argString||!Zr($.argString)){Ot(v,"Argument required");return}for(var A=v.state.vim,F=new Fe.StringStream(Zr($.argString));!F.eol();){F.eatSpace();var W=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Ot(v,"Invalid argument: "+$.argString.substring(W));return}var B=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Ot(v,"Invalid argument: "+$.argString.substring(W));return}var K=B,Y=F.next();if(!(u(K)&&u(Y)||l(K)&&l(Y))){Ot(v,"Invalid argument: "+K+"-");return}var Q=K.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Ot(v,"Invalid argument: "+$.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete A.marks[ye]}}else delete A.marks[B]}}},dr=new hr;E("insertModeEscKeysTimeout",200,"number"),Fe.Vim=pt;var kr={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"},ii=pt.handleKey.bind(pt);pt.handleKey=function(v,$,A){return v.operation(function(){return ii(v,$,A)},!0)},O(),r.CodeMirror=Fe;var oi=pt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,$,A,F,W){var B=this.state.vim||{},K=A.characterWidth,Y=A.lineHeight,Q=$.top,re=$.left;if(!B.insertMode){var se=F.cursor?er.comparePoints(F.cursor,F.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>K&&(re-=K)}!B.insertMode&&B.status&&(Y/=2,Q+=Y),Pi.translate(v,re,Q),Pi.setStyle(v.style,"width",K+"px"),Pi.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var $=v.state.cm,A=oi($);if(!A.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,$,A,F,W){var B=v.editor,K=B.state.cm,Y=oi(K);if(F!=-1){if(Y.insertMode||($==-1?(A.charCodeAt(0)>255&&v.inputKey&&(A=v.inputKey,A&&v.inputHash==4&&(A=A.toUpperCase())),v.inputChar=A):$==4||$==0?v.inputKey==A&&v.inputHash==$&&v.inputChar?(A=v.inputChar,$=-1):(v.inputChar=null,v.inputKey=A,v.inputHash=$):v.inputChar=v.inputKey=null),K.state.overwrite&&Y.insertMode&&A=="backspace"&&$==0)return{command:"gotoleft"};if(A=="c"&&$==1&&!mo.isMac&&B.getCopyText())return B.once("copy",function(){Y.insertMode?B.selection.clearSelection():K.operation(function(){wn(K)})}),{command:"null",passEvent:!0};if(A=="esc"&&!Y.insertMode&&!Y.visualMode&&!K.ace.inMultiSelectMode){var Q=bn(K),re=Q.getOverlay();re&&K.removeOverlay(re)}if($==-1||$&1||$===0&&A.length>1){var se=Y.insertMode,ye=_s($,A,W||{},Y);Y.status==null&&(Y.status="");var Ce=go(K,ye,"user");return Y=oi(K),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),K._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(v){function $(){var F=oi(A).insertMode;A.ace.renderer.setStyle("normal-mode",!F),v.textInput.setCommandMode(!F),v.renderer.$keepTextAreaAtCursor=F,v.renderer.$blockCursor=!F}v.state||(v.state={});var A=new Fe(v);v.state.cm=A,v.$vimModeHandler=this,h(A),oi(A).status=null,A.on("vim-command-done",function(){A.virtualSelectionMode()||(oi(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()||($(),A._signal("changeStatus"))}),$(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(A)},detach:function(v){var $=v.state.cm;p($),$.destroy(),v.state.cm=null,v.$vimModeHandler=null,v.renderer.$cursorLayer.drawCursor=null,v.renderer.setStyle("normal-mode",!1),v.textInput.setCommandMode(!1),v.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(v){var $=v.state.cm,A=oi($);if(A.insertMode)return"INSERT";var F="";return A.visualMode&&(F+="VISUAL",A.visualLine&&(F+=" LINE"),A.visualBlock&&(F+=" BLOCK")),A.status&&(F+=(F?" ":"")+A.status),F}},pt.defineOption({name:"wrap",set:function(v,$){$&&$.ace.setOption("wrap",v)},type:"boolean"},!1),pt.defineEx("write","w",function(){console.log(":write is not implemented")}),xn.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"}}),xn.push({keys:"gq",type:"operator",operator:"hardWrap"}),pt.defineOperator("hardWrap",function(v,$,A,F,W){var B=A[0].anchor.line,K=A[0].head.line;return $.linewise&&K--,eo(v.ace,{startRow:B,endRow:K}),Oe(K,0)}),E("textwidth",void 0,"number",["tw"],function(v,$){if($!==void 0){if(v===void 0){var A=$.ace.getOption("printMarginColumn");return A}var F=Math.round(v);F>1&&$.ace.setOption("printMarginColumn",F)}}),$n.aceCommand=function(v,$,A){v.vimCmd=$,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",gi):gi(null,v.ace)},$n.fold=function(v,$,A){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},yo=xn.length,r.handler.defaultKeymap=xn,r.handler.actions=$n,r.Vim=pt}),(function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})})()})(nf)),nf.exports}BC();var of={},sf;function zC(){return sf||(sf=1,(function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(x){return m(y(x),arguments)}function r(x,h){return e.apply(null,[x].concat(h||[]))}function m(x,h){var p=1,s=x.length,a,u="",c,o,l,d,w,b,E,M;for(c=0;c<s;c++)if(typeof x[c]=="string")u+=x[c];else if(typeof x[c]=="object"){if(l=x[c],l.keys)for(a=h[p],o=0;o<l.keys.length;o++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[o],l.keys[o-1]));a=a[l.keys[o]]}else l.param_no?a=h[l.param_no]:a=h[p++];if(t.not_type.test(l.type)&&t.not_primitive.test(l.type)&&a instanceof Function&&(a=a()),t.numeric_arg.test(l.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(t.number.test(l.type)&&(E=a>=0),l.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,l.width?parseInt(l.width):0);break;case"e":a=l.precision?parseFloat(a).toExponential(l.precision):parseFloat(a).toExponential();break;case"f":a=l.precision?parseFloat(a).toFixed(l.precision):parseFloat(a);break;case"g":a=l.precision?String(Number(a.toPrecision(l.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=l.precision?a.substring(0,l.precision):a;break;case"t":a=String(!!a),a=l.precision?a.substring(0,l.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=l.precision?a.substring(0,l.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=l.precision?a.substring(0,l.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}t.json.test(l.type)?u+=a:(t.number.test(l.type)&&(!E||l.sign)?(M=E?"+":"-",a=a.toString().replace(t.sign,"")):M="",w=l.pad_char?l.pad_char==="0"?"0":l.pad_char.charAt(1):" ",b=l.width-(M+a).length,d=l.width&&b>0?w.repeat(b):"",u+=l.align?M+a+d:w==="0"?M+d+a:d+M+a)}return u}var g=Object.create(null);function y(x){if(g[x])return g[x];for(var h=x,p,s=[],a=0;h;){if((p=t.text.exec(h))!==null)s.push(p[0]);else if((p=t.modulo.exec(h))!==null)s.push("%");else if((p=t.placeholder.exec(h))!==null){if(p[2]){a|=1;var u=[],c=p[2],o=[];if((o=t.key.exec(c))!==null)for(u.push(o[1]);(c=c.substring(o[0].length))!=="";)if((o=t.key_access.exec(c))!==null)u.push(o[1]);else if((o=t.index_access.exec(c))!==null)u.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");p[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.push({placeholder:p[0],param_no:p[1],keys:p[2],sign:p[3],pad_char:p[4],align:p[5],width:p[6],precision:p[7],type:p[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");h=h.substring(p[0].length)}return g[x]=s}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(of)),of}zC();var Dl={exports:{}};/**
|
1465
|
+
* @license
|
1466
|
+
* Lodash <https://lodash.com/>
|
1467
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1468
|
+
* Released under MIT license <https://lodash.com/license>
|
1469
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1470
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1471
|
+
*/var jC=Dl.exports,af;function HC(){return af||(af=1,(function(n,t){(function(){var e,r="4.17.21",m=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",x="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,s="__lodash_placeholder__",a=1,u=2,c=4,o=1,l=2,d=1,w=2,b=4,E=8,M=16,k=32,C=64,R=128,O=256,L=512,I=30,z="...",P=800,N=16,_=1,S=2,D=3,j=1/0,U=9007199254740991,G=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,le=[["ary",R],["bind",d],["bindKey",w],["curry",E],["curryRight",M],["flip",L],["partial",k],["partialRight",C],["rearg",O]],ue="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",_e="[object Boolean]",$e="[object Date]",Te="[object DOMException]",Ge="[object Error]",Ve="[object Function]",ct="[object GeneratorFunction]",Je="[object Map]",dt="[object Number]",Qt="[object Null]",On="[object Object]",Gt="[object Promise]",Zr="[object Proxy]",yn="[object RegExp]",Hn="[object Set]",rr="[object String]",Mr="[object Symbol]",ft="[object Undefined]",He="[object WeakMap]",zt="[object WeakSet]",un="[object ArrayBuffer]",Un="[object DataView]",Tr="[object Float32Array]",yr="[object Float64Array]",wn="[object Int8Array]",Qn="[object Int16Array]",ir="[object Int32Array]",Zt="[object Uint8Array]",Zn="[object Uint8ClampedArray]",lo="[object Uint16Array]",Ei="[object Uint32Array]",Li=/\b__p \+= '';/g,Ri=/\b(__p \+=) '' \+/g,co=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ur=/&(?:amp|lt|gt|quot|#39);/g,uo=/[&<>"']/g,Do=RegExp(ur.source),Ya=RegExp(uo.source),Jr=/<%-([\s\S]+?)%>/g,Xa=/<%([\s\S]+?)%>/g,ws=/<%=([\s\S]+?)%>/g,ia=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oi=/^\w*$/,Nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wr=/[\\^$.*+?()[\]{}|]/g,Ni=RegExp(wr.source),bn=/^\s+/,br=/\s/,Xi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,bs=/,? & /,oa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qa=/[()=,{}\[\]\/\s]/,Za=/\\(\\)?/g,Fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ei=/\w*$/,Ot=/^[-+]0x[0-9a-f]+$/i,sa=/^0b[01]+$/i,xr=/^\[object .+?Constructor\]$/,Dn=/^0o[0-7]+$/i,sn=/^(?:0|[1-9]\d*)$/,Sn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,di=/($^)/,Cr=/['\n\r\u2028\u2029\\]/g,pi="\\ud800-\\udfff",Fo="\\u0300-\\u036f",xs="\\ufe20-\\ufe2f",Qi="\\u20d0-\\u20ff",jr=Fo+xs+Qi,ho="\\u2700-\\u27bf",Po="a-z\\xdf-\\xf6\\xf8-\\xff",Hr="\\xac\\xb1\\xd7\\xf7",Wo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cs="\\u2000-\\u206f",ks=" \\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",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",Jn="\\ufe0e\\ufe0f",Ss=Hr+Wo+Cs+ks,po="['’]",zo="["+pi+"]",jo="["+Ss+"]",Zi="["+jr+"]",As="\\d+",aa="["+ho+"]",Ho="["+Po+"]",Uo="[^"+pi+Ss+As+ho+Po+Bo+"]",_s="\\ud83c[\\udffb-\\udfff]",Vo="(?:"+Zi+"|"+_s+")",go="[^"+pi+"]",gi="(?:\\ud83c[\\udde6-\\uddff]){2}",er="[\\ud800-\\udbff][\\udc00-\\udfff]",Ji="["+Bo+"]",Pi="\\u200d",la="(?:"+Ho+"|"+Uo+")",Ja="(?:"+Ji+"|"+Uo+")",fo="(?:"+po+"(?:d|ll|m|re|s|t|ve))?",Wi="(?:"+po+"(?:D|LL|M|RE|S|T|VE))?",mo=Vo+"?",Ko="["+Jn+"]?",vo="(?:"+Pi+"(?:"+[go,gi,er].join("|")+")"+Ko+mo+")*",ca="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",eo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fe=Ko+mo+vo,ua="(?:"+[aa,gi,er].join("|")+")"+Fe,Oe="(?:"+[go+Zi+"?",Zi,gi,er,zo].join("|")+")",xn=RegExp(po,"g"),yo=RegExp(Zi,"g"),ti=RegExp(_s+"(?="+_s+")|"+Oe+Fe,"g"),Fn=RegExp([Ji+"?"+Ho+"+"+fo+"(?="+[jo,Ji,"$"].join("|")+")",Ja+"+"+Wi+"(?="+[jo,Ji+la,"$"].join("|")+")",Ji+"?"+la+"+"+fo,Ji+"+"+Wi,eo,ca,As,ua].join("|"),"g"),ha=RegExp("["+Pi+pi+jr+Jn+"]"),wo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fi=["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"],to=-1,Vt={};Vt[Tr]=Vt[yr]=Vt[wn]=Vt[Qn]=Vt[ir]=Vt[Zt]=Vt[Zn]=Vt[lo]=Vt[Ei]=!0,Vt[ue]=Vt[ce]=Vt[un]=Vt[_e]=Vt[Un]=Vt[$e]=Vt[Ge]=Vt[Ve]=Vt[Je]=Vt[dt]=Vt[On]=Vt[yn]=Vt[Hn]=Vt[rr]=Vt[He]=!1;var jt={};jt[ue]=jt[ce]=jt[un]=jt[Un]=jt[_e]=jt[$e]=jt[Tr]=jt[yr]=jt[wn]=jt[Qn]=jt[ir]=jt[Je]=jt[dt]=jt[On]=jt[yn]=jt[Hn]=jt[rr]=jt[Mr]=jt[Zt]=jt[Zn]=jt[lo]=jt[Ei]=!0,jt[Ge]=jt[Ve]=jt[He]=!1;var Kt={À:"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"},Nt={"&":"&","<":"<",">":">",'"':""","'":"'"},mi={"&":"&","<":"<",">":">",""":'"',"'":"'"},An={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,an=parseInt,pt=typeof Ro=="object"&&Ro&&Ro.Object===Object&&Ro,Ir=typeof self=="object"&&self&&self.Object===Object&&self,en=pt||Ir||Function("return this")(),hn=t&&!t.nodeType&&t,Vn=hn&&!0&&n&&!n.nodeType&&n,Er=Vn&&Vn.exports===hn,vi=Er&&pt.process,_n=(function(){try{var pe=Vn&&Vn.require&&Vn.require("util").types;return pe||vi&&vi.binding&&vi.binding("util")}catch{}})(),Ur=_n&&_n.isArrayBuffer,qo=_n&&_n.isDate,$n=_n&&_n.isMap,ni=_n&&_n.isRegExp,ri=_n&&_n.isSet,yi=_n&&_n.isTypedArray;function or(pe,Ae,xe){switch(xe.length){case 0:return pe.call(Ae);case 1:return pe.call(Ae,xe[0]);case 2:return pe.call(Ae,xe[0],xe[1]);case 3:return pe.call(Ae,xe[0],xe[1],xe[2])}return pe.apply(Ae,xe)}function sr(pe,Ae,xe,Be){for(var ot=-1,kt=pe==null?0:pe.length;++ot<kt;){var Wt=pe[ot];Ae(Be,Wt,xe(Wt),pe)}return Be}function hr(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be&&Ae(pe[xe],xe,pe)!==!1;);return pe}function $s(pe,Ae){for(var xe=pe==null?0:pe.length;xe--&&Ae(pe[xe],xe,pe)!==!1;);return pe}function dr(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be;)if(!Ae(pe[xe],xe,pe))return!1;return!0}function kr(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length,ot=0,kt=[];++xe<Be;){var Wt=pe[xe];Ae(Wt,xe,pe)&&(kt[ot++]=Wt)}return kt}function ii(pe,Ae){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Ae,0)>-1}function oi(pe,Ae,xe){for(var Be=-1,ot=pe==null?0:pe.length;++Be<ot;)if(xe(Ae,pe[Be]))return!0;return!1}function v(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length,ot=Array(Be);++xe<Be;)ot[xe]=Ae(pe[xe],xe,pe);return ot}function $(pe,Ae){for(var xe=-1,Be=Ae.length,ot=pe.length;++xe<Be;)pe[ot+xe]=Ae[xe];return pe}function A(pe,Ae,xe,Be){var ot=-1,kt=pe==null?0:pe.length;for(Be&&kt&&(xe=pe[++ot]);++ot<kt;)xe=Ae(xe,pe[ot],ot,pe);return xe}function F(pe,Ae,xe,Be){var ot=pe==null?0:pe.length;for(Be&&ot&&(xe=pe[--ot]);ot--;)xe=Ae(xe,pe[ot],ot,pe);return xe}function W(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be;)if(Ae(pe[xe],xe,pe))return!0;return!1}var B=we("length");function K(pe){return pe.split("")}function Y(pe){return pe.match(oa)||[]}function Q(pe,Ae,xe){var Be;return xe(pe,function(ot,kt,Wt){if(Ae(ot,kt,Wt))return Be=kt,!1}),Be}function re(pe,Ae,xe,Be){for(var ot=pe.length,kt=xe+(Be?1:-1);Be?kt--:++kt<ot;)if(Ae(pe[kt],kt,pe))return kt;return-1}function se(pe,Ae,xe){return Ae===Ae?Ye(pe,Ae,xe):re(pe,Ce,xe)}function ye(pe,Ae,xe,Be){for(var ot=xe-1,kt=pe.length;++ot<kt;)if(Be(pe[ot],Ae))return ot;return-1}function Ce(pe){return pe!==pe}function me(pe,Ae){var xe=pe==null?0:pe.length;return xe?rt(pe,Ae)/xe:Z}function we(pe){return function(Ae){return Ae==null?e:Ae[pe]}}function Re(pe){return function(Ae){return pe==null?e:pe[Ae]}}function Le(pe,Ae,xe,Be,ot){return ot(pe,function(kt,Wt,_t){xe=Be?(Be=!1,kt):Ae(xe,kt,Wt,_t)}),xe}function ze(pe,Ae){var xe=pe.length;for(pe.sort(Ae);xe--;)pe[xe]=pe[xe].value;return pe}function rt(pe,Ae){for(var xe,Be=-1,ot=pe.length;++Be<ot;){var kt=Ae(pe[Be]);kt!==e&&(xe=xe===e?kt:xe+kt)}return xe}function qe(pe,Ae){for(var xe=-1,Be=Array(pe);++xe<pe;)Be[xe]=Ae(xe);return Be}function Qe(pe,Ae){return v(Ae,function(xe){return[xe,pe[xe]]})}function ln(pe){return pe&&pe.slice(0,Tt(pe)+1).replace(bn,"")}function it(pe){return function(Ae){return pe(Ae)}}function pn(pe,Ae){return v(Ae,function(xe){return pe[xe]})}function mt(pe,Ae){return pe.has(Ae)}function Ct(pe,Ae){for(var xe=-1,Be=pe.length;++xe<Be&&se(Ae,pe[xe],0)>-1;);return xe}function Kn(pe,Ae){for(var xe=pe.length;xe--&&se(Ae,pe[xe],0)>-1;);return xe}function ar(pe,Ae){for(var xe=pe.length,Be=0;xe--;)pe[xe]===Ae&&++Be;return Be}var gn=Re(Kt),V=Re(Nt);function X(pe){return"\\"+An[pe]}function ie(pe,Ae){return pe==null?e:pe[Ae]}function oe(pe){return ha.test(pe)}function ge(pe){return wo.test(pe)}function be(pe){for(var Ae,xe=[];!(Ae=pe.next()).done;)xe.push(Ae.value);return xe}function Me(pe){var Ae=-1,xe=Array(pe.size);return pe.forEach(function(Be,ot){xe[++Ae]=[ot,Be]}),xe}function De(pe,Ae){return function(xe){return pe(Ae(xe))}}function Pe(pe,Ae){for(var xe=-1,Be=pe.length,ot=0,kt=[];++xe<Be;){var Wt=pe[xe];(Wt===Ae||Wt===s)&&(pe[xe]=s,kt[ot++]=xe)}return kt}function je(pe){var Ae=-1,xe=Array(pe.size);return pe.forEach(function(Be){xe[++Ae]=Be}),xe}function Ke(pe){var Ae=-1,xe=Array(pe.size);return pe.forEach(function(Be){xe[++Ae]=[Be,Be]}),xe}function Ye(pe,Ae,xe){for(var Be=xe-1,ot=pe.length;++Be<ot;)if(pe[Be]===Ae)return Be;return-1}function gt(pe,Ae,xe){for(var Be=xe+1;Be--;)if(pe[Be]===Ae)return Be;return Be}function Et(pe){return oe(pe)?et(pe):B(pe)}function vt(pe){return oe(pe)?on(pe):K(pe)}function Tt(pe){for(var Ae=pe.length;Ae--&&br.test(pe.charAt(Ae)););return Ae}var at=Re(mi);function et(pe){for(var Ae=ti.lastIndex=0;ti.test(pe);)++Ae;return Ae}function on(pe){return pe.match(ti)||[]}function fn(pe){return pe.match(Fn)||[]}var qn=(function pe(Ae){Ae=Ae==null?en:Ft.defaults(en.Object(),Ae,Ft.pick(en,fi));var xe=Ae.Array,Be=Ae.Date,ot=Ae.Error,kt=Ae.Function,Wt=Ae.Math,_t=Ae.Object,Lr=Ae.RegExp,wi=Ae.String,tn=Ae.TypeError,lr=xe.prototype,bo=kt.prototype,Mn=_t.prototype,Ms=Ae["__core-js_shared__"],vc=bo.toString,Jt=Mn.hasOwnProperty,zT=0,Oy=(function(){var i=/[^.]+$/.exec(Ms&&Ms.keys&&Ms.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),yc=Mn.toString,jT=vc.call(_t),HT=en._,UT=Lr("^"+vc.call(Jt).replace(wr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wc=Er?Ae.Buffer:e,Go=Ae.Symbol,bc=Ae.Uint8Array,Ny=wc?wc.allocUnsafe:e,xc=De(_t.getPrototypeOf,_t),Dy=_t.create,Fy=Mn.propertyIsEnumerable,Cc=lr.splice,Py=Go?Go.isConcatSpreadable:e,el=Go?Go.iterator:e,Ts=Go?Go.toStringTag:e,kc=(function(){try{var i=Os(_t,"defineProperty");return i({},"",{}),i}catch{}})(),VT=Ae.clearTimeout!==en.clearTimeout&&Ae.clearTimeout,KT=Be&&Be.now!==en.Date.now&&Be.now,qT=Ae.setTimeout!==en.setTimeout&&Ae.setTimeout,Sc=Wt.ceil,Ac=Wt.floor,dd=_t.getOwnPropertySymbols,GT=wc?wc.isBuffer:e,Wy=Ae.isFinite,YT=lr.join,XT=De(_t.keys,_t),tr=Wt.max,Sr=Wt.min,QT=Be.now,ZT=Ae.parseInt,By=Wt.random,JT=lr.reverse,pd=Os(Ae,"DataView"),tl=Os(Ae,"Map"),gd=Os(Ae,"Promise"),da=Os(Ae,"Set"),nl=Os(Ae,"WeakMap"),rl=Os(_t,"create"),_c=nl&&new nl,pa={},eI=Ns(pd),tI=Ns(tl),nI=Ns(gd),rI=Ns(da),iI=Ns(nl),$c=Go?Go.prototype:e,il=$c?$c.valueOf:e,zy=$c?$c.toString:e;function J(i){if(Tn(i)&&!wt(i)&&!(i instanceof Dt)){if(i instanceof bi)return i;if(Jt.call(i,"__wrapped__"))return jw(i)}return new bi(i)}var ga=(function(){function i(){}return function(f){if(!Cn(f))return{};if(Dy)return Dy(f);i.prototype=f;var T=new i;return i.prototype=e,T}})();function Mc(){}function bi(i,f){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}J.templateSettings={escape:Jr,evaluate:Xa,interpolate:ws,variable:"",imports:{_:J}},J.prototype=Mc.prototype,J.prototype.constructor=J,bi.prototype=ga(Mc.prototype),bi.prototype.constructor=bi;function Dt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function oI(){var i=new Dt(this.__wrapped__);return i.__actions__=Vr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Vr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Vr(this.__views__),i}function sI(){if(this.__filtered__){var i=new Dt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function aI(){var i=this.__wrapped__.value(),f=this.__dir__,T=wt(i),H=f<0,q=T?i.length:0,ee=wE(0,q,this.__views__),ae=ee.start,de=ee.end,ve=de-ae,Ie=H?de:ae-1,Ee=this.__iteratees__,Ne=Ee.length,Ue=0,Ze=Sr(ve,this.__takeCount__);if(!T||!H&&q==ve&&Ze==ve)return hw(i,this.__actions__);var ut=[];e:for(;ve--&&Ue<Ze;){Ie+=f;for(var $t=-1,ht=i[Ie];++$t<Ne;){var Lt=Ee[$t],Pt=Lt.iteratee,li=Lt.type,Nr=Pt(ht);if(li==S)ht=Nr;else if(!Nr){if(li==_)continue e;break e}}ut[Ue++]=ht}return ut}Dt.prototype=ga(Mc.prototype),Dt.prototype.constructor=Dt;function Is(i){var f=-1,T=i==null?0:i.length;for(this.clear();++f<T;){var H=i[f];this.set(H[0],H[1])}}function lI(){this.__data__=rl?rl(null):{},this.size=0}function cI(i){var f=this.has(i)&&delete this.__data__[i];return this.size-=f?1:0,f}function uI(i){var f=this.__data__;if(rl){var T=f[i];return T===h?e:T}return Jt.call(f,i)?f[i]:e}function hI(i){var f=this.__data__;return rl?f[i]!==e:Jt.call(f,i)}function dI(i,f){var T=this.__data__;return this.size+=this.has(i)?0:1,T[i]=rl&&f===e?h:f,this}Is.prototype.clear=lI,Is.prototype.delete=cI,Is.prototype.get=uI,Is.prototype.has=hI,Is.prototype.set=dI;function xo(i){var f=-1,T=i==null?0:i.length;for(this.clear();++f<T;){var H=i[f];this.set(H[0],H[1])}}function pI(){this.__data__=[],this.size=0}function gI(i){var f=this.__data__,T=Tc(f,i);if(T<0)return!1;var H=f.length-1;return T==H?f.pop():Cc.call(f,T,1),--this.size,!0}function fI(i){var f=this.__data__,T=Tc(f,i);return T<0?e:f[T][1]}function mI(i){return Tc(this.__data__,i)>-1}function vI(i,f){var T=this.__data__,H=Tc(T,i);return H<0?(++this.size,T.push([i,f])):T[H][1]=f,this}xo.prototype.clear=pI,xo.prototype.delete=gI,xo.prototype.get=fI,xo.prototype.has=mI,xo.prototype.set=vI;function Co(i){var f=-1,T=i==null?0:i.length;for(this.clear();++f<T;){var H=i[f];this.set(H[0],H[1])}}function yI(){this.size=0,this.__data__={hash:new Is,map:new(tl||xo),string:new Is}}function wI(i){var f=zc(this,i).delete(i);return this.size-=f?1:0,f}function bI(i){return zc(this,i).get(i)}function xI(i){return zc(this,i).has(i)}function CI(i,f){var T=zc(this,i),H=T.size;return T.set(i,f),this.size+=T.size==H?0:1,this}Co.prototype.clear=yI,Co.prototype.delete=wI,Co.prototype.get=bI,Co.prototype.has=xI,Co.prototype.set=CI;function Es(i){var f=-1,T=i==null?0:i.length;for(this.__data__=new Co;++f<T;)this.add(i[f])}function kI(i){return this.__data__.set(i,h),this}function SI(i){return this.__data__.has(i)}Es.prototype.add=Es.prototype.push=kI,Es.prototype.has=SI;function Bi(i){var f=this.__data__=new xo(i);this.size=f.size}function AI(){this.__data__=new xo,this.size=0}function _I(i){var f=this.__data__,T=f.delete(i);return this.size=f.size,T}function $I(i){return this.__data__.get(i)}function MI(i){return this.__data__.has(i)}function TI(i,f){var T=this.__data__;if(T instanceof xo){var H=T.__data__;if(!tl||H.length<m-1)return H.push([i,f]),this.size=++T.size,this;T=this.__data__=new Co(H)}return T.set(i,f),this.size=T.size,this}Bi.prototype.clear=AI,Bi.prototype.delete=_I,Bi.prototype.get=$I,Bi.prototype.has=MI,Bi.prototype.set=TI;function jy(i,f){var T=wt(i),H=!T&&Ds(i),q=!T&&!H&&Jo(i),ee=!T&&!H&&!q&&ya(i),ae=T||H||q||ee,de=ae?qe(i.length,wi):[],ve=de.length;for(var Ie in i)(f||Jt.call(i,Ie))&&!(ae&&(Ie=="length"||q&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||_o(Ie,ve)))&&de.push(Ie);return de}function Hy(i){var f=i.length;return f?i[Ad(0,f-1)]:e}function II(i,f){return jc(Vr(i),Ls(f,0,i.length))}function EI(i){return jc(Vr(i))}function fd(i,f,T){(T!==e&&!zi(i[f],T)||T===e&&!(f in i))&&ko(i,f,T)}function ol(i,f,T){var H=i[f];(!(Jt.call(i,f)&&zi(H,T))||T===e&&!(f in i))&&ko(i,f,T)}function Tc(i,f){for(var T=i.length;T--;)if(zi(i[T][0],f))return T;return-1}function LI(i,f,T,H){return Yo(i,function(q,ee,ae){f(H,q,T(q),ae)}),H}function Uy(i,f){return i&&ro(f,cr(f),i)}function RI(i,f){return i&&ro(f,qr(f),i)}function ko(i,f,T){f=="__proto__"&&kc?kc(i,f,{configurable:!0,enumerable:!0,value:T,writable:!0}):i[f]=T}function md(i,f){for(var T=-1,H=f.length,q=xe(H),ee=i==null;++T<H;)q[T]=ee?e:Xd(i,f[T]);return q}function Ls(i,f,T){return i===i&&(T!==e&&(i=i<=T?i:T),f!==e&&(i=i>=f?i:f)),i}function xi(i,f,T,H,q,ee){var ae,de=f&a,ve=f&u,Ie=f&c;if(T&&(ae=q?T(i,H,q,ee):T(i)),ae!==e)return ae;if(!Cn(i))return i;var Ee=wt(i);if(Ee){if(ae=xE(i),!de)return Vr(i,ae)}else{var Ne=Ar(i),Ue=Ne==Ve||Ne==ct;if(Jo(i))return gw(i,de);if(Ne==On||Ne==ue||Ue&&!q){if(ae=ve||Ue?{}:Rw(i),!de)return ve?uE(i,RI(ae,i)):cE(i,Uy(ae,i))}else{if(!jt[Ne])return q?i:{};ae=CE(i,Ne,de)}}ee||(ee=new Bi);var Ze=ee.get(i);if(Ze)return Ze;ee.set(i,ae),lb(i)?i.forEach(function(ht){ae.add(xi(ht,f,T,ht,i,ee))}):sb(i)&&i.forEach(function(ht,Lt){ae.set(Lt,xi(ht,f,T,Lt,i,ee))});var ut=Ie?ve?Dd:Nd:ve?qr:cr,$t=Ee?e:ut(i);return hr($t||i,function(ht,Lt){$t&&(Lt=ht,ht=i[Lt]),ol(ae,Lt,xi(ht,f,T,Lt,i,ee))}),ae}function OI(i){var f=cr(i);return function(T){return Vy(T,i,f)}}function Vy(i,f,T){var H=T.length;if(i==null)return!H;for(i=_t(i);H--;){var q=T[H],ee=f[q],ae=i[q];if(ae===e&&!(q in i)||!ee(ae))return!1}return!0}function Ky(i,f,T){if(typeof i!="function")throw new tn(y);return dl(function(){i.apply(e,T)},f)}function sl(i,f,T,H){var q=-1,ee=ii,ae=!0,de=i.length,ve=[],Ie=f.length;if(!de)return ve;T&&(f=v(f,it(T))),H?(ee=oi,ae=!1):f.length>=m&&(ee=mt,ae=!1,f=new Es(f));e:for(;++q<de;){var Ee=i[q],Ne=T==null?Ee:T(Ee);if(Ee=H||Ee!==0?Ee:0,ae&&Ne===Ne){for(var Ue=Ie;Ue--;)if(f[Ue]===Ne)continue e;ve.push(Ee)}else ee(f,Ne,H)||ve.push(Ee)}return ve}var Yo=ww(no),qy=ww(yd,!0);function NI(i,f){var T=!0;return Yo(i,function(H,q,ee){return T=!!f(H,q,ee),T}),T}function Ic(i,f,T){for(var H=-1,q=i.length;++H<q;){var ee=i[H],ae=f(ee);if(ae!=null&&(de===e?ae===ae&&!ai(ae):T(ae,de)))var de=ae,ve=ee}return ve}function DI(i,f,T,H){var q=i.length;for(T=At(T),T<0&&(T=-T>q?0:q+T),H=H===e||H>q?q:At(H),H<0&&(H+=q),H=T>H?0:ub(H);T<H;)i[T++]=f;return i}function Gy(i,f){var T=[];return Yo(i,function(H,q,ee){f(H,q,ee)&&T.push(H)}),T}function pr(i,f,T,H,q){var ee=-1,ae=i.length;for(T||(T=SE),q||(q=[]);++ee<ae;){var de=i[ee];f>0&&T(de)?f>1?pr(de,f-1,T,H,q):$(q,de):H||(q[q.length]=de)}return q}var vd=bw(),Yy=bw(!0);function no(i,f){return i&&vd(i,f,cr)}function yd(i,f){return i&&Yy(i,f,cr)}function Ec(i,f){return kr(f,function(T){return $o(i[T])})}function Rs(i,f){f=Qo(f,i);for(var T=0,H=f.length;i!=null&&T<H;)i=i[io(f[T++])];return T&&T==H?i:e}function Xy(i,f,T){var H=f(i);return wt(i)?H:$(H,T(i))}function Rr(i){return i==null?i===e?ft:Qt:Ts&&Ts in _t(i)?yE(i):EE(i)}function wd(i,f){return i>f}function FI(i,f){return i!=null&&Jt.call(i,f)}function PI(i,f){return i!=null&&f in _t(i)}function WI(i,f,T){return i>=Sr(f,T)&&i<tr(f,T)}function bd(i,f,T){for(var H=T?oi:ii,q=i[0].length,ee=i.length,ae=ee,de=xe(ee),ve=1/0,Ie=[];ae--;){var Ee=i[ae];ae&&f&&(Ee=v(Ee,it(f))),ve=Sr(Ee.length,ve),de[ae]=!T&&(f||q>=120&&Ee.length>=120)?new Es(ae&&Ee):e}Ee=i[0];var Ne=-1,Ue=de[0];e:for(;++Ne<q&&Ie.length<ve;){var Ze=Ee[Ne],ut=f?f(Ze):Ze;if(Ze=T||Ze!==0?Ze:0,!(Ue?mt(Ue,ut):H(Ie,ut,T))){for(ae=ee;--ae;){var $t=de[ae];if(!($t?mt($t,ut):H(i[ae],ut,T)))continue e}Ue&&Ue.push(ut),Ie.push(Ze)}}return Ie}function BI(i,f,T,H){return no(i,function(q,ee,ae){f(H,T(q),ee,ae)}),H}function al(i,f,T){f=Qo(f,i),i=Fw(i,f);var H=i==null?i:i[io(ki(f))];return H==null?e:or(H,i,T)}function Qy(i){return Tn(i)&&Rr(i)==ue}function zI(i){return Tn(i)&&Rr(i)==un}function jI(i){return Tn(i)&&Rr(i)==$e}function ll(i,f,T,H,q){return i===f?!0:i==null||f==null||!Tn(i)&&!Tn(f)?i!==i&&f!==f:HI(i,f,T,H,ll,q)}function HI(i,f,T,H,q,ee){var ae=wt(i),de=wt(f),ve=ae?ce:Ar(i),Ie=de?ce:Ar(f);ve=ve==ue?On:ve,Ie=Ie==ue?On:Ie;var Ee=ve==On,Ne=Ie==On,Ue=ve==Ie;if(Ue&&Jo(i)){if(!Jo(f))return!1;ae=!0,Ee=!1}if(Ue&&!Ee)return ee||(ee=new Bi),ae||ya(i)?Iw(i,f,T,H,q,ee):mE(i,f,ve,T,H,q,ee);if(!(T&o)){var Ze=Ee&&Jt.call(i,"__wrapped__"),ut=Ne&&Jt.call(f,"__wrapped__");if(Ze||ut){var $t=Ze?i.value():i,ht=ut?f.value():f;return ee||(ee=new Bi),q($t,ht,T,H,ee)}}return Ue?(ee||(ee=new Bi),vE(i,f,T,H,q,ee)):!1}function UI(i){return Tn(i)&&Ar(i)==Je}function xd(i,f,T,H){var q=T.length,ee=q,ae=!H;if(i==null)return!ee;for(i=_t(i);q--;){var de=T[q];if(ae&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++q<ee;){de=T[q];var ve=de[0],Ie=i[ve],Ee=de[1];if(ae&&de[2]){if(Ie===e&&!(ve in i))return!1}else{var Ne=new Bi;if(H)var Ue=H(Ie,Ee,ve,i,f,Ne);if(!(Ue===e?ll(Ee,Ie,o|l,H,Ne):Ue))return!1}}return!0}function Zy(i){if(!Cn(i)||_E(i))return!1;var f=$o(i)?UT:xr;return f.test(Ns(i))}function VI(i){return Tn(i)&&Rr(i)==yn}function KI(i){return Tn(i)&&Ar(i)==Hn}function qI(i){return Tn(i)&&Gc(i.length)&&!!Vt[Rr(i)]}function Jy(i){return typeof i=="function"?i:i==null?Gr:typeof i=="object"?wt(i)?nw(i[0],i[1]):tw(i):xb(i)}function Cd(i){if(!hl(i))return XT(i);var f=[];for(var T in _t(i))Jt.call(i,T)&&T!="constructor"&&f.push(T);return f}function GI(i){if(!Cn(i))return IE(i);var f=hl(i),T=[];for(var H in i)H=="constructor"&&(f||!Jt.call(i,H))||T.push(H);return T}function kd(i,f){return i<f}function ew(i,f){var T=-1,H=Kr(i)?xe(i.length):[];return Yo(i,function(q,ee,ae){H[++T]=f(q,ee,ae)}),H}function tw(i){var f=Pd(i);return f.length==1&&f[0][2]?Nw(f[0][0],f[0][1]):function(T){return T===i||xd(T,i,f)}}function nw(i,f){return Bd(i)&&Ow(f)?Nw(io(i),f):function(T){var H=Xd(T,i);return H===e&&H===f?Qd(T,i):ll(f,H,o|l)}}function Lc(i,f,T,H,q){i!==f&&vd(f,function(ee,ae){if(q||(q=new Bi),Cn(ee))YI(i,f,ae,T,Lc,H,q);else{var de=H?H(jd(i,ae),ee,ae+"",i,f,q):e;de===e&&(de=ee),fd(i,ae,de)}},qr)}function YI(i,f,T,H,q,ee,ae){var de=jd(i,T),ve=jd(f,T),Ie=ae.get(ve);if(Ie){fd(i,T,Ie);return}var Ee=ee?ee(de,ve,T+"",i,f,ae):e,Ne=Ee===e;if(Ne){var Ue=wt(ve),Ze=!Ue&&Jo(ve),ut=!Ue&&!Ze&&ya(ve);Ee=ve,Ue||Ze||ut?wt(de)?Ee=de:Pn(de)?Ee=Vr(de):Ze?(Ne=!1,Ee=gw(ve,!0)):ut?(Ne=!1,Ee=fw(ve,!0)):Ee=[]:pl(ve)||Ds(ve)?(Ee=de,Ds(de)?Ee=hb(de):(!Cn(de)||$o(de))&&(Ee=Rw(ve))):Ne=!1}Ne&&(ae.set(ve,Ee),q(Ee,ve,H,ee,ae),ae.delete(ve)),fd(i,T,Ee)}function rw(i,f){var T=i.length;if(T)return f+=f<0?T:0,_o(f,T)?i[f]:e}function iw(i,f,T){f.length?f=v(f,function(ee){return wt(ee)?function(ae){return Rs(ae,ee.length===1?ee[0]:ee)}:ee}):f=[Gr];var H=-1;f=v(f,it(lt()));var q=ew(i,function(ee,ae,de){var ve=v(f,function(Ie){return Ie(ee)});return{criteria:ve,index:++H,value:ee}});return ze(q,function(ee,ae){return lE(ee,ae,T)})}function XI(i,f){return ow(i,f,function(T,H){return Qd(i,H)})}function ow(i,f,T){for(var H=-1,q=f.length,ee={};++H<q;){var ae=f[H],de=Rs(i,ae);T(de,ae)&&cl(ee,Qo(ae,i),de)}return ee}function QI(i){return function(f){return Rs(f,i)}}function Sd(i,f,T,H){var q=H?ye:se,ee=-1,ae=f.length,de=i;for(i===f&&(f=Vr(f)),T&&(de=v(i,it(T)));++ee<ae;)for(var ve=0,Ie=f[ee],Ee=T?T(Ie):Ie;(ve=q(de,Ee,ve,H))>-1;)de!==i&&Cc.call(de,ve,1),Cc.call(i,ve,1);return i}function sw(i,f){for(var T=i?f.length:0,H=T-1;T--;){var q=f[T];if(T==H||q!==ee){var ee=q;_o(q)?Cc.call(i,q,1):Md(i,q)}}return i}function Ad(i,f){return i+Ac(By()*(f-i+1))}function ZI(i,f,T,H){for(var q=-1,ee=tr(Sc((f-i)/(T||1)),0),ae=xe(ee);ee--;)ae[H?ee:++q]=i,i+=T;return ae}function _d(i,f){var T="";if(!i||f<1||f>U)return T;do f%2&&(T+=i),f=Ac(f/2),f&&(i+=i);while(f);return T}function It(i,f){return Hd(Dw(i,f,Gr),i+"")}function JI(i){return Hy(wa(i))}function eE(i,f){var T=wa(i);return jc(T,Ls(f,0,T.length))}function cl(i,f,T,H){if(!Cn(i))return i;f=Qo(f,i);for(var q=-1,ee=f.length,ae=ee-1,de=i;de!=null&&++q<ee;){var ve=io(f[q]),Ie=T;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(q!=ae){var Ee=de[ve];Ie=H?H(Ee,ve,de):e,Ie===e&&(Ie=Cn(Ee)?Ee:_o(f[q+1])?[]:{})}ol(de,ve,Ie),de=de[ve]}return i}var aw=_c?function(i,f){return _c.set(i,f),i}:Gr,tE=kc?function(i,f){return kc(i,"toString",{configurable:!0,enumerable:!1,value:Jd(f),writable:!0})}:Gr;function nE(i){return jc(wa(i))}function Ci(i,f,T){var H=-1,q=i.length;f<0&&(f=-f>q?0:q+f),T=T>q?q:T,T<0&&(T+=q),q=f>T?0:T-f>>>0,f>>>=0;for(var ee=xe(q);++H<q;)ee[H]=i[H+f];return ee}function rE(i,f){var T;return Yo(i,function(H,q,ee){return T=f(H,q,ee),!T}),!!T}function Rc(i,f,T){var H=0,q=i==null?H:i.length;if(typeof f=="number"&&f===f&&q<=ne){for(;H<q;){var ee=H+q>>>1,ae=i[ee];ae!==null&&!ai(ae)&&(T?ae<=f:ae<f)?H=ee+1:q=ee}return q}return $d(i,f,Gr,T)}function $d(i,f,T,H){var q=0,ee=i==null?0:i.length;if(ee===0)return 0;f=T(f);for(var ae=f!==f,de=f===null,ve=ai(f),Ie=f===e;q<ee;){var Ee=Ac((q+ee)/2),Ne=T(i[Ee]),Ue=Ne!==e,Ze=Ne===null,ut=Ne===Ne,$t=ai(Ne);if(ae)var ht=H||ut;else Ie?ht=ut&&(H||Ue):de?ht=ut&&Ue&&(H||!Ze):ve?ht=ut&&Ue&&!Ze&&(H||!$t):Ze||$t?ht=!1:ht=H?Ne<=f:Ne<f;ht?q=Ee+1:ee=Ee}return Sr(ee,he)}function lw(i,f){for(var T=-1,H=i.length,q=0,ee=[];++T<H;){var ae=i[T],de=f?f(ae):ae;if(!T||!zi(de,ve)){var ve=de;ee[q++]=ae===0?0:ae}}return ee}function cw(i){return typeof i=="number"?i:ai(i)?Z:+i}function si(i){if(typeof i=="string")return i;if(wt(i))return v(i,si)+"";if(ai(i))return zy?zy.call(i):"";var f=i+"";return f=="0"&&1/i==-j?"-0":f}function Xo(i,f,T){var H=-1,q=ii,ee=i.length,ae=!0,de=[],ve=de;if(T)ae=!1,q=oi;else if(ee>=m){var Ie=f?null:gE(i);if(Ie)return je(Ie);ae=!1,q=mt,ve=new Es}else ve=f?[]:de;e:for(;++H<ee;){var Ee=i[H],Ne=f?f(Ee):Ee;if(Ee=T||Ee!==0?Ee:0,ae&&Ne===Ne){for(var Ue=ve.length;Ue--;)if(ve[Ue]===Ne)continue e;f&&ve.push(Ne),de.push(Ee)}else q(ve,Ne,T)||(ve!==de&&ve.push(Ne),de.push(Ee))}return de}function Md(i,f){return f=Qo(f,i),i=Fw(i,f),i==null||delete i[io(ki(f))]}function uw(i,f,T,H){return cl(i,f,T(Rs(i,f)),H)}function Oc(i,f,T,H){for(var q=i.length,ee=H?q:-1;(H?ee--:++ee<q)&&f(i[ee],ee,i););return T?Ci(i,H?0:ee,H?ee+1:q):Ci(i,H?ee+1:0,H?q:ee)}function hw(i,f){var T=i;return T instanceof Dt&&(T=T.value()),A(f,function(H,q){return q.func.apply(q.thisArg,$([H],q.args))},T)}function Td(i,f,T){var H=i.length;if(H<2)return H?Xo(i[0]):[];for(var q=-1,ee=xe(H);++q<H;)for(var ae=i[q],de=-1;++de<H;)de!=q&&(ee[q]=sl(ee[q]||ae,i[de],f,T));return Xo(pr(ee,1),f,T)}function dw(i,f,T){for(var H=-1,q=i.length,ee=f.length,ae={};++H<q;){var de=H<ee?f[H]:e;T(ae,i[H],de)}return ae}function Id(i){return Pn(i)?i:[]}function Ed(i){return typeof i=="function"?i:Gr}function Qo(i,f){return wt(i)?i:Bd(i,f)?[i]:zw(Yt(i))}var iE=It;function Zo(i,f,T){var H=i.length;return T=T===e?H:T,!f&&T>=H?i:Ci(i,f,T)}var pw=VT||function(i){return en.clearTimeout(i)};function gw(i,f){if(f)return i.slice();var T=i.length,H=Ny?Ny(T):new i.constructor(T);return i.copy(H),H}function Ld(i){var f=new i.constructor(i.byteLength);return new bc(f).set(new bc(i)),f}function oE(i,f){var T=f?Ld(i.buffer):i.buffer;return new i.constructor(T,i.byteOffset,i.byteLength)}function sE(i){var f=new i.constructor(i.source,ei.exec(i));return f.lastIndex=i.lastIndex,f}function aE(i){return il?_t(il.call(i)):{}}function fw(i,f){var T=f?Ld(i.buffer):i.buffer;return new i.constructor(T,i.byteOffset,i.length)}function mw(i,f){if(i!==f){var T=i!==e,H=i===null,q=i===i,ee=ai(i),ae=f!==e,de=f===null,ve=f===f,Ie=ai(f);if(!de&&!Ie&&!ee&&i>f||ee&&ae&&ve&&!de&&!Ie||H&&ae&&ve||!T&&ve||!q)return 1;if(!H&&!ee&&!Ie&&i<f||Ie&&T&&q&&!H&&!ee||de&&T&&q||!ae&&q||!ve)return-1}return 0}function lE(i,f,T){for(var H=-1,q=i.criteria,ee=f.criteria,ae=q.length,de=T.length;++H<ae;){var ve=mw(q[H],ee[H]);if(ve){if(H>=de)return ve;var Ie=T[H];return ve*(Ie=="desc"?-1:1)}}return i.index-f.index}function vw(i,f,T,H){for(var q=-1,ee=i.length,ae=T.length,de=-1,ve=f.length,Ie=tr(ee-ae,0),Ee=xe(ve+Ie),Ne=!H;++de<ve;)Ee[de]=f[de];for(;++q<ae;)(Ne||q<ee)&&(Ee[T[q]]=i[q]);for(;Ie--;)Ee[de++]=i[q++];return Ee}function yw(i,f,T,H){for(var q=-1,ee=i.length,ae=-1,de=T.length,ve=-1,Ie=f.length,Ee=tr(ee-de,0),Ne=xe(Ee+Ie),Ue=!H;++q<Ee;)Ne[q]=i[q];for(var Ze=q;++ve<Ie;)Ne[Ze+ve]=f[ve];for(;++ae<de;)(Ue||q<ee)&&(Ne[Ze+T[ae]]=i[q++]);return Ne}function Vr(i,f){var T=-1,H=i.length;for(f||(f=xe(H));++T<H;)f[T]=i[T];return f}function ro(i,f,T,H){var q=!T;T||(T={});for(var ee=-1,ae=f.length;++ee<ae;){var de=f[ee],ve=H?H(T[de],i[de],de,T,i):e;ve===e&&(ve=i[de]),q?ko(T,de,ve):ol(T,de,ve)}return T}function cE(i,f){return ro(i,Wd(i),f)}function uE(i,f){return ro(i,Ew(i),f)}function Nc(i,f){return function(T,H){var q=wt(T)?sr:LI,ee=f?f():{};return q(T,i,lt(H,2),ee)}}function fa(i){return It(function(f,T){var H=-1,q=T.length,ee=q>1?T[q-1]:e,ae=q>2?T[2]:e;for(ee=i.length>3&&typeof ee=="function"?(q--,ee):e,ae&&Or(T[0],T[1],ae)&&(ee=q<3?e:ee,q=1),f=_t(f);++H<q;){var de=T[H];de&&i(f,de,H,ee)}return f})}function ww(i,f){return function(T,H){if(T==null)return T;if(!Kr(T))return i(T,H);for(var q=T.length,ee=f?q:-1,ae=_t(T);(f?ee--:++ee<q)&&H(ae[ee],ee,ae)!==!1;);return T}}function bw(i){return function(f,T,H){for(var q=-1,ee=_t(f),ae=H(f),de=ae.length;de--;){var ve=ae[i?de:++q];if(T(ee[ve],ve,ee)===!1)break}return f}}function hE(i,f,T){var H=f&d,q=ul(i);function ee(){var ae=this&&this!==en&&this instanceof ee?q:i;return ae.apply(H?T:this,arguments)}return ee}function xw(i){return function(f){f=Yt(f);var T=oe(f)?vt(f):e,H=T?T[0]:f.charAt(0),q=T?Zo(T,1).join(""):f.slice(1);return H[i]()+q}}function ma(i){return function(f){return A(wb(yb(f).replace(xn,"")),i,"")}}function ul(i){return function(){var f=arguments;switch(f.length){case 0:return new i;case 1:return new i(f[0]);case 2:return new i(f[0],f[1]);case 3:return new i(f[0],f[1],f[2]);case 4:return new i(f[0],f[1],f[2],f[3]);case 5:return new i(f[0],f[1],f[2],f[3],f[4]);case 6:return new i(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new i(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var T=ga(i.prototype),H=i.apply(T,f);return Cn(H)?H:T}}function dE(i,f,T){var H=ul(i);function q(){for(var ee=arguments.length,ae=xe(ee),de=ee,ve=va(q);de--;)ae[de]=arguments[de];var Ie=ee<3&&ae[0]!==ve&&ae[ee-1]!==ve?[]:Pe(ae,ve);if(ee-=Ie.length,ee<T)return _w(i,f,Dc,q.placeholder,e,ae,Ie,e,e,T-ee);var Ee=this&&this!==en&&this instanceof q?H:i;return or(Ee,this,ae)}return q}function Cw(i){return function(f,T,H){var q=_t(f);if(!Kr(f)){var ee=lt(T,3);f=cr(f),T=function(de){return ee(q[de],de,q)}}var ae=i(f,T,H);return ae>-1?q[ee?f[ae]:ae]:e}}function kw(i){return Ao(function(f){var T=f.length,H=T,q=bi.prototype.thru;for(i&&f.reverse();H--;){var ee=f[H];if(typeof ee!="function")throw new tn(y);if(q&&!ae&&Bc(ee)=="wrapper")var ae=new bi([],!0)}for(H=ae?H:T;++H<T;){ee=f[H];var de=Bc(ee),ve=de=="wrapper"?Fd(ee):e;ve&&zd(ve[0])&&ve[1]==(R|E|k|O)&&!ve[4].length&&ve[9]==1?ae=ae[Bc(ve[0])].apply(ae,ve[3]):ae=ee.length==1&&zd(ee)?ae[de]():ae.thru(ee)}return function(){var Ie=arguments,Ee=Ie[0];if(ae&&Ie.length==1&&wt(Ee))return ae.plant(Ee).value();for(var Ne=0,Ue=T?f[Ne].apply(this,Ie):Ee;++Ne<T;)Ue=f[Ne].call(this,Ue);return Ue}})}function Dc(i,f,T,H,q,ee,ae,de,ve,Ie){var Ee=f&R,Ne=f&d,Ue=f&w,Ze=f&(E|M),ut=f&L,$t=Ue?e:ul(i);function ht(){for(var Lt=arguments.length,Pt=xe(Lt),li=Lt;li--;)Pt[li]=arguments[li];if(Ze)var Nr=va(ht),ci=ar(Pt,Nr);if(H&&(Pt=vw(Pt,H,q,Ze)),ee&&(Pt=yw(Pt,ee,ae,Ze)),Lt-=ci,Ze&&Lt<Ie){var Wn=Pe(Pt,Nr);return _w(i,f,Dc,ht.placeholder,T,Pt,Wn,de,ve,Ie-Lt)}var ji=Ne?T:this,To=Ue?ji[i]:i;return Lt=Pt.length,de?Pt=LE(Pt,de):ut&&Lt>1&&Pt.reverse(),Ee&&ve<Lt&&(Pt.length=ve),this&&this!==en&&this instanceof ht&&(To=$t||ul(To)),To.apply(ji,Pt)}return ht}function Sw(i,f){return function(T,H){return BI(T,i,f(H),{})}}function Fc(i,f){return function(T,H){var q;if(T===e&&H===e)return f;if(T!==e&&(q=T),H!==e){if(q===e)return H;typeof T=="string"||typeof H=="string"?(T=si(T),H=si(H)):(T=cw(T),H=cw(H)),q=i(T,H)}return q}}function Rd(i){return Ao(function(f){return f=v(f,it(lt())),It(function(T){var H=this;return i(f,function(q){return or(q,H,T)})})})}function Pc(i,f){f=f===e?" ":si(f);var T=f.length;if(T<2)return T?_d(f,i):f;var H=_d(f,Sc(i/Et(f)));return oe(f)?Zo(vt(H),0,i).join(""):H.slice(0,i)}function pE(i,f,T,H){var q=f&d,ee=ul(i);function ae(){for(var de=-1,ve=arguments.length,Ie=-1,Ee=H.length,Ne=xe(Ee+ve),Ue=this&&this!==en&&this instanceof ae?ee:i;++Ie<Ee;)Ne[Ie]=H[Ie];for(;ve--;)Ne[Ie++]=arguments[++de];return or(Ue,q?T:this,Ne)}return ae}function Aw(i){return function(f,T,H){return H&&typeof H!="number"&&Or(f,T,H)&&(T=H=e),f=Mo(f),T===e?(T=f,f=0):T=Mo(T),H=H===e?f<T?1:-1:Mo(H),ZI(f,T,H,i)}}function Wc(i){return function(f,T){return typeof f=="string"&&typeof T=="string"||(f=Si(f),T=Si(T)),i(f,T)}}function _w(i,f,T,H,q,ee,ae,de,ve,Ie){var Ee=f&E,Ne=Ee?ae:e,Ue=Ee?e:ae,Ze=Ee?ee:e,ut=Ee?e:ee;f|=Ee?k:C,f&=~(Ee?C:k),f&b||(f&=-4);var $t=[i,f,q,Ze,Ne,ut,Ue,de,ve,Ie],ht=T.apply(e,$t);return zd(i)&&Pw(ht,$t),ht.placeholder=H,Ww(ht,i,f)}function Od(i){var f=Wt[i];return function(T,H){if(T=Si(T),H=H==null?0:Sr(At(H),292),H&&Wy(T)){var q=(Yt(T)+"e").split("e"),ee=f(q[0]+"e"+(+q[1]+H));return q=(Yt(ee)+"e").split("e"),+(q[0]+"e"+(+q[1]-H))}return f(T)}}var gE=da&&1/je(new da([,-0]))[1]==j?function(i){return new da(i)}:np;function $w(i){return function(f){var T=Ar(f);return T==Je?Me(f):T==Hn?Ke(f):Qe(f,i(f))}}function So(i,f,T,H,q,ee,ae,de){var ve=f&w;if(!ve&&typeof i!="function")throw new tn(y);var Ie=H?H.length:0;if(Ie||(f&=-97,H=q=e),ae=ae===e?ae:tr(At(ae),0),de=de===e?de:At(de),Ie-=q?q.length:0,f&C){var Ee=H,Ne=q;H=q=e}var Ue=ve?e:Fd(i),Ze=[i,f,T,H,q,Ee,Ne,ee,ae,de];if(Ue&&TE(Ze,Ue),i=Ze[0],f=Ze[1],T=Ze[2],H=Ze[3],q=Ze[4],de=Ze[9]=Ze[9]===e?ve?0:i.length:tr(Ze[9]-Ie,0),!de&&f&(E|M)&&(f&=-25),!f||f==d)var ut=hE(i,f,T);else f==E||f==M?ut=dE(i,f,de):(f==k||f==(d|k))&&!q.length?ut=pE(i,f,T,H):ut=Dc.apply(e,Ze);var $t=Ue?aw:Pw;return Ww($t(ut,Ze),i,f)}function Mw(i,f,T,H){return i===e||zi(i,Mn[T])&&!Jt.call(H,T)?f:i}function Tw(i,f,T,H,q,ee){return Cn(i)&&Cn(f)&&(ee.set(f,i),Lc(i,f,e,Tw,ee),ee.delete(f)),i}function fE(i){return pl(i)?e:i}function Iw(i,f,T,H,q,ee){var ae=T&o,de=i.length,ve=f.length;if(de!=ve&&!(ae&&ve>de))return!1;var Ie=ee.get(i),Ee=ee.get(f);if(Ie&&Ee)return Ie==f&&Ee==i;var Ne=-1,Ue=!0,Ze=T&l?new Es:e;for(ee.set(i,f),ee.set(f,i);++Ne<de;){var ut=i[Ne],$t=f[Ne];if(H)var ht=ae?H($t,ut,Ne,f,i,ee):H(ut,$t,Ne,i,f,ee);if(ht!==e){if(ht)continue;Ue=!1;break}if(Ze){if(!W(f,function(Lt,Pt){if(!mt(Ze,Pt)&&(ut===Lt||q(ut,Lt,T,H,ee)))return Ze.push(Pt)})){Ue=!1;break}}else if(!(ut===$t||q(ut,$t,T,H,ee))){Ue=!1;break}}return ee.delete(i),ee.delete(f),Ue}function mE(i,f,T,H,q,ee,ae){switch(T){case Un:if(i.byteLength!=f.byteLength||i.byteOffset!=f.byteOffset)return!1;i=i.buffer,f=f.buffer;case un:return!(i.byteLength!=f.byteLength||!ee(new bc(i),new bc(f)));case _e:case $e:case dt:return zi(+i,+f);case Ge:return i.name==f.name&&i.message==f.message;case yn:case rr:return i==f+"";case Je:var de=Me;case Hn:var ve=H&o;if(de||(de=je),i.size!=f.size&&!ve)return!1;var Ie=ae.get(i);if(Ie)return Ie==f;H|=l,ae.set(i,f);var Ee=Iw(de(i),de(f),H,q,ee,ae);return ae.delete(i),Ee;case Mr:if(il)return il.call(i)==il.call(f)}return!1}function vE(i,f,T,H,q,ee){var ae=T&o,de=Nd(i),ve=de.length,Ie=Nd(f),Ee=Ie.length;if(ve!=Ee&&!ae)return!1;for(var Ne=ve;Ne--;){var Ue=de[Ne];if(!(ae?Ue in f:Jt.call(f,Ue)))return!1}var Ze=ee.get(i),ut=ee.get(f);if(Ze&&ut)return Ze==f&&ut==i;var $t=!0;ee.set(i,f),ee.set(f,i);for(var ht=ae;++Ne<ve;){Ue=de[Ne];var Lt=i[Ue],Pt=f[Ue];if(H)var li=ae?H(Pt,Lt,Ue,f,i,ee):H(Lt,Pt,Ue,i,f,ee);if(!(li===e?Lt===Pt||q(Lt,Pt,T,H,ee):li)){$t=!1;break}ht||(ht=Ue=="constructor")}if($t&&!ht){var Nr=i.constructor,ci=f.constructor;Nr!=ci&&"constructor"in i&&"constructor"in f&&!(typeof Nr=="function"&&Nr instanceof Nr&&typeof ci=="function"&&ci instanceof ci)&&($t=!1)}return ee.delete(i),ee.delete(f),$t}function Ao(i){return Hd(Dw(i,e,Vw),i+"")}function Nd(i){return Xy(i,cr,Wd)}function Dd(i){return Xy(i,qr,Ew)}var Fd=_c?function(i){return _c.get(i)}:np;function Bc(i){for(var f=i.name+"",T=pa[f],H=Jt.call(pa,f)?T.length:0;H--;){var q=T[H],ee=q.func;if(ee==null||ee==i)return q.name}return f}function va(i){var f=Jt.call(J,"placeholder")?J:i;return f.placeholder}function lt(){var i=J.iteratee||ep;return i=i===ep?Jy:i,arguments.length?i(arguments[0],arguments[1]):i}function zc(i,f){var T=i.__data__;return AE(f)?T[typeof f=="string"?"string":"hash"]:T.map}function Pd(i){for(var f=cr(i),T=f.length;T--;){var H=f[T],q=i[H];f[T]=[H,q,Ow(q)]}return f}function Os(i,f){var T=ie(i,f);return Zy(T)?T:e}function yE(i){var f=Jt.call(i,Ts),T=i[Ts];try{i[Ts]=e;var H=!0}catch{}var q=yc.call(i);return H&&(f?i[Ts]=T:delete i[Ts]),q}var Wd=dd?function(i){return i==null?[]:(i=_t(i),kr(dd(i),function(f){return Fy.call(i,f)}))}:rp,Ew=dd?function(i){for(var f=[];i;)$(f,Wd(i)),i=xc(i);return f}:rp,Ar=Rr;(pd&&Ar(new pd(new ArrayBuffer(1)))!=Un||tl&&Ar(new tl)!=Je||gd&&Ar(gd.resolve())!=Gt||da&&Ar(new da)!=Hn||nl&&Ar(new nl)!=He)&&(Ar=function(i){var f=Rr(i),T=f==On?i.constructor:e,H=T?Ns(T):"";if(H)switch(H){case eI:return Un;case tI:return Je;case nI:return Gt;case rI:return Hn;case iI:return He}return f});function wE(i,f,T){for(var H=-1,q=T.length;++H<q;){var ee=T[H],ae=ee.size;switch(ee.type){case"drop":i+=ae;break;case"dropRight":f-=ae;break;case"take":f=Sr(f,i+ae);break;case"takeRight":i=tr(i,f-ae);break}}return{start:i,end:f}}function bE(i){var f=i.match(Di);return f?f[1].split(bs):[]}function Lw(i,f,T){f=Qo(f,i);for(var H=-1,q=f.length,ee=!1;++H<q;){var ae=io(f[H]);if(!(ee=i!=null&&T(i,ae)))break;i=i[ae]}return ee||++H!=q?ee:(q=i==null?0:i.length,!!q&&Gc(q)&&_o(ae,q)&&(wt(i)||Ds(i)))}function xE(i){var f=i.length,T=new i.constructor(f);return f&&typeof i[0]=="string"&&Jt.call(i,"index")&&(T.index=i.index,T.input=i.input),T}function Rw(i){return typeof i.constructor=="function"&&!hl(i)?ga(xc(i)):{}}function CE(i,f,T){var H=i.constructor;switch(f){case un:return Ld(i);case _e:case $e:return new H(+i);case Un:return oE(i,T);case Tr:case yr:case wn:case Qn:case ir:case Zt:case Zn:case lo:case Ei:return fw(i,T);case Je:return new H;case dt:case rr:return new H(i);case yn:return sE(i);case Hn:return new H;case Mr:return aE(i)}}function kE(i,f){var T=f.length;if(!T)return i;var H=T-1;return f[H]=(T>1?"& ":"")+f[H],f=f.join(T>2?", ":" "),i.replace(Xi,`{
|
1472
|
+
/* [wrapped with `+f+`] */
|
1473
|
+
`)}function SE(i){return wt(i)||Ds(i)||!!(Py&&i&&i[Py])}function _o(i,f){var T=typeof i;return f=f??U,!!f&&(T=="number"||T!="symbol"&&sn.test(i))&&i>-1&&i%1==0&&i<f}function Or(i,f,T){if(!Cn(T))return!1;var H=typeof f;return(H=="number"?Kr(T)&&_o(f,T.length):H=="string"&&f in T)?zi(T[f],i):!1}function Bd(i,f){if(wt(i))return!1;var T=typeof i;return T=="number"||T=="symbol"||T=="boolean"||i==null||ai(i)?!0:Oi.test(i)||!ia.test(i)||f!=null&&i in _t(f)}function AE(i){var f=typeof i;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?i!=="__proto__":i===null}function zd(i){var f=Bc(i),T=J[f];if(typeof T!="function"||!(f in Dt.prototype))return!1;if(i===T)return!0;var H=Fd(T);return!!H&&i===H[0]}function _E(i){return!!Oy&&Oy in i}var $E=Ms?$o:ip;function hl(i){var f=i&&i.constructor,T=typeof f=="function"&&f.prototype||Mn;return i===T}function Ow(i){return i===i&&!Cn(i)}function Nw(i,f){return function(T){return T==null?!1:T[i]===f&&(f!==e||i in _t(T))}}function ME(i){var f=Kc(i,function(H){return T.size===p&&T.clear(),H}),T=f.cache;return f}function TE(i,f){var T=i[1],H=f[1],q=T|H,ee=q<(d|w|R),ae=H==R&&T==E||H==R&&T==O&&i[7].length<=f[8]||H==(R|O)&&f[7].length<=f[8]&&T==E;if(!(ee||ae))return i;H&d&&(i[2]=f[2],q|=T&d?0:b);var de=f[3];if(de){var ve=i[3];i[3]=ve?vw(ve,de,f[4]):de,i[4]=ve?Pe(i[3],s):f[4]}return de=f[5],de&&(ve=i[5],i[5]=ve?yw(ve,de,f[6]):de,i[6]=ve?Pe(i[5],s):f[6]),de=f[7],de&&(i[7]=de),H&R&&(i[8]=i[8]==null?f[8]:Sr(i[8],f[8])),i[9]==null&&(i[9]=f[9]),i[0]=f[0],i[1]=q,i}function IE(i){var f=[];if(i!=null)for(var T in _t(i))f.push(T);return f}function EE(i){return yc.call(i)}function Dw(i,f,T){return f=tr(f===e?i.length-1:f,0),function(){for(var H=arguments,q=-1,ee=tr(H.length-f,0),ae=xe(ee);++q<ee;)ae[q]=H[f+q];q=-1;for(var de=xe(f+1);++q<f;)de[q]=H[q];return de[f]=T(ae),or(i,this,de)}}function Fw(i,f){return f.length<2?i:Rs(i,Ci(f,0,-1))}function LE(i,f){for(var T=i.length,H=Sr(f.length,T),q=Vr(i);H--;){var ee=f[H];i[H]=_o(ee,T)?q[ee]:e}return i}function jd(i,f){if(!(f==="constructor"&&typeof i[f]=="function")&&f!="__proto__")return i[f]}var Pw=Bw(aw),dl=qT||function(i,f){return en.setTimeout(i,f)},Hd=Bw(tE);function Ww(i,f,T){var H=f+"";return Hd(i,kE(H,RE(bE(H),T)))}function Bw(i){var f=0,T=0;return function(){var H=QT(),q=N-(H-T);if(T=H,q>0){if(++f>=P)return arguments[0]}else f=0;return i.apply(e,arguments)}}function jc(i,f){var T=-1,H=i.length,q=H-1;for(f=f===e?H:f;++T<f;){var ee=Ad(T,q),ae=i[ee];i[ee]=i[T],i[T]=ae}return i.length=f,i}var zw=ME(function(i){var f=[];return i.charCodeAt(0)===46&&f.push(""),i.replace(Nn,function(T,H,q,ee){f.push(q?ee.replace(Za,"$1"):H||T)}),f});function io(i){if(typeof i=="string"||ai(i))return i;var f=i+"";return f=="0"&&1/i==-j?"-0":f}function Ns(i){if(i!=null){try{return vc.call(i)}catch{}try{return i+""}catch{}}return""}function RE(i,f){return hr(le,function(T){var H="_."+T[0];f&T[1]&&!ii(i,H)&&i.push(H)}),i.sort()}function jw(i){if(i instanceof Dt)return i.clone();var f=new bi(i.__wrapped__,i.__chain__);return f.__actions__=Vr(i.__actions__),f.__index__=i.__index__,f.__values__=i.__values__,f}function OE(i,f,T){(T?Or(i,f,T):f===e)?f=1:f=tr(At(f),0);var H=i==null?0:i.length;if(!H||f<1)return[];for(var q=0,ee=0,ae=xe(Sc(H/f));q<H;)ae[ee++]=Ci(i,q,q+=f);return ae}function NE(i){for(var f=-1,T=i==null?0:i.length,H=0,q=[];++f<T;){var ee=i[f];ee&&(q[H++]=ee)}return q}function DE(){var i=arguments.length;if(!i)return[];for(var f=xe(i-1),T=arguments[0],H=i;H--;)f[H-1]=arguments[H];return $(wt(T)?Vr(T):[T],pr(f,1))}var FE=It(function(i,f){return Pn(i)?sl(i,pr(f,1,Pn,!0)):[]}),PE=It(function(i,f){var T=ki(f);return Pn(T)&&(T=e),Pn(i)?sl(i,pr(f,1,Pn,!0),lt(T,2)):[]}),WE=It(function(i,f){var T=ki(f);return Pn(T)&&(T=e),Pn(i)?sl(i,pr(f,1,Pn,!0),e,T):[]});function BE(i,f,T){var H=i==null?0:i.length;return H?(f=T||f===e?1:At(f),Ci(i,f<0?0:f,H)):[]}function zE(i,f,T){var H=i==null?0:i.length;return H?(f=T||f===e?1:At(f),f=H-f,Ci(i,0,f<0?0:f)):[]}function jE(i,f){return i&&i.length?Oc(i,lt(f,3),!0,!0):[]}function HE(i,f){return i&&i.length?Oc(i,lt(f,3),!0):[]}function UE(i,f,T,H){var q=i==null?0:i.length;return q?(T&&typeof T!="number"&&Or(i,f,T)&&(T=0,H=q),DI(i,f,T,H)):[]}function Hw(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var q=T==null?0:At(T);return q<0&&(q=tr(H+q,0)),re(i,lt(f,3),q)}function Uw(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var q=H-1;return T!==e&&(q=At(T),q=T<0?tr(H+q,0):Sr(q,H-1)),re(i,lt(f,3),q,!0)}function Vw(i){var f=i==null?0:i.length;return f?pr(i,1):[]}function VE(i){var f=i==null?0:i.length;return f?pr(i,j):[]}function KE(i,f){var T=i==null?0:i.length;return T?(f=f===e?1:At(f),pr(i,f)):[]}function qE(i){for(var f=-1,T=i==null?0:i.length,H={};++f<T;){var q=i[f];H[q[0]]=q[1]}return H}function Kw(i){return i&&i.length?i[0]:e}function GE(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var q=T==null?0:At(T);return q<0&&(q=tr(H+q,0)),se(i,f,q)}function YE(i){var f=i==null?0:i.length;return f?Ci(i,0,-1):[]}var XE=It(function(i){var f=v(i,Id);return f.length&&f[0]===i[0]?bd(f):[]}),QE=It(function(i){var f=ki(i),T=v(i,Id);return f===ki(T)?f=e:T.pop(),T.length&&T[0]===i[0]?bd(T,lt(f,2)):[]}),ZE=It(function(i){var f=ki(i),T=v(i,Id);return f=typeof f=="function"?f:e,f&&T.pop(),T.length&&T[0]===i[0]?bd(T,e,f):[]});function JE(i,f){return i==null?"":YT.call(i,f)}function ki(i){var f=i==null?0:i.length;return f?i[f-1]:e}function eL(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var q=H;return T!==e&&(q=At(T),q=q<0?tr(H+q,0):Sr(q,H-1)),f===f?gt(i,f,q):re(i,Ce,q,!0)}function tL(i,f){return i&&i.length?rw(i,At(f)):e}var nL=It(qw);function qw(i,f){return i&&i.length&&f&&f.length?Sd(i,f):i}function rL(i,f,T){return i&&i.length&&f&&f.length?Sd(i,f,lt(T,2)):i}function iL(i,f,T){return i&&i.length&&f&&f.length?Sd(i,f,e,T):i}var oL=Ao(function(i,f){var T=i==null?0:i.length,H=md(i,f);return sw(i,v(f,function(q){return _o(q,T)?+q:q}).sort(mw)),H});function sL(i,f){var T=[];if(!(i&&i.length))return T;var H=-1,q=[],ee=i.length;for(f=lt(f,3);++H<ee;){var ae=i[H];f(ae,H,i)&&(T.push(ae),q.push(H))}return sw(i,q),T}function Ud(i){return i==null?i:JT.call(i)}function aL(i,f,T){var H=i==null?0:i.length;return H?(T&&typeof T!="number"&&Or(i,f,T)?(f=0,T=H):(f=f==null?0:At(f),T=T===e?H:At(T)),Ci(i,f,T)):[]}function lL(i,f){return Rc(i,f)}function cL(i,f,T){return $d(i,f,lt(T,2))}function uL(i,f){var T=i==null?0:i.length;if(T){var H=Rc(i,f);if(H<T&&zi(i[H],f))return H}return-1}function hL(i,f){return Rc(i,f,!0)}function dL(i,f,T){return $d(i,f,lt(T,2),!0)}function pL(i,f){var T=i==null?0:i.length;if(T){var H=Rc(i,f,!0)-1;if(zi(i[H],f))return H}return-1}function gL(i){return i&&i.length?lw(i):[]}function fL(i,f){return i&&i.length?lw(i,lt(f,2)):[]}function mL(i){var f=i==null?0:i.length;return f?Ci(i,1,f):[]}function vL(i,f,T){return i&&i.length?(f=T||f===e?1:At(f),Ci(i,0,f<0?0:f)):[]}function yL(i,f,T){var H=i==null?0:i.length;return H?(f=T||f===e?1:At(f),f=H-f,Ci(i,f<0?0:f,H)):[]}function wL(i,f){return i&&i.length?Oc(i,lt(f,3),!1,!0):[]}function bL(i,f){return i&&i.length?Oc(i,lt(f,3)):[]}var xL=It(function(i){return Xo(pr(i,1,Pn,!0))}),CL=It(function(i){var f=ki(i);return Pn(f)&&(f=e),Xo(pr(i,1,Pn,!0),lt(f,2))}),kL=It(function(i){var f=ki(i);return f=typeof f=="function"?f:e,Xo(pr(i,1,Pn,!0),e,f)});function SL(i){return i&&i.length?Xo(i):[]}function AL(i,f){return i&&i.length?Xo(i,lt(f,2)):[]}function _L(i,f){return f=typeof f=="function"?f:e,i&&i.length?Xo(i,e,f):[]}function Vd(i){if(!(i&&i.length))return[];var f=0;return i=kr(i,function(T){if(Pn(T))return f=tr(T.length,f),!0}),qe(f,function(T){return v(i,we(T))})}function Gw(i,f){if(!(i&&i.length))return[];var T=Vd(i);return f==null?T:v(T,function(H){return or(f,e,H)})}var $L=It(function(i,f){return Pn(i)?sl(i,f):[]}),ML=It(function(i){return Td(kr(i,Pn))}),TL=It(function(i){var f=ki(i);return Pn(f)&&(f=e),Td(kr(i,Pn),lt(f,2))}),IL=It(function(i){var f=ki(i);return f=typeof f=="function"?f:e,Td(kr(i,Pn),e,f)}),EL=It(Vd);function LL(i,f){return dw(i||[],f||[],ol)}function RL(i,f){return dw(i||[],f||[],cl)}var OL=It(function(i){var f=i.length,T=f>1?i[f-1]:e;return T=typeof T=="function"?(i.pop(),T):e,Gw(i,T)});function Yw(i){var f=J(i);return f.__chain__=!0,f}function NL(i,f){return f(i),i}function Hc(i,f){return f(i)}var DL=Ao(function(i){var f=i.length,T=f?i[0]:0,H=this.__wrapped__,q=function(ee){return md(ee,i)};return f>1||this.__actions__.length||!(H instanceof Dt)||!_o(T)?this.thru(q):(H=H.slice(T,+T+(f?1:0)),H.__actions__.push({func:Hc,args:[q],thisArg:e}),new bi(H,this.__chain__).thru(function(ee){return f&&!ee.length&&ee.push(e),ee}))});function FL(){return Yw(this)}function PL(){return new bi(this.value(),this.__chain__)}function WL(){this.__values__===e&&(this.__values__=cb(this.value()));var i=this.__index__>=this.__values__.length,f=i?e:this.__values__[this.__index__++];return{done:i,value:f}}function BL(){return this}function zL(i){for(var f,T=this;T instanceof Mc;){var H=jw(T);H.__index__=0,H.__values__=e,f?q.__wrapped__=H:f=H;var q=H;T=T.__wrapped__}return q.__wrapped__=i,f}function jL(){var i=this.__wrapped__;if(i instanceof Dt){var f=i;return this.__actions__.length&&(f=new Dt(this)),f=f.reverse(),f.__actions__.push({func:Hc,args:[Ud],thisArg:e}),new bi(f,this.__chain__)}return this.thru(Ud)}function HL(){return hw(this.__wrapped__,this.__actions__)}var UL=Nc(function(i,f,T){Jt.call(i,T)?++i[T]:ko(i,T,1)});function VL(i,f,T){var H=wt(i)?dr:NI;return T&&Or(i,f,T)&&(f=e),H(i,lt(f,3))}function KL(i,f){var T=wt(i)?kr:Gy;return T(i,lt(f,3))}var qL=Cw(Hw),GL=Cw(Uw);function YL(i,f){return pr(Uc(i,f),1)}function XL(i,f){return pr(Uc(i,f),j)}function QL(i,f,T){return T=T===e?1:At(T),pr(Uc(i,f),T)}function Xw(i,f){var T=wt(i)?hr:Yo;return T(i,lt(f,3))}function Qw(i,f){var T=wt(i)?$s:qy;return T(i,lt(f,3))}var ZL=Nc(function(i,f,T){Jt.call(i,T)?i[T].push(f):ko(i,T,[f])});function JL(i,f,T,H){i=Kr(i)?i:wa(i),T=T&&!H?At(T):0;var q=i.length;return T<0&&(T=tr(q+T,0)),Yc(i)?T<=q&&i.indexOf(f,T)>-1:!!q&&se(i,f,T)>-1}var eR=It(function(i,f,T){var H=-1,q=typeof f=="function",ee=Kr(i)?xe(i.length):[];return Yo(i,function(ae){ee[++H]=q?or(f,ae,T):al(ae,f,T)}),ee}),tR=Nc(function(i,f,T){ko(i,T,f)});function Uc(i,f){var T=wt(i)?v:ew;return T(i,lt(f,3))}function nR(i,f,T,H){return i==null?[]:(wt(f)||(f=f==null?[]:[f]),T=H?e:T,wt(T)||(T=T==null?[]:[T]),iw(i,f,T))}var rR=Nc(function(i,f,T){i[T?0:1].push(f)},function(){return[[],[]]});function iR(i,f,T){var H=wt(i)?A:Le,q=arguments.length<3;return H(i,lt(f,4),T,q,Yo)}function oR(i,f,T){var H=wt(i)?F:Le,q=arguments.length<3;return H(i,lt(f,4),T,q,qy)}function sR(i,f){var T=wt(i)?kr:Gy;return T(i,qc(lt(f,3)))}function aR(i){var f=wt(i)?Hy:JI;return f(i)}function lR(i,f,T){(T?Or(i,f,T):f===e)?f=1:f=At(f);var H=wt(i)?II:eE;return H(i,f)}function cR(i){var f=wt(i)?EI:nE;return f(i)}function uR(i){if(i==null)return 0;if(Kr(i))return Yc(i)?Et(i):i.length;var f=Ar(i);return f==Je||f==Hn?i.size:Cd(i).length}function hR(i,f,T){var H=wt(i)?W:rE;return T&&Or(i,f,T)&&(f=e),H(i,lt(f,3))}var dR=It(function(i,f){if(i==null)return[];var T=f.length;return T>1&&Or(i,f[0],f[1])?f=[]:T>2&&Or(f[0],f[1],f[2])&&(f=[f[0]]),iw(i,pr(f,1),[])}),Vc=KT||function(){return en.Date.now()};function pR(i,f){if(typeof f!="function")throw new tn(y);return i=At(i),function(){if(--i<1)return f.apply(this,arguments)}}function Zw(i,f,T){return f=T?e:f,f=i&&f==null?i.length:f,So(i,R,e,e,e,e,f)}function Jw(i,f){var T;if(typeof f!="function")throw new tn(y);return i=At(i),function(){return--i>0&&(T=f.apply(this,arguments)),i<=1&&(f=e),T}}var Kd=It(function(i,f,T){var H=d;if(T.length){var q=Pe(T,va(Kd));H|=k}return So(i,H,f,T,q)}),eb=It(function(i,f,T){var H=d|w;if(T.length){var q=Pe(T,va(eb));H|=k}return So(f,H,i,T,q)});function tb(i,f,T){f=T?e:f;var H=So(i,E,e,e,e,e,e,f);return H.placeholder=tb.placeholder,H}function nb(i,f,T){f=T?e:f;var H=So(i,M,e,e,e,e,e,f);return H.placeholder=nb.placeholder,H}function rb(i,f,T){var H,q,ee,ae,de,ve,Ie=0,Ee=!1,Ne=!1,Ue=!0;if(typeof i!="function")throw new tn(y);f=Si(f)||0,Cn(T)&&(Ee=!!T.leading,Ne="maxWait"in T,ee=Ne?tr(Si(T.maxWait)||0,f):ee,Ue="trailing"in T?!!T.trailing:Ue);function Ze(Wn){var ji=H,To=q;return H=q=e,Ie=Wn,ae=i.apply(To,ji),ae}function ut(Wn){return Ie=Wn,de=dl(Lt,f),Ee?Ze(Wn):ae}function $t(Wn){var ji=Wn-ve,To=Wn-Ie,Cb=f-ji;return Ne?Sr(Cb,ee-To):Cb}function ht(Wn){var ji=Wn-ve,To=Wn-Ie;return ve===e||ji>=f||ji<0||Ne&&To>=ee}function Lt(){var Wn=Vc();if(ht(Wn))return Pt(Wn);de=dl(Lt,$t(Wn))}function Pt(Wn){return de=e,Ue&&H?Ze(Wn):(H=q=e,ae)}function li(){de!==e&&pw(de),Ie=0,H=ve=q=de=e}function Nr(){return de===e?ae:Pt(Vc())}function ci(){var Wn=Vc(),ji=ht(Wn);if(H=arguments,q=this,ve=Wn,ji){if(de===e)return ut(ve);if(Ne)return pw(de),de=dl(Lt,f),Ze(ve)}return de===e&&(de=dl(Lt,f)),ae}return ci.cancel=li,ci.flush=Nr,ci}var gR=It(function(i,f){return Ky(i,1,f)}),fR=It(function(i,f,T){return Ky(i,Si(f)||0,T)});function mR(i){return So(i,L)}function Kc(i,f){if(typeof i!="function"||f!=null&&typeof f!="function")throw new tn(y);var T=function(){var H=arguments,q=f?f.apply(this,H):H[0],ee=T.cache;if(ee.has(q))return ee.get(q);var ae=i.apply(this,H);return T.cache=ee.set(q,ae)||ee,ae};return T.cache=new(Kc.Cache||Co),T}Kc.Cache=Co;function qc(i){if(typeof i!="function")throw new tn(y);return function(){var f=arguments;switch(f.length){case 0:return!i.call(this);case 1:return!i.call(this,f[0]);case 2:return!i.call(this,f[0],f[1]);case 3:return!i.call(this,f[0],f[1],f[2])}return!i.apply(this,f)}}function vR(i){return Jw(2,i)}var yR=iE(function(i,f){f=f.length==1&&wt(f[0])?v(f[0],it(lt())):v(pr(f,1),it(lt()));var T=f.length;return It(function(H){for(var q=-1,ee=Sr(H.length,T);++q<ee;)H[q]=f[q].call(this,H[q]);return or(i,this,H)})}),qd=It(function(i,f){var T=Pe(f,va(qd));return So(i,k,e,f,T)}),ib=It(function(i,f){var T=Pe(f,va(ib));return So(i,C,e,f,T)}),wR=Ao(function(i,f){return So(i,O,e,e,e,f)});function bR(i,f){if(typeof i!="function")throw new tn(y);return f=f===e?f:At(f),It(i,f)}function xR(i,f){if(typeof i!="function")throw new tn(y);return f=f==null?0:tr(At(f),0),It(function(T){var H=T[f],q=Zo(T,0,f);return H&&$(q,H),or(i,this,q)})}function CR(i,f,T){var H=!0,q=!0;if(typeof i!="function")throw new tn(y);return Cn(T)&&(H="leading"in T?!!T.leading:H,q="trailing"in T?!!T.trailing:q),rb(i,f,{leading:H,maxWait:f,trailing:q})}function kR(i){return Zw(i,1)}function SR(i,f){return qd(Ed(f),i)}function AR(){if(!arguments.length)return[];var i=arguments[0];return wt(i)?i:[i]}function _R(i){return xi(i,c)}function $R(i,f){return f=typeof f=="function"?f:e,xi(i,c,f)}function MR(i){return xi(i,a|c)}function TR(i,f){return f=typeof f=="function"?f:e,xi(i,a|c,f)}function IR(i,f){return f==null||Vy(i,f,cr(f))}function zi(i,f){return i===f||i!==i&&f!==f}var ER=Wc(wd),LR=Wc(function(i,f){return i>=f}),Ds=Qy((function(){return arguments})())?Qy:function(i){return Tn(i)&&Jt.call(i,"callee")&&!Fy.call(i,"callee")},wt=xe.isArray,RR=Ur?it(Ur):zI;function Kr(i){return i!=null&&Gc(i.length)&&!$o(i)}function Pn(i){return Tn(i)&&Kr(i)}function OR(i){return i===!0||i===!1||Tn(i)&&Rr(i)==_e}var Jo=GT||ip,NR=qo?it(qo):jI;function DR(i){return Tn(i)&&i.nodeType===1&&!pl(i)}function FR(i){if(i==null)return!0;if(Kr(i)&&(wt(i)||typeof i=="string"||typeof i.splice=="function"||Jo(i)||ya(i)||Ds(i)))return!i.length;var f=Ar(i);if(f==Je||f==Hn)return!i.size;if(hl(i))return!Cd(i).length;for(var T in i)if(Jt.call(i,T))return!1;return!0}function PR(i,f){return ll(i,f)}function WR(i,f,T){T=typeof T=="function"?T:e;var H=T?T(i,f):e;return H===e?ll(i,f,e,T):!!H}function Gd(i){if(!Tn(i))return!1;var f=Rr(i);return f==Ge||f==Te||typeof i.message=="string"&&typeof i.name=="string"&&!pl(i)}function BR(i){return typeof i=="number"&&Wy(i)}function $o(i){if(!Cn(i))return!1;var f=Rr(i);return f==Ve||f==ct||f==fe||f==Zr}function ob(i){return typeof i=="number"&&i==At(i)}function Gc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Cn(i){var f=typeof i;return i!=null&&(f=="object"||f=="function")}function Tn(i){return i!=null&&typeof i=="object"}var sb=$n?it($n):UI;function zR(i,f){return i===f||xd(i,f,Pd(f))}function jR(i,f,T){return T=typeof T=="function"?T:e,xd(i,f,Pd(f),T)}function HR(i){return ab(i)&&i!=+i}function UR(i){if($E(i))throw new ot(g);return Zy(i)}function VR(i){return i===null}function KR(i){return i==null}function ab(i){return typeof i=="number"||Tn(i)&&Rr(i)==dt}function pl(i){if(!Tn(i)||Rr(i)!=On)return!1;var f=xc(i);if(f===null)return!0;var T=Jt.call(f,"constructor")&&f.constructor;return typeof T=="function"&&T instanceof T&&vc.call(T)==jT}var Yd=ni?it(ni):VI;function qR(i){return ob(i)&&i>=-U&&i<=U}var lb=ri?it(ri):KI;function Yc(i){return typeof i=="string"||!wt(i)&&Tn(i)&&Rr(i)==rr}function ai(i){return typeof i=="symbol"||Tn(i)&&Rr(i)==Mr}var ya=yi?it(yi):qI;function GR(i){return i===e}function YR(i){return Tn(i)&&Ar(i)==He}function XR(i){return Tn(i)&&Rr(i)==zt}var QR=Wc(kd),ZR=Wc(function(i,f){return i<=f});function cb(i){if(!i)return[];if(Kr(i))return Yc(i)?vt(i):Vr(i);if(el&&i[el])return be(i[el]());var f=Ar(i),T=f==Je?Me:f==Hn?je:wa;return T(i)}function Mo(i){if(!i)return i===0?i:0;if(i=Si(i),i===j||i===-j){var f=i<0?-1:1;return f*G}return i===i?i:0}function At(i){var f=Mo(i),T=f%1;return f===f?T?f-T:f:0}function ub(i){return i?Ls(At(i),0,te):0}function Si(i){if(typeof i=="number")return i;if(ai(i))return Z;if(Cn(i)){var f=typeof i.valueOf=="function"?i.valueOf():i;i=Cn(f)?f+"":f}if(typeof i!="string")return i===0?i:+i;i=ln(i);var T=sa.test(i);return T||Dn.test(i)?an(i.slice(2),T?2:8):Ot.test(i)?Z:+i}function hb(i){return ro(i,qr(i))}function JR(i){return i?Ls(At(i),-U,U):i===0?i:0}function Yt(i){return i==null?"":si(i)}var eO=fa(function(i,f){if(hl(f)||Kr(f)){ro(f,cr(f),i);return}for(var T in f)Jt.call(f,T)&&ol(i,T,f[T])}),db=fa(function(i,f){ro(f,qr(f),i)}),Xc=fa(function(i,f,T,H){ro(f,qr(f),i,H)}),tO=fa(function(i,f,T,H){ro(f,cr(f),i,H)}),nO=Ao(md);function rO(i,f){var T=ga(i);return f==null?T:Uy(T,f)}var iO=It(function(i,f){i=_t(i);var T=-1,H=f.length,q=H>2?f[2]:e;for(q&&Or(f[0],f[1],q)&&(H=1);++T<H;)for(var ee=f[T],ae=qr(ee),de=-1,ve=ae.length;++de<ve;){var Ie=ae[de],Ee=i[Ie];(Ee===e||zi(Ee,Mn[Ie])&&!Jt.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),oO=It(function(i){return i.push(e,Tw),or(pb,e,i)});function sO(i,f){return Q(i,lt(f,3),no)}function aO(i,f){return Q(i,lt(f,3),yd)}function lO(i,f){return i==null?i:vd(i,lt(f,3),qr)}function cO(i,f){return i==null?i:Yy(i,lt(f,3),qr)}function uO(i,f){return i&&no(i,lt(f,3))}function hO(i,f){return i&&yd(i,lt(f,3))}function dO(i){return i==null?[]:Ec(i,cr(i))}function pO(i){return i==null?[]:Ec(i,qr(i))}function Xd(i,f,T){var H=i==null?e:Rs(i,f);return H===e?T:H}function gO(i,f){return i!=null&&Lw(i,f,FI)}function Qd(i,f){return i!=null&&Lw(i,f,PI)}var fO=Sw(function(i,f,T){f!=null&&typeof f.toString!="function"&&(f=yc.call(f)),i[f]=T},Jd(Gr)),mO=Sw(function(i,f,T){f!=null&&typeof f.toString!="function"&&(f=yc.call(f)),Jt.call(i,f)?i[f].push(T):i[f]=[T]},lt),vO=It(al);function cr(i){return Kr(i)?jy(i):Cd(i)}function qr(i){return Kr(i)?jy(i,!0):GI(i)}function yO(i,f){var T={};return f=lt(f,3),no(i,function(H,q,ee){ko(T,f(H,q,ee),H)}),T}function wO(i,f){var T={};return f=lt(f,3),no(i,function(H,q,ee){ko(T,q,f(H,q,ee))}),T}var bO=fa(function(i,f,T){Lc(i,f,T)}),pb=fa(function(i,f,T,H){Lc(i,f,T,H)}),xO=Ao(function(i,f){var T={};if(i==null)return T;var H=!1;f=v(f,function(ee){return ee=Qo(ee,i),H||(H=ee.length>1),ee}),ro(i,Dd(i),T),H&&(T=xi(T,a|u|c,fE));for(var q=f.length;q--;)Md(T,f[q]);return T});function CO(i,f){return gb(i,qc(lt(f)))}var kO=Ao(function(i,f){return i==null?{}:XI(i,f)});function gb(i,f){if(i==null)return{};var T=v(Dd(i),function(H){return[H]});return f=lt(f),ow(i,T,function(H,q){return f(H,q[0])})}function SO(i,f,T){f=Qo(f,i);var H=-1,q=f.length;for(q||(q=1,i=e);++H<q;){var ee=i==null?e:i[io(f[H])];ee===e&&(H=q,ee=T),i=$o(ee)?ee.call(i):ee}return i}function AO(i,f,T){return i==null?i:cl(i,f,T)}function _O(i,f,T,H){return H=typeof H=="function"?H:e,i==null?i:cl(i,f,T,H)}var fb=$w(cr),mb=$w(qr);function $O(i,f,T){var H=wt(i),q=H||Jo(i)||ya(i);if(f=lt(f,4),T==null){var ee=i&&i.constructor;q?T=H?new ee:[]:Cn(i)?T=$o(ee)?ga(xc(i)):{}:T={}}return(q?hr:no)(i,function(ae,de,ve){return f(T,ae,de,ve)}),T}function MO(i,f){return i==null?!0:Md(i,f)}function TO(i,f,T){return i==null?i:uw(i,f,Ed(T))}function IO(i,f,T,H){return H=typeof H=="function"?H:e,i==null?i:uw(i,f,Ed(T),H)}function wa(i){return i==null?[]:pn(i,cr(i))}function EO(i){return i==null?[]:pn(i,qr(i))}function LO(i,f,T){return T===e&&(T=f,f=e),T!==e&&(T=Si(T),T=T===T?T:0),f!==e&&(f=Si(f),f=f===f?f:0),Ls(Si(i),f,T)}function RO(i,f,T){return f=Mo(f),T===e?(T=f,f=0):T=Mo(T),i=Si(i),WI(i,f,T)}function OO(i,f,T){if(T&&typeof T!="boolean"&&Or(i,f,T)&&(f=T=e),T===e&&(typeof f=="boolean"?(T=f,f=e):typeof i=="boolean"&&(T=i,i=e)),i===e&&f===e?(i=0,f=1):(i=Mo(i),f===e?(f=i,i=0):f=Mo(f)),i>f){var H=i;i=f,f=H}if(T||i%1||f%1){var q=By();return Sr(i+q*(f-i+We("1e-"+((q+"").length-1))),f)}return Ad(i,f)}var NO=ma(function(i,f,T){return f=f.toLowerCase(),i+(T?vb(f):f)});function vb(i){return Zd(Yt(i).toLowerCase())}function yb(i){return i=Yt(i),i&&i.replace(Sn,gn).replace(yo,"")}function DO(i,f,T){i=Yt(i),f=si(f);var H=i.length;T=T===e?H:Ls(At(T),0,H);var q=T;return T-=f.length,T>=0&&i.slice(T,q)==f}function FO(i){return i=Yt(i),i&&Ya.test(i)?i.replace(uo,V):i}function PO(i){return i=Yt(i),i&&Ni.test(i)?i.replace(wr,"\\$&"):i}var WO=ma(function(i,f,T){return i+(T?"-":"")+f.toLowerCase()}),BO=ma(function(i,f,T){return i+(T?" ":"")+f.toLowerCase()}),zO=xw("toLowerCase");function jO(i,f,T){i=Yt(i),f=At(f);var H=f?Et(i):0;if(!f||H>=f)return i;var q=(f-H)/2;return Pc(Ac(q),T)+i+Pc(Sc(q),T)}function HO(i,f,T){i=Yt(i),f=At(f);var H=f?Et(i):0;return f&&H<f?i+Pc(f-H,T):i}function UO(i,f,T){i=Yt(i),f=At(f);var H=f?Et(i):0;return f&&H<f?Pc(f-H,T)+i:i}function VO(i,f,T){return T||f==null?f=0:f&&(f=+f),ZT(Yt(i).replace(bn,""),f||0)}function KO(i,f,T){return(T?Or(i,f,T):f===e)?f=1:f=At(f),_d(Yt(i),f)}function qO(){var i=arguments,f=Yt(i[0]);return i.length<3?f:f.replace(i[1],i[2])}var GO=ma(function(i,f,T){return i+(T?"_":"")+f.toLowerCase()});function YO(i,f,T){return T&&typeof T!="number"&&Or(i,f,T)&&(f=T=e),T=T===e?te:T>>>0,T?(i=Yt(i),i&&(typeof f=="string"||f!=null&&!Yd(f))&&(f=si(f),!f&&oe(i))?Zo(vt(i),0,T):i.split(f,T)):[]}var XO=ma(function(i,f,T){return i+(T?" ":"")+Zd(f)});function QO(i,f,T){return i=Yt(i),T=T==null?0:Ls(At(T),0,i.length),f=si(f),i.slice(T,T+f.length)==f}function ZO(i,f,T){var H=J.templateSettings;T&&Or(i,f,T)&&(f=e),i=Yt(i),f=Xc({},f,H,Mw);var q=Xc({},f.imports,H.imports,Mw),ee=cr(q),ae=pn(q,ee),de,ve,Ie=0,Ee=f.interpolate||di,Ne="__p += '",Ue=Lr((f.escape||di).source+"|"+Ee.source+"|"+(Ee===ws?Fi:di).source+"|"+(f.evaluate||di).source+"|$","g"),Ze="//# sourceURL="+(Jt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++to+"]")+`
|
1474
|
+
`;i.replace(Ue,function(ht,Lt,Pt,li,Nr,ci){return Pt||(Pt=li),Ne+=i.slice(Ie,ci).replace(Cr,X),Lt&&(de=!0,Ne+=`' +
|
1475
|
+
__e(`+Lt+`) +
|
1476
|
+
'`),Nr&&(ve=!0,Ne+=`';
|
1477
|
+
`+Nr+`;
|
1478
|
+
__p += '`),Pt&&(Ne+=`' +
|
1479
|
+
((__t = (`+Pt+`)) == null ? '' : __t) +
|
1480
|
+
'`),Ie=ci+ht.length,ht}),Ne+=`';
|
1481
|
+
`;var ut=Jt.call(f,"variable")&&f.variable;if(!ut)Ne=`with (obj) {
|
1482
|
+
`+Ne+`
|
1483
|
+
}
|
1484
|
+
`;else if(Qa.test(ut))throw new ot(x);Ne=(ve?Ne.replace(Li,""):Ne).replace(Ri,"$1").replace(co,"$1;"),Ne="function("+(ut||"obj")+`) {
|
1485
|
+
`+(ut?"":`obj || (obj = {});
|
1486
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ve?`, __j = Array.prototype.join;
|
1487
|
+
function print() { __p += __j.call(arguments, '') }
|
1488
|
+
`:`;
|
1489
|
+
`)+Ne+`return __p
|
1490
|
+
}`;var $t=bb(function(){return kt(ee,Ze+"return "+Ne).apply(e,ae)});if($t.source=Ne,Gd($t))throw $t;return $t}function JO(i){return Yt(i).toLowerCase()}function e2(i){return Yt(i).toUpperCase()}function t2(i,f,T){if(i=Yt(i),i&&(T||f===e))return ln(i);if(!i||!(f=si(f)))return i;var H=vt(i),q=vt(f),ee=Ct(H,q),ae=Kn(H,q)+1;return Zo(H,ee,ae).join("")}function n2(i,f,T){if(i=Yt(i),i&&(T||f===e))return i.slice(0,Tt(i)+1);if(!i||!(f=si(f)))return i;var H=vt(i),q=Kn(H,vt(f))+1;return Zo(H,0,q).join("")}function r2(i,f,T){if(i=Yt(i),i&&(T||f===e))return i.replace(bn,"");if(!i||!(f=si(f)))return i;var H=vt(i),q=Ct(H,vt(f));return Zo(H,q).join("")}function i2(i,f){var T=I,H=z;if(Cn(f)){var q="separator"in f?f.separator:q;T="length"in f?At(f.length):T,H="omission"in f?si(f.omission):H}i=Yt(i);var ee=i.length;if(oe(i)){var ae=vt(i);ee=ae.length}if(T>=ee)return i;var de=T-Et(H);if(de<1)return H;var ve=ae?Zo(ae,0,de).join(""):i.slice(0,de);if(q===e)return ve+H;if(ae&&(de+=ve.length-de),Yd(q)){if(i.slice(de).search(q)){var Ie,Ee=ve;for(q.global||(q=Lr(q.source,Yt(ei.exec(q))+"g")),q.lastIndex=0;Ie=q.exec(Ee);)var Ne=Ie.index;ve=ve.slice(0,Ne===e?de:Ne)}}else if(i.indexOf(si(q),de)!=de){var Ue=ve.lastIndexOf(q);Ue>-1&&(ve=ve.slice(0,Ue))}return ve+H}function o2(i){return i=Yt(i),i&&Do.test(i)?i.replace(ur,at):i}var s2=ma(function(i,f,T){return i+(T?" ":"")+f.toUpperCase()}),Zd=xw("toUpperCase");function wb(i,f,T){return i=Yt(i),f=T?e:f,f===e?ge(i)?fn(i):Y(i):i.match(f)||[]}var bb=It(function(i,f){try{return or(i,e,f)}catch(T){return Gd(T)?T:new ot(T)}}),a2=Ao(function(i,f){return hr(f,function(T){T=io(T),ko(i,T,Kd(i[T],i))}),i});function l2(i){var f=i==null?0:i.length,T=lt();return i=f?v(i,function(H){if(typeof H[1]!="function")throw new tn(y);return[T(H[0]),H[1]]}):[],It(function(H){for(var q=-1;++q<f;){var ee=i[q];if(or(ee[0],this,H))return or(ee[1],this,H)}})}function c2(i){return OI(xi(i,a))}function Jd(i){return function(){return i}}function u2(i,f){return i==null||i!==i?f:i}var h2=kw(),d2=kw(!0);function Gr(i){return i}function ep(i){return Jy(typeof i=="function"?i:xi(i,a))}function p2(i){return tw(xi(i,a))}function g2(i,f){return nw(i,xi(f,a))}var f2=It(function(i,f){return function(T){return al(T,i,f)}}),m2=It(function(i,f){return function(T){return al(i,T,f)}});function tp(i,f,T){var H=cr(f),q=Ec(f,H);T==null&&!(Cn(f)&&(q.length||!H.length))&&(T=f,f=i,i=this,q=Ec(f,cr(f)));var ee=!(Cn(T)&&"chain"in T)||!!T.chain,ae=$o(i);return hr(q,function(de){var ve=f[de];i[de]=ve,ae&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Ee=i(this.__wrapped__),Ne=Ee.__actions__=Vr(this.__actions__);return Ne.push({func:ve,args:arguments,thisArg:i}),Ee.__chain__=Ie,Ee}return ve.apply(i,$([this.value()],arguments))})}),i}function v2(){return en._===this&&(en._=HT),this}function np(){}function y2(i){return i=At(i),It(function(f){return rw(f,i)})}var w2=Rd(v),b2=Rd(dr),x2=Rd(W);function xb(i){return Bd(i)?we(io(i)):QI(i)}function C2(i){return function(f){return i==null?e:Rs(i,f)}}var k2=Aw(),S2=Aw(!0);function rp(){return[]}function ip(){return!1}function A2(){return{}}function _2(){return""}function $2(){return!0}function M2(i,f){if(i=At(i),i<1||i>U)return[];var T=te,H=Sr(i,te);f=lt(f),i-=te;for(var q=qe(H,f);++T<i;)f(T);return q}function T2(i){return wt(i)?v(i,io):ai(i)?[i]:Vr(zw(Yt(i)))}function I2(i){var f=++zT;return Yt(i)+f}var E2=Fc(function(i,f){return i+f},0),L2=Od("ceil"),R2=Fc(function(i,f){return i/f},1),O2=Od("floor");function N2(i){return i&&i.length?Ic(i,Gr,wd):e}function D2(i,f){return i&&i.length?Ic(i,lt(f,2),wd):e}function F2(i){return me(i,Gr)}function P2(i,f){return me(i,lt(f,2))}function W2(i){return i&&i.length?Ic(i,Gr,kd):e}function B2(i,f){return i&&i.length?Ic(i,lt(f,2),kd):e}var z2=Fc(function(i,f){return i*f},1),j2=Od("round"),H2=Fc(function(i,f){return i-f},0);function U2(i){return i&&i.length?rt(i,Gr):0}function V2(i,f){return i&&i.length?rt(i,lt(f,2)):0}return J.after=pR,J.ary=Zw,J.assign=eO,J.assignIn=db,J.assignInWith=Xc,J.assignWith=tO,J.at=nO,J.before=Jw,J.bind=Kd,J.bindAll=a2,J.bindKey=eb,J.castArray=AR,J.chain=Yw,J.chunk=OE,J.compact=NE,J.concat=DE,J.cond=l2,J.conforms=c2,J.constant=Jd,J.countBy=UL,J.create=rO,J.curry=tb,J.curryRight=nb,J.debounce=rb,J.defaults=iO,J.defaultsDeep=oO,J.defer=gR,J.delay=fR,J.difference=FE,J.differenceBy=PE,J.differenceWith=WE,J.drop=BE,J.dropRight=zE,J.dropRightWhile=jE,J.dropWhile=HE,J.fill=UE,J.filter=KL,J.flatMap=YL,J.flatMapDeep=XL,J.flatMapDepth=QL,J.flatten=Vw,J.flattenDeep=VE,J.flattenDepth=KE,J.flip=mR,J.flow=h2,J.flowRight=d2,J.fromPairs=qE,J.functions=dO,J.functionsIn=pO,J.groupBy=ZL,J.initial=YE,J.intersection=XE,J.intersectionBy=QE,J.intersectionWith=ZE,J.invert=fO,J.invertBy=mO,J.invokeMap=eR,J.iteratee=ep,J.keyBy=tR,J.keys=cr,J.keysIn=qr,J.map=Uc,J.mapKeys=yO,J.mapValues=wO,J.matches=p2,J.matchesProperty=g2,J.memoize=Kc,J.merge=bO,J.mergeWith=pb,J.method=f2,J.methodOf=m2,J.mixin=tp,J.negate=qc,J.nthArg=y2,J.omit=xO,J.omitBy=CO,J.once=vR,J.orderBy=nR,J.over=w2,J.overArgs=yR,J.overEvery=b2,J.overSome=x2,J.partial=qd,J.partialRight=ib,J.partition=rR,J.pick=kO,J.pickBy=gb,J.property=xb,J.propertyOf=C2,J.pull=nL,J.pullAll=qw,J.pullAllBy=rL,J.pullAllWith=iL,J.pullAt=oL,J.range=k2,J.rangeRight=S2,J.rearg=wR,J.reject=sR,J.remove=sL,J.rest=bR,J.reverse=Ud,J.sampleSize=lR,J.set=AO,J.setWith=_O,J.shuffle=cR,J.slice=aL,J.sortBy=dR,J.sortedUniq=gL,J.sortedUniqBy=fL,J.split=YO,J.spread=xR,J.tail=mL,J.take=vL,J.takeRight=yL,J.takeRightWhile=wL,J.takeWhile=bL,J.tap=NL,J.throttle=CR,J.thru=Hc,J.toArray=cb,J.toPairs=fb,J.toPairsIn=mb,J.toPath=T2,J.toPlainObject=hb,J.transform=$O,J.unary=kR,J.union=xL,J.unionBy=CL,J.unionWith=kL,J.uniq=SL,J.uniqBy=AL,J.uniqWith=_L,J.unset=MO,J.unzip=Vd,J.unzipWith=Gw,J.update=TO,J.updateWith=IO,J.values=wa,J.valuesIn=EO,J.without=$L,J.words=wb,J.wrap=SR,J.xor=ML,J.xorBy=TL,J.xorWith=IL,J.zip=EL,J.zipObject=LL,J.zipObjectDeep=RL,J.zipWith=OL,J.entries=fb,J.entriesIn=mb,J.extend=db,J.extendWith=Xc,tp(J,J),J.add=E2,J.attempt=bb,J.camelCase=NO,J.capitalize=vb,J.ceil=L2,J.clamp=LO,J.clone=_R,J.cloneDeep=MR,J.cloneDeepWith=TR,J.cloneWith=$R,J.conformsTo=IR,J.deburr=yb,J.defaultTo=u2,J.divide=R2,J.endsWith=DO,J.eq=zi,J.escape=FO,J.escapeRegExp=PO,J.every=VL,J.find=qL,J.findIndex=Hw,J.findKey=sO,J.findLast=GL,J.findLastIndex=Uw,J.findLastKey=aO,J.floor=O2,J.forEach=Xw,J.forEachRight=Qw,J.forIn=lO,J.forInRight=cO,J.forOwn=uO,J.forOwnRight=hO,J.get=Xd,J.gt=ER,J.gte=LR,J.has=gO,J.hasIn=Qd,J.head=Kw,J.identity=Gr,J.includes=JL,J.indexOf=GE,J.inRange=RO,J.invoke=vO,J.isArguments=Ds,J.isArray=wt,J.isArrayBuffer=RR,J.isArrayLike=Kr,J.isArrayLikeObject=Pn,J.isBoolean=OR,J.isBuffer=Jo,J.isDate=NR,J.isElement=DR,J.isEmpty=FR,J.isEqual=PR,J.isEqualWith=WR,J.isError=Gd,J.isFinite=BR,J.isFunction=$o,J.isInteger=ob,J.isLength=Gc,J.isMap=sb,J.isMatch=zR,J.isMatchWith=jR,J.isNaN=HR,J.isNative=UR,J.isNil=KR,J.isNull=VR,J.isNumber=ab,J.isObject=Cn,J.isObjectLike=Tn,J.isPlainObject=pl,J.isRegExp=Yd,J.isSafeInteger=qR,J.isSet=lb,J.isString=Yc,J.isSymbol=ai,J.isTypedArray=ya,J.isUndefined=GR,J.isWeakMap=YR,J.isWeakSet=XR,J.join=JE,J.kebabCase=WO,J.last=ki,J.lastIndexOf=eL,J.lowerCase=BO,J.lowerFirst=zO,J.lt=QR,J.lte=ZR,J.max=N2,J.maxBy=D2,J.mean=F2,J.meanBy=P2,J.min=W2,J.minBy=B2,J.stubArray=rp,J.stubFalse=ip,J.stubObject=A2,J.stubString=_2,J.stubTrue=$2,J.multiply=z2,J.nth=tL,J.noConflict=v2,J.noop=np,J.now=Vc,J.pad=jO,J.padEnd=HO,J.padStart=UO,J.parseInt=VO,J.random=OO,J.reduce=iR,J.reduceRight=oR,J.repeat=KO,J.replace=qO,J.result=SO,J.round=j2,J.runInContext=pe,J.sample=aR,J.size=uR,J.snakeCase=GO,J.some=hR,J.sortedIndex=lL,J.sortedIndexBy=cL,J.sortedIndexOf=uL,J.sortedLastIndex=hL,J.sortedLastIndexBy=dL,J.sortedLastIndexOf=pL,J.startCase=XO,J.startsWith=QO,J.subtract=H2,J.sum=U2,J.sumBy=V2,J.template=ZO,J.times=M2,J.toFinite=Mo,J.toInteger=At,J.toLength=ub,J.toLower=JO,J.toNumber=Si,J.toSafeInteger=JR,J.toString=Yt,J.toUpper=e2,J.trim=t2,J.trimEnd=n2,J.trimStart=r2,J.truncate=i2,J.unescape=o2,J.uniqueId=I2,J.upperCase=s2,J.upperFirst=Zd,J.each=Xw,J.eachRight=Qw,J.first=Kw,tp(J,(function(){var i={};return no(J,function(f,T){Jt.call(J.prototype,T)||(i[T]=f)}),i})(),{chain:!1}),J.VERSION=r,hr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),hr(["drop","take"],function(i,f){Dt.prototype[i]=function(T){T=T===e?1:tr(At(T),0);var H=this.__filtered__&&!f?new Dt(this):this.clone();return H.__filtered__?H.__takeCount__=Sr(T,H.__takeCount__):H.__views__.push({size:Sr(T,te),type:i+(H.__dir__<0?"Right":"")}),H},Dt.prototype[i+"Right"]=function(T){return this.reverse()[i](T).reverse()}}),hr(["filter","map","takeWhile"],function(i,f){var T=f+1,H=T==_||T==D;Dt.prototype[i]=function(q){var ee=this.clone();return ee.__iteratees__.push({iteratee:lt(q,3),type:T}),ee.__filtered__=ee.__filtered__||H,ee}}),hr(["head","last"],function(i,f){var T="take"+(f?"Right":"");Dt.prototype[i]=function(){return this[T](1).value()[0]}}),hr(["initial","tail"],function(i,f){var T="drop"+(f?"":"Right");Dt.prototype[i]=function(){return this.__filtered__?new Dt(this):this[T](1)}}),Dt.prototype.compact=function(){return this.filter(Gr)},Dt.prototype.find=function(i){return this.filter(i).head()},Dt.prototype.findLast=function(i){return this.reverse().find(i)},Dt.prototype.invokeMap=It(function(i,f){return typeof i=="function"?new Dt(this):this.map(function(T){return al(T,i,f)})}),Dt.prototype.reject=function(i){return this.filter(qc(lt(i)))},Dt.prototype.slice=function(i,f){i=At(i);var T=this;return T.__filtered__&&(i>0||f<0)?new Dt(T):(i<0?T=T.takeRight(-i):i&&(T=T.drop(i)),f!==e&&(f=At(f),T=f<0?T.dropRight(-f):T.take(f-i)),T)},Dt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Dt.prototype.toArray=function(){return this.take(te)},no(Dt.prototype,function(i,f){var T=/^(?:filter|find|map|reject)|While$/.test(f),H=/^(?:head|last)$/.test(f),q=J[H?"take"+(f=="last"?"Right":""):f],ee=H||/^find/.test(f);q&&(J.prototype[f]=function(){var ae=this.__wrapped__,de=H?[1]:arguments,ve=ae instanceof Dt,Ie=de[0],Ee=ve||wt(ae),Ne=function(Lt){var Pt=q.apply(J,$([Lt],de));return H&&Ue?Pt[0]:Pt};Ee&&T&&typeof Ie=="function"&&Ie.length!=1&&(ve=Ee=!1);var Ue=this.__chain__,Ze=!!this.__actions__.length,ut=ee&&!Ue,$t=ve&&!Ze;if(!ee&&Ee){ae=$t?ae:new Dt(this);var ht=i.apply(ae,de);return ht.__actions__.push({func:Hc,args:[Ne],thisArg:e}),new bi(ht,Ue)}return ut&&$t?i.apply(this,de):(ht=this.thru(Ne),ut?H?ht.value()[0]:ht.value():ht)})}),hr(["pop","push","shift","sort","splice","unshift"],function(i){var f=lr[i],T=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var q=arguments;if(H&&!this.__chain__){var ee=this.value();return f.apply(wt(ee)?ee:[],q)}return this[T](function(ae){return f.apply(wt(ae)?ae:[],q)})}}),no(Dt.prototype,function(i,f){var T=J[f];if(T){var H=T.name+"";Jt.call(pa,H)||(pa[H]=[]),pa[H].push({name:f,func:T})}}),pa[Dc(e,w).name]=[{name:"wrapper",func:e}],Dt.prototype.clone=oI,Dt.prototype.reverse=sI,Dt.prototype.value=aI,J.prototype.at=DL,J.prototype.chain=FL,J.prototype.commit=PL,J.prototype.next=WL,J.prototype.plant=zL,J.prototype.reverse=jL,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=HL,J.prototype.first=J.prototype.head,el&&(J.prototype[el]=BL),J}),Ft=qn();Vn?((Vn.exports=Ft)._=Ft,hn._=Ft):en._=Ft}).call(jC)})(Dl,Dl.exports)),Dl.exports}var UC=In("O",HC());In("D",wl(UC)).debounce(function(){this.rebuildDisplayText()},300);var lf={exports:{}},cf;function VC(){return cf||(cf=1,(function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()})(lf)),lf.exports}VC();const KC=!0,Gn="u-",qC="uplot",GC=Gn+"hz",YC=Gn+"vt",XC=Gn+"title",QC=Gn+"wrap",ZC=Gn+"under",JC=Gn+"over",ek=Gn+"axis",us=Gn+"off",tk=Gn+"select",nk=Gn+"cursor-x",rk=Gn+"cursor-y",ik=Gn+"cursor-pt",ok=Gn+"legend",sk=Gn+"live",ak=Gn+"inline",lk=Gn+"series",ck=Gn+"marker",uf=Gn+"label",uk=Gn+"value",Ra="width",Oa="height",Na="top",hf="bottom",Vs="left",Iu="right",Eu="#000",df=Eu+"0",Lu="mousemove",pf="mousedown",Ru="mouseup",gf="mouseenter",ff="mouseleave",mf="dblclick",hk="resize",dk="scroll",vf="change",Fl="dppxchange",Ou="--",Ks=typeof window<"u",Nu=Ks?document:null,qs=Ks?window:null,pk=Ks?navigator:null;let Ht,Pl;function Du(){let n=devicePixelRatio;Ht!=n&&(Ht=n,Pl&&Wu(vf,Pl,Du),Pl=matchMedia(`(min-resolution: ${Ht-.001}dppx) and (max-resolution: ${Ht+.001}dppx)`),hs(vf,Pl,Du),qs.dispatchEvent(new CustomEvent(Fl)))}function Yr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Fu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function cn(n,t,e){n.style[t]=e+"px"}function $i(n,t,e,r){let m=Nu.createElement(n);return t!=null&&Yr(m,t),e!=null&&e.insertBefore(m,r),m}function ui(n,t){return $i("div",n,t)}const yf=new WeakMap;function Ki(n,t,e,r,m){let g="translate("+t+"px,"+e+"px)",y=yf.get(n);g!=y&&(n.style.transform=g,yf.set(n,g),t<0||e<0||t>r||e>m?Yr(n,us):Fu(n,us))}const wf=new WeakMap;function bf(n,t,e){let r=t+e,m=wf.get(n);r!=m&&(wf.set(n,r),n.style.background=t,n.style.borderColor=e)}const xf=new WeakMap;function Cf(n,t,e,r){let m=t+""+e,g=xf.get(n);m!=g&&(xf.set(n,m),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const Pu={passive:!0},gk={...Pu,capture:!0};function hs(n,t,e,r){t.addEventListener(n,e,r?gk:Pu)}function Wu(n,t,e,r){t.removeEventListener(n,e,Pu)}Ks&&Du();function Mi(n,t,e,r){let m;e=e||0,r=r||t.length-1;let g=r<=2147483647;for(;r-e>1;)m=g?e+r>>1:Qr((e+r)/2),t[m]<n?e=m:r=m;return n-t[e]<=t[r]-n?e:r}function kf(n){return(t,e,r)=>{let m=-1,g=-1;for(let y=e;y<=r;y++)if(n(t[y])){m=y;break}for(let y=r;y>=e;y--)if(n(t[y])){g=y;break}return[m,g]}}const Sf=n=>n!=null,Af=n=>n!=null&&n>0,Wl=kf(Sf),fk=kf(Af);function mk(n,t,e,r=0,m=!1){let g=m?fk:Wl,y=m?Af:Sf;[t,e]=g(n,t,e);let x=n[t],h=n[t];if(t>-1)if(r==1)x=n[t],h=n[e];else if(r==-1)x=n[e],h=n[t];else for(let p=t;p<=e;p++){let s=n[p];y(s)&&(s<x?x=s:s>h&&(h=s))}return[x??nn,h??-nn]}function Bl(n,t,e,r){let m=Mf(n),g=Mf(t);n==t&&(m==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?so:Tf,x=m==1?Qr:hi,h=g==1?hi:Qr,p=x(y(Yn(n))),s=h(y(Yn(t))),a=Gs(e,p),u=Gs(e,s);return e==10&&(p<0&&(a=rn(a,-p)),s<0&&(u=rn(u,-s))),r||e==2?(n=a*m,t=u*g):(n=Df(n,a),t=Hl(t,u)),[n,t]}function Bu(n,t,e,r){let m=Bl(n,t,e,r);return n==0&&(m[0]=0),t==0&&(m[1]=0),m}const zu=.1,_f={mode:3,pad:zu},Da={pad:0,soft:null,mode:0},vk={min:Da,max:Da};function zl(n,t,e,r){return Ul(e)?$f(n,t,e):(Da.pad=e,Da.soft=r?0:null,Da.mode=r?3:0,$f(n,t,vk))}function Bt(n,t){return n??t}function yk(n,t,e){for(t=Bt(t,0),e=Bt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function $f(n,t,e){let r=e.min,m=e.max,g=Bt(r.pad,0),y=Bt(m.pad,0),x=Bt(r.hard,-nn),h=Bt(m.hard,nn),p=Bt(r.soft,nn),s=Bt(m.soft,-nn),a=Bt(r.mode,0),u=Bt(m.mode,0),c=t-n,o=so(c),l=_r(Yn(n),Yn(t)),d=so(l),w=Yn(d-o);(c<1e-24||w>10)&&(c=0,(n==0||t==0)&&(c=1e-24,a==2&&p!=nn&&(g=0),u==2&&s!=-nn&&(y=0)));let b=c||l||1e3,E=so(b),M=Gs(10,Qr(E)),k=b*(c==0?n==0?.1:1:g),C=rn(Df(n-k,M/10),24),R=n>=p&&(a==1||a==3&&C<=p||a==2&&C>=p)?p:nn,O=_r(x,C<R&&n>=R?R:Ti(R,C)),L=b*(c==0?t==0?.1:1:y),I=rn(Hl(t+L,M/10),24),z=t<=s&&(u==1||u==3&&I>=s||u==2&&I<=s)?s:-nn,P=Ti(h,I>z&&t<=z?z:_r(z,I));return O==P&&O==0&&(P=100),[O,P]}const wk=new Intl.NumberFormat(Ks?pk.language:"en-US"),ju=n=>wk.format(n),Xr=Math,jl=Xr.PI,Yn=Xr.abs,Qr=Xr.floor,Xn=Xr.round,hi=Xr.ceil,Ti=Xr.min,_r=Xr.max,Gs=Xr.pow,Mf=Xr.sign,so=Xr.log10,Tf=Xr.log2,bk=(n,t=1)=>Xr.sinh(n)*t,Hu=(n,t=1)=>Xr.asinh(n/t),nn=1/0;function If(n){return(so((n^n>>31)-(n>>31))|0)+1}function Uu(n,t,e){return Ti(_r(n,t),e)}function Ef(n){return typeof n=="function"}function Rt(n){return Ef(n)?n:()=>n}const xk=()=>{},Lf=n=>n,Rf=(n,t)=>t,Ck=n=>null,Of=n=>!0,Nf=(n,t)=>n==t,kk=/\.\d*?(?=9{6,}|0{6,})/gm,ds=n=>{if(Pf(n)||Oo.has(n))return n;const t=`${n}`,e=t.match(kk);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[m,g]=t.split("e");return+`${ds(m)}e${g}`}return rn(n,r)};function ps(n,t){return ds(rn(ds(n/t))*t)}function Hl(n,t){return ds(hi(ds(n/t))*t)}function Df(n,t){return ds(Qr(ds(n/t))*t)}function rn(n,t=0){if(Pf(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return Xn(r)/e}const Oo=new Map;function Ff(n){return((""+n).split(".")[1]||"").length}function Fa(n,t,e,r){let m=[],g=r.map(Ff);for(let y=t;y<e;y++){let x=Yn(y),h=rn(Gs(n,y),x);for(let p=0;p<r.length;p++){let s=n==10?+`${r[p]}e${y}`:r[p]*h,a=(y>=0?0:x)+(y>=g[p]?0:g[p]),u=n==10?s:rn(s,a);m.push(u),Oo.set(u,a)}}return m}const Pa={},Vu=[],Ys=[null,null],No=Array.isArray,Pf=Number.isInteger,Sk=n=>n===void 0;function Wf(n){return typeof n=="string"}function Ul(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function Ak(n){return n!=null&&typeof n=="object"}const _k=Object.getPrototypeOf(Uint8Array),Bf="__proto__";function Xs(n,t=Ul){let e;if(No(n)){let r=n.find(m=>m!=null);if(No(r)||t(r)){e=Array(n.length);for(let m=0;m<n.length;m++)e[m]=Xs(n[m],t)}else e=n.slice()}else if(n instanceof _k)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Bf&&(e[r]=Xs(n[r],t))}else e=n;return e}function zn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let m in r)m!=Bf&&(Ul(n[m])?zn(n[m],Xs(r[m])):n[m]=Xs(r[m]))}return n}const $k=0,Mk=1,Tk=2;function Ik(n,t,e){for(let r=0,m,g=-1;r<t.length;r++){let y=t[r];if(y>g){for(m=y-1;m>=0&&n[m]==null;)n[m--]=null;for(m=y+1;m<e&&n[m]==null;)n[g=m++]=null}}}function Ek(n,t){if(Ok(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return Nk(y[0])||(y=Rk(y)),y}let e=new Set;for(let y=0;y<n.length;y++){let x=n[y][0],h=x.length;for(let p=0;p<h;p++)e.add(x[p])}let r=[Array.from(e).sort((y,x)=>y-x)],m=r[0].length,g=new Map;for(let y=0;y<m;y++)g.set(r[0][y],y);for(let y=0;y<n.length;y++){let x=n[y],h=x[0];for(let p=1;p<x.length;p++){let s=x[p],a=Array(m).fill(void 0),u=t?t[y][p]:Mk,c=[];for(let o=0;o<s.length;o++){let l=s[o],d=g.get(h[o]);l===null?u!=$k&&(a[d]=l,u==Tk&&c.push(d)):a[d]=l}Ik(a,c,m),r.push(a)}}return r}const Lk=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function Rk(n){let t=n[0],e=t.length,r=Array(e);for(let g=0;g<r.length;g++)r[g]=g;r.sort((g,y)=>t[g]-t[y]);let m=[];for(let g=0;g<n.length;g++){let y=n[g],x=Array(e);for(let h=0;h<e;h++)x[h]=y[r[h]];m.push(x)}return m}function Ok(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let m=n[r][0];if(m.length!=e)return!1;if(m!=t){for(let g=0;g<e;g++)if(m[g]!=t[g])return!1}}return!0}function Nk(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,m=e-1;for(;r<=m&&n[r]==null;)r++;for(;m>=r&&n[m]==null;)m--;if(m<=r)return!0;const g=_r(1,Qr((m-r+1)/t));for(let y=n[r],x=r+g;x<=m;x+=g){const h=n[x];if(h!=null){if(h<=y)return!1;y=h}}return!0}const zf=["January","February","March","April","May","June","July","August","September","October","November","December"],jf=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Hf(n){return n.slice(0,3)}const Dk=jf.map(Hf),Fk=zf.map(Hf),Pk={MMMM:zf,MMM:Fk,WWWW:jf,WWW:Dk};function Wa(n){return(n<10?"0":"")+n}function Wk(n){return(n<10?"00":n<100?"0":"")+n}const Bk={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>Wa(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>Wa(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>Wa(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>Wa(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>Wa(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>Wk(n.getMilliseconds())};function Ku(n,t){t=t||Pk;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(n);)e.push(m[0][0]=="{"?Bk[m[1]]:m[0]);return g=>{let y="";for(let x=0;x<e.length;x++)y+=typeof e[x]=="string"?e[x]:e[x](g,t);return y}}const zk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function jk(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==zk?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Uf=n=>n%1==0,Vl=[1,2,2.5,5],Hk=Fa(10,-32,0,Vl),Vf=Fa(10,0,32,Vl),Uk=Vf.filter(Uf),gs=Hk.concat(Vf),qu=`
|
1491
|
+
`,Kf="{YYYY}",qf=qu+Kf,Gf="{M}/{D}",Ba=qu+Gf,Kl=Ba+"/{YY}",Yf="{aa}",Vk="{h}:{mm}",Qs=Vk+Yf,Xf=qu+Qs,Qf=":{ss}",qt=null;function Zf(n){let t=n*1e3,e=t*60,r=e*60,m=r*24,g=m*30,y=m*365,x=(n==1?Fa(10,0,3,Vl).filter(Uf):Fa(10,-3,0,Vl)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,m,m*2,m*3,m*4,m*5,m*6,m*7,m*8,m*9,m*10,m*15,g,g*2,g*3,g*4,g*6,y,y*2,y*5,y*10,y*25,y*50,y*100]);const h=[[y,Kf,qt,qt,qt,qt,qt,qt,1],[m*28,"{MMM}",qf,qt,qt,qt,qt,qt,1],[m,Gf,qf,qt,qt,qt,qt,qt,1],[r,"{h}"+Yf,Kl,qt,Ba,qt,qt,qt,1],[e,Qs,Kl,qt,Ba,qt,qt,qt,1],[t,Qf,Kl+" "+Qs,qt,Ba+" "+Qs,qt,Xf,qt,1],[n,Qf+".{fff}",Kl+" "+Qs,qt,Ba+" "+Qs,qt,Xf,qt,1]];function p(s){return(a,u,c,o,l,d)=>{let w=[],b=l>=y,E=l>=g&&l<y,M=s(c),k=rn(M*n,3),C=Gu(M.getFullYear(),b?0:M.getMonth(),E||b?1:M.getDate()),R=rn(C*n,3);if(E||b){let O=E?l/g:0,L=b?l/y:0,I=k==R?k:rn(Gu(C.getFullYear()+L,C.getMonth()+O,1)*n,3),z=new Date(Xn(I/n)),P=z.getFullYear(),N=z.getMonth();for(let _=0;I<=o;_++){let S=Gu(P+L*_,N+O*_,1),D=S-s(rn(S*n,3));I=rn((+S+D)*n,3),I<=o&&w.push(I)}}else{let O=l>=m?m:l,L=Qr(c)-Qr(k),I=R+L+Hl(k-R,O);w.push(I);let z=s(I),P=z.getHours()+z.getMinutes()/e+z.getSeconds()/r,N=l/r,_=a.axes[u]._space,S=d/_;for(;I=rn(I+l,n==1?0:3),!(I>o);)if(N>1){let D=Qr(rn(P+N,6))%24,j=s(I).getHours()-D;j>1&&(j=-1),I-=j*r,P=(P+N)%24;let U=w[w.length-1];rn((I-U)/l,3)*S>=.7&&w.push(I)}else w.push(I)}return w}}return[x,h,p]}const[Kk,qk,Gk]=Zf(1),[Yk,Xk,Qk]=Zf(.001);Fa(2,-53,53,[1]);function Jf(n,t){return n.map(e=>e.map((r,m)=>m==0||m==8||r==null?r:t(m==1||e[8]==0?r:e[1]+r)))}function em(n,t){return(e,r,m,g,y)=>{let x=t.find(o=>y>=o[0])||t[t.length-1],h,p,s,a,u,c;return r.map(o=>{let l=n(o),d=l.getFullYear(),w=l.getMonth(),b=l.getDate(),E=l.getHours(),M=l.getMinutes(),k=l.getSeconds(),C=d!=h&&x[2]||w!=p&&x[3]||b!=s&&x[4]||E!=a&&x[5]||M!=u&&x[6]||k!=c&&x[7]||x[1];return h=d,p=w,s=b,a=E,u=M,c=k,C(l)})}}function Zk(n,t){let e=Ku(t);return(r,m,g,y,x)=>m.map(h=>e(n(h)))}function Gu(n,t,e){return new Date(n,t,e)}function tm(n,t){return t(n)}const Jk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function nm(n,t){return(e,r,m,g)=>g==null?Ou:t(n(r))}function eS(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function tS(n,t){return n.series[t].fill(n,t)}const nS={show:!0,live:!0,isolate:!1,mount:xk,markers:{show:!0,width:2,stroke:eS,fill:tS,dash:"solid"},idx:null,idxs:null,values:[]};function rS(n,t){let e=n.cursor.points,r=ui(),m=e.size(n,t);cn(r,Ra,m),cn(r,Oa,m);let g=m/-2;cn(r,"marginLeft",g),cn(r,"marginTop",g);let y=e.width(n,t,m);return y&&cn(r,"borderWidth",y),r}function iS(n,t){let e=n.series[t].points;return e._fill||e._stroke}function oS(n,t){let e=n.series[t].points;return e._stroke||e._fill}function sS(n,t){return n.series[t].points.size}const Yu=[0,0];function aS(n,t,e){return Yu[0]=t,Yu[1]=e,Yu}function ql(n,t,e,r=!0){return m=>{m.button==0&&(!r||m.target==t)&&e(m)}}function Xu(n,t,e,r=!0){return m=>{(!r||m.target==t)&&e(m)}}const lS={show:!0,x:!0,y:!0,lock:!1,move:aS,points:{one:!1,show:rS,size:sS,width:0,stroke:oS,fill:iS},bind:{mousedown:ql,mouseup:ql,click:ql,dblclick:ql,mousemove:Xu,mouseleave:Xu,mouseenter:Xu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,m)=>r-m,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},rm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Qu=zn({},rm,{filter:Rf}),im=zn({},Qu,{size:10}),om=zn({},rm,{show:!1}),Zu='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"',sm="bold "+Zu,am=1.5,lm={show:!0,scale:"x",stroke:Eu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:sm,side:2,grid:Qu,ticks:im,border:om,font:Zu,lineGap:am,rotate:0},cS="Value",uS="Time",cm={show:!0,scale:"x",auto:!1,sorted:1,min:nn,max:-nn,idxs:[]};function hS(n,t,e,r,m){return t.map(g=>g==null?"":ju(g))}function dS(n,t,e,r,m,g,y){let x=[],h=Oo.get(m)||0;e=y?e:rn(Hl(e,m),h);for(let p=e;p<=r;p=rn(p+m,h))x.push(Object.is(p,-0)?0:p);return x}function Ju(n,t,e,r,m,g,y){const x=[],h=n.scales[n.axes[t].scale].log,p=h==10?so:Tf,s=Qr(p(e));m=Gs(h,s),h==10&&(m=gs[Mi(m,gs)]);let a=e,u=m*h;h==10&&(u=gs[Mi(u,gs)]);do x.push(a),a=a+m,h==10&&!Oo.has(a)&&(a=rn(a,Oo.get(m))),a>=u&&(m=a,u=m*h,h==10&&(u=gs[Mi(u,gs)]));while(a<=r);return x}function pS(n,t,e,r,m,g,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Ju(n,t,_r(x,e),r,m):[x],p=r>=0&&e<=0?[0]:[];return(e<-x?Ju(n,t,_r(x,-r),-e,m):[x]).reverse().map(s=>-s).concat(p,h)}const um=/./,gS=/[12357]/,fS=/[125]/,hm=/1/,eh=(n,t,e,r)=>n.map((m,g)=>t==4&&m==0||g%r==0&&e.test(m.toExponential()[m<0?1:0])?m:null);function mS(n,t,e,r,m){let g=n.axes[e],y=g.scale,x=n.scales[y],h=n.valToPos,p=g._space,s=h(10,y),a=h(9,y)-s>=p?um:h(7,y)-s>=p?gS:h(5,y)-s>=p?fS:hm;if(a==hm){let u=Yn(h(1,y)-s);if(u<p)return eh(t.slice().reverse(),x.distr,a,hi(p/u)).reverse()}return eh(t,x.distr,a,1)}function vS(n,t,e,r,m){let g=n.axes[e],y=g.scale,x=g._space,h=n.valToPos,p=Yn(h(1,y)-h(2,y));return p<x?eh(t.slice().reverse(),3,um,hi(x/p)).reverse():t}function yS(n,t,e,r){return r==null?Ou:t==null?"":ju(t)}const dm={show:!0,scale:"y",stroke:Eu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:sm,side:3,grid:Qu,ticks:im,border:om,font:Zu,lineGap:am,rotate:0};function wS(n,t){let e=3+(n||1)*2;return rn(e*t,3)}function bS(n,t){let{scale:e,idxs:r}=n.series[0],m=n._data[0],g=n.valToPos(m[r[0]],e,!0),y=n.valToPos(m[r[1]],e,!0),x=Yn(y-g),h=n.series[t],p=x/(h.points.space*Ht);return r[1]-r[0]<=p}const pm={scale:null,auto:!0,sorted:0,min:nn,max:-nn},gm=(n,t,e,r,m)=>m,fm={show:!0,auto:!0,sorted:0,gaps:gm,alpha:1,facets:[zn({},pm,{scale:"x"}),zn({},pm,{scale:"y"})]},mm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:gm,alpha:1,points:{show:bS,filter:null},values:null,min:nn,max:-nn,idxs:[],path:null,clip:null};function xS(n,t,e,r,m){return e/10}const vm={time:KC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},CS=zn({},vm,{time:!1,ori:1}),ym={};function wm(n,t){let e=ym[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(m=>m!=r)},pub(r,m,g,y,x,h,p){for(let s=0;s<e.plots.length;s++)e.plots[s]!=m&&e.plots[s].pub(r,m,g,y,x,h,p)}},n!=null&&(ym[n]=e)),e}const Zs=1,th=2;function fs(n,t,e){const r=n.mode,m=n.series[t],g=r==2?n._data[t]:n._data,y=n.scales,x=n.bbox;let h=g[0],p=r==2?g[1]:g[t],s=r==2?y[m.facets[0].scale]:y[n.series[0].scale],a=r==2?y[m.facets[1].scale]:y[m.scale],u=x.left,c=x.top,o=x.width,l=x.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(m,h,p,s,a,d,w,u,c,o,l,Yl,Js,Ql,Cm,Sm):e(m,h,p,s,a,w,d,c,u,l,o,Xl,ea,ih,km,Am)}function nh(n,t){let e=0,r=0,m=Bt(n.bands,Vu);for(let g=0;g<m.length;g++){let y=m[g];y.series[0]==t?e=y.dir:y.series[1]==t&&(y.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function kS(n,t,e,r,m){let g=n.mode,y=n.series[t],x=g==2?y.facets[1].scale:y.scale,h=n.scales[x];return m==-1?h.min:m==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function ao(n,t,e,r,m,g){return fs(n,t,(y,x,h,p,s,a,u,c,o,l,d)=>{let w=y.pxRound;const b=p.dir*(p.ori==0?1:-1),E=p.ori==0?Js:ea;let M,k;b==1?(M=e,k=r):(M=r,k=e);let C=w(a(x[M],p,l,c)),R=w(u(h[M],s,d,o)),O=w(a(x[k],p,l,c)),L=w(u(g==1?s.max:s.min,s,d,o)),I=new Path2D(m);return E(I,O,L),E(I,C,L),E(I,C,R),I})}function Gl(n,t,e,r,m,g){let y=null;if(n.length>0){y=new Path2D;const x=t==0?Ql:ih;let h=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let c=u[0]-h;c>0&&x(y,h,r,c,r+g),h=u[1]}}let p=e+m-h,s=10;p>0&&x(y,h,r-s/2,p,r+g+s)}return y}function SS(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function rh(n,t,e,r,m,g,y){let x=[],h=n.length;for(let p=m==1?e:r;p>=e&&p<=r;p+=m)if(t[p]===null){let s=p,a=p;if(m==1)for(;++p<=r&&t[p]===null;)a=p;else for(;--p>=e&&t[p]===null;)a=p;let u=g(n[s]),c=a==s?u:g(n[a]),o=s-m;u=y<=0&&o>=0&&o<h?g(n[o]):u;let l=a+m;c=y>=0&&l>=0&&l<h?g(n[l]):c,c>=u&&x.push([u,c])}return x}function bm(n){return n==0?Lf:n==1?Xn:t=>ps(t,n)}function xm(n){let t=n==0?Yl:Xl,e=n==0?(m,g,y,x,h,p)=>{m.arcTo(g,y,x,h,p)}:(m,g,y,x,h,p)=>{m.arcTo(y,g,h,x,p)},r=n==0?(m,g,y,x,h)=>{m.rect(g,y,x,h)}:(m,g,y,x,h)=>{m.rect(y,g,h,x)};return(m,g,y,x,h,p=0,s=0)=>{p==0&&s==0?r(m,g,y,x,h):(p=Ti(p,x/2,h/2),s=Ti(s,x/2,h/2),t(m,g+p,y),e(m,g+x,y,g+x,y+h,p),e(m,g+x,y+h,g,y+h,s),e(m,g,y+h,g,y,s),e(m,g,y,g+x,y,p),m.closePath())}}const Yl=(n,t,e)=>{n.moveTo(t,e)},Xl=(n,t,e)=>{n.moveTo(e,t)},Js=(n,t,e)=>{n.lineTo(t,e)},ea=(n,t,e)=>{n.lineTo(e,t)},Ql=xm(0),ih=xm(1),Cm=(n,t,e,r,m,g)=>{n.arc(t,e,r,m,g)},km=(n,t,e,r,m,g)=>{n.arc(e,t,r,m,g)},Sm=(n,t,e,r,m,g,y)=>{n.bezierCurveTo(t,e,r,m,g,y)},Am=(n,t,e,r,m,g,y)=>{n.bezierCurveTo(e,t,m,r,y,g)};function _m(n){return(t,e,r,m,g)=>fs(t,e,(y,x,h,p,s,a,u,c,o,l,d)=>{let{pxRound:w,points:b}=y,E,M;p.ori==0?(E=Yl,M=Cm):(E=Xl,M=km);const k=rn(b.width*Ht,3);let C=(b.size-b.width)/2*Ht,R=rn(C*2,3),O=new Path2D,L=new Path2D,{left:I,top:z,width:P,height:N}=t.bbox;Ql(L,I-R,z-R,P+R*2,N+R*2);const _=S=>{if(h[S]!=null){let D=w(a(x[S],p,l,c)),j=w(u(h[S],s,d,o));E(O,D+C,j),M(O,D,j,C,0,jl*2)}};if(g)g.forEach(_);else for(let S=r;S<=m;S++)_(S);return{stroke:k>0?O:null,fill:O,clip:L,flags:Zs|th}})}function $m(n){return(t,e,r,m,g,y)=>{r!=m&&(g!=r&&y!=r&&n(t,e,r),g!=m&&y!=m&&n(t,e,m),n(t,e,y))}}const AS=$m(Js),_S=$m(ea);function Mm(n){const t=Bt(n==null?void 0:n.alignGaps,0);return(e,r,m,g)=>fs(e,r,(y,x,h,p,s,a,u,c,o,l,d)=>{[m,g]=Wl(h,m,g);let w=y.pxRound,b=P=>w(a(P,p,l,c)),E=P=>w(u(P,s,d,o)),M,k;p.ori==0?(M=Js,k=AS):(M=ea,k=_S);const C=p.dir*(p.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Zs},O=R.stroke;let L=!1;if(g-m>=l*4){let P=he=>e.posToVal(he,p.key,!0),N=null,_=null,S,D,j,U=b(x[C==1?m:g]),G=b(x[m]),Z=b(x[g]),te=P(C==1?G+1:Z-1);for(let he=C==1?m:g;he>=m&&he<=g;he+=C){let ne=x[he],le=(C==1?ne<te:ne>te)?U:b(ne),ue=h[he];le==U?ue!=null?(D=ue,N==null?(M(O,le,E(D)),S=N=_=D):D<N?N=D:D>_&&(_=D)):ue===null&&(L=!0):(N!=null&&k(O,U,E(N),E(_),E(S),E(D)),ue!=null?(D=ue,M(O,le,E(D)),N=_=S=D):(N=_=null,ue===null&&(L=!0)),U=le,te=P(U+C))}N!=null&&N!=_&&j!=U&&k(O,U,E(N),E(_),E(S),E(D))}else for(let P=C==1?m:g;P>=m&&P<=g;P+=C){let N=h[P];N===null?L=!0:N!=null&&M(O,b(x[P]),E(N))}let[I,z]=nh(e,r);if(y.fill!=null||I!=0){let P=R.fill=new Path2D(O),N=y.fillTo(e,r,y.min,y.max,I),_=E(N),S=b(x[m]),D=b(x[g]);C==-1&&([D,S]=[S,D]),M(P,D,_),M(P,S,_)}if(!y.spanGaps){let P=[];L&&P.push(...rh(x,h,m,g,C,b,t)),R.gaps=P=y.gaps(e,r,m,g,P),R.clip=Gl(P,p.ori,c,o,l,d)}return z!=0&&(R.band=z==2?[ao(e,r,m,g,O,-1),ao(e,r,m,g,O,1)]:ao(e,r,m,g,O,z)),R})}function $S(n){const t=Bt(n.align,1),e=Bt(n.ascDesc,!1),r=Bt(n.alignGaps,0),m=Bt(n.extend,!1);return(g,y,x,h)=>fs(g,y,(p,s,a,u,c,o,l,d,w,b,E)=>{[x,h]=Wl(a,x,h);let M=p.pxRound,{left:k,width:C}=g.bbox,R=Z=>M(o(Z,u,b,d)),O=Z=>M(l(Z,c,E,w)),L=u.ori==0?Js:ea;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Zs},z=I.stroke,P=u.dir*(u.ori==0?1:-1);let N=O(a[P==1?x:h]),_=R(s[P==1?x:h]),S=_,D=_;m&&t==-1&&(D=k,L(z,D,N)),L(z,_,N);for(let Z=P==1?x:h;Z>=x&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=R(s[Z]),ne=O(te);t==1?L(z,he,N):L(z,S,ne),L(z,he,ne),N=ne,S=he}let j=S;m&&t==1&&(j=k+C,L(z,j,N));let[U,G]=nh(g,y);if(p.fill!=null||U!=0){let Z=I.fill=new Path2D(z),te=p.fillTo(g,y,p.min,p.max,U),he=O(te);L(Z,j,he),L(Z,D,he)}if(!p.spanGaps){let Z=[];Z.push(...rh(s,a,x,h,P,R,r));let te=p.width*Ht/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(le=>{le[0]+=he,le[1]+=ne}),I.gaps=Z=p.gaps(g,y,x,h,Z),I.clip=Gl(Z,u.ori,d,w,b,E)}return G!=0&&(I.band=G==2?[ao(g,y,x,h,z,-1),ao(g,y,x,h,z,1)]:ao(g,y,x,h,z,G)),I})}function Tm(n,t,e,r,m,g,y=nn){if(n.length>1){let x=null;for(let h=0,p=1/0;h<n.length;h++)if(t[h]!==void 0){if(x!=null){let s=Yn(n[h]-n[x]);s<p&&(p=s,y=Yn(e(n[h],r,m,g)-e(n[x],r,m,g)))}x=h}}return y}function MS(n){n=n||Pa;const t=Bt(n.size,[.6,nn,1]),e=n.align||0,r=n.gap||0;let m=n.radius;m=m==null?[0,0]:typeof m=="number"?[m,0]:m;const g=Rt(m),y=1-t[0],x=Bt(t[1],nn),h=Bt(t[2],1),p=Bt(n.disp,Pa),s=Bt(n.each,c=>{}),{fill:a,stroke:u}=p;return(c,o,l,d)=>fs(c,o,(w,b,E,M,k,C,R,O,L,I,z)=>{let P=w.pxRound,N=e,_=r*Ht,S=x*Ht,D=h*Ht,j,U;M.ori==0?[j,U]=g(c,o):[U,j]=g(c,o);const G=M.dir*(M.ori==0?1:-1);let Z=M.ori==0?Ql:ih,te=M.ori==0?s:(He,zt,un,Un,Tr,yr,wn)=>{s(He,zt,un,Tr,Un,wn,yr)},he=Bt(c.bands,Vu).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,le=w.fillTo(c,o,w.min,w.max,ne),ue=P(R(le,k,z,L)),ce,fe,_e,$e=I,Te=P(w.width*Ht),Ge=!1,Ve=null,ct=null,Je=null,dt=null;a!=null&&(Te==0||u!=null)&&(Ge=!0,Ve=a.values(c,o,l,d),ct=new Map,new Set(Ve).forEach(He=>{He!=null&&ct.set(He,new Path2D)}),Te>0&&(Je=u.values(c,o,l,d),dt=new Map,new Set(Je).forEach(He=>{He!=null&&dt.set(He,new Path2D)})));let{x0:Qt,size:On}=p;if(Qt!=null&&On!=null){N=1,b=Qt.values(c,o,l,d),Qt.unit==2&&(b=b.map(zt=>c.posToVal(O+zt*I,M.key,!0)));let He=On.values(c,o,l,d);On.unit==2?fe=He[0]*I:fe=C(He[0],M,I,O)-C(0,M,I,O),$e=Tm(b,E,C,M,I,O,$e),_e=$e-fe+_}else $e=Tm(b,E,C,M,I,O,$e),_e=$e*y+_,fe=$e-_e;_e<1&&(_e=0),Te>=fe/2&&(Te=0),_e<5&&(P=Lf);let Gt=_e>0,Zr=$e-_e-(Gt?Te:0);fe=P(Uu(Zr,D,S)),ce=(N==0?fe/2:N==G?0:fe)-N*G*((N==0?_/2:0)+(Gt?Te/2:0));const yn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Hn=Ge?null:new Path2D;let rr=null;if(he!=null)rr=c.data[he.series[1]];else{let{y0:He,y1:zt}=p;He!=null&&zt!=null&&(E=zt.values(c,o,l,d),rr=He.values(c,o,l,d))}let Mr=j*fe,ft=U*fe;for(let He=G==1?l:d;He>=l&&He<=d;He+=G){let zt=E[He];if(zt==null)continue;if(rr!=null){let Zt=rr[He]??0;if(zt-Zt==0)continue;ue=R(Zt,k,z,L)}let un=M.distr!=2||p!=null?b[He]:He,Un=C(un,M,I,O),Tr=R(Bt(zt,le),k,z,L),yr=P(Un-ce),wn=P(_r(Tr,ue)),Qn=P(Ti(Tr,ue)),ir=wn-Qn;if(zt!=null){let Zt=zt<0?ft:Mr,Zn=zt<0?Mr:ft;Ge?(Te>0&&Je[He]!=null&&Z(dt.get(Je[He]),yr,Qn+Qr(Te/2),fe,_r(0,ir-Te),Zt,Zn),Ve[He]!=null&&Z(ct.get(Ve[He]),yr,Qn+Qr(Te/2),fe,_r(0,ir-Te),Zt,Zn)):Z(Hn,yr,Qn+Qr(Te/2),fe,_r(0,ir-Te),Zt,Zn),te(c,o,He,yr-Te/2,Qn,fe+Te,ir)}}return Te>0?yn.stroke=Ge?dt:Hn:Ge||(yn._fill=w.width==0?w._fill:w._stroke??w._fill,yn.width=0),yn.fill=Ge?ct:Hn,yn})}function TS(n,t){const e=Bt(t==null?void 0:t.alignGaps,0);return(r,m,g,y)=>fs(r,m,(x,h,p,s,a,u,c,o,l,d,w)=>{[g,y]=Wl(p,g,y);let b=x.pxRound,E=j=>b(u(j,s,d,o)),M=j=>b(c(j,a,w,l)),k,C,R;s.ori==0?(k=Yl,R=Js,C=Sm):(k=Xl,R=ea,C=Am);const O=s.dir*(s.ori==0?1:-1);let L=E(h[O==1?g:y]),I=L,z=[],P=[];for(let j=O==1?g:y;j>=g&&j<=y;j+=O)if(p[j]!=null){let U=h[j],G=E(U);z.push(I=G),P.push(M(p[j]))}const N={stroke:n(z,P,k,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Zs},_=N.stroke;let[S,D]=nh(r,m);if(x.fill!=null||S!=0){let j=N.fill=new Path2D(_),U=x.fillTo(r,m,x.min,x.max,S),G=M(U);R(j,I,G),R(j,L,G)}if(!x.spanGaps){let j=[];j.push(...rh(h,p,g,y,O,E,e)),N.gaps=j=x.gaps(r,m,g,y,j),N.clip=Gl(j,s.ori,o,l,d,w)}return D!=0&&(N.band=D==2?[ao(r,m,g,y,_,-1),ao(r,m,g,y,_,1)]:ao(r,m,g,y,_,D)),N})}function IS(n){return TS(ES,n)}function ES(n,t,e,r,m,g){const y=n.length;if(y<2)return null;const x=new Path2D;if(e(x,n[0],t[0]),y==2)r(x,n[1],t[1]);else{let h=Array(y),p=Array(y-1),s=Array(y-1),a=Array(y-1);for(let u=0;u<y-1;u++)s[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],p[u]=s[u]/a[u];h[0]=p[0];for(let u=1;u<y-1;u++)p[u]===0||p[u-1]===0||p[u-1]>0!=p[u]>0?h[u]=0:(h[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/p[u-1]+(a[u]+2*a[u-1])/p[u]),isFinite(h[u])||(h[u]=0));h[y-1]=p[y-2];for(let u=0;u<y-1;u++)m(x,n[u]+a[u]/3,t[u]+h[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-h[u+1]*a[u]/3,n[u+1],t[u+1])}return x}const oh=new Set;function Im(){for(let n of oh)n.syncRect(!0)}Ks&&(hs(hk,qs,Im),hs(dk,qs,Im,!0),hs(Fl,qs,()=>{mr.pxRatio=Ht}));const LS=Mm(),RS=_m();function Em(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((m,g)=>sh(m,g,t,e))}function OS(n,t){return n.map((e,r)=>r==0?{}:zn({},t,e))}function sh(n,t,e,r){return zn({},t==0?e:r,n)}function Lm(n,t,e){return t==null?Ys:[t,e]}const NS=Lm;function DS(n,t,e){return t==null?Ys:zl(t,e,zu,!0)}function Rm(n,t,e,r){return t==null?Ys:Bl(t,e,n.scales[r].log,!1)}const FS=Rm;function Om(n,t,e,r){return t==null?Ys:Bu(t,e,n.scales[r].log,!1)}const PS=Om;function WS(n,t,e,r,m){let g=_r(If(n),If(t)),y=t-n,x=Mi(m/r*y,e);do{let h=e[x],p=r*h/y;if(p>=m&&g+(h<5?Oo.get(h):0)<=17)return[h,p]}while(++x<e.length);return[0,0]}function Nm(n){let t,e;return n=n.replace(/(\d+)px/,(r,m)=>(t=Xn((e=+m)*Ht))+"px"),[n,t,e]}function BS(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=rn(t[2]*Ht,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function mr(n,t,e){const r={mode:Bt(n.mode,1)},m=r.mode;function g(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function y(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function x(V,X,ie,oe){return X.ori==0?g(V,X,ie,oe):y(V,X,ie,oe)}r.valToPosH=g,r.valToPosV=y;let h=!1;r.status=0;const p=r.root=ui(qC);if(n.id!=null&&(p.id=n.id),Yr(p,n.class),n.title){let V=ui(XC,p);V.textContent=n.title}const s=$i("canvas"),a=r.ctx=s.getContext("2d"),u=ui(QC,p);hs("click",u,V=>{V.target===o&&(Kt!=fi||Nt!=to)&&An.click(r,V)},!0);const c=r.under=ui(ZC,u);u.appendChild(s);const o=r.over=ui(JC,u);n=Xs(n);const l=+Bt(n.pxAlign,1),d=bm(l);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=m==1?Em(n.series||[],cm,mm,!1):OS(n.series||[null],fm),E=r.axes=Em(n.axes||[],lm,dm,!0),M=r.scales={},k=r.bands=n.bands||[];k.forEach(V=>{V.fill=Rt(V.fill||null),V.dir=Bt(V.dir,-1)});const C=m==2?b[1].facets[0].scale:b[0].scale,R={axes:fo,series:aa},O=(n.drawOrder||["axes","series"]).map(V=>R[V]);function L(V){const X=V.distr==3?ie=>so(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Hu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:be}=V,Me=be-ge;return(oe-ge)/Me}}function I(V){let X=M[V];if(X==null){let ie=(n.scales||Pa)[V]||Pa;if(ie.from!=null){I(ie.from);let oe=zn({},M[ie.from],ie,{key:V});oe.valToPct=L(oe),M[V]=oe}else{X=M[V]=zn({},V==C?vm:CS,ie),X.key=V;let oe=X.time,ge=X.range,be=No(ge);if((V!=C||m==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?_f:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?_f:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&Ul(ge))){let Me=ge;ge=(De,Pe,je)=>Pe==null?Ys:zl(Pe,je,Me)}X.range=Rt(ge||(oe?NS:V==C?X.distr==3?FS:X.distr==4?PS:Lm:X.distr==3?Rm:X.distr==4?Om:DS)),X.auto=Rt(be?!1:X.auto),X.clamp=Rt(X.clamp||xS),X._min=X._max=null,X.valToPct=L(X)}}}I("x"),I("y"),m==1&&b.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in n.scales)I(V);const z=M[C],P=z.distr;let N,_;z.ori==0?(Yr(p,GC),N=g,_=y):(Yr(p,YC),N=y,_=g);const S={};for(let V in M){let X=M[V];(X.min!=null||X.max!=null)&&(S[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=n.tzDate||(V=>new Date(Xn(V/w))),j=n.fmtDate||Ku,U=w==1?Gk(D):Qk(D),G=em(D,Jf(w==1?qk:Xk,j)),Z=nm(D,tm(Jk,j)),te=[],he=r.legend=zn({},nS,n.legend),ne=r.cursor=zn({},lS,{drag:{y:m==2}},n.cursor),le=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Rt(ce.width),ce.dash=Rt(ce.dash),ce.stroke=Rt(ce.stroke),ce.fill=Rt(ce.fill);let fe,_e,$e,Te=[],Ge=[],Ve,ct=!1,Je={};if(he.live){const V=b[1]?b[1].values:null;ct=V!=null,Ve=ct?V(r,1,0):{_:0};for(let X in Ve)Je[X]=Ou}if(le)if(fe=$i("table",ok,p),$e=$i("tbody",null,fe),he.mount(r,fe),ct){_e=$i("thead",null,fe,$e);let V=$i("tr",null,_e);$i("th",null,V);for(var dt in Ve)$i("th",uf,V).textContent=dt}else Yr(fe,ak),he.live&&Yr(fe,sk);const Qt={show:!0},On={show:!1};function Gt(V,X){if(X==0&&(ct||!he.live||m==2))return Ys;let ie=[],oe=$i("tr",lk,$e,$e.childNodes[X]);Yr(oe,V.class),V.show||Yr(oe,us);let ge=$i("th",null,oe);if(ce.show){let De=ui(ck,ge);if(X>0){let Pe=ce.width(r,X);Pe&&(De.style.border=Pe+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),De.style.background=ce.fill(r,X)}}let be=ui(uf,ge);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ce.show||(be.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),yn("click",ge,De=>{if(ne._lock)return;Oi(De);let Pe=b.indexOf(V);if((De.ctrlKey||De.metaKey)!=he.isolate){let je=b.some((Ke,Ye)=>Ye>0&&Ye!=Pe&&Ke.show);b.forEach((Ke,Ye)=>{Ye>0&&Er(Ye,je?Ye==Pe?Qt:On:Qt,!0,it.setSeries)})}else Er(Pe,{show:!V.show},!0,it.setSeries)},!1),Ni&&yn(gf,ge,De=>{ne._lock||(Oi(De),Er(b.indexOf(V),yi,!0,it.setSeries))},!1));for(var Me in Ve){let De=$i("td",uk,oe);De.textContent="--",ie.push(De)}return[oe,ie]}const Zr=new Map;function yn(V,X,ie,oe=!0){const ge=Zr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(hs(V,X,ge[V]=be),Zr.set(X,ge))}function Hn(V,X,ie){const oe=Zr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Wu(ge,X,oe[ge]),delete oe[ge]);V==null&&Zr.delete(X)}let rr=0,Mr=0,ft=0,He=0,zt=0,un=0,Un=zt,Tr=un,yr=ft,wn=He,Qn=0,ir=0,Zt=0,Zn=0;r.bbox={};let lo=!1,Ei=!1,Li=!1,Ri=!1,co=!1,ur=!1;function uo(V,X,ie){(ie||V!=r.width||X!=r.height)&&Do(V,X),Wi(!1),Li=!0,Ei=!0,eo()}function Do(V,X){r.width=rr=ft=V,r.height=Mr=He=X,zt=un=0,ws(),ia();let ie=r.bbox;Qn=ie.left=ps(zt*Ht,.5),ir=ie.top=ps(un*Ht,.5),Zt=ie.width=ps(ft*Ht,.5),Zn=ie.height=ps(He*Ht,.5)}const Ya=3;function Jr(){let V=!1,X=0;for(;!V;){X++;let ie=la(X),oe=Ja(X);V=X==Ya||ie&&oe,V||(Do(r.width,r.height),Ei=!0)}}function Xa({width:V,height:X}){uo(V,X)}r.setSize=Xa;function ws(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:De}=ge,Pe=Me%2,je=ge.label!=null?ge.labelSize:0,Ke=De+je;Ke>0&&(Pe?(ft-=Ke,Me==3?(zt+=Ke,oe=!0):ie=!0):(He-=Ke,Me==0?(un+=Ke,V=!0):X=!0))}}),Fi[0]=V,Fi[1]=ie,Fi[2]=X,Fi[3]=oe,ft-=xr[1]+xr[3],zt+=xr[3],He-=xr[2]+xr[0],un+=xr[0]}function ia(){let V=zt+ft,X=un+He,ie=zt,oe=un;function ge(be,Me){switch(be){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((be,Me)=>{if(be.show&&be._show){let De=be.side;be._pos=ge(De,be._size),be.label!=null&&(be._lpos=ge(De,be.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=Rt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,De)=>{if(be==0)return Me;let Pe=Me,je=ie(ge,be,Me,De)??nn,Ke=je>=0&&je<nn,Ye=z.ori==0?ft:He,gt=ne.left,Et=t[0],vt=t[be];if(X.has(vt[Me])){Pe=null;let Tt=null,at=null,et;if(oe==0||oe==-1)for(et=Me;Tt==null&&et-- >0;)X.has(vt[et])||(Tt=et);if(oe==0||oe==1)for(et=Me;at==null&&et++<vt.length;)X.has(vt[et])||(at=et);if(Tt!=null||at!=null)if(Ke){let on=Tt==null?-1/0:N(Et[Tt],z,Ye,0),fn=at==null?1/0:N(Et[at],z,Ye,0),qn=gt-on,Ft=fn-gt;qn<=Ft?qn<=je&&(Pe=Tt):Ft<=je&&(Pe=at)}else Pe=at==null?Tt:Tt==null?at:Me-Tt<=at-Me?Tt:at}else Ke&&Yn(gt-N(Et[Me],z,Ye,0))>je&&(Pe=null);return Pe}}const Oi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Nn=ne.points;Nn.show=Rt(Nn.show),Nn.size=Rt(Nn.size),Nn.stroke=Rt(Nn.stroke),Nn.width=Rt(Nn.width),Nn.fill=Rt(Nn.fill);const wr=r.focus=zn({},n.focus||{alpha:.3},ne.focus),Ni=wr.prox>=0,bn=Ni&&Nn.one;let br=[],Xi=[],Di=[];function bs(V,X){let ie=Nn.show(r,X);if(ie instanceof HTMLElement)return Yr(ie,ik),Yr(ie,V.class),Ki(ie,-10,-10,ft,He),o.insertBefore(ie,br[X]),ie}function oa(V,X){if(m==1||X>0){let ie=m==1&&M[V.scale].time,oe=V.value;V.value=ie?Wf(oe)?nm(D,tm(oe,j)):oe||Z:oe||yS,V.label=V.label||(ie?uS:cS)}if(bn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||LS||Ck,V.fillTo=Rt(V.fillTo||kS),V.pxAlign=+Bt(V.pxAlign,l),V.pxRound=bm(V.pxAlign),V.stroke=Rt(V.stroke||null),V.fill=Rt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=wS(_r(1,V.width),1),oe=V.points=zn({},{size:ie,width:_r(1,ie*.2),stroke:V.stroke,space:ie*2,paths:RS,_stroke:null,_fill:null},V.points);oe.show=Rt(oe.show),oe.filter=Rt(oe.filter),oe.fill=Rt(oe.fill),oe.stroke=Rt(oe.stroke),oe.paths=Rt(oe.paths),oe.pxAlign=V.pxAlign}if(le){let ie=Gt(V,X);Te.splice(X,0,ie[0]),Ge.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;bn?X==0&&(ie=bs(V,X)):X>0&&(ie=bs(V,X)),br.splice(X,0,ie),Xi.splice(X,0,0),Di.splice(X,0,0)}Qe("addSeries",X)}function Qa(V,X){X=X??b.length,V=m==1?sh(V,X,cm,mm):sh(V,X,{},fm),b.splice(X,0,V),oa(b[X],X)}r.addSeries=Qa;function Za(V){if(b.splice(V,1),le){he.values.splice(V,1),Ge.splice(V,1);let X=Te.splice(V,1)[0];Hn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),br.splice(V,1)[0].remove(),Xi.splice(V,1),Di.splice(V,1)),Qe("delSeries",V)}r.delSeries=Za;const Fi=[!1,!1,!1,!1];function ei(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=M[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=M[V.scale]);let ge=oe.time;V.size=Rt(V.size),V.space=Rt(V.space),V.rotate=Rt(V.rotate),No(V.incrs)&&V.incrs.forEach(Me=>{!Oo.has(Me)&&Oo.set(Me,Ff(Me))}),V.incrs=Rt(V.incrs||(oe.distr==2?Uk:ge?w==1?Kk:Yk:gs)),V.splits=Rt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Ju:oe.distr==4?pS:dS)),V.stroke=Rt(V.stroke),V.grid.stroke=Rt(V.grid.stroke),V.ticks.stroke=Rt(V.ticks.stroke),V.border.stroke=Rt(V.border.stroke);let be=V.values;V.values=No(be)&&!No(be[0])?Rt(be):ge?No(be)?em(D,Jf(be,j)):Wf(be)?Zk(D,be):be||G:be||hS,V.filter=Rt(V.filter||(oe.distr>=3&&oe.log==10?mS:oe.distr==3&&oe.log==2?vS:Rf)),V.font=Nm(V.font),V.labelFont=Nm(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Fi[X]=!0,V._el=ui(ek,u))}}function Ot(V,X,ie,oe){let[ge,be,Me,De]=ie,Pe=X%2,je=0;return Pe==0&&(De||be)&&(je=X==0&&!ge||X==2&&!Me?Xn(lm.size/3):0),Pe==1&&(ge||Me)&&(je=X==1&&!be||X==3&&!De?Xn(dm.size/2):0),je}const sa=r.padding=(n.padding||[Ot,Ot,Ot,Ot]).map(V=>Rt(Bt(V,Ot))),xr=r._padding=sa.map((V,X)=>V(r,X,Fi,0));let Dn,sn=null,Sn=null;const di=m==1?b[0].idxs:null;let Cr=null,pi=!1;function Fo(V,X){if(t=V??[],r.data=r._data=t,m==2){Dn=0;for(let ie=1;ie<b.length;ie++)Dn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Cr=t[0],Dn=Cr.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(Dn);for(let ge=0;ge<Dn;ge++)oe[ge]=ge}r._data=t=ie}if(Wi(!0),Qe("setData"),P==2&&(Li=!0),X!==!1){let ie=z;ie.auto(r,pi)?xs():Vn(C,ie.min,ie.max),Ri=Ri||ne.left>=0,ur=!0,eo()}}r.setData=Fo;function xs(){pi=!0;let V,X;m==1&&(Dn>0?(sn=di[0]=0,Sn=di[1]=Dn-1,V=t[0][sn],X=t[0][Sn],P==2?(V=sn,X=Sn):V==X&&(P==3?[V,X]=Bl(V,V,z.log,!1):P==4?[V,X]=Bu(V,V,z.log,!1):z.time?X=V+Xn(86400/w):[V,X]=zl(V,X,zu,!0))):(sn=di[0]=V=null,Sn=di[1]=X=null)),Vn(C,V,X)}let Qi,jr,ho,Po,Hr,Wo,Cs,ks,Bo,Jn;function Ss(V,X,ie,oe,ge,be){V??(V=df),ie??(ie=Vu),oe??(oe="butt"),ge??(ge=df),be??(be="round"),V!=Qi&&(a.strokeStyle=Qi=V),ge!=jr&&(a.fillStyle=jr=ge),X!=ho&&(a.lineWidth=ho=X),be!=Hr&&(a.lineJoin=Hr=be),oe!=Wo&&(a.lineCap=Wo=oe),ie!=Po&&a.setLineDash(Po=ie)}function po(V,X,ie,oe){X!=jr&&(a.fillStyle=jr=X),V!=Cs&&(a.font=Cs=V),ie!=ks&&(a.textAlign=ks=ie),oe!=Bo&&(a.textBaseline=Bo=oe)}function zo(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,pi)&&(X==null||X.min==null)){let be=Bt(sn,0),Me=Bt(Sn,oe.length-1),De=ie.min==null?mk(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Ti(V.min,ie.min=De[0]),V.max=_r(V.max,ie.max=De[1])}}const jo={min:null,max:null};function Zi(){for(let oe in M){let ge=M[oe];S[oe]==null&&(ge.min==null||S[C]!=null&&ge.auto(r,pi))&&(S[oe]=jo)}for(let oe in M){let ge=M[oe];S[oe]==null&&ge.from!=null&&S[ge.from]!=null&&(S[oe]=jo)}S[C]!=null&&Wi(!0);let V={};for(let oe in S){let ge=S[oe];if(ge!=null){let be=V[oe]=Xs(M[oe],Ak);if(ge.min!=null)zn(be,ge);else if(oe!=C||m==2)if(Dn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=nn,be.max=-nn}}if(Dn>0){b.forEach((oe,ge)=>{if(m==1){let be=oe.scale,Me=S[be];if(Me==null)return;let De=V[be];if(ge==0){let Pe=De.range(r,De.min,De.max,be);De.min=Pe[0],De.max=Pe[1],sn=Mi(De.min,t[0]),Sn=Mi(De.max,t[0]),Sn-sn>1&&(t[0][sn]<De.min&&sn++,t[0][Sn]>De.max&&Sn--),oe.min=Cr[sn],oe.max=Cr[Sn]}else oe.show&&oe.auto&&zo(De,Me,oe,t[ge],oe.sorted);oe.idxs[0]=sn,oe.idxs[1]=Sn}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,De=be.scale,Pe=Me.scale,[je,Ke]=t[ge],Ye=V[De],gt=V[Pe];Ye!=null&&zo(Ye,S[De],be,je,be.sorted),gt!=null&&zo(gt,S[Pe],Me,Ke,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=S[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==nn?null:ge.min,ge.max==-nn?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let be=V[ge.from];if(be.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,be.min,be.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],be=M[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let Me=be.distr;be._min=Me==3?so(be.min):Me==4?Hu(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?so(be.max):Me==4?Hu(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){b.forEach((oe,ge)=>{m==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Li=!0,Qe("setScale",oe);ue&&ne.left>=0&&(Ri=ur=!0)}for(let oe in S)S[oe]=null}function As(V){let X=Uu(sn-1,0,Dn-1),ie=Uu(Sn+1,0,Dn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Dn-1;)ie++;return[X,ie]}function aa(){if(Dn>0){let V=b.some(X=>X._focus)&&Jn!=wr.alpha;V&&(a.globalAlpha=Jn=wr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(Ho(ie,!1),Ho(ie,!0),X._paths==null)){let oe=Jn;Jn!=X.alpha&&(a.globalAlpha=Jn=X.alpha);let ge=m==2?[0,t[ie][0].length-1]:As(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),Jn!=oe&&(a.globalAlpha=Jn=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=Jn;Jn!=X.alpha&&(a.globalAlpha=Jn=X.alpha),X._paths!=null&&Uo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,sn,Sn,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,sn,Sn,Me),Uo(ie,!0))}Jn!=oe&&(a.globalAlpha=Jn=oe),Qe("drawSeries",ie)}}),V&&(a.globalAlpha=Jn=1)}}function Ho(V,X){let ie=X?b[V].points:b[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Uo(V,X){let ie=X?b[V].points:b[V],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:De=ie._stroke,_fill:Pe=ie._fill,_width:je=ie.width}=ie._paths;je=rn(je*Ht,3);let Ke=null,Ye=je%2/2;X&&Pe==null&&(Pe=je>0?"#fff":De);let gt=ie.pxAlign==1&&Ye>0;if(gt&&a.translate(Ye,Ye),!X){let Et=Qn-je/2,vt=ir-je/2,Tt=Zt+je,at=Zn+je;Ke=new Path2D,Ke.rect(Et,vt,Tt,at)}X?go(De,je,ie.dash,ie.cap,Pe,oe,ge,Me,be):_s(V,De,je,ie.dash,ie.cap,Pe,oe,ge,Me,Ke,be),gt&&a.translate(-Ye,-Ye)}function _s(V,X,ie,oe,ge,be,Me,De,Pe,je,Ke){let Ye=!1;Pe!=0&&k.forEach((gt,Et)=>{if(gt.series[0]==V){let vt=b[gt.series[1]],Tt=t[gt.series[1]],at=(vt._paths||Pa).band;No(at)&&(at=gt.dir==1?at[0]:at[1]);let et,on=null;vt.show&&at&&yk(Tt,sn,Sn)?(on=gt.fill(r,Et)||be,et=vt._paths.clip):at=null,go(X,ie,oe,ge,on,Me,De,Pe,je,Ke,et,at),Ye=!0}}),Ye||go(X,ie,oe,ge,be,Me,De,Pe,je,Ke)}const Vo=Zs|th;function go(V,X,ie,oe,ge,be,Me,De,Pe,je,Ke,Ye){Ss(V,X,ie,oe,ge),(Pe||je||Ye)&&(a.save(),Pe&&a.clip(Pe),je&&a.clip(je)),Ye?(De&Vo)==Vo?(a.clip(Ye),Ke&&a.clip(Ke),er(ge,Me),gi(V,be,X)):De&th?(er(ge,Me),a.clip(Ye),gi(V,be,X)):De&Zs&&(a.save(),a.clip(Ye),Ke&&a.clip(Ke),er(ge,Me),a.restore(),gi(V,be,X)):(er(ge,Me),gi(V,be,X)),(Pe||je||Ye)&&a.restore()}function gi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=Qi=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function er(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=jr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function Ji(V,X,ie,oe){let ge=E[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),De=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=WS(X,ie,De,oe,Me)}return ge._found=be}function Pi(V,X,ie,oe,ge,be,Me,De,Pe,je){let Ke=Me%2/2;l==1&&a.translate(Ke,Ke),Ss(De,Me,Pe,je,De),a.beginPath();let Ye,gt,Et,vt,Tt=ge+(oe==0||oe==3?-be:be);ie==0?(gt=ge,vt=Tt):(Ye=ge,Et=Tt);for(let at=0;at<V.length;at++)X[at]!=null&&(ie==0?Ye=Et=V[at]:gt=vt=V[at],a.moveTo(Ye,gt),a.lineTo(Et,vt));a.stroke(),l==1&&a.translate(-Ke,-Ke)}function la(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let ge=M[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Wi(!1));return}else ie._show||(X=!1,ie._show=!0,Wi(!1));let be=ie.side,Me=be%2,{min:De,max:Pe}=ge,[je,Ke]=Ji(oe,De,Pe,Me==0?ft:He);if(Ke==0)return;let Ye=ge.distr==2,gt=ie._splits=ie.splits(r,oe,De,Pe,je,Ke,Ye),Et=ge.distr==2?gt.map(et=>Cr[et]):gt,vt=ge.distr==2?Cr[gt[1]]-Cr[gt[0]]:je,Tt=ie._values=ie.values(r,ie.filter(r,Et,oe,Ke,vt),oe,Ke,vt);ie._rotate=be==2?ie.rotate(r,Tt,oe,Ke):0;let at=ie._size;ie._size=hi(ie.size(r,Tt,oe,V)),at!=null&&ie._size!=at&&(X=!1)}),X}function Ja(V){let X=!0;return sa.forEach((ie,oe)=>{let ge=ie(r,oe,Fi,V);ge!=xr[oe]&&(X=!1),xr[oe]=ge}),X}function fo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),De=ie==0||ie==3?-1:1,[Pe,je]=X._found;if(X.label!=null){let tn=X.labelGap*De,lr=Xn((X._lpos+tn)*Ht);po(X.labelFont[0],Me,"center",ie==2?Na:hf),a.save(),oe==1?(ge=be=0,a.translate(lr,Xn(ir+Zn/2)),a.rotate((ie==3?-jl:jl)/2)):(ge=Xn(Qn+Zt/2),be=lr);let bo=Ef(X.label)?X.label(r,V,Pe,je):X.label;a.fillText(bo,ge,be),a.restore()}if(je==0)continue;let Ke=M[X.scale],Ye=oe==0?Zt:Zn,gt=oe==0?Qn:ir,Et=X._splits,vt=Ke.distr==2?Et.map(tn=>Cr[tn]):Et,Tt=Ke.distr==2?Cr[Et[1]]-Cr[Et[0]]:Pe,at=X.ticks,et=X.border,on=at.show?at.size:0,fn=Xn(on*Ht),qn=Xn((X.alignTo==2?X._size-on-X.gap:X.gap)*Ht),Ft=X._rotate*-jl/180,pe=d(X._pos*Ht),Ae=(fn+qn)*De,xe=pe+Ae;be=oe==0?xe:0,ge=oe==1?xe:0;let Be=X.font[0],ot=X.align==1?Vs:X.align==2?Iu:Ft>0?Vs:Ft<0?Iu:oe==0?"center":ie==3?Iu:Vs,kt=Ft||oe==1?"middle":ie==2?Na:hf;po(Be,Me,ot,kt);let Wt=X.font[1]*X.lineGap,_t=Et.map(tn=>d(x(tn,Ke,Ye,gt))),Lr=X._values;for(let tn=0;tn<Lr.length;tn++){let lr=Lr[tn];if(lr!=null){oe==0?ge=_t[tn]:be=_t[tn],lr=""+lr;let bo=lr.indexOf(`
|
1492
|
+
`)==-1?[lr]:lr.split(/\n/gm);for(let Mn=0;Mn<bo.length;Mn++){let Ms=bo[Mn];Ft?(a.save(),a.translate(ge,be+Mn*Wt),a.rotate(Ft),a.fillText(Ms,0,0),a.restore()):a.fillText(Ms,ge,be+Mn*Wt)}}}at.show&&Pi(_t,at.filter(r,vt,V,je,Tt),oe,ie,pe,fn,rn(at.width*Ht,3),at.stroke(r,V),at.dash,at.cap);let wi=X.grid;wi.show&&Pi(_t,wi.filter(r,vt,V,je,Tt),oe,oe==0?2:1,oe==0?ir:Qn,oe==0?Zn:Zt,rn(wi.width*Ht,3),wi.stroke(r,V),wi.dash,wi.cap),et.show&&Pi([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?ir:Qn,oe==1?Zn:Zt,rn(et.width*Ht,3),et.stroke(r,V),et.dash,et.cap)}Qe("drawAxes")}function Wi(V){b.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(m==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let mo=!1,Ko=!1,vo=[];function ca(){Ko=!1;for(let V=0;V<vo.length;V++)Qe(...vo[V]);vo.length=0}function eo(){mo||(Lk(ua),mo=!0)}function Fe(V,X=!1){mo=!0,Ko=X,V(r),ua(),X&&vo.length>0&&queueMicrotask(ca)}r.batch=Fe;function ua(){if(lo&&(Zi(),lo=!1),Li&&(Jr(),Li=!1),Ei){if(cn(c,Vs,zt),cn(c,Na,un),cn(c,Ra,ft),cn(c,Oa,He),cn(o,Vs,zt),cn(o,Na,un),cn(o,Ra,ft),cn(o,Oa,He),cn(u,Ra,rr),cn(u,Oa,Mr),s.width=Xn(rr*Ht),s.height=Xn(Mr*Ht),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let be=ge===3||ge===0?ie:0,Me=ge%2==1;cn(V,Me?"left":"top",oe-be),cn(V,Me?"width":"height",ie),cn(V,Me?"top":"left",Me?un:zt),cn(V,Me?"height":"width",Me?He:ft),Fu(V,us)}else Yr(V,us)}),Qi=jr=ho=Hr=Wo=Cs=ks=Bo=Po=null,Jn=1,W(!0),zt!=Un||un!=Tr||ft!=yr||He!=wn){Wi(!1);let V=ft/yr,X=He/wn;if(ue&&!Ri&&ne.left>=0){ne.left*=V,ne.top*=X,ti&&Ki(ti,Xn(ne.left),0,ft,He),Fn&&Ki(Fn,0,Xn(ne.top),ft,He);for(let ie=0;ie<br.length;ie++){let oe=br[ie];oe!=null&&(Xi[ie]*=V,Di[ie]*=X,Ki(oe,hi(Xi[ie]),hi(Di[ie]),ft,He))}}if(pt.show&&!co&&pt.left>=0&&pt.width>0){pt.left*=V,pt.width*=V,pt.top*=X,pt.height*=X;for(let ie in Y)cn(Ir,ie,pt[ie])}Un=zt,Tr=un,yr=ft,wn=He}Qe("setSize"),Ei=!1}rr>0&&Mr>0&&(a.clearRect(0,0,s.width,s.height),Qe("drawClear"),O.forEach(V=>V()),Qe("draw")),pt.show&&co&&(en(pt),co=!1),ue&&Ri&&(A(null,!0,!1),Ri=!1),he.show&&he.live&&ur&&(v(),ur=!1),h||(h=!0,r.status=1,Qe("ready")),pi=!1,mo=!1}r.redraw=(V,X)=>{Li=X||!1,V!==!1?Vn(C,z.min,z.max):eo()};function Oe(V,X){let ie=M[V];if(ie.from==null){if(Dn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Dn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Dn>0&&(X.min=Mi(X.min,t[0]),X.max=Mi(X.max,t[0]),X.min==X.max&&X.max++),S[V]=X,lo=!0,eo()}}r.setScale=Oe;let xn,yo,ti,Fn,ha,wo,fi,to,Vt,jt,Kt,Nt,mi=!1;const An=ne.drag;let We=An.x,an=An.y;ue&&(ne.x&&(xn=ui(nk,o)),ne.y&&(yo=ui(rk,o)),z.ori==0?(ti=xn,Fn=yo):(ti=yo,Fn=xn),Kt=ne.left,Nt=ne.top);const pt=r.select=zn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Ir=pt.show?ui(tk,pt.over?o:c):null;function en(V,X){if(pt.show){for(let ie in V)pt[ie]=V[ie],ie in Y&&cn(Ir,ie,V[ie]);X!==!1&&Qe("setSelect")}}r.setSelect=en;function hn(V){if(b[V].show)le&&Fu(Te[V],us);else if(le&&Yr(Te[V],us),ue){let X=bn?br[0]:br[V];X!=null&&Ki(X,-10,-10,ft,He)}}function Vn(V,X,ie){Oe(V,{min:X,max:ie})}function Er(V,X,ie,oe){X.focus!=null&&or(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,hn(be),m==2?(Vn(ge.facets[0].scale,null,null),Vn(ge.facets[1].scale,null,null)):Vn(ge.scale,null,null),eo())}),ie!==!1&&Qe("setSeries",V,X),oe&&Ct("setSeries",r,V,X)}r.setSeries=Er;function vi(V,X){zn(k[V],X)}function _n(V,X){V.fill=Rt(V.fill||null),V.dir=Bt(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Ur(V){V==null?k.length=0:k.splice(V,1)}r.addBand=_n,r.setBand=vi,r.delBand=Ur;function qo(V,X){b[V].alpha=X,ue&&br[V]!=null&&(br[V].style.opacity=X),le&&Te[V]&&(Te[V].style.opacity=X)}let $n,ni,ri;const yi={focus:!0};function or(V){if(V!=ri){let X=V==null,ie=wr.alpha!=1;b.forEach((oe,ge)=>{if(m==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&qo(ge,be?1:wr.alpha)}}),ri=V,ie&&eo()}}le&&Ni&&yn(ff,fe,V=>{ne._lock||(Oi(V),ri!=null&&Er(null,yi,!0,it.setSeries))});function sr(V,X,ie){let oe=M[X];ie&&(V=V/Ht-(oe.ori==1?un:zt));let ge=ft;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,De=V/ge,Pe=be+(Me-be)*De,je=oe.distr;return je==3?Gs(10,Pe):je==4?bk(Pe,oe.asinh):je==100?oe.bwd(Pe):Pe}function hr(V,X){let ie=sr(V,C,X);return Mi(ie,t[0],sn,Sn)}r.valToIdx=V=>Mi(V,t[0]),r.posToIdx=hr,r.posToVal=sr,r.valToPos=(V,X,ie)=>M[X].ori==0?g(V,M[X],ie?Zt:ft,ie?Qn:0):y(V,M[X],ie?Zn:He,ie?ir:0),r.setCursor=(V,X,ie)=>{Kt=V.left,Nt=V.top,A(null,X,ie)};function $s(V,X){cn(Ir,Vs,pt.left=V),cn(Ir,Ra,pt.width=X)}function dr(V,X){cn(Ir,Na,pt.top=V),cn(Ir,Oa,pt.height=X)}let kr=z.ori==0?$s:dr,ii=z.ori==1?$s:dr;function oi(){if(le&&he.live)for(let V=m==2?1:0;V<b.length;V++){if(V==0&&ct)continue;let X=he.values[V],ie=0;for(let oe in X)Ge[V][ie++].firstChild.nodeValue=X[oe]}}function v(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):Sk(V.idx)||te.fill(V.idx),he.idx=te[0]),le&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||m==1&&!ct)&&$(ie,te[ie]);oi()}ur=!1,X!==!1&&Qe("setLegend")}r.setLegend=v;function $(V,X){let ie=b[V],oe=V==0&&P==2?Cr:t[V],ge;ct?ge=ie.values(r,V,X)??Je:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?Je:{_:ge}),he.values[V]=ge}function A(V,X,ie){Vt=Kt,jt=Nt,[Kt,Nt]=ne.move(r,Kt,Nt),ne.left=Kt,ne.top=Nt,ue&&(ti&&Ki(ti,Xn(Kt),0,ft,He),Fn&&Ki(Fn,0,Xn(Nt),ft,He));let oe,ge=sn>Sn;$n=nn,ni=null;let be=z.ori==0?ft:He,Me=z.ori==1?ft:He;if(Kt<0||Dn==0||ge){oe=ne.idx=null;for(let De=0;De<b.length;De++){let Pe=br[De];Pe!=null&&Ki(Pe,-10,-10,ft,He)}Ni&&Er(null,yi,!0,V==null&&it.setSeries),he.live&&(te.fill(oe),ur=!0)}else{let De,Pe,je;m==1&&(De=z.ori==0?Kt:Nt,Pe=sr(De,C),oe=ne.idx=Mi(Pe,t[0],sn,Sn),je=N(t[0][oe],z,be,0));let Ke=-10,Ye=-10,gt=0,Et=0,vt=!0,Tt="",at="";for(let et=m==2?1:0;et<b.length;et++){let on=b[et],fn=te[et],qn=fn==null?null:m==1?t[et][fn]:t[et][1][fn],Ft=ne.dataIdx(r,et,oe,Pe),pe=Ft==null?null:m==1?t[et][Ft]:t[et][1][Ft];if(ur=ur||pe!=qn||Ft!=fn,te[et]=Ft,et>0&&on.show){let Ae=Ft==null?-10:Ft==oe?je:N(m==1?t[0][Ft]:t[et][0][Ft],z,be,0),xe=pe==null?-10:_(pe,m==1?M[on.scale]:M[on.facets[1].scale],Me,0);if(Ni&&pe!=null){let Be=z.ori==1?Kt:Nt,ot=Yn(wr.dist(r,et,Ft,xe,Be));if(ot<$n){let kt=wr.bias;if(kt!=0){let Wt=sr(Be,on.scale),_t=pe>=0?1:-1,Lr=Wt>=0?1:-1;Lr==_t&&(Lr==1?kt==1?pe>=Wt:pe<=Wt:kt==1?pe<=Wt:pe>=Wt)&&($n=ot,ni=et)}else $n=ot,ni=et}}if(ur||bn){let Be,ot;z.ori==0?(Be=Ae,ot=xe):(Be=xe,ot=Ae);let kt,Wt,_t,Lr,wi,tn,lr=!0,bo=Nn.bbox;if(bo!=null){lr=!1;let Mn=bo(r,et);_t=Mn.left,Lr=Mn.top,kt=Mn.width,Wt=Mn.height}else _t=Be,Lr=ot,kt=Wt=Nn.size(r,et);if(tn=Nn.fill(r,et),wi=Nn.stroke(r,et),bn)et==ni&&$n<=wr.prox&&(Ke=_t,Ye=Lr,gt=kt,Et=Wt,vt=lr,Tt=tn,at=wi);else{let Mn=br[et];Mn!=null&&(Xi[et]=_t,Di[et]=Lr,Cf(Mn,kt,Wt,lr),bf(Mn,tn,wi),Ki(Mn,hi(_t),hi(Lr),ft,He))}}}}if(bn){let et=wr.prox,on=ri==null?$n<=et:$n>et||ni!=ri;if(ur||on){let fn=br[0];fn!=null&&(Xi[0]=Ke,Di[0]=Ye,Cf(fn,gt,Et,vt),bf(fn,Tt,at),Ki(fn,hi(Ke),hi(Ye),ft,He))}}}if(pt.show&&mi)if(V!=null){let[De,Pe]=it.scales,[je,Ke]=it.match,[Ye,gt]=V.cursor.sync.scales,Et=V.cursor.drag;if(We=Et._x,an=Et._y,We||an){let{left:vt,top:Tt,width:at,height:et}=V.select,on=V.scales[Ye].ori,fn=V.posToVal,qn,Ft,pe,Ae,xe,Be=De!=null&&je(De,Ye),ot=Pe!=null&&Ke(Pe,gt);Be&&We?(on==0?(qn=vt,Ft=at):(qn=Tt,Ft=et),pe=M[De],Ae=N(fn(qn,Ye),pe,be,0),xe=N(fn(qn+Ft,Ye),pe,be,0),kr(Ti(Ae,xe),Yn(xe-Ae))):kr(0,be),ot&&an?(on==1?(qn=vt,Ft=at):(qn=Tt,Ft=et),pe=M[Pe],Ae=_(fn(qn,gt),pe,Me,0),xe=_(fn(qn+Ft,gt),pe,Me,0),ii(Ti(Ae,xe),Yn(xe-Ae))):ii(0,Me)}else Q()}else{let De=Yn(Vt-ha),Pe=Yn(jt-wo);if(z.ori==1){let gt=De;De=Pe,Pe=gt}We=An.x&&De>=An.dist,an=An.y&&Pe>=An.dist;let je=An.uni;je!=null?We&&an&&(We=De>=je,an=Pe>=je,!We&&!an&&(Pe>De?an=!0:We=!0)):An.x&&An.y&&(We||an)&&(We=an=!0);let Ke,Ye;We&&(z.ori==0?(Ke=fi,Ye=Kt):(Ke=to,Ye=Nt),kr(Ti(Ke,Ye),Yn(Ye-Ke)),an||ii(0,Me)),an&&(z.ori==1?(Ke=fi,Ye=Kt):(Ke=to,Ye=Nt),ii(Ti(Ke,Ye),Yn(Ye-Ke)),We||kr(0,be)),!We&&!an&&(kr(0,0),ii(0,0))}if(An._x=We,An._y=an,V==null){if(ie){if(pn!=null){let[De,Pe]=it.scales;it.values[0]=De!=null?sr(z.ori==0?Kt:Nt,De):null,it.values[1]=Pe!=null?sr(z.ori==1?Kt:Nt,Pe):null}Ct(Lu,r,Kt,Nt,ft,He,oe)}if(Ni){let De=ie&&it.setSeries,Pe=wr.prox;ri==null?$n<=Pe&&Er(ni,yi,!0,De):$n>Pe?Er(null,yi,!0,De):ni!=ri&&Er(ni,yi,!0,De)}}ur&&(he.idx=oe,v()),X!==!1&&Qe("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&W(!1),F}});function W(V=!1){V?F=null:(F=o.getBoundingClientRect(),Qe("syncRect",F))}function B(V,X,ie,oe,ge,be,Me){ne._lock||mi&&V!=null&&V.movementX==0&&V.movementY==0||(K(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?A(null,!0,!0):A(X,!0,!1))}function K(V,X,ie,oe,ge,be,Me,De,Pe){if(F==null&&W(!1),Oi(V),V!=null)ie=V.clientX-F.left,oe=V.clientY-F.top;else{if(ie<0||oe<0){Kt=-10,Nt=-10;return}let[je,Ke]=it.scales,Ye=X.cursor.sync,[gt,Et]=Ye.values,[vt,Tt]=Ye.scales,[at,et]=it.match,on=X.axes[0].side%2==1,fn=z.ori==0?ft:He,qn=z.ori==1?ft:He,Ft=on?be:ge,pe=on?ge:be,Ae=on?oe:ie,xe=on?ie:oe;if(vt!=null?ie=at(je,vt)?x(gt,M[je],fn,0):-10:ie=fn*(Ae/Ft),Tt!=null?oe=et(Ke,Tt)?x(Et,M[Ke],qn,0):-10:oe=qn*(xe/pe),z.ori==1){let Be=ie;ie=oe,oe=Be}}Pe&&(X==null||X.cursor.event.type==Lu)&&((ie<=1||ie>=ft-1)&&(ie=ps(ie,ft)),(oe<=1||oe>=He-1)&&(oe=ps(oe,He))),De?(ha=ie,wo=oe,[fi,to]=ne.move(r,ie,oe)):(Kt=ie,Nt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){en(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,ge,be,Me){mi=!0,We=an=An._x=An._y=!1,K(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(yn(Ru,Nu,we,!1),Ct(pf,r,fi,to,ft,He,null));let{left:De,top:Pe,width:je,height:Ke}=pt;re=De,se=Pe,ye=je,Ce=Ke}function we(V,X,ie,oe,ge,be,Me){mi=An._x=An._y=!1,K(V,X,ie,oe,ge,be,Me,!1,!0);let{left:De,top:Pe,width:je,height:Ke}=pt,Ye=je>0||Ke>0,gt=re!=De||se!=Pe||ye!=je||Ce!=Ke;if(Ye&>&&en(pt),An.setScale&&Ye&>){let Et=De,vt=je,Tt=Pe,at=Ke;if(z.ori==1&&(Et=Pe,vt=Ke,Tt=De,at=je),We&&Vn(C,sr(Et,C),sr(Et+vt,C)),an)for(let et in M){let on=M[et];et!=C&&on.from==null&&on.min!=nn&&Vn(et,sr(Tt+at,et),sr(Tt,et))}Q()}else ne.lock&&(ne._lock=!ne._lock,A(X,!0,V!=null));V!=null&&(Hn(Ru,Nu),Ct(Ru,r,Kt,Nt,ft,He,null))}function Re(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Oi(V);let De=mi;if(mi){let Pe=!0,je=!0,Ke=10,Ye,gt;z.ori==0?(Ye=We,gt=an):(Ye=an,gt=We),Ye&>&&(Pe=Kt<=Ke||Kt>=ft-Ke,je=Nt<=Ke||Nt>=He-Ke),Ye&&Pe&&(Kt=Kt<fi?0:ft),gt&&je&&(Nt=Nt<to?0:He),A(null,!0,!0),mi=!1}Kt=-10,Nt=-10,te.fill(null),A(null,!0,!0),De&&(mi=De)}function Le(V,X,ie,oe,ge,be,Me){ne._lock||(Oi(V),xs(),Q(),V!=null&&Ct(mf,r,Kt,Nt,ft,He,null))}function ze(){E.forEach(BS),uo(r.width,r.height,!0)}hs(Fl,qs,ze);const rt={};rt.mousedown=me,rt.mousemove=B,rt.mouseup=we,rt.dblclick=Le,rt.setSeries=(V,X,ie,oe)=>{let ge=it.match[2];ie=ge(r,X,ie),ie!=-1&&Er(ie,oe,!0,!1)},ue&&(yn(pf,o,me),yn(Lu,o,B),yn(gf,o,V=>{Oi(V),W(!1)}),yn(ff,o,Re),yn(mf,o,Le),oh.add(r),r.syncRect=W);const qe=r.hooks=n.hooks||{};function Qe(V,X,ie){Ko?vo.push([V,X,ie]):V in qe&&qe[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)qe[X]=(qe[X]||[]).concat(V.hooks[X])});const ln=(V,X,ie)=>ie,it=zn({key:null,setSeries:!1,filters:{pub:Of,sub:Of},scales:[C,b[1]?b[1].scale:null],match:[Nf,Nf,ln],values:[null,null]},ne.sync);it.match.length==2&&it.match.push(ln),ne.sync=it;const pn=it.key,mt=wm(pn);function Ct(V,X,ie,oe,ge,be,Me){it.filters.pub(V,X,ie,oe,ge,be,Me)&&mt.pub(V,X,ie,oe,ge,be,Me)}mt.sub(r);function Kn(V,X,ie,oe,ge,be,Me){it.filters.sub(V,X,ie,oe,ge,be,Me)&&rt[V](null,X,ie,oe,ge,be,Me)}r.pub=Kn;function ar(){mt.unsub(r),oh.delete(r),Zr.clear(),Wu(Fl,qs,ze),p.remove(),fe==null||fe.remove(),Qe("destroy")}r.destroy=ar;function gn(){Qe("init",n,t),Fo(t||n.data,!1),S[C]?Oe(C,S[C]):xs(),co=pt.show&&(pt.width>0||pt.height>0),Ri=ur=!0,uo(n.width,n.height)}return b.forEach(oa),E.forEach(ei),e?e instanceof HTMLElement?(e.appendChild(p),gn()):e(r,gn):gn(),r}mr.assign=zn,mr.fmtNum=ju,mr.rangeNum=zl,mr.rangeLog=Bl,mr.rangeAsinh=Bu,mr.orient=fs,mr.pxRatio=Ht,mr.join=Ek,mr.fmtDate=Ku,mr.tzDate=jk,mr.sync=wm;{mr.addGap=SS,mr.clipGaps=Gl;let n=mr.paths={points:_m};n.linear=Mm,n.stepped=$S,n.bars=MS,n.spline=IS}var Dm,Fm;function zS(){return Fm||(Fm=1,Dm=function(n,t,e,r,m){var g,y;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(m===void 0)m=n.length-1;else if(m=m|0,m<r||m>=n.length)throw new RangeError("invalid upper bound");for(;r<=m;)if(g=r+(m-r>>>1),y=+e(n[g],t,g,n),y<0)r=g+1;else if(y>0)m=g-1;else return g;return~r}),Dm}var jS=zS();const gN=In("a",wl(jS));var ah,Pm;function HS(){if(Pm)return ah;Pm=1;function n(t,e,r){var m=-1,g=t.length;e<0&&(e=-e>g?0:g+e),r=r>g?g:r,r<0&&(r+=g),g=e>r?0:r-e>>>0,e>>>=0;for(var y=Array(g);++m<g;)y[m]=t[m+e];return y}return ah=n,ah}var lh,Wm;function US(){if(Wm)return lh;Wm=1;var n=HS();function t(e,r,m){var g=e.length;return m=m===void 0?g:m,!r&&m>=g?e:n(e,r,m)}return lh=t,lh}var ch,Bm;function zm(){if(Bm)return ch;Bm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=t+e+r,g="\\ufe0e\\ufe0f",y="\\u200d",x=RegExp("["+y+n+m+g+"]");function h(p){return x.test(p)}return ch=h,ch}var uh,jm;function VS(){if(jm)return uh;jm=1;function n(t){return t.split("")}return uh=n,uh}var hh,Hm;function KS(){if(Hm)return hh;Hm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=t+e+r,g="\\ufe0e\\ufe0f",y="["+n+"]",x="["+m+"]",h="\\ud83c[\\udffb-\\udfff]",p="(?:"+x+"|"+h+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",o=p+"?",l="["+g+"]?",d="(?:"+c+"(?:"+[s,a,u].join("|")+")"+l+o+")*",w=l+o+d,b="(?:"+[s+x+"?",x,a,u,y].join("|")+")",E=RegExp(h+"(?="+h+")|"+b+w,"g");function M(k){return k.match(E)||[]}return hh=M,hh}var dh,Um;function qS(){if(Um)return dh;Um=1;var n=VS(),t=zm(),e=KS();function r(m){return t(m)?e(m):n(m)}return dh=r,dh}var ph,Vm;function GS(){if(Vm)return ph;Vm=1;var n=typeof Ro=="object"&&Ro&&Ro.Object===Object&&Ro;return ph=n,ph}var gh,Km;function YS(){if(Km)return gh;Km=1;var n=GS(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return gh=e,gh}var fh,qm;function mh(){if(qm)return fh;qm=1;var n=YS(),t=n.Symbol;return fh=t,fh}var vh,Gm;function XS(){if(Gm)return vh;Gm=1;function n(t,e){for(var r=-1,m=t==null?0:t.length,g=Array(m);++r<m;)g[r]=e(t[r],r,t);return g}return vh=n,vh}var yh,Ym;function QS(){if(Ym)return yh;Ym=1;var n=Array.isArray;return yh=n,yh}var wh,Xm;function ZS(){if(Xm)return wh;Xm=1;var n=mh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,m=n?n.toStringTag:void 0;function g(y){var x=e.call(y,m),h=y[m];try{y[m]=void 0;var p=!0}catch{}var s=r.call(y);return p&&(x?y[m]=h:delete y[m]),s}return wh=g,wh}var bh,Qm;function JS(){if(Qm)return bh;Qm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return bh=e,bh}var xh,Zm;function eA(){if(Zm)return xh;Zm=1;var n=mh(),t=ZS(),e=JS(),r="[object Null]",m="[object Undefined]",g=n?n.toStringTag:void 0;function y(x){return x==null?x===void 0?m:r:g&&g in Object(x)?t(x):e(x)}return xh=y,xh}var Ch,Jm;function tA(){if(Jm)return Ch;Jm=1;function n(t){return t!=null&&typeof t=="object"}return Ch=n,Ch}var kh,ev;function nA(){if(ev)return kh;ev=1;var n=eA(),t=tA(),e="[object Symbol]";function r(m){return typeof m=="symbol"||t(m)&&n(m)==e}return kh=r,kh}var Sh,tv;function rA(){if(tv)return Sh;tv=1;var n=mh(),t=XS(),e=QS(),r=nA(),m=n?n.prototype:void 0,g=m?m.toString:void 0;function y(x){if(typeof x=="string")return x;if(e(x))return t(x,y)+"";if(r(x))return g?g.call(x):"";var h=x+"";return h=="0"&&1/x==-1/0?"-0":h}return Sh=y,Sh}var Ah,nv;function Zl(){if(nv)return Ah;nv=1;var n=rA();function t(e){return e==null?"":n(e)}return Ah=t,Ah}var _h,rv;function iA(){if(rv)return _h;rv=1;var n=US(),t=zm(),e=qS(),r=Zl();function m(g){return function(y){y=r(y);var x=t(y)?e(y):void 0,h=x?x[0]:y.charAt(0),p=x?n(x,1).join(""):y.slice(1);return h[g]()+p}}return _h=m,_h}var $h,iv;function ov(){if(iv)return $h;iv=1;var n=iA(),t=n("toUpperCase");return $h=t,$h}var oA=ov();const sA=wl(oA);var Mh,sv;function aA(){if(sv)return Mh;sv=1;var n=Zl(),t=ov();function e(r){return t(n(r).toLowerCase())}return Mh=e,Mh}var Th,av;function lA(){if(av)return Th;av=1;function n(t,e,r,m){var g=-1,y=t==null?0:t.length;for(m&&y&&(r=t[++g]);++g<y;)r=e(r,t[g],g,t);return r}return Th=n,Th}var Ih,lv;function cA(){if(lv)return Ih;lv=1;function n(t){return function(e){return t==null?void 0:t[e]}}return Ih=n,Ih}var Eh,cv;function uA(){if(cv)return Eh;cv=1;var n=cA(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return Eh=e,Eh}var Lh,uv;function hA(){if(uv)return Lh;uv=1;var n=uA(),t=Zl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",m="\\ufe20-\\ufe2f",g="\\u20d0-\\u20ff",y=r+m+g,x="["+y+"]",h=RegExp(x,"g");function p(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return Lh=p,Lh}var Rh,hv;function dA(){if(hv)return Rh;hv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Rh=t,Rh}var Oh,dv;function pA(){if(dv)return Oh;dv=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return Oh=t,Oh}var Nh,pv;function gA(){if(pv)return Nh;pv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=t+e+r,g="\\u2700-\\u27bf",y="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",c=x+h+p+s,o="['’]",l="["+c+"]",d="["+m+"]",w="\\d+",b="["+g+"]",E="["+y+"]",M="[^"+n+c+w+g+y+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+k+")",R="[^"+n+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",z="\\u200d",P="(?:"+E+"|"+M+")",N="(?:"+I+"|"+M+")",_="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",j="["+u+"]?",U="(?:"+z+"(?:"+[R,O,L].join("|")+")"+j+D+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=j+D+U,he="(?:"+[b,O,L].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+_+"(?="+[l,I,"$"].join("|")+")",N+"+"+S+"(?="+[l,I+P,"$"].join("|")+")",I+"?"+P+"+"+_,I+"+"+S,Z,G,w,he].join("|"),"g");function le(ue){return ue.match(ne)||[]}return Nh=le,Nh}var Dh,gv;function fA(){if(gv)return Dh;gv=1;var n=dA(),t=pA(),e=Zl(),r=gA();function m(g,y,x){return g=e(g),y=x?void 0:y,y===void 0?t(g)?r(g):n(g):g.match(y)||[]}return Dh=m,Dh}var Fh,fv;function mA(){if(fv)return Fh;fv=1;var n=lA(),t=hA(),e=fA(),r="['’]",m=RegExp(r,"g");function g(y){return function(x){return n(e(t(x).replace(m,"")),y,"")}}return Fh=g,Fh}var Ph,mv;function vA(){if(mv)return Ph;mv=1;var n=aA(),t=mA(),e=t(function(r,m,g){return m=m.toLowerCase(),r+(g?n(m):m)});return Ph=e,Ph}var yA=vA();const wA=wl(yA),bA=Object.assign({"./ArrayWidget.vue":()=>nt(()=>tt.import("./ArrayWidget-j3ncPuPx-865525dca96fa962e762.js"),void 0),"./ArrayplotWidget.vue":()=>nt(()=>tt.import("./ArrayplotWidget-DuLaiGa9-77ae8df1449985468989.js"),void 0),"./BlockWidget.vue":()=>nt(()=>tt.import("./BlockWidget-Bf5Dd6Cr-d31f08e10f403a7bf57e.js"),void 0),"./ButtonWidget.vue":()=>nt(()=>tt.import("./ButtonWidget-bl_mGFYh-82796ecacf78983ad30e.js"),void 0),"./CanvasWidget.vue":()=>nt(()=>tt.import("./CanvasWidget-boDemgx1-8a67031c4b3c917a3158.js"),void 0),"./CanvasdotWidget.vue":()=>nt(()=>tt.import("./CanvasdotWidget-BZBbJcER-e3de717adbeef34c908c.js"),void 0),"./CanvasimageWidget.vue":()=>nt(()=>tt.import("./CanvasimageWidget-6ywvT5jd-24d197071b0846d6a605.js"),void 0),"./CanvasimagevalueWidget.vue":()=>nt(()=>tt.import("./CanvasimagevalueWidget-DjWrA3gX-71f90cb6bbc826d99b8a.js"),void 0),"./CanvaslabelWidget.vue":()=>nt(()=>tt.import("./CanvaslabelWidget-Bq4V2BQh-8b94bda4ac0a22474886.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>nt(()=>tt.import("./CanvaslabelvalueWidget-C8oNcFLi-b32e4701922dd65885cf.js"),void 0),"./CanvaslineWidget.vue":()=>nt(()=>tt.import("./CanvaslineWidget-nvbL2GoL-fd7a69454aa7d7a60607.js"),void 0),"./CanvaslinevalueWidget.vue":()=>nt(()=>tt.import("./CanvaslinevalueWidget-ZACQedKx-a17f05593215133352bf.js"),void 0),"./CheckbuttonWidget.vue":()=>nt(()=>tt.import("./CheckbuttonWidget-B82UE8AB-33f6a3ea5cdc2c0678ec.js"),void 0),"./ComboboxWidget.vue":()=>nt(()=>tt.import("./ComboboxWidget-4OFiSkI6-35bffbe5024f8960eac0.js"),void 0),"./DateWidget.vue":()=>nt(()=>tt.import("./DateWidget-BmwtdirF-953012a0d842c67dc3d8.js"),void 0),"./DynamicWidget.vue":()=>nt(()=>tt.import("./DynamicWidget-CfMtj7H8-487bbed699f6e446d841.js"),void 0),"./FormatvalueWidget.vue":()=>nt(()=>tt.import("./FormatvalueWidget-C8exC3bj-10c0ce0b8b3d442b8a1d.js"),void 0),"./HorizontalWidget.vue":()=>nt(()=>tt.import("./HorizontalWidget-Ck151zVw-1243b4b90d91a17e7861.js"),void 0),"./HorizontalboxWidget.vue":()=>nt(()=>tt.import("./HorizontalboxWidget-D3P-cl9V-20e854a3684b472674b8.js"),void 0),"./HorizontallineWidget.vue":()=>nt(()=>tt.import("./HorizontallineWidget-BE1TjPU8-9dba1d47ffa1e8a62741.js"),void 0),"./IframeWidget.vue":()=>nt(()=>tt.import("./IframeWidget-BgJCgues-1ffd2afa1139696f840b.js"),void 0),"./ImageviewerWidget.vue":()=>nt(()=>tt.import("./ImageviewerWidget-BlhFZD2f-90bf255b9b089f01df20.js"),void 0),"./LabelWidget.vue":()=>nt(()=>tt.import("./LabelWidget-Cwosk4x2-8edae57c0a81b5eeb5ee.js"),void 0),"./LabelledWidget.vue":()=>nt(()=>tt.import("./LabelledWidget-Dl6rAFTQ-93da4c5c8ee8689f3291.js"),void 0),"./LabelprogressbarWidget.vue":()=>nt(()=>tt.import("./LabelprogressbarWidget-MuAKesOz-2b152f4472c33f2264dc.js"),void 0),"./LabelsparklineWidget.vue":()=>nt(()=>tt.import("./LabelsparklineWidget-6LA6Ox3d-1fe13567a708870deb65.js"),void 0),"./LabelvalueWidget.vue":()=>nt(()=>tt.import("./LabelvalueWidget-BxAXx-Tf-a16a9d20a266bded417c.js"),void 0),"./LabelvaluedescWidget.vue":()=>nt(()=>tt.import("./LabelvaluedescWidget-Dwwlnd1g-fb185069e912f0539320.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>nt(()=>tt.import("./LabelvaluelimitsbarWidget-Dv8Qk8kK-406b23da4cf57817d7db.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>nt(()=>tt.import("./LabelvaluelimitscolumnWidget-D-_gl6fq-b342cc11675c69499e02.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>nt(()=>tt.import("./LabelvaluerangebarWidget-B3MKT-3Y-c7babec553bec293207e.js"),void 0),"./LedWidget.vue":()=>nt(()=>tt.import("./LedWidget-DOuDD8LI-8b640a840ccd6cdd9607.js"),void 0),"./LimitsbarWidget.vue":()=>nt(()=>tt.import("./LimitsbarWidget-D1U6SvVL-da676dbdf603be66efed.js"),void 0),"./LimitscolorWidget.vue":()=>nt(()=>tt.import("./LimitscolorWidget-iSMGusqt-7f95925708f6e95ac8ad.js"),void 0),"./LimitscolumnWidget.vue":()=>nt(()=>tt.import("./LimitscolumnWidget-DjxZTt_r-d089a9d1ef10ec10695e.js"),void 0),"./LinegraphWidget.vue":()=>nt(()=>tt.import("./LinegraphWidget-BHKU6zlT-78a7e66257f817f12863.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>nt(()=>tt.import("./MatrixbycolumnsWidget-BKO-A2QD-5263bf466c5203a8c262.js"),void 0),"./ProgressbarWidget.vue":()=>nt(()=>tt.import("./ProgressbarWidget-fbr2qu_N-906ff59566a2a3475213.js"),void 0),"./RadiobuttonWidget.vue":()=>nt(()=>tt.import("./RadiobuttonWidget-DL08zcQT-134058082bc9e0a3521c.js"),void 0),"./RadiogroupWidget.vue":()=>nt(()=>tt.import("./RadiogroupWidget-DW9Xpj3c-9fee4d667f36906f17e1.js"),void 0),"./RangebarWidget.vue":()=>nt(()=>tt.import("./RangebarWidget-o9q55kjc-3ef1228b915927e02cbe.js"),void 0),"./RollupWidget.vue":()=>nt(()=>tt.import("./RollupWidget-BHnjj-DF-c7a1da0eaaafd250f85f.js"),void 0),"./ScrollwindowWidget.vue":()=>nt(()=>tt.import("./ScrollwindowWidget-D-QVwztC-5b125e6689ad00c88146.js"),void 0),"./SignalWidget.vue":()=>nt(()=>tt.import("./SignalWidget-CsWuufdx-3b9c80bbbbc0db4cf138.js"),void 0),"./SpacerWidget.vue":()=>nt(()=>tt.import("./SpacerWidget-Di9-qunj-ffee3b9914d4d2f53a0a.js"),void 0),"./SparklineWidget.vue":()=>nt(()=>tt.import("./SparklineWidget-B6-zhdPW-324f8a37cf23a1bf2f6c.js"),void 0),"./TabbookWidget.vue":()=>nt(()=>tt.import("./TabbookWidget-B1E1_mzA-39fe579408eef8b7fe3f.js"),void 0),"./TextboxWidget.vue":()=>nt(()=>tt.import("./TextboxWidget-CBVEXPw_-1a126e1502cdddc80137.js"),void 0),"./TextfieldWidget.vue":()=>nt(()=>tt.import("./TextfieldWidget-DZMHrtQa-b64ac3c1daada731c4bf.js"),void 0),"./TimeWidget.vue":()=>nt(()=>tt.import("./TimeWidget-K4MNmJ7J-7cc31b4f9829e8bd8251.js"),void 0),"./TitleWidget.vue":()=>nt(()=>tt.import("./TitleWidget-8IcwweFE-1799fc0aaa9c6275b2f0.js"),void 0),"./ValueWidget.vue":()=>nt(()=>tt.import("./ValueWidget-BvT1ASar-49fc1dceecd7340294d9.js"),void 0),"./ValuelimitsbarWidget.vue":()=>nt(()=>tt.import("./ValuelimitsbarWidget-C5lBnUmB-fb438e345923524a0ab4.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>nt(()=>tt.import("./ValuelimitscolumnWidget-DHYI0WBL-48b303b9678a7a1602f6.js"),void 0),"./ValuerangebarWidget.vue":()=>nt(()=>tt.import("./ValuerangebarWidget-BSszZhlE-010b800a154df935a5a2.js"),void 0),"./VerticalWidget.vue":()=>nt(()=>tt.import("./VerticalWidget-1GhgYrC3-1db88bc681d02b219042.js"),void 0),"./VerticalboxWidget.vue":()=>nt(()=>tt.import("./VerticalboxWidget-DYHJqEzd-6c29930e2d3eede3cd28.js"),void 0)}),xA=Object.entries(bA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=sA(wA(t.replace(/\.\w+$/,"")));return{...n,[r]:sp(e)}},{}),fN=In("j",{components:xA});function vv(){return Object.assign({},Ws())}function CA(n,t,e){const r=dn(n,void 0);return r.setTime(r.getTime()+t*vl),r}function kA(n,t){const e=()=>Bn(void 0,NaN),r=$A(n);let m;if(r.date){const h=MA(r.date,2);m=TA(h.restDateString,h.year)}if(!m||isNaN(+m))return e();const g=+m;let y=0,x;if(r.time&&(y=IA(r.time),isNaN(y)))return e();if(r.timezone){if(x=EA(r.timezone),isNaN(x))return e()}else{const h=new Date(g+y),p=dn(0,void 0);return p.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),p.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),p}return dn(g+y+x,void 0)}const Jl={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},SA=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,AA=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_A=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $A(n){const t={},e=n.split(Jl.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],Jl.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Jl.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const m=Jl.timezone.exec(r);m?(t.time=r.replace(m[1],""),t.timezone=m[1]):t.time=r}return t}function MA(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const m=r[1]?parseInt(r[1]):null,g=r[2]?parseInt(r[2]):null;return{year:g===null?m:g*100,restDateString:n.slice((r[1]||r[2]).length)}}function TA(n,t){if(t===null)return new Date(NaN);const e=n.match(SA);if(!e)return new Date(NaN);const r=!!e[4],m=za(e[1]),g=za(e[2])-1,y=za(e[3]),x=za(e[4]),h=za(e[5])-1;if(r)return DA(t,x,h)?LA(t,x,h):new Date(NaN);{const p=new Date(0);return!OA(t,g,y)||!NA(t,m)?new Date(NaN):(p.setUTCFullYear(t,g,Math.max(m,y)),p)}}function za(n){return n?parseInt(n):1}function IA(n){const t=n.match(AA);if(!t)return NaN;const e=Wh(t[1]),r=Wh(t[2]),m=Wh(t[3]);return FA(e,r,m)?e*nu+r*vl+m*1e3:NaN}function Wh(n){return n&&parseFloat(n.replace(",","."))||0}function EA(n){if(n==="Z")return 0;const t=n.match(_A);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),m=t[3]&&parseInt(t[3])||0;return PA(r,m)?e*(r*nu+m*vl):NaN}function LA(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const m=r.getUTCDay()||7,g=(t-1)*7+e+1-m;return r.setUTCDate(r.getUTCDate()+g),r}const RA=[31,null,31,30,31,30,31,31,30,31,30,31];function yv(n){return n%400===0||n%4===0&&n%100!==0}function OA(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(RA[t]||(yv(n)?29:28))}function NA(n,t){return t>=1&&t<=(yv(n)?366:365)}function DA(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function FA(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function PA(n,t){return t>=0&&t<=59}function WA(n,t,e){return CA(n,-t)}function wv(n,t,e){const r=vv(),m=jA(n,e.timeZone,e.locale??r.locale);return"formatToParts"in m?BA(m,t):zA(m,t)}function BA(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function zA(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function jA(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function HA(n,t){const e=GA(t);return"formatToParts"in e?VA(e,n):KA(e,n)}const UA={year:0,month:1,day:2,hour:3,minute:4,second:5};function VA(n,t){try{const e=n.formatToParts(t),r=[];for(let m=0;m<e.length;m++){const g=UA[e[m].type];g!==void 0&&(r[g]=parseInt(e[m].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function KA(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Bh={},bv=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")),qA=bv==="06/25/2014, 00:00:00"||bv==="06/25/2014 00:00:00";function GA(n){return Bh[n]||(Bh[n]=qA?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Bh[n]}function xv(n,t,e,r,m,g,y){const x=new Date(0);return x.setUTCFullYear(n,t,e),x.setUTCHours(r,m,g,y),x}const Cv=36e5,YA=6e4,zh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function jh(n,t,e){if(!n)return 0;let r=zh.timezoneZ.exec(n);if(r)return 0;let m,g;if(r=zh.timezoneHH.exec(n),r)return m=parseInt(r[1],10),kv(m)?-(m*Cv):NaN;if(r=zh.timezoneHHMM.exec(n),r){m=parseInt(r[2],10);const y=parseInt(r[3],10);return kv(m,y)?(g=Math.abs(m)*Cv+y*YA,r[1]==="+"?-g:g):NaN}if(ZA(n)){t=new Date(t||Date.now());const y=e?t:XA(t),x=Hh(y,n);return-(e?x:QA(t,x,n))}return NaN}function XA(n){return xv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Hh(n,t){const e=HA(n,t),r=xv(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let m=n.getTime();const g=m%1e3;return m-=g>=0?g:1e3+g,r-m}function QA(n,t,e){let r=n.getTime()-t;const m=Hh(new Date(r),e);if(t===m)return t;r-=m-t;const g=Hh(new Date(r),e);return m===g?m:Math.max(m,g)}function kv(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Sv={};function ZA(n){if(Sv[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Sv[n]=!0,!0}catch{return!1}}const JA=60*1e3,e_={X:function(n,t,e){const r=Uh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Av(r);case"XXXX":case"XX":return ta(r);case"XXXXX":case"XXX":default:return ta(r,":")}},x:function(n,t,e){const r=Uh(e.timeZone,n);switch(t){case"x":return Av(r);case"xxxx":case"xx":return ta(r);case"xxxxx":case"xxx":default:return ta(r,":")}},O:function(n,t,e){const r=Uh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+t_(r,":");case"OOOO":default:return"GMT"+ta(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return wv("short",n,e);case"zzzz":default:return wv("long",n,e)}}};function Uh(n,t){const e=n?jh(n,t,!0)/JA:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ec(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ta(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=ec(Math.floor(r/60),2),g=ec(Math.floor(r%60),2);return e+m+t+g}function Av(n,t){return n%60===0?(n>0?"-":"+")+ec(Math.abs(n)/60,2):ta(n,t)}function t_(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Math.floor(r/60),g=r%60;return g===0?e+String(m):e+String(m)+t+ec(g,2)}function _v(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const n_=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Vh=36e5,$v=6e4,r_=2,$r={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:n_};function Mv(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?r_:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=i_(n),{year:m,restDateString:g}=o_(r.date,e),y=s_(g,m);if(y===null||isNaN(y.getTime()))return new Date(NaN);if(y){const x=y.getTime();let h=0,p;if(r.time&&(h=a_(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(p=jh(r.timeZone||t.timeZone,new Date(x+h)),isNaN(p))return new Date(NaN)}else p=_v(new Date(x+h)),p=_v(new Date(x+h+p));return new Date(x+h+p)}else return new Date(NaN)}function i_(n){const t={};let e=$r.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=$r.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const m=$r.timeZone.exec(r);m?(t.time=r.replace(m[1],""),t.timeZone=m[1].trim()):t.time=r}return t}function o_(n,t){if(n){const e=$r.YYY[t],r=$r.YYYYY[t];let m=$r.YYYY.exec(n)||r.exec(n);if(m){const g=m[1];return{year:parseInt(g,10),restDateString:n.slice(g.length)}}if(m=$r.YY.exec(n)||e.exec(n),m){const g=m[1];return{year:parseInt(g,10)*100,restDateString:n.slice(g.length)}}}return{year:null}}function s_(n,t){if(t===null)return null;let e,r,m;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let g=$r.MM.exec(n);if(g)return e=new Date(0),r=parseInt(g[1],10)-1,Ev(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(g=$r.DDD.exec(n),g){e=new Date(0);const y=parseInt(g[1],10);return u_(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(g=$r.MMDD.exec(n),g){e=new Date(0),r=parseInt(g[1],10)-1;const y=parseInt(g[2],10);return Ev(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(g=$r.Www.exec(n),g)return m=parseInt(g[1],10)-1,Lv(m)?Tv(t,m):new Date(NaN);if(g=$r.WwwD.exec(n),g){m=parseInt(g[1],10)-1;const y=parseInt(g[2],10)-1;return Lv(m,y)?Tv(t,m,y):new Date(NaN)}return null}function a_(n){let t,e,r=$r.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Kh(t)?t%24*Vh:NaN;if(r=$r.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Kh(t,e)?t%24*Vh+e*$v:NaN;if(r=$r.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return Kh(t,e,m)?t%24*Vh+e*$v+m*1e3:NaN}return null}function Tv(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const m=r.getUTCDay()||7,g=t*7+e+1-m;return r.setUTCDate(r.getUTCDate()+g),r}const l_=[31,28,31,30,31,30,31,31,30,31,30,31],c_=[31,29,31,30,31,30,31,31,30,31,30,31];function Iv(n){return n%400===0||n%4===0&&n%100!==0}function Ev(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=Iv(n);if(r&&e>c_[t]||!r&&e>l_[t])return!1}return!0}function u_(n,t){if(t<1)return!1;const e=Iv(n);return!(e&&t>366||!e&&t>365)}function Lv(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Kh(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const h_=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function d_(n,t,e={}){t=String(t);const r=t.match(h_);if(r){const m=Mv(e.originalDate||n,e);t=r.reduce(function(g,y){if(y[0]==="'")return g;const x=g.indexOf(y),h=g[x-1]==="'",p=g.replace(y,"'"+e_[y[0]](m,y,e)+"'");return h?p.substring(0,x-1)+p.substring(x+1):p},t)}return rs(n,t,e)}function p_(n,t,e){n=Mv(n,e);const r=jh(t,n,!0),m=new Date(n.getTime()-r),g=new Date(0);return g.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),g.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),g}function tc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},d_(p_(n,t,{timeZone:r.timeZone}),e,r)}const nc="yyyy-MM-dd",Rv="HH:mm:ss.SSS",Ov="HH:mm:ss",rc=`${nc} ${Rv}`,Nv=`${nc} ${Ov}`,mN=In("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return rs(!t||t==="local"?WA(n,n.getTimezoneOffset()):n,rc)},formatDateTime(n,t){return!t||t==="local"?rs(n,rc):tc(n,t,rc)},formatDateTimeHMS(n,t){return!t||t==="local"?rs(n,Nv):tc(n,t,Nv)},formatDate:function(n,t){return!t||t==="local"?rs(n,nc):tc(n,this.timeZone,nc)},formatTime:function(n,t,e=Rv){return!t||t==="local"?rs(n,e):tc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,Ov)},formatTimestamp(n,t){return this.formatDateTime(kA(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}});var g_=Object.defineProperty,f_=(n,t,e)=>t in n?g_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Xe=(n,t,e)=>f_(n,typeof t!="symbol"?t+"":t,e);function qh(n,t,e){const r=dn(n,e==null?void 0:e.in);return isNaN(t)?Bn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function m_(n,t){const e=dn(n,void 0).getDay();return e===0?7:e}function v_(n,t){const e=y_(t)?new t(0):Bn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function y_(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const w_=10;let Dv=class{constructor(){Xe(this,"subPriority",0)}validate(t,e){return!0}},b_=class extends Dv{constructor(t,e,r,m,g){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=m,g&&(this.subPriority=g)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}},x_=class extends Dv{constructor(t,e){super(),Xe(this,"priority",w_),Xe(this,"subPriority",-1),this.context=t||(r=>Bn(e,r))}set(t,e){return e.timestampIsSet?t:Bn(t,v_(t,this.context))}};class Ut{run(t,e,r,m){const g=this.parse(t,e,r,m);return g?{setter:new b_(g.value,this.validate,this.set,this.priority,this.subPriority),rest:g.rest}:null}validate(t,e,r){return!0}}let C_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",140),Xe(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}};const Ln={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},qi={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Rn(n,t){return n&&{value:t(n.value),rest:n.rest}}function vn(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Gi(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,m=e[2]?parseInt(e[2],10):0,g=e[3]?parseInt(e[3],10):0,y=e[5]?parseInt(e[5],10):0;return{value:r*(m*nu+g*vl+y*jb),rest:t.slice(e[0].length)}}function Fv(n){return vn(Ln.anyDigitsSigned,n)}function kn(n,t){switch(n){case 1:return vn(Ln.singleDigit,t);case 2:return vn(Ln.twoDigits,t);case 3:return vn(Ln.threeDigits,t);case 4:return vn(Ln.fourDigits,t);default:return vn(new RegExp("^\\d{1,"+n+"}"),t)}}function Pv(n,t){switch(n){case 1:return vn(Ln.singleDigitSigned,t);case 2:return vn(Ln.twoDigitsSigned,t);case 3:return vn(Ln.threeDigitsSigned,t);case 4:return vn(Ln.fourDigitsSigned,t);default:return vn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Gh(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Wv(n,t){const e=t>0,r=e?t:1-t;let m;if(r<=50)m=n||100;else{const g=r+50,y=Math.trunc(g/100)*100,x=n>=g%100;m=n+y-(x?100:0)}return e?m:1-m}function Bv(n){return n%400===0||n%4===0&&n%100!==0}let k_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const m=g=>({year:g,isTwoDigitYear:e==="yy"});switch(e){case"y":return Rn(kn(4,t),m);case"yo":return Rn(r.ordinalNumber(t,{unit:"year"}),m);default:return Rn(kn(e.length,t),m)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const m=t.getFullYear();if(r.isTwoDigitYear){const y=Wv(r.year,m);return t.setFullYear(y,0,1),t.setHours(0,0,0,0),t}const g=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(g,0,1),t.setHours(0,0,0,0),t}},S_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const m=g=>({year:g,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Rn(kn(4,t),m);case"Yo":return Rn(r.ordinalNumber(t,{unit:"year"}),m);default:return Rn(kn(e.length,t),m)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,m){const g=iu(t,m);if(r.isTwoDigitYear){const x=Wv(r.year,g);return t.setFullYear(x,0,m.firstWeekContainsDate),t.setHours(0,0,0,0),Eo(t,m)}const y=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(y,0,m.firstWeekContainsDate),t.setHours(0,0,0,0),Eo(t,m)}},A_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Pv(e==="R"?4:e.length,t)}set(t,e,r){const m=Bn(t,0);return m.setFullYear(r,0,4),m.setHours(0,0,0,0),Bs(m)}};class __ extends Ut{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Pv(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}let $_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",120),Xe(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return kn(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}},M_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",120),Xe(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return kn(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}},T_=class extends Ut{constructor(){super(...arguments),Xe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Xe(this,"priority",110)}parse(t,e,r){const m=g=>g-1;switch(e){case"M":return Rn(vn(Ln.month,t),m);case"MM":return Rn(kn(2,t),m);case"Mo":return Rn(r.ordinalNumber(t,{unit:"month"}),m);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}},I_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",110),Xe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const m=g=>g-1;switch(e){case"L":return Rn(vn(Ln.month,t),m);case"LL":return Rn(kn(2,t),m);case"Lo":return Rn(r.ordinalNumber(t,{unit:"month"}),m);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}};function E_(n,t,e){const r=dn(n,e==null?void 0:e.in),m=Ip(r,e)-t;return r.setDate(r.getDate()-m*7),dn(r,e==null?void 0:e.in)}let L_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",100),Xe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return vn(Ln.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,m){return Eo(E_(t,r,m),m)}};function R_(n,t,e){const r=dn(n,void 0),m=Tp(r)-t;return r.setDate(r.getDate()-m*7),r}let O_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",100),Xe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return vn(Ln.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Bs(R_(t,r))}};const N_=[31,28,31,30,31,30,31,31,30,31,30,31],D_=[31,29,31,30,31,30,31,31,30,31,30,31];let F_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"subPriority",1),Xe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return vn(Ln.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return kn(e.length,t)}}validate(t,e){const r=t.getFullYear(),m=Bv(r),g=t.getMonth();return m?e>=1&&e<=D_[g]:e>=1&&e<=N_[g]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}},P_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"subpriority",1),Xe(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return vn(Ln.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return kn(e.length,t)}}validate(t,e){const r=t.getFullYear();return Bv(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}};function Yh(n,t,e){var r,m,g,y;const x=Ws(),h=(e==null?void 0:e.weekStartsOn)??((m=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:m.weekStartsOn)??x.weekStartsOn??((y=(g=x.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,p=dn(n,e==null?void 0:e.in),s=p.getDay(),a=(t%7+7)%7,u=7-h,c=t<0||t>6?t-(s+u)%7:(a+u)%7-(s+u)%7;return qh(p,c,e)}let W_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,m){return t=Yh(t,r,m),t.setHours(0,0,0,0),t}},B_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,m){const g=y=>{const x=Math.floor((y-1)/7)*7;return(y+m.weekStartsOn+6)%7+x};switch(e){case"e":case"ee":return Rn(kn(e.length,t),g);case"eo":return Rn(r.ordinalNumber(t,{unit:"day"}),g);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,m){return t=Yh(t,r,m),t.setHours(0,0,0,0),t}},z_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,m){const g=y=>{const x=Math.floor((y-1)/7)*7;return(y+m.weekStartsOn+6)%7+x};switch(e){case"c":case"cc":return Rn(kn(e.length,t),g);case"co":return Rn(r.ordinalNumber(t,{unit:"day"}),g);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,m){return t=Yh(t,r,m),t.setHours(0,0,0,0),t}};function j_(n,t,e){const r=dn(n,void 0),m=m_(r),g=t-m;return qh(r,g,e)}let H_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const m=g=>g===0?7:g;switch(e){case"i":case"ii":return kn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Rn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),m);case"iiiii":return Rn(r.day(t,{width:"narrow",context:"formatting"}),m);case"iiiiii":return Rn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),m);case"iiii":default:return Rn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),m)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=j_(t,r),t.setHours(0,0,0,0),t}},U_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",80),Xe(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Gh(r),0,0,0),t}},V_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",80),Xe(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Gh(r),0,0,0),t}},K_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",80),Xe(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Gh(r),0,0,0),t}},q_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return vn(Ln.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const m=t.getHours()>=12;return m&&r<12?t.setHours(r+12,0,0,0):!m&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}};class G_ extends Ut{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return vn(Ln.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}let Y_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return vn(Ln.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}},X_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return vn(Ln.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const m=r<=24?r%24:r;return t.setHours(m,0,0,0),t}},Q_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",60),Xe(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return vn(Ln.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}},Z_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",50),Xe(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return vn(Ln.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}},J_=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",30),Xe(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=m=>Math.trunc(m*Math.pow(10,-e.length+3));return Rn(kn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}},e$=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",10),Xe(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Gi(qi.basicOptionalMinutes,t);case"XX":return Gi(qi.basic,t);case"XXXX":return Gi(qi.basicOptionalSeconds,t);case"XXXXX":return Gi(qi.extendedOptionalSeconds,t);case"XXX":default:return Gi(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Bn(t,t.getTime()-yl(t)-r)}},t$=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",10),Xe(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Gi(qi.basicOptionalMinutes,t);case"xx":return Gi(qi.basic,t);case"xxxx":return Gi(qi.basicOptionalSeconds,t);case"xxxxx":return Gi(qi.extendedOptionalSeconds,t);case"xxx":default:return Gi(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Bn(t,t.getTime()-yl(t)-r)}},n$=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",40),Xe(this,"incompatibleTokens","*")}parse(t){return Fv(t)}set(t,e,r){return[Bn(t,r*1e3),{timestampIsSet:!0}]}},r$=class extends Ut{constructor(){super(...arguments),Xe(this,"priority",20),Xe(this,"incompatibleTokens","*")}parse(t){return Fv(t)}set(t,e,r){return[Bn(t,r),{timestampIsSet:!0}]}};const i$={G:new C_,y:new k_,Y:new S_,R:new A_,u:new __,Q:new $_,q:new M_,M:new T_,L:new I_,w:new L_,I:new O_,d:new F_,D:new P_,E:new W_,e:new B_,c:new z_,i:new H_,a:new U_,b:new V_,B:new K_,h:new q_,H:new G_,K:new Y_,k:new X_,m:new Q_,s:new Z_,S:new J_,X:new e$,x:new t$,t:new n$,T:new r$},o$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,a$=/^'([^]*?)'?$/,l$=/''/g,c$=/\S/,u$=/[a-zA-Z]/;function h$(n,t,e,r){var m,g,y,x;const h=()=>Bn(e,NaN),p=vv(),s=p.locale??Mp,a=p.firstWeekContainsDate??((g=(m=p.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,u=p.weekStartsOn??((x=(y=p.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return n?h():dn(e,void 0);const c={firstWeekContainsDate:a,weekStartsOn:u,locale:s},o=[new x_(void 0,e)],l=t.match(s$).map(M=>{const k=M[0];if(k in ou){const C=ou[k];return C(M,s.formatLong)}return M}).join("").match(o$),d=[];for(let M of l){Fp(M)&&su(M,t,n),Dp(M)&&su(M,t,n);const k=M[0],C=i$[k];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const L=d.find(I=>R.includes(I.token)||I.token===k);if(L)throw new RangeError(`The format string mustn't contain \`${L.fullToken}\` and \`${M}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);d.push({token:k,fullToken:M});const O=C.run(n,M,s.match,c);if(!O)return h();o.push(O.setter),n=O.rest}else{if(k.match(u$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(M==="''"?M="'":k==="'"&&(M=d$(M)),n.indexOf(M)===0)n=n.slice(M.length);else return h()}}if(n.length>0&&c$.test(n))return h();const w=o.map(M=>M.priority).sort((M,k)=>k-M).filter((M,k,C)=>C.indexOf(M)===k).map(M=>o.filter(k=>k.priority===M).sort((k,C)=>C.subPriority-k.subPriority)).map(M=>M[0]);let b=dn(e,void 0);if(isNaN(+b))return h();const E={};for(const M of w){if(!M.validate(b,c))return h();const k=M.set(b,E,c);Array.isArray(k)?(b=k[0],Object.assign(E,k[1])):b=k}return b}function d$(n){return n.match(a$)[1].replace(l$,"'")}function zv(n,t){return function(){return n.apply(t,arguments)}}const{toString:p$}=Object.prototype,{getPrototypeOf:Xh}=Object,{iterator:ic,toStringTag:jv}=Symbol,oc=(n=>t=>{const e=p$.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ii=n=>(n=n.toLowerCase(),t=>oc(t)===n),sc=n=>t=>typeof t===n,{isArray:na}=Array,ja=sc("undefined");function Ha(n){return n!==null&&!ja(n)&&n.constructor!==null&&!ja(n.constructor)&&Br(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Hv=Ii("ArrayBuffer");function g$(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Hv(n.buffer),t}const f$=sc("string"),Br=sc("function"),Uv=sc("number"),Ua=n=>n!==null&&typeof n=="object",m$=n=>n===!0||n===!1,ac=n=>{if(oc(n)!=="object")return!1;const t=Xh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(jv in n)&&!(ic in n)},v$=n=>{if(!Ua(n)||Ha(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},y$=Ii("Date"),w$=Ii("File"),b$=Ii("Blob"),x$=Ii("FileList"),C$=n=>Ua(n)&&Br(n.pipe),k$=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Br(n.append)&&((t=oc(n))==="formdata"||t==="object"&&Br(n.toString)&&n.toString()==="[object FormData]"))},S$=Ii("URLSearchParams"),[A$,_$,$$,M$]=["ReadableStream","Request","Response","Headers"].map(Ii),T$=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Va(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,m;if(typeof n!="object"&&(n=[n]),na(n))for(r=0,m=n.length;r<m;r++)t.call(null,n[r],r,n);else{if(Ha(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),y=g.length;let x;for(r=0;r<y;r++)x=g[r],t.call(null,n[x],x,n)}}function Vv(n,t){if(Ha(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,m;for(;r-- >0;)if(m=e[r],t===m.toLowerCase())return m;return null}const ms=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kv=n=>!ja(n)&&n!==ms;function Qh(){const{caseless:n}=Kv(this)&&this||{},t={},e=(r,m)=>{const g=n&&Vv(t,m)||m;ac(t[g])&&ac(r)?t[g]=Qh(t[g],r):ac(r)?t[g]=Qh({},r):na(r)?t[g]=r.slice():t[g]=r};for(let r=0,m=arguments.length;r<m;r++)arguments[r]&&Va(arguments[r],e);return t}const I$=(n,t,e,{allOwnKeys:r}={})=>(Va(t,(m,g)=>{e&&Br(m)?n[g]=zv(m,e):n[g]=m},{allOwnKeys:r}),n),E$=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),L$=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},R$=(n,t,e,r)=>{let m,g,y;const x={};if(t=t||{},n==null)return t;do{for(m=Object.getOwnPropertyNames(n),g=m.length;g-- >0;)y=m[g],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Xh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},O$=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},N$=n=>{if(!n)return null;if(na(n))return n;let t=n.length;if(!Uv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},D$=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Xh(Uint8Array)),F$=(n,t)=>{const e=(n&&n[ic]).call(n);let r;for(;(r=e.next())&&!r.done;){const m=r.value;t.call(n,m[0],m[1])}},P$=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},W$=Ii("HTMLFormElement"),B$=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),qv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),z$=Ii("RegExp"),Gv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Va(e,(m,g)=>{let y;(y=t(m,g,n))!==!1&&(r[g]=y||m)}),Object.defineProperties(n,r)},j$=n=>{Gv(n,(t,e)=>{if(Br(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Br(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},H$=(n,t)=>{const e={},r=m=>{m.forEach(g=>{e[g]=!0})};return na(n)?r(n):r(String(n).split(t)),e},U$=()=>{},V$=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function K$(n){return!!(n&&Br(n.append)&&n[jv]==="FormData"&&n[ic])}const q$=n=>{const t=new Array(10),e=(r,m)=>{if(Ua(r)){if(t.indexOf(r)>=0)return;if(Ha(r))return r;if(!("toJSON"in r)){t[m]=r;const g=na(r)?[]:{};return Va(r,(y,x)=>{const h=e(y,m+1);!ja(h)&&(g[x]=h)}),t[m]=void 0,g}}return r};return e(n,0)},G$=Ii("AsyncFunction"),Y$=n=>n&&(Ua(n)||Br(n))&&Br(n.then)&&Br(n.catch),Yv=((n,t)=>n?setImmediate:t?((e,r)=>(ms.addEventListener("message",({source:m,data:g})=>{m===ms&&g===e&&r.length&&r.shift()()},!1),m=>{r.push(m),ms.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Br(ms.postMessage)),X$=typeof queueMicrotask<"u"?queueMicrotask.bind(ms):typeof process<"u"&&process.nextTick||Yv,Q$=n=>n!=null&&Br(n[ic]),Se={isArray:na,isArrayBuffer:Hv,isBuffer:Ha,isFormData:k$,isArrayBufferView:g$,isString:f$,isNumber:Uv,isBoolean:m$,isObject:Ua,isPlainObject:ac,isEmptyObject:v$,isReadableStream:A$,isRequest:_$,isResponse:$$,isHeaders:M$,isUndefined:ja,isDate:y$,isFile:w$,isBlob:b$,isRegExp:z$,isFunction:Br,isStream:C$,isURLSearchParams:S$,isTypedArray:D$,isFileList:x$,forEach:Va,merge:Qh,extend:I$,trim:T$,stripBOM:E$,inherits:L$,toFlatObject:R$,kindOf:oc,kindOfTest:Ii,endsWith:O$,toArray:N$,forEachEntry:F$,matchAll:P$,isHTMLForm:W$,hasOwnProperty:qv,hasOwnProp:qv,reduceDescriptors:Gv,freezeMethods:j$,toObjectSet:H$,toCamelCase:B$,noop:U$,toFiniteNumber:V$,findKey:Vv,global:ms,isContextDefined:Kv,isSpecCompliantForm:K$,toJSONObject:q$,isAsyncFn:G$,isThenable:Y$,setImmediate:Yv,asap:X$,isIterable:Q$};function xt(n,t,e,r,m){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),m&&(this.response=m,this.status=m.status?m.status:null)}Se.inherits(xt,Error,{toJSON:function(){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:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const Xv=xt.prototype,Qv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Qv[n]={value:n}}),Object.defineProperties(xt,Qv),Object.defineProperty(Xv,"isAxiosError",{value:!0}),xt.from=(n,t,e,r,m,g)=>{const y=Object.create(Xv);return Se.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),xt.call(y,n.message,t,e,r,m),y.cause=n,y.name=n.name,g&&Object.assign(y,g),y};const Z$=null;function Zh(n){return Se.isPlainObject(n)||Se.isArray(n)}function Zv(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Jv(n,t,e){return n?n.concat(t).map(function(r,m){return r=Zv(r),!e&&m?"["+r+"]":r}).join(e?".":""):t}function J$(n){return Se.isArray(n)&&!n.some(Zh)}const eM=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function lc(n,t,e){if(!Se.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Se.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!Se.isUndefined(o[c])});const r=e.metaTokens,m=e.visitor||p,g=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(m))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(Se.isDate(c))return c.toISOString();if(Se.isBoolean(c))return c.toString();if(!x&&Se.isBlob(c))throw new xt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(c)||Se.isTypedArray(c)?x&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function p(c,o,l){let d=c;if(c&&!l&&typeof c=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(Se.isArray(c)&&J$(c)||(Se.isFileList(c)||Se.endsWith(o,"[]"))&&(d=Se.toArray(c)))return o=Zv(o),d.forEach(function(w,b){!(Se.isUndefined(w)||w===null)&&t.append(y===!0?Jv([o],b,g):y===null?o:o+"[]",h(w))}),!1}return Zh(c)?!0:(t.append(Jv(l,o,g),h(c)),!1)}const s=[],a=Object.assign(eM,{defaultVisitor:p,convertValue:h,isVisitable:Zh});function u(c,o){if(!Se.isUndefined(c)){if(s.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(c),Se.forEach(c,function(l,d){(!(Se.isUndefined(l)||l===null)&&m.call(t,l,Se.isString(d)?d.trim():d,o,a))===!0&&u(l,o?o.concat(d):[d])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return u(n),t}function ey(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Jh(n,t){this._pairs=[],n&&lc(n,this,t)}const ty=Jh.prototype;ty.append=function(n,t){this._pairs.push([n,t])},ty.toString=function(n){const t=n?function(e){return n.call(this,e,ey)}:ey;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function tM(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ny(n,t,e){if(!t)return n;const r=e&&e.encode||tM;Se.isFunction(e)&&(e={serialize:e});const m=e&&e.serialize;let g;if(m?g=m(t,e):g=Se.isURLSearchParams(t)?t.toString():new Jh(t,e).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class ry{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Se.forEach(this.handlers,function(e){e!==null&&t(e)})}}const iy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nM=typeof URLSearchParams<"u"?URLSearchParams:Jh,rM=typeof FormData<"u"?FormData:null,iM=typeof Blob<"u"?Blob:null,oM={isBrowser:!0,classes:{URLSearchParams:nM,FormData:rM,Blob:iM},protocols:["http","https","file","blob","url","data"]},ed=typeof window<"u"&&typeof document<"u",td=typeof navigator=="object"&&navigator||void 0,sM=ed&&(!td||["ReactNative","NativeScript","NS"].indexOf(td.product)<0),aM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lM=ed&&window.location.href||"http://localhost",cM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ed,hasStandardBrowserEnv:sM,hasStandardBrowserWebWorkerEnv:aM,navigator:td,origin:lM},Symbol.toStringTag,{value:"Module"})),vr={...cM,...oM};function uM(n,t){return lc(n,new vr.classes.URLSearchParams,{visitor:function(e,r,m,g){return vr.isNode&&Se.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function hM(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dM(n){const t={},e=Object.keys(n);let r;const m=e.length;let g;for(r=0;r<m;r++)g=e[r],t[g]=n[g];return t}function oy(n){function t(e,r,m,g){let y=e[g++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=g>=e.length;return y=!y&&Se.isArray(m)?m.length:y,h?(Se.hasOwnProp(m,y)?m[y]=[m[y],r]:m[y]=r,!x):((!m[y]||!Se.isObject(m[y]))&&(m[y]=[]),t(e,r,m[y],g)&&Se.isArray(m[y])&&(m[y]=dM(m[y])),!x)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const e={};return Se.forEachEntry(n,(r,m)=>{t(hM(r),m,e,0)}),e}return null}function pM(n,t,e){if(Se.isString(n))try{return(t||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Ka={transitional:iy,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,m=Se.isObject(n);if(m&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(oy(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(m){if(e.indexOf("application/x-www-form-urlencoded")>-1)return uM(n,this.formSerializer).toString();if((g=Se.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return lc(g?{"files[]":n}:n,y&&new y,this.formSerializer)}}return m||r?(t.setContentType("application/json",!1),pM(n)):n}],transformResponse:[function(n){const t=this.transitional||Ka.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(e&&!this.responseType||r)){const m=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(g){if(m)throw g.name==="SyntaxError"?xt.from(g,xt.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vr.classes.FormData,Blob:vr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Ka.headers[n]={}});const gM=Se.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"]),fM=n=>{const t={};let e,r,m;return n&&n.split(`
|
1493
|
+
`).forEach(function(g){m=g.indexOf(":"),e=g.substring(0,m).trim().toLowerCase(),r=g.substring(m+1).trim(),!(!e||t[e]&&gM[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},sy=Symbol("internals");function qa(n){return n&&String(n).trim().toLowerCase()}function cc(n){return n===!1||n==null?n:Se.isArray(n)?n.map(cc):String(n)}function mM(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const vM=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function nd(n,t,e,r,m){if(Se.isFunction(r))return r.call(this,t,e);if(m&&(t=e),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function yM(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function wM(n,t){const e=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(m,g,y){return this[r].call(this,t,m,g,y)},configurable:!0})})}let zr=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function m(y,x,h){const p=qa(x);if(!p)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,p);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=cc(y))}const g=(y,x)=>Se.forEach(y,(h,p)=>m(h,p,x));if(Se.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(Se.isString(n)&&(n=n.trim())&&!vM(n))g(fM(n),t);else if(Se.isObject(n)&&Se.isIterable(n)){let y={},x,h;for(const p of n){if(!Se.isArray(p))throw TypeError("Object iterator must return a key-value pair");y[h=p[0]]=(x=y[h])?Se.isArray(x)?[...x,p[1]]:[x,p[1]]:p[1]}g(y,t)}else n!=null&&m(t,n,e);return this}get(n,t){if(n=qa(n),n){const e=Se.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return mM(r);if(Se.isFunction(t))return t.call(this,r,e);if(Se.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=qa(n),n){const e=Se.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||nd(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function m(g){if(g=qa(g),g){const y=Se.findKey(e,g);y&&(!t||nd(e,e[y],y,t))&&(delete e[y],r=!0)}}return Se.isArray(n)?n.forEach(m):m(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const m=t[e];(!n||nd(this,this[m],m,n,!0))&&(delete this[m],r=!0)}return r}normalize(n){const t=this,e={};return Se.forEach(this,(r,m)=>{const g=Se.findKey(e,m);if(g){t[g]=cc(r),delete t[m];return}const y=n?yM(m):String(m).trim();y!==m&&delete t[m],t[y]=cc(r),e[y]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Se.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&Se.isArray(e)?e.join(", "):e)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
|
1494
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[sy]=this[sy]={accessors:{}}).accessors,e=this.prototype;function r(m){const g=qa(m);t[g]||(wM(e,m),t[g]=!0)}return Se.isArray(n)?n.forEach(r):r(n),this}};zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(zr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Se.freezeMethods(zr);function rd(n,t){const e=this||Ka,r=t||e,m=zr.from(r.headers);let g=r.data;return Se.forEach(n,function(y){g=y.call(e,g,m.normalize(),t?t.status:void 0)}),m.normalize(),g}function ay(n){return!!(n&&n.__CANCEL__)}function ra(n,t,e){xt.call(this,n??"canceled",xt.ERR_CANCELED,t,e),this.name="CanceledError"}Se.inherits(ra,xt,{__CANCEL__:!0});function ly(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new xt("Request failed with status code "+e.status,[xt.ERR_BAD_REQUEST,xt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function bM(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function xM(n,t){n=n||10;const e=new Array(n),r=new Array(n);let m=0,g=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),p=r[g];y||(y=h),e[m]=x,r[m]=h;let s=g,a=0;for(;s!==m;)a+=e[s++],s=s%n;if(m=(m+1)%n,m===g&&(g=(g+1)%n),h-y<t)return;const u=p&&h-p;return u?Math.round(a*1e3/u):void 0}}function CM(n,t){let e=0,r=1e3/t,m,g;const y=(x,h=Date.now())=>{e=h,m=null,g&&(clearTimeout(g),g=null),n(...x)};return[(...x)=>{const h=Date.now(),p=h-e;p>=r?y(x,h):(m=x,g||(g=setTimeout(()=>{g=null,y(m)},r-p)))},()=>m&&y(m)]}const uc=(n,t,e=3)=>{let r=0;const m=xM(50,250);return CM(g=>{const y=g.loaded,x=g.lengthComputable?g.total:void 0,h=y-r,p=m(h),s=y<=x;r=y;const a={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:p||void 0,estimated:p&&x&&s?(x-y)/p:void 0,event:g,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(a)},e)},cy=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},uy=n=>(...t)=>Se.asap(()=>n(...t)),kM=vr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,vr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(vr.origin),vr.navigator&&/(msie|trident)/i.test(vr.navigator.userAgent)):()=>!0,SM=vr.hasStandardBrowserEnv?{write(n,t,e,r,m,g){const y=[n+"="+encodeURIComponent(t)];Se.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Se.isString(r)&&y.push("path="+r),Se.isString(m)&&y.push("domain="+m),g===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function AM(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function _M(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function hy(n,t,e){let r=!AM(t);return n&&(r||e==!1)?_M(n,t):t}const dy=n=>n instanceof zr?{...n}:n;function vs(n,t){t=t||{};const e={};function r(p,s,a,u){return Se.isPlainObject(p)&&Se.isPlainObject(s)?Se.merge.call({caseless:u},p,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function m(p,s,a,u){if(Se.isUndefined(s)){if(!Se.isUndefined(p))return r(void 0,p,a,u)}else return r(p,s,a,u)}function g(p,s){if(!Se.isUndefined(s))return r(void 0,s)}function y(p,s){if(Se.isUndefined(s)){if(!Se.isUndefined(p))return r(void 0,p)}else return r(void 0,s)}function x(p,s,a){if(a in t)return r(p,s);if(a in n)return r(void 0,p)}const h={url:g,method:g,data:g,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(p,s,a)=>m(dy(p),dy(s),a,!0)};return Se.forEach(Object.keys({...n,...t}),function(p){const s=h[p]||m,a=s(n[p],t[p],p);Se.isUndefined(a)&&s!==x||(e[p]=a)}),e}const py=n=>{const t=vs({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:m,xsrfCookieName:g,headers:y,auth:x}=t;t.headers=y=zr.from(y),t.url=ny(hy(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(Se.isFormData(e)){if(vr.hasStandardBrowserEnv||vr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[p,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];y.setContentType([p||"multipart/form-data",...s].join("; "))}}if(vr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||r!==!1&&kM(t.url))){const p=m&&g&&SM.read(g);p&&y.set(m,p)}return t},$M=typeof XMLHttpRequest<"u",MM=$M&&function(n){return new Promise(function(t,e){const r=py(n);let m=r.data;const g=zr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,p,s,a,u,c;function o(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function d(){if(!l)return;const b=zr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!y||y==="text"||y==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:b,config:n,request:l};ly(function(M){t(M),o()},function(M){e(M),o()},E),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(e(new xt("Request aborted",xt.ECONNABORTED,n,l)),l=null)},l.onerror=function(){e(new xt("Network Error",xt.ERR_NETWORK,n,l)),l=null},l.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||iy;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new xt(b,E.clarifyTimeoutError?xt.ETIMEDOUT:xt.ECONNABORTED,n,l)),l=null},m===void 0&&g.setContentType(null),"setRequestHeader"in l&&Se.forEach(g.toJSON(),function(b,E){l.setRequestHeader(E,b)}),Se.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),y&&y!=="json"&&(l.responseType=r.responseType),h&&([a,c]=uc(h,!0),l.addEventListener("progress",a)),x&&l.upload&&([s,u]=uc(x),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=b=>{l&&(e(!b||b.type?new ra(null,n,l):b),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=bM(r.url);if(w&&vr.protocols.indexOf(w)===-1){e(new xt("Unsupported protocol "+w+":",xt.ERR_BAD_REQUEST,n));return}l.send(m||null)})},TM=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,m;const g=function(p){if(!m){m=!0,x();const s=p instanceof Error?p:this.reason;r.abort(s instanceof xt?s:new ra(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,g(new xt(`timeout ${t} of ms exceeded`,xt.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(g):p.removeEventListener("abort",g)}),n=null)};n.forEach(p=>p.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(x),h}},IM=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,m;for(;r<e;)m=r+t,yield n.slice(r,m),r=m},EM=async function*(n,t){for await(const e of LM(n))yield*IM(e,t)},LM=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},gy=(n,t,e,r)=>{const m=EM(n,t);let g=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:p,value:s}=await m.next();if(p){x(),h.close();return}let a=s.byteLength;if(e){let u=g+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(p){throw x(p),p}},cancel(h){return x(h),m.return()}},{highWaterMark:2})},hc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",fy=hc&&typeof ReadableStream=="function",RM=hc&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),my=(n,...t)=>{try{return!!n(...t)}catch{return!1}},OM=fy&&my(()=>{let n=!1;const t=new Request(vr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),vy=64*1024,id=fy&&my(()=>Se.isReadableStream(new Response("").body)),dc={stream:id&&(n=>n.body)};hc&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!dc[t]&&(dc[t]=Se.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new xt(`Response type '${t}' is not supported`,xt.ERR_NOT_SUPPORT,r)})})})(new Response);const NM=async n=>{if(n==null)return 0;if(Se.isBlob(n))return n.size;if(Se.isSpecCompliantForm(n))return(await new Request(vr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(n)||Se.isArrayBuffer(n))return n.byteLength;if(Se.isURLSearchParams(n)&&(n=n+""),Se.isString(n))return(await RM(n)).byteLength},DM=async(n,t)=>Se.toFiniteNumber(n.getContentLength())??NM(t),FM=hc&&(async n=>{let{url:t,method:e,data:r,signal:m,cancelToken:g,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:p,headers:s,withCredentials:a="same-origin",fetchOptions:u}=py(n);p=p?(p+"").toLowerCase():"text";let c=TM([m,g&&g.toAbortSignal()],y),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let d;try{if(h&&OM&&e!=="get"&&e!=="head"&&(d=await DM(s,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[R,O]=cy(d,uc(uy(h)));r=gy(k.body,vy,R,O)}}Se.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:c,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o,u);const E=id&&(p==="stream"||p==="response");if(id&&(x||E&&l)){const k={};["status","statusText","headers"].forEach(L=>{k[L]=b[L]});const C=Se.toFiniteNumber(b.headers.get("content-length")),[R,O]=x&&cy(C,uc(uy(x),!0))||[];b=new Response(gy(b.body,vy,R,()=>{O&&O(),l&&l()}),k)}p=p||"text";let M=await dc[Se.findKey(dc,p)||"text"](b,n);return!E&&l&&l(),await new Promise((k,C)=>{ly(k,C,{data:M,headers:zr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new xt("Network Error",xt.ERR_NETWORK,n,o),{cause:w.cause||w}):xt.from(w,w&&w.code,n,o)}}),od={http:Z$,xhr:MM,fetch:FM};Se.forEach(od,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const yy=n=>`- ${n}`,PM=n=>Se.isFunction(n)||n===null||n===!1,wy={getAdapter:n=>{n=Se.isArray(n)?n:[n];const{length:t}=n;let e,r;const m={};for(let g=0;g<t;g++){e=n[g];let y;if(r=e,!PM(e)&&(r=od[(y=String(e)).toLowerCase()],r===void 0))throw new xt(`Unknown adapter '${y}'`);if(r)break;m[y||"#"+g]=r}if(!r){const g=Object.entries(m).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?g.length>1?`since :
|
1495
|
+
`+g.map(yy).join(`
|
1496
|
+
`):" "+yy(g[0]):"as no adapter specified";throw new xt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:od};function sd(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ra(null,n)}function by(n){return sd(n),n.headers=zr.from(n.headers),n.data=rd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),wy.getAdapter(n.adapter||Ka.adapter)(n).then(function(t){return sd(n),t.data=rd.call(n,n.transformResponse,t),t.headers=zr.from(t.headers),t},function(t){return ay(t)||(sd(n),t&&t.response&&(t.response.data=rd.call(n,n.transformResponse,t.response),t.response.headers=zr.from(t.response.headers))),Promise.reject(t)})}const xy="1.11.0",pc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{pc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Cy={};pc.transitional=function(n,t,e){function r(m,g){return"[Axios v"+xy+"] Transitional option '"+m+"'"+g+(e?". "+e:"")}return(m,g,y)=>{if(n===!1)throw new xt(r(g," has been removed"+(t?" in "+t:"")),xt.ERR_DEPRECATED);return t&&!Cy[g]&&(Cy[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(m,g,y):!0}},pc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function WM(n,t,e){if(typeof n!="object")throw new xt("options must be an object",xt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let m=r.length;for(;m-- >0;){const g=r[m],y=t[g];if(y){const x=n[g],h=x===void 0||y(x,g,n);if(h!==!0)throw new xt("option "+g+" must be "+h,xt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new xt("Unknown option "+g,xt.ERR_BAD_OPTION)}}const gc={assertOptions:WM,validators:pc},Yi=gc.validators;let ys=class{constructor(n){this.defaults=n||{},this.interceptors={request:new ry,response:new ry}}async request(n,t){try{return await this._request(n,t)}catch(e){if(e instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const m=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?m&&!String(e.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
1497
|
+
`+m):e.stack=m}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=vs(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:m}=t;e!==void 0&&gc.assertOptions(e,{silentJSONParsing:Yi.transitional(Yi.boolean),forcedJSONParsing:Yi.transitional(Yi.boolean),clarifyTimeoutError:Yi.transitional(Yi.boolean)},!1),r!=null&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:gc.assertOptions(r,{encode:Yi.function,serialize:Yi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),gc.assertOptions(t,{baseUrl:Yi.spelling("baseURL"),withXsrfToken:Yi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=m&&Se.merge(m.common,m[t.method]);m&&Se.forEach(["delete","get","head","post","put","patch","common"],c=>{delete m[c]}),t.headers=zr.concat(g,m);const y=[];let x=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(t)===!1||(x=x&&c.synchronous,y.unshift(c.fulfilled,c.rejected))});const h=[];this.interceptors.response.forEach(function(c){h.push(c.fulfilled,c.rejected)});let p,s=0,a;if(!x){const c=[by.bind(this),void 0];for(c.unshift(...y),c.push(...h),a=c.length,p=Promise.resolve(t);s<a;)p=p.then(c[s++],c[s++]);return p}a=y.length;let u=t;for(s=0;s<a;){const c=y[s++],o=y[s++];try{u=c(u)}catch(l){o.call(this,l);break}}try{p=by.call(this,u)}catch(c){return Promise.reject(c)}for(s=0,a=h.length;s<a;)p=p.then(h[s++],h[s++]);return p}getUri(n){n=vs(this.defaults,n);const t=hy(n.baseURL,n.url,n.allowAbsoluteUrls);return ny(t,n.params,n.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){ys.prototype[n]=function(t,e){return this.request(vs(e||{},{method:n,url:t,data:(e||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function t(e){return function(r,m,g){return this.request(vs(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}ys.prototype[n]=t(),ys.prototype[n+"Form"]=t(!0)});let BM=class Sb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let g=r._listeners.length;for(;g-- >0;)r._listeners[g](m);r._listeners=null}),this.promise.then=m=>{let g;const y=new Promise(x=>{r.subscribe(x),g=x}).then(m);return y.cancel=function(){r.unsubscribe(g)},y},t(function(m,g,y){r.reason||(r.reason=new ra(m,g,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Sb(function(e){t=e}),cancel:t}}};function zM(n){return function(t){return n.apply(null,t)}}function jM(n){return Se.isObject(n)&&n.isAxiosError===!0}const ad={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ad).forEach(([n,t])=>{ad[t]=n});function ky(n){const t=new ys(n),e=zv(ys.prototype.request,t);return Se.extend(e,ys.prototype,t,{allOwnKeys:!0}),Se.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return ky(vs(n,r))},e}const jn=In("E",ky(Ka));jn.Axios=ys,jn.CanceledError=ra,jn.CancelToken=BM,jn.isCancel=ay,jn.VERSION=xy,jn.toFormData=lc,jn.AxiosError=xt,jn.Cancel=jn.CanceledError,jn.all=function(n){return Promise.all(n)},jn.spread=zM,jn.isAxiosError=jM,jn.mergeConfig=vs,jn.AxiosHeaders=zr,jn.formToJSON=n=>oy(Se.isHTMLForm(n)?new FormData(n):n),jn.getAdapter=wy.getAdapter,jn.HttpStatusCode=ad,jn.default=jn;const{Axios:vN,AxiosError:yN,CanceledError:wN,isCancel:bN,CancelToken:xN,VERSION:CN,all:kN,Cancel:SN,isAxiosError:AN,spread:_N,toFormData:$N,AxiosHeaders:MN,HttpStatusCode:TN,formToJSON:IN,getAdapter:EN,mergeConfig:LN}=jn,HM="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=",UM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return HM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=QM.indexOf(Sy[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,m=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*m}px;`,`background-size: ${e}px ${r}px;`,`height: ${m}px;`,`width: ${m}px;`,`padding-top: ${n-1}px;`].join("")}}};function VM(n,t,e,r,m,g){return mn(),Dr("div",{style:ba(g.iconStyle)},null,4)}const KM=Io(UM,[["render",VM]]),qM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function GM(n,t,e,r,m,g){const y=yt("rux-icon");return mn(),Hi(y,{size:e.size,icon:e.icon,style:ba(g.colorStyle)},null,8,["size","icon","style"])}const YM=Io(qM,[["render",GM],["__scopeId","data-v-9af48e85"]]),Sy={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},ld={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},XM=function(n){const t="#000000",e="#ffffff",r=ld[Sy[n]];if(r){const m=+`0x${r.slice(1,3)}`,g=+`0x${r.slice(3,5)}`,y=+`0x${r.slice(5,7)}`;if((m*299+g*587+y*114)/1e3>128)return t}return e},QM=Object.keys(ld),ZM={astro:{component:n=>Fs(YM,{...n})},"astro-status":{component:n=>Fs(KM,{...n,status:n.icon})}},JM={extras:{component:n=>Fs(zb,{...n})}},RN=In("T",{data:{configKey:"",dontSaveDefaultConfig:!1},methods:{loadDefaultConfig:function(){return localStorage[`${this.configKey}__default`]?JSON.parse(localStorage[`${this.configKey}__default`]):{}},saveDefaultConfig:function(n){this.dontSaveDefaultConfig!==!0&&(localStorage[`${this.configKey}__default`]=JSON.stringify(n))},openConfigBase:function(n,t=!1,e=null){new cs().load_config(this.configKey,n).then(r=>{r?(this.$notify.normal({title:"Loading configuration",body:n}),e&&e(JSON.parse(r)),t||this.$route.fullPath.includes(n)||this.$router.push({query:{config:n}})):this.$notify.caution({title:"Unknown configuration",body:n})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${n}`,body:r})})},saveConfigBase:function(n,t){new cs().save_config(this.configKey,n,JSON.stringify(t)).then(()=>{this.$notify.normal({title:"Saved configuration",body:n})}).catch(e=>{e&&this.$notify.serious({title:`Error saving configuration: ${n}`,body:e})})},resetConfigBase:function(){localStorage.removeItem(`${this.configKey}__default`);const n={...this.$route.query};delete n.config,this.$router.replace({query:n})}}}),eT={props:{configKey:String,modelValue:Boolean},data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(n=>n.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},mounted(){let n=-1;new cs().list_configs(this.configKey).then(t=>{this.configs=t.map(e=>(n+=1,{configId:n,config:e}))}).catch(t=>{this.$emit("warning",`Failed to connect to OpenC3. ${t}`)})},methods:{selectRow:function(n){this.selectedRows=[n.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(n){this.$dialog.confirm(`Are you sure you want to delete: ${n.config}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>{var e;((e=this.selectedItem)==null?void 0:e.config)===n.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(n),1),new cs().delete_config(this.configKey,n.config)}).catch(t=>{t!==!0&&this.$emit("warning",`Failed to delete config ${n.config} Error: ${t}`)})}}},tT={class:"mt-4 pa-3"},nT=["textContent"];function rT(n,t,e,r,m,g){const y=yt("v-spacer"),x=yt("v-toolbar"),h=yt("v-text-field"),p=yt("v-row"),s=yt("v-btn"),a=yt("v-data-table"),u=yt("v-card-text"),c=yt("v-card-actions"),o=yt("v-card"),l=yt("v-dialog");return mn(),Hi(l,{modelValue:g.show,"onUpdate:modelValue":t[4]||(t[4]=d=>g.show=d),width:"600",onKeydown:Qc(g.cancel,["esc"])},{default:Mt(()=>[st(o,null,{default:Mt(()=>[nr("form",{onSubmit:t[3]||(t[3]=Ps((...d)=>g.success&&g.success(...d),["prevent"]))},[st(x,{height:"24"},{default:Mt(()=>[st(y),t[5]||(t[5]=nr("span",null,"Open Configuration",-1)),st(y)]),_:1}),st(u,null,{default:Mt(()=>[nr("div",tT,[st(p,{dense:""},{default:Mt(()=>[st(h,{modelValue:m.search,"onUpdate:modelValue":t[0]||(t[0]=d=>m.search=d),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),st(a,{modelValue:m.selectedRows,"onUpdate:modelValue":t[1]||(t[1]=d=>m.selectedRows=d),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":t[2]||(t[2]=(d,w)=>g.selectRow(w))},{"item.actions":Mt(({item:d})=>[st(s,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:w=>g.deleteConfig(d)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),st(p,{dense:""},{default:Mt(()=>[fl(nr("span",{class:"ma-2 text-red",textContent:Fr(g.error)},null,8,nT),[[ml,g.error]])]),_:1})])]),_:1}),st(c,{class:"px-2"},{default:Mt(()=>[st(y),st(s,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:g.cancel},{default:Mt(()=>[...t[6]||(t[6]=[gr(" Cancel ",-1)])]),_:1},8,["onClick"]),st(s,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!g.error,onClick:Ps(g.success,["prevent"])},{default:Mt(()=>[...t[7]||(t[7]=[gr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const ON=In("U",Io(eT,[["render",rT]])),iT={props:{configKey:String,modelValue:Boolean},data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(n=>n.configId===this.selectedRows[0]):null},error:function(){return this.configName?null:"Config must have a name"},show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{selectedItem:function(n){n&&(this.configName=n.config)}},mounted(){let n=-1;new cs().list_configs(this.configKey).then(t=>{this.configs=t.map(e=>(n+=1,{configId:n,config:e}))}).catch(t=>{this.$emit("warning",`Failed to connect to OpenC3. ${t}`)})},methods:{selectRow:function(n){this.selectedRows=[n.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(n){this.$dialog.confirm(`Are you sure you want to delete: ${n.config}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>{var e;((e=this.selectedItem)==null?void 0:e.config)===n.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(n),1),new cs().delete_config(this.configKey,n.config)}).catch(t=>{t!==!0&&this.$emit("warning",`Failed to delete config ${n.config} Error: ${t}`)})}}},oT={class:"mt-4 pa-3"},sT=["textContent"];function aT(n,t,e,r,m,g){const y=yt("v-spacer"),x=yt("v-toolbar"),h=yt("v-text-field"),p=yt("v-row"),s=yt("v-btn"),a=yt("v-data-table"),u=yt("v-card-text"),c=yt("v-card-actions"),o=yt("v-card"),l=yt("v-dialog");return mn(),Hi(l,{modelValue:g.show,"onUpdate:modelValue":t[5]||(t[5]=d=>g.show=d),width:"600",onKeydown:Qc(g.cancel,["esc"])},{default:Mt(()=>[st(o,null,{default:Mt(()=>[nr("form",{onSubmit:t[4]||(t[4]=Ps((...d)=>g.success&&g.success(...d),["prevent"]))},[st(x,{height:"24"},{default:Mt(()=>[st(y),t[6]||(t[6]=nr("span",null,"Save Configuration",-1)),st(y)]),_:1}),st(u,null,{default:Mt(()=>[nr("div",oT,[st(p,{dense:""},{default:Mt(()=>[st(h,{modelValue:m.search,"onUpdate:modelValue":t[0]||(t[0]=d=>m.search=d),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),st(a,{modelValue:m.selectedRows,"onUpdate:modelValue":t[1]||(t[1]=d=>m.selectedRows=d),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":t[2]||(t[2]=(d,w)=>g.selectRow(w))},{"item.actions":Mt(({item:d})=>[st(s,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:w=>g.deleteConfig(d)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),st(p,{dense:""},{default:Mt(()=>[st(h,{modelValue:m.configName,"onUpdate:modelValue":t[3]||(t[3]=d=>m.configName=d),"hide-details":"",autofocus:"",disabled:!!g.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),st(p,{dense:""},{default:Mt(()=>[fl(nr("span",{class:"ma-2 text-red",textContent:Fr(g.error)},null,8,sT),[[ml,g.error]])]),_:1})])]),_:1}),st(c,{class:"px-2"},{default:Mt(()=>[st(y),st(s,{variant:"outlined",onClick:g.cancel},{default:Mt(()=>[...t[7]||(t[7]=[gr(" Cancel ",-1)])]),_:1},8,["onClick"]),st(s,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!g.error,onClick:Ps(g.success,["prevent"])},{default:Mt(()=>[...t[8]||(t[8]=[gr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const NN=In("A",Io(iT,[["render",aT]])),lT=50,cT=2e3,Ay="single-spa:app-change",uT={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Ay,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},cT)},unmounted(){window.removeEventListener(Ay,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=eu().length>0,eu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},lT)}}},hT={class:"mx-1"},dT={key:1,class:"d-flex justify-center align-center"};function pT(n,t,e,r,m,g){const y=yt("v-card-title"),x=yt("v-card-text"),h=yt("v-card"),p=yt("v-progress-circular");return mn(),Dr(gl,null,[m.show?(mn(),Hi(h,{key:0},{default:Mt(()=>[st(y,null,{default:Mt(()=>[...t[0]||(t[0]=[gr(" 404 Not Found ",-1)])]),_:1}),st(x,{class:"d-flex align-center mt-3"},{default:Mt(()=>[t[1]||(t[1]=gr(" The requested URL ",-1)),nr("code",hT,Fr(n.$route.fullPath),1),t[2]||(t[2]=gr(" was not routable. ",-1)),t[3]||(t[3]=nr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):oo("",!0),g.showSpinner?(mn(),Dr("div",dT,[st(p,{indeterminate:""})])):oo("",!0)],64)}const _y=[{path:"/:target?/:screen?",name:"TlmViewer",component:()=>nt(()=>tt.import("./TlmViewer-50d5ae8dc4223c22dd1c.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Io(uT,[["render",pT]])}];_y.forEach(xp);const gT=mp({history:vp(),routes:_y}),fT={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"}},mT={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},vT=["innerHTML"],yT={key:2},wT={key:3,class:"validate mt-4"};function bT(n,t,e,r,m,g){const y=yt("v-spacer"),x=yt("v-toolbar"),h=yt("v-icon"),p=yt("v-text-field"),s=yt("v-card-text"),a=yt("v-btn"),u=yt("v-card-actions"),c=yt("v-card"),o=yt("v-dialog"),l=yt("v-app");return mn(),Hi(l,null,{default:Mt(()=>[st(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:Mt(()=>[st(c,null,{default:Mt(()=>[st(x,{height:"24"},{default:Mt(()=>[st(y),nr("span",null,Fr(n.params.title),1),st(y)]),_:1}),st(s,{class:"mt-4 pa-3"},{default:Mt(()=>[n.params.validateText?(mn(),Hi(h,{key:0,class:"mr-2"},{default:Mt(()=>[...t[2]||(t[2]=[gr(" mdi-alert ",-1)])]),_:1})):oo("",!0),n.params.html?(mn(),Dr("span",{key:1,innerHTML:n.params.text},null,8,vT)):(mn(),Dr("span",yT,Fr(n.params.text),1)),n.params.validateText?(mn(),Dr("div",wT,[gr(" Enter "+Fr(n.params.validateText)+" to confirm! ",1),st(p,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=d=>n.validationText=d),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):oo("",!0)]),_:1}),st(u,{class:"px-2"},{default:Mt(()=>[st(y),n.params.cancelText?(mn(),Hi(a,{key:0,variant:"outlined","data-test":g.dataTestCancel,onClick:g.cancel},{default:Mt(()=>[gr(Fr(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):oo("",!0),st(a,{variant:"flat",color:n.params.okClass,"data-test":g.dataTestOk,onClick:g.ok},{default:Mt(()=>[gr(Fr(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const xT=Io(mT,[["render",bT],["__scopeId","data-v-de532a0f"]]);class CT{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(xT);t.use(ud);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:m,validateText:g,cancelText:y,html:x}){return this.mount(),new Promise((h,p)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:m,validateText:g,cancelText:y,html:x},h,p)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:m,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:m="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:m,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:m="Cancel",okClass:g="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:g,validateText:r,cancelText:m,html:!1})}}const kT={install(n,t){const e=new CT;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},ST={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
|
1498
|
+
--toast-bg-color:${ld[this.toastNotification.level]};
|
1499
|
+
--toast-fg-color:${XM(this.toastNotification.level)};
|
1500
|
+
`},contentStyle:function(){return`
|
1501
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1502
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1503
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1504
|
+
`}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},AT={key:0,class:"text-subtitle-1 mr-1 notification-text"},_T={key:1,class:"text-body-2 notification-text"},$T={key:2,class:"text-body-2 notification-text"};function MT(n,t,e,r,m,g){const y=yt("v-icon"),x=yt("v-spacer"),h=yt("v-btn"),p=yt("v-sheet"),s=yt("v-slide-y-transition");return mn(),Hi(s,null,{default:Mt(()=>[fl(st(p,{style:ba(g.toastStyle),class:"toast-notification",onClick:g.expand},{default:Mt(()=>[st(y,{class:"mr-1 notification-text"},{default:Mt(()=>[gr(Fr(g.toastNotificationIcon),1)]),_:1}),nr("div",{class:"toast-content",style:ba(g.contentStyle)},[n.toastNotification.title?(mn(),Dr("span",AT,[n.toastNotification.body||n.toastNotification.message?(mn(),Dr(gl,{key:0},[gr(Fr(n.toastNotification.title)+": ",1)],64)):(mn(),Dr(gl,{key:1},[gr(Fr(n.toastNotification.title),1)],64))])):oo("",!0),n.toastNotification.body?(mn(),Dr("span",_T,Fr(n.toastNotification.body),1)):oo("",!0),n.toastNotification.message?(mn(),Dr("span",$T,Fr(n.toastNotification.message),1)):oo("",!0)],4),st(x),st(h,{variant:"text",class:"notification-text",onClick:Ps(g.hide,["stop"])},{default:Mt(()=>[...t[0]||(t[0]=[gr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ml,n.showToast]])]),_:1})}const TT=Io(ST,[["render",MT],["__scopeId","data-v-84833581"]]);class IT{constructor(t={}){var e;this.$store=t.store,this.mounted=!1,this.$root=null,(e=window.$cosmosNotify)!=null&&e.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const t=Jc(TT);t.use(ud);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:m,level:g,duration:y,type:x="alert",logToConsole:h=!1,saveToHistory:p=!0}){this.mount(),h&&console.log(m?`${g.toUpperCase()} - ${m}`:`${g.toUpperCase()} - ${e}: ${r}`),p&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:m,level:g}),this[t]({title:e,body:r,message:m,level:g,duration:y,type:x})}toast({title:t,body:e,message:r,level:m,duration:g,type:y}){this.$root.toast({title:t,body:e,message:r,level:m,type:y},g)}critical({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}caution({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}off({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}}const ET={install(n,t){const e=new IT(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},$y=100,My=yp({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory(n,t){n.notifyHistory.length>=$y&&(n.notifyHistory.length=$y-1),n.notifyHistory.unshift(t)},notifyClearHistory(n){n.notifyHistory=[]},setNamedWidget(n,t){Object.assign(n.namedWidgets,t)},clearNamedWidget(n,t){delete n.namedWidgets[t]},playback(n,t){Object.assign(n.playback,t)}},modules:{}});function Ty(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function LT(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function Iy(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const m in n)r[m]=n[m];for(const m in t){const g=n[m],y=t[m];if(Ty(g)&&Ty(y)){r[m]=Iy(g,y,e);continue}if(e&&Array.isArray(g)&&Array.isArray(y)){r[m]=e(g,y);continue}r[m]=y}return r}function Ga(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ga.cache.has(n))return Ga.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ga.cache.set(n,t),t}Ga.cache=new Map;function RT(n){lp(`Vuetify: ${n}`)}function Ey(n,t){return e=>Object.keys(n).reduce((r,m)=>{const g=typeof n[m]=="object"&&n[m]!=null&&!Array.isArray(n[m])?n[m]:{type:n[m]};return e&&m in e?r[m]={...g,default:e[m]}:r[m]=g,t&&!r[m].source&&(r[m].source=t),r},{})}function Ly(n,t){const e=pp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function OT(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ly("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const cd=Symbol.for("vuetify:defaults");function Ry(){const n=cp(cd);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function NT(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[Ga(t)]<"u")}function DT(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ry();const r=Ly("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const m=Zc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),g=new Proxy(n,{get(h,p){var s,a,u,c;const o=Reflect.get(h,p);if(p==="class"||p==="style")return[(s=m.value)==null?void 0:s[p],o].filter(w=>w!=null);if(NT(r.vnode,p))return o;const l=(a=m.value)==null?void 0:a[p];if(l!==void 0)return l;const d=(c=(u=e.value)==null?void 0:u.global)==null?void 0:c[p];return d!==void 0?d:o}}),y=up();hp(()=>{if(m.value){const h=Object.entries(m.value).filter(p=>{let[s]=p;return s.startsWith(s[0].toUpperCase())});y.value=h.length?Object.fromEntries(h):void 0}else y.value=void 0});function x(){const h=OT(cd,r);gp(cd,Zc(()=>y.value?Iy((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:g,provideSubDefaults:x}}function fc(n){if(n._setup=n._setup??n.setup,!n.name)return RT("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Ey(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return LT(e,t)},n.props._as=String,n.setup=function(e,r){const m=Ry();if(!m.value)return n._setup(e,r);const{props:g,provideSubDefaults:y}=DT(e,e._as??n.name,m),x=n._setup(g,r);return y(),x}}return n}function FT(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?fc:ap)(t)}const PT=[String,Function,Object,Array],mc=Ey({icon:{type:PT},tag:{type:[String,Object,Function],required:!0}},"icon");FT()({name:"VComponentIcon",props:mc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return st(n.tag,null,{default:()=>{var m;return[n.icon?st(r,null,null):(m=e.default)==null?void 0:m.call(e)]}})}}}),fc({name:"VSvgIcon",inheritAttrs:!1,props:mc(),setup(n,t){let{attrs:e}=t;return()=>st(n.tag,fp(e,{style:null}),{default:()=>[nr("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?nr("path",{d:r[0],"fill-opacity":r[1]},null):nr("path",{d:r},null)):nr("path",{d:n.icon},null)])]})}}),fc({name:"VLigatureIcon",props:mc(),setup(n){return()=>st(n.tag,null,{default:()=>[n.icon]})}});const WT=fc({name:"VClassIcon",props:mc(),setup(n){return()=>st(n.tag,{class:dp(n.icon)},null)}}),BT={component:n=>Fs(WT,{...n,class:"mdi"})},ud=wp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:fT}},icons:{defaultSet:"mdi",sets:{mdi:BT,...ZM,...JM}}}),hd=$b({createApp:Jc,appOptions:{render(){return Fs(Nb,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(gT),n.use(My),n.use(ud),n.use(kT),n.use(ET,{store:My})}}),FN=In("b",hd.bootstrap),PN=In("m",hd.mount),WN=In("u",hd.unmount)})}}));
|