openc3-cosmos-tool-tlmviewer 6.3.0 → 6.4.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-BbsN1dzF-c0180b7a0235dc03310a.js → ArrayWidget-DAZApfkV-2d1b5b118f998989a958.js} +2 -2
- data/tools/tlmviewer/{ArrayplotWidget-CCKEyYIx-f16decedc42b4d8ca7f1.js → ArrayplotWidget-BfsxDplv-b1e6f9d804eb78dae660.js} +1 -1
- data/tools/tlmviewer/{BarColumn-C6p07yWK-c427c87db9b93dcc2f54.js → BarColumn-q0nAsvrd-4ca8b211d8773f8cb78b.js} +1 -1
- data/tools/tlmviewer/BlockWidget-SDCUWcMQ-edeef73d29abe20bb91d.js +2 -0
- data/tools/tlmviewer/{ButtonWidget-CtfJzCBR-ff447b74b9f24f7490d7.js → ButtonWidget-BVMjwC19-3fac2ccb297d788991fe.js} +2 -2
- data/tools/tlmviewer/CanvasWidget-bVkufjRQ-f8a5c23980b229f8c6d4.js +1 -0
- data/tools/tlmviewer/CanvasdotWidget-DpniFfca-f8737f1b6ef9a745c386.js +1 -0
- data/tools/tlmviewer/{CanvasimageWidget-BPlj5QYK-73871e644af269576e72.js → CanvasimageWidget-DHOSz-dJ-f0e9afbb9714000c0adf.js} +1 -1
- data/tools/tlmviewer/{CanvasimagevalueWidget-DVFGLt8f-696e2c17a1ec69b0ce83.js → CanvasimagevalueWidget-zrURWWUL-6f5f320b1d33d183e0b5.js} +1 -1
- data/tools/tlmviewer/CanvaslabelWidget-D-XAMifp-31cf85ec812518ba00ef.js +1 -0
- data/tools/tlmviewer/{CanvaslabelvalueWidget-B7yIDmsn-9c61b11fa2b152fe6683.js → CanvaslabelvalueWidget-BsIdBtEb-51fbc6ba569ef37deff2.js} +1 -1
- data/tools/tlmviewer/{CanvaslineWidget-BICdxX0Q-4fdbeb4ace91d2e5a50f.js → CanvaslineWidget-CA2aPGRg-f1286048615bb5f700ad.js} +1 -1
- data/tools/tlmviewer/{CanvaslinevalueWidget-Cq-Ddh0P-1b6907345565df13fc98.js → CanvaslinevalueWidget-J7epKRlo-d74b3f7b68b4f676863d.js} +1 -1
- data/tools/tlmviewer/CheckbuttonWidget-ByH-PDRG-941f6164b10840985272.js +1 -0
- data/tools/tlmviewer/{ComboboxWidget-CtyKbEWb-4d77087f3a3a6ab41309.js → ComboboxWidget-Bdm_fMzW-92420a39ce9a36f589bc.js} +1 -1
- data/tools/tlmviewer/DateWidget-BaQqthC7-d7e6b35f69c53a6618cf.js +1 -0
- data/tools/tlmviewer/{DetailsDialog-DmEC5BTs-cd81f212b2b2bd72a6f5.js → DetailsDialog-C5jf8o0K-1e5ff9aa5f45f8afda23.js} +1 -1
- data/tools/tlmviewer/{DynamicWidget-CfMtj7H8-b92e2479d46571e03463.js → DynamicWidget-CfMtj7H8-b8caf1acd10aa7ac5238.js} +1 -1
- data/tools/tlmviewer/FormatvalueWidget--H5B9i_Y-2a7d8bcdfd7aa164c34f.js +1 -0
- data/tools/tlmviewer/Graph-M382Zo8o-3788be5d86167f23b600.js +1 -0
- data/tools/tlmviewer/{GraphWidget-DurWDmpg-60141cf195eee6a9b979.js → GraphWidget-_YOGDD1U-3a7d28925c7d03cd265a.js} +1 -1
- data/tools/tlmviewer/{HorizontalWidget-Cd_wl1b3-ec8240808cb7442a93f7.js → HorizontalWidget-D_gzrOWs-f278d7d00474f99e3f44.js} +1 -1
- data/tools/tlmviewer/HorizontalboxWidget-GDcjO-UB-47800408a736723d8fe0.js +1 -0
- data/tools/tlmviewer/HorizontallineWidget-DZvOYFxf-fbcf1ac5d88a86b516e8.js +1 -0
- data/tools/tlmviewer/{IframeWidget-BPerHCCa-edd3c44559ddbd724350.js → IframeWidget-CuUav9b3-b7f6d0d1e20fd427a2e3.js} +1 -1
- data/tools/tlmviewer/{ImageLoader-4N-7Gj61-a9ecacc794afca057730.js → ImageLoader-3KLKJ5mV-c5c79c676035dfd49672.js} +1 -1
- data/tools/tlmviewer/{ImageviewerWidget-Cw_H_HmZ-3c3fa55e72ef559366dd.js → ImageviewerWidget-BMZ6REN4-5f2e19a2e68fa86bcb73.js} +1 -1
- data/tools/tlmviewer/{LabelWidget-xrmcVeq8-5d52deba3f63a8b3864e.js → LabelWidget-oh6FIG6s-390c9d4a44ee3f55d9fe.js} +1 -1
- data/tools/tlmviewer/LabelledWidget-Bic36les-de0d4273398751de217e.js +1 -0
- data/tools/tlmviewer/LabelprogressbarWidget-CqIiGoDb-d05aa715c5b219749056.js +1 -0
- data/tools/tlmviewer/LabelsparklineWidget-DLhmqO02-161cebd576c62c7f62a0.js +1 -0
- data/tools/tlmviewer/{LabelvalueWidget-CQ06wWDK-3375fb4cb228e3d16822.js → LabelvalueWidget-BefwSSVq-a52d21407be6baa90e80.js} +1 -1
- data/tools/tlmviewer/{LabelvaluedescWidget-Bo8zT01X-947b21c485f943ef8267.js → LabelvaluedescWidget-NxrCzznm-54db0e493fee04b5f1b8.js} +1 -1
- data/tools/tlmviewer/{LabelvaluelimitsbarWidget-BucTw8Yk-473c83b45f86fe9c3f20.js → LabelvaluelimitsbarWidget-pq7qoolL-b3ed8d46fd5eb3a97bda.js} +1 -1
- data/tools/tlmviewer/LabelvaluelimitscolumnWidget-edkpogsl-1d3a4aacb86e114c34fc.js +1 -0
- data/tools/tlmviewer/{LabelvaluerangebarWidget-D8cbfXFM-11f22e03d858882d8a9e.js → LabelvaluerangebarWidget-DpJNv9dh-6776c4748657a15512c4.js} +1 -1
- data/tools/tlmviewer/{Layout-Tf--nruw-7468be6b8f61bc224ecb.js → Layout-B0hvhBQO-1c3e5a4255409c10b9d5.js} +1 -1
- data/tools/tlmviewer/{LedWidget-qH_FthkK-f1b76b7e0d538b01aa06.js → LedWidget--4eSxBnn-5b4e501c768df88c8619.js} +1 -1
- data/tools/tlmviewer/LimitsbarWidget-BQaumgRt-14fd2237a9de4399f1a6.js +1 -0
- data/tools/tlmviewer/{LimitscolorWidget-c6Qa6su7-eeec498db14f368b0455.js → LimitscolorWidget-BBF9sRtF-675d491b16c1adcff91c.js} +1 -1
- data/tools/tlmviewer/{LimitscolumnWidget-CcLs_443-dbdc5ab38aa2e76afe8a.js → LimitscolumnWidget-DZZtSoXw-ec2c694db039ea1e7523.js} +1 -1
- data/tools/tlmviewer/LinegraphWidget-DTLZmyWs-38e6e96910795a584759.js +1 -0
- data/tools/tlmviewer/{MatrixbycolumnsWidget-DXFpZTre-90b08d98d073e5dcaa7e.js → MatrixbycolumnsWidget-dpgZz4wR-fe30559474f289f7fc62.js} +1 -1
- data/tools/tlmviewer/{ProgressbarWidget-iYGw8-Dc-27f712f4400ffef47b60.js → ProgressbarWidget-7cYr8136-f228ebaa10b9e42956d0.js} +1 -1
- data/tools/tlmviewer/RadiobuttonWidget-DTfn-7F2-9516baa81defead4afe2.js +1 -0
- data/tools/tlmviewer/RadiogroupWidget-DWvTpw94-1722e9a1342505816ebc.js +1 -0
- data/tools/tlmviewer/{RangebarWidget-D_zGTtCa-2aef0ce31108d74efb03.js → RangebarWidget-CG2Y7eYp-e8b88eecd38dfbf9d6c4.js} +1 -1
- data/tools/tlmviewer/{RollupWidget-Dolsixyt-3d2b97d0a54bdd9abf1c.js → RollupWidget-C6HKTfCR-dd69122eb9d6b4dcf9fd.js} +1 -1
- data/tools/tlmviewer/{ScrollwindowWidget-DV2nZuNi-3be343876f8eebcec7c0.js → ScrollwindowWidget-DvhBCYd2-e7b1d670e0820f141827.js} +1 -1
- data/tools/tlmviewer/SignalWidget-BZIoGjam-b05357b8ab1c89872a38.js +1 -0
- data/tools/tlmviewer/{SpacerWidget-BH0p2OLi-19911ae21dd4099821d4.js → SpacerWidget-YBS8RZIE-70b8b7ee98ecff02a5db.js} +1 -1
- data/tools/tlmviewer/{SparklineWidget-coxi9r2g-11bedf27f2db11167d7a.js → SparklineWidget-BMhY9vYe-c8940b78c4a47dcc26cf.js} +1 -1
- data/tools/tlmviewer/TabbookWidget-RfET19pq-c09bb3cd64c076c7d91e.js +1 -0
- data/tools/tlmviewer/TextboxWidget-M8vFBSxS-ca85806a5f5bc1eca286.js +1 -0
- data/tools/tlmviewer/{TextfieldWidget-C08N4JE8-f9b93a460586a8e16f6b.js → TextfieldWidget-Dev7lCsT-a0ac820f98e71778be9b.js} +1 -1
- data/tools/tlmviewer/{TimeWidget-DtwdEcFg-b0eb36734a12d093ca52.js → TimeWidget-CQzn13rQ-6bb39013e2924d5d47de.js} +1 -1
- data/tools/tlmviewer/TitleWidget-C4zbSian-ac1d1f33e58cb60dc918.js +1 -0
- data/tools/tlmviewer/TlmViewer-ec16698033f1b973c2ae.js +35 -0
- data/tools/tlmviewer/{VWidget-DQqb7NVW-1c937bacabb62b528675.js → VWidget-iASFPjdx-249091890926d0adaf4f.js} +1 -1
- data/tools/tlmviewer/ValueWidget-BVI6uUVX-5e6354bbcfac8d565f2d.js +1 -0
- data/tools/tlmviewer/ValuelimitsbarWidget-BiIcery0-949bf93827a3c82d216c.js +1 -0
- data/tools/tlmviewer/{ValuelimitscolumnWidget-QvhI6EcE-acc5be8b0979f8e0be09.js → ValuelimitscolumnWidget-BiRI8GbI-d19441bb12342ec8bd64.js} +1 -1
- data/tools/tlmviewer/{ValuerangebarWidget-Dt3K9BnC-2f24dd227582ae13d307.js → ValuerangebarWidget-CtMFQu9--83eaf00523afe9c256d1.js} +1 -1
- data/tools/tlmviewer/{VerticalWidget-BIIViZgI-f438db349975c642532f.js → VerticalWidget-CRmcpQBn-792b5dafca1536fed3d0.js} +1 -1
- data/tools/tlmviewer/VerticalboxWidget-C-qChjug-a35ce83739c205b61ca8.js +1 -0
- data/tools/tlmviewer/Widget-CFEnOKms-ecc3f6aebb9be9f36fdb.js +1 -0
- data/tools/tlmviewer/main-1a8e237d9b44b8f763b7.js +1503 -0
- data/tools/tlmviewer/main.js +1 -1
- metadata +69 -69
- data/tools/tlmviewer/BlockWidget-DlCHbqZX-796d289a6b1ada4c32ad.js +0 -2
- data/tools/tlmviewer/CanvasWidget-CqRlXc4r-5c4f8704117fdd5c9fb4.js +0 -1
- data/tools/tlmviewer/CanvasdotWidget--Xr_KsZs-13b0a5bda7e5ac222d9f.js +0 -1
- data/tools/tlmviewer/CanvaslabelWidget-CYNqmyP0-f0329d85fe6fd117d1bc.js +0 -1
- data/tools/tlmviewer/CheckbuttonWidget-B74AWeaW-b1044363b878176d1d19.js +0 -1
- data/tools/tlmviewer/DateWidget-BEVSczU8-c3d324074beb4fb3c45f.js +0 -1
- data/tools/tlmviewer/FormatvalueWidget-DN12xymS-cb0205e8d3a2b75aa30a.js +0 -1
- data/tools/tlmviewer/Graph-Bgo0cjl3-352d09842b1ce2b4d512.js +0 -1
- data/tools/tlmviewer/HorizontalboxWidget-BcMTFBU--8d77d876b5c78688bd68.js +0 -1
- data/tools/tlmviewer/HorizontallineWidget-CXFqHclf-d9194bd5e8d43c1e63d3.js +0 -1
- data/tools/tlmviewer/LabelledWidget-D48QoyMk-ad957a5c54769b1d9434.js +0 -1
- data/tools/tlmviewer/LabelprogressbarWidget-C_950t6g-26fc54e493664beb8a24.js +0 -1
- data/tools/tlmviewer/LabelsparklineWidget-0KXQyPoU-969881a1055b17d2bcd3.js +0 -1
- data/tools/tlmviewer/LabelvaluelimitscolumnWidget-Dflb1hNd-ea8f14ab73aefc5c2fff.js +0 -1
- data/tools/tlmviewer/LimitsbarWidget-B9lAB2RD-4f1f002f2d18c6e60bb6.js +0 -1
- data/tools/tlmviewer/LinegraphWidget-BSVYLFo1-6b8eaa56c276cd796395.js +0 -1
- data/tools/tlmviewer/RadiobuttonWidget-ytmoVZ3u-9f84a519ca2299571dd2.js +0 -1
- data/tools/tlmviewer/RadiogroupWidget-CusMBhKH-dc535fb20751bbcb9ede.js +0 -1
- data/tools/tlmviewer/SignalWidget-d9-6h85k-6691e87595fe291a4cd2.js +0 -1
- data/tools/tlmviewer/TabbookWidget-B1XKplGH-21e130eee234de6541f5.js +0 -1
- data/tools/tlmviewer/TextboxWidget-C-_M2M4l-25d6441ceaff0a1c4716.js +0 -1
- data/tools/tlmviewer/TitleWidget-CT-aLcNb-05c7593d5cc7dc808564.js +0 -1
- data/tools/tlmviewer/TlmViewer-d66fa8d7f0bc2224b2b5.js +0 -35
- data/tools/tlmviewer/ValueWidget-C6RanBj3-2c0f2833015756acd0c9.js +0 -1
- data/tools/tlmviewer/ValuelimitsbarWidget-B3bvjfxc-994458b38c3b9622cf99.js +0 -1
- data/tools/tlmviewer/VerticalboxWidget-DY72fLHW-ec1902a12ee2a80c1ad7.js +0 -1
- data/tools/tlmviewer/Widget-oyqWpFXJ-51b975b92370bf6822cf.js +0 -1
- data/tools/tlmviewer/main-dc8a173df7b1a0cc5c6e.js +0 -1499
@@ -0,0 +1,1503 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(Pn,it){"use strict";var $t,Hi,er,Ft,at,Ui,Fr,tp,np,Fs,ba,Mo,Pr,Qr,Kc,Ps,cl,ul,rp,ip,op,Gc,sp,ap,lp,cp,Yc,up,hp,dp,pp,gp,fp;return{setters:[Pt=>{$t=Pt.resolveComponent,Hi=Pt.createBlock,er=Pt.openBlock,Ft=Pt.withCtx,at=Pt.createVNode,Ui=Pt.createElementBlock,Fr=Pt.createElementVNode,tp=Pt.useCssVars,np=Pt.defineAsyncComponent,Fs=Pt.h,ba=Pt.normalizeStyle,Mo=Pt.createCommentVNode,Pr=Pt.createTextVNode,Qr=Pt.toDisplayString,Kc=Pt.withKeys,Ps=Pt.withModifiers,cl=Pt.withDirectives,ul=Pt.vShow,rp=Pt.defineComponent,ip=Pt.warn,op=Pt.inject,Gc=Pt.computed,sp=Pt.shallowRef,ap=Pt.watchEffect,lp=Pt.getCurrentInstance,cp=Pt.provide,Yc=Pt.createApp,up=Pt.mergeProps},Pt=>{hp=Pt.createRouter,dp=Pt.createWebHistory},Pt=>{pp=Pt.getMountedApps},Pt=>{gp=Pt.createStore},Pt=>{fp=Pt.createVuetify}],execute:function(){Pn({$:kp,e:FT,l:bn,m:wr,y:Kn,z:td});var Pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mp(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?mp(Object(e),!0).forEach(function(r){wb(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):mp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function wb(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})(Pt);var bb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function xb(n){if(ts(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=es(es({},bb),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:Cb.bind(null,t,e),mount:kb.bind(null,t,e),unmount:Ab.bind(null,t,e),update:Sb.bind(null,t,e)}}function Cb(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function kb(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 Sb(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 Ab(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 _b=Pn("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,m]of t)e[r]=m;return e}),$b={};function Tb(n,t){const e=$t("router-view"),r=$t("v-app");return er(),Hi(r,{id:"innerapp"},{default:Ft(()=>[at(e)]),_:1})}const Mb=_b($b,[["render",Tb]]),W2="modulepreload",B2=function(n){return"/"+n},z2={},ot=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)})},vp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/tlmviewer/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(vp)},Eo=Pn("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,m]of t)e[r]=m;return e}),Eb="/icons/customIcons.svg",Xc={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Eb+"#"+this.icon}}},yp=()=>{tp(n=>({"259824e2":n.color}))},wp=Xc.setup;Xc.setup=wp?(n,t)=>(yp(),wp(n,t)):yp;const Ib={class:"cosmos-custom-icon"},Rb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Lb=["href"];function Ob(n,t,e,r,m,g){return er(),Ui("span",Ib,[(er(),Ui("svg",Rb,[Fr("use",{href:g.iconSrc},null,8,Lb)]))])}const Nb=Eo(Xc,[["render",Ob],["__scopeId","data-v-4b6f1199"]]),hl=6e4,Qc=36e5,Db=1e3,bp=Symbol.for("constructDateFrom");function Kn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&bp in n?n[bp](t):n instanceof Date?new n.constructor(t):new Date(t)}function bn(n,t){return Kn(t||n,n)}let Fb={};function Ws(){return Fb}function Io(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=bn(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 Io(n,{...t,weekStartsOn:1})}function xp(n,t){const e=bn(n,void 0),r=e.getFullYear(),m=Kn(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const g=Bs(m),y=Kn(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 dl(n){const t=bn(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 Pb(n,...t){const e=Kn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function Cp(n,t){const e=bn(n,void 0);return e.setHours(0,0,0,0),e}function Wb(n,t,e){const[r,m]=Pb(void 0,n,t),g=Cp(r),y=Cp(m),x=+g-dl(g),h=+y-dl(y);return Math.round((x-h)/864e5)}function Bb(n,t){const e=xp(n),r=Kn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Bs(r)}function zb(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function kp(n){return!(!zb(n)&&typeof n!="number"||isNaN(+bn(n)))}function jb(n,t){const e=bn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Hb={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"}},Ub=(n,t,e)=>{let r;const m=Hb[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 Zc(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Vb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Kb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gb={date:Zc({formats:Vb,defaultWidth:"full"}),time:Zc({formats:qb,defaultWidth:"full"}),dateTime:Zc({formats:Kb,defaultWidth:"full"})},Yb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xb=(n,t,e,r)=>Yb[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 Qb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jb={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"]},e0={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"]},t0={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"}},n0={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"}},r0=(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"},i0={ordinalNumber:r0,era:xa({values:Qb,defaultWidth:"wide"}),quarter:xa({values:Zb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:xa({values:Jb,defaultWidth:"wide"}),day:xa({values:e0,defaultWidth:"wide"}),dayPeriod:xa({values:t0,defaultWidth:"wide",formattingValues:n0,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)?s0(x,a=>a.test(y)):o0(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 o0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function s0(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function a0(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 l0=/^(\d+)(th|st|nd|rd)?/i,c0=/\d+/i,u0={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},h0={any:[/^b/i,/^(a|c)/i]},d0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},p0={any:[/1/i,/2/i,/3/i,/4/i]},g0={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},f0={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]},m0={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},v0={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]},y0={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},w0={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}},b0={ordinalNumber:a0({matchPattern:l0,parsePattern:c0,valueCallback:n=>parseInt(n,10)}),era:Ca({matchPatterns:u0,defaultMatchWidth:"wide",parsePatterns:h0,defaultParseWidth:"any"}),quarter:Ca({matchPatterns:d0,defaultMatchWidth:"wide",parsePatterns:p0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ca({matchPatterns:g0,defaultMatchWidth:"wide",parsePatterns:f0,defaultParseWidth:"any"}),day:Ca({matchPatterns:m0,defaultMatchWidth:"wide",parsePatterns:v0,defaultParseWidth:"any"}),dayPeriod:Ca({matchPatterns:y0,defaultMatchWidth:"any",parsePatterns:w0,defaultParseWidth:"any"})},Sp={code:"en-US",formatDistance:Ub,formatLong:Gb,formatRelative:Xb,localize:i0,match:b0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function x0(n,t){const e=bn(n,void 0);return Wb(e,jb(e))+1}function Ap(n,t){const e=bn(n,void 0),r=+Bs(e)-+Bb(e);return Math.round(r/6048e5)+1}function Jc(n,t){var e,r,m,g;const y=bn(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=Kn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,p),s.setHours(0,0,0,0);const a=Io(s,t),u=Kn((t==null?void 0:t.in)||n,0);u.setFullYear(x,0,p),u.setHours(0,0,0,0);const l=Io(u,t);return+y>=+a?x+1:+y>=+l?x:x-1}function C0(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=Jc(n,t),p=Kn((t==null?void 0:t.in)||n,0);return p.setFullYear(h,0,x),p.setHours(0,0,0,0),Io(p,t)}function _p(n,t){const e=bn(n,t==null?void 0:t.in),r=+Io(e,t)-+C0(e,t);return Math.round(r/6048e5)+1}function an(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Ro={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return an(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):an(e+1,2)},d(n,t){return an(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 an(n.getHours()%12||12,t.length)},H(n,t){return an(n.getHours(),t.length)},m(n,t){return an(n.getMinutes(),t.length)},s(n,t){return an(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return an(m,t.length)}},zs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$p={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 Ro.y(n,t)},Y:function(n,t,e,r){const m=Jc(n,r),g=m>0?m:1-m;if(t==="YY"){const y=g%100;return an(y,2)}return t==="Yo"?e.ordinalNumber(g,{unit:"year"}):an(g,t.length)},R:function(n,t){const e=xp(n);return an(e,t.length)},u:function(n,t){const e=n.getFullYear();return an(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 an(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 an(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 Ro.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 an(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=_p(n,r);return t==="wo"?e.ordinalNumber(m,{unit:"week"}):an(m,t.length)},I:function(n,t,e){const r=Ap(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):an(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Ro.d(n,t)},D:function(n,t,e){const r=x0(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):an(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 an(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 an(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 an(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 Ro.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Ro.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):an(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):an(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ro.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Ro.s(n,t)},S:function(n,t){return Ro.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Mp(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 Mp(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"+Tp(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"+Tp(r,":");case"zzzz":default:return"GMT"+ns(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return an(r,t.length)},T:function(n,t,e){return an(+n,t.length)}};function Tp(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+an(g,2)}function Mp(n,t){return n%60===0?(n>0?"-":"+")+an(Math.abs(n)/60,2):ns(n,t)}function ns(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=an(Math.trunc(r/60),2),g=an(r%60,2);return e+m+t+g}const Ep=(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"})}},Ip=(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"})}},k0=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return Ep(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}}",Ep(r,t)).replace("{{time}}",Ip(m,t))},eu={p:Ip,P:k0},S0=/^D+$/,A0=/^Y+$/,_0=["D","DD","YY","YYYY"];function Rp(n){return S0.test(n)}function Lp(n){return A0.test(n)}function tu(n,t,e){const r=$0(n,t,e);if(console.warn(r),_0.includes(n))throw new RangeError(r)}function $0(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 T0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,M0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,E0=/^'([^]*?)'?$/,I0=/''/g,R0=/[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??Sp,l=(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,c=bn(n,e==null?void 0:e.in);if(!kp(c))throw new RangeError("Invalid time value");let d=t.match(M0).map(b=>{const I=b[0];if(I==="p"||I==="P"){const T=eu[I];return T(b,u.formatLong)}return b}).join("").match(T0).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const I=b[0];if(I==="'")return{isToken:!1,value:L0(b)};if($p[I])return{isToken:!0,value:b};if(I.match(R0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return{isToken:!1,value:b}});u.localize.preprocessor&&(d=u.localize.preprocessor(c,d));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:u};return d.map(b=>{if(!b.isToken)return b.value;const I=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Lp(I)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Rp(I))&&tu(I,t,String(n));const T=$p[I[0]];return T(c,I,u.localize,w)}).join("")}function L0(n){const t=n.match(E0);return t?t[1].replace(I0,"'"):n}var Lo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Op={exports:{}},Np;function O0(){return Np||(Np=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 l=h(s,a);if(l!=null)return u&&u(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],c=0,d=a.length;c<d;++c){var w=h(s,a[c]);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 l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+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 l={},o={id:a,uri:"",exports:l,packaged:!0},c=function(w,b){return g(a,w,b)},d=u(c,l,o);l=d||o.exports,m.modules[a]=l,delete m.payloads[a]}u=m.modules[a]=l||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],l=u===void 0?h:u>>0,o=l<0?Math.max(h+l,0):Math.min(l,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(l,o,c){if(typeof l=="string"&&l){var d=document.createTextNode(l);return o&&o.appendChild(d),d}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],b=0;b<l.length;b++){var I=u(l[b],o,c);I&&w.push(I)}return w}var T=document.createElement(l[0]),S=l[1],C=1;S&&typeof S=="object"&&!Array.isArray(S)&&(C=2);for(var b=C;b<l.length;b++)u(l[b],T,c);return C==2&&Object.keys(S).forEach(function(R){var L=S[R];R==="class"?T.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||R=="value"||R[0]=="$"?T[R]=L:R==="ref"?c&&(c[L]=T):R==="style"?typeof L=="string"&&(T.style.cssText=L):L!=null&&T.setAttribute(R,L)}),o&&o.appendChild(T),T},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,l){return document.createElementNS?document.createElementNS(l||y,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,l){var o=l?l.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var l=u?u.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(u,l){var o=(u.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(u,l){r.hasCssClass(u,l)||(u.className+=" "+l)},r.removeCssClass=function(u,l){for(var o=u.className.split(/\s+/g);;){var c=o.indexOf(l);if(c==-1)break;o.splice(c,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,l){for(var o=u.className.split(/\s+/g),c=!0;;){var d=o.indexOf(l);if(d==-1)break;c=!1,o.splice(d,1)}return c&&o.push(l),u.className=o.join(" "),c},r.setCssClass=function(u,l,o){o?r.addCssClass(u,l):r.removeCssClass(u,l)},r.hasCssString=function(u,l){var o=0,c;if(l=l||document,c=l.querySelectorAll("style")){for(;o<c.length;)if(c[o++].id===u)return!0}},r.removeElementById=function(u,l){l=l||document,l.getElementById(u)&&l.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(l){s(l[0],l[1])})}function s(u,l,o){if(!(typeof document>"u")){if(h){if(o)p();else if(o===!1)return h.push([u,l])}if(!x){var c=o;!o||!o.getRootNode?c=document:(c=o.getRootNode(),(!c||c==o)&&(c=document));var d=c.ownerDocument||c;if(l&&r.hasCssString(l,c))return null;l&&(u+=`
|
2
|
+
/*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(d.createTextNode(u)),l&&(w.id=l),c==d&&(c=r.getDocumentHead(d)),c.insertBefore(w,c.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,l){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(l))},r.scrollbarWidth=function(u){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var o=r.createElement("ace_outer"),c=o.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",o.appendChild(l);var d=u&&u.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(o);var w=l.offsetWidth;c.overflow="scroll";var b=l.offsetWidth;return w===b&&(b=o.clientWidth),d.removeChild(o),w-b},r.computedStyle=function(u,l){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,l,o){u[l]!==o&&(u[l]=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,l,o){u.style.transform="translate("+Math.round(l)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,l,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(l)+"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 l=u.indexOf(p);l!=-1&&u.splice(l,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(c){this.setOption(c,o[c])},this)},getOptions:function(o){var c={};if(o)Array.isArray(o)||(c=o,o=Object.keys(c));else{var d=this.$options;o=Object.keys(d).filter(function(w){return!d[w].hidden})}return o.forEach(function(w){c[w]=this.getOption(w)},this),c},setOption:function(o,c){if(this["$"+o]!==c){var d=this.$options[o];if(!d)return s('misspelled option "'+o+'"');if(d.forwardTo)return this[d.forwardTo]&&this[d.forwardTo].setOption(o,c);d.handlesSet||(this["$"+o]=c),d&&d.set&&d.set.call(this,c)}},getOption:function(o){var c=this.$options[o];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(o):c&&c.get?c.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,l=function(){function o(){this.$defaultOptions={},a=h,u="dollarSigns"}return o.prototype.defineOptions=function(c,d,w){return c.$options||(this.$defaultOptions[d]=c.$options={}),Object.keys(w).forEach(function(b){var I=w[b];typeof I=="string"&&(I={forwardTo:I}),I.name||(I.name=b),c.$options[I.name]=I,"initialValue"in I&&(c["$"+I.name]=I.initialValue)}),g.implement(c,p),this},o.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(d){var w=c.$options[d];"value"in w&&c.setOption(d,w.value)})},o.prototype.setDefaultValue=function(c,d,w){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][d])break;if(!this.$defaultOptions[c][d])return!1}var b=this.$defaultOptions[c]||(this.$defaultOptions[c]={});b[d]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,d,w):b[d].value=w)},o.prototype.setDefaultValues=function(c,d){Object.keys(d).forEach(function(w){this.setDefaultValue(c,w,d[w])},this)},o.prototype.setMessages=function(c,d){a=c,d&&d.placeholders&&(u=d.placeholders)},o.prototype.nls=function(c,d,w){a[c]||(s("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+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[c]||a[d]||d;return w&&(u==="dollarSigns"&&(b=b.replace(/\$(\$|[\d]+)/g,function(I,T){return T=="$"?"$":w[T]})),u==="curlyBrackets"&&(b=b.replace(/\{([^\}]+)\}/g,function(I,T){return w[T]}))),b},o}();l.prototype.warn=s,l.prototype.reportError=x,g.implement(l.prototype,y),r.AppConfig=l}),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(l){if(!p.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return p[l]},r.set=function(l,o){if(p.hasOwnProperty(l))p[l]=o;else if(this.setDefaultValue("",l,o)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&x.useStrictCSP(o)},r.all=function(){return g.copyObject(p)},r.$modes={},r.moduleUrl=function(l,o){if(p.$moduleUrls[l])return p.$moduleUrls[l];var c=l.split("/");o=o||c[c.length-2]||"";var d=o=="snippets"?"/":"-",w=c[c.length-1];if(o=="worker"&&d=="-"){var b=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(b,"")}(!w||w==o)&&c.length>1&&(w=c[c.length-2]);var I=p[o+"Path"];return I==null?I=p.basePath:d=="/"&&(o=d=""),I&&I.slice(-1)!="/"&&(I+="/"),I+o+d+w+this.get("suffix")},r.setModuleUrl=function(l,o){return p.$moduleUrls[l]=o};var s=function(l,o){if(l==="ace/theme/textmate"||l==="./theme/textmate")return o(null,e("./theme/textmate"));if(a)return a(l,o);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,o){var c;if(Array.isArray(l))var d=l[0],w=l[1];else if(typeof l=="string")var w=l;var b=function(I){if(I&&!r.$loading[w])return o&&o(I);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){s(w,function(S,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(L){L&&L(C)})})};if(!r.get("packaged"))return T();y.loadScript(r.moduleUrl(w,d),T),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(I){I.default?b(I.default):b(I)});else{try{c=this.$require(w)}catch{}b(c||r.$loaded[w])}},r.$require=function(l){if(typeof m.require=="function"){var o="require";return m[o](l)}},r.setModuleLoader=function(l,o){r.dynamicModules[l]=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.40.1"}),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,l=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=l.getElementsByTagName("script"),c=0;c<o.length;c++){var d=o[c],w=d.src||d.getAttribute("src");if(w){for(var b=d.attributes,I=0,T=b.length;I<T;I++){var S=b[I];S.name.indexOf("data-ace-")===0&&(s[h(S.name.replace(/^data-ace-/,""))]=S.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 l=y.FUNCTION_KEYS[u].toLowerCase();y[l]=parseInt(u,10)}for(var u in y.PRINTABLE_KEYS){var l=y.PRINTABLE_KEYS[u].toLowerCase();y[l]=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"],c=Math.pow(2,o.length);c--;)y.KEY_MODS[c]=o.filter(function(d){return c&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 c=y[o];return typeof c!="string"&&(c=String.fromCharCode(o)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,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(I,T,S){this.elem=I,this.type=T,this.callback=S}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=r.addListener=function(I,T,S,C){I.addEventListener(T,S,a()),C&&C.$toDestroy.push(new u(I,T,S))},o=r.removeListener=function(I,T,S){I.removeEventListener(T,S,a())};r.stopEvent=function(I){return r.stopPropagation(I),r.preventDefault(I),!1},r.stopPropagation=function(I){I.stopPropagation&&I.stopPropagation()},r.preventDefault=function(I){I.preventDefault&&I.preventDefault()},r.getButton=function(I){return I.type=="dblclick"?0:I.type=="contextmenu"||y.isMac&&I.ctrlKey&&!I.altKey&&!I.shiftKey?2:I.button},r.capture=function(I,T,S){var C=I&&I.ownerDocument||document;function R(L){T&&T(L),S&&S(L),o(C,"mousemove",T),o(C,"mouseup",R),o(C,"dragstart",R)}return l(C,"mousemove",T),l(C,"mouseup",R),l(C,"dragstart",R),R},r.addMouseWheelListener=function(I,T,S){l(I,"wheel",function(C){var R=.15,L=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=L*R,C.wheelY=F*R;break;case C.DOM_DELTA_LINE:var E=15;C.wheelX=L*E,C.wheelY=F*E;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=L*H,C.wheelY=F*H;break}T(C)},S)},r.addMultiMouseDownListener=function(I,T,S,C,R){var L=0,F,E,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(_){if(r.getButton(_)!==0?L=0:_.detail>1?(L++,L>4&&(L=1)):L=1,y.isIE){var A=Math.abs(_.clientX-F)>5||Math.abs(_.clientY-E)>5;(!H||A)&&(L=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},T[L-1]||600),L==1&&(F=_.clientX,E=_.clientY)}if(_._clicks=L,S[C]("mousedown",_),L>4)L=0;else if(L>1)return S[C](P[L],_)}Array.isArray(I)||(I=[I]),I.forEach(function(_){l(_,"mousedown",O,R)})};function c(I){return 0|(I.ctrlKey?1:0)|(I.altKey?2:0)|(I.shiftKey?4:0)|(I.metaKey?8:0)}r.getModifierString=function(I){return g.KEY_MODS[c(I)]};function d(I,T,S){var C=c(T);if(!S&&T.code&&(S=g.$codeToKeyCode[T.code]||S),!y.isMac&&x){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(C|=8),x.altGr)if((3&C)!=3)x.altGr=0;else return;if(S===18||S===17){var R=T.location;if(S===17&&R===1)x[S]==1&&(h=T.timeStamp);else if(S===18&&C===3&&R===2){var L=T.timeStamp-h;L<50&&(x.altGr=!0)}}}if(S in g.MODIFIER_KEYS&&(S=-1),!(!C&&S===13&&T.location===3&&(I(T,C,-S),T.defaultPrevented))){if(y.isChromeOS&&C&8){if(I(T,C,S),T.defaultPrevented)return;C&=-9}return!C&&!(S in g.FUNCTION_KEYS)&&!(S in g.PRINTABLE_KEYS)?!1:I(T,C,S)}}r.addCommandKeyListener=function(I,T,S){var C=null;l(I,"keydown",function(R){x[R.keyCode]=(x[R.keyCode]||0)+1;var L=d(T,R,R.keyCode);return C=R.defaultPrevented,L},S),l(I,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},S),l(I,"keyup",function(R){x[R.keyCode]=null},S),x||(w(),l(window,"focus",w))};function w(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!y.isOldIE){var b=1;r.nextTick=function(I,T){T=T||window;var S="zero-timeout-message-"+b++,C=function(R){R.data==S&&(r.stopPropagation(R),o(T,"message",C),I())};l(T,"message",C),T.postMessage(S,"*")}}r.$idleBlocked=!1,r.onIdle=function(I,T){return setTimeout(function S(){r.$idleBlocked?setTimeout(S,100):I()},T)},r.$idleBlockId=null,r.blockIdle=function(I){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},I||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(I){setTimeout(I,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(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,l=x.isChrome>63,o=400,c=e("../lib/keys"),d=c.KEY_MODS,w=x.isIOS,b=w?/\s/:/\n/,I=x.isMobile,T;T=function(S,C){var R=h.createElement("textarea");R.className="ace_text-input",R.setAttribute("wrap","off"),R.setAttribute("autocorrect","off"),R.setAttribute("autocapitalize","off"),R.setAttribute("spellcheck","false"),R.style.opacity="0",S.insertBefore(R,S.firstChild);var L=!1,F=!1,E=!1,H=!1,P="";I||(R.style.fontSize="1px");var O=!1,_=!1,A="",N=0,B=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===R}catch{}this.setNumberOfExtraLines=function(ke){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,ke<0){te=0;return}te=ke},this.setAriaLabel=function(){var ke="";if(C.$textInputAriaLabel&&(ke+="".concat(C.$textInputAriaLabel,", ")),C.session){var ze=C.session.selection.cursor.row;ke+=y("text-input.aria-label","Cursor at row $0",[ze+1])}R.setAttribute("aria-label",ke)},this.setAriaOptions=function(ke){ke.activeDescendant?(R.setAttribute("aria-haspopup","true"),R.setAttribute("aria-autocomplete",ke.inline?"both":"list"),R.setAttribute("aria-activedescendant",ke.activeDescendant)):(R.setAttribute("aria-haspopup","false"),R.setAttribute("aria-autocomplete","both"),R.removeAttribute("aria-activedescendant")),ke.role&&R.setAttribute("role",ke.role),ke.setLabel&&(R.setAttribute("aria-roledescription",y("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),g.addListener(R,"blur",function(ke){_||(C.onBlur(ke),he=!1)},C),g.addListener(R,"focus",function(ke){if(!_){if(he=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(ke),x.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||l||this.$focusScroll=="browser")return R.focus({preventScroll:!0});var ke=R.style.top;R.style.position="fixed",R.style.top="0px";try{var ze=R.getBoundingClientRect().top!=0}catch{return}var Ye=[];if(ze)for(var pt=R.parentElement;pt&&pt.nodeType==1;)Ye.push(pt),pt.setAttribute("ace_nocontext","true"),!pt.parentElement&&pt.getRootNode?pt=pt.getRootNode().host:pt=pt.parentElement;R.focus({preventScroll:!0}),ze&&Ye.forEach(function(kt){kt.removeAttribute("ace_nocontext")}),setTimeout(function(){R.style.position="",R.style.top=="0px"&&(R.style.top=ke)},0)},this.blur=function(){R.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var ke=C.curOp,ze=ke&&ke.command&&ke.command.name;if(ze!="insertstring"){var Ye=ze&&(ke.docChanged||ke.selectionChanged);E&&Ye&&(A=R.value="",Yt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(ke,ze){for(var Ye=ze,pt=1;pt<=ke-K&&pt<2*te+1;pt++)Ye+=C.session.getLine(ke-pt).length+1;return Ye},ae=w?function(ke){if(!(!he||L&&!ke||H)){ke||(ke="");var ze=`
|
167
|
+
ab`+ke+`cde fg
|
168
|
+
`;ze!=R.value&&(R.value=A=ze);var Ye=4,pt=4+(ke.length||(C.selection.isEmpty()?0:1));(N!=Ye||B!=pt)&&R.setSelectionRange(Ye,pt),N=Ye,B=pt}}:function(){if(!(E||H)&&!(!he&&!$e)){E=!0;var ke=0,ze=0,Ye="";if(C.session){var pt=C.selection,kt=pt.getRange(),Ct=pt.cursor.row;Ct===Z+1?(K=Z+1,Z=K+2*te):Ct===K-1?(Z=K-1,K=Z-2*te):(Ct<K-1||Ct>Z+1)&&(K=Ct>te?Ct-te:0,Z=Ct>te?Ct+te:2*te);for(var Ot=[],Rt=K;Rt<=Z;Rt++)Ot.push(C.session.getLine(Rt));if(Ye=Ot.join(`
|
169
|
+
`),ke=ne(kt.start.row,kt.start.column),ze=ne(kt.end.row,kt.end.column),kt.start.row<K){var ut=C.session.getLine(K-1);ke=kt.start.row<K-1?0:ke,ze+=ut.length+1,Ye=ut+`
|
170
|
+
`+Ye}else if(kt.end.row>Z){var wt=C.session.getLine(Z+1);ze=kt.end.row>Z+1?wt.length:kt.end.column,ze+=Ye.length+1,Ye=Ye+`
|
171
|
+
`+wt}else I&&Ct>0&&(Ye=`
|
172
|
+
`+Ye,ze+=1,ke+=1);Ye.length>o&&(ke<o&&ze<o?Ye=Ye.slice(0,o):(Ye=`
|
173
|
+
`,ke==ze?ke=ze=0:(ke=0,ze=1)));var xn=Ye+`
|
174
|
+
|
175
|
+
`;xn!=A&&(R.value=A=xn,N=B=xn.length)}if($e&&(N=R.selectionStart,B=R.selectionEnd),B!=ze||N!=ke||R.selectionEnd!=B)try{R.setSelectionRange(ke,ze),N=ke,B=ze}catch{}E=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=A.length&&ke.value===A&&A&&ke.selectionEnd!==B},ce=function(ke){E||(L?L=!1:ue(R)?(C.selectAll(),ae()):I&&R.selectionStart!=N&&ae())},fe=null;this.setInputHandler=function(ke){fe=ke},this.getInputHandler=function(){return fe};var $e=!1,Te=function(ke,ze){if($e&&($e=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Ye=R.selectionStart,pt=R.selectionEnd,kt=N,Ct=A.length-B,Ot=ke,Rt=ke.length-Ye,ut=ke.length-pt,wt=0;kt>0&&A[wt]==ke[wt];)wt++,kt--;for(Ot=Ot.slice(wt),wt=1;Ct>0&&A.length-wt>N-1&&A[A.length-wt]==ke[ke.length-wt];)wt++,Ct--;Rt-=wt-1,ut-=wt-1;var xn=Ot.length-wt+1;if(xn<0&&(kt=-xn,xn=0),Ot=Ot.slice(0,xn),!ze&&!Ot&&!Rt&&!kt&&!Ct&&!ut)return"";H=!0;var xr=!1;return x.isAndroid&&Ot==". "&&(Ot=" ",xr=!0),Ot&&!kt&&!Ct&&!Rt&&!ut||O?C.onTextInput(Ot):C.onTextInput(Ot,{extendLeft:kt,extendRight:Ct,restoreStart:Rt,restoreEnd:ut}),H=!1,A=ke,N=Ye,B=pt,U=ut,xr?`
|
176
|
+
`:Ot},Ee=function(ke){if(E)return pn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var ze=R.value,Ye=Te(ze,!0);(ze.length>o+100||b.test(Ye)||I&&N<1&&N==B)&&ae()},Ge=function(ke,ze,Ye){var pt=ke.clipboardData||window.clipboardData;if(!(!pt||a)){var kt=u||Ye?"Text":"text/plain";try{return ze?pt.setData(kt,ze)!==!1:pt.getData(kt)}catch(Ct){if(!Ye)return Ge(Ct,ze,!0)}}},qe=function(ke,ze){var Ye=C.getCopyText();if(!Ye)return g.preventDefault(ke);Ge(ke,Ye)?(w&&(ae(Ye),L=Ye,setTimeout(function(){L=!1},10)),ze?C.onCut():C.onCopy(),g.preventDefault(ke)):(L=!0,R.value=Ye,R.select(),setTimeout(function(){L=!1,ae(),ze?C.onCut():C.onCopy()}))},ht=function(ke){qe(ke,!0)},tt=function(ke){qe(ke,!1)},dt=function(ke){var ze=Ge(ke);s.pasteCancelled()||(typeof ze=="string"?(ze&&C.onPaste(ze,ke),x.isIE&&setTimeout(ae),g.preventDefault(ke)):(R.value="",F=!0))};g.addCommandKeyListener(R,function(ke,ze,Ye){if(!E)return C.onCommandKey(ke,ze,Ye)},C),g.addListener(R,"select",ce,C),g.addListener(R,"input",Ee,C),g.addListener(R,"cut",ht,C),g.addListener(R,"copy",tt,C),g.addListener(R,"paste",dt,C),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&g.addListener(S,"keydown",function(ke){if(!(x.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:tt(ke);break;case 86:dt(ke);break;case 88:ht(ke);break}},C);var tn=function(ke){if(!(E||!C.onCompositionStart||C.$readOnly)&&(E={},!O)){ke.data&&(E.useTextareaForIME=!1),setTimeout(pn,0),C._signal("compositionStart"),C.on("mousedown",pr);var ze=C.getSelectionRange();ze.end.row=ze.start.row,ze.end.column=ze.start.column,E.markerRange=ze,E.selectionStart=N,C.onCompositionStart(E),E.useTextareaForIME?(A=R.value="",N=0,B=0):(R.msGetInputContext&&(E.context=R.msGetInputContext()),R.getInputContext&&(E.context=R.getInputContext()))}},pn=function(){if(!(!E||!C.onCompositionUpdate||C.$readOnly)){if(O)return pr();if(E.useTextareaForIME)C.onCompositionUpdate(R.value);else{var ke=R.value;Te(ke),E.markerRange&&(E.context&&(E.markerRange.start.column=E.selectionStart=E.context.compositionStartOffset),E.markerRange.end.column=E.markerRange.start.column+B-E.selectionStart+U)}}},Yt=function(ke){!C.onCompositionEnd||C.$readOnly||(E=!1,C.onCompositionEnd(),C.off("mousedown",pr),ke&&Ee())};function pr(){_=!0,R.blur(),R.focus(),_=!1}var gn=p.delayedCall(pn,50).schedule.bind(null,null);function En(ke){ke.keyCode==27&&R.value.length<R.selectionStart&&(E||(A=R.value),N=B=-1,ae()),gn()}g.addListener(R,"compositionstart",tn,C),g.addListener(R,"compositionupdate",pn,C),g.addListener(R,"keyup",En,C),g.addListener(R,"keydown",gn,C),g.addListener(R,"compositionend",Yt,C),this.getElement=function(){return R},this.setCommandMode=function(ke){O=ke,R.readOnly=!1},this.setReadOnly=function(ke){O||(R.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){$e=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,ze){P||(P=R.style.cssText),R.style.cssText=(ze?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+B)*C.renderer.characterWidth*.5+"px;";var Ye=C.container.getBoundingClientRect(),pt=h.computedStyle(C.container),kt=Ye.top+(parseInt(pt.borderTopWidth)||0),Ct=Ye.left+(parseInt(pt.borderLeftWidth)||0),Ot=Ye.bottom-kt-R.clientHeight-2,Rt=function(ut){h.translate(R,ut.clientX-Ct-2,Math.min(ut.clientY-kt-2,Ot))};Rt(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(In),x.isWin&&g.capture(C.container,Rt,Xn))},this.onContextMenuClose=Xn;var In;function Xn(){clearTimeout(In),In=setTimeout(function(){P&&(R.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var yt=function(ke){C.textInput.onContextMenu(ke),Xn()};g.addListener(R,"mouseup",yt,C),g.addListener(R,"mousedown",function(ke){ke.preventDefault(),Xn()},C),g.addListener(C.renderer.scroller,"contextmenu",yt,C),g.addListener(R,"contextmenu",yt,C),w&&He(S,C,R);function He(ke,ze,Ye){var pt=null,kt=!1;Ye.addEventListener("keydown",function(Ot){pt&&clearTimeout(pt),kt=!0},!0),Ye.addEventListener("keyup",function(Ot){pt=setTimeout(function(){kt=!1},100)},!0);var Ct=function(Ot){if(document.activeElement===Ye&&!(kt||E||ze.$mouseHandler.isMousePressed)&&!L){var Rt=Ye.selectionStart,ut=Ye.selectionEnd,wt=null,xn=0;if(Rt==0?wt=c.up:Rt==1?wt=c.home:ut>B&&A[ut]==`
|
177
|
+
`?wt=c.end:Rt<N&&A[Rt-1]==" "?(wt=c.left,xn=d.option):Rt<N||Rt==N&&B!=N&&Rt==ut?wt=c.left:ut>B&&A.slice(0,ut).split(`
|
178
|
+
`).length>2?wt=c.down:ut>B&&A[ut-1]==" "?(wt=c.right,xn=d.option):(ut>B||ut==B&&B!=N&&Rt==ut)&&(wt=c.right),Rt!==ut&&(xn|=d.shift),wt){var xr=ze.onCommandKey({},xn,wt);if(!xr&&ze.commands){wt=c.keyCodeToString(wt);var Hr=ze.commands.findKeyCommand(xn,wt);Hr&&ze.execCommand(Hr)}N=Rt,B=ut,ae("")}}};document.addEventListener("selectionchange",Ct),ze.on("destroy",function(){document.removeEventListener("selectionchange",Ct)})}this.destroy=function(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=T,r.$setUserAgentForTests=function(S,C){I=S,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 l=u.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var l=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,d=u.getButton();if(d!==0){var w=c.getSelectionRange(),b=w.isEmpty();(b||d==1)&&c.selection.moveToPosition(o),d==2&&(c.textInput.onContextMenu(u.domEvent),g.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,l){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):l||o.selection.moveToPosition(u),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(o);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var d=s(this.$clickSelection,o);o=d.cursor,u=d.anchor}l.selection.setSelectionAnchor(u.row,u.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var l,o=this.editor,c=o.renderer.screenToTextCoordinates(this.x,this.y),d=o.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),b=this.$clickSelection.comparePoint(d.end);if(w==-1&&b<=0)l=this.$clickSelection.end,(d.end.row!=c.row||d.end.column!=c.column)&&(c=d.start);else if(b==1&&w>=0)l=this.$clickSelection.start,(d.start.row!=c.row||d.start.column!=c.column)&&(c=d.end);else if(w==-1&&b==1)c=d.end,l=d.start;else{var I=s(this.$clickSelection,c);c=I.cursor,l=I.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(c),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(u>y||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var l=u.getDocumentPosition(),o=this.editor,c=o.session,d=c.getBracketRange(l);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},a.prototype.onTripleClick=function(u){var l=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var c=o.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(c.start.row),this.$clickSelection.end=o.selection.getLineRange(c.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(u){var l=this.editor;l.selectAll(),this.$clickSelection=l.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 l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,c=u.domEvent.timeStamp,d=c-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 I=Math.abs(w/b),T=!1;if(I>=1&&l.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(T=!0),I<=1&&l.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(T=!0),T)o.allowed=c;else if(c-o.allowed<x){var S=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);S?(T=!0,o.allowed=c):o.allowed=0}if(o.t=c,o.vx=w,o.vy=b,T)return l.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,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-u,2))}function s(a,u){if(a.start.row==a.end.row)var l=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 l=u.column-4;else var l=2*u.row-a.start.row-a.end.row;return l<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 c=function(d,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,I){b.__proto__=I}||function(b,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(b[T]=I[T])},c(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");c(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(c){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&c[d],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};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 c(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return c.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},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(d){this.getElement().textContent=d},c.prototype.setHtml=function(d){this.getElement().innerHTML=d},c.prototype.setPosition=function(d,w){this.getElement().style.left=d+"px",this.getElement().style.top=w+"px"},c.prototype.setClassName=function(d){x.addCssClass(this.getElement(),d)},c.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},c.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)},c.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),u=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},c.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var d,w,b,I;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var S=y(this.popups),C=S.next();!C.done;C=S.next()){var R=C.value,L=!0;try{for(var F=(b=void 0,y(T)),E=F.next();!E.done;E=F.next()){var H=E.value;if(this.doPopupsOverlap(H,R)){L=!1;break}}}catch(P){b={error:P}}finally{try{E&&!E.done&&(I=F.return)&&I.call(F)}finally{if(b)throw b.error}}L?T.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=S.return)&&w.call(S)}finally{if(d)throw d.error}}},c.prototype.doPopupsOverlap=function(d,w){var b=d.getElement().getBoundingClientRect(),I=w.getElement().getBoundingClientRect();return b.left<I.right&&b.right>I.left&&b.top<I.bottom&&b.bottom>I.top},c}(),l=new u;r.popupManager=l,r.Tooltip=a;var o=function(c){g(d,c);function d(w){w===void 0&&(w=document.body);var b=c.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 I=b.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",b.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(b)),I.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 I=b.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(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,I=w.getDocumentPosition(),T=b.session.getLine(I.row);if(I.column==T.length){var S=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(I.row,I.column);if(C.column!=S.column||C.row!=S.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,b,I,T){var S=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.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),L=C.scroller.getBoundingClientRect();R.pageX<L.left&&(R.pageX=L.left);var F=this.getElement();F.innerHTML="",F.appendChild(I),F.style.maxHeight="",F.style.display="block";var E=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-E<0&&R.pageY<P&&(O=!1),F.style.maxHeight=(O?R.pageY:P)-S+"px",F.style.top=O?"":R.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.pageX,window.innerWidth-H-S)+"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,l.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 c=function(d,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,I){b.__proto__=I}||function(b,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(b[T]=I[T])},c(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");c(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(c){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&c[d],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};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 l(c){var d=c.editor,w=d.renderer.$gutterLayer,b=new o(d,!0);c.editor.setDefaultHandler("guttermousedown",function(L){if(!(!d.isFocused()||L.getButton()!=0)){var F=w.getRegion(L);if(F!="foldWidgets"){var E=L.getDocumentPosition().row,H=d.session.selection;if(L.getShiftKey())H.selectTo(E,0);else{if(L.domEvent.detail==2)return d.selectAll(),L.preventDefault();c.$clickSelection=d.selection.getLineRange(E)}return c.setState("selectByLines"),c.captureMouse(L),L.preventDefault()}}});var I,T;function S(){var L=T.getDocumentPosition().row,F=d.session.getLength();if(L==F){var E=d.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(E>d.session.documentToScreenRow(H.row,H.column))return C()}if(b.showTooltip(L),!!b.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),c.$tooltipFollowsMouse)R(T);else{var P=T.getGutterRow(),O=w.$lines.get(P);if(O){var _=O.element.querySelector(".ace_gutter_annotation"),A=_.getBoundingClientRect(),N=b.getElement().style;N.left=A.right-a+"px",N.top=A.bottom-u+"px"}else R(T)}}function C(L){L&&L.type==="keydown"&&(L.ctrlKey||L.metaKey)||L&&L.type==="mouseout"&&(!L.relatedTarget||b.getElement().contains(L.relatedTarget))||(I&&(I=clearTimeout(I)),b.isOpen&&(b.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(L){b.setPosition(L.x,L.y)}c.editor.setDefaultHandler("guttermousemove",function(L){var F=L.domEvent.target||L.domEvent.srcElement;if(x.hasCssClass(F,"ace_fold-widget")||x.hasCssClass(F,"ace_custom-widget"))return C();b.isOpen&&c.$tooltipFollowsMouse&&R(L),T=L,!I&&(I=setTimeout(function(){I=null,T&&!c.isMousePressed&&S()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(L){T=null,b.isOpen&&(I=setTimeout(function(){I=null,C(L)},50))},d)}r.GutterHandler=l;var o=function(c){g(d,c);function d(w,b){b===void 0&&(b=!1);var I=c.call(this,w.container)||this;I.editor=w,I.visibleTooltipRow;var T=I.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",b&&(I.onMouseOut=I.onMouseOut.bind(I),T.addEventListener("mouseout",I.onMouseOut)),I}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 I=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+S>I&&(w-=w+S-I),b+C>T&&(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,I=this.editor.renderer.$gutterLayer,T=I.$annotations[w],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var C=I.session.getFoldLine(w);if(C&&I.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},F,E=w+1;E<=C.end.row;E++)if(I.$annotations[E])for(var H=0;H<I.$annotations[E].text.length;H++){var P=I.$annotations[E].type[H];R[P].push(I.$annotations[E].text[H]),(!F||L[P]<L[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(d.annotationsToSummaryString(R)," in folded code.");S.displayText.push(O),S.type.push(F+"_fold")}}if(S.displayText.length===0)return this.hideTooltip();for(var _={error:[],security:[],warning:[],info:[],hint:[]},A=I.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<S.displayText.length;E++){var N=x.createElement("span"),B=x.createElement("span");(b=B.classList).add.apply(b,["ace_".concat(S.type[E]),A]),B.setAttribute("aria-label","".concat(d.annotationLabels[S.type[E].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(x.createTextNode(" ")),N.appendChild(B),N.appendChild(x.createTextNode(S.displayText[E])),N.appendChild(x.createElement("br")),_[S.type[E].replace("_fold","")].push(N)}var U=this.getElement();x.removeChildren(U),_.error.forEach(function(K){return U.appendChild(K)}),_.security.forEach(function(K){return U.appendChild(K)}),_.warning.forEach(function(K){return U.appendChild(K)}),_.info.forEach(function(K){return U.appendChild(K)}),_.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},d.annotationsToSummaryString=function(w){var b,I,T=[],S=["error","security","warning","info","hint"];try{for(var C=y(S),R=C.next();!R.done;R=C.next()){var L=R.value;if(w[L].length){var F=w[L].length===1?d.annotationLabels[L].singular:d.annotationLabels[L].plural;T.push("".concat(w[L].length," ").concat(F))}}}catch(E){b={error:E}}finally{try{R&&!R.done&&(I=C.return)&&I.call(C)}finally{if(b)throw b.error}}return T.join(", ")},d}(p);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(l){var o=l.editor,c=g.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,b,I,T,S,C,R,L=0,F,E,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(c),ue.setDragImage&&ue.setDragImage(c,0,0),setTimeout(function(){o.container.removeChild(c)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,E=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="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 I=ne.clientX,T=ne.clientY,b||B(),L++,ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,b||(B(),L++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(L--,L<=0&&b)return U(),F=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(E)switch(F){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=ae.getData("Text");C={start:R,end:o.session.insert(R,ue)},o.focus(),F=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(l),o),y.addListener(w,"dragend",this.onDragEnd.bind(l),o),y.addListener(w,"dragenter",this.onDragEnter.bind(l),o),y.addListener(w,"dragover",this.onDragOver.bind(l),o),y.addListener(w,"dragleave",this.onDragLeave.bind(l),o),y.addListener(w,"drop",this.onDrop.bind(l),o);function _(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,fe=!ae||ne.column!=ae.column;if(!P||ce||fe)o.moveCursorToPosition(ne),P=ue,O={x:I,y:T};else{var $e=u(O.x,O.y,I,T);$e>s?P=null:ue-P>=p&&(o.renderer.scrollCursorIntoView(),P=null)}}function A(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,$e=o.renderer.scroller.getBoundingClientRect(),Te={x:{left:I-$e.left,right:$e.right-I},y:{top:T-$e.top,bottom:$e.bottom-T}},Ee=Math.min(Te.x.left,Te.x.right),Ge=Math.min(Te.y.top,Te.y.bottom),qe={row:ne.row,column:ne.column};Ee/fe<=2&&(qe.column+=Te.x.left<Te.x.right?-3:2),Ge/ce<=1&&(qe.row+=Te.y.top<Te.y.bottom?-1:1);var ht=ne.row!=qe.row,tt=ne.column!=qe.column,dt=!ae||ne.row!=ae.row;ht||tt&&!dt?H?ue-H>=h&&o.renderer.scrollCursorIntoView(qe):H=ue:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(I,T),_(R,ne),A(R,ne)}function B(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),N(),S=setInterval(N,20),L=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(S),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!E&&o.$resetCursorStyle(),C=null,R=null,L=0,H=null,P=null,y.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&b&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["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&&ae.indexOf(fe)>=0?$e="copy":ue.indexOf(fe)>=0?$e="move":ae.indexOf(fe)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=x.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&o.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,c=l.inSelection(),d=l.getButton(),w=l.domEvent.detail||1;if(w===1&&d===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var I=o.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function u(l,o,c,d){return Math.sqrt(Math.pow(c-l,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,l,o,c,d,w=0,b,I=0,T=0,S=0,C,R;function L(){var _=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=p.getCopyText(),Z=p.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(A?["span",!K&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},B=function(K){return p.commands.canExecute(K,p)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();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",A=!1,Z!="openCommandPalette"&&p.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),p.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function F(){if(!p.getOption("enableMobileMenu")){R&&E();return}R||L();var _=p.selection.cursor,A=p.renderer.textToScreenCoordinates(_.row,_.column),N=p.renderer.textToScreenCoordinates(0,0).pageX,B=p.renderer.scrollLeft,U=p.container.getBoundingClientRect();R.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+B-U.left+"px"),R.style.display="",R.firstChild.style.display="none",p.on("input",E)}function E(_){R&&(R.style.display="none"),p.off("input",E)}function H(){c=null,clearTimeout(c);var _=p.selection.getRange(),A=_.contains(b.row,b.column);(_.isEmpty()||!A)&&(p.selection.moveToPosition(b),p.selection.selectWord()),s="wait",F()}function P(){c=null,clearTimeout(c),p.selection.moveToPosition(b);var _=I>=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 A=p.textInput.getElement();A.focus()}},p),y.addListener(h,"touchstart",function(_){var A=_.touches;if(c||A.length>1){clearTimeout(c),c=null,l=-1,s="zoom";return}C=p.$mouseHandler.isMousePressed=!0;var N=p.renderer.layerConfig.lineHeight,B=p.renderer.layerConfig.lineHeight,U=_.timeStamp;o=U;var K=A[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(u-te)>N&&(l=-1),a=_.clientX=Z,u=_.clientY=te,T=S=0;var he=new g(_,p);if(b=he.getDocumentPosition(),U-l<500&&A.length==1&&!w)I++,_.preventDefault(),_.button=0,P();else{I=0;var ne=p.selection.cursor,ae=p.selection.isEmpty()?ne:p.selection.anchor,ue=p.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=p.renderer.$cursorLayer.getPixelPosition(ae,!0),fe=p.renderer.scroller.getBoundingClientRect(),$e=p.renderer.layerConfig.offset,Te=p.renderer.scrollLeft,Ee=function(ht,tt){return ht=ht/B,tt=tt/N-.75,ht*ht+tt*tt};if(_.clientX<fe.left){s="zoom";return}var Ge=Ee(_.clientX-fe.left-ue.left+Te,_.clientY-fe.top-ue.top+$e),qe=Ee(_.clientX-fe.left-ce.left+Te,_.clientY-fe.top-ce.top+$e);Ge<3.5&&qe<3.5&&(s=Ge>qe?"cursor":"anchor"),qe<3.5?s="anchor":Ge<3.5?s="cursor":s="scroll",c=setTimeout(H,450)}l=U},p),y.addListener(h,"touchend",function(_){C=p.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):c?(p.selection.moveToPosition(b),w=0,F()):s=="scroll"?(O(),E()):F(),clearTimeout(c),c=null},p),y.addListener(h,"touchmove",function(_){c&&(clearTimeout(c),c=null);var A=_.touches;if(!(A.length>1||s=="zoom")){var N=A[0],B=a-N.clientX,U=u-N.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return _.preventDefault();a=N.clientX,u=N.clientY,_.clientX=N.clientX,_.clientY=N.clientY;var K=_.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new g(_,p);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&(T=B/Z,S=U/Z),p._emit("mousewheel",te),te.propagationStopped||(T=S=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 O(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs(T)<.01&&(T=0),Math.abs(S)<.01&&(S=0),w<20&&(T=.9*T),w<20&&(S=.9*S);var _=p.session.getScrollTop();p.renderer.scrollBy(10*T,10*S),_==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"),l=function(){function o(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=c,new x(this),new h(this),new s(this);var w=function(T){var S=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());S&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},b=c.renderer.getMouseEventTarget();g.addListener(b,"click",this.onMouseEvent.bind(this,"click"),c),g.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),g.addMultiMouseDownListener([b,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),g.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var I=c.renderer.$gutter;g.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),g.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),c),g.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),g.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),g.addListener(b,"mousedown",w,c),g.addListener(I,"mousedown",w,c),y.isIE&&c.renderer.scrollBarV&&(g.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),g.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function(T){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var S=c.renderer.screenToTextCoordinates(T.x,T.y),C=c.session.selection.getRange(),R=c.renderer;!C.isEmpty()&&C.insideStart(S.row,S.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},c)}return o.prototype.onMouseEvent=function(c,d){this.editor.session&&this.editor._emit(c,new p(d,this.editor))},o.prototype.onMouseMove=function(c,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new p(d,this.editor))},o.prototype.onMouseWheel=function(c,d){var w=new p(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(c,w)},o.prototype.setState=function(c){this.state=c},o.prototype.captureMouse=function(c,d){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var I=this,T=function(F){if(F){if(y.isWebKit&&!F.which&&I.releaseMouse)return I.releaseMouse();I.x=F.clientX,I.y=F.clientY,d&&d(F),I.mouseEvent=new p(F,I.editor),I.$mouseMoved=!0}},S=function(F){w.off("beforeEndOperation",R),clearInterval(L),w.session&&C(),I[I.state+"End"]&&I[I.state+"End"](F),I.state="",I.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,F&&I.onMouseEvent("mouseup",F),w.endOperation()},C=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1};if(y.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){S(c)});var R=function(F){I.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=T,I.releaseMouse=g.capture(this.editor.container,T,S);var L=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var c=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),d&&d.domEvent&&g.stopEvent(d.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,u.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),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 l=p.domEvent&&p.domEvent.target;l&&g.hasCssClass(l,"ace_inline_button")&&g.hasCssClass(l,"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,l=u.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(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 l,o=!1,c=this.$editor.commands,d=this.$handlers.length;d--&&(l=this.$handlers[d].handleKeyboard(this.$data,p,s,a,u),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=c.exec(l.command,this.$editor,l.args,u),o&&u&&p!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&y.stopEvent(u),o))););return!o&&p==-1&&(l={command:"insertstring"},o=c.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),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,l=1,o=0,c=1,d=2,w=3,b=4,I=5,T=6,S=7,C=8,R=9,L=10,F=11,E=12,H=13,P=14,O=15,_=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,T,I,T,C,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,I,I,I,T,C,b,b,F,F,F,b,b,b,b,b,L,R,L,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,N,N,N,N,N,N,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,b,F,F,F,F,b,b,b,b,o,b,b,N,b,b,F,F,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,N,N,N,o,c,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,I,H,P,O,_,A,R,F,F,F,F,F,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 K(ne,ae,ue,ce){var fe=g?a:s,$e=null,Te=null,Ee=null,Ge=0,qe=null,ht=null,tt=-1,dt=null,tn=null,pn=[];if(!ce)for(dt=0,ce=[];dt<ue;dt++)ce[dt]=he(ne[dt]);for(y=g,x=!1,h=!1,p=!1,tn=0;tn<ue;tn++){if($e=Ge,pn[tn]=Te=te(ne,ce,pn,tn),Ge=fe[$e][Te],qe=Ge&240,Ge&=15,ae[tn]=Ee=fe[Ge][5],qe>0)if(qe==16){for(dt=tt;dt<tn;dt++)ae[dt]=1;tt=-1}else tt=-1;if(ht=fe[Ge][6],ht)tt==-1&&(tt=tn);else if(tt>-1){for(dt=tt;dt<tn;dt++)ae[dt]=Ee;tt=-1}ce[tn]==I&&(ae[tn]=0),y|=Ee}if(p){for(dt=0;dt<ue;dt++)if(ce[dt]==T){ae[dt]=g;for(var Yt=dt-1;Yt>=0&&ce[Yt]==C;Yt--)ae[Yt]=g}}}function Z(ne,ae,ue){if(!(y<ne)){if(ne==1&&g==l&&!h){ue.reverse();return}for(var ce=ue.length,fe=0,$e,Te,Ee,Ge;fe<ce;){if(ae[fe]>=ne){for($e=fe+1;$e<ce&&ae[$e]>=ne;)$e++;for(Te=fe,Ee=$e-1;Te<Ee;Te++,Ee--)Ge=ue[Te],ue[Te]=ue[Ee],ue[Ee]=Ge;fe=$e}fe++}}}function te(ne,ae,ue,ce){var fe=ae[ce],$e,Te,Ee,Ge;switch(fe){case o:case c:x=!1;case b:case w:return fe;case d:return x?w:d;case S:return x=!0,c;case C:return b;case R:return ce<1||ce+1>=ae.length||($e=ue[ce-1])!=d&&$e!=w||(Te=ae[ce+1])!=d&&Te!=w?b:(x&&(Te=w),Te==$e?Te:b);case L:return $e=ce>0?ue[ce-1]:I,$e==d&&ce+1<ae.length&&ae[ce+1]==d?d:b;case F:if(ce>0&&ue[ce-1]==d)return d;if(x)return b;for(Ge=ce+1,Ee=ae.length;Ge<Ee&&ae[Ge]==F;)Ge++;return Ge<Ee&&ae[Ge]==d?d:b;case E:for(Ee=ae.length,Ge=ce+1;Ge<Ee&&ae[Ge]==E;)Ge++;if(Ge<Ee){var qe=ne[ce],ht=qe>=1425&&qe<=2303||qe==64286;if($e=ae[Ge],ht&&($e==c||$e==S))return c}return ce<1||($e=ae[ce-1])==I?b:ue[ce-1];case I:return x=!1,h=!0,g;case T:return p=!0,b;case H:case P:case _:case A:case O:x=!1;case N:return b}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:B[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?c:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?E:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?d:S:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?S:b}r.L=o,r.R=c,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,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),fe=new Array(ce.length),$e=new Array(ce.length),Te=[];g=ue?l:u,K(ce,Te,ce.length,ae);for(var Ee=0;Ee<fe.length;fe[Ee]=Ee,Ee++);Z(2,Te,fe),Z(1,Te,fe);for(var Ee=0;Ee<fe.length-1;Ee++)ae[Ee]===w?Te[Ee]=r.AN:Te[Ee]===c&&(ae[Ee]>S&&ae[Ee]<H||ae[Ee]===b||ae[Ee]===N)?Te[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&(Te[Ee-1]=Te[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&(Te[ce.length-1]=r.B),ce[0]===""&&(Te[0]=r.RLE);for(var Ee=0;Ee<fe.length;Ee++)$e[Ee]=Te[fe[Ee]];return{logicalFromVisual:fe,bidiLevels:$e}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==c||ae[ce]==S||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.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,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===l);)l=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,l=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?l:g.DOT))}else this.line+=this.showInvisibles?l:g.DOT;var c=this.session,d=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,I){return b===" "||c.isFullWidth(b.charCodeAt(0))?(w=b===" "?c.getScreenTabSize(I+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(),l=s.selection.getSelectionAnchor().row;l<=u.row;l++)!a&&s.session.getLine(l).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(l,0,1):a&&s.session.getLine(l).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:l},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,l=g.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&s<=a&&o[l]%2!==0&&l++;for(var d=0;d<l;d++)c+=this.charWidths[o[d]];return!this.session.getOverwrite()&&s>a&&o[l]%2===0&&(c+=this.charWidths[o[l]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},p.prototype.getSelections=function(s,a){var u=this.bidiMap,l=u.bidiLevels,o,c=[],d=0,w=Math.min(s,a)-this.wrapIndent,b=Math.max(s,a)-this.wrapIndent,I=!1,T=!1,S=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<l.length;R++)C=u.logicalFromVisual[R],o=l[R],I=C>=w&&C<b,I&&!T?S=d:!I&&T&&c.push({left:S,width:d-S}),d+=this.charWidths[o],T=I;if(I&&R===l.length&&c.push({left:S,width:d-S}),this.isRtlDir)for(var L=0;L<c.length;L++)c[L].left+=this.rtlLineOffset;return c},p.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),l=0,o=0,c=this.bidiMap.bidiLevels,d=this.charWidths[c[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>l+d/2;){if(l+=d,o===c.length-1){d=0;break}d=this.charWidths[c[++o]]}return o>0&&c[o-1]%2!==0&&c[o]%2===0?(u<l&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&c[o-1]%2===0&&c[o]%2!==0?a=1+(u>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===c.length-1&&d===0&&c[o-1]%2===0||!this.isRtlDir&&o===0&&c[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&c[o-1]%2!==0&&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(l){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&l.old.column!=l.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 l=u?a.end:a.start,o=u?a.start:a.end;this.$setSelection(l.row,l.column,o.row,o.column)},s.prototype.$setSelection=function(a,u,l,o){if(!this.$silent){var c=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(l,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=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 l=a||this.lead;a=l.row,u=l.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 l=typeof a=="number"?a:this.lead.row,o,c=this.session.getFoldLine(l);return c?(l=c.start.row,o=c.end.row):o=l,u===!0?new h(l,0,o,this.session.getLine(o).length):new h(l,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,l){var o=a.column,c=a.column+u;return l<0&&(o=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,c).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):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 l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,l=this.session.documentToScreenRow(a,u),o=this.session.screenToDocumentPosition(l,0),c=this.session.getDisplayLine(a,null,o.row,o.column),d=c.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 l=this.session.getLine(u.row);if(u.column==l.length){var o=l.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,l=this.doc.getLine(a),o=l.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(u)),u>=l.length){this.moveCursorTo(a,l.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,l;if(l=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var o=this.session.getFoldStringAt(a,u,-1);o==null&&(o=this.doc.getLine(a).substring(0,u));var c=y.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,l,o=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(l=a[u])&&o.test(l);)u++;if(u<1){for(c.lastIndex=0;(l=a[u])&&!c.test(l);)if(c.lastIndex=0,u++,o.test(l))if(u>2){u--;break}else{for(;(l=a[u])&&o.test(l);)u++;if(u>2)break}}}return c.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),o=l.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==l.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,l;if(l=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(l.start.row,l.start.column);var o=this.session.getLine(a).substring(0,u);if(u===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var c=y.stringReverse(o),d=this.$shortWordEndIndex(c);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 l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var d=this.session.screenToDocumentPosition(l.row+a,l.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,l){var o=this.session.getFoldAt(a,u,1);o&&(a=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,l){var o=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(o.row,o.column,l)},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 l=this.getCursor();return h.fromPoints(u,l)}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 l=u.clone();return l.isBackwards=u.cursor==u.start,l});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 l=h.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(l.cursor=l.start),this.addRange(l,!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=[],l=0,o=this.matchMappings[s]={defaultToken:"text"},c="g",d=[],w=0;w<a.length;w++){var b=a[w];if(b.defaultToken&&(o.defaultToken=b.defaultToken),b.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),b.unicode&&c.indexOf("u")===-1&&(c+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var I=b.regex,T=new RegExp("(?:("+I+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||T==1?b.token=b.token[0]:T-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:T-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&(T>1?b.onMatch=this.$applyToken:b.onMatch=b.token),T>1&&(/\\\d/.test(b.regex)?I=b.regex.replace(/\\([0-9]+)/g,function(S,C){return"\\"+(parseInt(C,10)+l+1)}):(T=1,I=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&d.push(b)),o[l]=w,l+=T,u.push(I),b.onMatch||(b.onMatch=null)}}u.length||(o[0]=0,u.push("$")),d.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,c)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",c)}}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=[],l=0,o=a.length;l<o;l++)s[l]&&(u[u.length]={type:a[l],value:s[l]});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,l=0,o=u.length;l<o;l++)s[l+1]&&(a[a.length]={type:u[l],value:s[l+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,l={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,c,d,w,b,I){return u?u=b!="]":b?u=!0:w?(a==l.stack&&(l.end=I+1,l.stack=-1),a--):d&&(a++,d.length!=1&&(l.stack=a,l.start=I)),o}),l.end!=null&&/^\)*$/.test(p.substr(l.end))&&(p=p.substring(0,l.start)+p.substr(l.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",l=this.states[u];l||(u="start",l=this.states[u]);var o=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var d,w=[],b=0,I=0,T={type:null,value:""};d=c.exec(p);){var S=o.defaultToken,C=null,R=d[0],L=c.lastIndex;if(L-R.length>b){var F=p.substring(b,L-R.length);T.type==S?T.value+=F:(T.type&&w.push(T),T={type:S,value:F})}for(var E=0;E<d.length-2;E++)if(d[E+1]!==void 0){C=l[o[E]],C.onMatch?S=C.onMatch(R,u,a,p):S=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),l=this.states[u],l||(this.reportError("state doesn't exist",u),u="start",l=this.states[u]),o=this.matchMappings[u],b=L,c=this.regExps[u],c.lastIndex=L),C.consumeLineEnd&&(b=L);break}if(R){if(typeof S=="string")(!C||C.merge!==!1)&&T.type===S?T.value+=R:(T.type&&w.push(T),T={type:S,value:R});else if(S){T.type&&w.push(T),T={type:null,value:""};for(var E=0;E<S.length;E++)w.push(S[E])}}if(b==p.length)break;if(b=L,I++>y){for(I>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:p});b<p.length;)T.type&&w.push(T),T={value:p.substring(b,b+=500),type:"overflow"};u="start",a=[];break}}return T.type&&w.push(T),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],l=0;l<u.length;l++){var o=u[l];(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,l){var o=typeof p=="function"?new p().getRules():p;if(u)for(var c=0;c<u.length;c++)u[c]=s+u[c];else{u=[];for(var d in o)u.push(s+d)}if(this.addRules(o,s),a)for(var w=Array.prototype[l?"push":"unshift"],c=0;c<u.length;c++)w.apply(this.$rules[u[c]],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 l=s[u];l.processed=!0;for(var o=0;o<l.length;o++){var c=l[o],d=null;Array.isArray(c)&&(d=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var b=c.stateName;b||(b=c.token,typeof b!="string"&&(b=b[0]||""),s[b]&&(b+=p++)),s[b]=w,c.next=b,a(b)}else w=="pop"&&(c.next=h);if(c.push&&(c.nextState=c.next||c.push,c.next=x,delete c.push),c.rules)for(var I in c.rules)s[I]?s[I].push&&s[I].push.apply(s[I],c.rules[I]):s[I]=c.rules[I];var T=typeof c=="string"?c:c.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?d=T.map(function(C){return s[C]}):d=s[T]),d){var S=[o,1].concat(d);c.noEscape&&(S=S.filter(function(C){return!C.next})),l.splice.apply(l,S),o--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(p,s,a,u){var l=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(o){for(var c=p[o],d=c.split(u||"|"),w=d.length;w--;){var b=d[w];this.$keywordList.push(b),a&&(b=b.toLowerCase()),l[b]=o}},this),p=null,a?function(o){return l[o.toLowerCase()]||s}:function(o){return l[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={},l={'"':'"',"'":"'"},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:""}},c=function(w,b,I,T){var S=w.end.row-w.start.row;return{text:I+b+T,selection:[0,w.start.column+1,S,w.end.column+(S?0:1)]}},d;d=function(w){w=w||{},this.add("braces","insertion",function(b,I,T,S,C){var R=T.getCursorPosition(),L=S.doc.getLine(R.row);if(C=="{"){o(T);var F=T.getSelectionRange(),E=S.doc.getTextRange(F),H=S.getTokenAt(R.row,R.column);if(E!==""&&E!=="{"&&T.getWrapBehavioursEnabled())return c(F,E,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[R.column-H.start-1]!=="$"?void 0:(d.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion(T,S))return/[\]\}\)]/.test(L[R.column])||T.inMultiSelectMode||w.braces?(d.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(T,S,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var O=L.substring(R.column,R.column+1);if(O=="}"){var _=S.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(_!==null&&d.isAutoInsertedClosing(R,L,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){o(T);var A="";d.isMaybeInsertedClosing(R,L)&&(A=h.stringRepeat("}",a.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var O=L.substring(R.column,R.column+1);if(O==="}"){var N=S.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!N)return null;var B=this.$getIndent(S.getLine(N.row))}else if(A)var B=this.$getIndent(L);else{d.clearMaybeInsertedClosing();return}var U=B+S.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else d.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,I,T,S,C){var R=S.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){o(T);var L=S.doc.getLine(C.start.row),F=L.substring(C.end.column,C.end.column+1);if(F=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,I,T,S,C){if(C=="("){o(T);var R=T.getSelectionRange(),L=S.doc.getTextRange(R);if(L!==""&&T.getWrapBehavioursEnabled())return c(R,L,"(",")");if(d.isSaneInsertion(T,S))return d.recordAutoInsert(T,S,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(T);var F=T.getCursorPosition(),E=S.doc.getLine(F.row),H=E.substring(F.column,F.column+1);if(H==")"){var P=S.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&d.isAutoInsertedClosing(F,E,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,I,T,S,C){var R=S.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){o(T);var L=S.doc.getLine(C.start.row),F=L.substring(C.start.column+1,C.start.column+2);if(F==")")return C.end.column++,C}}),this.add("brackets","insertion",function(b,I,T,S,C){if(C=="["){o(T);var R=T.getSelectionRange(),L=S.doc.getTextRange(R);if(L!==""&&T.getWrapBehavioursEnabled())return c(R,L,"[","]");if(d.isSaneInsertion(T,S))return d.recordAutoInsert(T,S,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(T);var F=T.getCursorPosition(),E=S.doc.getLine(F.row),H=E.substring(F.column,F.column+1);if(H=="]"){var P=S.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&d.isAutoInsertedClosing(F,E,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,I,T,S,C){var R=S.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){o(T);var L=S.doc.getLine(C.start.row),F=L.substring(C.start.column+1,C.start.column+2);if(F=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(b,I,T,S,C){var R=S.$mode.$quotes||l;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(T);var L=C,F=T.getSelectionRange(),E=S.doc.getTextRange(F);if(E!==""&&(E.length!=1||!R[E])&&T.getWrapBehavioursEnabled())return c(F,E,L,L);if(!E){var H=T.getCursorPosition(),P=S.doc.getLine(H.row),O=P.substring(H.column-1,H.column),_=P.substring(H.column,H.column+1),A=S.getTokenAt(H.row,H.column),N=S.getTokenAt(H.row,H.column+1);if(O=="\\"&&A&&/escape/.test(A.type))return null;var B=A&&/string|escape/.test(A.type),U=!N||/string|escape/.test(N.type),K;if(_==L)K=B!==U,K&&/string\.end/.test(N.type)&&(K=!1);else{if(B&&!U||B&&U)return null;var Z=S.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(O);Z.lastIndex=0;var he=Z.test(_),ne=S.$mode.$pairQuotesAfter,ae=ne&&ne[L]&&ne[L].test(O);if(!ae&&te||he||_&&!/[\s;,.})\]\\]/.test(_))return null;var ue=P[H.column-2];if(O==L&&(ue==L||Z.test(ue)))return null;K=!0}return{text:K?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,I,T,S,C){var R=S.$mode.$quotes||l,L=S.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(L)){o(T);var F=S.doc.getLine(C.start.row),E=F.substring(C.start.column+1,C.start.column+2);if(E==L)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,I,T,S,C){if(b==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&T.selection.isEmpty()){var R=T.getCursorPosition();if(R.column===0)return;for(var L=S.doc.getLine(R.row),F=S.doc.getLine(R.row+1),E=S.getTokens(R.row),H=0,P=0;P<E.length;P++){H+=E[P].value.length;var O=E[P];if(H>=R.column){if(H===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var _=E[P+1];if(!_||!/\.doc/.test(_.type))return}}var A=R.column-(H-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&A>B&&A<B+3||N!==-1&&B!==-1&&A>=N&&A<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(L);if(/\s*\*/.test(F))return/^\s*\*/.test(L)?{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(L.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 I=w.getCursorPosition(),T=new x(b,I.row,I.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",p)){if(/[)}\]]/.test(w.session.getLine(I.row)[I.column]))return!0;var S=new x(b,I.row,I.column+1);if(!this.$matchTokenType(S.getCurrentToken()||"text",p))return!1}return T.stepForward(),T.getCurrentTokenRow()!==I.row||this.$matchTokenType(T.getCurrentToken()||"text",s)},d.$matchTokenType=function(w,b){return b.indexOf(w.type||w)>-1},d.recordAutoInsert=function(w,b,I){var T=w.getCursorPosition(),S=b.doc.getLine(T.row);this.isAutoInsertedClosing(T,S,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=T.row,a.autoInsertedLineEnd=I+S.substr(T.column),a.autoInsertedBrackets++},d.recordMaybeInsert=function(w,b,I){var T=w.getCursorPosition(),S=b.doc.getLine(T.row);this.isMaybeInsertedClosing(T,S)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=T.row,a.maybeInsertedLineStart=S.substr(0,T.column)+I,a.maybeInsertedLineEnd=S.substr(T.column),a.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(w,b,I){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&I===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,l;l=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,c,d,w){var b=c.doc,I=!0,T=!0,S=1/0,C=c.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var L=this.lineCommentStart.map(s.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var L=s.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;L=new RegExp("^(\\s*)(?:"+L+") ?"),R=c.getUseSoftTabs();var E=function(K,Z){var te=K.match(L);if(te){var he=te[1].length,ne=te[0].length;!_(K,he,ne)&&te[0][ne-1]==" "&&ne--,b.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!I||/\S/.test(K))&&(_(K,S,S)?b.insertInLine({row:Z,column:S},H):b.insertInLine({row:Z,column:S},F))},O=function(K,Z){return L.test(K)},_=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,A=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+s.escapeRegExp(F)+")"),N=new RegExp("(?:"+s.escapeRegExp(A)+")\\s*$"),P=function(ae,ue){O(ae,ue)||(!I||/\S/.test(ae))&&(b.insertInLine({row:ue,column:ae.length},A),b.insertInLine({row:ue,column:S},F))},E=function(ae,ue){var ce;(ce=ae.match(N))&&b.removeInLine(ue,ae.length-ce[0].length,ae.length),(ce=ae.match(L))&&b.removeInLine(ue,ce[1].length,ce[0].length)},O=function(ae,ue){if(L.test(ae))return!0;for(var ce=c.getTokens(ue),fe=0;fe<ce.length;fe++)if(ce[fe].type==="comment")return!0}}function B(K){for(var Z=d;Z<=w;Z++)K(b.getLine(Z),Z)}var U=1/0;B(function(K,Z){var te=K.search(/\S/);te!==-1?(te<S&&(S=te),T&&!O(K,Z)&&(T=!1)):U>K.length&&(U=K.length)}),S==1/0&&(S=U,I=!1,T=!1),R&&S%C!=0&&(S=Math.floor(S/C)*C),B(T?E:P)},this.toggleBlockComment=function(o,c,d,w){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var I=new a(c,w.row,w.column),T=I.getCurrentToken();c.selection;var S=c.selection.toOrientedRange(),C,R;if(T&&/comment/.test(T.type)){for(var L,F;T&&/comment/.test(T.type);){var E=T.value.indexOf(b.start);if(E!=-1){var H=I.getCurrentTokenRow(),P=I.getCurrentTokenColumn()+E;L=new u(H,P,H,P+b.start.length);break}T=I.stepBackward()}for(var I=new a(c,w.row,w.column),T=I.getCurrentToken();T&&/comment/.test(T.type);){var E=T.value.indexOf(b.end);if(E!=-1){var H=I.getCurrentTokenRow(),P=I.getCurrentTokenColumn()+E;F=new u(H,P,H,P+b.end.length);break}T=I.stepForward()}F&&c.remove(F),L&&(c.remove(L),C=L.start.row,R=-b.start.length)}else R=b.start.length,C=d.start.row,c.insert(d.end,b.end),c.insert(d.start,b.start);S.start.row==C&&(S.start.column+=R),S.end.row==C&&(S.end.column+=R),c.selection.fromOrientedRange(S)}},this.getNextLineIndent=function(o,c,d){return this.$getIndent(c)},this.checkOutdent=function(o,c,d){return!1},this.autoOutdent=function(o,c,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 c in o)if(o[c]){var d=o[c],w=d.prototype.$id,b=g.$modes[w];b||(g.$modes[w]=b=new d),g.$modes[c]||(g.$modes[c]=b),this.$embeds.push(c),this.$modes[c]=b}for(var I=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(R){(function(L){var F=I[R],E=L[F];L[I[R]]=function(){return this.$delegator(F,arguments,E)}})(S)},S=this,c=0;c<I.length;c++)T(c)},this.$delegator=function(o,c,d){var w=c[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var b=w[2][w[2].length-1],I=this.$modes[b];if(I)return I[o].apply(I,[w[1]].concat([].slice.call(c,1)))}w=w[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var S=w.split(this.$embeds[T]);if(!S[0]&&S[1]){c[0]=S[1];var I=this.$modes[this.$embeds[T]];return I[o].apply(I,c)}}var C=d.apply(this,c);return d?C:void 0},this.transformAction=function(o,c,d,w,b){if(this.$behaviour){var I=this.$behaviour.getBehaviours();for(var T in I)if(I[T][c]){var S=I[T][c].apply(this,arguments);if(S)return S}}},this.getKeywords=function(o){if(!this.completionKeywords){var c=this.$tokenizer.rules,d=[];for(var w in c)for(var b=c[w],I=0,T=b.length;I<T;I++)if(typeof b[I].token=="string")/keyword|support|storage/.test(b[I].token)&&d.push(b[I].regex);else if(typeof b[I].token=="object"){for(var S=0,C=b[I].token.length;S<C;S++)if(/keyword|support|storage/.test(b[I].token[S])){var w=b[I].regex.match(/\(.+?\)/g)[S];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,c,d,w){var b=this.$keywordList||this.$createKeywordList();return b.map(function(I){return{name:I,value:I,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),r.Mode=l}),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,l=a.end.row,o=h.action=="add",c=u+1;c<l;c++)s[c]&&(s[c].hidden=o);s[l]&&(o?s[u]?s[l].hidden=o:s[u]=s[l]:(s[u]==s[l]&&(s[u]=void 0),s[l].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 l=new Array(a);p[s]&&p[s].column!=null&&h.start.column>p[s].column&&s++,l.unshift(s,0),p.splice.apply(p,l),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,l=0;l<s.length;l++){var o=s[l];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 c=o.h/a.lineHeight;o.coverLine&&(c-=this.session.getRowLineCount(o.row),c<0&&(c=0)),o.rowCount!=c&&(o.rowCount=c,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},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),l=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<=l;o++){var c=a[o];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,p.container.appendChild(c.el));var d=p.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;c.coverLine||(d+=s.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=d-s.offset+"px";var w=c.coverGutter?0:p.gutterWidth;c.fixedWidth||(w-=p.scrollLeft),c.el.style.left=w+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=s.width+2*s.padding+"px"),c.fixedWidth?c.el.style.right=p.scrollBar.getWidth()+"px":c.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 l=y.end.column,o=y.end.row;h===o?g[h]=s.substring(0,p)+s.substring(l):g.splice(h,o-h+1,s.substring(0,p)+g[o].substring(l));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,l){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,l)}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,l){var o;if(l?o={row:a,column:u}:o=this.$clipPositionToDocument(a,u),!(this.row==o.row&&this.column==o.column)){var c={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:c,value:o})}},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 l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,u))),u<0&&(l.column=0),l},s}();x.prototype.$insertRight=!1,g.implement(x.prototype,y);function h(s,a,u){var l=u?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&l}function p(s,a,u){var l=s.action=="insert",o=(l?1:-1)*(s.end.row-s.start.row),c=(l?1:-1)*(s.end.column-s.start.column),d=s.start,w=l?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?c: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 l=this.getLength()-1;this.remove(new h(0,0,l,this.getLine(l).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,l){return new p(this,u,l)},a.prototype.$detectNewLine=function(u){var l=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=l?l[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,l){return this.$lines.slice(u,l+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 l;if(u.start.row===u.end.row)l=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{l=this.getLines(u.start.row,u.end.row),l[0]=(l[0]||"").substring(u.start.column);var o=l.length-1;u.end.row-u.start.row==o&&(l[o]=l[o].substring(0,u.end.column))}return l},a.prototype.insertLines=function(u,l){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,l)},a.prototype.removeLines=function(u,l){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,l)},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,l){return this.getLength()<=1&&this.$detectNewLine(l),this.insertMergedLines(u,this.$split(l))},a.prototype.insertInLine=function(u,l){var o=this.clippedPos(u.row,u.column),c=this.pos(u.row,u.column+l.length);return this.applyDelta({start:o,end:c,action:"insert",lines:[l]},!0),this.clonePos(c)},a.prototype.clippedPos=function(u,l){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,l=void 0);var c=this.getLine(u);return l==null&&(l=c.length),l=Math.min(Math.max(l,0),c.length),{row:u,column:l}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,l){return{row:u,column:l}},a.prototype.$clipPosition=function(u){var l=this.getLength();return u.row>=l?(u.row=Math.max(0,l-1),u.column=this.getLine(l-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,l){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(l=l.concat([""]),o=0):(l=[""].concat(l),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},l)},a.prototype.insertMergedLines=function(u,l){var o=this.clippedPos(u.row,u.column),c={row:o.row+l.length-1,column:(l.length==1?o.column:0)+l[l.length-1].length};return this.applyDelta({start:o,end:c,action:"insert",lines:l}),this.clonePos(c)},a.prototype.remove=function(u){var l=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:l,end:o,action:"remove",lines:this.getLinesForRange({start:l,end:o})}),this.clonePos(l)},a.prototype.removeInLine=function(u,l,o){var c=this.clippedPos(u,l),d=this.clippedPos(u,o);return this.applyDelta({start:c,end:d,action:"remove",lines:this.getLinesForRange({start:c,end:d})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(u,l){u=Math.min(Math.max(0,u),this.getLength()-1),l=Math.min(Math.max(0,l),this.getLength()-1);var o=l==this.getLength()-1&&u>0,c=l<this.getLength()-1,d=o?u-1:u,w=o?this.getLine(d).length:0,b=c?l+1:l,I=c?0:this.getLine(b).length,T=new h(d,w,b,I),S=this.$lines.slice(u,l+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),S},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,l){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),l.length===0&&u.isEmpty())return u.start;if(l==this.getTextRange(u))return u.end;this.remove(u);var o;return l?o=this.insert(u.start,l):o=u.start,o},a.prototype.applyDeltas=function(u){for(var l=0;l<u.length;l++)this.applyDelta(u[l])},a.prototype.revertDeltas=function(u){for(var l=u.length-1;l>=0;l--)this.revertDelta(u[l])},a.prototype.applyDelta=function(u,l){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,l),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var l=this.$lines.length;(u.action=="remove"&&u.start.row<l&&u.end.row<l||u.action=="insert"&&u.start.row<=l)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,l){for(var o=u.lines,c=o.length-l+1,d=u.start.row,w=u.start.column,b=0,I=0;b<c;b=I){I+=l-1;var T=o.slice(b,I);T.push(""),this.applyDelta({start:this.pos(d+b,w),end:this.pos(d+I,w=0),action:u.action,lines:T},!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,l){for(var o=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,d=l||0,w=o.length;d<w;d++)if(u-=o[d].length+c,u<0)return{row:d,column:u+o[d].length+c};return{row:w-1,column:u+o[w-1].length+c}},a.prototype.positionToIndex=function(u,l){for(var o=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,d=0,w=Math.min(u.row,o.length),b=l||0;b<w;++b)d+=o[b].length+c;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,l=a.currentLine,o=-1,c=a.doc,d=l;a.lines[l];)l++;var w=c.getLength(),b=0;for(a.running=!1;l<w;){a.$tokenizeRow(l),o=l;do l++;while(a.lines[l]);if(b++,b%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,o==-1&&(o=l),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 l=u.firstRow,o=u.lastRow,c={},d=a.$editor.$search,w=d.$isMultilineSearch(a.$editor.getLastSearchOptions()),b=l;b<=o;b++){var I=this.cache[b];if(I==null||a.getValue().length!=this.docLen){if(w){I=[];var T=d.$multiLineForward(a,this.regExp,b,o);if(T){var S=T.endRow<=o?T.endRow-1:o;S>b&&(b=S),I.push(new y(T.startRow,T.startCol,T.endRow,T.endCol))}I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES))}else I=g.getMatchOffsets(a.getLine(b),this.regExp),I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES)),I=I.map(function(F){return new y(b,F.offset,b,F.offset+F.length)});this.cache[b]=I.length?I:""}if(I.length!==0)for(var C=I.length;C--;){var R=I[C].toScreenRange(a),L=R.toString();c[L]||(c[L]=!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 S(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return S.prototype.addSession=function(C){this.$session=C},S.prototype.add=function(C,R,L){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-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)}},S.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},S.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},S.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,F=L.length;F--;){var E=L[F][0];if(E.id<=C)break;E.id<R&&(E.ignore=!0)}this.lastDeltas=null},S.prototype.getSelection=function(C,R){for(var L=this.selections,F=L.length;F--;){var E=L[F];if(E.rev<C)return R&&(E=L[F+1]),E}},S.prototype.getRevision=function(){return this.$rev},S.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,F=null,E=0,H=L.length;H--;){var P=L[H][0];if(P.id<R&&!F&&(F=H+1),P.id<=C){E=H+1;break}}return L.slice(E,F)},S.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},S.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},S.prototype.undo=function(C,R){this.lastDeltas=null;var L=this.$undoStack;if(y(L,L.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=L.pop(),E=null;return F&&(E=C.undoChanges(F,R),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,E}},S.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),E=null;return F&&(E=C.redoChanges(F,R),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,E},S.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],L=R&&R[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},S.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=[]},S.prototype.canUndo=function(){return this.$undoStack.length>0},S.prototype.canRedo=function(){return this.$redoStack.length>0},S.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},S.prototype.isAtBookmark=function(){return this.$rev===this.mark},S.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},S.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},S.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+a(this.$redoStack)},S}();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(S,C){for(var R=C;R--;){var L=S[R];if(L&&!L[0].ignore){for(;R<C-1;){var F=o(S[R],S[R+1]);S[R]=F[0],S[R+1]=F[1],R++}return!0}}}var x=e("./range").Range,h=x.comparePoints;x.comparePoints;function p(S){return{row:S.row,column:S.column}}function s(S){return{start:p(S.start),end:p(S.end),action:S.action,lines:S.lines.slice()}}function a(S){if(S=S||this,Array.isArray(S))return S.map(a).join(`
|
194
|
+
`);var C="";return S.action?(C=S.action=="insert"?"+":"-",C+="["+S.lines+"]"):S.value&&(Array.isArray(S.value)?C=S.value.map(u).join(`
|
195
|
+
`):C=u(S.value)),S.start&&(C+=u(S)),(S.id||S.rev)&&(C+=" ("+(S.id||S.rev)+")"),C}function u(S){return S.start.row+":"+S.start.column+"=>"+S.end.row+":"+S.end.column}function l(S,C){var R=S.action=="insert",L=C.action=="insert";if(R&&L)if(h(C.start,S.end)>=0)d(C,S,-1);else if(h(C.start,S.start)<=0)d(S,C,1);else return null;else if(R&&!L)if(h(C.start,S.end)>=0)d(C,S,-1);else if(h(C.end,S.start)<=0)d(S,C,-1);else return null;else if(!R&&L)if(h(C.start,S.start)>=0)d(C,S,1);else if(h(C.start,S.start)<=0)d(S,C,1);else return null;else if(!R&&!L)if(h(C.start,S.start)>=0)d(C,S,1);else if(h(C.end,S.start)<=0)d(S,C,-1);else return null;return[C,S]}function o(S,C){for(var R=S.length;R--;)for(var L=0;L<C.length;L++)if(!l(S[R],C[L])){for(;R<S.length;){for(;L--;)l(C[L],S[R]);L=C.length,R++}return[S,C]}return S.selectionBefore=C.selectionBefore=S.selectionAfter=C.selectionAfter=null,[C,S]}function c(S,C){var R=S.action=="insert",L=C.action=="insert";if(R&&L)h(S.start,C.start)<0?d(C,S,1):d(S,C,1);else if(R&&!L)h(S.start,C.end)>=0?d(S,C,-1):(h(S.start,C.start)<=0||d(S,x.fromPoints(C.start,S.start),-1),d(C,S,1));else if(!R&&L)h(C.start,S.end)>=0?d(C,S,-1):(h(C.start,S.start)<=0||d(C,x.fromPoints(S.start,C.start),-1),d(S,C,1));else if(!R&&!L)if(h(C.start,S.end)>=0)d(C,S,-1);else if(h(C.end,S.start)<=0)d(S,C,-1);else{var F,E;return h(S.start,C.start)<0&&(F=S,S=b(S,C.start)),h(S.end,C.end)>0&&(E=b(S,C.end)),w(C.end,S.start,S.end,-1),E&&!F&&(S.lines=E.lines,S.start=E.start,S.end=E.end,E=S),[C,F,E].filter(Boolean)}return[C,S]}function d(S,C,R){w(S.start,C.start,C.end,R),w(S.end,C.start,C.end,R)}function w(S,C,R,L){S.row==(L==1?C:R).row&&(S.column+=L*(R.column-C.column)),S.row+=L*(R.row-C.row)}function b(S,C){var R=S.lines,L=S.end;S.end=p(C);var F=S.end.row-S.start.row,E=R.splice(F,R.length),H=F?C.column:C.column-S.start.column;R.push(E[0].substring(0,H)),E[0]=E[0].substr(H);var P={start:p(C),end:L,lines:E,action:S.action};return P}function I(S,C){C=s(C);for(var R=S.length;R--;){for(var L=S[R],F=0;F<L.length;F++){var E=L[F],H=c(E,C);C=H[0],H.length!=2&&(H[2]?(L.splice(F+1,1,H[1],H[2]),F++):H[1]||(L.splice(F,1),F--))}L.length||S.splice(R,1)}return S}function T(S,C){for(var R=0;R<C.length;R++)for(var L=C[R],F=0;F<L.length;F++)I(S,L[F])}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,l,o,c,d=!0;p==null&&(p=this.end.row,s=this.end.column);for(var w=0;w<u.length;w++){if(l=u[w],o=l.range.compareStart(p,s),o==-1){h(null,p,s,a,d);return}if(c=h(null,l.start.row,l.start.column,a,d),c=!c&&h(l.placeholder,l.start.row,l.start.column,a),c||o===0)return;d=!l.sameRow,a=l.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,l;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){l=this.folds;var o=l.indexOf(u);for(o===0&&(this.start.column+=s),o;o<l.length;o++){if(u=l[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,l=this.foldData,o=u.indexOf(a),c=u[o-1];this.end.row=c.end.row,this.end.column=c.end.column,u=u.splice(o,u.length-o);var d=new x(l,u);return l.splice(l.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,l=a||0;l<u.length;l++){var o=u[l],c=y(p,o.end);if(!(c>0)){var d=y(p,o.start);return c===0?s&&d!==0?-l-2:l:d>0||d===0&&!s?l:-l-1}}return-l-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(c,d){return y(c.start,d.start)});for(var a=s[0],u,l=1;l<s.length;l++){u=a,a=s[l];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(l,1),p.push(a),a=u,l--)}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 l=this.pointIndex({row:s,column:0},u);l<0&&(l=-l-1);for(var o=[],c=u;c<l;c++)o.push(a[c]);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,l=a.row,o=this.ranges,c=0,d=o.length;c<d;c++){var w=o[c];if(w.end.row>=u)break}if(p.action=="insert")for(var b=l-u,I=-s.column+a.column;c<d;c++){var w=o[c];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+=I,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&&I>0&&c<d-1&&w.end.column>w.start.column&&w.end.column==o[c+1].start.column&&(w.end.column-=I),w.end.column+=I,w.end.row+=b}}else for(var b=u-l,I=s.column-a.column;c<d;c++){var w=o[c];if(w.start.row>l)break;w.end.row<l&&(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==l?w.end.column<=a.column?(b||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=I,w.end.row+=b):w.end.row>l&&(w.end.row+=b),w.start.row<l&&(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==l?w.start.column<=a.column?(b||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=I,w.start.row+=b):w.start.row>l&&(w.start.row+=b)}if(b!=0&&c<d)for(;c<d;c++){var w=o[c];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(l,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(c[w]=d[w])},u(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(l,o);function c(){this.constructor=l}l.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),y=e("../range_list").RangeList,x=function(u){g(l,u);function l(o,c){var d=u.call(this)||this;return d.foldLine=null,d.placeholder=c,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 l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(c){c.setFoldLine(o)})},l.prototype.clone=function(){var o=this.range.clone(),c=new l(o,this.placeholder);return this.subFolds.forEach(function(d){c.subFolds.push(d.clone())}),c.collapseChildren=this.collapseChildren,c},l.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){p(o,this.start);for(var c=o.start.row,d=o.start.column,w=0,b=-1;w<this.subFolds.length&&(b=this.subFolds[w].range.compare(c,d),b==1);w++);var I=this.subFolds[w],T=0;if(b==0){if(I.range.containsRange(o))return I.addSubFold(o);T=1}for(var c=o.range.end.row,d=o.range.end.column,S=w,b=-1;S<this.subFolds.length&&(b=this.subFolds[S].range.compare(c,d),b==1);S++);b==0&&S++;for(var C=this.subFolds.splice(w,S-w,o),R=b==0?C.length-1:C.length,L=T;L<R;L++)o.addSubFold(C[L]);return o.setFoldLine(this.foldLine),o}},l.prototype.restoreRange=function(o){return a(o,this.start)},l}(y);function h(u,l){u.row-=l.row,u.row==0&&(u.column-=l.column)}function p(u,l){h(u.start,l),h(u.end,l)}function s(u,l){u.row==0&&(u.column+=l.column),u.row+=l.row}function a(u,l){s(u.start,l),s(u.end,l)}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,l){var o=this.getFoldLine(a);if(!o)return null;for(var c=o.folds,d=0;d<c.length;d++){var w=c[d].range;if(w.contains(a,u)){if(l==1&&w.isEnd(a,u)&&!w.isEmpty()||l==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return c[d]}}},this.getFoldsInRange=function(a){var u=a.start,l=a.end,o=this.$foldData,c=[];u.column+=1,l.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,I=0;I<b.length;I++){var T=b[I];if(w=T.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;c.push(T)}}}}return u.column-=1,l.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,l=0;l<u.length;l++)for(var o=0;o<u[l].folds.length;o++)a.push(u[l].folds[o]);return a},this.getFoldStringAt=function(a,u,l,o){if(o=o||this.getFoldLine(a),!o)return null;for(var c={end:{column:0}},d,w,b=0;b<o.folds.length;b++){w=o.folds[b];var I=w.range.compareEnd(a,u);if(I==-1){d=this.getLine(w.start.row).substring(c.end.column,w.start.column);break}else if(I===0)return null;c=w}return d||(d=this.getLine(w.start.row).substring(c.end.column)),l==-1?d.substring(0,u-c.end.column):l==1?d.substring(u-c.end.column):d},this.getFoldLine=function(a,u){var l=this.$foldData,o=0;for(u&&(o=l.indexOf(u)),o==-1&&(o=0),o;o<l.length;o++){var c=l[o];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var l=this.$foldData,o=0;for(u&&(o=l.indexOf(u)),o==-1&&(o=0),o;o<l.length;o++){var c=l[o];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,u){for(var l=this.$foldData,o=u-a+1,c=0;c<l.length;c++){var d=l[c],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,l){return u.start.row-l.start.row}),a},this.addFold=function(a,u){var l=this.$foldData,o=!1,c;a instanceof x?c=a:(c=new x(u,a),c.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(c.range);var d=c.start.row,w=c.start.column,b=c.end.row,I=c.end.column,T=this.getFoldAt(d,w,1),S=this.getFoldAt(b,I,-1);if(T&&S==T)return T.addSubFold(c);T&&!T.range.isStart(d,w)&&this.removeFold(T),S&&!S.range.isEnd(b,I)&&this.removeFold(S);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(E){c.addSubFold(E)}));for(var R=0;R<l.length;R++){var L=l[R];if(b==L.start.row){L.addFold(c),o=!0;break}else if(d==L.end.row){if(L.addFold(c),o=!0,!c.sameRow){var F=l[R+1];if(F&&F.start.row==b){L.merge(F);break}}break}else if(b<=L.start.row)break}return o||(L=this.$addFoldLine(new y(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,l=u.start.row,o=u.end.row,c=this.$foldData,d=u.folds;if(d.length==1)c.splice(c.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(l,o):this.$updateRowLengthCache(l,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],l=0;l<a.length;l++)u.push(a[l]);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 l,o;if(a==null)l=new g(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")l=new g(a,0,a,this.getLine(a).length);else if("row"in a)l=g.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(d){o=o.concat(this.unfold(d))},this),o;l=a}o=this.getFoldsInRangeList(l);for(var c=o;o.length==1&&g.comparePoints(o[0].start,l.start)<0&&g.comparePoints(o[0].end,l.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(l);if(u!=!1?this.removeFolds(o):this.expandFolds(o),c.length)return c},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var l=this.getFoldLine(a,u);return l?l.end.row:a},this.getRowFoldStart=function(a,u){var l=this.getFoldLine(a,u);return l?l.start.row:a},this.getFoldDisplayLine=function(a,u,l,o,c){o==null&&(o=a.start.row),c==null&&(c=0),u==null&&(u=a.end.row),l==null&&(l=this.getLine(u).length);var d=this.doc,w="";return a.walk(function(b,I,T,S){if(!(I<o)){if(I==o){if(T<c)return;S=Math.max(c,S)}b!=null?w+=b:w+=d.getLine(I).substring(S,T)}},u,l),w},this.getDisplayLine=function(a,u,l,o){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,u,l,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 l=u.folds.map(function(o){return o.clone()});return new y(a,l)}),a},this.toggleFold=function(a){var u=this.selection,l=u.getRange(),o,c;if(l.isEmpty()){var d=l.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(c=this.findMatchingBracket(d))?l.comparePoint(c)==1?l.end=c:(l.start=c,l.start.column++,l.end.column--):(c=this.findMatchingBracket({row:d.row,column:d.column+1}))?(l.comparePoint(c)==1?l.end=c:l.start=c,l.start.column++):l=this.getCommentFoldRange(d.row,d.column)||l}else{var b=this.getFoldsInRange(l);if(a&&b.length){this.expandFolds(b);return}else b.length==1&&(o=b[0])}if(o||(o=this.getFoldAt(l.start.row,l.start.column)),o&&o.range.toString()==l.toString()){this.expandFold(o);return}var I="...";if(!l.isMultiLine()){if(I=this.getTextRange(l),I.length<4)return;I=I.trim().substring(0,2)+".."}this.addFold(I,l)},this.getCommentFoldRange=function(a,u,l){var o=new h(this,a,u),c=o.getCurrentToken(),d=c&&c.type;if(c&&/^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(l!=1){do c=o.stepBackward();while(c&&w.test(c.type));c=o.stepForward()}b.start.row=o.getCurrentTokenRow(),b.start.column=o.getCurrentTokenColumn()+c.value.length,o=new h(this,a,u);var I=this.getState(o.$row);if(l!=-1){var T=-1;do if(c=o.stepForward(),T==-1){var S=this.getState(o.$row);I.toString()!==S.toString()&&(T=o.$row)}else if(o.$row>T)break;while(c&&w.test(c.type));c=o.stepBackward()}else c=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,l,o){l==null&&(l=1e5);var c=this.foldWidgets;if(c){u=u||this.getLength(),a=a||0;for(var d=a;d<u;d++)if(c[d]==null&&(c[d]=this.getFoldWidget(d)),c[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=l,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 l=a.getTokens(u),o=0;o<l.length;o++){var c=l[o];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,u){var l=this.foldWidgets;if(!l||u&&l[a])return{};for(var o=a-1,c;o>=0;){var d=l[o];if(d==null&&(d=l[o]=this.getFoldWidget(o)),d=="start"){var w=this.getFoldWidgetRange(o);if(c||(c=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:c}},this.onFoldWidgetClick=function(a,u){u instanceof p&&(u=u.domEvent);var l={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(a,l);if(!o){var c=u.target||u.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var l=this.getFoldWidget(a),o=this.getLine(a),c=l==="end"?-1:1,d=this.getFoldAt(a,c===-1?0:o.length,c);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 I=b.range.start.row+1,T=b.range.end.row;this.foldAll(I,T,u.all?1e4:0)}else u.children?(T=w?w.end.row:this.getLength(),this.foldAll(a+1,T,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 l=this.$toggleFoldWidget(u,{});if(!l){var o=this.getParentFoldRangeData(u,!0);if(l=o.range||o.firstRange,l){u=l.start.row;var c=this.getFoldAt(u,this.getLine(u).length,1);c?this.removeFold(c):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var u=a.start.row,l=a.end.row-u;if(l===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,l+1,null);else{var o=Array(l+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),l=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(l||(u=p.charAt(h.column),h={row:h.row,column:h.column+1},l=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!l)return null;if(l[1]){var o=this.$findClosingBracket(l[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(l[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),l=u&&u.match(a);if(l||(u=(p===void 0||p)&&s.charAt(h.column),h={row:h.row,column:h.column+1},l=u&&u.match(a)),!l)return null;var o=new y(h.row,h.column-1,h.row,h.column),c=l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h);if(!c)return[o];var d=new y(c.row,c.column,c.row,c.column+1);return[o,d]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,p,s){var a=this.$brackets[h],u=1,l=new g(this,p.row,p.column),o=l.getCurrentToken();if(o||(o=l.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 c=p.column-l.getCurrentTokenColumn()-2,d=o.value;;){for(;c>=0;){var w=d.charAt(c);if(w==a){if(u-=1,u==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else w==h&&(u+=1);c-=1}do o=l.stepBackward();while(o&&!s.test(o.type));if(o==null)break;d=o.value,c=d.length-1}return null}},this.$findClosingBracket=function(h,p,s){var a=this.$brackets[h],u=1,l=new g(this,p.row,p.column),o=l.getCurrentToken();if(o||(o=l.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 c=p.column-l.getCurrentTokenColumn();;){for(var d=o.value,w=d.length;c<w;){var b=d.charAt(c);if(b==a){if(u-=1,u==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else b==h&&(u+=1);c+=1}do o=l.stepForward();while(o&&!s.test(o.type));if(o==null)break;c=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,l=0,o=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);p=h.stepForward();var c=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==="<")l++;else if(s.value==="</"&&(l--,l<0)){h.stepBackward();var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);p=h.stepForward();var I=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 T=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(u===a&&p.value==="/>"&&(l--,l<0))var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),I=b,T=I,w=new y(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(p&&l>=0);if(o&&w&&b&&T&&c&&I)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,T.end.row,T.end.column),openTagName:c,closeTagName:I}},this.$findOpeningTag=function(h,p){var s=h.getCurrentToken(),a=p.value,u=0,l=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),c=o+2,d=new y(l,o,l,c);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,l=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),c=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 I=new y(l,o,l,c),T=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do p=h.stepForward();while(p&&p.value!==">");var S=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 L=0;L<C;L++)h.stepForward()}}while(s&&u<=0);if(T&&S&&d&&b&&I&&w)return{openTag:new y(T.start.row,T.start.column,S.end.row,S.end.column),closeTag:new y(d.start.row,d.start.column,b.end.row,b.end.column),openTagName:I,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,l=e("./line_widgets").LineWidgets,o=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,b=function(){function P(O,_){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 c(new a().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(N){A._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new o(O)),this.setDocument(O),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 O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=y.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},P.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!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",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.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 O=new l(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var _=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;_>A&&(this.$docRowCache.splice(A,_),this.$screenRowCache.splice(A,_))},P.prototype.$getRowCacheIndex=function(O,_){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if(_>U)A=B+1;else if(_<U)N=B-1;else return B}return A-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(O){var _=O.data;this.$resetRowCache(_.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var _=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var _=new w;_.$undoStack=O.history.undo,_.$redoStack=O.history.redo,_.mark=O.history.mark,_.$rev=O.history.rev;var A=new P(O.value);return O.folds.forEach(function(N){A.addFold("...",u.fromPoints(N.start,N.end))}),A.setAnnotations(O.annotations),A.setBreakpoints(O.breakpoints),A.setMode(O.mode),A.setScrollLeft(O.scrollLeft),A.setScrollTop(O.scrollTop),A.setUndoManager(_),A.selection.fromJSON(O.selection),A},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.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(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,_){var A=this.bgTokenizer.getTokens(O),N,B=0;if(_==null){var U=A.length-1;B=this.getLine(O).length}else for(var U=0;U<A.length&&(B+=A[U].value.length,!(B>=_));U++);return N=A[U],N?(N.index=U,N.start=B-N.value.length,N):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var _=this;O.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(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,_){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+_,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,_){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,_)},P.prototype.removeGutterDecoration=function(O,_){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var _=0;_<O.length;_++)this.$breakpoints[O[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[O]=_:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,_,A,N){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:_,inFront:!!N,id:B};return N?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},P.prototype.addDynamicMarker=function(O,_){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!_,_?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var _=this.$frontMarkers[O]||this.$backMarkers[O];if(_){var A=_.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var _=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,_,A,N){typeof _!="number"&&(A=_,_=O),A||(A="ace_step");var B=new u(O,0,_,1/0);return B.id=this.addMarker(B,A,"fullLine",N),B},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var _=O.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(O,_){var A=this.getLine(O),N=!1;if(_>0&&(N=!!A.charAt(_-1).match(this.tokenRe)),N||(N=!!A.charAt(_).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(_-1,_+1)))var B=/\s/;else var B=this.nonTokenRe;var U=_;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var K=_;K<A.length&&A.charAt(K).match(B);)K++;return new u(O,U,O,K)},P.prototype.getAWordRange=function(O,_){for(var A=this.getWordRange(O,_),N=this.getLine(A.end.row);N.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var _=O.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,_){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var A=O,N=A.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),_&&_();return}this.$modeId=N,h.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return _&&_();this.$modes[N]&&!A?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(A),A||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),_&&_()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,_){if(_||(this.$modeId=O.$id),this.$mode!==O){var A=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var B=this.onReloadTokenizer.bind(this);N.on("update",B)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,_||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){h.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},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 O=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>O&&(O=_.screenWidth)}),this.lineWidgetWidth=O},P.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=_.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}A[te]==null&&(A[te]=this.$getStringScreenWidth(_[te])[0]),A[te]>N&&(N=A[te])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,_){return this.doc.getLines(O,_)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,_){return this.doc.insert(O,_)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,_){return this.doc.removeFullLines(O,_)},P.prototype.undoChanges=function(O,_){if(O.length){this.$fromUndo=!0;for(var A=O.length-1;A!=-1;A--){var N=O[A];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!_&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,_){if(O.length){this.$fromUndo=!0;for(var A=0;A<O.length;A++){var N=O[A];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!_&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,_){function A(Z){return _?Z.action!=="insert":Z.action==="insert"}for(var N,B,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!N){A(K)?N=u.fromPoints(K.start,K.end):N=u.fromPoints(K.start,K.start);continue}A(K)?(B=K.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=K.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=K.start,N.compare(B.row,B.column)==-1&&(N=u.fromPoints(K.start,K.start)))}}return N},P.prototype.replace=function(O,_){return this.doc.replace(O,_)},P.prototype.moveText=function(O,_,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=u.fromPoints(_,_);if(!A){this.remove(O);var K=O.start.row-O.end.row,Z=K?-O.end.column:O.start.column-O.end.column;Z&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=Z),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=Z)),K&&U.start.row>=O.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,N),B.length){var te=O.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(B.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+=K,ue.end.row+=K,ue}))}return U},P.prototype.indentRows=function(O,_,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=_;N++)this.doc.insertInLine({row:N,column:0},A)},P.prototype.outdentRows=function(O){for(var _=O.collapseRows(),A=new u(0,0,0,0),N=this.getTabSize(),B=_.start.row;B<=_.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var K=0;K<N&&U.charAt(K)==" ";++K);K<N&&U.charAt(K)==" "?(A.start.column=K,A.end.column=K+1):(A.start.column=0,A.end.column=K),this.remove(A)}},P.prototype.$moveLines=function(O,_,A){if(O=this.getRowFoldStart(O),_=this.getRowFoldEnd(_),A<0){var N=this.getRowFoldStart(O+A);if(N<0)return 0;var B=N-O}else if(A>0){var N=this.getRowFoldEnd(_+A);if(N>this.doc.getLength()-1)return 0;var B=N-_}else{O=this.$clipRowToDocument(O),_=this.$clipRowToDocument(_);var B=_-O+1}var U=new u(O,0,_,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=B,te.end.row+=B,te}),Z=A==0?this.doc.getLines(O,_):this.doc.removeFullLines(O,_);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,_){return this.$moveLines(O,_,-1)},P.prototype.moveLinesDown=function(O,_){return this.$moveLines(O,_,1)},P.prototype.duplicateLines=function(O,_){return this.$moveLines(O,_,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,_){return _<0?0:Math.min(this.doc.getLine(O).length,_)},P.prototype.$clipPositionToDocument=function(O,_){if(_=Math.max(0,_),O<0)O=0,_=0;else{var A=this.doc.getLength();O>=A?(O=A-1,_=this.doc.getLine(A-1).length):_=Math.min(this.doc.getLine(O).length,_)}return{row:O,column:_}},P.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var _=this.doc.getLength()-1;return O.end.row>_?(O.end.row=_,O.end.column=this.doc.getLine(_).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},P.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,_){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:O,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,_){var A=this.$wrapLimitRange;A.max<0&&(A={min:_,max:_});var N=this.$constrainWrapLimit(O,A.min,A.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,_,A){return _&&(O=Math.max(_,O)),A&&(O=Math.min(A,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var _=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,K=B.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(A==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(B.row),ae=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=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),ae=0;if(ne){var $e=ne.range.compareInside(N.row,N.column);$e==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,B.column-N.column))):$e==-1&&(ne.addRemoveChars(U,0,B.column-N.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),A==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.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,K):this.$updateRowLengthCache(U,K),te},P.prototype.$updateRowLengthCache=function(O,_){this.$rowLengthCache[O]=null,this.$rowLengthCache[_]=null},P.prototype.$updateWrapData=function(O,_){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,te=O;for(_=Math.min(_,A.length-1);te<=_;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,K.length),ce[0]=S;for(var fe=1;fe<ce.length;fe++)ce[fe]=C}else ce=this.$getDisplayTokens(A[ne].substring(ue,ae),K.length);K=K.concat(ce)}).bind(this),Z.end.row,A[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,N),te=Z.end.row+1):(K=this.$getDisplayTokens(A[te]),B[te]=this.$computeWrapSplits(K,U,N),te++)},P.prototype.$computeWrapSplits=function(O,_,A){if(O.length==0)return[];var N=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=_<=Math.max(2*A,8)||te===!1?0:Math.floor(_/2);function ne(){var $e=0;if(he===0)return $e;if(te)for(var Te=0;Te<O.length;Te++){var Ee=O[Te];if(Ee==L)$e+=1;else if(Ee==F)$e+=A;else{if(Ee==E)continue;break}}return Z&&te!==!1&&($e+=A),Math.min($e,he)}function ae($e){for(var Te=$e-U,Ee=U;Ee<$e;Ee++){var Ge=O[Ee];(Ge===12||Ge===2)&&(Te-=1)}N.length||(ue=ne(),N.indent=ue),K+=Te,N.push(K),U=$e}for(var ue=0;B-U>_-ue;){var ce=U+_-ue;if(O[ce-1]>=L&&O[ce]>=L){ae(ce);continue}if(O[ce]==S||O[ce]==C){for(ce;ce!=U-1&&O[ce]!=S;ce--);if(ce>U){ae(ce);continue}for(ce=U+_,ce;ce<O.length&&O[ce]==C;ce++);if(ce==O.length)break;ae(ce);continue}for(var fe=Math.max(ce-(_-(_>>2)),U-1);ce>fe&&O[ce]<S;)ce--;if(Z){for(;ce>fe&&O[ce]<S;)ce--;for(;ce>fe&&O[ce]==R;)ce--}else for(;ce>fe&&O[ce]<L;)ce--;if(ce>fe){ae(++ce);continue}ce=U+_,O[ce]==T&&ce--,ae(ce-ue)}return N},P.prototype.$getDisplayTokens=function(O,_){var A=[],N;_=_||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+_),A.push(F);for(var K=1;K<N;K++)A.push(E)}else U==32?A.push(L):U>39&&U<48||U>57&&U<64?A.push(R):U>=4352&&H(U)?A.push(I,T):A.push(I)}return A},P.prototype.$getStringScreenWidth=function(O,_,A){if(_==0)return[0,0];_==null&&(_=1/0),A=A||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?A+=this.getScreenTabSize(A):N>=4352&&H(N)?A+=2:A+=1,!(A>_));B++);return[A,B]},P.prototype.getRowLength=function(O){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?_:this.$wrapData[O].length+_},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[_.row];return A.length&&A[0]<_.column?A.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},P.prototype.getDocumentLastRowColumn=function(O,_){var A=this.documentToScreenRow(O,_);return this.getScreenLastRowColumn(A)},P.prototype.getDocumentLastRowColumnPosition=function(O,_){var A=this.documentToScreenRow(O,_);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,_){return this.screenToDocumentPosition(O,_).row},P.prototype.screenToDocumentColumn=function(O,_){return this.screenToDocumentPosition(O,_).column},P.prototype.screenToDocumentPosition=function(O,_,A){if(O<0)return{row:0,column:0};var N,ae=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ue=O>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,fe=this.getNextFoldLine(ae),$e=fe?fe.start.row:1/0;ne<=O&&(K=this.getRowLength(ae),!(ne+K>O||ae>=ce));)ne+=K,ae++,ae>$e&&(ae=fe.end.row+1,fe=this.getNextFoldLine(ae,fe),$e=fe?fe.start.row:1/0),ue&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(fe&&fe.start.row<=ae)N=this.getFoldDisplayLine(fe),ae=fe.start.row;else{if(ne+K<=O||ae>ce)return{row:ce,column:this.getLine(ce).length};N=this.getLine(ae),fe=null}var Te=0,Ee=Math.floor(O-ne);if(this.$useWrapMode){var Ge=this.$wrapData[ae];Ge&&(U=Ge[Ee],Ee>0&&Ge.length&&(Te=Ge.indent,B=Ge[Ee-1]||Ge[Ge.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ne+Ee,ae,Ee)&&(_=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,_-Te)[1],this.$useWrapMode&&B>=U&&(B=U-1),fe?fe.idxToPosition(B):{row:ae,column:B}},P.prototype.documentToScreenPosition=function(O,_){if(typeof _>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,_);O=A.row,_=A.column;var ne=0,N=null,B=null;B=this.getFoldAt(O,_,1),B&&(O=B.start.row,_=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=O>K[te-1];else var ae=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<O;){if(he>=ce){if(U=ue.end.row+1,U>O)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var fe="";ue&&he>=ce?(fe=this.getFoldDisplayLine(ue,O,_),N=ue.start.row):(fe=this.getLine(O).substring(0,_),N=O);var $e=0;if(this.$useWrapMode){var Te=this.$wrapData[N];if(Te){for(var Ee=0;fe.length>=Te[Ee];)ne++,Ee++;fe=fe.substring(Te[Ee-1]||0,fe.length),$e=Ee>0?Te.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(O,_){return this.documentToScreenPosition(O,_).column},P.prototype.documentToScreenRow=function(O,_){return this.documentToScreenPosition(O,_).row},P.prototype.getScreenLength=function(){var O=0,_=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,_=this.$foldData[B++],U=_?_.start.row:1/0;N<A;){var K=this.$wrapData[N];O+=K?K.length+1:1,N++,N>U&&(N=_.end.row+1,_=this.$foldData[B++],U=_?_.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)_=Z[B],O-=_.end.row-_.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<_.length&&(B=_.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>A));U++);return[N,U]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var _=this.getLine(O.row);return _[O.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=H,g.implement(b.prototype,p);var I=1,T=2,S=3,C=4,R=9,L=10,F=11,E=12;function H(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 O=typeof P=="number"?P:null;this.setWrapLimitRange(O,O),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(l){return y.mixin(this.$options,l),this},u.prototype.getOptions=function(){return g.copyObject(this.$options)},u.prototype.setOptions=function(l){this.$options=l},u.prototype.find=function(l){var o=this.$options,c=this.$matchIterator(l,o);if(!c)return!1;var d=null;return c.forEach(function(w,b,I,T){return d=new x(w,b,I,T),b==T&&o.start&&o.start.start&&o.skipCurrent!=!1&&d.isEqual(o.start)?(d=null,!1):!0}),d},u.prototype.findAll=function(l){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var c=o.range,d=c?l.getLines(c.start.row,c.end.row):l.doc.getAllLines(),w=[],b=o.re;if(o.$isMultiLine){var I=b.length,T=d.length-I,S;e:for(var C=b.offset||0;C<=T;C++){for(var R=0;R<I;R++)if(d[C+R].search(b[R])==-1)continue e;var L=d[C],F=d[C+I-1],E=L.length-L.match(b[0])[0].length,H=F.match(b[I-1])[0].length;S&&S.end.row===C&&S.end.column>E||(w.push(S=new x(C,E,C+I-1,H)),I>2&&(C=C+I-2))}}else for(var P,O=0;O<d.length;O++)if(this.$isMultilineSearch(o)){var _=d.length-1;if(P=this.$multiLineForward(l,b,O,_),P){var A=P.endRow<=_?P.endRow-1:_;A>O&&(O=A),w.push(new x(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=g.getMatchOffsets(d[O],b);for(var R=0;R<P.length;R++){var N=P[R];w.push(new x(O,N.offset,O,N.offset+N.length))}}if(c){for(var B=c.start.column,U=c.end.column,O=0,R=w.length-1;O<R&&w[O].start.column<B&&w[O].start.row==0;)O++;for(var K=c.end.row-c.start.row;O<R&&w[R].end.column>U&&w[R].end.row==K;)R--;for(w=w.slice(O,R+1),O=0,R=w.length;O<R;O++)w[O].start.row+=c.start.row,w[O].end.row+=c.start.row}return w},u.prototype.parseReplaceString=function(l){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",d=0,w=l.length;d<w;d++){var b=l.charCodeAt(d);if(b===o.Backslash){if(d++,d>=w){c+="\\";break}var I=l.charCodeAt(d);switch(I){case o.Backslash:c+="\\";break;case o.n:c+=`
|
199
|
+
`;break;case o.t:c+=" ";break}continue}if(b===o.DollarSign){if(d++,d>=w){c+="$";break}var T=l.charCodeAt(d);if(T===o.DollarSign){c+="$$";continue}if(T===o.Digit0||T===o.Ampersand){c+="$&";continue}if(o.Digit1<=T&&T<=o.Digit9){c+="$"+l[d];continue}}c+=l[d]}return c||l},u.prototype.replace=function(l,o){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return o;if(d){var w=this.$isMultilineSearch(c);w&&(l=l.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var b=d.exec(l);if(!b||!w&&b[0].length!=l.length)return null;if(o=c.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=l.replace(d,o),c.preserveCase){o=o.split("");for(var I=Math.min(l.length,l.length);I--;){var T=l[I];T&&T.toLowerCase()!=T?o[I]=o[I].toUpperCase():o[I]=o[I].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(l,o){if(l.needle instanceof RegExp)return l.re=l.needle;var c=l.needle;if(!l.needle)return l.re=!1;l.regExp||(c=g.escapeRegExp(c));var d=l.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),l.$supportsUnicodeFlag=!0,d+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(c=p(c,l)),l.$isMultiLine=!o&&/[\n\r]/.test(c),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(c,d);try{var w=new RegExp(c,d)}catch{w=!1}return l.re=w},u.prototype.$assembleMultilineRegExp=function(l,o){for(var c=l.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),d=[],w=0;w<c.length;w++)try{d.push(new RegExp(c[w],o))}catch{return!1}return d},u.prototype.$isMultilineSearch=function(l){return l.re&&/\\r\\n|\\r|\\n/.test(l.re.source)&&l.regExp&&!l.$isMultiLine},u.prototype.$multiLineForward=function(l,o,c,d){for(var w,b=a(l,c),I=c;I<=d;){for(var T=0;T<b&&!(I>d);T++){var S=l.getLine(I++);w=w==null?S:w+`
|
203
|
+
`+S}var C=o.exec(w);if(o.lastIndex=0,C){var R=w.slice(0,C.index).split(`
|
204
|
+
`),L=C[0].split(`
|
205
|
+
`),F=c+R.length-1,E=R[R.length-1].length,H=F+L.length-1,P=L.length==1?E+L[0].length:L[L.length-1].length;return{startRow:F,startCol:E,endRow:H,endCol:P}}}return null},u.prototype.$multiLineBackward=function(l,o,c,d,w){for(var b,I=a(l,d),T=l.getLine(d).length-c,S=d;S>=w;){for(var C=0;C<I&&S>=w;C++){var R=l.getLine(S--);b=b==null?R:R+`
|
206
|
+
`+b}var L=s(b,o,T);if(L){var F=b.slice(0,L.index).split(`
|
207
|
+
`),E=L[0].split(`
|
208
|
+
`),H=S+F.length,P=F[F.length-1].length,O=H+E.length-1,_=E.length==1?P+E[0].length:E[E.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:_}}}return null},u.prototype.$matchIterator=function(l,o){var c=this.$assembleRegExp(o);if(!c)return!1;var d=this.$isMultilineSearch(o),w=this.$multiLineForward,b=this.$multiLineBackward,I=o.backwards==!0,T=o.skipCurrent!=!1,S=c.unicode,C=o.range,R=o.start;R||(R=C?C[I?"end":"start"]:l.selection.getRange()),R.start&&(R=R[T!=I?"end":"start"]);var L=C?C.start.row:0,F=C?C.end.row:l.getLength()-1;if(I)var E=function(O){var _=R.row;if(!P(_,R.column,O)){for(_--;_>=L;_--)if(P(_,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(_=F,L=R.row;_>=L;_--)if(P(_,Number.MAX_VALUE,O))return}}};else var E=function(O){var _=R.row;if(!P(_,R.column,O)){for(_=_+1;_<=F;_++)if(P(_,0,O))return;if(o.wrap!=!1){for(_=L,F=R.row;_<=F;_++)if(P(_,0,O))return}}};if(o.$isMultiLine)var H=c.length,P=function(O,_,A){var N=I?O-H+1:O;if(!(N<0||N+H>l.getLength())){var B=l.getLine(N),U=B.search(c[0]);if(!(!I&&U<_||U===-1)){for(var K=1;K<H;K++)if(B=l.getLine(N+K),B.search(c[K])==-1)return;var Z=B.match(c[H-1])[0].length;if(!(I&&Z>_)&&A(N,U,N+H-1,Z))return!0}}};else if(I)var P=function(O,_,A){if(d){var N=b(l,c,_,O,L);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=l.getLine(O),U=[],K,Z=0;for(c.lastIndex=0;K=c.exec(B);){var te=K[0].length;if(Z=K.index,!te){if(Z>=B.length)break;c.lastIndex=Z+=g.skipEmptyMatch(B,Z,S)}if(K.index+te>_)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(A(O,ne,O,ne+te))return!0}}};else var P=function(O,_,A){if(c.lastIndex=_,d){var N=w(l,c,O,F);if(N){var B=N.endRow<=F?N.endRow-1:F;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=l.getLine(O),K,Z;Z=c.exec(U);){var te=Z[0].length;if(K=Z.index,A(O,K,O,K+te))return!0;if(!te&&(c.lastIndex=K+=g.skipEmptyMatch(U,K,S),K>=U.length))return!1}};return{forEach:E}},u}();function p(u,l){var o=g.supportsLookbehind();function c(I,T){T===void 0&&(T=!0);var S=o&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(I)||l.regExp?o&&l.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var d=Array.from(u),w=d[0],b=d[d.length-1];return c(w)+u+c(b,!1)}function s(u,l,o){for(var c=null,d=0;d<=u.length;){l.lastIndex=d;var w=l.exec(u);if(!w)break;var b=w.index+w[0].length;if(b>u.length-o)break;(!c||b>c.index+c[0].length)&&(c=w),d=w.index+1}return c}function a(u,l){var o=5e3,c={row:l,column:0},d=u.doc.positionToIndex(c),w=d+o,b=u.doc.indexToPosition(w),I=b.row;return I+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(l,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(c[w]=d[w])},u(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(l,o);function c(){this.constructor=l}l.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),y=e("../lib/keys"),x=e("../lib/useragent"),h=y.KEY_MODS,p=function(){function u(l,o){this.$init(l,o,!1)}return u.prototype.$init=function(l,o,c){this.platform=o||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=c},u.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},u.prototype.removeCommand=function(l,o){var c=l&&(typeof l=="string"?l:l.name);l=this.commands[c],o||delete this.commands[c];var d=this.commandKeyBinding;for(var w in d){var b=d[w];if(b==l)delete d[w];else if(Array.isArray(b)){var I=b.indexOf(l);I!=-1&&(b.splice(I,1),b.length==1&&(d[w]=b[0]))}}},u.prototype.bindKey=function(l,o,c){if(typeof l=="object"&&l&&(c==null&&(c=l.position),l=l[this.platform]),!!l){if(typeof o=="function")return this.addCommand({exec:o,bindKey:l,name:o.name||l});l.split("|").forEach(function(d){var w="";if(d.indexOf(" ")!=-1){var b=d.split(/\s+/);d=b.pop(),b.forEach(function(S){var C=this.parseKeys(S),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var I=this.parseKeys(d),T=h[I.hashId]+I.key;this._addCommandToBinding(w+T,o,c)},this)}},u.prototype._addCommandToBinding=function(l,o,c){var d=this.commandKeyBinding,w;if(!o)delete d[l];else if(!d[l]||this.$singleCommand)d[l]=o;else{Array.isArray(d[l])?(w=d[l].indexOf(o))!=-1&&d[l].splice(w,1):d[l]=[d[l]],typeof c!="number"&&(c=s(o));var b=d[l];for(w=0;w<b.length;w++){var I=b[w],T=s(I);if(T>c)break}b.splice(w,0,o)}},u.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(o){var c=l[o];if(c){if(typeof c=="string")return this.bindKey(c,o);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=o),this.addCommand(c))}},this)},u.prototype.removeCommands=function(l){Object.keys(l).forEach(function(o){this.removeCommand(l[o])},this)},u.prototype.bindKeys=function(l){Object.keys(l).forEach(function(o){this.bindKey(o,l[o])},this)},u.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},u.prototype.parseKeys=function(l){var o=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),c=o.pop(),d=y[c];if(y.FUNCTION_KEYS[d])c=y.FUNCTION_KEYS[d].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var w=0,b=o.length;b--;){var I=y.KEY_MODS[o[b]];if(I==null)return typeof console<"u"&&console.error("invalid modifier "+o[b]+" in "+l),!1;w|=I}return{key:c,hashId:w}},u.prototype.findKeyCommand=function(l,o){var c=h[l]+o;return this.commandKeyBinding[c]},u.prototype.handleKeyboard=function(l,o,c,d){if(!(d<0)){var w=h[o]+c,b=this.commandKeyBinding[w];return l.$keyChain&&(l.$keyChain+=" "+w,b=this.commandKeyBinding[l.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||w,{command:"null"}):(l.$keyChain&&((!o||o==4)&&c.length==1?l.$keyChain=l.$keyChain.slice(0,-w.length-1):(o==-1||d>0)&&(l.$keyChain="")),{command:b})}},u.prototype.getStatusText=function(l,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(l,u);function l(o,c){var d=u.call(this,o,c)||this;return d.$singleCommand=!0,d}return l}(p);a.call=function(u,l,o){p.prototype.$init.call(u,l,o,!0)},p.call=function(u,l,o){p.prototype.$init.call(u,l,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(l,o){l.__proto__=o}||function(l,o){for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(l[c]=o[c])},s(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(a,u);function l(){this.constructor=a}a.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}}(),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,l){var o=s.call(this,l,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),o}return a.prototype.exec=function(u,l,o){if(Array.isArray(u)){for(var c=u.length;c--;)if(this.exec(u[c],l,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var d={editor:l,command:u,args:o};return this.canExecute(u,l)?(d.returnValue=this._emit("exec",d),this._signal("afterExec",d),d.returnValue!==!1):(this._signal("commandUnavailable",d),!1)},a.prototype.canExecute=function(u,l){return typeof u=="string"&&(u=this.commands[u]),!(!u||l&&l.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(l))},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(l){this.macro.push([l.command,l.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(l){typeof l=="string"?this.exec(l,u):this.exec(l[0],u,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},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(),l=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(u.row).length,c=s.session.doc.getTextRange(s.selection.getRange()),d=c.replace(/\n\s*/," ").length,w=s.session.doc.getLine(u.row),b=u.row+1;b<=l.row+1;b++){var I=g.stringTrimLeft(g.stringTrimRight(s.session.doc.getLine(b)));I.length!==0&&(I=" "+I),w+=I}l.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new x(u.row,0,l.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,l=s.selection.rangeList.ranges,o=[];l.length<1&&(l=[s.selection.getRange()]);for(var c=0;c<l.length;c++)c==l.length-1&&(l[c].end.row===a&&l[c].end.column===u||o.push(new x(l[c].end.row,l[c].end.column,a,u))),c===0?l[c].start.row===0&&l[c].start.column===0||o.push(new x(0,0,l[c].start.row,l[c].start.column)):o.push(new x(l[c-1].end.row,l[c-1].end.column,l[c].start.row,l[c].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var c=0;c<o.length;c++)s.selection.addRange(o[c],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
|
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),l=this.$findNearestFoldLaneWidget(u),o=this.$findNearestAnnotation(u);if(!(l===null&&o===null)){var c=this.$findClosestNumber(l,o,u);if(c===l)if(this.activeLane="fold",this.activeRowIndex=l,this.$isCustomWidgetVisible(l)){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 l=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=l.getBoundingClientRect(),c=this.annotationTooltip.getElement().style;c.left=o.right+"px",c.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 A=typeof Symbol=="function"&&Symbol.iterator,N=A&&_[A],B=0;if(N)return N.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&B>=_.length&&(_=void 0),{value:_&&_[B++],done:!_}}};throw new TypeError(A?"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,l=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,c=e("./search").Search,d=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,I=e("./commands/default_commands").commands,T=e("./config"),S=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,L=e("./clipboard"),F=e("./lib/keys"),E=e("./lib/event"),H=e("./tooltip").HoverTooltip,P=function(){function _(A,N,B){this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.id="editor"+ ++_.$uid,this.commands=new b(p.isMac?"mac":"win",I),typeof document=="object"&&(this.textInput=new s(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new l(this),this.$search=new c().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(K,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new o("")),T.resetOptions(this),B&&this.setOptions(B),T._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(A){this.session.startOperation(A)},_.prototype.endOperation=function(A){this.session.endOperation(A)},_.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},_.prototype.onEndOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,B=N&&N.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),K=this.renderer.layerConfig;(U.start.row>=K.lastRow||U.end.row<=K.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},_.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,U=N.command&&A.command.name==N.command.name;if(A.command.name=="insertstring"){var K=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(K)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&B.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(A,N){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;T.loadModule(["keybinding",A],function(U){B.$keybindingId==A&&B.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),N&&N()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.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=A.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(A)),this._signal("changeSession",{session:A,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(A){this.renderer.onResize(A)},_.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(A){this.renderer.setStyle(A)},_.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(A){this.setOption("fontSize",A)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var N=A.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ue){N.removeMarker(ue)}),N.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Z=N.getMatchingBracketRanges(B,K);if(!Z){var te=new S(N,B.row,B.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=N.getMatchingTags(B);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(A.session)),!Z){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="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)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return N.addMarker(ue,ae,"text")})},A.getHighlightIndentGuides()&&A.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(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},_.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(A){var N=this.session.$useWrapMode,B=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,B,N),this._signal("change",A),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),A.$highlightLineMarker&&!N)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&N){var B=new d(N.row,N.column,N.row,1/0);B.id=A.addMarker(B,"ace_active-line","screenLine"),A.$highlightLineMarker=B}else N&&(A.$highlightLineMarker.start.row=N.row,A.$highlightLineMarker.end.row=N.row,A.$highlightLineMarker.start.column=N.column,A._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(A){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(B,"ace_selection",U)}var K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,K=A.getLine(N.start.row),Z=K.substring(B,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-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(A){this.renderer.updateText(),this._emit("changeMode",A)},_.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 A=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!A&&this.$copyWithEmptySelection){B=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var Z=U[K];K&&U[K-1].start.row==Z.start.row||(A+=this.session.getLine(Z.start.row)+N)}}var te={text:A};return this._signal("copy",te),L.lineMode=B?te.text:!1,te.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},_.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===L.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(B)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,N);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},_.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},_.prototype.insert=function(A,N){var B=this.session,U=B.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=U.transformAction(B.getState(K.row),"insertion",this,B,A);Z&&(A!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=Z.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
|
211
|
+
`)==-1){var te=d.fromPoints(K,K);te.end.column+=A.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(A==`
|
212
|
+
`||A==`\r
|
213
|
+
`){var ue=B.getLine(K.row);if(K.column>ue.search(/\S|$/)){var he=ue.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=B.getState(K.row),ue=B.getLine(K.row),ce=U.checkOutdent(ae,ue,A);if(B.insert(K,A),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new d(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new d(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(A)){var fe=U.getNextLineIndent(ae,ue.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},fe)}ce&&U.autoOutdent(ae,B,K.row)}},_.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new d(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=A.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,ae=B[he].end.row,ue=ne;ue<=ae;ue++){ue>0&&(U=A.getState(ue-1),K=A.getLine(ue-1),Z=N.getNextLineIndent(U,K,te));var ce=A.getLine(ue),fe=N.$getIndent(ce);if(Z!==fe){if(fe.length>0){var $e=new d(ue,0,ue,fe.length);A.remove($e)}Z.length>0&&A.insert({row:ue,column:0},Z)}N.autoOutdent(U,A,ue)}},_.prototype.onTextInput=function(A,N){if(!N)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,A,N);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},_.prototype.applyComposition=function(A,N){if(N.extendLeft||N.extendRight){var B=this.selection.getRange();B.start.column-=N.extendLeft,B.end.column+=N.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!A&&!B.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),N.restoreStart||N.restoreEnd){var B=this.selection.getRange();B.start.column-=N.restoreStart,B.end.column-=N.restoreEnd,this.selection.setRange(B)}},_.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},_.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(N.start.row),K=B.getMode().transformAction(U,"deletion",this,B,N);if(N.end.column===0){var Z=B.getTextRange(N);if(Z[Z.length-1]==`
|
214
|
+
`){var te=B.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},_.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(A)},_.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},_.prototype.removeGhostText=function(){this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),N=A.column;if(N!==0){var B=this.session.getLine(A.row),U,K;N<B.length?(U=B.charAt(N)+B.charAt(N-1),K=new d(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),K=new d(A.row,N-2,A.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},_.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toLowerCase()),this.selection.setSelectionRange(A)},_.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toUpperCase()),this.selection.setSelectionRange(A)},_.prototype.indent=function(){var A=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var U=A.getTextRange(N);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}}var K=A.getLine(N.start.row),Z=N.start,te=A.getTabSize(),he=A.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=h.stringRepeat(" ",ne);else{for(var ne=he%te;K[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),ae=" "}return this.insert(ae)},_.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},_.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},_.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),N=this.session,B=[],U=A.first;U<=A.last;U++)B.push(N.getLine(U));B.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new d(0,0,0,0),U=A.first;U<=A.last;U++){var Z=N.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,N.replace(K,B[U-A.first])}},_.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,N.first,N.last)},_.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),N=this.session.getState(A.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,A)},_.prototype.getNumberAt=function(A,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(A);B.lastIndex<N;){var K=B.exec(U);if(K.index<=N&&K.index+K[0].length>=N){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},_.prototype.modifyNumber=function(A){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new d(N,B-1,N,B),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(N,B);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&&B<te?A*=Math.pow(10,Z.end-B-1):A*=Math.pow(10,Z.end-B),ne+=A,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ue=new d(N,Z.start,N,Z.end);this.session.replace(ue,ae),this.moveCursorTo(N,Math.max(Z.start+1,B+ae.length-Z.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var A=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(qe,ht){he=te+qe.length,Z>=te&&Z<=he&&(B=qe,ne.selection.clearSelection(),ne.moveCursorTo(A,te+U),ne.selection.selectTo(A,he+U)),te=he});for(var ae=this.$toggleWordPairs,ue,ce=0;ce<ae.length;ce++)for(var fe=ae[ce],$e=0;$e<=1;$e++){var Te=+!$e,Ee=B.match(new RegExp("^\\s?_?("+h.escapeRegExp(fe[$e])+")\\s?$","i"));if(Ee){var Ge=B.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Ee[1])+")($|\\s)","g"));Ge&&(ue=B.replace(new RegExp(h.escapeRegExp(fe[$e]),"i"),function(qe){var ht=fe[Te];return qe.toUpperCase()==qe?ht=ht.toUpperCase():qe.charAt(0).toUpperCase()==qe.charAt(0)&&(ht=ht.substr(0,0)+fe[Te].charAt(0).toUpperCase()+ht.substr(1)),ht}),this.insert(ue),ue="")}}},_.prototype.findLinkAt=function(A,N){var B,U,K=this.session.getLine(A),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ne=0,ae;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]+)/)){ae=fe.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch($e){B={error:$e}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(B)throw B.error}}return ae},_.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},_.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var A=this.selection,N=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var K=B.start.row;N.duplicateLines(K,K)}else{var Z=U?B.start:B.end,te=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=te,A.setSelectionRange(B,U)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(A,N){var B,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var Z=K.toOrientedRange();B=this.$getSelectedRows(Z),U=this.session.$moveLines(B.first,B.last,N?0:A),N&&A==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ue=0;ue<ae;ue++){var ce=ue;te[ue].moveBy(he,0),B=this.$getSelectedRows(te[ue]);for(var fe=B.first,$e=B.last;++ue<ae;){ne&&te[ue].moveBy(ne,0);var Te=this.$getSelectedRows(te[ue]);if(N&&Te.first!=$e||!N&&Te.first>$e+1)break;$e=Te.last}for(ue--,he=this.session.$moveLines(fe,$e,N?0:A),N&&A==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},_.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},_.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(A,N){var B=this.renderer,U=this.renderer.layerConfig,K=A*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):N===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var Z=B.scrollTop;B.scrollBy(0,K*U.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.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(A){this.renderer.scrollToRow(A)},_.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},_.prototype.centerSelection=function(){var A=this.getSelectionRange(),N={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(N,.5)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},_.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},_.prototype.jumpToMatching=function(A,N){var B=this.getCursorPosition(),U=new S(this.session,B.row,B.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ue=B.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(ae[ce])&&(ae[ce]=0),te.value[ue]){case"(":case"[":case"{":ae[ce]++;break;case")":case"]":case"}":ae[ce]--,ae[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var $e,Te;if(he==="bracket")$e=this.session.getBracketRange(B),$e||($e=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),Te=$e.start,(N||Te.row===B.row&&Math.abs(Te.column-B.column)<2)&&($e=this.session.getBracketRange(Te)));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(B.row,B.column)===0){var Ee=this.session.getMatchingTags(B);Ee&&(Ee.openTag.contains(B.row,B.column)?($e=Ee.closeTag,Te=$e.start):($e=Ee.openTag,Ee.closeTag.start.row===B.row&&Ee.closeTag.start.column===B.column?Te=$e.end:Te=$e.start))}Te=Te||$e.start}Te=$e&&$e.cursor||Te,Te&&(A?$e&&N?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},_.prototype.gotoLine=function(A,N,B){this.selection.clearSelection(),this.session.unfold({row:A-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,N||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,B)},_.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},_.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},_.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},_.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},_.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.prototype.replace=function(A,N){N&&this.$search.set(N);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,A)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},_.prototype.replaceAll=function(A,N){N&&this.$search.set(N);var B=this.$search.findAll(this.session),U=0;if(!B.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=B.length-1;Z>=0;--Z)this.$tryReplace(B[Z],A)&&U++;return this.selection.setSelectionRange(K),U},_.prototype.$tryReplace=function(A,N){var B=this.session.getTextRange(A);return N=this.$search.replace(B,N),N!==null?(A.end=this.session.replace(A,N),A):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&y.mixin(N,A);var U=this.selection.getRange();N.needle==null&&(A=this.session.getTextRange(U)||this.$search.$options.needle,A||(U=this.session.getWordRange(U.start.row,U.start.column),A=this.session.getTextRange(U)),this.$search.set({needle:A})),this.$search.set(N),N.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(N.preventScroll)return K;if(K)return this.revealRange(K,B),K;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},_.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},_.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},_.prototype.revealRange=function(A,N){this.session.unfold(A),this.selection.setSelectionRange(A);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),N!==!1&&this.renderer.animateScrolling(B)},_.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.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=null),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(A){if(A){var N,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(N=B.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ne=B.renderer,ae=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=ae.top-ue.offset;ae.top>=0&&ce+N.top<0?U=!0:ae.top<ue.height&&ae.top+N.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ce+"px",K.style.left=ae.left+"px",K.style.height=ue.lineHeight+"px",K.scrollIntoView(U)),U=N=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 A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",x.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},_.prototype.prompt=function(A,N,B){var U=this;T.loadModule("ace/ext/prompt",function(K){K.prompt(U,A,N,B)})},_}();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),T.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 A=this;this.textInput.setReadOnly(_),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(U=B&&B.key&&B.key.length==1&&!B.ctrlKey&&!B.metaKey,!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){A.hoverTooltip||(A.hoverTooltip=new H);var K=x.createElement("div");K.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),K)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var N=this.textInput.getElement();_?(E.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(E.removeListener(N,"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?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?O.attach(this):O.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&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(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var N=x.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;_?(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",N.bind(this)),this.commands.addCommand(A),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),B||(B=new C(this)),B.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",N.bind(this)),this.commands.removeCommand(A),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(_){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 O={getText:function(_,A){return(Math.abs(_.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(_,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(_,A){A.renderer.$loop.schedule(A.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),l=s.documentToScreenRow(h,0)*p.lineHeight;return l-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 l=g.createElement("div");a&&a(l),this.element.appendChild(l),u={element:l,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 l(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 l.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},l.prototype.addGutterDecoration=function(o,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,c)},l.prototype.removeGutterDecoration=function(o,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,c)},l.prototype.setAnnotations=function(o){this.$annotations=[];for(var c=0;c<o.length;c++){var d=o[c],w=d.row,b=this.$annotations[w];b||(b=this.$annotations[w]={text:[],type:[],displayText:[]});var I=d.text,T=d.text,S=d.type;I=I?x.escapeHTML(I):d.html||"",T=T||d.html||"",b.text.indexOf(I)===-1&&(b.text.push(I),b.type.push(S),b.displayText.push(T));var C=d.className;C?b.className=C:S==="error"?b.className=" ace_error":S==="security"&&!/\bace_error\b/.test(b.className)?b.className=" ace_security":S==="warning"&&!/\bace_(error|security)\b/.test(b.className)?b.className=" ace_warning":S==="info"&&!b.className?b.className=" ace_info":S==="hint"&&!b.className&&(b.className=" ace_hint")}},l.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var c=o.start.row,d=o.end.row-c;if(d!==0)if(o.action=="remove")this.$annotations.splice(c,d+1,null);else{var w=new Array(d+1);w.unshift(c,1),this.$annotations.splice.apply(this.$annotations,w)}}},l.prototype.update=function(o){this.config=o;var c=this.session,d=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,c.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var b=c.getNextFoldLine(d),I=b?b.start.row:1/0,T=null,S=-1,C=d;;){if(C>I&&(C=b.end.row+1,b=c.getNextFoldLine(C,b),I=b?b.start.row:1/0),C>w){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}T=this.$lines.get(++S),T?T.row=C:(T=this.$lines.createCell(C,o,this.session,u),this.$lines.push(T)),this.$renderCell(T,o,b,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$updateGutterWidth=function(o){var c=this.session,d=c.gutterRenderer||this.$renderer,w=c.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(b=c.getLength()+w-1);var I=d?d.getWidth(c,b,o):b.toString().length*o.characterWidth,T=this.$padding||this.$computePadding();I+=T.left+T.right,I!==this.gutterWidth&&!isNaN(I)&&(this.gutterWidth=I,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",I))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},l.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 c=this.$lines.cells;this.$cursorCell=null;for(var d=0;d<c.length;d++){var w=c[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==c[d-1].row)w=c[d-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},l.prototype.scrollLines=function(o){var c=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(c,o))return this.update(o);this.$lines.moveContainer(o);var d=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=d,!c||w<o.firstRow)return this.update(o);if(d<c.firstRow)return this.update(o);if(c.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(c.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<c.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,c.firstRow-1)),d>w&&this.$lines.push(this.$renderLines(o,w+1,d)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$renderLines=function(o,c,d){for(var w=[],b=c,I=this.session.getNextFoldLine(b),T=I?I.start.row:1/0;b>T&&(b=I.end.row+1,I=this.session.getNextFoldLine(b,I),T=I?I.start.row:1/0),!(b>d);){var S=this.$lines.createCell(b,o,this.session,u);this.$renderCell(S,o,I,b),w.push(S),b++}return w},l.prototype.$renderCell=function(o,c,d,w){var b=o.element,I=this.session,T=b.childNodes[0],S=b.childNodes[1],C=b.childNodes[2],R=b.childNodes[3],L=C.firstChild,F=I.$firstLineNumber,E=I.$breakpoints,H=I.$decorations,P=I.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&I.foldWidgets,_=d?d.start.row:Number.MAX_VALUE,A=c.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(I,w):w+F).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||d&&w<this.$cursorRow&&w>=_&&this.$cursorRow<=d.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),E[w]&&(N+=E[w]),H[w]&&(N+=H[w]),this.$annotations[w]&&w!==_&&(N+=this.$annotations[w].className),O){var K=O[w];K==null&&(K=O[w]=I.getFoldWidget(w))}if(K){var Z="ace_fold-widget ace_"+K,te=K=="start"&&w==_&&w<d.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,ae=w+1;ae<=d.end.row;ae++)if(this.$annotations[ae]){if(this.$annotations[ae].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[ae].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[ae].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}N+=he}else Z+=" ace_open";S.className!=Z&&(S.className=Z),g.setStyle(S.style,"height",A),g.setStyle(S.style,"display","inline-block"),S.setAttribute("role","button"),S.setAttribute("tabindex","-1");var ue=I.getFoldWidgetRange(w);ue?S.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?S.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])):S.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),te?(S.setAttribute("aria-expanded","false"),S.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(S.setAttribute("aria-expanded","true"),S.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else S&&(g.setStyle(S.style,"display","none"),S.setAttribute("tabindex","0"),S.removeAttribute("role"),S.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",L.className=B,L.className+=he,g.setStyle(L.style,"height",A),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",A);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",L.className=B,this.$useSvgGutterIcons?L.className+=this.$annotations[w].className:b.classList.add(this.$annotations[w].className.replace(" ","")),g.setStyle(L.style,"height",A),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",A);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!==T.data&&(T.data=U),b.className!=N&&(b.className=N),g.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,c,I)+"px"),g.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,c,I)+"px"),o.text=U,C.style.display==="none"&&S.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},l.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},l.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},l.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},l.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},l.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},l.prototype.$hideFoldWidget=function(o,c){var d=c||this.$getGutterCell(o);if(d&&d.element){var w=d.element.childNodes[1];w&&g.setStyle(w.style,"display","none")}},l.prototype.$showFoldWidget=function(o,c){var d=c||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")}},l.prototype.$getGutterCell=function(o){var c=this.$lines.cells,d=this.session.documentToScreenRow(o,0);return c[o-this.config.firstRowScreen-(o-d)]},l.prototype.$addCustomWidget=function(o,c,d){var w=c.className,b=c.label,I=c.title,T=c.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:b,title:I,callbacks:T},this.$hideFoldWidget(o,d);var S=d||this.$getGutterCell(o);if(S&&S.element){var C=S.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",I),g.setStyle(C.style,"display","inline-block"),g.setStyle(C.style,"height","inherit"),T&&T.onClick&&C.addEventListener("click",function(R){T.onClick(R,o),R.stopPropagation()}),S.element.appendChild(C)}},l.prototype.$removeCustomWidget=function(o,c){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,c);var d=c||this.$getGutterCell(o);if(d&&d.element){var w=d.element.querySelector(".ace_custom-widget");w&&d.element.removeChild(w)}},l.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},l.prototype.getRegion=function(o){var c=this.$padding||this.$computePadding(),d=this.element.getBoundingClientRect();if(o.x<c.left+d.left)return"markers";if(this.$showFoldWidgets&&o.x>d.right-c.right)return"foldWidgets"},l}();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(l){var o=document.createTextNode("");l.appendChild(o);var c=g.createElement("span");l.appendChild(c);var d=g.createElement("span");l.appendChild(d);var w=g.createElement("span");return d.appendChild(w),l}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 l=this.markers[u];if(!l.range){l.update(a,this,this.session,s);continue}var o=l.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),l.renderer){var c=this.$getTop(o.start.row,s),d=this.$padding+o.start.column*s.characterWidth;l.renderer(a,o,d,c,s)}else l.type=="fullLine"?this.drawFullLineMarker(a,o,l.clazz,s):l.type=="screenLine"?this.drawScreenLineMarker(a,o,l.clazz,s):o.isMultiLine()?l.type=="text"?this.drawTextMarker(a,o,l.clazz,s):this.drawMultiLineMarker(a,o,l.clazz,s):this.drawSingleLineMarker(a,o,l.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,l,o){for(var c=this.session,d=a.start.row,w=a.end.row,b=d,I=0,T=0,S=c.getScreenLastRowColumn(b),C=new g(b,a.start.column,b,T);b<=w;b++)C.start.row=C.end.row=b,C.start.column=b==d?a.start.column:c.getRowWrapIndent(b),C.end.column=S,I=T,T=S,S=b+1<w?c.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,I<T,T>S,b==w),l,b==w?0:1,o)},p.prototype.drawMultiLineMarker=function(s,a,u,l,o){var c=this.$padding,d=l.lineHeight,w=this.$getTop(a.start.row,l),b=c+a.start.column*l.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var I=a.clone();I.end.row=I.start.row,I.end.column=this.session.getLine(I.start.row).length,this.drawBidiSingleLineMarker(s,I,u+" ace_br1 ace_start",l,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+d+"px;right:"+c+"px;top:"+w+"px;left:"+b+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var I=a.clone();I.start.row=I.end.row,I.start.column=0,this.drawBidiSingleLineMarker(s,I,u+" ace_br12",l,null,o)}else{w=this.$getTop(a.end.row,l);var T=a.end.column*l.characterWidth;this.elt(u+" ace_br12","height:"+d+"px;width:"+T+"px;top:"+w+"px;left:"+c+"px;"+(o||""))}if(d=(a.end.row-a.start.row-1)*l.lineHeight,!(d<=0)){w=this.$getTop(a.start.row+1,l);var S=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(S?" ace_br"+S:""),"height:"+d+"px;right:"+c+"px;top:"+w+"px;left:"+c+"px;"+(o||""))}},p.prototype.drawSingleLineMarker=function(s,a,u,l,o,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,u,l,o,c);var d=l.lineHeight,w=(a.end.column+(o||0)-a.start.column)*l.characterWidth,b=this.$getTop(a.start.row,l),I=this.$padding+a.start.column*l.characterWidth;this.elt(u,"height:"+d+"px;width:"+w+"px;top:"+b+"px;left:"+I+"px;"+(c||""))},p.prototype.drawBidiSingleLineMarker=function(s,a,u,l,o,c){var d=l.lineHeight,w=this.$getTop(a.start.row,l),b=this.$padding,I=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);I.forEach(function(T){this.elt(u,"height:"+d+"px;width:"+(T.width+(o||0))+"px;top:"+w+"px;left:"+(b+T.left)+"px;"+(c||""))},this)},p.prototype.drawFullLineMarker=function(s,a,u,l,o){var c=this.$getTop(a.start.row,l),d=l.lineHeight;a.start.row!=a.end.row&&(d+=this.$getTop(a.end.row,l)-c),this.elt(u,"height:"+d+"px;top:"+c+"px;left:0;right:0;"+(o||""))},p.prototype.drawScreenLineMarker=function(s,a,u,l,o){var c=this.$getTop(a.start.row,l),d=l.lineHeight;this.elt(u,"height:"+d+"px;top:"+c+"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 l(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 l.prototype.$updateEolChar=function(){var o=this.session.doc,c=o.getNewLineCharacter()==`
|
216
|
+
`&&o.getNewLineMode()!="windows",d=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},l.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},l.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)},l.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},l.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var c=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),c.push(w)}else c.push(this.dom.createTextNode(x.stringRepeat(" ",d),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var b="ace_indent-guide",I=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):T,w=this.dom.createElement("span");w.className=b+I,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=b+S,w.textContent=C,this.$tabStrings[" "]=w}},l.prototype.updateLines=function(o,c,d){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(c,o.firstRow),b=Math.min(d,o.lastRow),I=this.element.childNodes,T=0,S=o.firstRow;S<w;S++){var C=this.session.getFoldLine(S);if(C)if(C.containsRow(w)){w=C.start.row;break}else S=C.end.row;T++}for(var R=!1,S=w,C=this.session.getNextFoldLine(S),L=C?C.start.row:1/0;S>L&&(S=C.end.row+1,C=this.session.getNextFoldLine(S,C),L=C?C.start.row:1/0),!(S>b);){var F=I[T++];if(F){this.dom.removeChildren(F),this.$renderLine(F,S,S==L?C:!1),R&&(F.style.top=this.$lines.computeLineTop(S,o,this.session)+"px");var E=o.lineHeight*this.session.getRowLength(S)+"px";F.style.height!=E&&(R=!0,F.style.height=E)}S++}if(R)for(;T<this.$lines.cells.length;){var H=this.$lines.cells[T++];H.element.style.top=this.$lines.computeLineTop(H.row,o,this.session)+"px"}},l.prototype.scrollLines=function(o){var c=this.config;if(this.config=o,this.$lines.pageChanged(c,o))return this.update(o);this.$lines.moveContainer(o);var d=o.lastRow,w=c?c.lastRow:-1;if(!c||w<o.firstRow)return this.update(o);if(d<c.firstRow)return this.update(o);if(!c||c.lastRow<o.firstRow)return this.update(o);if(o.lastRow<c.firstRow)return this.update(o);if(c.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(c.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(c.lastRow>o.lastRow)for(var b=this.session.getFoldedRowCount(o.lastRow+1,c.lastRow);b>0;b--)this.$lines.pop();o.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,c.firstRow-1)),o.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(o,c.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(o,c,d){for(var w=[],b=c,I=this.session.getNextFoldLine(b),T=I?I.start.row:1/0;b>T&&(b=I.end.row+1,I=this.session.getNextFoldLine(b,I),T=I?I.start.row:1/0),!(b>d);){var S=this.$lines.createCell(b,o,this.session),C=S.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==T?I:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(S),b++}return w},l.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var c=o.firstRow,d=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,c,d))},l.prototype.$renderToken=function(o,c,d,w){for(var b=this,I=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,T=this.dom.createFragment(this.element),S,C=0;S=I.exec(w);){var R=S[1],L=S[2],F=S[3],E=S[4],H=S[5];if(!(!b.showSpaces&&L)){var P=C!=S.index?w.slice(C,S.index):"";if(C=S.index+S[0].length,P&&T.appendChild(this.dom.createTextNode(P,this.element)),R){var O=b.session.getScreenTabSize(c+S.index);T.appendChild(b.$tabStrings[O].cloneNode(!0)),c+=O-1}else if(L)if(b.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=x.stringRepeat(b.SPACE_CHAR,L.length),T.appendChild(_)}else T.appendChild(this.dom.createTextNode(L,this.element));else if(F){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=x.stringRepeat(b.SPACE_CHAR,F.length),T.appendChild(_)}else if(E){c+=1;var _=this.dom.createElement("span");_.style.width=b.config.characterWidth*2+"px",_.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",_.textContent=b.showSpaces?b.SPACE_CHAR:E,T.appendChild(_)}else if(H){c+=1;var _=this.dom.createElement("span");_.style.width=b.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=H,T.appendChild(_)}}}if(T.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(d.type))o.appendChild(T);else{var A="ace_"+d.type.replace(/\./g," ace_"),_=this.dom.createElement("span");d.type=="fold"&&(_.style.width=d.value.length*this.config.characterWidth+"px",_.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),_.className=A,_.appendChild(T),o.appendChild(_)}return c+w.length},l.prototype.renderIndentGuide=function(o,c,d){var w=c.search(this.$indentGuideRe);if(w<=0||w>=d)return c;if(c[0]==" "){w-=w%this.tabSize;for(var b=w/this.tabSize,I=0;I<b;I++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}else if(c[0]==" "){for(var I=0;I<w;I++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}return this.$highlightIndentGuide(),c},l.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var c=this.session.selection.getCursor(),d=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,w=Math.floor(d/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:c.row};var b=this.session.$bracketHighlight;if(b){for(var I=this.session.$bracketHighlight.ranges,T=0;T<I.length;T++)if(c.row!==I[T].start.row){this.$highlightIndentGuideMarker.end=I[T].start.row+1,c.row>I[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[c.row]!==""&&c.column===o[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=c.row+1;T<o.length;T++){var S=o[T],C=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=T,C<=d))break}}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<o.length;c++)o[c].classList.remove("ace_indent-guide-active")},l.prototype.$setIndentGuideActive=function(o,c){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 I=b[c-1];I&&I.classList&&I.classList.contains("ace_indent-guide")&&I.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var 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,c)}}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,c)}}}},l.prototype.$createLineElement=function(o){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},l.prototype.$renderWrappedLine=function(o,c,d){var w=0,b=0,I=d[0],T=0,S=this.$createLineElement();o.appendChild(S);for(var C=0;C<c.length;C++){var R=c[C],L=R.value;if(C==0&&this.displayIndentGuides){if(w=L.length,L=this.renderIndentGuide(S,L,I),!L)continue;w-=L.length}if(w+L.length<I)T=this.$renderToken(S,T,R,L),w+=L.length;else{for(;w+L.length>=I;)T=this.$renderToken(S,T,R,L.substring(0,I-w)),L=L.substring(I-w),w=I,S=this.$createLineElement(),o.appendChild(S),S.appendChild(this.dom.createTextNode(x.stringRepeat(" ",d.indent),this.element)),b++,T=0,I=d[b]||Number.MAX_VALUE;L.length!=0&&(w+=L.length,T=this.$renderToken(S,T,R,L))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,T,null,"",!0)},l.prototype.$renderSimpleLine=function(o,c){for(var d=0,w=0;w<c.length;w++){var b=c[w],I=b.value;if(!(w==0&&this.displayIndentGuides&&(I=this.renderIndentGuide(o,I),!I))){if(d+I.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,d,b,I);d=this.$renderToken(o,d,b,I)}}},l.prototype.$renderOverflowMessage=function(o,c,d,w,b){d&&this.$renderToken(o,c,d,w.slice(0,this.MAX_LINE_LENGTH-c));var I=this.dom.createElement("span");I.className="ace_inline_button ace_keyword ace_toggle_wrap",I.textContent=b?"<hide>":"<click to see more...>",o.appendChild(I)},l.prototype.$renderLine=function(o,c,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(c)),d)var w=this.$getFoldLineTokens(c,d);else var w=this.session.getTokens(c);var b=o;if(w.length){var I=this.session.getRowSplitData(c);if(I&&I.length){this.$renderWrappedLine(o,w,I);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&&(c=d.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(T)}},l.prototype.$getFoldLineTokens=function(o,c){var d=this.session,w=[];function b(T,S,C){for(var R=0,L=0;L+T[R].value.length<S;)if(L+=T[R].value.length,R++,R==T.length)return;if(L!=S){var F=T[R].value.substring(S-L);F.length>C-S&&(F=F.substring(0,C-S)),w.push({type:T[R].type,value:F}),L=S+F.length,R+=1}for(;L<C&&R<T.length;){var F=T[R].value;F.length+L>C?w.push({type:T[R].type,value:F.substring(0,C-L)}):w.push(T[R]),L+=F.length,R+=1}}var I=d.getTokens(o);return c.walk(function(T,S,C,R,L){T!=null?w.push({type:"fold",value:T}):(L&&(I=d.getTokens(S)),I.length&&b(I,R,C))},c.end.row,this.session.getLine(c.end.row).length),w},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();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 l=this.getPixelPosition(p[s].cursor,!0);if(!((l.top>h.height+h.offset||l.top<0)&&s>1)){var o=this.cursors[a++]||this.addCursor(),c=o.style;this.drawCursor?this.drawCursor(o,l,h,p[s],this.session):this.isCursorInView(l,h)?(g.setStyle(c,"display","block"),g.translate(o,l.left,l.top),g.setStyle(c,"width",Math.round(h.characterWidth)+"px"),g.setStyle(c,"height",h.lineHeight+"px")):g.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=l,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(c,d){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var I in b)Object.prototype.hasOwnProperty.call(b,I)&&(w[I]=b[I])},o(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");o(c,d);function w(){this.constructor=c}c.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(c,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),c.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(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},o}();y.implement(a.prototype,p);var u=function(o){g(c,o);function c(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 c.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},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(d){this.element.style.height=d+"px"},c.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"},c.prototype.setScrollTop=function(d){this.scrollTop!=d&&(this.skipEvent=!0,this.scrollTop=d,this.element.scrollTop=d*this.coeff)},c}(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var l=function(o){g(c,o);function c(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 c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(d){this.element.style.width=d+"px"},c.prototype.setInnerWidth=function(d){this.inner.style.width=d+"px"},c.prototype.setScrollWidth=function(d){this.inner.style.width=d+"px"},c.prototype.setScrollLeft=function(d){this.scrollLeft!=d&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=d)},c}(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=l,r.VScrollBar=u,r.HScrollBar=l}),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 l=function(o,c){return l=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])},l(o,c)};return function(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(o,c);function d(){this.constructor=o}o.prototype=c===null?Object.create(c):(d.prototype=c.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 l(o,c){this.element=x.createElement("div"),this.element.className="ace_sb"+c,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 l.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},l}();y.implement(s.prototype,p);var a=function(l){g(o,l);function o(c,d){var w=l.call(this,c,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=c,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(c,d){if(c==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientY,I=function(E){b=E.clientY},T=function(){clearInterval(L)},S=d.clientY,C=this.thumbTop,R=function(){if(b!==void 0){var E=w.scrollTopFromThumbTop(C+b-S);E!==w.scrollTop&&w._emit("scroll",{data:E})}};h.capture(this.inner,I,T);var L=setInterval(R,20);return h.preventDefault(d)}var F=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(c){var d=c*(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(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(c,d){this.pageHeight===c&&!d||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=function(l){g(o,l);function o(c,d){var w=l.call(this,c,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=d,w}return o.prototype.onMouseDown=function(c,d){if(c==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientX,I=function(E){b=E.clientX},T=function(){clearInterval(L)},S=d.clientX,C=this.thumbLeft,R=function(){if(b!==void 0){var E=w.scrollLeftFromThumbLeft(C+b-S);E!==w.scrollLeft&&w._emit("scroll",{data:E})}};h.capture(this.inner,I,T);var L=setInterval(R,20);return h.preventDefault(d)}var F=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(c){var d=c*(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(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(c,d){this.pageWidth===c&&!d||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o}(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",l=200,o=function(){function c(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 c.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"},c.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})}},c.prototype.$addObserver=function(){var d=this;this.$observer=new window.ResizeObserver(function(w){d.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.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)},c.prototype.setPolling=function(d){d?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.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},c.prototype.$measureCharWidth=function(d){this.$main.textContent=x.stringRepeat(d,a);var w=this.$main.getBoundingClientRect();return w.width/a},c.prototype.getCharacterWidth=function(d){var w=this.charSizes[d];return w===void 0&&(w=this.charSizes[d]=this.$measureCharWidth(d)/this.$characterSize.width),w},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(d){return!d||!d.parentElement?1:(Number(window.getComputedStyle(d).zoom)||1)*this.$getZoom(d.parentElement)},c.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(l,0),d(0,l),d(l,l)],this.el)},c.prototype.transformCoordinates=function(d,w){if(d){var b=this.$getZoom(this.el);d=C(1/b,d)}function I(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 T(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function S(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 L=R(this.els[0]),F=R(this.els[1]),E=R(this.els[2]),H=R(this.els[3]),P=I(T(H,F),T(H,E),T(S(F,E),S(H,L))),O=C(1+P[0],T(F,L)),_=C(1+P[1],T(E,L));if(w){var A=w,N=P[0]*A[0]/l+P[1]*A[1]/l+1,B=S(C(A[0],O),C(A[1],_));return S(C(1/N/l,B),L)}var U=T(d,L),K=I(T(O,C(P[0],U)),T(_,C(P[1],U)),U);return C(l,K)},c}();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: fixed;
|
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
|
+
}
|
769
|
+
|
770
|
+
.ace_custom-widget {
|
771
|
+
background: none;
|
772
|
+
}
|
773
|
+
|
774
|
+
.ace_folding-enabled .ace_fold-widget {
|
775
|
+
display: inline-block;
|
776
|
+
}
|
777
|
+
|
778
|
+
.ace_fold-widget.ace_end {
|
779
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
780
|
+
}
|
781
|
+
|
782
|
+
.ace_fold-widget.ace_closed {
|
783
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
784
|
+
}
|
785
|
+
|
786
|
+
.ace_fold-widget:hover {
|
787
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
788
|
+
background-color: rgba(255, 255, 255, 0.2);
|
789
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
790
|
+
}
|
791
|
+
|
792
|
+
.ace_fold-widget:active {
|
793
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
794
|
+
background-color: rgba(0, 0, 0, 0.05);
|
795
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
796
|
+
}
|
797
|
+
/**
|
798
|
+
* Dark version for fold widgets
|
799
|
+
*/
|
800
|
+
.ace_dark .ace_fold-widget {
|
801
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
802
|
+
}
|
803
|
+
.ace_dark .ace_fold-widget.ace_end {
|
804
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
805
|
+
}
|
806
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
807
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
808
|
+
}
|
809
|
+
.ace_dark .ace_fold-widget:hover {
|
810
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
811
|
+
background-color: rgba(255, 255, 255, 0.1);
|
812
|
+
}
|
813
|
+
.ace_dark .ace_fold-widget:active {
|
814
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
815
|
+
}
|
816
|
+
|
817
|
+
.ace_inline_button {
|
818
|
+
border: 1px solid lightgray;
|
819
|
+
display: inline-block;
|
820
|
+
margin: -1px 8px;
|
821
|
+
padding: 0 5px;
|
822
|
+
pointer-events: auto;
|
823
|
+
cursor: pointer;
|
824
|
+
}
|
825
|
+
.ace_inline_button:hover {
|
826
|
+
border-color: gray;
|
827
|
+
background: rgba(200,200,200,0.2);
|
828
|
+
display: inline-block;
|
829
|
+
pointer-events: auto;
|
830
|
+
}
|
831
|
+
|
832
|
+
.ace_fold-widget.ace_invalid {
|
833
|
+
background-color: #FFB4B4;
|
834
|
+
border-color: #DE5555;
|
835
|
+
}
|
836
|
+
|
837
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
838
|
+
transition: opacity 0.4s ease 0.05s;
|
839
|
+
opacity: 0;
|
840
|
+
}
|
841
|
+
|
842
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
843
|
+
transition: opacity 0.05s ease 0.05s;
|
844
|
+
opacity:1;
|
845
|
+
}
|
846
|
+
|
847
|
+
.ace_underline {
|
848
|
+
text-decoration: underline;
|
849
|
+
}
|
850
|
+
|
851
|
+
.ace_bold {
|
852
|
+
font-weight: bold;
|
853
|
+
}
|
854
|
+
|
855
|
+
.ace_nobold .ace_bold {
|
856
|
+
font-weight: normal;
|
857
|
+
}
|
858
|
+
|
859
|
+
.ace_italic {
|
860
|
+
font-style: italic;
|
861
|
+
}
|
862
|
+
|
863
|
+
|
864
|
+
.ace_error-marker {
|
865
|
+
background-color: rgba(255, 0, 0,0.2);
|
866
|
+
position: absolute;
|
867
|
+
z-index: 9;
|
868
|
+
}
|
869
|
+
|
870
|
+
.ace_highlight-marker {
|
871
|
+
background-color: rgba(255, 255, 0,0.2);
|
872
|
+
position: absolute;
|
873
|
+
z-index: 8;
|
874
|
+
}
|
875
|
+
|
876
|
+
.ace_mobile-menu {
|
877
|
+
position: absolute;
|
878
|
+
line-height: 1.5;
|
879
|
+
border-radius: 4px;
|
880
|
+
-ms-user-select: none;
|
881
|
+
-moz-user-select: none;
|
882
|
+
-webkit-user-select: none;
|
883
|
+
user-select: none;
|
884
|
+
background: white;
|
885
|
+
box-shadow: 1px 3px 2px grey;
|
886
|
+
border: 1px solid #dcdcdc;
|
887
|
+
color: black;
|
888
|
+
}
|
889
|
+
.ace_dark > .ace_mobile-menu {
|
890
|
+
background: #333;
|
891
|
+
color: #ccc;
|
892
|
+
box-shadow: 1px 3px 2px grey;
|
893
|
+
border: 1px solid #444;
|
894
|
+
|
895
|
+
}
|
896
|
+
.ace_mobile-button {
|
897
|
+
padding: 2px;
|
898
|
+
cursor: pointer;
|
899
|
+
overflow: hidden;
|
900
|
+
}
|
901
|
+
.ace_mobile-button:hover {
|
902
|
+
background-color: #eee;
|
903
|
+
opacity:1;
|
904
|
+
}
|
905
|
+
.ace_mobile-button:active {
|
906
|
+
background-color: #ddd;
|
907
|
+
}
|
908
|
+
|
909
|
+
.ace_placeholder {
|
910
|
+
position: relative;
|
911
|
+
font-family: arial;
|
912
|
+
transform: scale(0.9);
|
913
|
+
transform-origin: left;
|
914
|
+
white-space: pre;
|
915
|
+
opacity: 0.7;
|
916
|
+
margin: 0 10px;
|
917
|
+
z-index: 1;
|
918
|
+
}
|
919
|
+
|
920
|
+
.ace_ghost_text {
|
921
|
+
opacity: 0.5;
|
922
|
+
font-style: italic;
|
923
|
+
}
|
924
|
+
|
925
|
+
.ace_ghost_text_container > div {
|
926
|
+
white-space: pre;
|
927
|
+
}
|
928
|
+
|
929
|
+
.ghost_text_line_wrapped::after {
|
930
|
+
content: "↩";
|
931
|
+
position: absolute;
|
932
|
+
}
|
933
|
+
|
934
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
935
|
+
margin: 0px 4px
|
936
|
+
}
|
937
|
+
|
938
|
+
.ace_screenreader-only {
|
939
|
+
position:absolute;
|
940
|
+
left:-10000px;
|
941
|
+
top:auto;
|
942
|
+
width:1px;
|
943
|
+
height:1px;
|
944
|
+
overflow:hidden;
|
945
|
+
}
|
946
|
+
|
947
|
+
.ace_hidden_token {
|
948
|
+
display: none;
|
949
|
+
}`}),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.canvas=g.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",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)"},s.element.appendChild(this.canvas)}return p.prototype.$updateDecorators=function(s){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var u=(s.lastRow+1)*this.lineHeight;u<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var l=this.canvas.getContext("2d");function o(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var c=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),c){var d={info:1,warning:2,error:3};c.forEach(function(H){H.priority=d[H.type]||null}),c=c.sort(o);for(var w=this.renderer.session.$foldData,b=0;b<c.length;b++){var I=c[b].row,T=this.compensateFoldRows(I,w),S=Math.round((I-T)*this.lineHeight*this.heightRatio),C=Math.round((I-T)*this.lineHeight*this.heightRatio),R=Math.round(((I-T)*this.lineHeight+this.lineHeight)*this.heightRatio),L=R-C;if(L<this.minDecorationHeight){var F=(C+R)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),C=Math.round(F-this.halfMinDecorationHeight),R=Math.round(F+this.halfMinDecorationHeight)}l.fillStyle=a[c[b].type]||null,l.fillRect(0,S,this.canvasWidth,R-C)}}var E=this.renderer.session.selection.getCursor();if(E){var T=this.compensateFoldRows(E.row,w),S=Math.round((E.row-T)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,S,this.canvasWidth,2)}},p.prototype.compensateFoldRows=function(s,a){var u=0;if(a&&a.length>0)for(var l=0;l<a.length;l++)s>a[l].start.row&&s<a[l].end.row?u+=s-a[l].start.row:s>=a[l].end.row&&(u+=a[l].end.row-a[l].start.row);return u},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,l=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,c=e("./scrollbar_custom").HScrollBar,d=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,I=e("./lib/event_emitter").EventEmitter,T=e("./css/editor-css"),S=e("./layer/decorators").Decorator,C=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;y.importCssString(T,"ace_editor.css",!1);var L=function(){function F(E,H){var P=this;this.container=E||y.createElement("div"),y.addCssClass(this.container,"ace_editor"),y.HI_DPI&&y.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),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 O=this.$textLayer=new a(this.content);this.canvas=O.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 l(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 F.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")},F.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(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))},F.prototype.updateLines=function(E,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:E,lastRow:H},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)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(E,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var _=this.container;O||(O=_.clientHeight||_.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",O=_.clientHeight||_.scrollHeight),P||(P=_.clientWidth||_.scrollWidth);var A=this.$updateCachedSize(E,H,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},F.prototype.$updateCachedSize=function(E,H,P,O){O-=this.$extraHeight||0;var _=0,A=this.$size,N={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(E||A.height!=O)&&(A.height=O,_|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),P&&(E||A.width!=P)){_|=this.CHANGE_SIZE,A.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,y.setStyle(this.scrollBarH.element.style,"left",H+"px"),y.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),A.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),y.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";y.setStyle(this.scrollBarH.element.style,"right",B),y.setStyle(this.scroller.style,"right",B),y.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(_|=this.CHANGE_FULL)}return A.$dirty=!P||!O,_&&this._signal("resize",N),_},F.prototype.onGutterResize=function(E){var H=this.$showGutter?E:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,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()},F.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},F.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},F.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=y.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=y.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){y.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){H&&H.markerRange&&(P=this.$cursorLayer.getPixelPosition(H.markerRange.start,!0));var O=this.layerConfig,_=P.top,A=P.left;_-=O.offset;var N=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if(_<0||_>O.height-N){y.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!H)_+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else _+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,y.setStyle(E,"height",N+"px"),y.setStyle(E,"width",B+"px"),y.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(_,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,H=E.lastRow,P=this.session.documentToScreenRow(H,0)*E.lineHeight;return P-this.session.getScrollTop()>E.height-E.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(E,H,P,O){var _=this.scrollMargin;_.top=E|0,_.bottom=H|0,_.right=O|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},F.prototype.setMargin=function(E,H,P,O){var _=this.margin;_.top=E|0,_.bottom=H|0,_.right=O|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},F.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-H&&(E=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(E,H){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!H){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),y.translate(this.content,-this.scrollLeft,-P.offset);var _=P.width+2*this.$padding+"px",A=P.minHeight+"px";y.setStyle(this.content.style,"width",_),y.setStyle(this.content.style,"height",A)}if(E&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)),E&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",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(E&this.CHANGE_GUTTER||E&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",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",E)},F.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,_=!O&&E>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var A=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var E=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),_=O*this.lineHeight,A=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-A-2*this.$padding<0),B=this.$horizScroll!==N;B&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=H.height<=2*this.lineHeight);var K=H.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(H.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,_-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,A+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-_+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ue=Math.ceil(K/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),fe=ce+ue,$e,Te,Ee=this.lineHeight;ce=E.screenToDocumentRow(ce,0);var Ge=E.getFoldLine(ce);Ge&&(ce=Ge.start.row),$e=E.documentToScreenRow(ce,0),Te=E.getRowLength(ce)*Ee,fe=Math.min(E.screenToDocumentRow(fe,0),E.getLength()-1),K=H.scrollerHeight+E.getRowLength(fe)*Ee+Te,ae=this.scrollTop-$e*Ee;var qe=0;return(this.layerConfig.width!=A||B)&&(qe=this.CHANGE_H_SCROLL),(B||ne)&&(qe|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:ce,firstRowScreen:$e,lastRow:fe,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:K,maxHeight:_,offset:ae,gutterOffset:Ee?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),qe},F.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(E>P.lastRow+1)&&!(H<P.firstRow)){if(H===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,E,H),!0}}},F.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(E,H){this.$gutterLayer.addGutterDecoration(E,H)},F.prototype.removeGutterDecoration=function(E,H){this.$gutterLayer.removeGutterDecoration(E,H)},F.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(E,H,P){this.scrollCursorIntoView(E,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(E,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(E),_=O.left,A=O.top,N=P&&P.top||0,B=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>A?(H&&U+N>A+this.lineHeight&&(A-=H*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(H&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=H*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;_-Z<K?(_-=Z,_<this.$padding+Z&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=Z,K+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&_-K<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},F.prototype.alignCursor=function(E,H){typeof E=="number"&&(E={row:E,column:0});var P=this.$cursorLayer.getPixelPosition(E),O=this.$size.scrollerHeight-this.lineHeight,_=P.top-O*(H||0);return this.session.setScrollTop(_),_},F.prototype.$calcSteps=function(E,H){var P=0,O=this.STEPS,_=[],A=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(P=0;P<O;++P)_.push(A(P/this.STEPS,E,H-E));return _},F.prototype.scrollToLine=function(E,H,P,O){var _=this.$cursorLayer.getPixelPosition({row:E,column:0}),A=_.top;H&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),P!==!1&&this.animateScrolling(N,O)},F.prototype.animateScrolling=function(E,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(E==P)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(E=_[0],E==P))return}var A=O.$calcSteps(E,P);this.$scrollAnimation={from:E,to:P,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=P;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,H&&H()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);A.length?(O.session.setScrollTop(A.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):N()},10)},F.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},F.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(E,H){this.session.setScrollTop(H),this.session.setScrollLeft(E)},F.prototype.scrollBy=function(E,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},F.prototype.isScrollableBy=function(E,H){if(H<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||H>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(E,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,H]);E=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-P.left-this.$padding,A=_/this.characterWidth,N=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),B=this.$blockCursor?Math.floor(A):Math.round(A);return{row:N,column:B,side:A-B>0?1:-1,offsetX:_}},F.prototype.screenToTextCoordinates=function(E,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,H]);E=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-P.left-this.$padding,A=_/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),_)},F.prototype.textToScreenCoordinates=function(E,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(E,H),_=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,E)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:P.left+_-this.scrollLeft,pageY:P.top+A-this.scrollTop}},F.prototype.visualizeFocus=function(){y.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){y.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(y.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(E){var H=this.session.selection.cursor;this.addToken(E,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.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 E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(E,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(E,O);this.addToken(_[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:E,position:{row:O.row,column:O.column}};var A=y.createElement("div");if(_.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;_.slice(1).forEach(function(ne){var ae=y.createElement("div"),ue=y.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(y.createTextNode(ne.text)),ae.appendChild(ue),A.appendChild(ae),B=ae}),N.forEach(function(ne){var ae=y.createElement("span");R(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(y.createTextNode(ne.value)),B.appendChild(ae)}),this.$ghostTextWidget={el:A,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),K=this.container,Z=K.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(O.row)}},F.prototype.$calculateWrappedTextChunks=function(E,H){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var _=E.split(/\r?\n/),A=[],N=0;N<_.length;N++){var B=this.session.$getDisplayTokens(_[N],H.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(_[N].length);for(var Z=0;Z<U.length;Z++){var te=_[N].slice(K,U[Z]);A.push({text:te,wrapped:!0}),K=U[Z]}}else A.push({text:_[N],wrapped:!1})}return A},F.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(E,H,P,O){var _=this.session;_.bgTokenizer.lines[P]=null;var A={type:H,value:E},N=_.getTokens(P);if(O==null||!N.length)N.push(A);else for(var B=0,U=0;U<N.length;U++){var K=N[U];if(B+=K.value.length,O<=B){var Z=K.value.length-(B-O),te=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:te},A,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(E,H){for(var P=this.session.getTokens(E),O=0,_=!1,A=[],N=0;N<P.length;N++){var B=P[N];if(O+=B.value.length,B.type!=="ghost_text"){if(_){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===H&&(_=!0)}}return this.updateLines(E,E),A},F.prototype.removeExtraToken=function(E,H){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},F.prototype.setTheme=function(E,H){var P=this;if(this.$themeId=E,P._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var O=E||this.$options.theme.initialValue;h.loadModule(["theme",O],_)}else _(E);function _(A){if(P.$themeId!=E)return H&&H();if(!A||!A.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");A.$id&&(P.$themeId=A.$id),y.importCssString(A.cssText,A.cssClass,P.container),P.theme&&y.removeCssClass(P.container,P.theme.cssClass);var N="padding"in A?A.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&N!=P.$padding&&P.setPadding(N),P.$theme=A.cssClass,P.theme=A,y.addCssClass(P.container,A.cssClass),y.setCssClass(P.container,"ace_dark",A.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:A}),H&&H(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(E,H){y.setCssClass(this.container,E,H!==!1)},F.prototype.unsetStyle=function(E){y.removeCssClass(this.container,E)},F.prototype.setCursorStyle=function(E){y.setStyle(this.scroller.style,"cursor",E)},F.prototype.setMouseCursor=function(E){y.setStyle(this.scroller.style,"cursor",E)},F.prototype.attachToShadowRoot=function(){y.importCssString(T,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(E){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,E===!0?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new S(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=x.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,O=H[0].contentRect.height;Math.abs(E.$size.width-P)>1||Math.abs(E.$size.height-O)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,g.implement(L.prototype,I),h.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&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(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){y.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=L}),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(l){var o="importScripts('"+y.qualifyURL(l)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,d=new c;return d.append(o),d.getBlob("application/javascript")}}function s(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var o=p(l),c=window.URL||window.webkitURL,d=c.createObjectURL(o);return new Worker(d)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,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(l,o,c,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 I={};l.forEach(function(T){I[T]=b(e.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(d),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:I,module:o,classname:c}),this.$worker},this.onMessage=function(l){var o=l.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var c=this.callbacks[o.id];c&&(c(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return y.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,o){this.$worker.postMessage({command:l,args:o})},this.call=function(l,o,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,o.push(d)}this.send(l,o)},this.emit=function(l,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:l,data:{data:o.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var u=function(l,o,c){var d=null,w=!1,b=Object.create(x),I=[],T=new a({messageBuffer:I,terminate:function(){},postMessage:function(C){I.push(C),d&&(w?setTimeout(S):S())}});T.setEmitSync=function(C){w=C};var S=function(){var C=I.shift();C.command?d[C.command].apply(d,C.args):C.event&&b._signal(C.event,C.data)};return b.postMessage=function(C){T.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[c](b);I.length;)S()}),T};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,l,o,c){var d=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,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 l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=u.addMarker(new g(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var c=a.createAnchor(o.row,o.column);c.$insertRight=!0,c.detach(),s.others.push(c)}),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,l=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),l&&(this.length+=u),l&&!this.session.$fromUndo){if(s.action==="insert")for(var c=this.others.length-1;c>=0;c--){var d=this.others[c],w={row:d.row,column:d.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var c=this.others.length-1;c>=0;c--){var d=this.others[c],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,c){a.removeMarker(o.markerId),o.markerId=a.addMarker(new g(o.row,o.column,o.row,o.column+s.length),c,null,!1)};u(this.pos,this.mainClass);for(var l=this.others.length;l--;)u(this.others[l],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,l=s.ctrlKey,o=p.getAccelKey(),c=p.getButton();if(l&&y.isMac&&(c=s.button),p.editor.inMultiSelectMode&&c==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!l&&!a&&!o){c===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(c===0){var d=p.editor,w=d.selection,b=d.inMultiSelectMode,I=p.getDocumentPosition(),T=w.getCursor(),S=p.inSelection()||w.isEmpty()&&x(I,T),C=p.x,R=p.y,L=function(te){C=te.clientX,R=te.clientY},F=d.session,E=d.renderer.pixelToScreenCoordinates(C,R),H=E,P;if(d.$mouseHandler.$enableJumpToDef)l&&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&&S)return;if(!b){var O=w.toOrientedRange();d.addSelectionMarker(O)}var _=w.rangeList.rangeAtPoint(I);d.inVirtualSelectionMode=!0,u&&(_=null,O=w.ranges[0]||O,d.removeSelectionMarker(O)),d.once("mouseup",function(){var te=w.toOrientedRange();_&&te.isEmpty()&&x(_.cursor,te.cursor)?w.substractPoint(te.cursor):(u?w.substractPoint(O.cursor):O&&(d.removeSelectionMarker(O),w.addRange(O)),w.addRange(te)),d.inVirtualSelectionMode=!1})}else if(P=="block"){p.stop(),d.inVirtualSelectionMode=!0;var A,N=[],B=function(){var te=d.renderer.pixelToScreenCoordinates(C,R),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);x(H,te)&&x(he,w.lead)||(H=te,d.selection.moveToPosition(he),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(N),N=w.rectangularRangeBlock(H,E),d.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=d.$mouseHandler.$clickSelection.clone()),N.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};b&&!o?w.toSingleRange():!b&&o&&(A=w.toOrientedRange(),d.addSelectionMarker(A)),u?E=F.documentToScreenPosition(w.lead):w.moveToPosition(I),H={row:-1,column:-1};var U=function(te){B(),clearInterval(Z),d.removeSelectionMarkers(N),N.length||(N=[w.toOrientedRange()]),A&&(d.removeSelectionMarker(A),w.toSingleRange(A));for(var he=0;he<N.length;he++)w.addRange(N[he]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null},K=B;g.capture(d.container,L,U);var Z=setInterval(function(){K()},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,l=new u;function o(T,S,C){return l.$options.wrap=!0,l.$options.needle=S,l.$options.backwards=C==-1,l.find(T)}var c=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,S){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),S||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}T.cursor||(T.cursor=T.end);var R=this.rangeList.add(T);return this.$onAddRange(T),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)),S||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var S=this.rangeList.removeAll();S.length&&this.$onRemoveRange(S),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var S=this.rangeList.substractPoint(T);if(S)return this.$onRemoveRange(S),S[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var S=this.rangeList.ranges.pop();T.push(S),this.rangeCount=0}for(var C=T.length;C--;){var R=this.ranges.indexOf(T[C]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),S=S||this.ranges[0],S&&!S.isEqual(this.getRange())&&this.fromOrientedRange(S)},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 T=this.ranges.length?this.ranges:[this.getRange()],S=[],C=0;C<T.length;C++){var R=T[C],L=R.start.row,F=R.end.row;if(L===F)S.push(R.clone());else{for(S.push(new y(L,R.start.column,L,this.session.getLine(L).length));++L<F;)S.push(this.getLineRange(L,!0));S.push(new y(F,0,F,R.end.column))}C==0&&!this.isBackwards()&&(S=S.reverse())}this.toSingleRange();for(var C=S.length;C--;)this.addRange(S[C])},this.joinSelections=function(){var T=this.rangeList.ranges,S=T[T.length-1],C=y.fromPoints(T[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,S=T[T.length-1],C=y.fromPoints(T[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)}else{var R=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(R,L);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,S,C){var R=[],L=T.column<S.column;if(L)var F=T.column,E=S.column,H=T.offsetX,P=S.offsetX;else var F=S.column,E=T.column,H=S.offsetX,P=T.offsetX;var O=T.row<S.row;if(O)var _=T.row,A=S.row;else var _=S.row,A=T.row;F<0&&(F=0),_<0&&(_=0),_==A&&(C=!0);for(var N,B=_;B<=A;B++){var U=y.fromPoints(this.session.screenToDocumentPosition(B,F,H),this.session.screenToDocumentPosition(B,E,P));if(U.isEmpty()){if(N&&w(U.end,N))break;N=U.end}U.cursor=L?U.start:U.end,R.push(U)}if(O&&R.reverse(),!C){for(var K=R.length-1;R[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var te=K;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(T){T.cursor||(T.cursor=T.end);var S=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",S),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var S=this.session.$selectionMarkers.indexOf(T);S!=-1&&this.session.$selectionMarkers.splice(S,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var S=this.session.$selectionMarkers,C=T.length;C--;){var R=T[C];if(R.marker){this.session.removeMarker(R.marker);var L=S.indexOf(R);L!=-1&&S.splice(L,1)}}this.session.selectionMarkerCount=S.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){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(T){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(T){var S=T.command,C=T.editor;if(C.multiSelect){if(S.multiSelectAction)S.multiSelectAction=="forEach"?R=C.forEachSelection(S,T.args):S.multiSelectAction=="forEachLine"?R=C.forEachSelection(S,T.args,!0):S.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=S.exec(C,T.args||{})):R=S.multiSelectAction(C,T.args||{});else{var R=S.exec(C,T.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(T,S,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,L=C==!0||C&&C.$byLines,F=this.session,E=this.selection,H=E.rangeList,P=(R?E:H).ranges,O;if(!P.length)return T.exec?T.exec(this,S||{}):T(this,S||{});var _=E._eventRegistry;E._eventRegistry={};var A=new x(F);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(L)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;A.fromOrientedRange(P[N]),A.index=N,this.selection=F.selection=A;var B=T.exec?T.exec(this,S||{}):T(this,S||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(P[N])}A.detach(),this.selection=F.selection=E,this.inVirtualSelectionMode=!1,E._eventRegistry=_,E.mergeOverlappingRanges(),E.ranges[0]&&E.fromOrientedRange(E.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var S=this.multiSelect.rangeList.ranges,C=[],R=0;R<S.length;R++)C.push(this.session.getTextRange(S[R]));var L=this.session.getDocument().getNewLineCharacter();T=C.join(L),T.length==(C.length-1)*L.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,S){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&S==this.multiSelect.anchor)return;var R=S==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=S.row||this.session.$clipPositionToDocument(R.row,R.column).column!=S.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,S,C){if(S=S||{},S.needle=T||S.needle,S.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();S.needle=this.session.getTextRange(R)}this.$search.set(S);var L=this.$search.findAll(this.session);if(!L.length)return 0;var F=this.multiSelect;C||F.toSingleRange(L[0]);for(var E=L.length;E--;)F.addRange(L[E],!0);return R&&F.rangeList.rangeAtPoint(R.start)&&F.addRange(R,!0),L.length},this.selectMoreLines=function(T,S){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,L=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(L.row+T,L.column);if(C.isEmpty())var H=F;else var E=this.session.documentToScreenPosition(R?C.end:C.start),H=this.session.screenToDocumentPosition(E.row+T,E.column);if(R){var P=y.fromPoints(F,H);P.cursor=P.start}else{var P=y.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(S)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function(T){for(var S=this.session,C=S.multiSelect,R=C.ranges,L=R.length;L--;){var F=R[L];if(F.isEmpty()){var E=S.getWordRange(F.start.row,F.start.column);F.start.row=E.start.row,F.start.column=E.start.column,F.end.row=E.end.row,F.end.column=E.end.column}}C.mergeOverlappingRanges();for(var H=[],L=R.length;L--;){var F=R[L];H.unshift(S.getTextRange(F))}T<0?H.unshift(H.pop()):H.push(H.shift());for(var L=R.length;L--;){var F=R[L],P=F.clone();S.replace(F,H[L]),F.start.row=P.start.row,F.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(T,S,C){var R=this.session,L=R.multiSelect,F=L.toOrientedRange();if(!(F.isEmpty()&&(F=R.getWordRange(F.start.row,F.start.column),F.cursor=T==-1?F.start:F.end,this.multiSelect.addRange(F),C))){var E=R.getTextRange(F),H=o(R,E,T);H&&(H.cursor=T==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),S&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var T=this.session,S=T.multiSelect,C=S.ranges,R=-1,L=C.filter(function(K){if(K.cursor.row==R)return!0;R=K.cursor.row});if(!C.length||L.length==C.length-1){var F=this.selection.getRange(),E=F.start.row,H=F.end.row,P=E==H;if(P){var O=this.session.getLength(),_;do _=this.session.getLine(H);while(/[=:]/.test(_)&&++H<O);do _=this.session.getLine(E);while(/[=:]/.test(_)&&--E>0);E<0&&(E=0),H>=O&&(H=O-1)}var A=this.session.removeFullLines(E,H);A=this.$reAlignText(A,P),this.session.insert({row:E,column:0},A.join(`
|
950
|
+
`)+`
|
951
|
+
`),P||(F.start.column=0,F.end.column=A[A.length-1].length),this.selection.setRange(F)}else{L.forEach(function(K){S.substractPoint(K.cursor)});var N=0,B=1/0,U=C.map(function(K){var Z=K.cursor,te=T.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>N&&(N=Z.column),he<B&&(B=he),he});C.forEach(function(K,Z){var te=K.cursor,he=N-te.column,ne=U[Z]-B;he>ne?T.insert(te,s.stringRepeat(" ",he-ne)):T.remove(new y(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=te.row,K.cursor=K.end}),S.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,S){var C=!0,R=!0,L,F,E;return T.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?L==null?(L=N[1].length,F=N[2].length,E=N[3].length,N):(L+F+E!=N[1].length+N[2].length+N[3].length&&(R=!1),L!=N[1].length&&(C=!1),L>N[1].length&&(L=N[1].length),F<N[2].length&&(F=N[2].length),E>N[3].length&&(E=N[3].length),N):[A]}).map(S?P:C?R?O:P:_);function H(A){return s.stringRepeat(" ",A)}function P(A){return A[2]?H(L)+A[2]+H(F-A[2].length+E)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?H(L+F-A[2].length)+A[2]+H(E)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function _(A){return A[2]?H(L)+A[2]+H(E)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(d.prototype);function w(T,S){return T.row==S.row&&T.column==S.column}r.onSessionChange=function(T){var S=T.session;S&&!S.multiSelect&&(S.$selectionMarkers=[],S.selection.$initRangeList(),S.multiSelect=S.selection),this.multiSelect=S&&S.multiSelect;var C=T.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)),S&&(S.multiSelect.on("addRange",this.$onAddRange),S.multiSelect.on("removeRange",this.$onRemoveRange),S.multiSelect.on("multiSelect",this.$onMultiSelect),S.multiSelect.on("singleSelect",this.$onSingleSelect),S.multiSelect.lead.on("change",this.$checkMultiselectChange),S.multiSelect.anchor.on("change",this.$checkMultiselectChange)),S&&this.inMultiSelectMode!=S.selection.inMultiSelectMode&&(S.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=r.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",h),T.commands.addCommands(a.defaultCommands),I(T))}function I(T){if(!T.textInput)return;var S=T.textInput.getElement(),C=!1;p.addListener(S,"keydown",function(L){var F=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);T.$blockSelectEnabled&&F?C||(T.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},T),p.addListener(S,"keyup",R,T),p.addListener(S,"blur",R,T);function R(L){C&&(T.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=b,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(T){b(this),T?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},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 l=p||a.length,o=x.getLength(),c=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>c){var I=x.getLine(d).length;return new g(c,l,d,I)}}},this.openingBracketBlock=function(x,h,p,s,a){var u={row:p,column:s+1},l=x.$findClosingBracket(h,u,a);if(l){var o=x.foldWidgets[l.row];return o==null&&(o=x.getFoldWidget(l.row)),o=="start"&&l.row>u.row&&(l.row--,l.column=x.getLine(l.row).length),g.fromPoints(u,l)}},this.closingBracketBlock=function(x,h,p,s,a){var u={row:p,column:s},l=x.$findOpeningBracket(h,u);if(l)return l.column++,u.column--,g.fromPoints(l,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 l=0,o=s.length-1;l<=o;){var c=l+o>>1,d=u(a,s[c]);if(d>0)l=c+1;else if(d<0)o=c-1;else return c}return-(l+1)}function p(s,a,u){var l=s.getAnnotations().sort(y.comparePoints);if(l.length){var o=h(l,{row:a,column:-1},y.comparePoints);o<0&&(o=-o-1),o>=l.length?o=u>0?0:l.length-1:o===0&&u<0&&(o=l.length-1);var c=l[o];if(!(!c||!u)){if(c.row===a){do c=l[o+=u];while(c&&c.row===a);if(!c)return l.slice()}var d=[];a=c.row;do d[u<0?"unshift":"push"](c),c=l[o+=u];while(c&&c.row==a);return d.length&&d}}}r.showErrorMarker=function(s,a){var u=s.session,l=s.getCursorPosition(),o=l.row,c=u.widgetManager.getWidgetsAtRow(o).filter(function(L){return L.type=="errorMarker"})[0];c?c.destroy():o-=a;var d=p(u,o,a),w;if(d){var b=d[0];l.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,l.row=b.row,w=s.renderer.$gutterLayer.$annotations[l.row]}else{if(c)return;w={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(l.row),s.selection.moveToPosition(l);var I={row:l.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div"),type:"errorMarker"},T=I.el.appendChild(g.createElement("div")),S=I.el.appendChild(g.createElement("div"));S.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(l).left;S.style.left=C+s.renderer.gutterWidth-5+"px",I.el.className="error_widget_wrapper",T.className="error_widget "+w.className,w.displayText.forEach(function(L,F){T.appendChild(g.createTextNode(L)),F<w.displayText.length-1&&T.appendChild(g.createElement("br"))}),T.appendChild(g.createElement("div"));var R=function(L,F,E){if(F===0&&(E==="esc"||E==="return"))return I.destroy(),{command:"null"}};I.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(I),s.off("changeSelection",I.destroy),s.off("changeSession",I.destroy),s.off("mouseup",I.destroy),s.off("change",I.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",I.destroy),s.on("changeSession",I.destroy),s.on("mouseup",I.destroy),s.on("change",I.destroy),s.session.widgetManager.addLineWidget(I),I.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:I.el.offsetHeight})},g.importCssString(`
|
952
|
+
.error_widget_wrapper {
|
953
|
+
background: inherit;
|
954
|
+
color: inherit;
|
955
|
+
border:none
|
956
|
+
}
|
957
|
+
.error_widget {
|
958
|
+
border-top: solid 2px;
|
959
|
+
border-bottom: solid 2px;
|
960
|
+
margin: 5px 0;
|
961
|
+
padding: 10px 40px;
|
962
|
+
white-space: pre-wrap;
|
963
|
+
}
|
964
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
965
|
+
border-color: #ff5a5a
|
966
|
+
}
|
967
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
968
|
+
border-color: #F1D817
|
969
|
+
}
|
970
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
971
|
+
border-color: #5a5a5a
|
972
|
+
}
|
973
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
974
|
+
border-color: #5aaa5a
|
975
|
+
}
|
976
|
+
.error_widget_arrow {
|
977
|
+
position: absolute;
|
978
|
+
border: solid 5px;
|
979
|
+
border-top-color: transparent!important;
|
980
|
+
border-right-color: transparent!important;
|
981
|
+
border-left-color: transparent!important;
|
982
|
+
top: -5px;
|
983
|
+
}
|
984
|
+
`,"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,l){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 c="";if(u&&/input|textarea/i.test(u.tagName)){var d=u;c=d.value,u=g.createElement("pre"),d.parentNode.replaceChild(u,d)}else u&&(c=u.textContent,u.innerHTML="");var w=r.createEditSession(c),b=new x(new s(u),w,l),I={document:w,editor:b,onResize:b.resize.bind(b,null)};return d&&(I.textarea=d),b.on("destroy",function(){I.editor.container.env=null}),b.container.env=b.env=I,b},r.createEditSession=function(u,l){var o=new h(u,l);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)})}()}(Op)),Op.exports}var j2=Pn("b",O0()),Dp={exports:{}},Fp;function N0(){return Fp||(Fp=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/},l=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},c=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},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",I="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",S=this.$keywords=this.createKeywordMapper({keyword:b,"constant.language":I,"variable.language":T,"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(L,F,E){E.length&&(E=[]);var H=L[L.length-1];return E.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(L,F,E){E.length&&(E=[]);var H=L[L.length-1];return E.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(L,F,E){E.length&&(E=[]);var H=L[L.length-1];return E.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(L,F,E){E.length&&(E=[]);var H=L[L.length-1];return E.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(L,F,E){E.length&&(E=[]);var H=L[L.length-1];return E.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,l,x,h,o,p,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:S,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(L,F,E){var H=L[2]=="-"||L[2]=="~"?"indentedHeredoc":"heredoc",P=L.split(this.splitRegex);return E.push(H,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(L,F,E){return L===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(L,F,E){return L===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(L,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:L}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(L,F,E){return this.next="",L=="}"&&E.length>1&&E[1]!="start"&&(E.shift(),this.next=E.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(L,F,E){return E.length&&L===E[0]?(E.unshift(L,F),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(L,F,E){return E.length&&L===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,F,E){return E.length&&L===E[0]?(E.unshift(L,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,F,E){return E.length&&L===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,F,E){return E.length&&L===E[0]?(E.unshift(L,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,F,E){return E.length&&L===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,F,E){return E.length&&L===E[0]?(E.unshift(L,F),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(L,F,E){return E.length&&L===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(L,F,E){return E.length&&L===E[0]?(E.unshift(L,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(L,F,E){return E.length&&L[0]===R[E[0]]?(E.shift(),this.next=E.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 l=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),l)},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 l=s.getLine(u),o=this.foldingStartMarker.test(l),c=this.foldingStopMarker.test(l);if(o&&!c){var d=l.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(l)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(l)===!1)||d[1]=="when"&&/\sthen\s/.test(l)===!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"||!c||o&&c)return"";var d=l.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 l=s.doc.getLine(u),o=this.foldingStartMarker.exec(l);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(l);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,l){var o=new h(s,a,u),c=o.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var d=c.value,w=s.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+c.value);if(!b.test(w))return;var I=this.indentKeywords[d];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var I=1;break;case"else":var b=new RegExp("^\\s*"+c.value+"\\s*$");if(!b.test(w))return;var I=1;break;default:var I=this.indentKeywords[d]}var T=[d];if(I){var S=I===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,R=[];if(R.push(o.getCurrentTokenRange()),o.step=I===-1?o.stepBackward:o.stepForward,c.type=="comment.multiline"){for(;c=o.step();)if(c.type==="comment.multiline"){if(I==1){if(S=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=o.step();){var L=!1;if(c.type==="keyword"){var F=I*this.indentKeywords[c.value];switch(w=s.getLine(o.getCurrentTokenRow()),c.value){case"do":for(var E=o.$tokenIndex-1;E>=0;E--){var H=o.$rowTokens[E];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var b=new RegExp("^\\s*"+c.value+"\\s*$");(!b.test(w)||d=="case")&&(F=0,L=!0);break;case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+c.value);b.test(w)||(F=0,L=!0);break;case"when":(/\sthen\s/.test(w)||d=="case")&&(F=0,L=!0)}if(F>0)T.unshift(c.value);else if(F<=0&&L===!1){if(T.shift(),!T.length&&((d=="while"||d=="until"||d=="for")&&c.value!="do"||c.value=="do"&&I==-1&&F!=0||c.value!="do"))break;F===0&&T.unshift(c.value)}}}if(!c)return null;if(l)return R.push(o.getCurrentTokenRange()),R;var a=o.getCurrentTokenRow();if(I===-1){if(c.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new x(a,P,C-1,S)}return new x(C,S,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,l,o){var c=this.$getIndent(l),d=this.getTokenizer().getLineTokens(l,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var b=l.match(/^.*[\{\(\[]\s*$/),I=l.match(/^\s*(class|def|module)\s.*$/),T=l.match(/.*do(\s*|\s+\|.*\|\s*)$/),S=l.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(b||I||T||S)&&(c+=o)}return c},this.checkOutdent=function(u,l,o){return/^\s+(end|else|rescue|ensure)$/.test(l+o)||this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(u,l,o){var c=l.getLine(o);if(/}/.test(c))return this.$outdent.autoOutdent(l,o);var d=this.$getIndent(c),w=l.getLine(o-1),b=this.$getIndent(w),I=l.getTabString();b.length<=d.length&&d.slice(-I.length)==I&&l.remove(new p(o,d.length-I.length,o,d.length))},this.getMatching=function(u,l,o){if(l==null){var c=u.selection.lead;o=c.column,l=c.row}var d=u.getTokenAt(l,o);if(d&&d.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,l,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)})}()}(Dp)),Dp.exports}N0();var Pp={exports:{}},Wp;function D0(){return Wp||(Wp=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]?",l="[rR]",o="[fF]",c="(?:[rR][fF]|[fF][rR])",d="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",b="(?:0[xX][\\dA-Fa-f]+)",I="(?:0[bB][01]+)",T="(?:"+d+"|"+w+"|"+b+"|"+I+")",S="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",L="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",F="(?:(?:"+L+"|"+R+")"+S+")",E="(?:"+F+"|"+L+")",H=`\\\\(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:l+'"{3}',next:"rawqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rawqqstring"},{token:"string",regex:l+"'{3}",next:"rawqstring3"},{token:"string",regex:l+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:H},{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:H},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:H},{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:"(?:"+E+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:E},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\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,l,o){var c=this.$getIndent(l),d=this.getTokenizer().getLineTokens(l,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var b=l.match(/^.*[\{\(\[:]\s*$/);b&&(c+=o)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,l,o){if(o!==`\r
|
985
|
+
`&&o!=="\r"&&o!==`
|
986
|
+
`)return!1;var c=this.getTokenizer().getLineTokens(l.trim(),u).tokens;if(!c)return!1;do var d=c.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,l,o){o+=1;var c=this.$getIndent(l.getLine(o)),d=l.getTabString();c.slice(-d.length)==d&&l.remove(new p(o,c.length-d.length,o,c.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})}()}(Pp)),Pp.exports}D0();var Bp={exports:{}},zp;function F0(){return zp||(zp=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 l=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),l)},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 l=this._getFoldWidgetBase(p,s,a);return!l&&this.startRegionRe.test(u)?"start":l},this.getFoldWidgetRange=function(p,s,a,u){var l=p.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(p,l,a);var o=l.match(this.foldingStartMarker);if(o){var c=o.index;if(o[1])return this.openingBracketBlock(p,o[1],a,c);var d=p.getCommentFoldRange(a,c+o[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(p,a):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var c=o.index+o[0].length;return o[1]?this.closingBracketBlock(p,o[1],a,c):p.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(p,s){var a=p.getLine(s),u=a.search(/\S/),l=s,o=a.length;s+=1;for(var c=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<=l)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}c=s}}return new y(l,o,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,s,a){for(var u=s.search(/\s*$/),l=p.getLength(),o=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++a<l;){s=p.getLine(a);var w=c.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,l,o){var c=this.$getIndent(l);if(u=="start"){var d=l.match(/^.*[\{\(\[]\s*$/);d&&(c+=o)}return c},this.checkOutdent=function(u,l,o){return this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(u,l,o){this.$outdent.autoOutdent(l,o)},this.createWorker=function(u){var l=new s(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(u.getDocument()),l.on("annotate",function(o){u.setAnnotations(o.data)}),l.on("terminate",function(){u.clearAnnotations()}),l},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()}(Bp)),Bp.exports}F0();var jp={exports:{}},Hp;function P0(){return Hp||(Hp=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]+))",l=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var 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:l},{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(c,y),r.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,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\\-"),l={onMatch:function(c,d,w){var b=c.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:c.slice(0,b)},{type:"meta.tag.tag-name.xml",value:c.substr(b)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,d,w){return d==w[0]&&w.shift(),c.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:c}]},nextState:"jsx"},o,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"}]},l],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 l={"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(l,"identifier"),c="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(l).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:"(?:"+c+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex: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(I,T,S){if(this.next=I=="{"?this.nextState:"",I=="{"&&S.length)S.unshift("start",T);else if(I=="}"&&S.length&&(S.shift(),this.next=S.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return I=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex: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,l){return l.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,l){var o=s[l];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,c,d,w){var b=o.match(/^(\s*)([`~]+)(.*)/),I=/[\w-]+|$/.exec(b[3])[0];return g[I]||(I=""),d.unshift("githubblock",[],[b[1],b[2],I],c),this.token},next:"githubblock"},l=[{token:"support.function",regex:".*",onMatch:function(o,c,d,w){var b=d[1],I=d[2][0],T=d[2][1],S=d[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<I.length+3&&C[2].length>=T.length&&C[2][0]==T[0])return d.splice(0,3),this.next=d.shift(),this.token;if(this.next="",S&&g[S]){var R=g[S].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:l}),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(L){return I=p.getTokens(L)[0],I&&I.type.lastIndexOf(T,0)===0}function l(){var L=I.value[0];return L=="="?6:L=="-"?5:7-I.value.search(/[^#]|$/)}var o=p.getLine(a),c=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,c,a,0)}for(;a-- >0&&(o=p.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(a,o.length,w,0)}var I,T="markup.heading";if(u(a)){for(var S=l();++a<d;)if(u(a)){var C=l();if(C>=S)break}if(b=a-(!I||["=","-"].indexOf(I.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,c,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 l=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),l)},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,l,o){if(o=='"'||o=="'"){var c=o,d=l.doc.getTextRange(u.getSelectionRange());if(d!==""&&d!=="'"&&d!='"'&&u.getWrapBehavioursEnabled())return{text:c+d+c,selection:!1};var w=u.getCursorPosition(),b=l.doc.getLine(w.row),I=b.substring(w.column,w.column+1),T=new h(l,w.row,w.column),S=T.getCurrentToken();if(I==c&&(g(S,"attribute-value")||g(S,"string")))return{text:"",selection:[1,1]};if(S||(S=T.stepBackward()),!S)return;for(;g(S,"tag-whitespace")||g(S,"whitespace");)S=T.stepBackward();var C=!I||I.match(/\s/);if(g(S,"attribute-equals")&&(C||I==">")||g(S,"decl-attribute-equals")&&(C||I=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,u,l,o){var c=l.doc.getTextRange(o);if(!o.isMultiLine()&&(c=='"'||c=="'")){var d=l.doc.getLine(o.start.row),w=d.substring(o.start.column+1,o.start.column+2);if(w==c)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,a,u,l,o){if(o==">"){var c=u.getSelectionRange().start,d=new h(l,c.row,c.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(c.column<b)return;if(c.column==b){var I=d.stepForward();if(I&&g(I,"attribute-value"))return;d.stepBackward()}}if(/^\s*>/.test(l.getLine(c.row).slice(c.column)))return;for(;!g(w,"tag-name");)if(w=d.stepBackward(),w.value=="<"){w=d.stepForward();break}var T=d.getCurrentTokenRow(),S=d.getCurrentTokenColumn();if(g(d.stepBackward(),"end-tag-open"))return;var C=w.value;return T==c.row&&(C=C.substring(0,c.column-S)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,u,l,o){if(o==`
|
987
|
+
`){var c=u.getCursorPosition(),d=l.getLine(c.row),w=new h(l,c.row,c.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 I=b.value,T=w.getCurrentTokenRow();if(b=w.stepBackward(),!b||b.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[I]||!this.voidElements){var S=l.getTokenAt(c.row,c.column+1),d=l.getLine(T),C=this.$getIndent(d),R=C+l.getTabString();return S&&S.value==="</"?{text:`
|
988
|
+
`+R+`
|
989
|
+
`+C,selection:[1,R.length,1,R.length]}:{text:`
|
990
|
+
`+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,l,o,c){if(c==">"){var d=l.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,l){var o=this._getFirstTagInLine(a,l);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,l,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,l)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var l=a.getTokens(u),o=new s,c=0;c<l.length;c++){var d=l[c];if(g(d,"tag-open")){if(o.end.column=o.start.column+d.value.length,o.closing=g(d,"end-tag-open"),d=l[++c],!d)return null;if(o.tagName=d.value,d.value===""){if(d=l[++c],!d)return null;o.tagName=d.value}for(o.end.column+=d.value.length,c++;c<l.length;c++)if(d=l[c],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,l,o){for(var c=a.getTokens(u),d=0,w=0;w<c.length;w++){var b=c[w];if(d+=b.value.length,!(d<o-1)&&g(b,"end-tag-open")&&(b=c[w+1],g(b,"tag-name")&&b.value===""&&(b=c[w+2]),b&&b.value==l))return!0}return!1},this.getFoldWidgetRange=function(a,u,l){var o=this._getFirstTagInLine(a,l);if(!o)return this.getCommentFoldWidget(a,l)&&a.getCommentFoldRange(l,a.getLine(l).length);var c=a.getMatchingTags({row:l,column:0});if(c)return new x(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.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 l=this._getFoldWidgetBase(p,s,a);return!l&&this.startRegionRe.test(u)?"start":l},this.getFoldWidgetRange=function(p,s,a,u){var l=p.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(p,l,a);var o=l.match(this.foldingStartMarker);if(o){var c=o.index;if(o[1])return this.openingBracketBlock(p,o[1],a,c);var d=p.getCommentFoldRange(a,c+o[0].length,1);return d&&!d.isMultiLine()&&(u?d=this.getSectionRange(p,a):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var c=o.index+o[0].length;return o[1]?this.closingBracketBlock(p,o[1],a,c):p.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(p,s){var a=p.getLine(s),u=a.search(/\S/),l=s,o=a.length;s+=1;for(var c=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<=l)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}c=s}}return new y(l,o,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,s,a){for(var u=s.search(/\s*$/),l=p.getLength(),o=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++a<l;){s=p.getLine(a);var w=c.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 l=this.getFoldWidgetRangeBase(p,s,a,u);return l||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(l,o,c){var d=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,l),b=w.tokens,I=w.state;if(b.length&&b[b.length-1].type=="comment")return d;if(l=="start"||l=="no_regex"){var T=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(d+=c)}else if(l=="doc-start"&&(I=="start"||I=="no_regex"))return"";return d},this.checkOutdent=function(l,o,c){return this.$outdent.checkOutdent(o,c)},this.autoOutdent=function(l,o,c){this.$outdent.autoOutdent(o,c)},this.createWorker=function(l){var o=new p(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(l.getDocument()),o.on("annotate",function(c){l.setAnnotations(c.data)}),o.on("terminate",function(){l.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(l){return{caption:l,snippet:l+": $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 l=[];return u in g&&typeof g[u]=="object"&&(l=Object.keys(g[u])),l.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,l){if(l===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=new x(u,o.row,o.column),d=c.getCurrentToken();if(d&&d.value.match(/\s+/)&&(d=c.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,l){var o=u.doc.getTextRange(l);if(!l.isMultiLine()&&o===":"){var c=a.getCursorPosition(),d=new x(u,c.row,c.column),w=d.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=d.stepBackward()),w&&w.type==="support.type"){var b=u.doc.getLine(l.start.row),I=b.substring(l.end.column,l.end.column+1);if(I===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(p,s,a,u,l){if(l===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=u.doc.getLine(o.row),d=c.substring(o.column,o.column+1);if(d===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(p,s,a,u,l){if(l==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(c.substring(o.column)))return{text:"!important",selection:[10,10]}}})};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,l=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new u};g.inherits(l,y),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,c,d){var w=this.$getIndent(c),b=this.getTokenizer().getLineTokens(c,o).tokens;if(b.length&&b[b.length-1].type=="comment")return w;var I=c.match(/^.*\{\s*$/);return I&&(w+=d),w},this.checkOutdent=function(o,c,d){return this.$outdent.checkOutdent(c,d)},this.autoOutdent=function(o,c,d){this.$outdent.autoOutdent(c,d)},this.getCompletions=function(o,c,d,w){return this.$completer.getCompletions(o,c,d,w)},this.createWorker=function(o){var c=new p(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(o.getDocument()),c.on("annotate",function(d){o.setAnnotations(d.data)}),c.on("terminate",function(){o.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(l.prototype),r.Mode=l}),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(c,d){return c.type.lastIndexOf(d+".xml")>-1}function y(c,d){for(var w=new h(c,d.row,d.column),b=w.getCurrentToken();b&&!g(b,"tag-name");)b=w.stepBackward();if(b)return b.value}function x(c,d){for(var w=new h(c,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:{}},l=Object.keys(u),o=function(){};(function(){this.getCompletions=function(c,d,w,b){var I=d.getTokenAt(w.row,w.column);if(!I)return[];if(g(I,"tag-name")||g(I,"tag-open")||g(I,"end-tag-open"))return this.getTagCompletions(c,d,w,b);if(g(I,"tag-whitespace")||g(I,"attribute-name"))return this.getAttributeCompletions(c,d,w,b);if(g(I,"attribute-value"))return this.getAttributeValueCompletions(c,d,w,b);var T=d.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(c,d,w,b):[]},this.getTagCompletions=function(c,d,w,b){return l.map(function(I){return{value:I,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,d,w,b){var I=y(d,w);if(!I)return[];var T=a;return I in u&&(T=T.concat(Object.keys(u[I]))),T.map(function(S){return{caption:S,snippet:S+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,d,w,b){var I=y(d,w),T=x(d,w);if(!I)return[];var S=[];return I in u&&T in u[I]&&typeof u[I][T]=="object"&&(S=Object.keys(u[I][T])),S.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,d,w,b){var I=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return I.map(function(T){return{caption:T,snippet:T,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,l=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,c=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],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 l,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(c),this.getNextLineIndent=function(b,I,T){return this.$getIndent(I)},this.checkOutdent=function(b,I,T){return!1},this.getCompletions=function(b,I,T,S){return this.$completer.getCompletions(b,I,T,S)},this.createWorker=function(b){if(this.constructor==w){var I=new o(["ace"],"ace/mode/html_worker","Worker");return I.attachToDocument(b.getDocument()),this.fragmentContext&&I.call("setOptions",[{context:this.fragmentContext}]),I.on("error",function(T){b.setAnnotations(T.data)}),I.on("terminate",function(){b.clearAnnotations()}),I}},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+)",l="(?:\\d+)",o="(?:(?:"+l+"?"+u+")|(?:"+l+"\\.))",c="(?:(?:"+o+"|"+l+"))",d="(?:"+c+"|"+o+")",w="(?:&"+l+")",b="[a-zA-Z_][a-zA-Z0-9_]*",I="(?:"+b+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",S="(?:"+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,L){var F=C[2]=="-"?"indentedHeredoc":"heredoc",E=C.split(this.splitRegex);return L.push(F,E[4]),[{type:"constant",value:E[1]},{type:"text",value:E[2]},{type:"string",value:E[3]},{type:"support.class",value:E[4]},{type:"string",value:E[5]}]},rules:{heredoc:[{onMatch:function(C,R,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,R,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[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:T},{token:"variable",regex:I},{include:"variables"},{token:"support.function",regex:S},{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,l,o){var c=this.$getIndent(l),d=this.getTokenizer().getLineTokens(l,u),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var b=l.match(/^.*[\{\(\[:]\s*$/);b&&(c+=o)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,l,o){if(o!==`\r
|
991
|
+
`&&o!=="\r"&&o!==`
|
992
|
+
`)return!1;var c=this.getTokenizer().getLineTokens(l.trim(),u).tokens;if(!c)return!1;do var d=c.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,l,o){o+=1;var c=this.$getIndent(l.getLine(o)),d=l.getTabString();c.slice(-d.length)==d&&l.remove(new h(o,c.length-d.length,o,c.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),r.Mode=s}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(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(l){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(l.getDocument()),o.on("error",function(c){l.setAnnotations(c.data)}),o.on("terminate",function(){l.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,l){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var c=o[2];return c||(c=parseInt(o[3],10)+1+"."),o[1]+c+o[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})}()}(jp)),jp.exports}P0();var Up={exports:{}},Vp;function W0(){return Vp||(Vp=1,function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-twilight .ace_gutter {
|
993
|
+
background: #232323;
|
994
|
+
color: #E2E2E2
|
995
|
+
}
|
996
|
+
|
997
|
+
.ace-twilight .ace_print-margin {
|
998
|
+
width: 1px;
|
999
|
+
background: #232323
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
.ace-twilight {
|
1003
|
+
background-color: #141414;
|
1004
|
+
color: #F8F8F8
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
.ace-twilight .ace_cursor {
|
1008
|
+
color: #A7A7A7
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1012
|
+
background: rgba(221, 240, 255, 0.20)
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1016
|
+
box-shadow: 0 0 3px 0px #141414;
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1020
|
+
background: rgb(102, 82, 0)
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1024
|
+
margin: -1px 0 0 -1px;
|
1025
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1029
|
+
background: rgba(255, 255, 255, 0.031)
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
.ace-twilight .ace_gutter-active-line {
|
1033
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1037
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
.ace-twilight .ace_invisible {
|
1041
|
+
color: rgba(255, 255, 255, 0.25)
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
.ace-twilight .ace_keyword,
|
1045
|
+
.ace-twilight .ace_meta {
|
1046
|
+
color: #CDA869
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
.ace-twilight .ace_constant,
|
1050
|
+
.ace-twilight .ace_constant.ace_character,
|
1051
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1052
|
+
.ace-twilight .ace_constant.ace_other,
|
1053
|
+
.ace-twilight .ace_heading,
|
1054
|
+
.ace-twilight .ace_markup.ace_heading,
|
1055
|
+
.ace-twilight .ace_support.ace_constant {
|
1056
|
+
color: #CF6A4C
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1060
|
+
color: #F8F8F8;
|
1061
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1065
|
+
text-decoration: underline;
|
1066
|
+
font-style: italic;
|
1067
|
+
color: #D2A8A1
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
.ace-twilight .ace_support {
|
1071
|
+
color: #9B859D
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
.ace-twilight .ace_fold {
|
1075
|
+
background-color: #AC885B;
|
1076
|
+
border-color: #F8F8F8
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
.ace-twilight .ace_support.ace_function {
|
1080
|
+
color: #DAD085
|
1081
|
+
}
|
1082
|
+
|
1083
|
+
.ace-twilight .ace_list,
|
1084
|
+
.ace-twilight .ace_markup.ace_list,
|
1085
|
+
.ace-twilight .ace_storage {
|
1086
|
+
color: #F9EE98
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1090
|
+
.ace-twilight .ace_meta.ace_tag {
|
1091
|
+
color: #AC885B
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
.ace-twilight .ace_string {
|
1095
|
+
color: #8F9D6A
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
.ace-twilight .ace_string.ace_regexp {
|
1099
|
+
color: #E9C062
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
.ace-twilight .ace_comment {
|
1103
|
+
font-style: italic;
|
1104
|
+
color: #5F5A60
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
.ace-twilight .ace_variable {
|
1108
|
+
color: #7587A6
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
.ace-twilight .ace_xml-pe {
|
1112
|
+
color: #494949
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
.ace-twilight .ace_indent-guide {
|
1116
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
.ace-twilight .ace_indent-guide-active {
|
1120
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1121
|
+
}
|
1122
|
+
`}),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)})}()}(Up)),Up.exports}W0();var qp={exports:{}},Kp;function B0(){return Kp||(Kp=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,l=e("./tokenizer").Tokenizer,o=e("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,L){var F=C.session.getTextRange();return L?F.replace(/\n\r?([ \t]*\S)/g,`
|
1123
|
+
`+L+"$1"):F},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"})};c.SELECTED_TEXT=c.SELECTION;var d=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(E){return E=E.substr(1),/^\d+$/.test(E)?[{tabstopId:parseInt(E,10)}]:[{text:E}]}function L(E){return"(?:[^\\\\"+E+"]|\\\\.)"}var F={regex:"/("+L("/")+"+)/",onMatch:function(E,H,P){var O=P[0];return O.fmtString=!0,O.guard=E.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(E,H,P){var O=E[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(E=O),[E]}},{regex:/}/,onMatch:function(E,H,P){return[P.length?P.shift():E]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(E,H,P){var O=R(E.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+L("\\|")+"*\\|",onMatch:function(E,H,P){var O=E.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return P[0].choices=O,[O[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(E,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(E,H,P){var O=E[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?E=O:O=="n"?E=`
|
1124
|
+
`:O=="t"?E=" ":"ulULE".indexOf(O)!=-1&&(E={changeCase:O,local:O>"a"}),[E]}},{regex:"/\\w*}",onMatch:function(E,H,P){var O=P.shift();return O&&(O.flag=E.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(E,H,P){return[{text:E.slice(1)}]}},{regex:/\${\w+/,onMatch:function(E,H,P){var O={text:E.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(E,H,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(E,H,P){var O=P[0];return O.formatFunction=E.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(E,H,P){E[1]=="+"&&(P[0].ifEnd=P[0]),E[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(R,L){return this.getTokenizer().getLineTokens(R,L).tokens.map(function(F){return F.value||F})},C.prototype.getVariableValue=function(R,L,F){if(/^\d+$/.test(L))return(this.variables.__||{})[L]||"";if(/^[A-Z]\d+$/.test(L))return(this.variables[L[0]+"__"]||{})[L.substr(1)]||"";if(L=L.replace(/^TM_/,""),!this.variables.hasOwnProperty(L))return"";var E=this.variables[L];return typeof E=="function"&&(E=this.variables[L](R,L,F)),E??""},C.prototype.tmStrFormat=function(R,L,F){if(!L.fmt)return R;var E=L.flag||"",H=L.guard;H=new RegExp(H,E.replace(/[^gim]/g,""));var P=typeof L.fmt=="string"?this.tokenizeTmSnippet(L.fmt,"formatString"):L.fmt,O=this,_=R.replace(H,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,F),B="E",U=0;U<N.length;U++){var K=N[U];if(typeof K=="object")if(N[U]="",K.changeCase&&K.local){var Z=N[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?N[U]=Z[0].toUpperCase():N[U]=Z[0].toLowerCase(),N[U+1]=Z.substr(1))}else K.changeCase&&(B=K.changeCase);else B=="U"?N[U]=K.toUpperCase():B=="L"&&(N[U]=K.toLowerCase())}return O.variables.__=A,N.join("")});return _},C.prototype.tmFormatFunction=function(R,L,F){return L.formatFunction=="upcase"?R.toUpperCase():L.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,L){function F(B){var U=R.indexOf(B,O+1);U!=-1&&(O=U)}for(var E=[],H="",P=!0,O=0;O<R.length;O++){var _=R[O];if(typeof _=="string"){E.push(_),_==`
|
1125
|
+
`?(P=!0,H=""):P&&(H=/^\t*/.exec(_)[0],P=/\S/.test(_));continue}if(_){if(P=!1,_.fmtString){var A=R.indexOf(_,O+1);A==-1&&(A=R.length),_.fmt=R.slice(O+1,A),O=A}if(_.text){var N=this.getVariableValue(L,_.text,H)+"";_.fmtString&&(N=this.tmStrFormat(N,_,L)),_.formatFunction&&(N=this.tmFormatFunction(N,_,L)),N&&!_.ifEnd?(E.push(N),F(_)):!N&&_.ifEnd&&F(_.ifEnd)}else _.elseEnd?F(_.elseEnd):(_.tabstopId!=null||_.changeCase!=null)&&E.push(_)}}return E},C.prototype.getDisplayTextForSnippet=function(R,L){var F=w.call(this,R,L);return F.text},C.prototype.insertSnippetForSelection=function(R,L,F){F===void 0&&(F={});var E=w.call(this,R,L,F),H=R.getSelectionRange(),P=R.session.replace(H,E.text),O=new b(R),_=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(E.tabstops,H.start,P,_)},C.prototype.insertSnippet=function(R,L,F){F===void 0&&(F={});var E=this;if(R.inVirtualSelectionMode)return E.insertSnippetForSelection(R,L,F);R.forEachSelection(function(){E.insertSnippetForSelection(R,L,F)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var L=R.session.$mode.$id||"";if(L=L.split("/").pop(),L==="html"||L==="php"){L==="php"&&!R.session.$mode.inlinePhp&&(L="html");var F=R.getCursorPosition(),E=R.session.getState(F.row);typeof E=="object"&&(E=E[0]),E.substring&&(E.substring(0,3)=="js-"?L="javascript":E.substring(0,4)=="css-"?L="css":E.substring(0,4)=="php-"&&(L="php"))}return L},C.prototype.getActiveScopes=function(R){var L=this.$getScope(R),F=[L],E=this.snippetMap;return E[L]&&E[L].includeScopes&&F.push.apply(F,E[L].includeScopes),F.push("_"),F},C.prototype.expandWithTab=function(R,L){var F=this,E=R.forEachSelection(function(){return F.expandSnippetForSelection(R,L)},null,{keepOrder:!0});return E&&R.tabstopManager&&R.tabstopManager.tabNext(),E},C.prototype.expandSnippetForSelection=function(R,L){var F=R.getCursorPosition(),E=R.session.getLine(F.row),H=E.substring(0,F.column),P=E.substr(F.column),O=this.snippetMap,_;return this.getActiveScopes(R).some(function(A){var N=O[A];return N&&(_=this.findMatchingSnippet(N,H,P)),!!_},this),_?(L&&L.dryRun||(R.session.doc.removeInLine(F.row,F.column-_.replaceBefore.length,F.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,L,F){for(var E=R.length;E--;){var H=R[E];if(!(H.startRe&&!H.startRe.test(L))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(L):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(L)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},C.prototype.register=function(R,L){function F(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function E(A,N,B){return A=F(A),N=F(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function H(A){A.scope||(A.scope=L||"_"),L=A.scope,P[L]||(P[L]=[],O[L]={});var N=O[L];if(A.name){var B=N[A.name];B&&_.unregister(B),N[A.name]=A}P[L].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
1126
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=p.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=E(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=E(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,_=this;R||(R=[]),Array.isArray(R)?R.forEach(H):Object.keys(R).forEach(function(A){H(R[A])}),this._signal("registerSnippets",{scope:L})},C.prototype.unregister=function(R,L){function F(P){var O=H[P.scope||L];if(O&&O[P.name]){delete O[P.name];var _=E[P.scope||L],A=_&&_.indexOf(P);A>=0&&_.splice(A,1)}}var E=this.snippetMap,H=this.snippetNameMap;R.content?F(R):Array.isArray(R)&&R.forEach(F)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var L=[],F={},E=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=E.exec(R);){if(H[1])try{F=JSON.parse(H[1]),L.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),L.push(F),F={};else{var P=H[2],O=H[3];if(P=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=_.exec(O)[1],F.trigger=_.exec(O)[1],F.endTrigger=_.exec(O)[1],F.endGuard=_.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return L},C.prototype.getSnippetByName=function(R,L){var F=this.snippetNameMap,E;return this.getActiveScopes(L).some(function(H){var P=F[H];return P&&(E=P[R]),!!E},this),E},C}();x.implement(d.prototype,h);var w=function(C,R,L){function F(ce){for(var fe=[],$e=0;$e<ce.length;$e++){var Te=ce[$e];if(typeof Te=="object"){if(N[Te.tabstopId])continue;var Ee=ce.lastIndexOf(Te,$e-1);Te=fe[Ee]||{tabstopId:Te.tabstopId}}fe[$e]=Te}return fe}L===void 0&&(L={});var E=C.getCursorPosition(),H=C.session.getLine(E.row),P=C.session.getTabString(),O=H.match(/^\s*/)[0];E.column<O.length&&(O=O.slice(0,E.column)),R=R.replace(/\r/g,"");var _=this.tokenizeTmSnippet(R);_=this.resolveVariables(_,C),_=_.map(function(ce){return ce==`
|
1127
|
+
`&&!L.excludeExtraIndent?ce+O:typeof ce=="string"?ce.replace(/\t/g,P):ce});var A=[];_.forEach(function(ce,fe){if(typeof ce=="object"){var $e=ce.tabstopId,Te=A[$e];if(Te||(Te=A[$e]=[],Te.index=$e,Te.value="",Te.parents={}),Te.indexOf(ce)===-1){ce.choices&&!Te.choices&&(Te.choices=ce.choices),Te.push(ce);var Ee=_.indexOf(ce,fe+1);if(Ee!==-1){var Ge=_.slice(fe+1,Ee),qe=Ge.some(function(ht){return typeof ht=="object"});qe&&!Te.value?Te.value=Ge:Ge.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Ge.join(""))}}}}),A.forEach(function(ce){ce.length=0});for(var N={},B=0;B<_.length;B++){var U=_[B];if(typeof U=="object"){var K=U.tabstopId,Z=A[K],te=_.indexOf(U,B+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(ce){Z.parents[ce]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),_.splice.apply(_,[B+1,Math.max(0,te-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ue="";return _.forEach(function(ce){if(typeof ce=="string"){var fe=ce.split(`
|
1128
|
+
`);fe.length>1?(ae=fe[fe.length-1].length,ne+=fe.length-1):ae+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:ae}:ce.start={row:ne,column:ae})}),{text:ue,tabstops:A,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 L=R.action[0]=="r",F=this.selectedTabstop||{},E=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],_=O==F||E[O.index];if(O.rangeList.$bias=_?0:1,R.action=="remove"&&O!==F){var A=O.parents&&O.parents[F.index],N=O.rangeList.pointIndex(R.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(R.end,A);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(N,B),K=0;K<U.length;K++)this.removeRange(U[K])}O.rangeList.$onChange(R)}var Z=this.session;!this.$inChange&&L&&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 L=this.session,F=L.getTextRange(R.firstNonLinked),E=0;E<R.length;E++){var H=R[E];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(F,P,this.editor);L.replace(H,O)}}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,L=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var H=this.ranges[E].contains(R.row,R.column),P=F||this.ranges[E].contains(L.row,L.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var L=this.tabstops.length,F=this.index+(R||1);F=Math.min(Math.max(F,1),L),F==L&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var L=this.tabstops[this.index];if(L&&this.addTabstopMarkers(L),this.index=R,L=this.tabstops[this.index],!(!L||!L.length)){this.selectedTabstop=L;var F=L.firstNonLinked||L;if(L.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var E=this.editor.multiSelect;E.toSingleRange(F);for(var H=0;H<L.length;H++)L.hasLinkedRanges&&L[H].linked||E.addRange(L[H].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,L,F){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var H=s.fromPoints(F,F);T(H.start,L),T(H.end,L),R[0]=[H],R[0].index=0}var P=this.index,O=[P+1,0],_=this.ranges,A=this.snippetId=(this.snippetId||0)+1;R.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=A;for(var K=0;K<N.length;K++){var Z=N[K],te=s.fromPoints(Z.start,Z.end||Z.start);I(te.start,L),I(te.end,L),te.original=Z,te.tabstop=U,_.push(te),U!=N?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&E?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(R){var L=this.session;R.forEach(function(F){F.markerId||(F.markerId=L.addMarker(F,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var L=this.session;R.forEach(function(F){L.removeMarker(F.markerId),F.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(L){L.snippetId===R?this.addTabstopMarkers(L):this.removeTabstopMarkers(L)},this)}},C.prototype.removeRange=function(R){var L=R.tabstop.indexOf(R);L!=-1&&R.tabstop.splice(L,1),L=this.ranges.indexOf(R),L!=-1&&this.ranges.splice(L,1),L=R.tabstop.rangeList.ranges.indexOf(R),L!=-1&&R.tabstop.splice(L,1),this.session.removeMarker(R.markerId),R.tabstop.length||(L=this.tabstops.indexOf(R.tabstop),L!=-1&&this.tabstops.splice(L,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 I=function(C,R){C.row==0&&(C.column+=R.column),C.row+=R.row},T=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};y.importCssString(`
|
1129
|
+
.ace_snippet-marker {
|
1130
|
+
-moz-box-sizing: border-box;
|
1131
|
+
box-sizing: border-box;
|
1132
|
+
background: rgba(194, 193, 208, 0.09);
|
1133
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1134
|
+
position: absolute;
|
1135
|
+
}`,"snippets.css",!1),r.snippetManager=new d;var S=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(S.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"),l=function(I){return"suggest-aria-id:".concat(I)},o=u.isSafari?"menu":"listbox",c=u.isSafari?"menuitem":"option",d=u.isSafari?"aria-current":"aria-selected",w=function(I){var T=new g(I);T.$maxLines=4;var S=new y(T);return S.setHighlightActiveLine(!1),S.setShowPrintMargin(!1),S.renderer.setShowGutter(!1),S.renderer.setHighlightGutterLine(!1),S.$mouseHandler.$focusTimeout=0,S.$highlightTagPending=!0,S},b=function(){function I(T){var S=s.createElement("div"),C=w(S);T&&T.appendChild(S),S.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 A=_.getDocumentPosition();C.selection.moveToPosition(A),E.start.row=E.end.row=A.row,_.stop()});var L,F=new x(-1,0,-1,1/0),E=new x(-1,0,-1,1/0);E.id=C.session.addMarker(E,"ace_active-line","fullLine"),C.setSelectOnHover=function(_){_?F.id&&(C.session.removeMarker(F.id),F.id=null):F.id=C.session.addMarker(F,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(_){if(!L){L=_;return}if(!(L.x==_.x&&L.y==_.y)){L=_,L.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=L.getDocumentPosition().row;F.start.row!=A&&(F.id||C.setRow(A),P(A))}}),C.renderer.on("beforeRender",function(){if(L&&F.start.row!=-1){L.$pos=null;var _=L.getDocumentPosition().row;F.id||C.setRow(_),P(_,!0)}}),C.renderer.on("afterRender",function(){for(var _=C.renderer.$textLayer,A=_.config.firstRow,N=_.config.lastRow;A<=N;A++){var B=_.element.childNodes[A-_.config.firstRow];B.setAttribute("role",c),B.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",A+1);var U=C.getData(A);if(U){var K="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",K)}var Z=B.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var _=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[_-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(d),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=l(_);s.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(d,"true")}});var H=function(){P(-1)},P=function(_,A){_!==F.start.row&&(F.start.row=F.end.row=_,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return F.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,H()}),C.on("hide",H),C.on("changeSelection",H),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(_){var A=C.data[_];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(_){function A(ce,fe){ce&&B.push({type:(N.className||"")+(fe||""),value:ce})}var N=C.data[_],B=[];if(!N)return B;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,K=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ue=K.indexOf(ae,te);if(ue==-1)continue;A(U.slice(te,ue),""),te=ue+ae.length,A(U.slice(ue,te),"completion-highlight")}return A(U.slice(te,U.length),""),B.push({type:"completion-spacer",value:" "}),N.meta&&B.push({type:"completion-meta",value:N.meta}),N.message&&B.push({type:"completion-message",value:N.message}),B},O.$updateOnChange=R,O.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(_,A){C.filterText=A||"",C.setValue(p.stringRepeat(`
|
1136
|
+
`,_.length),-1),C.data=_||[],C.setRow(0)},C.getData=function(_){return C.data[_]},C.getRow=function(){return E.start.row},C.setRow=function(_){_=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,_)),E.start.row!=_&&(C.selection.clearSelection(),E.start.row=E.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(_,A,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===_.top&&C.anchorPos.left===_.left&&C.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*A*1.4,ae={top:0,bottom:0},ue=Z-_.top-3*this.$borderSize-A,ce=_.top-3*this.$borderSize;N||(ce<=ue||ue>=ne?N="bottom":N="top"),N==="top"?(ae.bottom=_.top-this.$borderSize,ae.top=ae.bottom-ne):N==="bottom"&&(ae.top=_.top+A+this.$borderSize,ae.bottom=ae.top+ne);var fe=ae.top>=0&&ae.bottom<=Z;if(!B&&!fe)return!1;fe?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,N==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",C.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var $e=_.left;return $e+U.offsetWidth>te&&($e=te-U.offsetWidth),U.style.left=$e+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),L=null),C.anchorPos=_,C.anchor=N,!0},C.show=function(_,A,N){this.tryShow(_,A,N?"bottom":void 0,!0)},C.goTo=function(_){var A=this.getRow(),N=this.session.getLength()-1;switch(_){case"up":A=A<=0?N:A-1;break;case"down":A=A>=N?-1:A+1;break;case"start":A=0;break;case"end":A=N}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return I}();s.importCssString(`
|
1137
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1138
|
+
background-color: #CAD6FA;
|
1139
|
+
z-index: 1;
|
1140
|
+
}
|
1141
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1142
|
+
background-color: #3a674e;
|
1143
|
+
}
|
1144
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1145
|
+
border: 1px solid #abbffe;
|
1146
|
+
margin-top: -1px;
|
1147
|
+
background: rgba(233,233,253,0.4);
|
1148
|
+
position: absolute;
|
1149
|
+
z-index: 2;
|
1150
|
+
}
|
1151
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1152
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1153
|
+
background: rgba(58, 103, 78, 0.62);
|
1154
|
+
}
|
1155
|
+
.ace_completion-meta {
|
1156
|
+
opacity: 0.5;
|
1157
|
+
margin-left: 0.9em;
|
1158
|
+
}
|
1159
|
+
.ace_completion-message {
|
1160
|
+
margin-left: 0.9em;
|
1161
|
+
color: blue;
|
1162
|
+
}
|
1163
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1164
|
+
color: #2d69c7;
|
1165
|
+
}
|
1166
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1167
|
+
color: #93ca12;
|
1168
|
+
}
|
1169
|
+
.ace_editor.ace_autocomplete {
|
1170
|
+
width: 300px;
|
1171
|
+
z-index: 200000;
|
1172
|
+
border: 1px lightgray solid;
|
1173
|
+
position: fixed;
|
1174
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1175
|
+
line-height: 1.4;
|
1176
|
+
background: #fefefe;
|
1177
|
+
color: #111;
|
1178
|
+
}
|
1179
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1180
|
+
border: 1px #484747 solid;
|
1181
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1182
|
+
line-height: 1.4;
|
1183
|
+
background: #25282c;
|
1184
|
+
color: #c1c1c1;
|
1185
|
+
}
|
1186
|
+
.ace_autocomplete .ace_text-layer {
|
1187
|
+
width: calc(100% - 8px);
|
1188
|
+
}
|
1189
|
+
.ace_autocomplete .ace_line {
|
1190
|
+
display: flex;
|
1191
|
+
align-items: center;
|
1192
|
+
}
|
1193
|
+
.ace_autocomplete .ace_line > * {
|
1194
|
+
min-width: 0;
|
1195
|
+
flex: 0 0 auto;
|
1196
|
+
}
|
1197
|
+
.ace_autocomplete .ace_line .ace_ {
|
1198
|
+
flex: 0 1 auto;
|
1199
|
+
overflow: hidden;
|
1200
|
+
text-overflow: ellipsis;
|
1201
|
+
}
|
1202
|
+
.ace_autocomplete .ace_completion-spacer {
|
1203
|
+
flex: 1;
|
1204
|
+
}
|
1205
|
+
.ace_autocomplete.ace_loading:after {
|
1206
|
+
content: "";
|
1207
|
+
position: absolute;
|
1208
|
+
top: 0px;
|
1209
|
+
height: 2px;
|
1210
|
+
width: 8%;
|
1211
|
+
background: blue;
|
1212
|
+
z-index: 100;
|
1213
|
+
animation: ace_progress 3s infinite linear;
|
1214
|
+
animation-delay: 300ms;
|
1215
|
+
transform: translateX(-100%) scaleX(1);
|
1216
|
+
}
|
1217
|
+
@keyframes ace_progress {
|
1218
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1219
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1220
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1221
|
+
}
|
1222
|
+
@media (prefers-reduced-motion) {
|
1223
|
+
.ace_autocomplete.ace_loading:after {
|
1224
|
+
transform: translateX(625%) scaleX(2);
|
1225
|
+
animation: none;
|
1226
|
+
}
|
1227
|
+
}
|
1228
|
+
`,"autocompletion.css",!1),r.AcePopup=b,r.$singleLineEditor=w,r.getAriaId=l}),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 ",l=0;l<this._lines.length;l++)u+="ace-inline-screenreader-line-".concat(l," ");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,l){p++,p===s&&h(u,l)})};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,l=e("./config"),o=e("./lib/event"),c=e("./lib/scroll").preventParentScroll,d=function(T,S){S.completer&&S.completer.destroy()},w=function(){function T(){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 S=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!S||this.editor.completers.length===0||(this.completions=new I(T.completionsForLoading),this.openPopup(this.editor,S.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:l.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new y(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(S){this.insertMatch(),S.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},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(S){!this.hasSeen.has(S)&&S&&S.completer&&S.completer.onSeen&&typeof S.completer.onSeen=="function"&&(S.completer.onSeen(this.editor,S),this.hasSeen.add(S))},T.prototype.$onPopupChange=function(S){if(this.inlineRenderer&&this.inlineEnabled){var C=S?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)},T.prototype.$updateGhostText=function(S){var C=this.base.row,R=this.base.column,L=this.editor.getCursorPosition().column,F=this.editor.session.getLine(C).slice(R,L);this.inlineRenderer.show(this.editor,S,F)?this.$seen(S):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var S=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&&(!S||R.hideInlinePreview)&&this.$seen(R)}},T.prototype.$onPopupShow=function(S){this.$onPopupChange(S),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var S=this.editor.container.parentNode,C=[];S;)C.push(S),S.addEventListener("scroll",this.onLayoutChange,{passive:!0}),S=S.parentNode;this.$elements=C}},T.prototype.unObserveLayoutChanges=function(){var S=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",S.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var S=this.editor,C=S.renderer,R=C.layerConfig.lineHeight,L=C.$cursorLayer.getPixelPosition(this.base,!0);L.left-=this.popup.getTextLeftOffset();var F=S.container.getBoundingClientRect();L.top+=F.top-C.layerConfig.offset,L.left+=F.left-S.renderer.scrollLeft,L.left+=C.gutterWidth;var E={top:L.top,left:L.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(E.top+=C.$ghostTextWidget.el.offsetHeight);var H=S.container.getBoundingClientRect().bottom-R,P=H<E.top?{top:H,left:E.left}:E;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(L,R,"top")||this.popup.show(L,R)},T.prototype.openPopup=function(S,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 L=this.popup.getRow(),F=this.popup.data[L];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}),S.keyBinding.addKeyboardHandler(this.keyboardHandler);var E;this.stickySelection&&(E=this.popup.data.indexOf(F)),(!E||E===-1)&&(E=0),this.popup.setRow(this.autoSelect?E:-1),E===L&&F!==this.completions.filtered[E]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(E===L&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(S.getTheme()),this.popup.setFontSize(S.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.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()},T.prototype.changeListener=function(S){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()},T.prototype.blurListener=function(S){var C=document.activeElement,R=this.editor.textInput.getElement(),L=S.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(S.relatedTarget),F=this.popup&&this.popup.container;C!=R&&C.parentNode!=F&&!L&&C!=this.tooltipNode&&S.relatedTarget!=R&&this.detach()},T.prototype.mousedownListener=function(S){this.detach()},T.prototype.mousewheelListener=function(S){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(S){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(S){this.popup.goTo(S)},T.prototype.insertMatch=function(S,C){if(S||(S=this.popup.getData(this.popup.getRow())),!S)return!1;if(S.value==="")return this.detach();var R=this.completions,L=this.getCompletionProvider().insertMatch(this.editor,S,R.filterText,C);return this.completions==R&&this.detach(),L},T.prototype.showPopup=function(S,C){this.editor&&this.detach(),this.activated=!0,this.editor=S,S.completer!=this&&(S.completer&&S.completer.detach(),S.completer=this),S.on("changeSelection",this.changeListener),S.on("blur",this.blurListener),S.on("mousedown",this.mousedownListener),S.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},T.prototype.getCompletionProvider=function(S){return this.completionProvider||(this.completionProvider=new b(S)),this.completionProvider},T.prototype.gatherCompletions=function(S,C){return this.getCompletionProvider().gatherCompletions(S,C)},T.prototype.updateCompletions=function(S,C){if(S&&this.base&&this.completions){var L=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:L});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,S);return}if(C&&C.matches){var L=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(L.row,L.column),this.base.$insertRight=!0,this.completions=new I(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",S)}var R=this.editor.getSession(),L=this.editor.getCursorPosition(),F=p.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(L.row,L.column-F.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:L}).provideCompletions(this.editor,E,(function(H,P,O){var _=P.filtered,A=p.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!_.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new I(B),this.openPopup(this.editor,A,S),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(_.length==1&&_[0].value==A&&!_[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&_.length==1)return this.insertMatch(_[0])}this.completions=!O&&this.showLoadingState?new I(T.completionsForLoading.concat(_),P.filterText):P,this.openPopup(this.editor,A,S),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var S=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[S.getHoveredRow()]||C[S.getRow()]),L=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,E=0;E<F;E++){var H=this.editor.completers[E];if(H.getDocTooltip&&R.completerId===H.id){L=H.getDocTooltip(R);break}}if(!L&&typeof R!="string"&&(L=R),typeof L=="string"&&(L={docText:L}),!L||!L.docHTML&&!L.docText)return this.hideDocTooltip();this.showDocTooltip(L)},T.prototype.showDocTooltip=function(S){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;S.docHTML?R.innerHTML=S.docHTML:S.docText&&(R.textContent=S.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var L=this.popup,F=L.container.getBoundingClientRect(),E=400,H=300,P=L.renderer.scrollBar.width||10,O=F.left,_=window.innerWidth-F.right-P,A=L.isTopdown?F.top:window.innerHeight-P-F.bottom,N=[Math.min(_/E,1),Math.min(O/E,1),Math.min(A/H*.9)],B=Math.max.apply(Math,N),U=R.style;U.display="block",B==N[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=E*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=E*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(E,window.innerWidth)+"px",L.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=L.container.offsetTop-R.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(L.container.offsetTop,H)+"px"))},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var S=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==S&&this.editor.focus(),this.tooltipNode=null,S.parentNode&&S.parentNode.removeChild(S)}},T.prototype.onTooltipClick=function(S){for(var C=S.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var S=this.popup.container;S&&S.parentNode&&S.parentNode.removeChild(S)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",d),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(S){return S.completer instanceof T||(S.completer&&(S.completer.destroy(),S.completer=null),l.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),S.completer=T.$sharedInstance):(S.completer=new T,S.once("destroy",d))),S.completer},T}();w.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var S=T.completer.insertMatch();if(S||T.tabstopManager)return S;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var S=p.getCompletionPrefix(T);!S&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(T,S){var C=w.for(T);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(T,S),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=function(){function T(S){this.initialPosition=S,this.active=!0}return T.prototype.insertByIndex=function(S,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(S,this.completions.filtered[C],R)},T.prototype.insertMatch=function(S,C,R){if(!C)return!1;if(S.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(S,C);else{if(!this.completions)return!1;var L=this.completions.filterText.length,F=0;if(C.range&&C.range.start.row===C.range.end.row&&(L-=this.initialPosition.prefix.length,L+=this.initialPosition.pos.column-C.range.start.column,F+=C.range.end.column-this.initialPosition.pos.column),L||F){var E;S.selection.getAllRanges?E=S.selection.getAllRanges():E=[S.getSelectionRange()];for(var H=0,P;P=E[H];H++)P.start.column-=L,P.end.column+=F,S.session.remove(P)}C.snippet?u.insertSnippet(S,C.snippet):this.$insertString(S,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(S,C),C.command&&C.command==="startAutocomplete"&&S.execCommand(C.command)}return S.endOperation(),!0},T.prototype.$insertString=function(S,C){var R=C.value||C;S.execCommand("insertstring",R)},T.prototype.gatherCompletions=function(S,C){var R=S.getSession(),L=S.getCursorPosition(),F=p.getCompletionPrefix(S),E=[];this.completers=S.completers;var H=S.completers.length;return S.completers.forEach(function(P,O){P.getCompletions(S,R,L,F,function(_,A){P.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!_&&A&&(E=E.concat(A)),C(null,{prefix:p.getCompletionPrefix(S),matches:E,finished:--H===0})})}),!0},T.prototype.provideCompletions=function(S,C,R){var L=(function(P){var O=P.prefix,_=P.matches;this.completions=new I(_),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),F=!0,E=null;if(this.gatherCompletions(S,(function(P,O){if(this.active){P&&(R(P,[],!0),this.detach());var _=O.prefix;if(_.indexOf(O.prefix)===0){if(F){E=O;return}L(O)}}}).bind(this)),F=!1,E){var H=E;E=null,L(H)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(S){typeof S.cancel=="function"&&S.cancel()})},T}(),I=function(){function T(S,C){this.all=S,this.filtered=S,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(S){if(S.length>this.filterText&&S.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=S,C=this.filterCompletions(C,this.filterText),C=C.sort(function(L,F){return F.exactMatch-L.exactMatch||F.$score-L.$score||(L.caption||L.value).localeCompare(F.caption||F.value)});var R=null;C=C.filter(function(L){var F=L.snippet||L.caption||L.value;return F===R?!1:(R=F,!0)}),this.filtered=C},T.prototype.filterCompletions=function(S,C){var R=[],L=C.toUpperCase(),F=C.toLowerCase();e:for(var E=0,H;H=S[E];E++){if(H.skipFilter){H.$score=H.score,R.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,_=0,A=0,N,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)A=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(F[K],O+1),te=P.indexOf(L[K],O+1);if(N=Z>=0&&(te<0||Z<te)?Z:te,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,_|=1<<K),O=N}}H.matchMask=_,H.exactMatch=A?0:1,H.$score=(H.score||0)-A,R.push(H)}}return R},T}();r.Autocomplete=w,r.CompletionProvider=b,r.FilteredList=I}),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),l=Object.create(null),o=u[a];return u.forEach(function(c,d){if(!(!c||c===o)){var w=Math.abs(a-d),b=u.length-w;l[c]?l[c]=Math.max(b,l[c]):l[c]=b}}),l}var x=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(p,s,a,u,l){var o=y(s,a),c=Object.keys(o);l(null,c.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/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("../autocomplete/text_completer"),a={getCompletions:function(L,F,E,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(L,F,E,H,P);var O=L.session.getState(E.row),_=F.$mode.getCompletions(O,F,E,H);_=_.map(function(A){return A.completerId=a.id,A}),P(null,_)},id:"keywordCompleter"},u=function(L){var F={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(E,H,P,O){return F[H]=O||""}).replace(/\$(\d+?)/g,function(E,H){return F[H]})},l={getCompletions:function(L,F,E,H,P){var O=[],_=F.getTokenAt(E.row,E.column);_&&_.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=g.getActiveScopes(L);var A=g.snippetMap,N=[];O.forEach(function(B){for(var U=A[B]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&N.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:l.id})}},this),P(null,N)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",h.escapeHTML(L.caption),"</b>","<hr></hr>",h.escapeHTML(u(L.snippet))].join(""))},id:"snippetCompleter"},o=[l,s,a];r.setCompleters=function(L){o.length=0,L&&o.push.apply(o,L)},r.addCompleter=function(L){o.push(L)},r.textCompleter=s,r.keyWordCompleter=a,r.snippetCompleter=l;var c={name:"expandSnippet",exec:function(L){return g.expandWithTab(L)},bindKey:"Tab"},d=function(L,F){w(F.session.$mode)},w=function(L){typeof L=="string"&&(L=x.$modes[L]),L&&(g.files||(g.files={}),b(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(w))},b=function(L,F){!F||!L||g.files[L]||(g.files[L]={},x.loadModule(F,function(E){E&&(g.files[L]=E,!E.snippets&&E.snippetText&&(E.snippets=g.parseSnippetFile(E.snippetText)),g.register(E.snippets||[],E.scope),E.includeScopes&&(g.snippetMap[E.scope].includeScopes=E.includeScopes,E.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},I=function(L){var F=L.editor,E=F.completer&&F.completer.activated;if(L.command.name==="backspace")E&&!p.getCompletionPrefix(F)&&F.completer.detach();else if(L.command.name==="insertstring"&&!E){T=L;var H=L.editor.$liveAutocompletionDelay;H?S.delay(H):C(L)}},T,S=h.delayedCall(function(){C(T)},0),C=function(L){var F=L.editor,E=p.getCompletionPrefix(F),H=L.args,P=p.triggerAutocomplete(F,H);if(E&&E.length>=F.$liveAutocompletionThreshold||P){var O=y.for(F);O.autoShown=!0,O.showPopup(F)}},R=e("../editor").Editor;e("../config").defineOptions(R.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:o),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:o),this.commands.on("afterExec",I)):this.commands.off("afterExec",I)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(c),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(c),this.off("changeMode",d))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})}()}(qp)),qp.exports}B0();var Gp={exports:{}},Yp;function z0(){return Yp||(Yp=1,function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.exports=`
|
1229
|
+
|
1230
|
+
/* ------------------------------------------------------------------------------------------
|
1231
|
+
* Editor Search Form
|
1232
|
+
* --------------------------------------------------------------------------------------- */
|
1233
|
+
.ace_search {
|
1234
|
+
background-color: #ddd;
|
1235
|
+
color: #666;
|
1236
|
+
border: 1px solid #cbcbcb;
|
1237
|
+
border-top: 0 none;
|
1238
|
+
overflow: hidden;
|
1239
|
+
margin: 0;
|
1240
|
+
padding: 4px 6px 0 4px;
|
1241
|
+
position: absolute;
|
1242
|
+
top: 0;
|
1243
|
+
z-index: 99;
|
1244
|
+
white-space: normal;
|
1245
|
+
}
|
1246
|
+
.ace_search.left {
|
1247
|
+
border-left: 0 none;
|
1248
|
+
border-radius: 0px 0px 5px 0px;
|
1249
|
+
left: 0;
|
1250
|
+
}
|
1251
|
+
.ace_search.right {
|
1252
|
+
border-radius: 0px 0px 0px 5px;
|
1253
|
+
border-right: 0 none;
|
1254
|
+
right: 0;
|
1255
|
+
}
|
1256
|
+
|
1257
|
+
.ace_search_form, .ace_replace_form {
|
1258
|
+
margin: 0 20px 4px 0;
|
1259
|
+
overflow: hidden;
|
1260
|
+
line-height: 1.9;
|
1261
|
+
}
|
1262
|
+
.ace_replace_form {
|
1263
|
+
margin-right: 0;
|
1264
|
+
}
|
1265
|
+
.ace_search_form.ace_nomatch {
|
1266
|
+
outline: 1px solid red;
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
.ace_search_field {
|
1270
|
+
border-radius: 3px 0 0 3px;
|
1271
|
+
background-color: white;
|
1272
|
+
color: black;
|
1273
|
+
border: 1px solid #cbcbcb;
|
1274
|
+
border-right: 0 none;
|
1275
|
+
outline: 0;
|
1276
|
+
padding: 0;
|
1277
|
+
font-size: inherit;
|
1278
|
+
margin: 0;
|
1279
|
+
line-height: inherit;
|
1280
|
+
padding: 0 6px;
|
1281
|
+
min-width: 17em;
|
1282
|
+
vertical-align: top;
|
1283
|
+
min-height: 1.8em;
|
1284
|
+
box-sizing: content-box;
|
1285
|
+
}
|
1286
|
+
.ace_searchbtn {
|
1287
|
+
border: 1px solid #cbcbcb;
|
1288
|
+
line-height: inherit;
|
1289
|
+
display: inline-block;
|
1290
|
+
padding: 0 6px;
|
1291
|
+
background: #fff;
|
1292
|
+
border-right: 0 none;
|
1293
|
+
border-left: 1px solid #dcdcdc;
|
1294
|
+
cursor: pointer;
|
1295
|
+
margin: 0;
|
1296
|
+
position: relative;
|
1297
|
+
color: #666;
|
1298
|
+
}
|
1299
|
+
.ace_searchbtn:last-child {
|
1300
|
+
border-radius: 0 3px 3px 0;
|
1301
|
+
border-right: 1px solid #cbcbcb;
|
1302
|
+
}
|
1303
|
+
.ace_searchbtn:disabled {
|
1304
|
+
background: none;
|
1305
|
+
cursor: default;
|
1306
|
+
}
|
1307
|
+
.ace_searchbtn:hover {
|
1308
|
+
background-color: #eef1f6;
|
1309
|
+
}
|
1310
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1311
|
+
padding: 0px 0.7em
|
1312
|
+
}
|
1313
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1314
|
+
content: "";
|
1315
|
+
border: solid 2px #888;
|
1316
|
+
width: 0.5em;
|
1317
|
+
height: 0.5em;
|
1318
|
+
border-width: 2px 0 0 2px;
|
1319
|
+
display:inline-block;
|
1320
|
+
transform: rotate(-45deg);
|
1321
|
+
}
|
1322
|
+
.ace_searchbtn.next:after {
|
1323
|
+
border-width: 0 2px 2px 0 ;
|
1324
|
+
}
|
1325
|
+
.ace_searchbtn_close {
|
1326
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1327
|
+
border-radius: 50%;
|
1328
|
+
border: 0 none;
|
1329
|
+
color: #656565;
|
1330
|
+
cursor: pointer;
|
1331
|
+
font: 16px/16px Arial;
|
1332
|
+
padding: 0;
|
1333
|
+
height: 14px;
|
1334
|
+
width: 14px;
|
1335
|
+
top: 9px;
|
1336
|
+
right: 7px;
|
1337
|
+
position: absolute;
|
1338
|
+
}
|
1339
|
+
.ace_searchbtn_close:hover {
|
1340
|
+
background-color: #656565;
|
1341
|
+
background-position: 50% 100%;
|
1342
|
+
color: white;
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
.ace_button {
|
1346
|
+
margin-left: 2px;
|
1347
|
+
cursor: pointer;
|
1348
|
+
-webkit-user-select: none;
|
1349
|
+
-moz-user-select: none;
|
1350
|
+
-o-user-select: none;
|
1351
|
+
-ms-user-select: none;
|
1352
|
+
user-select: none;
|
1353
|
+
overflow: hidden;
|
1354
|
+
opacity: 0.7;
|
1355
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1356
|
+
padding: 1px;
|
1357
|
+
box-sizing: border-box!important;
|
1358
|
+
color: black;
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
.ace_button:hover {
|
1362
|
+
background-color: #eee;
|
1363
|
+
opacity:1;
|
1364
|
+
}
|
1365
|
+
.ace_button:active {
|
1366
|
+
background-color: #ddd;
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
.ace_button.checked {
|
1370
|
+
border-color: #3399ff;
|
1371
|
+
opacity:1;
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
.ace_search_options{
|
1375
|
+
margin-bottom: 3px;
|
1376
|
+
text-align: right;
|
1377
|
+
-webkit-user-select: none;
|
1378
|
+
-moz-user-select: none;
|
1379
|
+
-o-user-select: none;
|
1380
|
+
-ms-user-select: none;
|
1381
|
+
user-select: none;
|
1382
|
+
clear: both;
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
.ace_search_counter {
|
1386
|
+
float: left;
|
1387
|
+
font-family: arial;
|
1388
|
+
padding: 0 8px;
|
1389
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","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 l=function(){function d(w,b,I){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(T){T.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(I){setTimeout(function(){b.activeInput.focus()},0),x.stopPropagation(I)}),x.addListener(w,"click",function(I){var T=I.target||I.srcElement,S=T.getAttribute("action");S&&b[S]?b[S]():b.$searchBarKb.commands[S]&&b.$searchBarKb.commands[S].exec(b),x.stopPropagation(I)}),x.addCommandKeyListener(w,function(I,T,S){var C=s.keyCodeToString(S),R=b.$searchBarKb.findKeyCommand(T,C);R&&R.exec&&(R.exec(b),x.stopEvent(I))}),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,I){var T=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:I,range:this.searchRange}),S=!T&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",S),this.editor._emit("findSearchBox",{match:!S}),this.highlight(),this.updateCounter()},d.prototype.updateCounter=function(){var w=this.editor,b=w.$search.$options.re,I=b.unicode,T=0,S=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,`
|
1390
|
+
`),w.session.doc.$autoNewLine=`
|
1391
|
+
`);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var L=b.lastIndex=0,F;(F=b.exec(C))&&(T++,L=F.index,L<=R&&S++,!(T>u||!F[0]&&(b.lastIndex=L+=y.skipEmptyMatch(C,L,I),L>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[S,T>u?u+"+":T])},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&&(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 c=new p([{bindKey:"Esc",name:"closeSearchBar",exec:function(d){d.searchBox.hide()}}]);l.prototype.$searchBarKb=o,l.prototype.$closeSearchBarKb=c,r.SearchBox=l,r.Search=function(d,w){var b=d.searchBox||new l(d);b.show(d.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})}()}(Gp)),Gp.exports}z0();var j0=Object.defineProperty,H0=(n,t,e)=>t in n?j0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Vi=(n,t,e)=>H0(n,typeof t!="symbol"?t+"":t,e);function Xp(n,t){return function(){return n.apply(t,arguments)}}const{toString:U0}=Object.prototype,{getPrototypeOf:nu}=Object,{iterator:gl,toStringTag:Qp}=Symbol,fl=(n=>t=>{const e=U0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),$i=n=>(n=n.toLowerCase(),t=>fl(t)===n),ml=n=>t=>typeof t===n,{isArray:js}=Array,ka=ml("undefined");function V0(n){return n!==null&&!ka(n)&&n.constructor!==null&&!ka(n.constructor)&&Wr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Zp=$i("ArrayBuffer");function q0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Zp(n.buffer),t}const K0=ml("string"),Wr=ml("function"),Jp=ml("number"),vl=n=>n!==null&&typeof n=="object",G0=n=>n===!0||n===!1,yl=n=>{if(fl(n)!=="object")return!1;const t=nu(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qp in n)&&!(gl in n)},Y0=$i("Date"),X0=$i("File"),Q0=$i("Blob"),Z0=$i("FileList"),J0=n=>vl(n)&&Wr(n.pipe),ex=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Wr(n.append)&&((t=fl(n))==="formdata"||t==="object"&&Wr(n.toString)&&n.toString()==="[object FormData]"))},tx=$i("URLSearchParams"),[nx,rx,ix,ox]=["ReadableStream","Request","Response","Headers"].map($i),sx=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sa(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{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 eg(n,t){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,tg=n=>!ka(n)&&n!==is;function ru(){const{caseless:n}=tg(this)&&this||{},t={},e=(r,m)=>{const g=n&&eg(t,m)||m;yl(t[g])&&yl(r)?t[g]=ru(t[g],r):yl(r)?t[g]=ru({},r):js(r)?t[g]=r.slice():t[g]=r};for(let r=0,m=arguments.length;r<m;r++)arguments[r]&&Sa(arguments[r],e);return t}const ax=(n,t,e,{allOwnKeys:r}={})=>(Sa(t,(m,g)=>{e&&Wr(m)?n[g]=Xp(m,e):n[g]=m},{allOwnKeys:r}),n),lx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),cx=(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)},ux=(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&&nu(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},hx=(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},dx=n=>{if(!n)return null;if(js(n))return n;let t=n.length;if(!Jp(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},px=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&nu(Uint8Array)),gx=(n,t)=>{const e=(n&&n[gl]).call(n);let r;for(;(r=e.next())&&!r.done;){const m=r.value;t.call(n,m[0],m[1])}},fx=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},mx=$i("HTMLFormElement"),vx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),ng=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),yx=$i("RegExp"),rg=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Sa(e,(m,g)=>{let y;(y=t(m,g,n))!==!1&&(r[g]=y||m)}),Object.defineProperties(n,r)},wx=n=>{rg(n,(t,e)=>{if(Wr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Wr(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+"'")})}})},bx=(n,t)=>{const e={},r=m=>{m.forEach(g=>{e[g]=!0})};return js(n)?r(n):r(String(n).split(t)),e},xx=()=>{},Cx=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function kx(n){return!!(n&&Wr(n.append)&&n[Qp]==="FormData"&&n[gl])}const Sx=n=>{const t=new Array(10),e=(r,m)=>{if(vl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[m]=r;const g=js(r)?[]:{};return Sa(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)},Ax=$i("AsyncFunction"),_x=n=>n&&(vl(n)||Wr(n))&&Wr(n.then)&&Wr(n.catch),ig=((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",Wr(is.postMessage)),$x=typeof queueMicrotask<"u"?queueMicrotask.bind(is):typeof process<"u"&&process.nextTick||ig,Tx=n=>n!=null&&Wr(n[gl]),Ae={isArray:js,isArrayBuffer:Zp,isBuffer:V0,isFormData:ex,isArrayBufferView:q0,isString:K0,isNumber:Jp,isBoolean:G0,isObject:vl,isPlainObject:yl,isReadableStream:nx,isRequest:rx,isResponse:ix,isHeaders:ox,isUndefined:ka,isDate:Y0,isFile:X0,isBlob:Q0,isRegExp:yx,isFunction:Wr,isStream:J0,isURLSearchParams:tx,isTypedArray:px,isFileList:Z0,forEach:Sa,merge:ru,extend:ax,trim:sx,stripBOM:lx,inherits:cx,toFlatObject:ux,kindOf:fl,kindOfTest:$i,endsWith:hx,toArray:dx,forEachEntry:gx,matchAll:fx,isHTMLForm:mx,hasOwnProperty:ng,hasOwnProp:ng,reduceDescriptors:rg,freezeMethods:wx,toObjectSet:bx,toCamelCase:vx,noop:xx,toFiniteNumber:Cx,findKey:eg,global:is,isContextDefined:tg,isSpecCompliantForm:kx,toJSONObject:Sx,isAsyncFn:Ax,isThenable:_x,setImmediate:ig,asap:$x,isIterable:Tx};function Tt(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)}Ae.inherits(Tt,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:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const og=Tt.prototype,sg={};["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=>{sg[n]={value:n}}),Object.defineProperties(Tt,sg),Object.defineProperty(og,"isAxiosError",{value:!0}),Tt.from=(n,t,e,r,m,g)=>{const y=Object.create(og);return Ae.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),Tt.call(y,n.message,t,e,r,m),y.cause=n,y.name=n.name,g&&Object.assign(y,g),y};const Mx=null;function iu(n){return Ae.isPlainObject(n)||Ae.isArray(n)}function ag(n){return Ae.endsWith(n,"[]")?n.slice(0,-2):n}function lg(n,t,e){return n?n.concat(t).map(function(r,m){return r=ag(r),!e&&m?"["+r+"]":r}).join(e?".":""):t}function Ex(n){return Ae.isArray(n)&&!n.some(iu)}const Ix=Ae.toFlatObject(Ae,{},null,function(n){return/^is[A-Z]/.test(n)});function wl(n,t,e){if(!Ae.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Ae.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Ae.isUndefined(o[l])});const r=e.metaTokens,m=e.visitor||p,g=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(t);if(!Ae.isFunction(m))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Ae.isDate(l))return l.toISOString();if(!x&&Ae.isBlob(l))throw new Tt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(l)||Ae.isTypedArray(l)?x&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function p(l,o,c){let d=l;if(l&&!c&&typeof l=="object"){if(Ae.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Ae.isArray(l)&&Ex(l)||(Ae.isFileList(l)||Ae.endsWith(o,"[]"))&&(d=Ae.toArray(l)))return o=ag(o),d.forEach(function(w,b){!(Ae.isUndefined(w)||w===null)&&t.append(y===!0?lg([o],b,g):y===null?o:o+"[]",h(w))}),!1}return iu(l)?!0:(t.append(lg(c,o,g),h(l)),!1)}const s=[],a=Object.assign(Ix,{defaultVisitor:p,convertValue:h,isVisitable:iu});function u(l,o){if(!Ae.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Ae.forEach(l,function(c,d){(!(Ae.isUndefined(c)||c===null)&&m.call(t,c,Ae.isString(d)?d.trim():d,o,a))===!0&&u(c,o?o.concat(d):[d])}),s.pop()}}if(!Ae.isObject(n))throw new TypeError("data must be an object");return u(n),t}function cg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ou(n,t){this._pairs=[],n&&wl(n,this,t)}const ug=ou.prototype;ug.append=function(n,t){this._pairs.push([n,t])},ug.toString=function(n){const t=n?function(e){return n.call(this,e,cg)}:cg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function Rx(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hg(n,t,e){if(!t)return n;const r=e&&e.encode||Rx;Ae.isFunction(e)&&(e={serialize:e});const m=e&&e.serialize;let g;if(m?g=m(t,e):g=Ae.isURLSearchParams(t)?t.toString():new ou(t,e).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class dg{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){Ae.forEach(this.handlers,function(e){e!==null&&t(e)})}}const pg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lx=typeof URLSearchParams<"u"?URLSearchParams:ou,Ox=typeof FormData<"u"?FormData:null,Nx=typeof Blob<"u"?Blob:null,Dx={isBrowser:!0,classes:{URLSearchParams:Lx,FormData:Ox,Blob:Nx},protocols:["http","https","file","blob","url","data"]},su=typeof window<"u"&&typeof document<"u",au=typeof navigator=="object"&&navigator||void 0,Fx=su&&(!au||["ReactNative","NativeScript","NS"].indexOf(au.product)<0),Px=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wx=su&&window.location.href||"http://localhost",Bx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:su,hasStandardBrowserEnv:Fx,hasStandardBrowserWebWorkerEnv:Px,navigator:au,origin:Wx},Symbol.toStringTag,{value:"Module"})),yr={...Bx,...Dx};function zx(n,t){return wl(n,new yr.classes.URLSearchParams,Object.assign({visitor:function(e,r,m,g){return yr.isNode&&Ae.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)}},t))}function jx(n){return Ae.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hx(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 gg(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&&Ae.isArray(m)?m.length:y,h?(Ae.hasOwnProp(m,y)?m[y]=[m[y],r]:m[y]=r,!x):((!m[y]||!Ae.isObject(m[y]))&&(m[y]=[]),t(e,r,m[y],g)&&Ae.isArray(m[y])&&(m[y]=Hx(m[y])),!x)}if(Ae.isFormData(n)&&Ae.isFunction(n.entries)){const e={};return Ae.forEachEntry(n,(r,m)=>{t(jx(r),m,e,0)}),e}return null}function Ux(n,t,e){if(Ae.isString(n))try{return(t||JSON.parse)(n),Ae.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Aa={transitional:pg,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,m=Ae.isObject(n);if(m&&Ae.isHTMLForm(n)&&(n=new FormData(n)),Ae.isFormData(n))return r?JSON.stringify(gg(n)):n;if(Ae.isArrayBuffer(n)||Ae.isBuffer(n)||Ae.isStream(n)||Ae.isFile(n)||Ae.isBlob(n)||Ae.isReadableStream(n))return n;if(Ae.isArrayBufferView(n))return n.buffer;if(Ae.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 zx(n,this.formSerializer).toString();if((g=Ae.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return wl(g?{"files[]":n}:n,y&&new y,this.formSerializer)}}return m||r?(t.setContentType("application/json",!1),Ux(n)):n}],transformResponse:[function(n){const t=this.transitional||Aa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(n)||Ae.isReadableStream(n))return n;if(n&&Ae.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"?Tt.from(g,Tt.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:yr.classes.FormData,Blob:yr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],n=>{Aa.headers[n]={}});const Vx=Ae.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"]),qx=n=>{const t={};let e,r,m;return n&&n.split(`
|
1392
|
+
`).forEach(function(g){m=g.indexOf(":"),e=g.substring(0,m).trim().toLowerCase(),r=g.substring(m+1).trim(),!(!e||t[e]&&Vx[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},fg=Symbol("internals");function _a(n){return n&&String(n).trim().toLowerCase()}function bl(n){return n===!1||n==null?n:Ae.isArray(n)?n.map(bl):String(n)}function Kx(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 Gx=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function lu(n,t,e,r,m){if(Ae.isFunction(r))return r.call(this,t,e);if(m&&(t=e),!!Ae.isString(t)){if(Ae.isString(r))return t.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(t)}}function Yx(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function Xx(n,t){const e=Ae.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 Br=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function m(y,x,h){const p=_a(x);if(!p)throw new Error("header name must be a non-empty string");const s=Ae.findKey(r,p);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=bl(y))}const g=(y,x)=>Ae.forEach(y,(h,p)=>m(h,p,x));if(Ae.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(Ae.isString(n)&&(n=n.trim())&&!Gx(n))g(qx(n),t);else if(Ae.isObject(n)&&Ae.isIterable(n)){let y={},x,h;for(const p of n){if(!Ae.isArray(p))throw TypeError("Object iterator must return a key-value pair");y[h=p[0]]=(x=y[h])?Ae.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=_a(n),n){const e=Ae.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return Kx(r);if(Ae.isFunction(t))return t.call(this,r,e);if(Ae.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=_a(n),n){const e=Ae.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||lu(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function m(g){if(g=_a(g),g){const y=Ae.findKey(e,g);y&&(!t||lu(e,e[y],y,t))&&(delete e[y],r=!0)}}return Ae.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||lu(this,this[m],m,n,!0))&&(delete this[m],r=!0)}return r}normalize(n){const t=this,e={};return Ae.forEach(this,(r,m)=>{const g=Ae.findKey(e,m);if(g){t[g]=bl(r),delete t[m];return}const y=n?Yx(m):String(m).trim();y!==m&&delete t[m],t[y]=bl(r),e[y]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Ae.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&Ae.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(`
|
1393
|
+
`)}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[fg]=this[fg]={accessors:{}}).accessors,e=this.prototype;function r(m){const g=_a(m);t[g]||(Xx(e,m),t[g]=!0)}return Ae.isArray(n)?n.forEach(r):r(n),this}};Br.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Br.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ae.freezeMethods(Br);function cu(n,t){const e=this||Aa,r=t||e,m=Br.from(r.headers);let g=r.data;return Ae.forEach(n,function(y){g=y.call(e,g,m.normalize(),t?t.status:void 0)}),m.normalize(),g}function mg(n){return!!(n&&n.__CANCEL__)}function Hs(n,t,e){Tt.call(this,n??"canceled",Tt.ERR_CANCELED,t,e),this.name="CanceledError"}Ae.inherits(Hs,Tt,{__CANCEL__:!0});function vg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new Tt("Request failed with status code "+e.status,[Tt.ERR_BAD_REQUEST,Tt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Qx(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function Zx(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 Jx(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.apply(null,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 xl=(n,t,e=3)=>{let r=0;const m=Zx(50,250);return Jx(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)},yg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},wg=n=>(...t)=>Ae.asap(()=>n(...t)),e1=yr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,yr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(yr.origin),yr.navigator&&/(msie|trident)/i.test(yr.navigator.userAgent)):()=>!0,t1=yr.hasStandardBrowserEnv?{write(n,t,e,r,m,g){const y=[n+"="+encodeURIComponent(t)];Ae.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Ae.isString(r)&&y.push("path="+r),Ae.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 n1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function r1(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function bg(n,t,e){let r=!n1(t);return n&&(r||e==!1)?r1(n,t):t}const xg=n=>n instanceof Br?{...n}:n;function os(n,t){t=t||{};const e={};function r(p,s,a,u){return Ae.isPlainObject(p)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:u},p,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function m(p,s,a,u){if(Ae.isUndefined(s)){if(!Ae.isUndefined(p))return r(void 0,p,a,u)}else return r(p,s,a,u)}function g(p,s){if(!Ae.isUndefined(s))return r(void 0,s)}function y(p,s){if(Ae.isUndefined(s)){if(!Ae.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(xg(p),xg(s),a,!0)};return Ae.forEach(Object.keys(Object.assign({},n,t)),function(p){const s=h[p]||m,a=s(n[p],t[p],p);Ae.isUndefined(a)&&s!==x||(e[p]=a)}),e}const Cg=n=>{const t=os({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:m,xsrfCookieName:g,headers:y,auth:x}=t;t.headers=y=Br.from(y),t.url=hg(bg(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(Ae.isFormData(e)){if(yr.hasStandardBrowserEnv||yr.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(yr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(t)),r||r!==!1&&e1(t.url))){const p=m&&g&&t1.read(g);p&&y.set(m,p)}return t},i1=typeof XMLHttpRequest<"u",o1=i1&&function(n){return new Promise(function(t,e){const r=Cg(n);let m=r.data;const g=Br.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,p,s,a,u,l;function o(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function d(){if(!c)return;const b=Br.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),I={data:!y||y==="text"||y==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:b,config:n,request:c};vg(function(T){t(T),o()},function(T){e(T),o()},I),c=null}"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(e(new Tt("Request aborted",Tt.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new Tt("Network Error",Tt.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||pg;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new Tt(b,I.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,n,c)),c=null},m===void 0&&g.setContentType(null),"setRequestHeader"in c&&Ae.forEach(g.toJSON(),function(b,I){c.setRequestHeader(I,b)}),Ae.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),y&&y!=="json"&&(c.responseType=r.responseType),h&&([a,l]=xl(h,!0),c.addEventListener("progress",a)),x&&c.upload&&([s,u]=xl(x),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=b=>{c&&(e(!b||b.type?new Hs(null,n,c):b),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=Qx(r.url);if(w&&yr.protocols.indexOf(w)===-1){e(new Tt("Unsupported protocol "+w+":",Tt.ERR_BAD_REQUEST,n));return}c.send(m||null)})},s1=(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 Tt?s:new Hs(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,g(new Tt(`timeout ${t} of ms exceeded`,Tt.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=()=>Ae.asap(x),h}},a1=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},l1=async function*(n,t){for await(const e of c1(n))yield*a1(e,t)},c1=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()}},kg=(n,t,e,r)=>{const m=l1(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})},Cl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Sg=Cl&&typeof ReadableStream=="function",u1=Cl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Ag=(n,...t)=>{try{return!!n(...t)}catch{return!1}},h1=Sg&&Ag(()=>{let n=!1;const t=new Request(yr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),_g=64*1024,uu=Sg&&Ag(()=>Ae.isReadableStream(new Response("").body)),kl={stream:uu&&(n=>n.body)};Cl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!kl[t]&&(kl[t]=Ae.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new Tt(`Response type '${t}' is not supported`,Tt.ERR_NOT_SUPPORT,r)})})})(new Response);const d1=async n=>{if(n==null)return 0;if(Ae.isBlob(n))return n.size;if(Ae.isSpecCompliantForm(n))return(await new Request(yr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(n)||Ae.isArrayBuffer(n))return n.byteLength;if(Ae.isURLSearchParams(n)&&(n=n+""),Ae.isString(n))return(await u1(n)).byteLength},p1=async(n,t)=>Ae.toFiniteNumber(n.getContentLength())??d1(t),g1=Cl&&(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}=Cg(n);p=p?(p+"").toLowerCase():"text";let l=s1([m,g&&g.toAbortSignal()],y),o;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let d;try{if(h&&h1&&e!=="get"&&e!=="head"&&(d=await p1(s,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Ae.isFormData(r)&&(C=S.headers.get("content-type"))&&s.setContentType(C),S.body){const[R,L]=yg(d,xl(wg(h)));r=kg(S.body,_g,R,L)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:l,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o);const I=uu&&(p==="stream"||p==="response");if(uu&&(x||I&&c)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=b[F]});const C=Ae.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&yg(C,xl(wg(x),!0))||[];b=new Response(kg(b.body,_g,R,()=>{L&&L(),c&&c()}),S)}p=p||"text";let T=await kl[Ae.findKey(kl,p)||"text"](b,n);return!I&&c&&c(),await new Promise((S,C)=>{vg(S,C,{data:T,headers:Br.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,n,o),{cause:w.cause||w}):Tt.from(w,w&&w.code,n,o)}}),hu={http:Mx,xhr:o1,fetch:g1};Ae.forEach(hu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const $g=n=>`- ${n}`,f1=n=>Ae.isFunction(n)||n===null||n===!1,Tg={getAdapter:n=>{n=Ae.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,!f1(e)&&(r=hu[(y=String(e)).toLowerCase()],r===void 0))throw new Tt(`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 :
|
1394
|
+
`+g.map($g).join(`
|
1395
|
+
`):" "+$g(g[0]):"as no adapter specified";throw new Tt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:hu};function du(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Hs(null,n)}function Mg(n){return du(n),n.headers=Br.from(n.headers),n.data=cu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Tg.getAdapter(n.adapter||Aa.adapter)(n).then(function(t){return du(n),t.data=cu.call(n,n.transformResponse,t),t.headers=Br.from(t.headers),t},function(t){return mg(t)||(du(n),t&&t.response&&(t.response.data=cu.call(n,n.transformResponse,t.response),t.response.headers=Br.from(t.response.headers))),Promise.reject(t)})}const Eg="1.9.0",Sl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Sl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Ig={};Sl.transitional=function(n,t,e){function r(m,g){return"[Axios v"+Eg+"] Transitional option '"+m+"'"+g+(e?". "+e:"")}return(m,g,y)=>{if(n===!1)throw new Tt(r(g," has been removed"+(t?" in "+t:"")),Tt.ERR_DEPRECATED);return t&&!Ig[g]&&(Ig[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}},Sl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function m1(n,t,e){if(typeof n!="object")throw new Tt("options must be an object",Tt.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 Tt("option "+g+" must be "+h,Tt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Tt("Unknown option "+g,Tt.ERR_BAD_OPTION)}}const Al={assertOptions:m1,validators:Sl},qi=Al.validators;let ss=class{constructor(n){this.defaults=n||{},this.interceptors={request:new dg,response:new dg}}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+=`
|
1396
|
+
`+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&&Al.assertOptions(e,{silentJSONParsing:qi.transitional(qi.boolean),forcedJSONParsing:qi.transitional(qi.boolean),clarifyTimeoutError:qi.transitional(qi.boolean)},!1),r!=null&&(Ae.isFunction(r)?t.paramsSerializer={serialize:r}:Al.assertOptions(r,{encode:qi.function,serialize:qi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Al.assertOptions(t,{baseUrl:qi.spelling("baseURL"),withXsrfToken:qi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=m&&Ae.merge(m.common,m[t.method]);m&&Ae.forEach(["delete","get","head","post","put","patch","common"],l=>{delete m[l]}),t.headers=Br.concat(g,m);const y=[];let x=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(t)===!1||(x=x&&l.synchronous,y.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let p,s=0,a;if(!x){const l=[Mg.bind(this),void 0];for(l.unshift.apply(l,y),l.push.apply(l,h),a=l.length,p=Promise.resolve(t);s<a;)p=p.then(l[s++],l[s++]);return p}a=y.length;let u=t;for(s=0;s<a;){const l=y[s++],o=y[s++];try{u=l(u)}catch(c){o.call(this,c);break}}try{p=Mg.call(this,u)}catch(l){return Promise.reject(l)}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=bg(n.baseURL,n.url,n.allowAbsoluteUrls);return hg(t,n.params,n.paramsSerializer)}};Ae.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}))}}),Ae.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 v1=class vb{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 vb(function(e){t=e}),cancel:t}}};function y1(n){return function(t){return n.apply(null,t)}}function w1(n){return Ae.isObject(n)&&n.isAxiosError===!0}const pu={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(pu).forEach(([n,t])=>{pu[t]=n});function Rg(n){const t=new ss(n),e=Xp(ss.prototype.request,t);return Ae.extend(e,ss.prototype,t,{allOwnKeys:!0}),Ae.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Rg(os(n,r))},e}const Wn=Rg(Aa);Wn.Axios=ss,Wn.CanceledError=Hs,Wn.CancelToken=v1,Wn.isCancel=mg,Wn.VERSION=Eg,Wn.toFormData=wl,Wn.AxiosError=Tt,Wn.Cancel=Wn.CanceledError,Wn.all=function(n){return Promise.all(n)},Wn.spread=y1,Wn.isAxiosError=w1,Wn.mergeConfig=os,Wn.AxiosHeaders=Br,Wn.formToJSON=n=>gg(Ae.isHTMLForm(n)?new FormData(n):n),Wn.getAdapter=Tg.getAdapter,Wn.HttpStatusCode=pu,Wn.default=Wn;const{Axios:H2,AxiosError:U2,CanceledError:V2,isCancel:q2,CancelToken:K2,VERSION:G2,all:Y2,Cancel:X2,isAxiosError:Q2,spread:Z2,toFormData:J2,AxiosHeaders:eN,HttpStatusCode:tN,formToJSON:nN,getAdapter:rN,mergeConfig:iN}=Wn,gu=Wn.create({baseURL:location.origin,timeout:6e4,params:{}});gu.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:l}=window;throw l&&l.serious({title:"Network error",body:u}),n}else throw n});const _l=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),gu({method:n,url:t,data:e,params:r,headers:m,onUploadProgress:x})},fu={Accept:"application/json"},Lg={...fu,"Content-Type":"application/json"},oN=Pn("F",{get:function(n,{params:t,headers:e=fu,noScope:r,noAuth:m,onUploadProgress:g}={}){return _l("get",n,{params:t,headers:e,noScope:r,noAuth:m,onUploadProgress:g})},put:function(n,{data:t,params:e,headers:r=Lg,noScope:m,noAuth:g,onUploadProgress:y}={}){return _l("put",n,{data:t,params:e,headers:r,noScope:m,noAuth:g,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Lg,noScope:m,noAuth:g,onUploadProgress:y}={}){return _l("post",n,{data:t,params:e,headers:r,noScope:m,noAuth:g,onUploadProgress:y})},delete:function(n,{params:t,headers:e=fu,noScope:r,noAuth:m,onUploadProgress:g}={}){return _l("delete",n,{params:t,headers:e,noScope:r,noAuth:m,onUploadProgress:g})}});let $l=()=>({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 $a extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class mu extends $a{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class b1 extends $a{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ti extends $a{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class x1 extends Ti{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Og(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 C1{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 Ng{constructor(t={}){this.emitter=$l(),this.params=Object.freeze(t),this.presence=new C1(this),this.initialConnect=!0,this[as]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Og({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 $a("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class k1{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 S1{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 A1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new S1),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 k1(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 _1{constructor(t={}){this.subscriptions=new A1(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 Dg={debug:0,info:1,warn:2,error:3};class Fg{constructor(t){this.level=t||"warn"}log(t,e,r){Dg[t]<Dg[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 Ta extends Fg{writeLogEntry(){}}class $1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let T1=0;class Pg{constructor(t={}){let{logger:e}=t;this.logger=e||new Ta,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=Og(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=++T1;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 b1(`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 Ti(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 mu)):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 Wg=()=>Date.now()/1e3|0;class M1 extends Pg{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=Wg()),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=Wg()),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 E1 extends $a{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class vu extends Ng{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}Vi(vu,"identifier","__ghost__");const I1="$pubsub";class yu extends Ng{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}Vi(yu,"identifier",I1);const ls=Symbol("state");let R1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:m,hubOptions:g,performFailures:y,transportConfigurator:x}){this.emitter=$l(),this.transport=n,this.encoder=e,this.logger=r||new Ta,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new _1(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 Ti("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 Ti("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 Ti(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 Ti?n:new Ti(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[ls]="closed";let e=t||new Ti("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 yu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new yu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=vu),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 mu&&this.logger.warn("rejected",g),y instanceof Ti){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 Ti?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 E1;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 L1={maxMissingPings:2,maxReconnectAttempts:1/0},Us=()=>Date.now(),Bg=(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 zg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},L1,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 Ta,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 x1))}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 O1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=$l(),this.unbind=[],this.logger=e.logger||new Ta}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 N1{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=$l();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 jg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function D1(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({},jg,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:l,pingInterval:o,reconnectStrategy:c,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:I,historyTimestamp:T,protocolOptions:S,concurrentSubscribes:C,performFailures:R,transportConfigurator:L,auth:F}=t;if(p=p||new Ta(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")e=new Pg({logger:p,...S});else if(P==="actioncable-v1-ext")e=new M1({logger:p,historyTimestamp:T,...S});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new $1,m=m||"text";else if(O==="msgpack"){if(m="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="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 N1(n,{websocketImplementation:r,websocketOptions:g,subprotocol:b,authStrategy:y,format:m}),x&&(s=new O1([s,...x],{logger:p})),F&&F.token&&s.setToken(F.token,F.param||"jid"),c=c||Bg(o),l!==!1&&(l=l||new zg({pingInterval:o,reconnectStrategy:c,maxMissingPings:d,maxReconnectAttempts:w,logger:p}));let E={concurrentSubscribes:C},H=new R1({protocol:e,transport:s,encoder:a,logger:p,lazy:u,hubOptions:E,performFailures:R,transportConfigurator:L});return l&&(l.watch(H),H.monitor=l),I&&F1(H,async()=>{try{await I(s)}catch(P){return p.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function F1(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 P1{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 W1 extends vu{constructor(t,e,r){super(t,e),this.subscription=new P1(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 mu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class B1{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 W1(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 z1{constructor(t){this.cable=t,this.subscriptions=new B1(t)}}class j1 extends Fg{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class H1 extends zg{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 Ti("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 U1=["cable","action-cable"],V1="/cable",Tl=(n,t)=>{for(let e of U1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},Hg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,q1=()=>{if(typeof document<"u"&&document.head){let n=Tl(document,"url");if(n)return Hg(n)}return Hg(V1)},K1=()=>{if(typeof document<"u"&&document.head){let n=Tl(document,"history-timestamp");if(n)return n|0}},G1=()=>{if(typeof document<"u"&&document.head)return Tl(document,"token")},Y1=()=>{if(typeof document<"u"&&document.head)return Tl(document,"token-param")};function X1(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||q1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=K1());let e=G1();if(e){let p=Y1();t.auth=Object.assign({token:e,param:p},t.auth||{})}t=Object.assign({},jg,t);let{logLevel:r,logger:m,pingInterval:g,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return m=t.logger=t.logger||new j1(r),y=t.reconnectStrategy=t.reconnectStrategy||Bg(g),t.monitor!==!1&&(t.monitor=t.monitor||new H1({pingInterval:g,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:m})),D1(n,t)}function Q1(n,t){let e=X1(n,t);return new z1(e)}class Z1{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(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=Q1(y)}return this._cable.subscriptions.create({channel:t,...m},r)})}recordPing(){}}Pn("P",Z1);class wu{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}}Pn("c",wu);class J1{constructor(){Vi(this,"keyword",null),Vi(this,"parameters",[]),Vi(this,"filename",""),Vi(this,"line",""),Vi(this,"lineNumber",0),Vi(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 wu(this,`Not enough parameters for ${this.keyword}.`,r,this.url);if(e&&this.parameters[e]!==void 0)throw new wu(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(`
|
1397
|
+
`),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+=`
|
1398
|
+
`),y=!0;continue;case"&":this.line+=s.substring(0,s.length-1);continue;default:this.line+=s}y=!1;let l=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,o=this.scan_string(this.line,l),c="";if(o.length>0&&(c=c+o[0]),c.length===0||c.charAt(0)==="#"?this.keyword=null:this.keyword=c.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=""}}}Pn("W",J1);function bu(n){return eC.test(n)}const eC=/^-?[0-9]+$/;function Ug(n){return tC.test(n)}const tC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Vg(n,t){const e=Number.parseFloat(n),r=String(e),m=qg(n),g=qg(r);return!!(m===g||(t==null?void 0:t.approx)===!0&&!bu(n)&&g.length>=14&&m.startsWith(g.substring(0,14)))}let Ma=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function nC(n){if(Vg(n,{approx:!1}))return;if(bu(n))return Ma.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?Ma.underflow:Ma.truncate_float:Ma.overflow}function qg(n){return n.replace(rC,"").replace(oC,"").replace(sC,"").replace(iC,"")}const rC=/[eE][+-]?\d+$/,iC=/^-?(0*)?/,oC=/\./,sC=/0+$/;class aC{constructor(t){if(Vi(this,"isLosslessNumber",!0),!Ug(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=nC(this.value);if(t===void 0||t===Ma.truncate_float)return Number.parseFloat(this.value);if(bu(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 lC(n){return n&&typeof n=="object"&&n.isLosslessNumber===!0||!1}function cC(n){return new aC(n)}function uC(n,t){return xu({"":n},"",n,t)}function xu(n,t,e,r){return Array.isArray(e)?r.call(n,t,dC(e,r)):e&&typeof e=="object"&&!lC(e)?r.call(n,t,hC(e,r)):r.call(n,t,e)}function hC(n,t){for(const e of Object.keys(n)){const r=xu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function dC(n,t){for(let e=0;e<n.length;e++)n[e]=xu(n,String(e),n[e],t);return n}function pC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cC,r=0;const m=x();return o(m),d(),t?uC(m,t):m;function g(){if(n.charCodeAt(r)===wC){r++,p();const _={};let A=!0;for(;r<n.length&&n.charCodeAt(r)!==Gg;){A?A=!1:(u(),p());const N=r,B=s();if(B===void 0){I();return}p(),l();const U=x();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(_,B)&&!Cu(U,_[B])&&T(B,N+1),_[B]=U}return n.charCodeAt(r)!==Gg&&S(),r++,_}}function y(){if(n.charCodeAt(r)===bC){r++,p();const _=[];let A=!0;for(;r<n.length&&n.charCodeAt(r)!==Yg;){A?A=!1:u();const N=x();c(N),_.push(N)}return n.charCodeAt(r)!==Yg&&C(),r++,_}}function x(){p();const _=s()??a()??g()??y()??h("true",!0)??h("false",!1)??h("null",null);return p(),_}function h(_,A){if(n.slice(r,r+_.length)===_)return r+=_.length,A}function p(){for(;gC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===ku){r++;let _="";for(;r<n.length&&n.charCodeAt(r)!==ku;){if(n.charCodeAt(r)===yC){const A=n[r+1],N=vC[A];N!==void 0?(_+=N,r++):A==="u"?Ml(n.charCodeAt(r+2))&&Ml(n.charCodeAt(r+3))&&Ml(n.charCodeAt(r+4))&&Ml(n.charCodeAt(r+5))?(_+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):E(r):L(r)}else mC(n.charCodeAt(r))?_+=n[r]:R(n[r]);r++}return b(),r++,_}}function a(){const _=r;if(n.charCodeAt(r)===Xg&&(r++,w(_)),n.charCodeAt(r)===Su)r++;else if(fC(n.charCodeAt(r)))for(r++;El(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===TC)for(r++,w(_);El(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===LC||n.charCodeAt(r)===RC)for(r++,(n.charCodeAt(r)===Xg||n.charCodeAt(r)===AC)&&r++,w(_);El(n.charCodeAt(r));)r++;if(r>_)return e(n.slice(_,r))}function u(){if(n.charCodeAt(r)!==$C)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(n.charCodeAt(r)!==MC)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(_){if(_===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function c(_){if(_===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(_){if(!El(n.charCodeAt(r))){const A=n.slice(_,r);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${O()}`)}}function b(){if(n.charCodeAt(r)!==ku)throw new SyntaxError(`End of string '"' expected ${O()}`)}function I(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(_,A){throw new SyntaxError(`Duplicate key '${_}' encountered at position ${A}`)}function S(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function R(_){throw new SyntaxError(`Invalid character '${_}' ${H()}`)}function L(_){const A=n.slice(_,_+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function E(_){const A=n.slice(_,_+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function gC(n){return n===xC||n===CC||n===kC||n===SC}function Ml(n){return n>=Su&&n<=Au||n>=EC&&n<=OC||n>=IC&&n<=NC}function El(n){return n>=Su&&n<=Au}function fC(n){return n>=_C&&n<=Au}function mC(n){return n>=32&&n<=1114111}function Cu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>Cu(e,t[r])):Kg(n)&&Kg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>Cu(n[e],t[e])):!1}function Kg(n){return typeof n=="object"&&n!==null}const vC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1399
|
+
`,r:"\r",t:" "},yC=92,wC=123,Gg=125,bC=91,Yg=93,xC=32,CC=10,kC=9,SC=13,ku=34,AC=43,Xg=45,Su=48,_C=49,Au=57,$C=44,TC=46,MC=58,EC=65,IC=97,RC=69,LC=101,OC=70,NC=102;function Qg(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"||!Ug(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 Qg(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 l of s){const o=h[l];if(x(l,o)){a?a=!1:u+=",";const c=JSON.stringify(l);u+=`${c}:`,u+=m(o)}}return u+="}",u}function x(h,p){return typeof p<"u"&&typeof p!="function"&&typeof p!="symbol"}}function DC(n){return Vg(n)?parseFloat(n):BigInt(n)}class cs{constructor(){Vi(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 gu.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)=>Qg(y)],transformResponse:[y=>pC(y,void 0,DC)]})).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.name="Unknown error",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])}async get_tlm_values(t,e=30,r=null){let m={stale_time:e};r!==null&&(m.cache_timeout=r);const g=await this.exec("get_tlm_values",[t],m,{},1e4);let y=g[0].length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(g[0][h]),x!==null&&(g[0][h]=x);return g}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){let y=null;for(let x in m)Object.prototype.hasOwnProperty.call(m,x)&&(y=this.encode_openc3_type(m[x]),y!==null&&(m[x]=y));return this.exec(t,[e,r,m],{},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={}){return e===void 0?this.exec("cmd",t,{},m):this._cmd("cmd",t,e,r,m)}cmd_no_range_check(t,e,r,m={}){return e===void 0?this.exec("cmd_no_range_check",t,{},m):this._cmd("cmd_no_range_check",t,e,r,m)}cmd_raw(t,e,r,m={}){return e===void 0?this.exec("cmd_raw",t,{},m):this._cmd("cmd_raw",t,e,r,m)}cmd_raw_no_range_check(t,e,r,m={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},m):this._cmd("cmd_raw_no_range_check",t,e,r,m)}cmd_no_hazardous_check(t,e,r,m={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},m):this._cmd("cmd_no_hazardous_check",t,e,r,m)}cmd_no_checks(t,e,r,m={}){return e===void 0?this.exec("cmd_no_checks",t,{},m):this._cmd("cmd_no_checks",t,e,r,m)}cmd_raw_no_hazardous_check(t,e,r,m={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},m):this._cmd("cmd_raw_no_hazardous_check",t,e,r,m)}cmd_raw_no_checks(t,e,r,m={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},m):this._cmd("cmd_raw_no_checks",t,e,r,m)}build_cmd(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}build_command(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}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){return this.exec("get_setting",[t])}get_settings(t){return this.exec("get_settings",t)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}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("")}}}Pn("B",cs);var Zg={exports:{}},Jg;function FC(){return Jg||(Jg=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(F,E,H){if(!(F.length<E)){var P=F.slice(0,E),O=F.slice(E),_=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,B=0;if(A&&!A[2]&&(N=E-A[1].length,B=E),_&&!_[2]&&(N||(N=E),B=E+_[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>H)return{start:A.index,end:A.index+A[2].length};if(_&&_[2])return N=E+_[2].length,{start:N,end:N+_[3].length}}}for(var u=s.column||p.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),c=Math.max(s.startRow,s.endRow),d=p.session;o<=c;){var w=d.getLine(o);if(w.length>u){var b=a(w,u,5);if(b){var I=/^\s*/.exec(w)[0];d.replace(new x(o,b.start,o,b.end),`
|
1400
|
+
`+I)}c++}else if(l&&/\S/.test(w)&&o!=c){var T=d.getLine(o+1);if(T&&/\S/.test(T)){var S=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),R=S+" "+C,b=a(R,u,5);if(b&&b.start>S.length||R.length<u){var L=new x(o,S.length,o+1,T.length-C.length);d.replace(L," "),o--,c--}else S.length<w.length&&d.remove(new x(o,S.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 Ne(v.row,v.column)}function x(v,$,k){if($.line===k.line&&$.ch>=k.ch-1){var D=v.getLine($.line),W=D.charCodeAt($.ch);55296<=W&&W<=55551&&(k.ch+=1)}return{start:$,end:k}}function h(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),Pe.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",zo),R(v),Pe.on(v.getInputField(),"paste",s(v))}function p(v){v.setOption("disableInput",!1),v.off("cursorActivity",zo),Pe.off(v.getInputField(),"paste",s(v)),v.state.vim=null,lr&&clearTimeout(lr)}function s(v){var $=v.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(v.setCursor(fe(v.getCursor(),0,1)),Nn.enterInsertMode(v,{},$))}),$.onPasteFn}function a(v,$){return $>=v.firstLine()&&$<=v.lastLine()}function u(v){return/^[a-z]$/.test(v)}function l(v){return"()[]{}".indexOf(v)!=-1}function o(v){return ha.test(v)}function c(v){return rn.test(v)}function d(v){return/^\s*$/.test(v)}function w(v){return".?!".indexOf(v)!=-1}function b(v,$){for(var k=0;k<$.length;k++)if($[k]==v)return!0;return!1}function I(v,$,k,D,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Vt[v]={type:k,defaultValue:$,callback:W},D)for(var z=0;z<D.length;z++)Vt[D[z]]=Vt[v];$&&T(v,$)}function T(v,$,k,D){var W=Vt[v];D=D||{};var z=D.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?(z!=="local"&&W.callback($,void 0),z!=="global"&&k&&W.callback($,k)):(z!=="local"&&(W.value=W.type=="boolean"?!!$:$),z!=="global"&&k&&(k.state.vim.options[v]={value:$}))}function S(v,$,k){var D=Vt[v];k=k||{};var W=k.scope;if(!D)return new Error("Unknown option: "+v);if(D.callback){var z=$&&D.callback(void 0,$);return W!=="global"&&z!==void 0?z:W!=="local"?D.callback():void 0}var z=W!=="global"&&$&&$.state.vim.options[v];return(z||W!=="local"&&D||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Ln()}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 L(){Be={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:yi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Vt){var $=Vt[v];$.value=$.defaultValue}}function F(v){function $(Y){typeof Y=="string"?wn.value=Y:wn=null}if(v[0]=="<"){var k=v.toLowerCase().slice(1,-1),D=k.split("-");if(k=D.pop()||"",k=="lt")v="<";else if(k=="space")v=" ";else if(k=="cr")v=`
|
1401
|
+
`;else if(wi[k]){var W=wn.value,z={key:wi[k],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};wn.onKeyDown&&wn.onKeyDown(z,wn.value,$),wn&&wn.onKeyUp&&wn.onKeyUp(z,wn.value,$);return}}if(v==`
|
1402
|
+
`){var q=wn;wn=null,q.onClose&&q.onClose(q.value)}else wn.value=(wn.value||"")+v}function E(v,$,k){var D=cn;if(k){if(Ir.indexOf(k)!=-1)return;Ir.push(k),cn=k.noremap!=0}try{for(var W=R(v),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec($);){var Y=q[0],Q=W.insertMode;if(wn){F(Y);continue}var re=bt.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=`
|
1403
|
+
`;else{if(wi.hasOwnProperty(se)){Y=wi[se],Ho(v,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}v.replaceSelection(Y)}}}finally{if(Ir.pop(),cn=Ir.length?D:!1,!Ir.length&&wn){var Ce=wn;wn=null,Sr(v,Ce)}}}function H(v,$){var k=v.key;if(!Rr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Qn[k]||k;var D="";if(v.ctrlKey&&(D+="C-"),v.altKey&&(D+="A-"),v.metaKey&&(D+="M-"),Pe.isMac&&v.altKey&&!v.metaKey&&!v.ctrlKey&&(D=D.slice(2)),(D||k.length>1)&&v.shiftKey&&(D+="S-"),$&&!$.expectLiteralNext&&k.length==1){if(Un.keymap&&k in Un.keymap)(Un.remapCtrl!=0||!D)&&(k=Un.keymap[k]);else if(k.charCodeAt(0)>255){var W=v.code&&v.code.slice(-1)||"";v.shiftKey||(W=W.toLowerCase()),W&&(k=W)}}return D+=k,D.length>1&&(D="<"+D+">"),D}}function P(v,$){Un.string!==v&&(Un=O(v)),Un.remapCtrl=$}function O(v){function $(D){return D.split(/\\?(.)/).filter(Boolean)}var k={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var W=D.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var z=$(W[1]),q=$(W[2]);if(z.length!==q.length)return;for(var Y=0;Y<z.length;++Y)k[z[Y]]=q[Y]}else if(W.length==1){var Q=$(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)k[Q[Y]]=Q[Y+1]}}}),{keymap:k,string:v}):{keymap:k,string:""}}function _(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(v,$){v.state.vim.inputState=new _,v.state.vim.expectLiteralNext=!1,Pe.signal(v,"vim-command-done",$)}function N(){this.removed=[],this.inserted=""}function B(v,$,k){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!k}function U(v,$){var k=Be.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");k[v]=$,nn.push(v)}function K(v){this.registers=v,this.unnamedRegister=v['"']=new B,v["."]=new B,v[":"]=new B,v["/"]=new B,v["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(v,$){qr[v]=$}function he(v,$){for(var k=[],D=0;D<$;D++)k.push(v);return k}function ne(v,$){Ko[v]=$}function ae(v,$){Nn[v]=$}function ue(v,$,k){var D=v.state.vim,W=D.insertMode||D.visualMode,z=Math.min(Math.max(v.firstLine(),$.line),v.lastLine()),q=v.getLine(z),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;k&&k.line==z&&k.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(z,Q)}function ce(v){var $={};for(var k in v)v.hasOwnProperty(k)&&($[k]=v[k]);return $}function fe(v,$,k){return typeof $=="object"&&(k=$.ch,$=$.line),new Ne(v.line+$,v.ch+k)}function $e(v,$,k,D){D.operator&&(k="operatorPending");for(var W,z=[],q=[],Y=cn?$.length-vo:0,Q=Y;Q<$.length;Q++){var re=$[Q];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||D.operator&&re.type=="action"||!(W=Te(v,re.keys))||(W=="partial"&&z.push(re),W=="full"&&q.push(re))}return{partial:z.length&&z,full:q.length&&q}}function Te(v,$){var k=$.slice(-11)=="<character>",D=$.slice(-10)=="<register>";if(k||D){var W=$.length-(k?11:10),z=v.slice(0,W),q=$.slice(0,W);return z==q&&v.length>W?"full":q.indexOf(z)==0?"partial":!1}return v==$?"full":$.indexOf(v)==0?"partial":!1}function Ee(v){var $=/^.*(<[^>]+>)$/.exec(v),k=$?$[1]:v.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
1404
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function Ge(v,$,k){return function(){for(var D=0;D<k;D++)$(v)}}function qe(v){return new Ne(v.line,v.ch)}function ht(v,$){return v.ch==$.ch&&v.line==$.line}function tt(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))),tt(v,$)?v:$}function tn(v,$){return arguments.length>2&&($=tn.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(v,$)?$:v}function pn(v,$,k){var D=tt(v,$),W=tt($,k);return D&&W}function Yt(v,$){return v.getLine($).length}function pr(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function gn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function En(v,$,k){var D=Yt(v,$),W=new Array(k-D+1).join(" ");v.setCursor(new Ne($,D)),v.replaceRange(W,v.getCursor())}function In(v,$){var k=[],D=v.listSelections(),W=qe(v.clipPos($)),z=!ht($,W),q=v.getCursor("head"),Y=yt(D,q),Q=ht(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ye=D[se].anchor,Ce=Math.min(ye.line,W.line),me=Math.max(ye.line,W.line),we=ye.ch,Oe=W.ch,Le=D[se].head.ch-we,Ue=Oe-we;Le>0&&Ue<=0?(we++,z||Oe--):Le<0&&Ue>=0?(we--,Q||Oe++):Le<0&&Ue==-1&&(we--,Oe++);for(var st=Ce;st<=me;st++){var Qe={anchor:new Ne(st,we),head:new Ne(st,Oe)};k.push(Qe)}return v.setSelections(k),$.ch=Oe,ye.ch=we,ye}function Xn(v,$,k){for(var D=[],W=0;W<k;W++){var z=fe($,W,0);D.push({anchor:z,head:z})}v.setSelections(D,0)}function yt(v,$,k){for(var D=0;D<v.length;D++){var W=ht(v[D].anchor,$),z=ht(v[D].head,$);if(W||z)return D}return-1}function He(v,$){var k=$.lastSelection,D=function(){var z=v.listSelections(),q=z[0],Y=z[z.length-1],Q=tt(q.anchor,q.head)?q.anchor:q.head,re=tt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var z=v.getCursor(),q=v.getCursor(),Y=k.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(z.line+re,z.ch+Q);for(var se=[],ye=z.line;ye<q.line;ye++){var Ce=new Ne(ye,z.ch),me=new Ne(ye,q.ch),we={anchor:Ce,head:me};se.push(we)}v.setSelections(se)}else{var Oe=k.anchorMark.find(),Le=k.headMark.find(),Ue=Le.line-Oe.line,st=Le.ch-Oe.ch;q={line:q.line+Ue,ch:Ue?q.ch:st+q.ch},k.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,Yt(v,q.line))),v.setSelection(z,q)}return[z,q]};return $.visualMode?D():W()}function ke(v,$){var k=$.sel.anchor,D=$.sel.head;$.lastPastedText&&(D=v.posFromIndex(v.indexFromPos(k)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:v.setBookmark(k),headMark:v.setBookmark(D),anchor:qe(k),head:qe(D),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function ze(v,$,k,D){var W=v.state.vim.sel,z=D?$:W.head,q=D?$:W.anchor,Y;return tt(k,$)&&(Y=k,k=$,$=Y),tt(z,q)?(z=dt($,z),q=tn(q,k)):(q=dt($,q),z=tn(z,k),z=fe(z,0,-1),z.ch==-1&&z.line!=v.firstLine()&&(z=new Ne(z.line-1,Yt(v,z.line-1)))),[q,z]}function Ye(v,$,W){var D=v.state.vim;$=$||D.sel;var W=W||D.visualLine?"line":D.visualBlock?"block":"char",z=pt(v,$,W);v.setSelections(z.ranges,z.primary)}function pt(v,$,k,D){var W=qe($.head),z=qe($.anchor);if(k=="char"){var q=!D&&!tt($.head,$.anchor)?1:0,Y=tt($.head,$.anchor)?1:0;return W=fe($.head,0,q),z=fe($.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(k=="line"){if(tt($.head,$.anchor))W.ch=0,z.ch=Yt(v,z.line);else{z.ch=0;var Q=v.lastLine();W.line>Q&&(W.line=Q),W.ch=Yt(v,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(k=="block"){var re=Math.min(z.line,W.line),se=z.ch,ye=Math.max(z.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,Oe=[],Le=0;Le<me;Le++)Oe.push({anchor:new Ne(re+Le,se),head:new Ne(re+Le,Ce)});return{ranges:Oe,primary:we}}}function kt(v){var $=v.getCursor("head");return v.getSelection().length==1&&($=dt($,v.getCursor("anchor"))),$}function Ct(v,$){var k=v.state.vim;$!==!1&&v.setCursor(ue(v,k.sel.head)),ke(v,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||Pe.signal(v,"vim-mode-change",{mode:"normal"})}function Ot(v,$,k){var D=v.getRange($,k);if(/\n\s*$/.test(D)){var W=D.split(`
|
1405
|
+
`);W.pop();for(var z,z=W.pop();W.length>0&&z&&d(z);z=W.pop())k.line--,k.ch=0;z?(k.line--,k.ch=Yt(v,k.line)):k.ch=0}}function Rt(v,$,k){$.ch=0,k.ch=0,k.line++}function ut(v){if(!v)return 0;var $=v.search(/\S/);return $==-1?v.length:$}function wt(v,$,k){var D=$.inclusive,W=$.innerWord,z=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=k||kt(v),re=v.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,we,Oe=q?yo[0]:vi[0];if(W&&/\s/.test(re.charAt(me)))Oe=function(vn){return/\s/.test(vn)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,we=lo(v,Q,!0,z,!0);break}z?Oe=vi[0]:(Oe=yo[0],Oe(re.charAt(me))||(Oe=yo[1]))}for(var Le=me,Ue=me;Oe(re.charAt(Ue))&&Ue>=0;)Ue--;if(Ue++,we)Le=we.to,Ce=we.line,se=v.getLine(Ce),!se&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(D){var st=Le,Qe=Q.ch<=Ue&&/\s/.test(re.charAt(Q.ch));if(!Qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(st==Le||Qe){for(var et=Ue;/\s/.test(re.charAt(Ue-1))&&Ue>0;)Ue--;!Ue&&!Qe&&(Ue=et)}}return{start:new Ne(ye,Ue),end:new Ne(Ce,Le)}}function xn(v,$,k){var D=$;if(!Pe.findMatchingTag||!Pe.findEnclosingTag)return{start:D,end:D};var W=Pe.findMatchingTag(v,$)||Pe.findEnclosingTag(v,$);return!W||!W.open||!W.close?{start:D,end:D}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function xr(v,$,k){ht($,k)||Be.jumpList.add(v,$,k)}function Hr(v,$){Be.lastCharacterSearch.increment=v,Be.lastCharacterSearch.forward=$.forward,Be.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Li(v,$,k,D){var W=qe(v.getCursor()),z=k?1:-1,q=k?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:D,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:k,depth:0,curMoveThrough:!1},ye=ii[D];if(!ye)return W;var Ce=oi[ye].init,me=oi[ye].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=z,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=z,se.lineText=v.getLine(Q)||"",z>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 Ne(Q,se.index):W}function lo(v,$,k,D,W){var z=$.line,q=$.ch,Y=v.getLine(z),Q=k?1:-1,re=D?vi:yo;if(W&&Y==""){if(z+=Q,Y=v.getLine(z),!a(v,z))return null;q=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:z};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(q))){for(ye=q;q!=se&&re[we](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==$.ch&&z==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:z}}me||(q+=Q)}if(z+=Q,!a(v,z))return null;Y=v.getLine(z),q=Q>0?0:Y.length}}function gr(v,$,k,D,W,z){var q=qe($),Y=[];(D&&!W||!D&&W)&&k++;for(var Q=!D||!W,re=0;re<k;re++){var se=lo(v,$,D,z,Q);if(!se){var ye=Yt(v,v.lastLine());Y.push(D?{line:v.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new Ne(se.line,D?se.to-1:se.from)}var Ce=Y.length!=k,me=Y[0],we=Y.pop();return D&&!W?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):D&&W?new Ne(we.line,we.to-1):!D&&W?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function co(v,$,k,D,W){var z=$,q=new Ne(z.line+k.repeat-1,1/0),Y=v.clipPos(q);return Y.ch--,W||(D.lastHPos=1/0,D.lastHSPos=v.charCoords(Y,"div").left),q}function Do(v,$,k,D,W){for(var z=W||v.getCursor(),q=z.ch,Y,Q=0;Q<$;Q++){var re=v.getLine(z.line);if(Y=Va(q,re,D,k),Y==-1)return null;q=Y}return new Ne(v.getCursor().line,Y)}function Ua(v,$){var k=v.getCursor().line;return ue(v,new Ne(k,$-1))}function ti(v,$,k,D){!b(k,no)&&!Zt.test(k)||($.marks[k]&&$.marks[k].clear(),$.marks[k]=v.setBookmark(D))}function Va(v,$,k,D,W){var z;return D?(z=$.indexOf(k,v+1),z!=-1):(z=$.lastIndexOf(k,v-1),z!=-1),z}function ws(v,$,k,D,W){function z(Ue){return!/\S/.test(v.getLine(Ue))}function q(Ue,st,Qe){return Qe?z(Ue)!=z(Ue+st):!z(Ue)&&z(Ue+st)}function Y(Ue){D=D>0?1:-1;var st=v.ace.session.getFoldLine(Ue);st&&Ue+D>st.start.row&&Ue+D<st.end.row&&(D=(D>0?st.end.row:st.start.row)-Ue)}var Q=$.line,re=v.firstLine(),se=v.lastLine(),ye,Ce,me=Q;if(D){for(;re<=me&&me<=se&&k>0;)Y(me),q(me,D)&&k--,me+=D;return new Ne(me,0)}var we=v.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Le=z(Q);for(me=Q;me<=se&&k;me++)q(me,1,!0)&&(!W||z(me)!=Le)&&k--;for(Ce=new Ne(me,0),me>se&&!Le?Le=!0:W=!1,me=Q;me>re&&!((!W||z(me)==Le||me==Q)&&q(me,-1,!0));me--);return ye=new Ne(me,0),{start:ye,end:Ce}}function ia(v,$,k,D,W){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(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 Oe=we.pos;for(z(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(z(we);we.line!==null&&d(we.line[we.pos]);)Oe=we.pos,z(we);return{ln:we.ln,pos:Oe+1}}z(we)}return{ln:we.ln,pos:Oe+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 Oe=we.pos;for(z(we);we.line!==null;){if(!d(we.line[we.pos])&&!w(we.line[we.pos]))Oe=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:Oe}:{ln:we.ln,pos:Oe};z(we)}return we.line=me,W&&d(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};k>0;)D<0?Q=Y(v,Q.ln,Q.pos,D):Q=q(v,Q.ln,Q.pos,D),k--;return new Ne(Q.ln,Q.pos)}function Oi(v,$,k,D){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 z(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},Oe=me.line==="";for(W(Q,me);me.line!==null;){if(we.ln=me.ln,we.pos=me.pos,me.line===""&&!Oe)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 Ue=Le.length-1;Ue>=0;--Ue)if(!d(Le[Ue])){we.pos=Ue;break}return we}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,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 Oe=Q.getLine(me.ln);me.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!d(Oe[Le])){me.pos=Le;break}return me}for(var Y={ln:$.line,pos:$.ch};k>0;)D<0?Y=q(v,Y.ln,Y.pos,D):Y=z(v,Y.ln,Y.pos,D),k--;return new Ne(Y.ln,Y.pos)}function jn(v,$,k,D){var W=$,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=v.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(z=v.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=v.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!z||!q)return null;if(z=z.pos,q=q.pos,z.line==q.line&&z.ch>q.ch||z.line>q.line){var ye=z;z=q,q=ye}return D?q.ch+=1:z.ch+=1,{start:z,end:q}}function Cr(v,$,k,D){var W=qe($),z=v.getLine(W.line),q=z.split(""),Y,Q,re,se,ye=q.indexOf(k);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&q[W.ch]==k){var Ce=/string/.test(v.getTokenTypeAt(fe($,0,1))),me=/string/.test(v.getTokenTypeAt($)),we=Ce&&!me;we||(Q=W.ch,--W.ch)}if(q[W.ch]==k&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==k&&(Q=re);return!Y||!Q?{start:W,end:W}:(D&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function Ni(){}function _n(v){var $=v.state.vim;return $.searchState_||($.searchState_=new Ni)}function kr(v){return Di(v,"/")}function Qi(v){return bs(v,"/")}function Di(v,$){var k=bs(v,$)||[];if(!k.length)return[];var D=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&D.push(v.substring(k[W]+1,k[W+1]));return D}}function bs(v,$){$||($="/");for(var k=!1,D=[],W=0;W<v.length;W++){var z=v.charAt(W);!k&&z==$&&D.push(W),k=!k&&z=="\\"}return D}function oa(v){for(var $="|(){",k="}",D=!1,W=[],z=-1;z<v.length;z++){var q=v.charAt(z)||"",Y=v.charAt(z+1)||"",Q=Y&&$.indexOf(Y)!=-1;D?((q!=="\\"||!Q)&&W.push(q),D=!1):q==="\\"?(D=!0,Y&&k.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function qa(v){for(var $=!1,k=[],D=-1;D<v.length;D++){var W=v.charAt(D)||"",z=v.charAt(D+1)||"";bi[W+z]?(k.push(bi[W+z]),D++):$?(k.push(W),$=!1):W==="\\"?($=!0,o(z)||z==="$"?k.push("$"):z!=="/"&&z!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),z==="/"&&k.push("\\"))}return k.join("")}function Ka(v){for(var $=new Pe.StringStream(v),k=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)k.push($.next());var D=!1;for(var W in ar)if($.match(W,!0)){D=!0,k.push(ar[W]);break}D||k.push($.next())}return k.join("")}function Fi(v,$,k){var D=Be.registerController.getRegister("/");if(D.setText(v),v instanceof RegExp)return v;var W=Qi(v),z,q;if(!W.length)z=v;else{z=v.substring(0,W[0]);var Y=v.substring(W[0]);q=Y.indexOf("i")!=-1}if(!z)return null;S("pcre")||(z=oa(z)),k&&($=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,$||q?"im":"m");return Q}function ni(v){typeof v=="string"&&(v=document.createElement(v));for(var $,k=1;k<arguments.length;k++)if($=arguments[k])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)v.appendChild($);else for(var D in $)Object.prototype.hasOwnProperty.call($,D)&&(D[0]==="$"?v.style[D.slice(1)]=$[D]:v.setAttribute(D,$[D]));return v}function Ut(v,$){var k=ni("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);v.openNotification?v.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function sa(v,$){return ni("div",{$display:"flex"},ni("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},v,ni("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ni("span",{$color:"#888"},$))}function Sr(v,$){if(Ir.length){$.value||($.value=""),wn=$;return}var k=sa($.prefix,$.desc);if(v.openDialog)v.openDialog(k,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var D="";typeof $.prefix!="string"&&$.prefix&&(D+=$.prefix.textContent),$.desc&&(D+=" "+$.desc),$.onClose(prompt(D,""))}}function Hn(v,$){if(v instanceof RegExp&&$ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],D=0;D<k.length;D++){var W=k[D];if(v[W]!==$[W])return!1}return!0}return!1}function fn(v,$,k,D){if($){var W=_n(v),z=Fi($,!!k,!!D);if(z)return gi(v,z),Hn(z,W.getQuery())||W.setQuery(z),z}}function Rn(v){if(v.source.charAt(0)=="^")var $=!0;return{token:function(k){if($&&!k.sol()){k.skipToEnd();return}var D=k.match(v,!1);if(D)return D[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!v.exec(k.next()+D[0]))?(k.next(),null):(k.match(v),"searching");for(;!k.eol()&&(k.next(),!k.match(v,!1)););},query:v}}function gi(v,$){clearTimeout(lr);var k=_n(v);k.highlightTimeout=lr,lr=setTimeout(function(){if(v.state.vim){var D=_n(v);D.highlightTimeout=null;var W=D.getOverlay();(!W||$!=W.query)&&(W&&v.removeOverlay(W),W=Rn($),v.addOverlay(W),v.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(v.showMatchesOnScrollbar($))),D.setOverlay(W))}},50)}function Ar(v,$,k,D){return D===void 0&&(D=1),v.operation(function(){for(var W=v.getCursor(),z=v.getSearchCursor(k,W),q=0;q<D;q++){var Y=z.find($);if(q==0&&Y&&ht(z.from(),W)){var Q=$?z.from():z.to();Y=z.find($),Y&&!Y[0]&&ht(z.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=z.find($))}if(!Y&&(z=v.getSearchCursor(k,$?new Ne(v.lastLine()):new Ne(v.firstLine(),0)),!z.find($)))return}return z.from()})}function fi(v,$,k,D,W){return D===void 0&&(D=1),v.operation(function(){var z=v.getCursor(),q=v.getSearchCursor(k,z),Y=q.find(!$);!W.visualMode&&Y&&ht(q.from(),z)&&q.find(!$);for(var Q=0;Q<D;Q++)if(Y=q.find($),!Y&&(q=v.getSearchCursor(k,$?new Ne(v.lastLine()):new Ne(v.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function Fo(v){var $=_n(v);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),v.removeOverlay(_n(v).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function xs(v,$,k){return typeof v!="number"&&(v=v.line),$ instanceof Array?b(v,$):typeof k=="number"?v>=$&&v<=k:v==$}function Zi(v){var $=v.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function Ur(v,$,k){if(k=="'"||k=="`")return Be.jumpList.find(v,-1)||new Ne(0,0);if(k==".")return uo(v);var D=$.marks[k];return D&&D.find()}function uo(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var $=v.doc.history.done,k=$.length;k--;)if($[k].changes)return qe($[k].changes[0].to)}function Po(v,$,k,D,W,z,q,Y,Q){function re(){v.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var Qe=v.getRange(z.from(),z.to()),et=Qe.replace(q,Y),vn=z.to().line;z.replace(et),Ue=z.to().line,W+=Ue-vn,st=Ue<vn}function ye(){var Qe=Le&&qe(z.to()),et=z.findNext();return et&&!et[0]&&Qe&&ht(z.from(),Qe)&&(et=z.findNext()),et}function Ce(){for(;ye()&&xs(z.from(),D,W);)if(!(!k&&z.from().line==Ue&&!st)){v.scrollIntoView(z.from(),30),v.setSelection(z.from(),z.to()),Le=z.from(),Oe=!1;return}Oe=!0}function me(Qe){if(Qe&&Qe(),v.focus(),Le){v.setCursor(Le);var et=v.state.vim;et.exMode=!1,et.lastHPos=et.lastHSPos=Le.ch}Q&&Q()}function we(Qe,et,vn){Pe.e_stop(Qe);var lt=H(Qe);switch(lt){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Cn=Q;Q=void 0,v.operation(re),Q=Cn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(vn)}return Oe&&me(vn),!0}v.state.vim.exMode=!0;var Oe=!1,Le,Ue,st;if(Ce(),Oe){Ut(v,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}Sr(v,{prefix:ni("span","replace with ",ni("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function Vr(v,$){var k=v.state.vim,D=Be.macroModeState,W=Be.registerController.getRegister("."),z=D.isPlaying,q=D.lastInsertModeChanges;z||(v.off("change",ho),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,Pe.off(v.getInputField(),"keydown",As)),!z&&k.insertModeRepeat>1&&(aa(v,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,$||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),W.setText(q.changes.join("")),Pe.signal(v,"vim-mode-change",{mode:"normal"}),D.isRecording&&ir(D)}function Wo(v){$n.unshift(v)}function Cs(v,$,k,D,W){var z={keys:v,type:$};z[$]=k,z[$+"Args"]=D;for(var q in W)z[q]=W[q];Wo(z)}function ks(v,$,k,D){var W=Be.registerController.getRegister(D);if(D==":"){W.keyBuffer[0]&&mr.processCommand(v,W.keyBuffer[0]),k.isPlaying=!1;return}var z=W.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),bt.handleKey(v,se,"macro"),$.insertMode){var ye=W.insertModeChanges[q++].changes;Be.macroModeState.lastInsertModeChanges.changes=ye,Uo(v,ye,1),Vr(v)}k.isPlaying=!1}function Bo(v,$){if(!v.isPlaying){var k=v.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushText($)}}function ir(v){if(!v.isPlaying){var $=v.latestRegister,k=Be.registerController.getRegister($);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(v.lastInsertModeChanges)}}function Ss(v,$){if(!v.isPlaying){var k=v.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushSearchQuery&&D.pushSearchQuery($)}}function ho(v,$){var k=Be.macroModeState,D=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=v.state.vim;$;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var z=v.listSelections().length;z>1&&(D.ignoreCount=z);var q=$.text.join(`
|
1406
|
+
`);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),q)if(v.state.overwrite&&!/\n/.test(q))D.changes.push([q]);else{if(q.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<q.length&&(D.changes.push([q,re]),q="")}}q&&D.changes.push(q)}}$=$.next}}function zo(v){var $=v.state.vim;if($.insertMode){var k=Be.macroModeState;if(k.isPlaying)return;var D=k.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||jo(v,$)}function jo(v,$,k){var D=v.getCursor("anchor"),W=v.getCursor("head");if($.visualMode&&!v.somethingSelected()?Ct(v,!1):!$.visualMode&&!$.insertMode&&v.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,Pe.signal(v,"vim-mode-change",{mode:"visual"})),$.visualMode){var z=tt(W,D)?0:-1,q=tt(W,D)?-1:0;W=fe(W,0,z),D=fe(D,0,q),$.sel={anchor:D,head:W},ti(v,$,"<",dt(W,D)),ti(v,$,">",tn(W,D))}else!$.insertMode&&!k&&($.lastHPos=v.getCursor().ch)}function Ji(v,$){this.keyName=v,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function As(v){var $=Be.macroModeState,k=$.lastInsertModeChanges,D=Pe.keyName?Pe.keyName(v):v.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Ji(D,v)))}function aa(v,$,k,D){function W(){Y?On.processAction(v,$,$.lastEditActionCommand):On.evalInput(v,$)}function z(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;Uo(v,ye.changes,se)}}var q=Be.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)W(),z(1);else D||W(),z(k);$.inputState=Q,$.insertMode&&!D&&Vr(v),q.isPlaying=!1}function Ho(v,$){Pe.lookupKey($,"vim-insert",function(k){return typeof k=="string"?Pe.commands[k](v):k(v),!0})}function Uo(v,$,k){var D=v.getCursor("head"),W=Be.macroModeState.lastInsertModeChanges.visualBlock;W&&(Xn(v,D,W+1),k=v.listSelections().length,v.setCursor(D));for(var z=0;z<k;z++){W&&v.setCursor(fe(D,z,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof Ji)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(D,0,1))}function _s(v,$,k,D){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=_r[$]||$;var W="";if(k.ctrlKey&&(W+="C-"),k.altKey&&(W+="A-"),(W||$.length>1)&&k.shiftKey&&(W+="S-"),D&&!D.expectLiteralNext&&$.length==1){if(Un.keymap&&$ in Un.keymap)(Un.remapCtrl!==!1||!W)&&($=Un.keymap[$]);else if($.charCodeAt(0)>255){var z=k.code&&k.code.slice(-1)||"";k.shiftKey||(z=z.toLowerCase()),z&&($=z)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function Vo(v){var $=new v.constructor;return Object.keys(v).forEach(function(k){if(k!="insertEnd"){var D=v[k];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=Vo(D)),$[k]=D}}),v.sel&&($.sel={head:v.sel.head&&qe(v.sel.head),anchor:v.sel.anchor&&qe(v.sel.anchor)}),$}function po(v,$,k){var D=!1,W=bt.maybeInitVimState_(v),z=W.visualBlock||W.wasInVisualBlock,q=v.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)v.ace.exitMultiSelectMode();else if(z||!q||v.ace.inVirtualSelectionMode)D=bt.handleKey(v,$,k);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=tt(ye,Ce)?0:-1,we=tt(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,D=si(v,$,k),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&&!D&&(v.curOp.cursorActivity=!1),W.status=v.state.vim.status,v.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return D&&!W.visualMode&&!W.insert&&W.visualMode!=v.somethingSelected()&&jo(v,W,!0),D}function mi(v,$){$.off("beforeEndOperation",mi);var k=$.state.cm.vimCmd;k&&$.execCommand(k.exec?k:k.name,k.args),$.curOp=$.prevOp}var or=e("../range").Range,eo=e("../lib/event_emitter").EventEmitter,Pi=e("../lib/dom"),la=e("../lib/oop"),Ga=e("../lib/keys"),go=e("../lib/event"),Wi=e("../search").Search,fo=e("../lib/useragent"),qo=e("../search_highlight").SearchHighlight,mo=e("../commands/multi_select_commands"),ca=e("../mode/text").Mode.prototype.tokenRe,to=e("../ext/hardwrap").hardWrap;e("../multi_select");var Pe=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)};Pe.Pos=function(v,$){if(!(this instanceof Ne))return new Ne(v,$);this.line=v,this.ch=$},Pe.defineOption=function(v,$,k){},Pe.commands={redo:function(v){v.ace.redo()},undo:function(v){v.ace.undo()},newlineAndIndent:function(v){v.ace.insert(`
|
1407
|
+
`)},goLineLeft:function(v){v.ace.selection.moveCursorLineStart()},goLineRight:function(v){v.ace.selection.moveCursorLineEnd()}},Pe.keyMap={},Pe.addClass=Pe.rmClass=function(){},Pe.e_stop=Pe.e_preventDefault=go.stopEvent,Pe.keyName=function(v){var $=Ga[v.keyCode]||v.key||"";return $.length==1&&($=$.toUpperCase()),$=go.getModifierString(v).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+$,$},Pe.keyMap.default=function(v){return function($){var k=$.ace.commands.commandKeyBinding[v.toLowerCase()];return k&&$.ace.execCommand(k)!==!1}},Pe.lookupKey=function v($,k,D){k||(k="default"),typeof k=="string"&&(k=Pe.keyMap[k]||Pe.keyMap.default);var W=typeof k=="function"?k($):k[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&D(W))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return v($,k.fallthrough,D);for(var z=0;z<k.fallthrough.length;z++){var q=v($,k.fallthrough[z],D);if(q)return q}}},Pe.findMatchingTag=function(v,$){return v.findMatchingTag($)},Pe.findEnclosingTag=function(v,$){},Pe.signal=function(v,$,k){return v._signal($,k)},Pe.on=go.addListener,Pe.off=go.removeListener,Pe.isWordChar=function(v){return v<""?/^\w$/.test(v):(ca.lastIndex=0,ca.test(v))},(function(){la.implement(Pe.prototype,eo),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var D={text:k.action[0]=="i"?k.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=D:W.lastChange=W.change=D,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(mo.keyboardHandler)},this.operation=function(k,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return k();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=D;var q=k();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!z.cursorActivity&&!z.lastChange&&W&&(this.ace.prevOp=W)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,D,W){var z=W?W[k+"Handlers"]:(this._eventRegistry||{})[k];if(z){z=z.slice();for(var q=0;q<z.length;q++)z[q](this,D)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(k,D){typeof k=="object"&&(D=k.ch,k=k.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:D}),this.ace.selection.moveTo(k,D),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var D=this.ace.selection,W=k=="anchor"?D.isEmpty()?D.lead:D.anchor:k=="head"||!k?D.lead:D.getRange()[k];return y(W)},this.listSelections=function(k){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.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(k,D){var W=this.ace.multiSelect,z=k.map(function(re){var se=g(re.anchor),ye=g(re.head),Ce=or.comparePoints(se,ye)<0?new or.fromPoints(se,ye):new or.fromPoints(ye,se);return Ce.cursor=or.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}D?z[D]&&z.push(z.splice(D,1)[0]):z=z.reverse(),W.toSingleRange(z[0].clone());for(var q=this.ace.session,Y=0;Y<z.length;Y++){var Q=q.$clipRangeToDocument(z[Y]);W.addRange(Q)}},this.setSelection=function(k,D,W){var z=this.ace.selection;z.moveTo(k.line,k.ch),z.selectTo(D.line,D.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var D=this.ace.session.$clipPositionToDocument(k.line,k.ch);return y(D)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var D=k.action=="insert",W=k.start,z=k.end,q=(z.row-W.row)*(D?1:-1),Y=(z.column-W.column)*(D?1:-1);D&&(z=W);for(var Q in this.marks){var re=this.marks[Q],se=or.comparePoints(re,W);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=D?se:or.comparePoints(re,z);if(ye>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!D&&ye<=0&&(re.row=W.row,re.column=W.column,ye===0&&(re.bias=1))}}};var v=function(k,D,W,z){this.cm=k,this.id=D,this.row=W,this.column=z,k.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return y(this)},this.setBookmark=function(k,D){var W=new v(this,this.$uid++,k.line,k.ch);return(!D||!D.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(k,D){if(D=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,k)}},this.findPosV=function(k,D,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);z!=null&&(Q.column=z),Q.row+=D,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(k,D){if(D=="div"||!D){var W=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:W.column,top:W.row}}if(D=="local"){var z=this.ace.renderer,W=this.ace.session.documentToScreenPosition(k.line,k.ch),q=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(k,D){var W=this.ace.renderer;if(D=="local"){var z=Math.max(0,Math.floor(k.top/W.lineHeight)),q=Math.max(0,Math.floor(k.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(z,q);return y(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(k,D,W){var z=!1,q=!1;k instanceof RegExp&&!k.global&&(z=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
|
1408
|
+
`,q=!1);var Y=new Wi;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:k,caseSensitive:z,wrap:!1,backwards:ye,regExp:q,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(k,D){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,D){if(k){var W=this.ace.renderer,z={top:0,bottom:D};W.scrollCursorIntoView(g(k),W.lineHeight*2/W.$size.scrollerHeight,z)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,D){return this.ace.session.getTextRange(new or(k.line,k.ch,D.line,D.ch))},this.replaceRange=function(k,D,W){W||(W=D);var z=new or(D.line,D.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,k)},this.replaceSelection=this.replaceSelections=function(k){var D=Array.isArray(k)&&k,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),D?k[0]||"":k);return}W.inVirtualSelectionMode=!0;var z=W.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var q=z.length;q--;)this.ace.session.replace(z[q],D?k[q]||"":k);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,D){switch(this.state[k]=D,k){case"indentWithTabs":k=$[k],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:k=$[k]}k&&this.ace.setOption(k,D)},this.getOption=function(k){var D,W=$[k];switch(W&&(D=this.ace.getOption(W)),k){case"indentWithTabs":return k=$[k],!D;case"keyMap":return this.state.$keyMap||"vim"}return W?D:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new qo(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(D);D.id=W.id,D.session=this.ace.session,D.destroy=function(q){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var z=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=D,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,D=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var D=this.ace.session.getTokenAt(k.line,k.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(k){var D=this.ace.session.findMatchingBracket(g(k));return{to:D&&y(D)}},this.findMatchingTag=function(k){var D=this.ace.session.getMatchingTags(g(k));if(D)return{open:{from:y(D.openTag.start),to:y(D.openTag.end)},close:{from:y(D.closeTag.start),to:y(D.closeTag.end)}}},this.indentLine=function(k,D){D===!0?this.ace.session.indentRows(k,k," "):D===!1&&this.ace.session.outdentRows(new or(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(g(k))},this.posFromIndex=function(k){return y(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,D,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),g(k),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.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(k){if(Pe.commands.hasOwnProperty(k))return Pe.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var D=this.$lineHandleChanges;if(!D)return null;for(var W=k.row,z=0;z<D.length;z++){var q=D[z];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<W&&(W+=q.end.row-q.start.row);else if(q.start.row<W){if(W<q.end.row||W==q.end.row&&q.start.column>0)return null;W-=q.end.row-q.start.row}}}return W},this.getLineHandle=function(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return y(k.$lastDelta.end)}}).call(Pe.prototype);var ua=Pe.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 k=$==v;else var k=$&&(v.test?v.test($):v($));if(k)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,$,k){if(typeof v!="string"){var D=this.string.slice(this.pos).match(v);return D&&D.index>0?null:(D&&$!==!1&&(this.pos+=D[0].length),D)}var W=function(q){return k?q.toLowerCase():q},z=this.string.substr(this.pos,v.length);if(W(z)==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}}},Pe.defineExtension=function(v,$){Pe.prototype[v]=$},Pi.importCssString(`.normal-mode .ace_cursor{
|
1409
|
+
border: none;
|
1410
|
+
background-color: rgba(255,0,0,0.5);
|
1411
|
+
}
|
1412
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1413
|
+
background-color: transparent;
|
1414
|
+
border: 1px solid red;
|
1415
|
+
opacity: 0.7
|
1416
|
+
}
|
1417
|
+
.ace_dialog {
|
1418
|
+
position: absolute;
|
1419
|
+
left: 0; right: 0;
|
1420
|
+
background: inherit;
|
1421
|
+
z-index: 15;
|
1422
|
+
padding: .1em .8em;
|
1423
|
+
overflow: hidden;
|
1424
|
+
color: inherit;
|
1425
|
+
}
|
1426
|
+
.ace_dialog-top {
|
1427
|
+
border-bottom: 1px solid #444;
|
1428
|
+
top: 0;
|
1429
|
+
}
|
1430
|
+
.ace_dialog-bottom {
|
1431
|
+
border-top: 1px solid #444;
|
1432
|
+
bottom: 0;
|
1433
|
+
}
|
1434
|
+
.ace_dialog input {
|
1435
|
+
border: none;
|
1436
|
+
outline: none;
|
1437
|
+
background: transparent;
|
1438
|
+
width: 20em;
|
1439
|
+
color: inherit;
|
1440
|
+
font-family: monospace;
|
1441
|
+
}`,"vimMode",!1),function(){function v(k,D,W){var z=k.ace.container,q;return q=z.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof D=="string"?q.innerHTML=D:q.appendChild(D),q}function $(k,D){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=D}Pe.defineExtension("openDialog",function(k,D,W){function z(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);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 q=v(this,k,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Pe.on(re,"input",function(ye){W.onInput(ye,re.value,z)}),W.onKeyUp&&Pe.on(re,"keyup",function(ye){W.onKeyUp(ye,re.value,z)}),Pe.on(re,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,re.value,z)||(ye.keyCode==13&&D(re.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(Pe.e_stop(ye),z()))}),W.closeOnBlur!==!1&&Pe.on(re,"blur",z),re.focus()):(se=q.getElementsByTagName("button")[0])&&(Pe.on(se,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Pe.on(se,"blur",z),se.focus()),z}}),Pe.defineExtension("openNotification",function(k,D){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){$(this,W);var z=v(this,k,D&&D.bottom),q=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return Pe.on(z,"click",function(re){Pe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Pe.Pos,$n=[{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"}],vo=$n.length,ri=[{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"}],Un=O(""),ha=/[\d]/,yo=[Pe.isWordChar,function(v){return v&&!Pe.isWordChar(v)&&!/\s/.test(v)}],vi=[function(v){return/\S/.test(v)}],no=["<",">"],nn=["-",'"',".",":","_","/","+"],Zt=/^\w$/,rn;try{rn=new RegExp("^[\\p{Lu}]$","u")}catch{rn=/^[A-Z]$/}var Vt={};I("filetype",void 0,"string",["ft"],function(v,$){if($!==void 0){if(v===void 0){var k=$.getOption("mode");return k=="null"?"":k}var k=v==""?"null":v;$.setOption("mode",k)}}),I("textwidth",80,"number",["tw"],function(v,$){if($!==void 0){if(v===void 0){var k=$.getOption("textwidth");return k}var D=Math.round(v);D>1&&$.setOption("textwidth",D)}});var yi=function(){function v(Q,re,se){function ye(Oe){var Le=++W%D,Ue=Y[Le];Ue&&Ue.clear(),Y[Le]=Q.setBookmark(Oe)}var Ce=W%D,me=Y[Ce];if(me){var we=me.find();we&&!ht(we,re)&&ye(re)}else ye(re);ye(se),z=W,q=W-D+1,q<0&&(q=0)}function $(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var se=Y[(D+W)%D];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(W+=ye,se=Y[(D+W)%D],se&&(Ce=se.find())&&!ht(me,Ce))break;while(W<z&&W>q)}return se}function k(Q,re){var se=W,ye=$(Q,re);return W=se,ye&&ye.find()}var D=100,W=-1,z=0,q=0,Y=new Array(D);return{cachedCursor:void 0,add:v,find:k,move:$}},Ln=function(v){return v?{changes:v.changes,expectCursorActivityForChange:v.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var v=Be.macroModeState;v.onRecordingDone&&v.onRecordingDone(),v.onRecordingDone=void 0,v.isRecording=!1},enterMacroRecordMode:function(v,$){var k=Be.registerController.getRegister($);if(k){if(k.clear(),this.latestRegister=$,v.openDialog){var D=ni("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=v.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var Be,mn,bt={enterVimMode:h,leaveVimMode:p,buildKeyMap:function(){},getRegisterController:function(){return Be.registerController},resetVimGlobalState_:L,getVimGlobalState_:function(){return Be},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Ji,map:function(v,$,k){mr.map(v,$,k)},unmap:function(v,$){return mr.unmap(v,$)},noremap:function(v,$,k){mr.map(v,$,k,!0)},mapclear:function(v){var $=$n.length,k=vo,D=$n.slice(0,$-k);if($n=$n.slice($-k),v)for(var W=D.length-1;W>=0;W--){var z=D[W];if(v!==z.context)if(z.context)this._mapCommand(z);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==v){var Q={};for(var re in z)Q[re]=z[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:S,defineOption:I,defineEx:function(v,$,k){if(!$)$=v;else if(v.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+v+'", command not registered');$s[v]=k,mr.commandMap_[$]={name:v,shortName:$,type:"api"}},handleKey:function(v,$,k){var D=this.findKey(v,$,k);if(typeof D=="function")return D()},multiSelectHandleKey:po,findKey:function(v,$,k){function D(){var re=Be.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),A(v),!0;k!="mapping"&&Bo(re,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)Ct(v);else{if(!Y.insertMode)return;Vr(v)}return A(v),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=On.matchCommand(re,$n,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return A(v),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),mn&&window.clearTimeout(mn),mn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(v)},S("insertModeEscKeysTimeout")),se){var me=v.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new N),Ce.inserted+=$;for(var we=0;we<me.length;we++){var Oe=dt(me[we].anchor,me[we].head),Le=tn(me[we].anchor,me[we].head),Ue=v.getRange(Oe,v.state.overwrite?fe(Le,0,1):Le);Ce.removed[we]=(Ce.removed[we]||"")+Ue}}return!se}if(Y.expectLiteralNext=!1,mn&&window.clearTimeout(mn),ye.command&&Ce){for(var me=v.listSelections(),we=0;we<me.length;we++){var st=me[we].head;v.replaceRange(Ce.removed[we]||"",fe(st,0,-Ce.inserted.length),st,"+input")}Be.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||A(v),ye.command}function q(){if(D()||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 A(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=On.matchCommand(Ce,$n,Y.inputState,ye);return me.type=="none"?(A(v),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(A(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=z():Q=q(),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"?E(v,Q.toKeys,Q):On.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,R(v),bt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(v,$){mr.processCommand(v,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:Cs,_mapCommand:Wo,defineRegister:U,exitVisualMode:Ct,exitInsertMode:Vr},Ir=[],cn=!1,wn,Qn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Rr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},wi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Qn)).forEach(function(v){wi[(Qn[v]||"").toLowerCase()]=wi[v.toLowerCase()]=v}),I("langmap",void 0,"string",["lmap"],function(v,$){if(v===void 0)return Un.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},B.prototype={setText:function(v,$,k){this.keyBuffer=[v||""],this.linewise=!!$,this.blockwise=!!k},pushText:function(v,$){$&&(this.linewise||this.keyBuffer.push(`
|
1442
|
+
`),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(Ln(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("")}},K.prototype={pushText:function(v,$,k,D,W){if(v!=="_"){D&&k.charAt(k.length-1)!==`
|
1443
|
+
`&&(k+=`
|
1444
|
+
`);var z=this.isValidRegister(v)?this.getRegister(v):null;if(!z){switch($){case"yank":this.registers[0]=new B(k,D,W);break;case"delete":case"change":k.indexOf(`
|
1445
|
+
`)==-1?this.registers["-"]=new B(k,D):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,D))}this.unnamedRegister.setText(k,D,W);return}var q=c(v);q?z.pushText(k,D):z.setText(k,D,W),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(z.toString(),D)}},getRegister:function(v){return this.isValidRegister(v)?(v=v.toLowerCase(),this.registers[v]||(this.registers[v]=new B),this.registers[v]):this.unnamedRegister},isValidRegister:function(v){return v&&(b(v,nn)||Zt.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,$){var k=this.historyBuffer,D=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var W=this.iterator+D;$?W>=0:W<k.length;W+=D)for(var z=k[W],q=0;q<=z.length;q++)if(this.initialPrefix==z.substring(0,q))return this.iterator=W,z;if(W>=k.length)return this.iterator=k.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 On={matchCommand:function(v,$,k,D){var W=$e(v,$,D,k);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 z,q=0;q<W.full.length;q++){var Y=W.full[q];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Ee(v);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(v,$,k){switch($.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(v,$,k);break;case"operator":this.processOperator(v,$,k);break;case"operatorMotion":this.processOperatorMotion(v,$,k);break;case"action":this.processAction(v,$,k);break;case"search":this.processSearch(v,$,k);break;case"ex":case"keyToEx":this.processEx(v,$,k);break}},processMotion:function(v,$,k){$.inputState.motion=k.motion,$.inputState.motionArgs=ce(k.motionArgs),this.evalInput(v,$)},processOperator:function(v,$,k){var D=$.inputState;if(D.operator){if(D.operator==k.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(v,$);return}A(v)}D.operator=k.operator,D.operatorArgs=ce(k.operatorArgs),k.keys.length>1&&(D.operatorShortcut=k.keys),k.exitVisualBlock&&($.visualBlock=!1,Ye(v)),$.visualMode&&this.evalInput(v,$)},processOperatorMotion:function(v,$,k){var D=$.visualMode,W=ce(k.operatorMotionArgs);W&&D&&W.visualLine&&($.visualLine=!0),this.processOperator(v,$,k),D||this.processMotion(v,$,k)},processAction:function(v,$,k){var D=$.inputState,W=D.getRepeat(),z=!!W,q=ce(k.actionArgs)||{};D.selectedCharacter&&(q.selectedCharacter=D.selectedCharacter),k.operator&&this.processOperator(v,$,k),k.motion&&this.processMotion(v,$,k),(k.motion||k.operator)&&this.evalInput(v,$),q.repeat=W||1,q.repeatIsExplicit=z,q.registerName=D.registerName,A(v),$.lastMotion=null,k.isEdit&&this.recordLastEdit($,D,k),Nn[k.action](v,q,$)},processSearch:function(v,$,k){function D(Le,Ue,st){Be.searchHistoryController.pushInput(Le),Be.searchHistoryController.reset();try{fn(v,Le,Ue,st)}catch{Ut(v,"Invalid regex: "+Le),A(v);return}On.processMotion(v,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Le){D(Le,!0,!0);var Ue=Be.macroModeState;Ue.isRecording&&Ss(Ue,Le)}function z(Le,Ue,st){var Qe=H(Le),et,vn;Qe=="<Up>"||Qe=="<Down>"?(et=Qe=="<Up>",vn=Le.target?Le.target.selectionEnd:0,Ue=Be.searchHistoryController.nextMatch(Ue,et)||"",st(Ue),vn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(vn,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&Be.searchHistoryController.reset();var lt;try{lt=fn(v,Ue,!0,!0)}catch{}lt?v.scrollIntoView(Ar(v,!Y,lt),30):(Fo(v),v.scrollTo(ye.left,ye.top))}function q(Le,Ue,st){var Qe=H(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ue==""?(Be.searchHistoryController.pushInput(Ue),Be.searchHistoryController.reset(),fn(v,se),Fo(v),v.scrollTo(ye.left,ye.top),Pe.e_stop(Le),A(v),st(),v.focus()):Qe=="<Up>"||Qe=="<Down>"?Pe.e_stop(Le):Qe=="<C-u>"&&(Pe.e_stop(Le),st(""))}if(v.getSearchCursor){var Y=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;_n(v).setReversed(!Y);var re=Y?"/":"?",se=_n(v).getQuery(),ye=v.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ce=Be.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();D(Oe,!0,!1)}else Sr(v,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var me=wt(v,{noSymbol:!0}),we=!0;if(me||(me=wt(v,{noSymbol:!1}),we=!1),!me){Ut(v,"No word under cursor"),A(v);return}var Oe=v.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=gn(Oe),Be.jumpList.cachedCursor=v.getCursor(),v.setCursor(me.start),D(Oe,!0,!1)}}},processEx:function(v,$,k){function D(z){Be.exCommandHistoryController.pushInput(z),Be.exCommandHistoryController.reset(),mr.processCommand(v,z),v.state.vim&&A(v)}function W(z,q,Y){var Q=H(z),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Be.exCommandHistoryController.pushInput(q),Be.exCommandHistoryController.reset(),Pe.e_stop(z),A(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(Pe.e_stop(z),re=Q=="<Up>",se=z.target?z.target.selectionEnd:0,q=Be.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(se,z.target.value.length))):Q=="<C-u>"?(Pe.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Be.exCommandHistoryController.reset()}k.type=="keyToEx"?mr.processCommand(v,k.exArgs.input):$.visualMode?Sr(v,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):Sr(v,{onClose:D,prefix:":",onKeyDown:W})},evalInput:function(v,$){var k=$.inputState,D=k.motion,W=k.motionArgs||{},z=k.operator,q=k.operatorArgs||{},Y=k.registerName,Q=$.sel,re=qe($.visualMode?ue(v,Q.head):v.getCursor("head")),se=qe($.visualMode?ue(v,Q.anchor):v.getCursor("anchor")),ye=qe(re),Ce=qe(se),me,we,Oe;if(z&&this.recordLastEdit($,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=k.selectedCharacter),W.repeat=Oe,A(v),D){var Le=qr[D](v,re,W,$,k);if($.lastMotion=qr[D],!Le)return;if(W.toJumplist){!z&&v.ace.curOp!=null&&(v.ace.curOp.command.scrollIntoView="center-animate");var Ue=Be.jumpList,st=Ue.cachedCursor;st?(xr(v,st,Le),delete Ue.cachedCursor):xr(v,re,Le)}Le instanceof Array?(we=Le[0],me=Le[1]):me=Le,me||(me=qe(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,Ye(v),ti(v,$,"<",tt(we,me)?we:me),ti(v,$,">",tt(we,me)?me:we)):z||(v.ace.curOp&&(v.ace.curOp.vimDialogScroll="center-animate"),me=ue(v,me,ye),v.setCursor(me.line,me.ch))}if(z){if(q.lastSel){we=Ce;var Qe=q.lastSel,et=Math.abs(Qe.head.line-Qe.anchor.line),vn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?me=new Ne(Ce.line+et,Ce.ch):Qe.visualBlock?me=new Ne(Ce.line+et,Ce.ch+vn):Qe.head.line==Qe.anchor.line?me=new Ne(Ce.line,Ce.ch+vn):me=new Ne(Ce.line+et,Ce.ch),$.visualMode=!0,$.visualLine=Qe.visualLine,$.visualBlock=Qe.visualBlock,Q=$.sel={anchor:we,head:me},Ye(v)}else $.visualMode&&(q.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var lt,Cn,St,Et,Zn;if($.visualMode){lt=dt(Q.head,Q.anchor),Cn=tn(Q.head,Q.anchor),St=$.visualLine||q.linewise,Et=$.visualBlock?"block":St?"line":"char";var cr=x(v,lt,Cn);if(Zn=pt(v,{anchor:cr.start,head:cr.end},Et),St){var kn=Zn.ranges;if(Et=="block")for(var V=0;V<kn.length;V++)kn[V].head.ch=Yt(v,kn[V].head.line);else Et=="line"&&(kn[0].head=new Ne(kn[0].head.line+1,0))}}else{if(lt=qe(we||Ce),Cn=qe(me||ye),tt(Cn,lt)){var X=lt;lt=Cn,Cn=X}St=W.linewise||q.linewise,St?Rt(v,lt,Cn):W.forward&&Ot(v,lt,Cn),Et="char";var ie=!W.inclusive||St,cr=x(v,lt,Cn);Zn=pt(v,{anchor:cr.start,head:cr.end},Et,ie)}v.setSelections(Zn.ranges,Zn.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=St;var oe=Ko[z](v,q,Zn.ranges,Ce,me);$.visualMode&&Ct(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,$,k){var D=Be.macroModeState;D.isPlaying||(v.lastEditInputState=$,v.lastEditActionCommand=k,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=v.visualBlock?v.sel.head.line-v.sel.anchor.line:0)}},qr={moveToTopLine:function(v,$,k){var D=Zi(v).top+k.repeat-1;return new Ne(D,ut(v.getLine(D)))},moveToMiddleLine:function(v){var $=Zi(v),k=Math.floor(($.top+$.bottom)*.5);return new Ne(k,ut(v.getLine(k)))},moveToBottomLine:function(v,$,k){var D=Zi(v).bottom-k.repeat+1;return new Ne(D,ut(v.getLine(D)))},expandToLine:function(v,$,k){var D=$;return new Ne(D.line+k.repeat-1,1/0)},findNext:function(v,$,k){var D=_n(v),W=D.getQuery();if(W){var z=!k.forward;return z=D.isReversed()?!z:z,gi(v,W),Ar(v,z,W,k.repeat)}},findAndSelectNextInclusive:function(v,$,k,D,W){var z=_n(v),q=z.getQuery();if(q){var Y=!k.forward;Y=z.isReversed()?!Y:Y;var Q=fi(v,Y,q,k.repeat,D);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:""}));var ye=D.sel.anchor;if(ye)return z.isReversed()?k.forward?[ye,re]:[ye,se]:k.forward?[ye,se]:[ye,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(v,$,k,D){var W=Ur(v,D,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:ut(v.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(v,$,k,D){if(D.visualBlock&&k.sameLine){var W=D.sel;return[ue(v,new Ne(W.anchor.line,W.head.ch)),ue(v,new Ne(W.head.line,W.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(v,$,k,D){for(var W=$,z=0;z<k.repeat;z++){var q=W;for(var Y in D.marks)if(u(Y)){var Q=D.marks[Y].find(),re=k.forward?tt(Q,q):tt(q,Q);if(!re&&!(k.linewise&&Q.line==q.line)){var se=ht(q,W),ye=k.forward?pn(q,Q,W):pn(W,Q,q);(se||ye)&&(W=Q)}}}return k.linewise&&(W=new Ne(W.line,ut(v.getLine(W.line)))),W},moveByCharacters:function(v,$,k){var D=$,W=k.repeat,z=k.forward?D.ch+W:D.ch-W;return new Ne(D.line,z)},moveByLines:function(v,$,k,D){var W=$,z=W.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=D.lastHPos;break;default:D.lastHPos=z}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+q:W.line-q,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(v,$,k,D);if(Y>re&&W.line==re)return co(v,$,k,D,!0);var se=v.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(z=ut(v.getLine(Y)),D.lastHPos=z),D.lastHSPos=v.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(v,$,k,D){var W=$;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=v.charCoords(W,"div").left}var z=k.repeat,Q=v.findPosV(W,k.forward?z:-z,"line",D.lastHSPos);if(Q.hitSide)if(k.forward)var q=v.charCoords(Q,"div"),Y={top:q.top+8,left:D.lastHSPos},Q=v.coordsChar(Y,"div");else{var re=v.charCoords(new Ne(v.firstLine(),0),"div");re.left=D.lastHSPos,Q=v.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(v,$,k){var D=$,W=k.repeat;return v.findPosV(D,k.forward?W:-W,"page")},moveByParagraph:function(v,$,k){var D=k.forward?1:-1;return ws(v,$,k.repeat,D)},moveBySentence:function(v,$,k){var D=k.forward?1:-1;return Oi(v,$,k.repeat,D)},moveByScroll:function(v,$,k,D){var W=v.getScrollInfo(),z=null,q=k.repeat;q||(q=W.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords($,"local");if(k.repeat=q,z=qr.moveByDisplayLines(v,$,k,D),!z)return null;var Q=v.charCoords(z,"local");return v.scrollTo(null,W.top+Q.top-Y.top),z},moveByWords:function(v,$,k){return gr(v,$,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(v,$,k){var D=k.repeat,W=Do(v,D,k.forward,k.selectedCharacter,$),z=k.forward?-1:1;return Hr(z,k),W?(W.ch+=z,W):null},moveToCharacter:function(v,$,k){var D=k.repeat;return Hr(0,k),Do(v,D,k.forward,k.selectedCharacter,$)||$},moveToSymbol:function(v,$,k){var D=k.repeat;return Li(v,D,k.forward,k.selectedCharacter)||$},moveToColumn:function(v,$,k,D){var W=k.repeat;return D.lastHPos=W-1,D.lastHSPos=v.charCoords($,"div").left,Ua(v,W)},moveToEol:function(v,$,k,D){return co(v,$,k,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,$){var k=$;return new Ne(k.line,ut(v.getLine(k.line)))},moveToMatchedSymbol:function(v,$){for(var k=$,D=k.line,W=k.ch,z=v.getLine(D),q;W<z.length;W++)if(q=z.charAt(W),q&&l(q)){var Y=v.getTokenTypeAt(new Ne(D,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=v.findMatchingBracket(new Ne(D,W+1),{bracketRegex:Q});return re.to}return k},moveToStartOfLine:function(v,$){return new Ne($.line,0)},moveToLineOrEdgeOfDocument:function(v,$,k){var D=k.forward?v.lastLine():v.firstLine();return k.repeatIsExplicit&&(D=k.repeat-v.getOption("firstLineNumber")),new Ne(D,ut(v.getLine(D)))},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,$,k,D){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=jn(v,$,q,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=jn(v,se.from(),q,Y))}}else if(z[q])re=!0,Q=Cr(v,$,q,Y);else if(q==="W"||q==="w")for(var ye=k.repeat||1;ye-- >0;){var Ce=wt(v,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=ws(v,$,k.repeat,0,Y),k.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var me=D.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=xn(v,$,Y);else if(q==="s"){var we=v.getLine($.line);$.ch>0&&w(we[$.ch])&&($.ch-=1);var Oe=ia(v,$,k.repeat,1,Y),Le=ia(v,$,k.repeat,-1,Y);d(v.getLine(Le.line)[Le.ch])&&d(v.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?v.state.vim.visualMode?ze(v,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(v,$,k){var D=Be.lastCharacterSearch,W=k.repeat,z=k.forward===D.forward,q=(D.increment?1:0)*(z?-1:1);v.moveH(-q,"char"),k.inclusive=!!z;var Y=Do(v,W,z,D.selectedCharacter);return Y?(Y.ch+=q,Y):(v.moveH(q,"char"),$)}},Ko={change:function(v,$,k){var D,W,z=v.state.vim,q=k[0].anchor,Y=k[0].head;if(z.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(q,Y),W=v.getSelection(),v.replaceSelection(""),D=q;else{W=v.getSelection();var Q=he("",k.length);v.replaceSelections(Q),D=dt(k[0].head,k[0].anchor)}else{W=v.getRange(q,Y);var re=z.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&&(q=new Ne(q.line,ut(v.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",q,Y),D=q}Be.registerController.pushText($.registerName,"change",W,$.linewise,k.length>1),Nn.enterInsertMode(v,{head:D},v.state.vim)},delete:function(v,$,k){var D,W,z=v.state.vim;if(z.visualBlock){W=v.getSelection();var q=he("",k.length);v.replaceSelections(q),D=dt(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,Q=k[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 Ne(Y.line-1,Yt(v,Y.line-1))),W=v.getRange(Y,Q),v.replaceRange("",Y,Q),D=Y,$.linewise&&(D=qr.moveToFirstNonWhiteSpaceCharacter(v,Y))}return Be.registerController.pushText($.registerName,"delete",W,$.linewise,z.visualBlock),ue(v,D)},indent:function(v,$,k){var D=v.state.vim,W=D.visualMode?$.repeat:1;if(D.visualBlock){for(var z=v.getOption("tabSize"),q=v.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=k.length-1;Q>=0;Q--)if(Y=dt(k[Q].anchor,k[Q].head),$.indentRight)v.replaceRange(q.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<q.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=k[0].anchor.line,Oe=D.visualBlock?k[k.length-1].anchor.line:k[0].head.line;$.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var ye=0;ye<W;ye++)v.indentLine(Q,$.indentRight)}return qr.moveToFirstNonWhiteSpaceCharacter(v,k[0].anchor)},indentAuto:function(v,$,k){return v.execCommand("indentAuto"),qr.moveToFirstNonWhiteSpaceCharacter(v,k[0].anchor)},hardWrap:function(v,$,k,D,W){if(v.hardWrap){var z=k[0].anchor.line,q=k[0].head.line;$.linewise&&q--;var Y=v.hardWrap({from:z,to:q});return Y>z&&$.linewise&&Y--,$.keepCursor?D:new Ne(Y,0)}},changeCase:function(v,$,k,D,W){for(var z=v.getSelections(),q=[],Y=$.toLower,Q=0;Q<z.length;Q++){var re=z[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+=c(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return v.replaceSelections(q),$.shouldMoveCursor?W:!v.state.vim.visualMode&&$.linewise&&k[0].anchor.line+1==k[0].head.line?qr.moveToFirstNonWhiteSpaceCharacter(v,D):$.linewise?D:dt(k[0].anchor,k[0].head)},yank:function(v,$,k,D){var W=v.state.vim,z=v.getSelection(),q=W.visualMode?dt(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):D;return Be.registerController.pushText($.registerName,"yank",z,$.linewise,W.visualBlock),q}},Nn={jumpListWalk:function(v,$,k){if(!k.visualMode){var D=$.repeat,W=$.forward,z=Be.jumpList,q=z.move(v,W?D:-D),Y=q?q.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,$,k){if(!k.visualMode){var D=$.repeat||1,W=v.defaultTextHeight(),z=v.getScrollInfo().top,q=W*D,Y=$.forward?z+q:z-q,Q=qe(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 k=v.getCursor().line,D=v.charCoords(new Ne(k,0),"local"),W=v.getScrollInfo().clientHeight,z=D.top;switch($.position){case"center":z=D.bottom-W/2;break;case"bottom":var q=new Ne(k,v.getLine(k).length-1),Y=v.charCoords(q,"local"),Q=Y.bottom-z;z=z-W+Q}v.scrollTo(null,z)},replayMacro:function(v,$,k){var D=$.selectedCharacter,W=$.repeat,z=Be.macroModeState;for(D=="@"?D=z.latestRegister:z.latestRegister=D;W--;)ks(v,k,z,D)},enterMacroRecordMode:function(v,$){var k=Be.macroModeState,D=$.selectedCharacter;Be.registerController.isValidRegister(D)&&k.enterMacroRecordMode(v,D)},toggleOverwrite:function(v){v.state.overwrite?(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Pe.signal(v,"vim-mode-change",{mode:"insert"})):(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Pe.signal(v,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(v,$,k){if(!v.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=$&&$.repeat||1;var D=$?$.insertAt:null,W=k.sel,z=$.head||v.getCursor("head"),q=v.listSelections().length;if(D=="eol")z=new Ne(z.line,Yt(v,z.line));else if(D=="bol")z=new Ne(z.line,0);else if(D=="charAfter"){var Y=x(v,z,fe(z,0,1));z=Y.end}else if(D=="firstNonBlank"){var Y=x(v,z,qr.moveToFirstNonWhiteSpaceCharacter(v,z));z=Y.end}else if(D=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?z=W.head:z=new Ne(W.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?z=fe(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(D=="inplace"){if(k.visualMode)return}else D=="lastEdit"&&(z=uo(v)||z);v.setOption("disableInput",!1),$&&$.replace?(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Pe.signal(v,"vim-mode-change",{mode:"replace"})):(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Pe.signal(v,"vim-mode-change",{mode:"insert"})),Be.macroModeState.isPlaying||(v.on("change",ho),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=v.setBookmark(z,{insertLeft:!0}),Pe.on(v.getInputField(),"keydown",As)),k.visualMode&&Ct(v),Xn(v,z,q)}},toggleVisualMode:function(v,$,k){var D=$.repeat,W=v.getCursor(),z;if(k.visualMode)k.visualLine^$.linewise||k.visualBlock^$.blockwise?(k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(v)):Ct(v);else{k.visualMode=!0,k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,z=ue(v,new Ne(W.line,W.ch+D-1));var q=x(v,W,z);k.sel={anchor:q.start,head:q.end},Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(v),ti(v,k,"<",dt(W,z)),ti(v,k,">",tn(W,z))}},reselectLastSelection:function(v,$,k){var D=k.lastSelection;if(k.visualMode&&ke(v,k),D){var W=D.anchorMark.find(),z=D.headMark.find();if(!W||!z)return;k.sel={anchor:W,head:z},k.visualMode=!0,k.visualLine=D.visualLine,k.visualBlock=D.visualBlock,Ye(v),ti(v,k,"<",dt(W,z)),ti(v,k,">",tn(W,z)),Pe.signal(v,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(v,$,k){var D,W;if(k.visualMode){if(D=v.getCursor("anchor"),W=v.getCursor("head"),tt(W,D)){var z=W;W=D,D=z}W.ch=Yt(v,W.line)-1}else{var q=Math.max($.repeat,2);D=v.getCursor(),W=ue(v,new Ne(D.line+q-1,1/0))}for(var Y=0,Q=D.line;Q<W.line;Q++){Y=Yt(v,D.line);var re="",se=0;if(!$.keepSpaces){var ye=v.getLine(D.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}v.replaceRange(re,new Ne(D.line,Y),new Ne(D.line+1,se))}var Ce=ue(v,new Ne(D.line,Y));k.visualMode&&Ct(v,!1),v.setCursor(Ce)},newLineAndEnterInsertMode:function(v,$,k){k.insertMode=!0;var D=qe(v.getCursor());if(D.line===v.firstLine()&&!$.after)v.replaceRange(`
|
1446
|
+
`,new Ne(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{D.line=$.after?D.line:D.line-1,D.ch=Yt(v,D.line),v.setCursor(D);var W=Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent;W(v)}this.enterInsertMode(v,{repeat:$.repeat},k)},paste:function(v,$,k){var D=this,W=Be.registerController.getRegister($.registerName),z=function(){var q=W.toString();D.continuePaste(v,$,k,q,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){D.continuePaste(v,$,k,q,W)},function(){z()}):z()},continuePaste:function(v,$,k,D,W){var z=qe(v.getCursor());if(D){if($.matchIndent){var q=v.getOption("tabSize"),Y=function(kn){var V=kn.split(" ").length-1,X=kn.split(" ").length-1;return V*q+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ye=D!==se,Ce=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(kn){var V=re+(Y(kn)-Ce);if(V<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});D+=ye?`
|
1447
|
+
`:""}if($.repeat>1)var D=Array($.repeat+1).join(D);var me=W.linewise,we=W.blockwise;if(we){D=D.split(`
|
1448
|
+
`),me&&D.pop();for(var Oe=0;Oe<D.length;Oe++)D[Oe]=D[Oe]==""?" ":D[Oe];z.ch+=$.after?1:0,z.ch=Math.min(Yt(v,z.line),z.ch)}else me?k.visualMode?D=k.visualLine?D.slice(0,-1):`
|
1449
|
+
`+D.slice(0,D.length-1)+`
|
1450
|
+
`:$.after?(D=`
|
1451
|
+
`+D.slice(0,D.length-1),z.ch=Yt(v,z.line)):z.ch=0:z.ch+=$.after?1:0;var Le;if(k.visualMode){k.lastPastedText=D;var Ue,st=He(v,k),Qe=st[0],et=st[1],vn=v.getSelection(),lt=v.listSelections(),Cn=new Array(lt.length).join("1").split("1");k.lastSelection&&(Ue=k.lastSelection.headMark.find()),Be.registerController.unnamedRegister.setText(vn),we?(v.replaceSelections(Cn),et=new Ne(Qe.line+D.length-1,Qe.ch),v.setCursor(Qe),In(v,et),v.replaceSelections(D),Le=Qe):k.visualBlock?(v.replaceSelections(Cn),v.setCursor(Qe),v.replaceRange(D,Qe,Qe),Le=Qe):(v.replaceRange(D,Qe,et),Le=v.posFromIndex(v.indexFromPos(Qe)+D.length-1)),Ue&&(k.lastSelection.headMark=v.setBookmark(Ue)),me&&(Le.ch=0)}else if(we){v.setCursor(z);for(var Oe=0;Oe<D.length;Oe++){var St=z.line+Oe;St>v.lastLine()&&v.replaceRange(`
|
1452
|
+
`,new Ne(St,0));var Et=Yt(v,St);Et<z.ch&&En(v,St,z.ch)}v.setCursor(z),In(v,new Ne(z.line+D.length-1,z.ch)),v.replaceSelections(D),Le=z}else if(v.replaceRange(D,z),me){var St=$.after?z.line+1:z.line;Le=new Ne(St,ut(v.getLine(St)))}else Le=qe(z),/\n/.test(D)||(Le.ch+=D.length-($.after?1:0));k.visualMode&&Ct(v,!1),v.setCursor(Le)}},undo:function(v,$){v.operation(function(){Ge(v,Pe.commands.undo,$.repeat)(),v.setCursor(ue(v,v.getCursor("start")))})},redo:function(v,$){Ge(v,Pe.commands.redo,$.repeat)()},setRegister:function(v,$,k){k.inputState.registerName=$.selectedCharacter},insertRegister:function(v,$,k){var D=$.selectedCharacter,W=Be.registerController.getRegister(D),z=W&&W.toString();z&&v.replaceSelection(z)},oneNormalCommand:function(v,$,k){Vr(v,!0),k.insertModeReturn=!0,Pe.on(v,"vim-command-done",function D(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Nn.enterInsertMode(v,{},k)),Pe.off(v,"vim-command-done",D))})},setMark:function(v,$,k){var D=$.selectedCharacter;ti(v,k,D,v.getCursor())},replace:function(v,$,k){var D=$.selectedCharacter,W=v.getCursor(),z,q,Y=v.listSelections();if(k.visualMode)W=v.getCursor("start"),q=v.getCursor("end");else{var Q=v.getLine(W.line);z=W.ch+$.repeat,z>Q.length&&(z=Q.length),q=new Ne(W.line,z)}var re=x(v,W,q);if(W=re.start,q=re.end,D==`
|
1453
|
+
`)k.visualMode||v.replaceRange("",W,q),(Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent)(v);else{var se=v.getRange(W,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),k.visualBlock){var ye=new Array(v.getOption("tabSize")+1).join(" ");se=v.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ye).replace(/[^\n]/g,D).split(`
|
1454
|
+
`),v.replaceSelections(se)}else v.replaceRange(se,W,q);k.visualMode?(W=tt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(W),Ct(v,!1)):v.setCursor(fe(q,0,-1))}},incrementNumberToken:function(v,$){for(var k=v.getCursor(),D=v.getLine(k.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,q,Y,Q;(z=W.exec(D))!==null&&(q=z.index,Y=q+z[0].length,!(k.ch<Y)););if(!(!$.backtrack&&Y<=k.ch)&&z){var re=z[2]||z[4],se=z[3]||z[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(z[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var we=re?new Array(se.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new Ne(k.line,q),Le=new Ne(k.line,Y);v.replaceRange(Q,Oe,Le),v.setCursor(new Ne(k.line,q+Q.length-1))}},repeatLastEdit:function(v,$,k){var D=k.lastEditInputState;if(D){var W=$.repeat;W&&$.repeatIsExplicit?k.lastEditInputState.repeatOverride=W:W=k.lastEditInputState.repeatOverride||W,aa(v,k,W,!1)}},indent:function(v,$){v.indentLine(v.getCursor().line,$.indentRight)},exitInsertMode:Vr},ii={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},oi={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}}};I("pcre",!0,"boolean"),Ni.prototype={getQuery:function(){return Be.query},setQuery:function(v){Be.query=v},getOverlay:function(){return this.searchOverlay},setOverlay:function(v){this.searchOverlay=v},isReversed:function(){return Be.isReversed},setReversed:function(v){Be.isReversed=v},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(v){this.annotate=v}};var bi={"\\n":`
|
1455
|
+
`,"\\r":"\r","\\t":" "},ar={"\\/":"/","\\\\":"\\","\\n":`
|
1456
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},lr=0,fr=function(){this.buildCommandMap_()};fr.prototype={processCommand:function(v,$,k){var D=this;v.operation(function(){v.curOp.isVimOp=!0,D._processCommand(v,$,k)})},_processCommand:function(v,$,k){var D=v.state.vim,W=Be.registerController.getRegister(":"),z=W.toString(),q=new Pe.StringStream($);W.setText($);var Y=k||{};Y.input=$;try{this.parseInput_(v,q,Y)}catch(se){throw Ut(v,se.toString()),se}D.visualMode&&Ct(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(z),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){E(v,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(v,Q.toInput);return}}if(!re){Ut(v,'Not an editor command ":'+$+'"');return}try{$s[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Ut(v,se.toString()),se}},parseInput_:function(v,$,k){if($.eatWhile(":"),$.eat("%")?(k.line=v.firstLine(),k.lineEnd=v.lastLine()):(k.line=this.parseLineSpec_(v,$),k.line!==void 0&&$.eat(",")&&(k.lineEnd=this.parseLineSpec_(v,$))),k.line==null)if(v.state.vim.visualMode){var D=Ur(v,v.state.vim,"<");k.selectionLine=D&&D.line,D=Ur(v,v.state.vim,">"),k.selectionLineEnd=D&&D.line}else k.selectionLine=v.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?k.commandName=W[1]:k.commandName=$.match(/.*/)[0],k},parseLineSpec_:function(v,$){var k=$.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,v.getCursor().line);case"$":return this.parseLineSpecOffset_($,v.lastLine());case"'":var D=$.next(),W=Ur(v,v.state.vim,D);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 k=v.match(/^([+-])?(\d+)/);if(k){var D=parseInt(k[2],10);k[1]=="-"?$-=D:$+=D}return $},parseCommandArgs_:function(v,$,k){if(!v.eol()){$.argString=v.match(/.*/)[0];var D=k.argDelimiter||/\s+/,W=pr($.argString).split(D);W.length&&W[0]&&($.args=W)}},matchCommand_:function(v){for(var $=v.length;$>0;$--){var k=v.substring(0,$);if(this.commandMap_[k]){var D=this.commandMap_[k];if(D.name.indexOf(v)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<ri.length;v++){var $=ri[v],k=$.shortName||$.name;this.commandMap_[k]=$}},map:function(v,$,k,D){if(v!=":"&&v.charAt(0)==":"){if(k)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 z={keys:v,type:"keyToKey",toKeys:$,noremap:!!D};k&&(z.context=k),$n.unshift(z)}},unmap:function(v,$){if(v!=":"&&v.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var k=v.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var D=v,W=0;W<$n.length;W++)if(D==$n[W].keys&&$n[W].context===$)return $n.splice(W,1),!0}};var $s={colorscheme:function(v,$){if(!$.args||$.args.length<1){Ut(v,v.getOption("theme"));return}v.setOption("theme",$.args[0])},map:function(v,$,k,D){var W=$.args;if(!W||W.length<2){v&&Ut(v,"Invalid mapping: "+$.input);return}mr.map(W[0],W[1],k,D)},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,$,k){var D=$.args;(!D||D.length<1||!mr.unmap(D[0],k))&&v&&Ut(v,"No such mapping: "+$.input)},mapclear:function(v,$){bt.mapclear()},imapclear:function(v,$){bt.mapclear("insert")},nmapclear:function(v,$){bt.mapclear("normal")},vmapclear:function(v,$){bt.mapclear("visual")},omapclear:function(v,$){bt.mapclear("operatorPending")},move:function(v,$){On.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(v,$){var k=$.args,D=$.setCfg||{};if(!k||k.length<1){v&&Ut(v,"Invalid mapping: "+$.input);return}var W=k[0].split("="),z=W[0],q=W[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.argString);z=z.substring(0,z.length-1),Y=!0}else z.charAt(z.length-1)=="!"&&(z=z.substring(0,z.length-1),Q=!0);q===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),q=!1);var re=Vt[z]&&Vt[z].type=="boolean";if(re&&(Q?q=!S(z,v,D):q==null&&(q=!0)),!re&&q===void 0||Y){var se=S(z,v,D);se instanceof Error?Ut(v,se.message):se===!0||se===!1?Ut(v," "+(se?"":"no")+z):Ut(v," "+z+"="+se)}else{var ye=T(z,q,v,D);ye instanceof Error&&Ut(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 k=$.args,D=Be.registerController.registers,W=`----------Registers----------
|
1457
|
+
|
1458
|
+
`;if(k){var z;k=k.join("");for(var q=0;q<k.length;q++)if(z=k.charAt(q),!!Be.registerController.isValidRegister(z)){var Y=D[z]||new B;W+='"'+z+" "+Y.toString()+`
|
1459
|
+
`}}else for(var z in D){var Q=D[z].toString();Q.length&&(W+='"'+z+" "+Q+`
|
1460
|
+
`)}Ut(v,W)},sort:function(v,$){function k(){if($.argString){var St=new Pe.StringStream($.argString);if(St.eat("!")&&(z=!0),St.eol())return;if(!St.eatSpace())return"Invalid arguments";var Et=St.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Et&&!St.eol())return"Invalid arguments";if(Et[1]){q=Et[1].indexOf("i")!=-1,Y=Et[1].indexOf("u")!=-1;var Zn=Et[1].indexOf("d")!=-1||Et[1].indexOf("n")!=-1&&1,cr=Et[1].indexOf("x")!=-1&&1,kn=Et[1].indexOf("o")!=-1&&1;if(Zn+cr+kn>1)return"Invalid arguments";Q=Zn&&"decimal"||cr&&"hex"||kn&&"octal"}Et[2]&&(re=new RegExp(Et[2].substr(1,Et[2].length-2),q?"i":""))}}function D(St,Et){if(z){var Zn;Zn=St,St=Et,Et=Zn}q&&(St=St.toLowerCase(),Et=Et.toLowerCase());var cr=Q&&Le.exec(St),kn=Q&&Le.exec(Et);return cr?(cr=parseInt((cr[1]+cr[2]).toLowerCase(),Ue),kn=parseInt((kn[1]+kn[2]).toLowerCase(),Ue),cr-kn):St<Et?-1:1}function W(St,Et){if(z){var Zn;Zn=St,St=Et,Et=Zn}return q&&(St[0]=St[0].toLowerCase(),Et[0]=Et[0].toLowerCase()),St[0]<Et[0]?-1:1}var z,q,Y,Q,re,se=k();if(se){Ut(v,se+": "+$.argString);return}var ye=$.line||v.firstLine(),Ce=$.lineEnd||$.line||v.lastLine();if(ye!=Ce){var me=new Ne(ye,0),we=new Ne(Ce,Yt(v,Ce)),Oe=v.getRange(me,we).split(`
|
1461
|
+
`),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ue=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Qe=[];if(Q||re)for(var et=0;et<Oe.length;et++){var vn=re?Oe[et].match(re):null;vn&&vn[0]!=""?st.push(vn):!re&&Le.exec(Oe[et])?st.push(Oe[et]):Qe.push(Oe[et])}else Qe=Oe;if(st.sort(re?W:D),re)for(var et=0;et<st.length;et++)st[et]=st[et].input;else Q||Qe.sort(D);if(Oe=z?st.concat(Qe):Qe.concat(st),Y){var lt=Oe,Cn;Oe=[];for(var et=0;et<lt.length;et++)lt[et]!=Cn&&Oe.push(lt[et]),Cn=lt[et]}v.replaceRange(Oe.join(`
|
1462
|
+
`),me,we)}},vglobal:function(v,$){this.global(v,$)},normal:function(v,$){var k=$.argString;if(k&&k[0]=="!"&&(k=k.slice(1),cn=!0),k=k.trimStart(),!k){Ut(v,"Argument is required.");return}var D=$.line;if(typeof D=="number")for(var W=isNaN($.lineEnd)?D:$.lineEnd,z=D;z<=W;z++)v.setCursor(z,0),E(v,$.argString.trimStart()),v.state.vim.insertMode&&Vr(v,!0);else E(v,$.argString.trimStart()),v.state.vim.insertMode&&Vr(v,!0)},global:function(v,$){var k=$.argString;if(!k){Ut(v,"Regular Expression missing from global");return}var D=$.commandName[0]==="v";k[0]==="!"&&$.commandName[0]==="g"&&(D=!0,k=k.slice(1));var W=$.line!==void 0?$.line:v.firstLine(),z=$.lineEnd||$.line||v.lastLine(),q=kr(k),Y=k,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{fn(v,Y,!0,!0)}catch{Ut(v,"Invalid regex: "+Y);return}for(var re=_n(v).getQuery(),se=[],ye=W;ye<=z;ye++){var Ce=v.getLine(ye),me=re.test(Ce);me!==D&&se.push(Q?v.getLineHandle(ye):Ce)}if(!Q){Ut(v,se.join(`
|
1463
|
+
`));return}var we=0,Oe=function(){if(we<se.length){var Le=se[we++],Ue=v.getLineNumber(Le);if(Ue==null){Oe();return}var st=Ue+1+Q;mr.processCommand(v,st,{callback:Oe})}else v.releaseLineHandles&&v.releaseLineHandles()};Oe()},substitute:function(v,$){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=$.argString,D=k?Di(k,k[0]):[],W,z="",q,Y,Q,re=!1,se=!1;if(D.length)W=D[0],S("pcre")&&W!==""&&(W=new RegExp(W).source),z=D[1],z!==void 0&&(S("pcre")?z=Ka(z.replace(/([^\\])&/g,"$1$$&")):z=qa(z),Be.lastSubstituteReplacePart=z),q=D[2]?D[2].split(" "):[];else if(k&&k.length){Ut(v,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),S("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{fn(v,W,!0,!0)}catch{Ut(v,"Invalid regex: "+W);return}if(z=z||Be.lastSubstituteReplacePart,z===void 0){Ut(v,"No previous substitute regular expression");return}var ye=_n(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 Oe=ue(v,new Ne(me,0)),Le=v.getSearchCursor(Ce,Oe);Po(v,re,se,me,we,Le,Ce,z,$.callback)},startinsert:function(v,$){E(v,$.argString=="!"?"A":"i",{})},redo:Pe.commands.redo,undo:Pe.commands.undo,write:function(v){Pe.commands.save?Pe.commands.save(v):v.save&&v.save()},nohlsearch:function(v){Fo(v)},yank:function(v){var $=qe(v.getCursor()),k=$.line,D=v.getLine(k);Be.registerController.pushText("0","yank",D,!0,!0)},delete:function(v,$){var k=$.selectionLine,D=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;Ko.delete(v,{linewise:!0},[{anchor:new Ne(k,0),head:new Ne(D+1,0)}])},join:function(v,$){var k=$.selectionLine,D=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;v.setCursor(new Ne(k,0)),Nn.joinLines(v,{repeat:D-k},v.state.vim)},delmarks:function(v,$){if(!$.argString||!pr($.argString)){Ut(v,"Argument required");return}for(var k=v.state.vim,D=new Pe.StringStream(pr($.argString));!D.eol();){D.eatSpace();var W=D.pos;if(!D.match(/[a-zA-Z]/,!1)){Ut(v,"Invalid argument: "+$.argString.substring(W));return}var z=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){Ut(v,"Invalid argument: "+$.argString.substring(W));return}var q=z,Y=D.next();if(!(u(q)&&u(Y)||c(q)&&c(Y))){Ut(v,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Ut(v,"Invalid argument: "+$.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete k.marks[ye]}}else delete k.marks[z]}}},mr=new fr;I("insertModeEscKeysTimeout",200,"number"),Pe.Vim=bt;var _r={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"},si=bt.handleKey.bind(bt);bt.handleKey=function(v,$,k){return v.operation(function(){return si(v,$,k)},!0)},L(),r.CodeMirror=Pe;var ai=bt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,$,k,D,W){var z=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,Q=$.top,re=$.left;if(!z.insertMode){var se=D.cursor?or.comparePoints(D.cursor,D.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),Pi.translate(v,re,Q),Pi.setStyle(v.style,"width",q+"px"),Pi.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var $=v.state.cm,k=ai($);if(!k.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,$,k,D,W){var z=v.editor,q=z.state.cm,Y=ai(q);if(D!=-1){if(Y.insertMode||($==-1?(k.charCodeAt(0)>255&&v.inputKey&&(k=v.inputKey,k&&v.inputHash==4&&(k=k.toUpperCase())),v.inputChar=k):$==4||$==0?v.inputKey==k&&v.inputHash==$&&v.inputChar?(k=v.inputChar,$=-1):(v.inputChar=null,v.inputKey=k,v.inputHash=$):v.inputChar=v.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&$==0)return{command:"gotoleft"};if(k=="c"&&$==1&&!fo.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){Ct(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=_n(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&k.length>1){var se=Y.insertMode,ye=_s($,k,W||{},Y);Y.status==null&&(Y.status="");var Ce=po(q,ye,"user");return Y=ai(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(v){function $(){var D=ai(k).insertMode;k.ace.renderer.setStyle("normal-mode",!D),v.textInput.setCommandMode(!D),v.renderer.$keepTextAreaAtCursor=D,v.renderer.$blockCursor=!D}v.state||(v.state={});var k=new Pe(v);v.state.cm=k,v.$vimModeHandler=this,h(k),ai(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(ai(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||($(),k._signal("changeStatus"))}),$(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},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,k=ai($);if(k.insertMode)return"INSERT";var D="";return k.visualMode&&(D+="VISUAL",k.visualLine&&(D+=" LINE"),k.visualBlock&&(D+=" BLOCK")),k.status&&(D+=(D?" ":"")+k.status),D}},bt.defineOption({name:"wrap",set:function(v,$){$&&$.ace.setOption("wrap",v)},type:"boolean"},!1),bt.defineEx("write","w",function(){console.log(":write is not implemented")}),$n.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"}}),$n.push({keys:"gq",type:"operator",operator:"hardWrap"}),bt.defineOperator("hardWrap",function(v,$,k,D,W){var z=k[0].anchor.line,q=k[0].head.line;return $.linewise&&q--,to(v.ace,{startRow:z,endRow:q}),Ne(q,0)}),I("textwidth",void 0,"number",["tw"],function(v,$){if($!==void 0){if(v===void 0){var k=$.ace.getOption("printMarginColumn");return k}var D=Math.round(v);D>1&&$.ace.setOption("printMarginColumn",D)}}),Nn.aceCommand=function(v,$,k){v.vimCmd=$,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",mi):mi(null,v.ace)},Nn.fold=function(v,$,k){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},vo=$n.length,r.handler.defaultKeymap=$n,r.handler.actions=Nn,r.Vim=bt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(Zg)),Zg.exports}FC();var Il={exports:{}};/**
|
1464
|
+
* @license
|
1465
|
+
* Lodash <https://lodash.com/>
|
1466
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1467
|
+
* Released under MIT license <https://lodash.com/license>
|
1468
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1469
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1470
|
+
*/var PC=Il.exports,ef;function WC(){return ef||(ef=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,l=4,o=1,c=2,d=1,w=2,b=4,I=8,T=16,S=32,C=64,R=128,L=256,F=512,E=30,H="...",P=800,O=16,_=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",R],["bind",d],["bindKey",w],["curry",I],["curryRight",T],["flip",F],["partial",S],["partialRight",C],["rearg",L]],ue="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",$e="[object Boolean]",Te="[object Date]",Ee="[object DOMException]",Ge="[object Error]",qe="[object Function]",ht="[object GeneratorFunction]",tt="[object Map]",dt="[object Number]",tn="[object Null]",pn="[object Object]",Yt="[object Promise]",pr="[object Proxy]",gn="[object RegExp]",En="[object Set]",In="[object String]",Xn="[object Symbol]",yt="[object Undefined]",He="[object WeakMap]",ke="[object WeakSet]",ze="[object ArrayBuffer]",Ye="[object DataView]",pt="[object Float32Array]",kt="[object Float64Array]",Ct="[object Int8Array]",Ot="[object Int16Array]",Rt="[object Int32Array]",ut="[object Uint8Array]",wt="[object Uint8ClampedArray]",xn="[object Uint16Array]",xr="[object Uint32Array]",Hr=/\b__p \+= '';/g,Li=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gr=/&(?:amp|lt|gt|quot|#39);/g,co=/[&<>"']/g,Do=RegExp(gr.source),Ua=RegExp(co.source),ti=/<%-([\s\S]+?)%>/g,Va=/<%([\s\S]+?)%>/g,ws=/<%=([\s\S]+?)%>/g,ia=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oi=/^\w*$/,jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Cr=/[\\^$.*+?()[\]{}|]/g,Ni=RegExp(Cr.source),_n=/^\s+/,kr=/\s/,Qi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,bs=/,? & /,oa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qa=/[()=,{}\[\]\/\s]/,Ka=/\\(\\)?/g,Fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ni=/\w*$/,Ut=/^[-+]0x[0-9a-f]+$/i,sa=/^0b[01]+$/i,Sr=/^\[object .+?Constructor\]$/,Hn=/^0o[0-7]+$/i,fn=/^(?:0|[1-9]\d*)$/,Rn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gi=/($^)/,Ar=/['\n\r\u2028\u2029\\]/g,fi="\\ud800-\\udfff",Fo="\\u0300-\\u036f",xs="\\ufe20-\\ufe2f",Zi="\\u20d0-\\u20ff",Ur=Fo+xs+Zi,uo="\\u2700-\\u27bf",Po="a-z\\xdf-\\xf6\\xf8-\\xff",Vr="\\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",ir="\\ufe0e\\ufe0f",Ss=Vr+Wo+Cs+ks,ho="['’]",zo="["+fi+"]",jo="["+Ss+"]",Ji="["+Ur+"]",As="\\d+",aa="["+uo+"]",Ho="["+Po+"]",Uo="[^"+fi+Ss+As+uo+Po+Bo+"]",_s="\\ud83c[\\udffb-\\udfff]",Vo="(?:"+Ji+"|"+_s+")",po="[^"+fi+"]",mi="(?:\\ud83c[\\udde6-\\uddff]){2}",or="[\\ud800-\\udbff][\\udc00-\\udfff]",eo="["+Bo+"]",Pi="\\u200d",la="(?:"+Ho+"|"+Uo+")",Ga="(?:"+eo+"|"+Uo+")",go="(?:"+ho+"(?:d|ll|m|re|s|t|ve))?",Wi="(?:"+ho+"(?:D|LL|M|RE|S|T|VE))?",fo=Vo+"?",qo="["+ir+"]?",mo="(?:"+Pi+"(?:"+[po,mi,or].join("|")+")"+qo+fo+")*",ca="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",to="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pe=qo+fo+mo,ua="(?:"+[aa,mi,or].join("|")+")"+Pe,Ne="(?:"+[po+Ji+"?",Ji,mi,or,zo].join("|")+")",$n=RegExp(ho,"g"),vo=RegExp(Ji,"g"),ri=RegExp(_s+"(?="+_s+")|"+Ne+Pe,"g"),Un=RegExp([eo+"?"+Ho+"+"+go+"(?="+[jo,eo,"$"].join("|")+")",Ga+"+"+Wi+"(?="+[jo,eo+la,"$"].join("|")+")",eo+"?"+la+"+"+go,eo+"+"+Wi,to,ca,As,ua].join("|"),"g"),ha=RegExp("["+Pi+fi+Ur+ir+"]"),yo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vi=["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"],no=-1,nn={};nn[pt]=nn[kt]=nn[Ct]=nn[Ot]=nn[Rt]=nn[ut]=nn[wt]=nn[xn]=nn[xr]=!0,nn[ue]=nn[ce]=nn[ze]=nn[$e]=nn[Ye]=nn[Te]=nn[Ge]=nn[qe]=nn[tt]=nn[dt]=nn[pn]=nn[gn]=nn[En]=nn[In]=nn[He]=!1;var Zt={};Zt[ue]=Zt[ce]=Zt[ze]=Zt[Ye]=Zt[$e]=Zt[Te]=Zt[pt]=Zt[kt]=Zt[Ct]=Zt[Ot]=Zt[Rt]=Zt[tt]=Zt[dt]=Zt[pn]=Zt[gn]=Zt[En]=Zt[In]=Zt[Xn]=Zt[ut]=Zt[wt]=Zt[xn]=Zt[xr]=!0,Zt[Ge]=Zt[qe]=Zt[He]=!1;var rn={À:"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"},Vt={"&":"&","<":"<",">":">",'"':""","'":"'"},yi={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,mn=parseInt,bt=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo,Ir=typeof self=="object"&&self&&self.Object===Object&&self,cn=bt||Ir||Function("return this")(),wn=t&&!t.nodeType&&t,Qn=wn&&!0&&n&&!n.nodeType&&n,Rr=Qn&&Qn.exports===wn,wi=Rr&&bt.process,On=function(){try{var pe=Qn&&Qn.require&&Qn.require("util").types;return pe||wi&&wi.binding&&wi.binding("util")}catch{}}(),qr=On&&On.isArrayBuffer,Ko=On&&On.isDate,Nn=On&&On.isMap,ii=On&&On.isRegExp,oi=On&&On.isSet,bi=On&&On.isTypedArray;function ar(pe,Se,xe){switch(xe.length){case 0:return pe.call(Se);case 1:return pe.call(Se,xe[0]);case 2:return pe.call(Se,xe[0],xe[1]);case 3:return pe.call(Se,xe[0],xe[1],xe[2])}return pe.apply(Se,xe)}function lr(pe,Se,xe,je){for(var ct=-1,It=pe==null?0:pe.length;++ct<It;){var Xt=pe[ct];Se(je,Xt,xe(Xt),pe)}return je}function fr(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je&&Se(pe[xe],xe,pe)!==!1;);return pe}function $s(pe,Se){for(var xe=pe==null?0:pe.length;xe--&&Se(pe[xe],xe,pe)!==!1;);return pe}function mr(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(!Se(pe[xe],xe,pe))return!1;return!0}function _r(pe,Se){for(var xe=-1,je=pe==null?0:pe.length,ct=0,It=[];++xe<je;){var Xt=pe[xe];Se(Xt,xe,pe)&&(It[ct++]=Xt)}return It}function si(pe,Se){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Se,0)>-1}function ai(pe,Se,xe){for(var je=-1,ct=pe==null?0:pe.length;++je<ct;)if(xe(Se,pe[je]))return!0;return!1}function v(pe,Se){for(var xe=-1,je=pe==null?0:pe.length,ct=Array(je);++xe<je;)ct[xe]=Se(pe[xe],xe,pe);return ct}function $(pe,Se){for(var xe=-1,je=Se.length,ct=pe.length;++xe<je;)pe[ct+xe]=Se[xe];return pe}function k(pe,Se,xe,je){var ct=-1,It=pe==null?0:pe.length;for(je&&It&&(xe=pe[++ct]);++ct<It;)xe=Se(xe,pe[ct],ct,pe);return xe}function D(pe,Se,xe,je){var ct=pe==null?0:pe.length;for(je&&ct&&(xe=pe[--ct]);ct--;)xe=Se(xe,pe[ct],ct,pe);return xe}function W(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(Se(pe[xe],xe,pe))return!0;return!1}var z=we("length");function q(pe){return pe.split("")}function Y(pe){return pe.match(oa)||[]}function Q(pe,Se,xe){var je;return xe(pe,function(ct,It,Xt){if(Se(ct,It,Xt))return je=It,!1}),je}function re(pe,Se,xe,je){for(var ct=pe.length,It=xe+(je?1:-1);je?It--:++It<ct;)if(Se(pe[It],It,pe))return It;return-1}function se(pe,Se,xe){return Se===Se?Ze(pe,Se,xe):re(pe,Ce,xe)}function ye(pe,Se,xe,je){for(var ct=xe-1,It=pe.length;++ct<It;)if(je(pe[ct],Se))return ct;return-1}function Ce(pe){return pe!==pe}function me(pe,Se){var xe=pe==null?0:pe.length;return xe?st(pe,Se)/xe:Z}function we(pe){return function(Se){return Se==null?e:Se[pe]}}function Oe(pe){return function(Se){return pe==null?e:pe[Se]}}function Le(pe,Se,xe,je,ct){return ct(pe,function(It,Xt,Nt){xe=je?(je=!1,It):Se(xe,It,Xt,Nt)}),xe}function Ue(pe,Se){var xe=pe.length;for(pe.sort(Se);xe--;)pe[xe]=pe[xe].value;return pe}function st(pe,Se){for(var xe,je=-1,ct=pe.length;++je<ct;){var It=Se(pe[je]);It!==e&&(xe=xe===e?It:xe+It)}return xe}function Qe(pe,Se){for(var xe=-1,je=Array(pe);++xe<pe;)je[xe]=Se(xe);return je}function et(pe,Se){return v(Se,function(xe){return[xe,pe[xe]]})}function vn(pe){return pe&&pe.slice(0,Wt(pe)+1).replace(_n,"")}function lt(pe){return function(Se){return pe(Se)}}function Cn(pe,Se){return v(Se,function(xe){return pe[xe]})}function St(pe,Se){return pe.has(Se)}function Et(pe,Se){for(var xe=-1,je=pe.length;++xe<je&&se(Se,pe[xe],0)>-1;);return xe}function Zn(pe,Se){for(var xe=pe.length;xe--&&se(Se,pe[xe],0)>-1;);return xe}function cr(pe,Se){for(var xe=pe.length,je=0;xe--;)pe[xe]===Se&&++je;return je}var kn=Oe(rn),V=Oe(Vt);function X(pe){return"\\"+Ln[pe]}function ie(pe,Se){return pe==null?e:pe[Se]}function oe(pe){return ha.test(pe)}function ge(pe){return yo.test(pe)}function be(pe){for(var Se,xe=[];!(Se=pe.next()).done;)xe.push(Se.value);return xe}function Me(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je,ct){xe[++Se]=[ct,je]}),xe}function Fe(pe,Se){return function(xe){return pe(Se(xe))}}function We(pe,Se){for(var xe=-1,je=pe.length,ct=0,It=[];++xe<je;){var Xt=pe[xe];(Xt===Se||Xt===s)&&(pe[xe]=s,It[ct++]=xe)}return It}function Ve(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++Se]=je}),xe}function Xe(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++Se]=[je,je]}),xe}function Ze(pe,Se,xe){for(var je=xe-1,ct=pe.length;++je<ct;)if(pe[je]===Se)return je;return-1}function xt(pe,Se,xe){for(var je=xe+1;je--;)if(pe[je]===Se)return je;return je}function zt(pe){return oe(pe)?rt(pe):z(pe)}function At(pe){return oe(pe)?dn(pe):q(pe)}function Wt(pe){for(var Se=pe.length;Se--&&kr.test(pe.charAt(Se)););return Se}var gt=Oe(yi);function rt(pe){for(var Se=ri.lastIndex=0;ri.test(pe);)++Se;return Se}function dn(pe){return pe.match(ri)||[]}function Sn(pe){return pe.match(Un)||[]}var Jn=function pe(Se){Se=Se==null?cn:Kt.defaults(cn.Object(),Se,Kt.pick(cn,vi));var xe=Se.Array,je=Se.Date,ct=Se.Error,It=Se.Function,Xt=Se.Math,Nt=Se.Object,Lr=Se.RegExp,xi=Se.String,un=Se.TypeError,ur=xe.prototype,wo=It.prototype,Dn=Nt.prototype,Ts=Se["__core-js_shared__"],pc=wo.toString,ln=Dn.hasOwnProperty,OM=0,Ty=function(){var i=/[^.]+$/.exec(Ts&&Ts.keys&&Ts.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),gc=Dn.toString,NM=pc.call(Nt),DM=cn._,FM=Lr("^"+pc.call(ln).replace(Cr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fc=Rr?Se.Buffer:e,Go=Se.Symbol,mc=Se.Uint8Array,My=fc?fc.allocUnsafe:e,vc=Fe(Nt.getPrototypeOf,Nt),Ey=Nt.create,Iy=Dn.propertyIsEnumerable,yc=ur.splice,Ry=Go?Go.isConcatSpreadable:e,Ya=Go?Go.iterator:e,Ms=Go?Go.toStringTag:e,wc=function(){try{var i=Os(Nt,"defineProperty");return i({},"",{}),i}catch{}}(),PM=Se.clearTimeout!==cn.clearTimeout&&Se.clearTimeout,WM=je&&je.now!==cn.Date.now&&je.now,BM=Se.setTimeout!==cn.setTimeout&&Se.setTimeout,bc=Xt.ceil,xc=Xt.floor,ld=Nt.getOwnPropertySymbols,zM=fc?fc.isBuffer:e,Ly=Se.isFinite,jM=ur.join,HM=Fe(Nt.keys,Nt),sr=Xt.max,$r=Xt.min,UM=je.now,VM=Se.parseInt,Oy=Xt.random,qM=ur.reverse,cd=Os(Se,"DataView"),Xa=Os(Se,"Map"),ud=Os(Se,"Promise"),da=Os(Se,"Set"),Qa=Os(Se,"WeakMap"),Za=Os(Nt,"create"),Cc=Qa&&new Qa,pa={},KM=Ns(cd),GM=Ns(Xa),YM=Ns(ud),XM=Ns(da),QM=Ns(Qa),kc=Go?Go.prototype:e,Ja=kc?kc.valueOf:e,Ny=kc?kc.toString:e;function J(i){if(Fn(i)&&!_t(i)&&!(i instanceof qt)){if(i instanceof Ci)return i;if(ln.call(i,"__wrapped__"))return Dw(i)}return new Ci(i)}var ga=function(){function i(){}return function(f){if(!Tn(f))return{};if(Ey)return Ey(f);i.prototype=f;var M=new i;return i.prototype=e,M}}();function Sc(){}function Ci(i,f){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}J.templateSettings={escape:ti,evaluate:Va,interpolate:ws,variable:"",imports:{_:J}},J.prototype=Sc.prototype,J.prototype.constructor=J,Ci.prototype=ga(Sc.prototype),Ci.prototype.constructor=Ci;function qt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function ZM(){var i=new qt(this.__wrapped__);return i.__actions__=Kr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Kr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Kr(this.__views__),i}function JM(){if(this.__filtered__){var i=new qt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function eE(){var i=this.__wrapped__.value(),f=this.__dir__,M=_t(i),j=f<0,G=M?i.length:0,ee=dI(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=j?de:le-1,Re=this.__iteratees__,De=Re.length,Ke=0,nt=$r(ve,this.__takeCount__);if(!M||!j&&G==ve&&nt==ve)return ow(i,this.__actions__);var mt=[];e:for(;ve--&&Ke<nt;){Ie+=f;for(var Dt=-1,vt=i[Ie];++Dt<De;){var jt=Re[Dt],Gt=jt.iteratee,ui=jt.type,Dr=Gt(vt);if(ui==A)vt=Dr;else if(!Dr){if(ui==_)continue e;break e}}mt[Ke++]=vt}return mt}qt.prototype=ga(Sc.prototype),qt.prototype.constructor=qt;function Es(i){var f=-1,M=i==null?0:i.length;for(this.clear();++f<M;){var j=i[f];this.set(j[0],j[1])}}function tE(){this.__data__=Za?Za(null):{},this.size=0}function nE(i){var f=this.has(i)&&delete this.__data__[i];return this.size-=f?1:0,f}function rE(i){var f=this.__data__;if(Za){var M=f[i];return M===h?e:M}return ln.call(f,i)?f[i]:e}function iE(i){var f=this.__data__;return Za?f[i]!==e:ln.call(f,i)}function oE(i,f){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=Za&&f===e?h:f,this}Es.prototype.clear=tE,Es.prototype.delete=nE,Es.prototype.get=rE,Es.prototype.has=iE,Es.prototype.set=oE;function bo(i){var f=-1,M=i==null?0:i.length;for(this.clear();++f<M;){var j=i[f];this.set(j[0],j[1])}}function sE(){this.__data__=[],this.size=0}function aE(i){var f=this.__data__,M=Ac(f,i);if(M<0)return!1;var j=f.length-1;return M==j?f.pop():yc.call(f,M,1),--this.size,!0}function lE(i){var f=this.__data__,M=Ac(f,i);return M<0?e:f[M][1]}function cE(i){return Ac(this.__data__,i)>-1}function uE(i,f){var M=this.__data__,j=Ac(M,i);return j<0?(++this.size,M.push([i,f])):M[j][1]=f,this}bo.prototype.clear=sE,bo.prototype.delete=aE,bo.prototype.get=lE,bo.prototype.has=cE,bo.prototype.set=uE;function xo(i){var f=-1,M=i==null?0:i.length;for(this.clear();++f<M;){var j=i[f];this.set(j[0],j[1])}}function hE(){this.size=0,this.__data__={hash:new Es,map:new(Xa||bo),string:new Es}}function dE(i){var f=Fc(this,i).delete(i);return this.size-=f?1:0,f}function pE(i){return Fc(this,i).get(i)}function gE(i){return Fc(this,i).has(i)}function fE(i,f){var M=Fc(this,i),j=M.size;return M.set(i,f),this.size+=M.size==j?0:1,this}xo.prototype.clear=hE,xo.prototype.delete=dE,xo.prototype.get=pE,xo.prototype.has=gE,xo.prototype.set=fE;function Is(i){var f=-1,M=i==null?0:i.length;for(this.__data__=new xo;++f<M;)this.add(i[f])}function mE(i){return this.__data__.set(i,h),this}function vE(i){return this.__data__.has(i)}Is.prototype.add=Is.prototype.push=mE,Is.prototype.has=vE;function Bi(i){var f=this.__data__=new bo(i);this.size=f.size}function yE(){this.__data__=new bo,this.size=0}function wE(i){var f=this.__data__,M=f.delete(i);return this.size=f.size,M}function bE(i){return this.__data__.get(i)}function xE(i){return this.__data__.has(i)}function CE(i,f){var M=this.__data__;if(M instanceof bo){var j=M.__data__;if(!Xa||j.length<m-1)return j.push([i,f]),this.size=++M.size,this;M=this.__data__=new xo(j)}return M.set(i,f),this.size=M.size,this}Bi.prototype.clear=yE,Bi.prototype.delete=wE,Bi.prototype.get=bE,Bi.prototype.has=xE,Bi.prototype.set=CE;function Dy(i,f){var M=_t(i),j=!M&&Ds(i),G=!M&&!j&&Jo(i),ee=!M&&!j&&!G&&ya(i),le=M||j||G||ee,de=le?Qe(i.length,xi):[],ve=de.length;for(var Ie in i)(f||ln.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Ao(Ie,ve)))&&de.push(Ie);return de}function Fy(i){var f=i.length;return f?i[xd(0,f-1)]:e}function kE(i,f){return Pc(Kr(i),Rs(f,0,i.length))}function SE(i){return Pc(Kr(i))}function hd(i,f,M){(M!==e&&!zi(i[f],M)||M===e&&!(f in i))&&Co(i,f,M)}function el(i,f,M){var j=i[f];(!(ln.call(i,f)&&zi(j,M))||M===e&&!(f in i))&&Co(i,f,M)}function Ac(i,f){for(var M=i.length;M--;)if(zi(i[M][0],f))return M;return-1}function AE(i,f,M,j){return Yo(i,function(G,ee,le){f(j,G,M(G),le)}),j}function Py(i,f){return i&&io(f,hr(f),i)}function _E(i,f){return i&&io(f,Yr(f),i)}function Co(i,f,M){f=="__proto__"&&wc?wc(i,f,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[f]=M}function dd(i,f){for(var M=-1,j=f.length,G=xe(j),ee=i==null;++M<j;)G[M]=ee?e:qd(i,f[M]);return G}function Rs(i,f,M){return i===i&&(M!==e&&(i=i<=M?i:M),f!==e&&(i=i>=f?i:f)),i}function ki(i,f,M,j,G,ee){var le,de=f&a,ve=f&u,Ie=f&l;if(M&&(le=G?M(i,j,G,ee):M(i)),le!==e)return le;if(!Tn(i))return i;var Re=_t(i);if(Re){if(le=gI(i),!de)return Kr(i,le)}else{var De=Tr(i),Ke=De==qe||De==ht;if(Jo(i))return lw(i,de);if(De==pn||De==ue||Ke&&!G){if(le=ve||Ke?{}:$w(i),!de)return ve?rI(i,_E(le,i)):nI(i,Py(le,i))}else{if(!Zt[De])return G?i:{};le=fI(i,De,de)}}ee||(ee=new Bi);var nt=ee.get(i);if(nt)return nt;ee.set(i,le),nb(i)?i.forEach(function(vt){le.add(ki(vt,f,M,vt,i,ee))}):eb(i)&&i.forEach(function(vt,jt){le.set(jt,ki(vt,f,M,jt,i,ee))});var mt=Ie?ve?Rd:Id:ve?Yr:hr,Dt=Re?e:mt(i);return fr(Dt||i,function(vt,jt){Dt&&(jt=vt,vt=i[jt]),el(le,jt,ki(vt,f,M,jt,i,ee))}),le}function $E(i){var f=hr(i);return function(M){return Wy(M,i,f)}}function Wy(i,f,M){var j=M.length;if(i==null)return!j;for(i=Nt(i);j--;){var G=M[j],ee=f[G],le=i[G];if(le===e&&!(G in i)||!ee(le))return!1}return!0}function By(i,f,M){if(typeof i!="function")throw new un(y);return al(function(){i.apply(e,M)},f)}function tl(i,f,M,j){var G=-1,ee=si,le=!0,de=i.length,ve=[],Ie=f.length;if(!de)return ve;M&&(f=v(f,lt(M))),j?(ee=ai,le=!1):f.length>=m&&(ee=St,le=!1,f=new Is(f));e:for(;++G<de;){var Re=i[G],De=M==null?Re:M(Re);if(Re=j||Re!==0?Re:0,le&&De===De){for(var Ke=Ie;Ke--;)if(f[Ke]===De)continue e;ve.push(Re)}else ee(f,De,j)||ve.push(Re)}return ve}var Yo=pw(ro),zy=pw(gd,!0);function TE(i,f){var M=!0;return Yo(i,function(j,G,ee){return M=!!f(j,G,ee),M}),M}function _c(i,f,M){for(var j=-1,G=i.length;++j<G;){var ee=i[j],le=f(ee);if(le!=null&&(de===e?le===le&&!ci(le):M(le,de)))var de=le,ve=ee}return ve}function ME(i,f,M,j){var G=i.length;for(M=Lt(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:Lt(j),j<0&&(j+=G),j=M>j?0:ib(j);M<j;)i[M++]=f;return i}function jy(i,f){var M=[];return Yo(i,function(j,G,ee){f(j,G,ee)&&M.push(j)}),M}function vr(i,f,M,j,G){var ee=-1,le=i.length;for(M||(M=vI),G||(G=[]);++ee<le;){var de=i[ee];f>0&&M(de)?f>1?vr(de,f-1,M,j,G):$(G,de):j||(G[G.length]=de)}return G}var pd=gw(),Hy=gw(!0);function ro(i,f){return i&&pd(i,f,hr)}function gd(i,f){return i&&Hy(i,f,hr)}function $c(i,f){return _r(f,function(M){return _o(i[M])})}function Ls(i,f){f=Qo(f,i);for(var M=0,j=f.length;i!=null&&M<j;)i=i[oo(f[M++])];return M&&M==j?i:e}function Uy(i,f,M){var j=f(i);return _t(i)?j:$(j,M(i))}function Or(i){return i==null?i===e?yt:tn:Ms&&Ms in Nt(i)?hI(i):SI(i)}function fd(i,f){return i>f}function EE(i,f){return i!=null&&ln.call(i,f)}function IE(i,f){return i!=null&&f in Nt(i)}function RE(i,f,M){return i>=$r(f,M)&&i<sr(f,M)}function md(i,f,M){for(var j=M?ai:si,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Re=i[le];le&&f&&(Re=v(Re,lt(f))),ve=$r(Re.length,ve),de[le]=!M&&(f||G>=120&&Re.length>=120)?new Is(le&&Re):e}Re=i[0];var De=-1,Ke=de[0];e:for(;++De<G&&Ie.length<ve;){var nt=Re[De],mt=f?f(nt):nt;if(nt=M||nt!==0?nt:0,!(Ke?St(Ke,mt):j(Ie,mt,M))){for(le=ee;--le;){var Dt=de[le];if(!(Dt?St(Dt,mt):j(i[le],mt,M)))continue e}Ke&&Ke.push(mt),Ie.push(nt)}}return Ie}function LE(i,f,M,j){return ro(i,function(G,ee,le){f(j,M(G),ee,le)}),j}function nl(i,f,M){f=Qo(f,i),i=Iw(i,f);var j=i==null?i:i[oo(Ai(f))];return j==null?e:ar(j,i,M)}function Vy(i){return Fn(i)&&Or(i)==ue}function OE(i){return Fn(i)&&Or(i)==ze}function NE(i){return Fn(i)&&Or(i)==Te}function rl(i,f,M,j,G){return i===f?!0:i==null||f==null||!Fn(i)&&!Fn(f)?i!==i&&f!==f:DE(i,f,M,j,rl,G)}function DE(i,f,M,j,G,ee){var le=_t(i),de=_t(f),ve=le?ce:Tr(i),Ie=de?ce:Tr(f);ve=ve==ue?pn:ve,Ie=Ie==ue?pn:Ie;var Re=ve==pn,De=Ie==pn,Ke=ve==Ie;if(Ke&&Jo(i)){if(!Jo(f))return!1;le=!0,Re=!1}if(Ke&&!Re)return ee||(ee=new Bi),le||ya(i)?Sw(i,f,M,j,G,ee):cI(i,f,ve,M,j,G,ee);if(!(M&o)){var nt=Re&&ln.call(i,"__wrapped__"),mt=De&&ln.call(f,"__wrapped__");if(nt||mt){var Dt=nt?i.value():i,vt=mt?f.value():f;return ee||(ee=new Bi),G(Dt,vt,M,j,ee)}}return Ke?(ee||(ee=new Bi),uI(i,f,M,j,G,ee)):!1}function FE(i){return Fn(i)&&Tr(i)==tt}function vd(i,f,M,j){var G=M.length,ee=G,le=!j;if(i==null)return!ee;for(i=Nt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Re=de[1];if(le&&de[2]){if(Ie===e&&!(ve in i))return!1}else{var De=new Bi;if(j)var Ke=j(Ie,Re,ve,i,f,De);if(!(Ke===e?rl(Re,Ie,o|c,j,De):Ke))return!1}}return!0}function qy(i){if(!Tn(i)||wI(i))return!1;var f=_o(i)?FM:Sr;return f.test(Ns(i))}function PE(i){return Fn(i)&&Or(i)==gn}function WE(i){return Fn(i)&&Tr(i)==En}function BE(i){return Fn(i)&&Uc(i.length)&&!!nn[Or(i)]}function Ky(i){return typeof i=="function"?i:i==null?Xr:typeof i=="object"?_t(i)?Xy(i[0],i[1]):Yy(i):fb(i)}function yd(i){if(!sl(i))return HM(i);var f=[];for(var M in Nt(i))ln.call(i,M)&&M!="constructor"&&f.push(M);return f}function zE(i){if(!Tn(i))return kI(i);var f=sl(i),M=[];for(var j in i)j=="constructor"&&(f||!ln.call(i,j))||M.push(j);return M}function wd(i,f){return i<f}function Gy(i,f){var M=-1,j=Gr(i)?xe(i.length):[];return Yo(i,function(G,ee,le){j[++M]=f(G,ee,le)}),j}function Yy(i){var f=Od(i);return f.length==1&&f[0][2]?Mw(f[0][0],f[0][1]):function(M){return M===i||vd(M,i,f)}}function Xy(i,f){return Dd(i)&&Tw(f)?Mw(oo(i),f):function(M){var j=qd(M,i);return j===e&&j===f?Kd(M,i):rl(f,j,o|c)}}function Tc(i,f,M,j,G){i!==f&&pd(f,function(ee,le){if(G||(G=new Bi),Tn(ee))jE(i,f,le,M,Tc,j,G);else{var de=j?j(Pd(i,le),ee,le+"",i,f,G):e;de===e&&(de=ee),hd(i,le,de)}},Yr)}function jE(i,f,M,j,G,ee,le){var de=Pd(i,M),ve=Pd(f,M),Ie=le.get(ve);if(Ie){hd(i,M,Ie);return}var Re=ee?ee(de,ve,M+"",i,f,le):e,De=Re===e;if(De){var Ke=_t(ve),nt=!Ke&&Jo(ve),mt=!Ke&&!nt&&ya(ve);Re=ve,Ke||nt||mt?_t(de)?Re=de:Vn(de)?Re=Kr(de):nt?(De=!1,Re=lw(ve,!0)):mt?(De=!1,Re=cw(ve,!0)):Re=[]:ll(ve)||Ds(ve)?(Re=de,Ds(de)?Re=ob(de):(!Tn(de)||_o(de))&&(Re=$w(ve))):De=!1}De&&(le.set(ve,Re),G(Re,ve,j,ee,le),le.delete(ve)),hd(i,M,Re)}function Qy(i,f){var M=i.length;if(M)return f+=f<0?M:0,Ao(f,M)?i[f]:e}function Zy(i,f,M){f.length?f=v(f,function(ee){return _t(ee)?function(le){return Ls(le,ee.length===1?ee[0]:ee)}:ee}):f=[Xr];var j=-1;f=v(f,lt(ft()));var G=Gy(i,function(ee,le,de){var ve=v(f,function(Ie){return Ie(ee)});return{criteria:ve,index:++j,value:ee}});return Ue(G,function(ee,le){return tI(ee,le,M)})}function HE(i,f){return Jy(i,f,function(M,j){return Kd(i,j)})}function Jy(i,f,M){for(var j=-1,G=f.length,ee={};++j<G;){var le=f[j],de=Ls(i,le);M(de,le)&&il(ee,Qo(le,i),de)}return ee}function UE(i){return function(f){return Ls(f,i)}}function bd(i,f,M,j){var G=j?ye:se,ee=-1,le=f.length,de=i;for(i===f&&(f=Kr(f)),M&&(de=v(i,lt(M)));++ee<le;)for(var ve=0,Ie=f[ee],Re=M?M(Ie):Ie;(ve=G(de,Re,ve,j))>-1;)de!==i&&yc.call(de,ve,1),yc.call(i,ve,1);return i}function ew(i,f){for(var M=i?f.length:0,j=M-1;M--;){var G=f[M];if(M==j||G!==ee){var ee=G;Ao(G)?yc.call(i,G,1):Sd(i,G)}}return i}function xd(i,f){return i+xc(Oy()*(f-i+1))}function VE(i,f,M,j){for(var G=-1,ee=sr(bc((f-i)/(M||1)),0),le=xe(ee);ee--;)le[j?ee:++G]=i,i+=M;return le}function Cd(i,f){var M="";if(!i||f<1||f>U)return M;do f%2&&(M+=i),f=xc(f/2),f&&(i+=i);while(f);return M}function Bt(i,f){return Wd(Ew(i,f,Xr),i+"")}function qE(i){return Fy(wa(i))}function KE(i,f){var M=wa(i);return Pc(M,Rs(f,0,M.length))}function il(i,f,M,j){if(!Tn(i))return i;f=Qo(f,i);for(var G=-1,ee=f.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=oo(f[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Re=de[ve];Ie=j?j(Re,ve,de):e,Ie===e&&(Ie=Tn(Re)?Re:Ao(f[G+1])?[]:{})}el(de,ve,Ie),de=de[ve]}return i}var tw=Cc?function(i,f){return Cc.set(i,f),i}:Xr,GE=wc?function(i,f){return wc(i,"toString",{configurable:!0,enumerable:!1,value:Yd(f),writable:!0})}:Xr;function YE(i){return Pc(wa(i))}function Si(i,f,M){var j=-1,G=i.length;f<0&&(f=-f>G?0:G+f),M=M>G?G:M,M<0&&(M+=G),G=f>M?0:M-f>>>0,f>>>=0;for(var ee=xe(G);++j<G;)ee[j]=i[j+f];return ee}function XE(i,f){var M;return Yo(i,function(j,G,ee){return M=f(j,G,ee),!M}),!!M}function Mc(i,f,M){var j=0,G=i==null?j:i.length;if(typeof f=="number"&&f===f&&G<=ne){for(;j<G;){var ee=j+G>>>1,le=i[ee];le!==null&&!ci(le)&&(M?le<=f:le<f)?j=ee+1:G=ee}return G}return kd(i,f,Xr,M)}function kd(i,f,M,j){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;f=M(f);for(var le=f!==f,de=f===null,ve=ci(f),Ie=f===e;G<ee;){var Re=xc((G+ee)/2),De=M(i[Re]),Ke=De!==e,nt=De===null,mt=De===De,Dt=ci(De);if(le)var vt=j||mt;else Ie?vt=mt&&(j||Ke):de?vt=mt&&Ke&&(j||!nt):ve?vt=mt&&Ke&&!nt&&(j||!Dt):nt||Dt?vt=!1:vt=j?De<=f:De<f;vt?G=Re+1:ee=Re}return $r(ee,he)}function nw(i,f){for(var M=-1,j=i.length,G=0,ee=[];++M<j;){var le=i[M],de=f?f(le):le;if(!M||!zi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function rw(i){return typeof i=="number"?i:ci(i)?Z:+i}function li(i){if(typeof i=="string")return i;if(_t(i))return v(i,li)+"";if(ci(i))return Ny?Ny.call(i):"";var f=i+"";return f=="0"&&1/i==-1/0?"-0":f}function Xo(i,f,M){var j=-1,G=si,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=ai;else if(ee>=m){var Ie=f?null:aI(i);if(Ie)return Ve(Ie);le=!1,G=St,ve=new Is}else ve=f?[]:de;e:for(;++j<ee;){var Re=i[j],De=f?f(Re):Re;if(Re=M||Re!==0?Re:0,le&&De===De){for(var Ke=ve.length;Ke--;)if(ve[Ke]===De)continue e;f&&ve.push(De),de.push(Re)}else G(ve,De,M)||(ve!==de&&ve.push(De),de.push(Re))}return de}function Sd(i,f){return f=Qo(f,i),i=Iw(i,f),i==null||delete i[oo(Ai(f))]}function iw(i,f,M,j){return il(i,f,M(Ls(i,f)),j)}function Ec(i,f,M,j){for(var G=i.length,ee=j?G:-1;(j?ee--:++ee<G)&&f(i[ee],ee,i););return M?Si(i,j?0:ee,j?ee+1:G):Si(i,j?ee+1:0,j?G:ee)}function ow(i,f){var M=i;return M instanceof qt&&(M=M.value()),k(f,function(j,G){return G.func.apply(G.thisArg,$([j],G.args))},M)}function Ad(i,f,M){var j=i.length;if(j<2)return j?Xo(i[0]):[];for(var G=-1,ee=xe(j);++G<j;)for(var le=i[G],de=-1;++de<j;)de!=G&&(ee[G]=tl(ee[G]||le,i[de],f,M));return Xo(vr(ee,1),f,M)}function sw(i,f,M){for(var j=-1,G=i.length,ee=f.length,le={};++j<G;){var de=j<ee?f[j]:e;M(le,i[j],de)}return le}function _d(i){return Vn(i)?i:[]}function $d(i){return typeof i=="function"?i:Xr}function Qo(i,f){return _t(i)?i:Dd(i,f)?[i]:Nw(sn(i))}var QE=Bt;function Zo(i,f,M){var j=i.length;return M=M===e?j:M,!f&&M>=j?i:Si(i,f,M)}var aw=PM||function(i){return cn.clearTimeout(i)};function lw(i,f){if(f)return i.slice();var M=i.length,j=My?My(M):new i.constructor(M);return i.copy(j),j}function Td(i){var f=new i.constructor(i.byteLength);return new mc(f).set(new mc(i)),f}function ZE(i,f){var M=f?Td(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function JE(i){var f=new i.constructor(i.source,ni.exec(i));return f.lastIndex=i.lastIndex,f}function eI(i){return Ja?Nt(Ja.call(i)):{}}function cw(i,f){var M=f?Td(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function uw(i,f){if(i!==f){var M=i!==e,j=i===null,G=i===i,ee=ci(i),le=f!==e,de=f===null,ve=f===f,Ie=ci(f);if(!de&&!Ie&&!ee&&i>f||ee&&le&&ve&&!de&&!Ie||j&&le&&ve||!M&&ve||!G)return 1;if(!j&&!ee&&!Ie&&i<f||Ie&&M&&G&&!j&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function tI(i,f,M){for(var j=-1,G=i.criteria,ee=f.criteria,le=G.length,de=M.length;++j<le;){var ve=uw(G[j],ee[j]);if(ve){if(j>=de)return ve;var Ie=M[j];return ve*(Ie=="desc"?-1:1)}}return i.index-f.index}function hw(i,f,M,j){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=f.length,Ie=sr(ee-le,0),Re=xe(ve+Ie),De=!j;++de<ve;)Re[de]=f[de];for(;++G<le;)(De||G<ee)&&(Re[M[G]]=i[G]);for(;Ie--;)Re[de++]=i[G++];return Re}function dw(i,f,M,j){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=f.length,Re=sr(ee-de,0),De=xe(Re+Ie),Ke=!j;++G<Re;)De[G]=i[G];for(var nt=G;++ve<Ie;)De[nt+ve]=f[ve];for(;++le<de;)(Ke||G<ee)&&(De[nt+M[le]]=i[G++]);return De}function Kr(i,f){var M=-1,j=i.length;for(f||(f=xe(j));++M<j;)f[M]=i[M];return f}function io(i,f,M,j){var G=!M;M||(M={});for(var ee=-1,le=f.length;++ee<le;){var de=f[ee],ve=j?j(M[de],i[de],de,M,i):e;ve===e&&(ve=i[de]),G?Co(M,de,ve):el(M,de,ve)}return M}function nI(i,f){return io(i,Nd(i),f)}function rI(i,f){return io(i,Aw(i),f)}function Ic(i,f){return function(M,j){var G=_t(M)?lr:AE,ee=f?f():{};return G(M,i,ft(j,2),ee)}}function fa(i){return Bt(function(f,M){var j=-1,G=M.length,ee=G>1?M[G-1]:e,le=G>2?M[2]:e;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):e,le&&Nr(M[0],M[1],le)&&(ee=G<3?e:ee,G=1),f=Nt(f);++j<G;){var de=M[j];de&&i(f,de,j,ee)}return f})}function pw(i,f){return function(M,j){if(M==null)return M;if(!Gr(M))return i(M,j);for(var G=M.length,ee=f?G:-1,le=Nt(M);(f?ee--:++ee<G)&&j(le[ee],ee,le)!==!1;);return M}}function gw(i){return function(f,M,j){for(var G=-1,ee=Nt(f),le=j(f),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return f}}function iI(i,f,M){var j=f&d,G=ol(i);function ee(){var le=this&&this!==cn&&this instanceof ee?G:i;return le.apply(j?M:this,arguments)}return ee}function fw(i){return function(f){f=sn(f);var M=oe(f)?At(f):e,j=M?M[0]:f.charAt(0),G=M?Zo(M,1).join(""):f.slice(1);return j[i]()+G}}function ma(i){return function(f){return k(pb(db(f).replace($n,"")),i,"")}}function ol(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 M=ga(i.prototype),j=i.apply(M,f);return Tn(j)?j:M}}function oI(i,f,M){var j=ol(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=va(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:We(le,ve);if(ee-=Ie.length,ee<M)return bw(i,f,Rc,G.placeholder,e,le,Ie,e,e,M-ee);var Re=this&&this!==cn&&this instanceof G?j:i;return ar(Re,this,le)}return G}function mw(i){return function(f,M,j){var G=Nt(f);if(!Gr(f)){var ee=ft(M,3);f=hr(f),M=function(de){return ee(G[de],de,G)}}var le=i(f,M,j);return le>-1?G[ee?f[le]:le]:e}}function vw(i){return So(function(f){var M=f.length,j=M,G=Ci.prototype.thru;for(i&&f.reverse();j--;){var ee=f[j];if(typeof ee!="function")throw new un(y);if(G&&!le&&Dc(ee)=="wrapper")var le=new Ci([],!0)}for(j=le?j:M;++j<M;){ee=f[j];var de=Dc(ee),ve=de=="wrapper"?Ld(ee):e;ve&&Fd(ve[0])&&ve[1]==(R|I|S|L)&&!ve[4].length&&ve[9]==1?le=le[Dc(ve[0])].apply(le,ve[3]):le=ee.length==1&&Fd(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Re=Ie[0];if(le&&Ie.length==1&&_t(Re))return le.plant(Re).value();for(var De=0,Ke=M?f[De].apply(this,Ie):Re;++De<M;)Ke=f[De].call(this,Ke);return Ke}})}function Rc(i,f,M,j,G,ee,le,de,ve,Ie){var Re=f&R,De=f&d,Ke=f&w,nt=f&(I|T),mt=f&F,Dt=Ke?e:ol(i);function vt(){for(var jt=arguments.length,Gt=xe(jt),ui=jt;ui--;)Gt[ui]=arguments[ui];if(nt)var Dr=va(vt),hi=cr(Gt,Dr);if(j&&(Gt=hw(Gt,j,G,nt)),ee&&(Gt=dw(Gt,ee,le,nt)),jt-=hi,nt&&jt<Ie){var qn=We(Gt,Dr);return bw(i,f,Rc,vt.placeholder,M,Gt,qn,de,ve,Ie-jt)}var ji=De?M:this,To=Ke?ji[i]:i;return jt=Gt.length,de?Gt=AI(Gt,de):mt&&jt>1&&Gt.reverse(),Re&&ve<jt&&(Gt.length=ve),this&&this!==cn&&this instanceof vt&&(To=Dt||ol(To)),To.apply(ji,Gt)}return vt}function yw(i,f){return function(M,j){return LE(M,i,f(j),{})}}function Lc(i,f){return function(M,j){var G;if(M===e&&j===e)return f;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=li(M),j=li(j)):(M=rw(M),j=rw(j)),G=i(M,j)}return G}}function Md(i){return So(function(f){return f=v(f,lt(ft())),Bt(function(M){var j=this;return i(f,function(G){return ar(G,j,M)})})})}function Oc(i,f){f=f===e?" ":li(f);var M=f.length;if(M<2)return M?Cd(f,i):f;var j=Cd(f,bc(i/zt(f)));return oe(f)?Zo(At(j),0,i).join(""):j.slice(0,i)}function sI(i,f,M,j){var G=f&d,ee=ol(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Re=j.length,De=xe(Re+ve),Ke=this&&this!==cn&&this instanceof le?ee:i;++Ie<Re;)De[Ie]=j[Ie];for(;ve--;)De[Ie++]=arguments[++de];return ar(Ke,G?M:this,De)}return le}function ww(i){return function(f,M,j){return j&&typeof j!="number"&&Nr(f,M,j)&&(M=j=e),f=$o(f),M===e?(M=f,f=0):M=$o(M),j=j===e?f<M?1:-1:$o(j),VE(f,M,j,i)}}function Nc(i){return function(f,M){return typeof f=="string"&&typeof M=="string"||(f=_i(f),M=_i(M)),i(f,M)}}function bw(i,f,M,j,G,ee,le,de,ve,Ie){var Re=f&I,De=Re?le:e,Ke=Re?e:le,nt=Re?ee:e,mt=Re?e:ee;f|=Re?S:C,f&=~(Re?C:S),f&b||(f&=-4);var Dt=[i,f,G,nt,De,mt,Ke,de,ve,Ie],vt=M.apply(e,Dt);return Fd(i)&&Rw(vt,Dt),vt.placeholder=j,Lw(vt,i,f)}function Ed(i){var f=Xt[i];return function(M,j){if(M=_i(M),j=j==null?0:$r(Lt(j),292),j&&Ly(M)){var G=(sn(M)+"e").split("e"),ee=f(G[0]+"e"+(+G[1]+j));return G=(sn(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return f(M)}}var aI=da&&1/Ve(new da([,-0]))[1]==B?function(i){return new da(i)}:Zd;function xw(i){return function(f){var M=Tr(f);return M==tt?Me(f):M==En?Xe(f):et(f,i(f))}}function ko(i,f,M,j,G,ee,le,de){var ve=f&w;if(!ve&&typeof i!="function")throw new un(y);var Ie=j?j.length:0;if(Ie||(f&=-97,j=G=e),le=le===e?le:sr(Lt(le),0),de=de===e?de:Lt(de),Ie-=G?G.length:0,f&C){var Re=j,De=G;j=G=e}var Ke=ve?e:Ld(i),nt=[i,f,M,j,G,Re,De,ee,le,de];if(Ke&&CI(nt,Ke),i=nt[0],f=nt[1],M=nt[2],j=nt[3],G=nt[4],de=nt[9]=nt[9]===e?ve?0:i.length:sr(nt[9]-Ie,0),!de&&f&(I|T)&&(f&=-25),!f||f==d)var mt=iI(i,f,M);else f==I||f==T?mt=oI(i,f,de):(f==S||f==(d|S))&&!G.length?mt=sI(i,f,M,j):mt=Rc.apply(e,nt);var Dt=Ke?tw:Rw;return Lw(Dt(mt,nt),i,f)}function Cw(i,f,M,j){return i===e||zi(i,Dn[M])&&!ln.call(j,M)?f:i}function kw(i,f,M,j,G,ee){return Tn(i)&&Tn(f)&&(ee.set(f,i),Tc(i,f,e,kw,ee),ee.delete(f)),i}function lI(i){return ll(i)?e:i}function Sw(i,f,M,j,G,ee){var le=M&o,de=i.length,ve=f.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Re=ee.get(f);if(Ie&&Re)return Ie==f&&Re==i;var De=-1,Ke=!0,nt=M&c?new Is:e;for(ee.set(i,f),ee.set(f,i);++De<de;){var mt=i[De],Dt=f[De];if(j)var vt=le?j(Dt,mt,De,f,i,ee):j(mt,Dt,De,i,f,ee);if(vt!==e){if(vt)continue;Ke=!1;break}if(nt){if(!W(f,function(jt,Gt){if(!St(nt,Gt)&&(mt===jt||G(mt,jt,M,j,ee)))return nt.push(Gt)})){Ke=!1;break}}else if(!(mt===Dt||G(mt,Dt,M,j,ee))){Ke=!1;break}}return ee.delete(i),ee.delete(f),Ke}function cI(i,f,M,j,G,ee,le){switch(M){case Ye:if(i.byteLength!=f.byteLength||i.byteOffset!=f.byteOffset)return!1;i=i.buffer,f=f.buffer;case ze:return!(i.byteLength!=f.byteLength||!ee(new mc(i),new mc(f)));case $e:case Te:case dt:return zi(+i,+f);case Ge:return i.name==f.name&&i.message==f.message;case gn:case In:return i==f+"";case tt:var de=Me;case En:var ve=j&o;if(de||(de=Ve),i.size!=f.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==f;j|=c,le.set(i,f);var Re=Sw(de(i),de(f),j,G,ee,le);return le.delete(i),Re;case Xn:if(Ja)return Ja.call(i)==Ja.call(f)}return!1}function uI(i,f,M,j,G,ee){var le=M&o,de=Id(i),ve=de.length,Ie=Id(f),Re=Ie.length;if(ve!=Re&&!le)return!1;for(var De=ve;De--;){var Ke=de[De];if(!(le?Ke in f:ln.call(f,Ke)))return!1}var nt=ee.get(i),mt=ee.get(f);if(nt&&mt)return nt==f&&mt==i;var Dt=!0;ee.set(i,f),ee.set(f,i);for(var vt=le;++De<ve;){Ke=de[De];var jt=i[Ke],Gt=f[Ke];if(j)var ui=le?j(Gt,jt,Ke,f,i,ee):j(jt,Gt,Ke,i,f,ee);if(!(ui===e?jt===Gt||G(jt,Gt,M,j,ee):ui)){Dt=!1;break}vt||(vt=Ke=="constructor")}if(Dt&&!vt){var Dr=i.constructor,hi=f.constructor;Dr!=hi&&"constructor"in i&&"constructor"in f&&!(typeof Dr=="function"&&Dr instanceof Dr&&typeof hi=="function"&&hi instanceof hi)&&(Dt=!1)}return ee.delete(i),ee.delete(f),Dt}function So(i){return Wd(Ew(i,e,Ww),i+"")}function Id(i){return Uy(i,hr,Nd)}function Rd(i){return Uy(i,Yr,Aw)}var Ld=Cc?function(i){return Cc.get(i)}:Zd;function Dc(i){for(var f=i.name+"",M=pa[f],j=ln.call(pa,f)?M.length:0;j--;){var G=M[j],ee=G.func;if(ee==null||ee==i)return G.name}return f}function va(i){var f=ln.call(J,"placeholder")?J:i;return f.placeholder}function ft(){var i=J.iteratee||Xd;return i=i===Xd?Ky:i,arguments.length?i(arguments[0],arguments[1]):i}function Fc(i,f){var M=i.__data__;return yI(f)?M[typeof f=="string"?"string":"hash"]:M.map}function Od(i){for(var f=hr(i),M=f.length;M--;){var j=f[M],G=i[j];f[M]=[j,G,Tw(G)]}return f}function Os(i,f){var M=ie(i,f);return qy(M)?M:e}function hI(i){var f=ln.call(i,Ms),M=i[Ms];try{i[Ms]=e;var j=!0}catch{}var G=gc.call(i);return j&&(f?i[Ms]=M:delete i[Ms]),G}var Nd=ld?function(i){return i==null?[]:(i=Nt(i),_r(ld(i),function(f){return Iy.call(i,f)}))}:Jd,Aw=ld?function(i){for(var f=[];i;)$(f,Nd(i)),i=vc(i);return f}:Jd,Tr=Or;(cd&&Tr(new cd(new ArrayBuffer(1)))!=Ye||Xa&&Tr(new Xa)!=tt||ud&&Tr(ud.resolve())!=Yt||da&&Tr(new da)!=En||Qa&&Tr(new Qa)!=He)&&(Tr=function(i){var f=Or(i),M=f==pn?i.constructor:e,j=M?Ns(M):"";if(j)switch(j){case KM:return Ye;case GM:return tt;case YM:return Yt;case XM:return En;case QM:return He}return f});function dI(i,f,M){for(var j=-1,G=M.length;++j<G;){var ee=M[j],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":f-=le;break;case"take":f=$r(f,i+le);break;case"takeRight":i=sr(i,f-le);break}}return{start:i,end:f}}function pI(i){var f=i.match(Di);return f?f[1].split(bs):[]}function _w(i,f,M){f=Qo(f,i);for(var j=-1,G=f.length,ee=!1;++j<G;){var le=oo(f[j]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++j!=G?ee:(G=i==null?0:i.length,!!G&&Uc(G)&&Ao(le,G)&&(_t(i)||Ds(i)))}function gI(i){var f=i.length,M=new i.constructor(f);return f&&typeof i[0]=="string"&&ln.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function $w(i){return typeof i.constructor=="function"&&!sl(i)?ga(vc(i)):{}}function fI(i,f,M){var j=i.constructor;switch(f){case ze:return Td(i);case $e:case Te:return new j(+i);case Ye:return ZE(i,M);case pt:case kt:case Ct:case Ot:case Rt:case ut:case wt:case xn:case xr:return cw(i,M);case tt:return new j;case dt:case In:return new j(i);case gn:return JE(i);case En:return new j;case Xn:return eI(i)}}function mI(i,f){var M=f.length;if(!M)return i;var j=M-1;return f[j]=(M>1?"& ":"")+f[j],f=f.join(M>2?", ":" "),i.replace(Qi,`{
|
1471
|
+
/* [wrapped with `+f+`] */
|
1472
|
+
`)}function vI(i){return _t(i)||Ds(i)||!!(Ry&&i&&i[Ry])}function Ao(i,f){var M=typeof i;return f=f??U,!!f&&(M=="number"||M!="symbol"&&fn.test(i))&&i>-1&&i%1==0&&i<f}function Nr(i,f,M){if(!Tn(M))return!1;var j=typeof f;return(j=="number"?Gr(M)&&Ao(f,M.length):j=="string"&&f in M)?zi(M[f],i):!1}function Dd(i,f){if(_t(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||ci(i)?!0:Oi.test(i)||!ia.test(i)||f!=null&&i in Nt(f)}function yI(i){var f=typeof i;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?i!=="__proto__":i===null}function Fd(i){var f=Dc(i),M=J[f];if(typeof M!="function"||!(f in qt.prototype))return!1;if(i===M)return!0;var j=Ld(M);return!!j&&i===j[0]}function wI(i){return!!Ty&&Ty in i}var bI=Ts?_o:ep;function sl(i){var f=i&&i.constructor,M=typeof f=="function"&&f.prototype||Dn;return i===M}function Tw(i){return i===i&&!Tn(i)}function Mw(i,f){return function(M){return M==null?!1:M[i]===f&&(f!==e||i in Nt(M))}}function xI(i){var f=jc(i,function(j){return M.size===p&&M.clear(),j}),M=f.cache;return f}function CI(i,f){var M=i[1],j=f[1],G=M|j,ee=G<(d|w|R),le=j==R&&M==I||j==R&&M==L&&i[7].length<=f[8]||j==(R|L)&&f[7].length<=f[8]&&M==I;if(!(ee||le))return i;j&d&&(i[2]=f[2],G|=M&d?0:b);var de=f[3];if(de){var ve=i[3];i[3]=ve?hw(ve,de,f[4]):de,i[4]=ve?We(i[3],s):f[4]}return de=f[5],de&&(ve=i[5],i[5]=ve?dw(ve,de,f[6]):de,i[6]=ve?We(i[5],s):f[6]),de=f[7],de&&(i[7]=de),j&R&&(i[8]=i[8]==null?f[8]:$r(i[8],f[8])),i[9]==null&&(i[9]=f[9]),i[0]=f[0],i[1]=G,i}function kI(i){var f=[];if(i!=null)for(var M in Nt(i))f.push(M);return f}function SI(i){return gc.call(i)}function Ew(i,f,M){return f=sr(f===e?i.length-1:f,0),function(){for(var j=arguments,G=-1,ee=sr(j.length-f,0),le=xe(ee);++G<ee;)le[G]=j[f+G];G=-1;for(var de=xe(f+1);++G<f;)de[G]=j[G];return de[f]=M(le),ar(i,this,de)}}function Iw(i,f){return f.length<2?i:Ls(i,Si(f,0,-1))}function AI(i,f){for(var M=i.length,j=$r(f.length,M),G=Kr(i);j--;){var ee=f[j];i[j]=Ao(ee,M)?G[ee]:e}return i}function Pd(i,f){if(!(f==="constructor"&&typeof i[f]=="function")&&f!="__proto__")return i[f]}var Rw=Ow(tw),al=BM||function(i,f){return cn.setTimeout(i,f)},Wd=Ow(GE);function Lw(i,f,M){var j=f+"";return Wd(i,mI(j,_I(pI(j),M)))}function Ow(i){var f=0,M=0;return function(){var j=UM(),G=O-(j-M);if(M=j,G>0){if(++f>=P)return arguments[0]}else f=0;return i.apply(e,arguments)}}function Pc(i,f){var M=-1,j=i.length,G=j-1;for(f=f===e?j:f;++M<f;){var ee=xd(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=f,i}var Nw=xI(function(i){var f=[];return i.charCodeAt(0)===46&&f.push(""),i.replace(jn,function(M,j,G,ee){f.push(G?ee.replace(Ka,"$1"):j||M)}),f});function oo(i){if(typeof i=="string"||ci(i))return i;var f=i+"";return f=="0"&&1/i==-1/0?"-0":f}function Ns(i){if(i!=null){try{return pc.call(i)}catch{}try{return i+""}catch{}}return""}function _I(i,f){return fr(ae,function(M){var j="_."+M[0];f&M[1]&&!si(i,j)&&i.push(j)}),i.sort()}function Dw(i){if(i instanceof qt)return i.clone();var f=new Ci(i.__wrapped__,i.__chain__);return f.__actions__=Kr(i.__actions__),f.__index__=i.__index__,f.__values__=i.__values__,f}function $I(i,f,M){(M?Nr(i,f,M):f===e)?f=1:f=sr(Lt(f),0);var j=i==null?0:i.length;if(!j||f<1)return[];for(var G=0,ee=0,le=xe(bc(j/f));G<j;)le[ee++]=Si(i,G,G+=f);return le}function TI(i){for(var f=-1,M=i==null?0:i.length,j=0,G=[];++f<M;){var ee=i[f];ee&&(G[j++]=ee)}return G}function MI(){var i=arguments.length;if(!i)return[];for(var f=xe(i-1),M=arguments[0],j=i;j--;)f[j-1]=arguments[j];return $(_t(M)?Kr(M):[M],vr(f,1))}var EI=Bt(function(i,f){return Vn(i)?tl(i,vr(f,1,Vn,!0)):[]}),II=Bt(function(i,f){var M=Ai(f);return Vn(M)&&(M=e),Vn(i)?tl(i,vr(f,1,Vn,!0),ft(M,2)):[]}),RI=Bt(function(i,f){var M=Ai(f);return Vn(M)&&(M=e),Vn(i)?tl(i,vr(f,1,Vn,!0),e,M):[]});function LI(i,f,M){var j=i==null?0:i.length;return j?(f=M||f===e?1:Lt(f),Si(i,f<0?0:f,j)):[]}function OI(i,f,M){var j=i==null?0:i.length;return j?(f=M||f===e?1:Lt(f),f=j-f,Si(i,0,f<0?0:f)):[]}function NI(i,f){return i&&i.length?Ec(i,ft(f,3),!0,!0):[]}function DI(i,f){return i&&i.length?Ec(i,ft(f,3),!0):[]}function FI(i,f,M,j){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&Nr(i,f,M)&&(M=0,j=G),ME(i,f,M,j)):[]}function Fw(i,f,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Lt(M);return G<0&&(G=sr(j+G,0)),re(i,ft(f,3),G)}function Pw(i,f,M){var j=i==null?0:i.length;if(!j)return-1;var G=j-1;return M!==e&&(G=Lt(M),G=M<0?sr(j+G,0):$r(G,j-1)),re(i,ft(f,3),G,!0)}function Ww(i){var f=i==null?0:i.length;return f?vr(i,1):[]}function PI(i){var f=i==null?0:i.length;return f?vr(i,B):[]}function WI(i,f){var M=i==null?0:i.length;return M?(f=f===e?1:Lt(f),vr(i,f)):[]}function BI(i){for(var f=-1,M=i==null?0:i.length,j={};++f<M;){var G=i[f];j[G[0]]=G[1]}return j}function Bw(i){return i&&i.length?i[0]:e}function zI(i,f,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Lt(M);return G<0&&(G=sr(j+G,0)),se(i,f,G)}function jI(i){var f=i==null?0:i.length;return f?Si(i,0,-1):[]}var HI=Bt(function(i){var f=v(i,_d);return f.length&&f[0]===i[0]?md(f):[]}),UI=Bt(function(i){var f=Ai(i),M=v(i,_d);return f===Ai(M)?f=e:M.pop(),M.length&&M[0]===i[0]?md(M,ft(f,2)):[]}),VI=Bt(function(i){var f=Ai(i),M=v(i,_d);return f=typeof f=="function"?f:e,f&&M.pop(),M.length&&M[0]===i[0]?md(M,e,f):[]});function qI(i,f){return i==null?"":jM.call(i,f)}function Ai(i){var f=i==null?0:i.length;return f?i[f-1]:e}function KI(i,f,M){var j=i==null?0:i.length;if(!j)return-1;var G=j;return M!==e&&(G=Lt(M),G=G<0?sr(j+G,0):$r(G,j-1)),f===f?xt(i,f,G):re(i,Ce,G,!0)}function GI(i,f){return i&&i.length?Qy(i,Lt(f)):e}var YI=Bt(zw);function zw(i,f){return i&&i.length&&f&&f.length?bd(i,f):i}function XI(i,f,M){return i&&i.length&&f&&f.length?bd(i,f,ft(M,2)):i}function QI(i,f,M){return i&&i.length&&f&&f.length?bd(i,f,e,M):i}var ZI=So(function(i,f){var M=i==null?0:i.length,j=dd(i,f);return ew(i,v(f,function(G){return Ao(G,M)?+G:G}).sort(uw)),j});function JI(i,f){var M=[];if(!(i&&i.length))return M;var j=-1,G=[],ee=i.length;for(f=ft(f,3);++j<ee;){var le=i[j];f(le,j,i)&&(M.push(le),G.push(j))}return ew(i,G),M}function Bd(i){return i==null?i:qM.call(i)}function eR(i,f,M){var j=i==null?0:i.length;return j?(M&&typeof M!="number"&&Nr(i,f,M)?(f=0,M=j):(f=f==null?0:Lt(f),M=M===e?j:Lt(M)),Si(i,f,M)):[]}function tR(i,f){return Mc(i,f)}function nR(i,f,M){return kd(i,f,ft(M,2))}function rR(i,f){var M=i==null?0:i.length;if(M){var j=Mc(i,f);if(j<M&&zi(i[j],f))return j}return-1}function iR(i,f){return Mc(i,f,!0)}function oR(i,f,M){return kd(i,f,ft(M,2),!0)}function sR(i,f){var M=i==null?0:i.length;if(M){var j=Mc(i,f,!0)-1;if(zi(i[j],f))return j}return-1}function aR(i){return i&&i.length?nw(i):[]}function lR(i,f){return i&&i.length?nw(i,ft(f,2)):[]}function cR(i){var f=i==null?0:i.length;return f?Si(i,1,f):[]}function uR(i,f,M){return i&&i.length?(f=M||f===e?1:Lt(f),Si(i,0,f<0?0:f)):[]}function hR(i,f,M){var j=i==null?0:i.length;return j?(f=M||f===e?1:Lt(f),f=j-f,Si(i,f<0?0:f,j)):[]}function dR(i,f){return i&&i.length?Ec(i,ft(f,3),!1,!0):[]}function pR(i,f){return i&&i.length?Ec(i,ft(f,3)):[]}var gR=Bt(function(i){return Xo(vr(i,1,Vn,!0))}),fR=Bt(function(i){var f=Ai(i);return Vn(f)&&(f=e),Xo(vr(i,1,Vn,!0),ft(f,2))}),mR=Bt(function(i){var f=Ai(i);return f=typeof f=="function"?f:e,Xo(vr(i,1,Vn,!0),e,f)});function vR(i){return i&&i.length?Xo(i):[]}function yR(i,f){return i&&i.length?Xo(i,ft(f,2)):[]}function wR(i,f){return f=typeof f=="function"?f:e,i&&i.length?Xo(i,e,f):[]}function zd(i){if(!(i&&i.length))return[];var f=0;return i=_r(i,function(M){if(Vn(M))return f=sr(M.length,f),!0}),Qe(f,function(M){return v(i,we(M))})}function jw(i,f){if(!(i&&i.length))return[];var M=zd(i);return f==null?M:v(M,function(j){return ar(f,e,j)})}var bR=Bt(function(i,f){return Vn(i)?tl(i,f):[]}),xR=Bt(function(i){return Ad(_r(i,Vn))}),CR=Bt(function(i){var f=Ai(i);return Vn(f)&&(f=e),Ad(_r(i,Vn),ft(f,2))}),kR=Bt(function(i){var f=Ai(i);return f=typeof f=="function"?f:e,Ad(_r(i,Vn),e,f)}),SR=Bt(zd);function AR(i,f){return sw(i||[],f||[],el)}function _R(i,f){return sw(i||[],f||[],il)}var $R=Bt(function(i){var f=i.length,M=f>1?i[f-1]:e;return M=typeof M=="function"?(i.pop(),M):e,jw(i,M)});function Hw(i){var f=J(i);return f.__chain__=!0,f}function TR(i,f){return f(i),i}function Wc(i,f){return f(i)}var MR=So(function(i){var f=i.length,M=f?i[0]:0,j=this.__wrapped__,G=function(ee){return dd(ee,i)};return f>1||this.__actions__.length||!(j instanceof qt)||!Ao(M)?this.thru(G):(j=j.slice(M,+M+(f?1:0)),j.__actions__.push({func:Wc,args:[G],thisArg:e}),new Ci(j,this.__chain__).thru(function(ee){return f&&!ee.length&&ee.push(e),ee}))});function ER(){return Hw(this)}function IR(){return new Ci(this.value(),this.__chain__)}function RR(){this.__values__===e&&(this.__values__=rb(this.value()));var i=this.__index__>=this.__values__.length,f=i?e:this.__values__[this.__index__++];return{done:i,value:f}}function LR(){return this}function OR(i){for(var f,M=this;M instanceof Sc;){var j=Dw(M);j.__index__=0,j.__values__=e,f?G.__wrapped__=j:f=j;var G=j;M=M.__wrapped__}return G.__wrapped__=i,f}function NR(){var i=this.__wrapped__;if(i instanceof qt){var f=i;return this.__actions__.length&&(f=new qt(this)),f=f.reverse(),f.__actions__.push({func:Wc,args:[Bd],thisArg:e}),new Ci(f,this.__chain__)}return this.thru(Bd)}function DR(){return ow(this.__wrapped__,this.__actions__)}var FR=Ic(function(i,f,M){ln.call(i,M)?++i[M]:Co(i,M,1)});function PR(i,f,M){var j=_t(i)?mr:TE;return M&&Nr(i,f,M)&&(f=e),j(i,ft(f,3))}function WR(i,f){var M=_t(i)?_r:jy;return M(i,ft(f,3))}var BR=mw(Fw),zR=mw(Pw);function jR(i,f){return vr(Bc(i,f),1)}function HR(i,f){return vr(Bc(i,f),B)}function UR(i,f,M){return M=M===e?1:Lt(M),vr(Bc(i,f),M)}function Uw(i,f){var M=_t(i)?fr:Yo;return M(i,ft(f,3))}function Vw(i,f){var M=_t(i)?$s:zy;return M(i,ft(f,3))}var VR=Ic(function(i,f,M){ln.call(i,M)?i[M].push(f):Co(i,M,[f])});function qR(i,f,M,j){i=Gr(i)?i:wa(i),M=M&&!j?Lt(M):0;var G=i.length;return M<0&&(M=sr(G+M,0)),Vc(i)?M<=G&&i.indexOf(f,M)>-1:!!G&&se(i,f,M)>-1}var KR=Bt(function(i,f,M){var j=-1,G=typeof f=="function",ee=Gr(i)?xe(i.length):[];return Yo(i,function(le){ee[++j]=G?ar(f,le,M):nl(le,f,M)}),ee}),GR=Ic(function(i,f,M){Co(i,M,f)});function Bc(i,f){var M=_t(i)?v:Gy;return M(i,ft(f,3))}function YR(i,f,M,j){return i==null?[]:(_t(f)||(f=f==null?[]:[f]),M=j?e:M,_t(M)||(M=M==null?[]:[M]),Zy(i,f,M))}var XR=Ic(function(i,f,M){i[M?0:1].push(f)},function(){return[[],[]]});function QR(i,f,M){var j=_t(i)?k:Le,G=arguments.length<3;return j(i,ft(f,4),M,G,Yo)}function ZR(i,f,M){var j=_t(i)?D:Le,G=arguments.length<3;return j(i,ft(f,4),M,G,zy)}function JR(i,f){var M=_t(i)?_r:jy;return M(i,Hc(ft(f,3)))}function eL(i){var f=_t(i)?Fy:qE;return f(i)}function tL(i,f,M){(M?Nr(i,f,M):f===e)?f=1:f=Lt(f);var j=_t(i)?kE:KE;return j(i,f)}function nL(i){var f=_t(i)?SE:YE;return f(i)}function rL(i){if(i==null)return 0;if(Gr(i))return Vc(i)?zt(i):i.length;var f=Tr(i);return f==tt||f==En?i.size:yd(i).length}function iL(i,f,M){var j=_t(i)?W:XE;return M&&Nr(i,f,M)&&(f=e),j(i,ft(f,3))}var oL=Bt(function(i,f){if(i==null)return[];var M=f.length;return M>1&&Nr(i,f[0],f[1])?f=[]:M>2&&Nr(f[0],f[1],f[2])&&(f=[f[0]]),Zy(i,vr(f,1),[])}),zc=WM||function(){return cn.Date.now()};function sL(i,f){if(typeof f!="function")throw new un(y);return i=Lt(i),function(){if(--i<1)return f.apply(this,arguments)}}function qw(i,f,M){return f=M?e:f,f=i&&f==null?i.length:f,ko(i,R,e,e,e,e,f)}function Kw(i,f){var M;if(typeof f!="function")throw new un(y);return i=Lt(i),function(){return--i>0&&(M=f.apply(this,arguments)),i<=1&&(f=e),M}}var jd=Bt(function(i,f,M){var j=d;if(M.length){var G=We(M,va(jd));j|=S}return ko(i,j,f,M,G)}),Gw=Bt(function(i,f,M){var j=d|w;if(M.length){var G=We(M,va(Gw));j|=S}return ko(f,j,i,M,G)});function Yw(i,f,M){f=M?e:f;var j=ko(i,I,e,e,e,e,e,f);return j.placeholder=Yw.placeholder,j}function Xw(i,f,M){f=M?e:f;var j=ko(i,T,e,e,e,e,e,f);return j.placeholder=Xw.placeholder,j}function Qw(i,f,M){var j,G,ee,le,de,ve,Ie=0,Re=!1,De=!1,Ke=!0;if(typeof i!="function")throw new un(y);f=_i(f)||0,Tn(M)&&(Re=!!M.leading,De="maxWait"in M,ee=De?sr(_i(M.maxWait)||0,f):ee,Ke="trailing"in M?!!M.trailing:Ke);function nt(qn){var ji=j,To=G;return j=G=e,Ie=qn,le=i.apply(To,ji),le}function mt(qn){return Ie=qn,de=al(jt,f),Re?nt(qn):le}function Dt(qn){var ji=qn-ve,To=qn-Ie,mb=f-ji;return De?$r(mb,ee-To):mb}function vt(qn){var ji=qn-ve,To=qn-Ie;return ve===e||ji>=f||ji<0||De&&To>=ee}function jt(){var qn=zc();if(vt(qn))return Gt(qn);de=al(jt,Dt(qn))}function Gt(qn){return de=e,Ke&&j?nt(qn):(j=G=e,le)}function ui(){de!==e&&aw(de),Ie=0,j=ve=G=de=e}function Dr(){return de===e?le:Gt(zc())}function hi(){var qn=zc(),ji=vt(qn);if(j=arguments,G=this,ve=qn,ji){if(de===e)return mt(ve);if(De)return aw(de),de=al(jt,f),nt(ve)}return de===e&&(de=al(jt,f)),le}return hi.cancel=ui,hi.flush=Dr,hi}var aL=Bt(function(i,f){return By(i,1,f)}),lL=Bt(function(i,f,M){return By(i,_i(f)||0,M)});function cL(i){return ko(i,F)}function jc(i,f){if(typeof i!="function"||f!=null&&typeof f!="function")throw new un(y);var M=function(){var j=arguments,G=f?f.apply(this,j):j[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,j);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(jc.Cache||xo),M}jc.Cache=xo;function Hc(i){if(typeof i!="function")throw new un(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 uL(i){return Kw(2,i)}var hL=QE(function(i,f){f=f.length==1&&_t(f[0])?v(f[0],lt(ft())):v(vr(f,1),lt(ft()));var M=f.length;return Bt(function(j){for(var G=-1,ee=$r(j.length,M);++G<ee;)j[G]=f[G].call(this,j[G]);return ar(i,this,j)})}),Hd=Bt(function(i,f){var M=We(f,va(Hd));return ko(i,S,e,f,M)}),Zw=Bt(function(i,f){var M=We(f,va(Zw));return ko(i,C,e,f,M)}),dL=So(function(i,f){return ko(i,L,e,e,e,f)});function pL(i,f){if(typeof i!="function")throw new un(y);return f=f===e?f:Lt(f),Bt(i,f)}function gL(i,f){if(typeof i!="function")throw new un(y);return f=f==null?0:sr(Lt(f),0),Bt(function(M){var j=M[f],G=Zo(M,0,f);return j&&$(G,j),ar(i,this,G)})}function fL(i,f,M){var j=!0,G=!0;if(typeof i!="function")throw new un(y);return Tn(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Qw(i,f,{leading:j,maxWait:f,trailing:G})}function mL(i){return qw(i,1)}function vL(i,f){return Hd($d(f),i)}function yL(){if(!arguments.length)return[];var i=arguments[0];return _t(i)?i:[i]}function wL(i){return ki(i,l)}function bL(i,f){return f=typeof f=="function"?f:e,ki(i,l,f)}function xL(i){return ki(i,a|l)}function CL(i,f){return f=typeof f=="function"?f:e,ki(i,a|l,f)}function kL(i,f){return f==null||Wy(i,f,hr(f))}function zi(i,f){return i===f||i!==i&&f!==f}var SL=Nc(fd),AL=Nc(function(i,f){return i>=f}),Ds=Vy(function(){return arguments}())?Vy:function(i){return Fn(i)&&ln.call(i,"callee")&&!Iy.call(i,"callee")},_t=xe.isArray,_L=qr?lt(qr):OE;function Gr(i){return i!=null&&Uc(i.length)&&!_o(i)}function Vn(i){return Fn(i)&&Gr(i)}function $L(i){return i===!0||i===!1||Fn(i)&&Or(i)==$e}var Jo=zM||ep,TL=Ko?lt(Ko):NE;function ML(i){return Fn(i)&&i.nodeType===1&&!ll(i)}function EL(i){if(i==null)return!0;if(Gr(i)&&(_t(i)||typeof i=="string"||typeof i.splice=="function"||Jo(i)||ya(i)||Ds(i)))return!i.length;var f=Tr(i);if(f==tt||f==En)return!i.size;if(sl(i))return!yd(i).length;for(var M in i)if(ln.call(i,M))return!1;return!0}function IL(i,f){return rl(i,f)}function RL(i,f,M){M=typeof M=="function"?M:e;var j=M?M(i,f):e;return j===e?rl(i,f,e,M):!!j}function Ud(i){if(!Fn(i))return!1;var f=Or(i);return f==Ge||f==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!ll(i)}function LL(i){return typeof i=="number"&&Ly(i)}function _o(i){if(!Tn(i))return!1;var f=Or(i);return f==qe||f==ht||f==fe||f==pr}function Jw(i){return typeof i=="number"&&i==Lt(i)}function Uc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Tn(i){var f=typeof i;return i!=null&&(f=="object"||f=="function")}function Fn(i){return i!=null&&typeof i=="object"}var eb=Nn?lt(Nn):FE;function OL(i,f){return i===f||vd(i,f,Od(f))}function NL(i,f,M){return M=typeof M=="function"?M:e,vd(i,f,Od(f),M)}function DL(i){return tb(i)&&i!=+i}function FL(i){if(bI(i))throw new ct(g);return qy(i)}function PL(i){return i===null}function WL(i){return i==null}function tb(i){return typeof i=="number"||Fn(i)&&Or(i)==dt}function ll(i){if(!Fn(i)||Or(i)!=pn)return!1;var f=vc(i);if(f===null)return!0;var M=ln.call(f,"constructor")&&f.constructor;return typeof M=="function"&&M instanceof M&&pc.call(M)==NM}var Vd=ii?lt(ii):PE;function BL(i){return Jw(i)&&i>=-9007199254740991&&i<=U}var nb=oi?lt(oi):WE;function Vc(i){return typeof i=="string"||!_t(i)&&Fn(i)&&Or(i)==In}function ci(i){return typeof i=="symbol"||Fn(i)&&Or(i)==Xn}var ya=bi?lt(bi):BE;function zL(i){return i===e}function jL(i){return Fn(i)&&Tr(i)==He}function HL(i){return Fn(i)&&Or(i)==ke}var UL=Nc(wd),VL=Nc(function(i,f){return i<=f});function rb(i){if(!i)return[];if(Gr(i))return Vc(i)?At(i):Kr(i);if(Ya&&i[Ya])return be(i[Ya]());var f=Tr(i),M=f==tt?Me:f==En?Ve:wa;return M(i)}function $o(i){if(!i)return i===0?i:0;if(i=_i(i),i===B||i===-1/0){var f=i<0?-1:1;return f*K}return i===i?i:0}function Lt(i){var f=$o(i),M=f%1;return f===f?M?f-M:f:0}function ib(i){return i?Rs(Lt(i),0,te):0}function _i(i){if(typeof i=="number")return i;if(ci(i))return Z;if(Tn(i)){var f=typeof i.valueOf=="function"?i.valueOf():i;i=Tn(f)?f+"":f}if(typeof i!="string")return i===0?i:+i;i=vn(i);var M=sa.test(i);return M||Hn.test(i)?mn(i.slice(2),M?2:8):Ut.test(i)?Z:+i}function ob(i){return io(i,Yr(i))}function qL(i){return i?Rs(Lt(i),-9007199254740991,U):i===0?i:0}function sn(i){return i==null?"":li(i)}var KL=fa(function(i,f){if(sl(f)||Gr(f)){io(f,hr(f),i);return}for(var M in f)ln.call(f,M)&&el(i,M,f[M])}),sb=fa(function(i,f){io(f,Yr(f),i)}),qc=fa(function(i,f,M,j){io(f,Yr(f),i,j)}),GL=fa(function(i,f,M,j){io(f,hr(f),i,j)}),YL=So(dd);function XL(i,f){var M=ga(i);return f==null?M:Py(M,f)}var QL=Bt(function(i,f){i=Nt(i);var M=-1,j=f.length,G=j>2?f[2]:e;for(G&&Nr(f[0],f[1],G)&&(j=1);++M<j;)for(var ee=f[M],le=Yr(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Re=i[Ie];(Re===e||zi(Re,Dn[Ie])&&!ln.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),ZL=Bt(function(i){return i.push(e,kw),ar(ab,e,i)});function JL(i,f){return Q(i,ft(f,3),ro)}function eO(i,f){return Q(i,ft(f,3),gd)}function tO(i,f){return i==null?i:pd(i,ft(f,3),Yr)}function nO(i,f){return i==null?i:Hy(i,ft(f,3),Yr)}function rO(i,f){return i&&ro(i,ft(f,3))}function iO(i,f){return i&&gd(i,ft(f,3))}function oO(i){return i==null?[]:$c(i,hr(i))}function sO(i){return i==null?[]:$c(i,Yr(i))}function qd(i,f,M){var j=i==null?e:Ls(i,f);return j===e?M:j}function aO(i,f){return i!=null&&_w(i,f,EE)}function Kd(i,f){return i!=null&&_w(i,f,IE)}var lO=yw(function(i,f,M){f!=null&&typeof f.toString!="function"&&(f=gc.call(f)),i[f]=M},Yd(Xr)),cO=yw(function(i,f,M){f!=null&&typeof f.toString!="function"&&(f=gc.call(f)),ln.call(i,f)?i[f].push(M):i[f]=[M]},ft),uO=Bt(nl);function hr(i){return Gr(i)?Dy(i):yd(i)}function Yr(i){return Gr(i)?Dy(i,!0):zE(i)}function hO(i,f){var M={};return f=ft(f,3),ro(i,function(j,G,ee){Co(M,f(j,G,ee),j)}),M}function dO(i,f){var M={};return f=ft(f,3),ro(i,function(j,G,ee){Co(M,G,f(j,G,ee))}),M}var pO=fa(function(i,f,M){Tc(i,f,M)}),ab=fa(function(i,f,M,j){Tc(i,f,M,j)}),gO=So(function(i,f){var M={};if(i==null)return M;var j=!1;f=v(f,function(ee){return ee=Qo(ee,i),j||(j=ee.length>1),ee}),io(i,Rd(i),M),j&&(M=ki(M,a|u|l,lI));for(var G=f.length;G--;)Sd(M,f[G]);return M});function fO(i,f){return lb(i,Hc(ft(f)))}var mO=So(function(i,f){return i==null?{}:HE(i,f)});function lb(i,f){if(i==null)return{};var M=v(Rd(i),function(j){return[j]});return f=ft(f),Jy(i,M,function(j,G){return f(j,G[0])})}function vO(i,f,M){f=Qo(f,i);var j=-1,G=f.length;for(G||(G=1,i=e);++j<G;){var ee=i==null?e:i[oo(f[j])];ee===e&&(j=G,ee=M),i=_o(ee)?ee.call(i):ee}return i}function yO(i,f,M){return i==null?i:il(i,f,M)}function wO(i,f,M,j){return j=typeof j=="function"?j:e,i==null?i:il(i,f,M,j)}var cb=xw(hr),ub=xw(Yr);function bO(i,f,M){var j=_t(i),G=j||Jo(i)||ya(i);if(f=ft(f,4),M==null){var ee=i&&i.constructor;G?M=j?new ee:[]:Tn(i)?M=_o(ee)?ga(vc(i)):{}:M={}}return(G?fr:ro)(i,function(le,de,ve){return f(M,le,de,ve)}),M}function xO(i,f){return i==null?!0:Sd(i,f)}function CO(i,f,M){return i==null?i:iw(i,f,$d(M))}function kO(i,f,M,j){return j=typeof j=="function"?j:e,i==null?i:iw(i,f,$d(M),j)}function wa(i){return i==null?[]:Cn(i,hr(i))}function SO(i){return i==null?[]:Cn(i,Yr(i))}function AO(i,f,M){return M===e&&(M=f,f=e),M!==e&&(M=_i(M),M=M===M?M:0),f!==e&&(f=_i(f),f=f===f?f:0),Rs(_i(i),f,M)}function _O(i,f,M){return f=$o(f),M===e?(M=f,f=0):M=$o(M),i=_i(i),RE(i,f,M)}function $O(i,f,M){if(M&&typeof M!="boolean"&&Nr(i,f,M)&&(f=M=e),M===e&&(typeof f=="boolean"?(M=f,f=e):typeof i=="boolean"&&(M=i,i=e)),i===e&&f===e?(i=0,f=1):(i=$o(i),f===e?(f=i,i=0):f=$o(f)),i>f){var j=i;i=f,f=j}if(M||i%1||f%1){var G=Oy();return $r(i+G*(f-i+Be("1e-"+((G+"").length-1))),f)}return xd(i,f)}var TO=ma(function(i,f,M){return f=f.toLowerCase(),i+(M?hb(f):f)});function hb(i){return Gd(sn(i).toLowerCase())}function db(i){return i=sn(i),i&&i.replace(Rn,kn).replace(vo,"")}function MO(i,f,M){i=sn(i),f=li(f);var j=i.length;M=M===e?j:Rs(Lt(M),0,j);var G=M;return M-=f.length,M>=0&&i.slice(M,G)==f}function EO(i){return i=sn(i),i&&Ua.test(i)?i.replace(co,V):i}function IO(i){return i=sn(i),i&&Ni.test(i)?i.replace(Cr,"\\$&"):i}var RO=ma(function(i,f,M){return i+(M?"-":"")+f.toLowerCase()}),LO=ma(function(i,f,M){return i+(M?" ":"")+f.toLowerCase()}),OO=fw("toLowerCase");function NO(i,f,M){i=sn(i),f=Lt(f);var j=f?zt(i):0;if(!f||j>=f)return i;var G=(f-j)/2;return Oc(xc(G),M)+i+Oc(bc(G),M)}function DO(i,f,M){i=sn(i),f=Lt(f);var j=f?zt(i):0;return f&&j<f?i+Oc(f-j,M):i}function FO(i,f,M){i=sn(i),f=Lt(f);var j=f?zt(i):0;return f&&j<f?Oc(f-j,M)+i:i}function PO(i,f,M){return M||f==null?f=0:f&&(f=+f),VM(sn(i).replace(_n,""),f||0)}function WO(i,f,M){return(M?Nr(i,f,M):f===e)?f=1:f=Lt(f),Cd(sn(i),f)}function BO(){var i=arguments,f=sn(i[0]);return i.length<3?f:f.replace(i[1],i[2])}var zO=ma(function(i,f,M){return i+(M?"_":"")+f.toLowerCase()});function jO(i,f,M){return M&&typeof M!="number"&&Nr(i,f,M)&&(f=M=e),M=M===e?te:M>>>0,M?(i=sn(i),i&&(typeof f=="string"||f!=null&&!Vd(f))&&(f=li(f),!f&&oe(i))?Zo(At(i),0,M):i.split(f,M)):[]}var HO=ma(function(i,f,M){return i+(M?" ":"")+Gd(f)});function UO(i,f,M){return i=sn(i),M=M==null?0:Rs(Lt(M),0,i.length),f=li(f),i.slice(M,M+f.length)==f}function VO(i,f,M){var j=J.templateSettings;M&&Nr(i,f,M)&&(f=e),i=sn(i),f=qc({},f,j,Cw);var G=qc({},f.imports,j.imports,Cw),ee=hr(G),le=Cn(G,ee),de,ve,Ie=0,Re=f.interpolate||gi,De="__p += '",Ke=Lr((f.escape||gi).source+"|"+Re.source+"|"+(Re===ws?Fi:gi).source+"|"+(f.evaluate||gi).source+"|$","g"),nt="//# sourceURL="+(ln.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++no+"]")+`
|
1473
|
+
`;i.replace(Ke,function(vt,jt,Gt,ui,Dr,hi){return Gt||(Gt=ui),De+=i.slice(Ie,hi).replace(Ar,X),jt&&(de=!0,De+=`' +
|
1474
|
+
__e(`+jt+`) +
|
1475
|
+
'`),Dr&&(ve=!0,De+=`';
|
1476
|
+
`+Dr+`;
|
1477
|
+
__p += '`),Gt&&(De+=`' +
|
1478
|
+
((__t = (`+Gt+`)) == null ? '' : __t) +
|
1479
|
+
'`),Ie=hi+vt.length,vt}),De+=`';
|
1480
|
+
`;var mt=ln.call(f,"variable")&&f.variable;if(!mt)De=`with (obj) {
|
1481
|
+
`+De+`
|
1482
|
+
}
|
1483
|
+
`;else if(qa.test(mt))throw new ct(x);De=(ve?De.replace(Hr,""):De).replace(Li,"$1").replace(lo,"$1;"),De="function("+(mt||"obj")+`) {
|
1484
|
+
`+(mt?"":`obj || (obj = {});
|
1485
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ve?`, __j = Array.prototype.join;
|
1486
|
+
function print() { __p += __j.call(arguments, '') }
|
1487
|
+
`:`;
|
1488
|
+
`)+De+`return __p
|
1489
|
+
}`;var Dt=gb(function(){return It(ee,nt+"return "+De).apply(e,le)});if(Dt.source=De,Ud(Dt))throw Dt;return Dt}function qO(i){return sn(i).toLowerCase()}function KO(i){return sn(i).toUpperCase()}function GO(i,f,M){if(i=sn(i),i&&(M||f===e))return vn(i);if(!i||!(f=li(f)))return i;var j=At(i),G=At(f),ee=Et(j,G),le=Zn(j,G)+1;return Zo(j,ee,le).join("")}function YO(i,f,M){if(i=sn(i),i&&(M||f===e))return i.slice(0,Wt(i)+1);if(!i||!(f=li(f)))return i;var j=At(i),G=Zn(j,At(f))+1;return Zo(j,0,G).join("")}function XO(i,f,M){if(i=sn(i),i&&(M||f===e))return i.replace(_n,"");if(!i||!(f=li(f)))return i;var j=At(i),G=Et(j,At(f));return Zo(j,G).join("")}function QO(i,f){var M=E,j=H;if(Tn(f)){var G="separator"in f?f.separator:G;M="length"in f?Lt(f.length):M,j="omission"in f?li(f.omission):j}i=sn(i);var ee=i.length;if(oe(i)){var le=At(i);ee=le.length}if(M>=ee)return i;var de=M-zt(j);if(de<1)return j;var ve=le?Zo(le,0,de).join(""):i.slice(0,de);if(G===e)return ve+j;if(le&&(de+=ve.length-de),Vd(G)){if(i.slice(de).search(G)){var Ie,Re=ve;for(G.global||(G=Lr(G.source,sn(ni.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Re);)var De=Ie.index;ve=ve.slice(0,De===e?de:De)}}else if(i.indexOf(li(G),de)!=de){var Ke=ve.lastIndexOf(G);Ke>-1&&(ve=ve.slice(0,Ke))}return ve+j}function ZO(i){return i=sn(i),i&&Do.test(i)?i.replace(gr,gt):i}var JO=ma(function(i,f,M){return i+(M?" ":"")+f.toUpperCase()}),Gd=fw("toUpperCase");function pb(i,f,M){return i=sn(i),f=M?e:f,f===e?ge(i)?Sn(i):Y(i):i.match(f)||[]}var gb=Bt(function(i,f){try{return ar(i,e,f)}catch(M){return Ud(M)?M:new ct(M)}}),e2=So(function(i,f){return fr(f,function(M){M=oo(M),Co(i,M,jd(i[M],i))}),i});function t2(i){var f=i==null?0:i.length,M=ft();return i=f?v(i,function(j){if(typeof j[1]!="function")throw new un(y);return[M(j[0]),j[1]]}):[],Bt(function(j){for(var G=-1;++G<f;){var ee=i[G];if(ar(ee[0],this,j))return ar(ee[1],this,j)}})}function n2(i){return $E(ki(i,a))}function Yd(i){return function(){return i}}function r2(i,f){return i==null||i!==i?f:i}var i2=vw(),o2=vw(!0);function Xr(i){return i}function Xd(i){return Ky(typeof i=="function"?i:ki(i,a))}function s2(i){return Yy(ki(i,a))}function a2(i,f){return Xy(i,ki(f,a))}var l2=Bt(function(i,f){return function(M){return nl(M,i,f)}}),c2=Bt(function(i,f){return function(M){return nl(i,M,f)}});function Qd(i,f,M){var j=hr(f),G=$c(f,j);M==null&&!(Tn(f)&&(G.length||!j.length))&&(M=f,f=i,i=this,G=$c(f,hr(f)));var ee=!(Tn(M)&&"chain"in M)||!!M.chain,le=_o(i);return fr(G,function(de){var ve=f[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Re=i(this.__wrapped__),De=Re.__actions__=Kr(this.__actions__);return De.push({func:ve,args:arguments,thisArg:i}),Re.__chain__=Ie,Re}return ve.apply(i,$([this.value()],arguments))})}),i}function u2(){return cn._===this&&(cn._=DM),this}function Zd(){}function h2(i){return i=Lt(i),Bt(function(f){return Qy(f,i)})}var d2=Md(v),p2=Md(mr),g2=Md(W);function fb(i){return Dd(i)?we(oo(i)):UE(i)}function f2(i){return function(f){return i==null?e:Ls(i,f)}}var m2=ww(),v2=ww(!0);function Jd(){return[]}function ep(){return!1}function y2(){return{}}function w2(){return""}function b2(){return!0}function x2(i,f){if(i=Lt(i),i<1||i>U)return[];var M=te,j=$r(i,te);f=ft(f),i-=te;for(var G=Qe(j,f);++M<i;)f(M);return G}function C2(i){return _t(i)?v(i,oo):ci(i)?[i]:Kr(Nw(sn(i)))}function k2(i){var f=++OM;return sn(i)+f}var S2=Lc(function(i,f){return i+f},0),A2=Ed("ceil"),_2=Lc(function(i,f){return i/f},1),$2=Ed("floor");function T2(i){return i&&i.length?_c(i,Xr,fd):e}function M2(i,f){return i&&i.length?_c(i,ft(f,2),fd):e}function E2(i){return me(i,Xr)}function I2(i,f){return me(i,ft(f,2))}function R2(i){return i&&i.length?_c(i,Xr,wd):e}function L2(i,f){return i&&i.length?_c(i,ft(f,2),wd):e}var O2=Lc(function(i,f){return i*f},1),N2=Ed("round"),D2=Lc(function(i,f){return i-f},0);function F2(i){return i&&i.length?st(i,Xr):0}function P2(i,f){return i&&i.length?st(i,ft(f,2)):0}return J.after=sL,J.ary=qw,J.assign=KL,J.assignIn=sb,J.assignInWith=qc,J.assignWith=GL,J.at=YL,J.before=Kw,J.bind=jd,J.bindAll=e2,J.bindKey=Gw,J.castArray=yL,J.chain=Hw,J.chunk=$I,J.compact=TI,J.concat=MI,J.cond=t2,J.conforms=n2,J.constant=Yd,J.countBy=FR,J.create=XL,J.curry=Yw,J.curryRight=Xw,J.debounce=Qw,J.defaults=QL,J.defaultsDeep=ZL,J.defer=aL,J.delay=lL,J.difference=EI,J.differenceBy=II,J.differenceWith=RI,J.drop=LI,J.dropRight=OI,J.dropRightWhile=NI,J.dropWhile=DI,J.fill=FI,J.filter=WR,J.flatMap=jR,J.flatMapDeep=HR,J.flatMapDepth=UR,J.flatten=Ww,J.flattenDeep=PI,J.flattenDepth=WI,J.flip=cL,J.flow=i2,J.flowRight=o2,J.fromPairs=BI,J.functions=oO,J.functionsIn=sO,J.groupBy=VR,J.initial=jI,J.intersection=HI,J.intersectionBy=UI,J.intersectionWith=VI,J.invert=lO,J.invertBy=cO,J.invokeMap=KR,J.iteratee=Xd,J.keyBy=GR,J.keys=hr,J.keysIn=Yr,J.map=Bc,J.mapKeys=hO,J.mapValues=dO,J.matches=s2,J.matchesProperty=a2,J.memoize=jc,J.merge=pO,J.mergeWith=ab,J.method=l2,J.methodOf=c2,J.mixin=Qd,J.negate=Hc,J.nthArg=h2,J.omit=gO,J.omitBy=fO,J.once=uL,J.orderBy=YR,J.over=d2,J.overArgs=hL,J.overEvery=p2,J.overSome=g2,J.partial=Hd,J.partialRight=Zw,J.partition=XR,J.pick=mO,J.pickBy=lb,J.property=fb,J.propertyOf=f2,J.pull=YI,J.pullAll=zw,J.pullAllBy=XI,J.pullAllWith=QI,J.pullAt=ZI,J.range=m2,J.rangeRight=v2,J.rearg=dL,J.reject=JR,J.remove=JI,J.rest=pL,J.reverse=Bd,J.sampleSize=tL,J.set=yO,J.setWith=wO,J.shuffle=nL,J.slice=eR,J.sortBy=oL,J.sortedUniq=aR,J.sortedUniqBy=lR,J.split=jO,J.spread=gL,J.tail=cR,J.take=uR,J.takeRight=hR,J.takeRightWhile=dR,J.takeWhile=pR,J.tap=TR,J.throttle=fL,J.thru=Wc,J.toArray=rb,J.toPairs=cb,J.toPairsIn=ub,J.toPath=C2,J.toPlainObject=ob,J.transform=bO,J.unary=mL,J.union=gR,J.unionBy=fR,J.unionWith=mR,J.uniq=vR,J.uniqBy=yR,J.uniqWith=wR,J.unset=xO,J.unzip=zd,J.unzipWith=jw,J.update=CO,J.updateWith=kO,J.values=wa,J.valuesIn=SO,J.without=bR,J.words=pb,J.wrap=vL,J.xor=xR,J.xorBy=CR,J.xorWith=kR,J.zip=SR,J.zipObject=AR,J.zipObjectDeep=_R,J.zipWith=$R,J.entries=cb,J.entriesIn=ub,J.extend=sb,J.extendWith=qc,Qd(J,J),J.add=S2,J.attempt=gb,J.camelCase=TO,J.capitalize=hb,J.ceil=A2,J.clamp=AO,J.clone=wL,J.cloneDeep=xL,J.cloneDeepWith=CL,J.cloneWith=bL,J.conformsTo=kL,J.deburr=db,J.defaultTo=r2,J.divide=_2,J.endsWith=MO,J.eq=zi,J.escape=EO,J.escapeRegExp=IO,J.every=PR,J.find=BR,J.findIndex=Fw,J.findKey=JL,J.findLast=zR,J.findLastIndex=Pw,J.findLastKey=eO,J.floor=$2,J.forEach=Uw,J.forEachRight=Vw,J.forIn=tO,J.forInRight=nO,J.forOwn=rO,J.forOwnRight=iO,J.get=qd,J.gt=SL,J.gte=AL,J.has=aO,J.hasIn=Kd,J.head=Bw,J.identity=Xr,J.includes=qR,J.indexOf=zI,J.inRange=_O,J.invoke=uO,J.isArguments=Ds,J.isArray=_t,J.isArrayBuffer=_L,J.isArrayLike=Gr,J.isArrayLikeObject=Vn,J.isBoolean=$L,J.isBuffer=Jo,J.isDate=TL,J.isElement=ML,J.isEmpty=EL,J.isEqual=IL,J.isEqualWith=RL,J.isError=Ud,J.isFinite=LL,J.isFunction=_o,J.isInteger=Jw,J.isLength=Uc,J.isMap=eb,J.isMatch=OL,J.isMatchWith=NL,J.isNaN=DL,J.isNative=FL,J.isNil=WL,J.isNull=PL,J.isNumber=tb,J.isObject=Tn,J.isObjectLike=Fn,J.isPlainObject=ll,J.isRegExp=Vd,J.isSafeInteger=BL,J.isSet=nb,J.isString=Vc,J.isSymbol=ci,J.isTypedArray=ya,J.isUndefined=zL,J.isWeakMap=jL,J.isWeakSet=HL,J.join=qI,J.kebabCase=RO,J.last=Ai,J.lastIndexOf=KI,J.lowerCase=LO,J.lowerFirst=OO,J.lt=UL,J.lte=VL,J.max=T2,J.maxBy=M2,J.mean=E2,J.meanBy=I2,J.min=R2,J.minBy=L2,J.stubArray=Jd,J.stubFalse=ep,J.stubObject=y2,J.stubString=w2,J.stubTrue=b2,J.multiply=O2,J.nth=GI,J.noConflict=u2,J.noop=Zd,J.now=zc,J.pad=NO,J.padEnd=DO,J.padStart=FO,J.parseInt=PO,J.random=$O,J.reduce=QR,J.reduceRight=ZR,J.repeat=WO,J.replace=BO,J.result=vO,J.round=N2,J.runInContext=pe,J.sample=eL,J.size=rL,J.snakeCase=zO,J.some=iL,J.sortedIndex=tR,J.sortedIndexBy=nR,J.sortedIndexOf=rR,J.sortedLastIndex=iR,J.sortedLastIndexBy=oR,J.sortedLastIndexOf=sR,J.startCase=HO,J.startsWith=UO,J.subtract=D2,J.sum=F2,J.sumBy=P2,J.template=VO,J.times=x2,J.toFinite=$o,J.toInteger=Lt,J.toLength=ib,J.toLower=qO,J.toNumber=_i,J.toSafeInteger=qL,J.toString=sn,J.toUpper=KO,J.trim=GO,J.trimEnd=YO,J.trimStart=XO,J.truncate=QO,J.unescape=ZO,J.uniqueId=k2,J.upperCase=JO,J.upperFirst=Gd,J.each=Uw,J.eachRight=Vw,J.first=Bw,Qd(J,function(){var i={};return ro(J,function(f,M){ln.call(J.prototype,M)||(i[M]=f)}),i}(),{chain:!1}),J.VERSION=r,fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),fr(["drop","take"],function(i,f){qt.prototype[i]=function(M){M=M===e?1:sr(Lt(M),0);var j=this.__filtered__&&!f?new qt(this):this.clone();return j.__filtered__?j.__takeCount__=$r(M,j.__takeCount__):j.__views__.push({size:$r(M,te),type:i+(j.__dir__<0?"Right":"")}),j},qt.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),fr(["filter","map","takeWhile"],function(i,f){var M=f+1,j=M==_||M==N;qt.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:ft(G,3),type:M}),ee.__filtered__=ee.__filtered__||j,ee}}),fr(["head","last"],function(i,f){var M="take"+(f?"Right":"");qt.prototype[i]=function(){return this[M](1).value()[0]}}),fr(["initial","tail"],function(i,f){var M="drop"+(f?"":"Right");qt.prototype[i]=function(){return this.__filtered__?new qt(this):this[M](1)}}),qt.prototype.compact=function(){return this.filter(Xr)},qt.prototype.find=function(i){return this.filter(i).head()},qt.prototype.findLast=function(i){return this.reverse().find(i)},qt.prototype.invokeMap=Bt(function(i,f){return typeof i=="function"?new qt(this):this.map(function(M){return nl(M,i,f)})}),qt.prototype.reject=function(i){return this.filter(Hc(ft(i)))},qt.prototype.slice=function(i,f){i=Lt(i);var M=this;return M.__filtered__&&(i>0||f<0)?new qt(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),f!==e&&(f=Lt(f),M=f<0?M.dropRight(-f):M.take(f-i)),M)},qt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},qt.prototype.toArray=function(){return this.take(te)},ro(qt.prototype,function(i,f){var M=/^(?:filter|find|map|reject)|While$/.test(f),j=/^(?:head|last)$/.test(f),G=J[j?"take"+(f=="last"?"Right":""):f],ee=j||/^find/.test(f);G&&(J.prototype[f]=function(){var le=this.__wrapped__,de=j?[1]:arguments,ve=le instanceof qt,Ie=de[0],Re=ve||_t(le),De=function(jt){var Gt=G.apply(J,$([jt],de));return j&&Ke?Gt[0]:Gt};Re&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Re=!1);var Ke=this.__chain__,nt=!!this.__actions__.length,mt=ee&&!Ke,Dt=ve&&!nt;if(!ee&&Re){le=Dt?le:new qt(this);var vt=i.apply(le,de);return vt.__actions__.push({func:Wc,args:[De],thisArg:e}),new Ci(vt,Ke)}return mt&&Dt?i.apply(this,de):(vt=this.thru(De),mt?j?vt.value()[0]:vt.value():vt)})}),fr(["pop","push","shift","sort","splice","unshift"],function(i){var f=ur[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",j=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(j&&!this.__chain__){var ee=this.value();return f.apply(_t(ee)?ee:[],G)}return this[M](function(le){return f.apply(_t(le)?le:[],G)})}}),ro(qt.prototype,function(i,f){var M=J[f];if(M){var j=M.name+"";ln.call(pa,j)||(pa[j]=[]),pa[j].push({name:f,func:M})}}),pa[Rc(e,w).name]=[{name:"wrapper",func:e}],qt.prototype.clone=ZM,qt.prototype.reverse=JM,qt.prototype.value=eE,J.prototype.at=MR,J.prototype.chain=ER,J.prototype.commit=IR,J.prototype.next=RR,J.prototype.plant=OR,J.prototype.reverse=NR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=DR,J.prototype.first=J.prototype.head,Ya&&(J.prototype[Ya]=LR),J},Kt=Jn();Qn?((Qn.exports=Kt)._=Kt,wn._=Kt):cn._=Kt}).call(PC)}(Il,Il.exports)),Il.exports}var BC=Pn("I",WC());Pn("O",pl(BC)).debounce(function(){this.rebuildDisplayText()},300);var tf={exports:{}},nf;function zC(){return nf||(nf=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(tf)),tf.exports}zC();const jC=!0,tr="u-",HC="uplot",UC=tr+"hz",VC=tr+"vt",qC=tr+"title",KC=tr+"wrap",GC=tr+"under",YC=tr+"over",XC=tr+"axis",us=tr+"off",QC=tr+"select",ZC=tr+"cursor-x",JC=tr+"cursor-y",ek=tr+"cursor-pt",tk=tr+"legend",nk=tr+"live",rk=tr+"inline",ik=tr+"series",ok=tr+"marker",rf=tr+"label",sk=tr+"value",Ea="width",Ia="height",Ra="top",of="bottom",Vs="left",_u="right",$u="#000",sf=$u+"0",Tu="mousemove",af="mousedown",Mu="mouseup",lf="mouseenter",cf="mouseleave",uf="dblclick",ak="resize",lk="scroll",hf="change",Rl="dppxchange",Eu="--",qs=typeof window<"u",Iu=qs?document:null,Ks=qs?window:null,ck=qs?navigator:null;let Jt,Ll;function Ru(){let n=devicePixelRatio;Jt!=n&&(Jt=n,Ll&&Nu(hf,Ll,Ru),Ll=matchMedia(`(min-resolution: ${Jt-.001}dppx) and (max-resolution: ${Jt+.001}dppx)`),hs(hf,Ll,Ru),Ks.dispatchEvent(new CustomEvent(Rl)))}function Zr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Lu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function yn(n,t,e){n.style[t]=e+"px"}function Mi(n,t,e,r){let m=Iu.createElement(n);return t!=null&&Zr(m,t),e!=null&&e.insertBefore(m,r),m}function di(n,t){return Mi("div",n,t)}const df=new WeakMap;function Ki(n,t,e,r,m){let g="translate("+t+"px,"+e+"px)",y=df.get(n);g!=y&&(n.style.transform=g,df.set(n,g),t<0||e<0||t>r||e>m?Zr(n,us):Lu(n,us))}const pf=new WeakMap;function gf(n,t,e){let r=t+e,m=pf.get(n);r!=m&&(pf.set(n,r),n.style.background=t,n.style.borderColor=e)}const ff=new WeakMap;function mf(n,t,e,r){let m=t+""+e,g=ff.get(n);m!=g&&(ff.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 Ou={passive:!0},uk={...Ou,capture:!0};function hs(n,t,e,r){t.addEventListener(n,e,r?uk:Ou)}function Nu(n,t,e,r){t.removeEventListener(n,e,Ou)}qs&&Ru();function Ei(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:ei((e+r)/2),t[m]<n?e=m:r=m;return n-t[e]<=t[r]-n?e:r}function vf(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 yf=n=>n!=null,wf=n=>n!=null&&n>0,Ol=vf(yf),hk=vf(wf);function dk(n,t,e,r=0,m=!1){let g=m?hk:Ol,y=m?wf:yf;[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??dr,h??-1/0]}function Nl(n,t,e,r){let m=Cf(n),g=Cf(t);n==t&&(m==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?so:kf,x=m==1?ei:pi,h=g==1?pi:ei,p=x(y(nr(n))),s=h(y(nr(t))),a=Gs(e,p),u=Gs(e,s);return e==10&&(p<0&&(a=hn(a,-p)),s<0&&(u=hn(u,-s))),r||e==2?(n=a*m,t=u*g):(n=Ef(n,a),t=Pl(t,u)),[n,t]}function Du(n,t,e,r){let m=Nl(n,t,e,r);return n==0&&(m[0]=0),t==0&&(m[1]=0),m}const Fu=.1,bf={mode:3,pad:Fu},La={pad:0,soft:null,mode:0},pk={min:La,max:La};function Dl(n,t,e,r){return Wl(e)?xf(n,t,e):(La.pad=e,La.soft=r?0:null,La.mode=r?3:0,xf(n,t,pk))}function Qt(n,t){return n??t}function gk(n,t,e){for(t=Qt(t,0),e=Qt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function xf(n,t,e){let r=e.min,m=e.max,g=Qt(r.pad,0),y=Qt(m.pad,0),x=Qt(r.hard,-1/0),h=Qt(m.hard,dr),p=Qt(r.soft,dr),s=Qt(m.soft,-1/0),a=Qt(r.mode,0),u=Qt(m.mode,0),l=t-n,o=so(l),c=Mr(nr(n),nr(t)),d=so(c),w=nr(d-o);(l<1e-24||w>10)&&(l=0,(n==0||t==0)&&(l=1e-24,a==2&&p!=dr&&(g=0),u==2&&s!=-1/0&&(y=0)));let b=l||c||1e3,I=so(b),T=Gs(10,ei(I)),S=b*(l==0?n==0?.1:1:g),C=hn(Ef(n-S,T/10),24),R=n>=p&&(a==1||a==3&&C<=p||a==2&&C>=p)?p:dr,L=Mr(x,C<R&&n>=R?R:Ii(R,C)),F=b*(l==0?t==0?.1:1:y),E=hn(Pl(t+F,T/10),24),H=t<=s&&(u==1||u==3&&E>=s||u==2&&E<=s)?s:-1/0,P=Ii(h,E>H&&t<=H?H:Mr(H,E));return L==P&&L==0&&(P=100),[L,P]}const fk=new Intl.NumberFormat(qs?ck.language:"en-US"),Pu=n=>fk.format(n),Jr=Math,Fl=Jr.PI,nr=Jr.abs,ei=Jr.floor,rr=Jr.round,pi=Jr.ceil,Ii=Jr.min,Mr=Jr.max,Gs=Jr.pow,Cf=Jr.sign,so=Jr.log10,kf=Jr.log2,mk=(n,t=1)=>Jr.sinh(n)*t,Wu=(n,t=1)=>Jr.asinh(n/t),dr=1/0;function Sf(n){return(so((n^n>>31)-(n>>31))|0)+1}function Bu(n,t,e){return Ii(Mr(n,t),e)}function Af(n){return typeof n=="function"}function Ht(n){return Af(n)?n:()=>n}const vk=()=>{},_f=n=>n,$f=(n,t)=>t,yk=n=>null,Tf=n=>!0,Mf=(n,t)=>n==t,wk=/\.\d*?(?=9{6,}|0{6,})/gm,ds=n=>{if(Rf(n)||Oo.has(n))return n;const t=`${n}`,e=t.match(wk);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 hn(n,r)};function ps(n,t){return ds(hn(ds(n/t))*t)}function Pl(n,t){return ds(pi(ds(n/t))*t)}function Ef(n,t){return ds(ei(ds(n/t))*t)}function hn(n,t=0){if(Rf(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return rr(r)/e}const Oo=new Map;function If(n){return((""+n).split(".")[1]||"").length}function Oa(n,t,e,r){let m=[],g=r.map(If);for(let y=t;y<e;y++){let x=nr(y),h=hn(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:hn(s,a);m.push(u),Oo.set(u,a)}}return m}const Na={},zu=[],Ys=[null,null],No=Array.isArray,Rf=Number.isInteger,bk=n=>n===void 0;function Lf(n){return typeof n=="string"}function Wl(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function xk(n){return n!=null&&typeof n=="object"}const Ck=Object.getPrototypeOf(Uint8Array),Of="__proto__";function Xs(n,t=Wl){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 Ck)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Of&&(e[r]=Xs(n[r],t))}else e=n;return e}function Gn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let m in r)m!=Of&&(Wl(n[m])?Gn(n[m],Xs(r[m])):n[m]=Xs(r[m]))}return n}const kk=0,Sk=1,Ak=2;function _k(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 $k(n,t){if(Ek(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return Ik(y[0])||(y=Mk(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]:Sk,l=[];for(let o=0;o<s.length;o++){let c=s[o],d=g.get(h[o]);c===null?u!=kk&&(a[d]=c,u==Ak&&l.push(d)):a[d]=c}_k(a,l,m),r.push(a)}}return r}const Tk=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function Mk(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 Ek(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 Ik(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=Mr(1,ei((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 Nf=["January","February","March","April","May","June","July","August","September","October","November","December"],Df=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Ff(n){return n.slice(0,3)}const Rk=Df.map(Ff),Lk=Nf.map(Ff),Ok={MMMM:Nf,MMM:Lk,WWWW:Df,WWW:Rk};function Da(n){return(n<10?"0":"")+n}function Nk(n){return(n<10?"00":n<100?"0":"")+n}const Dk={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=>Da(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>Da(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>Da(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=>Da(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>Da(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>Nk(n.getMilliseconds())};function ju(n,t){t=t||Ok;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(n);)e.push(m[0][0]=="{"?Dk[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 Fk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Pk(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==Fk?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Pf=n=>n%1==0,Bl=[1,2,2.5,5],Wk=Oa(10,-32,0,Bl),Wf=Oa(10,0,32,Bl),Bk=Wf.filter(Pf),gs=Wk.concat(Wf),Hu=`
|
1490
|
+
`,Bf="{YYYY}",zf=Hu+Bf,jf="{M}/{D}",Fa=Hu+jf,zl=Fa+"/{YY}",Hf="{aa}",zk="{h}:{mm}",Qs=zk+Hf,Uf=Hu+Qs,Vf=":{ss}",on=null;function qf(n){let t=n*1e3,e=t*60,r=e*60,m=r*24,g=m*30,y=m*365,x=(n==1?Oa(10,0,3,Bl).filter(Pf):Oa(10,-3,0,Bl)).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,Bf,on,on,on,on,on,on,1],[m*28,"{MMM}",zf,on,on,on,on,on,1],[m,jf,zf,on,on,on,on,on,1],[r,"{h}"+Hf,zl,on,Fa,on,on,on,1],[e,Qs,zl,on,Fa,on,on,on,1],[t,Vf,zl+" "+Qs,on,Fa+" "+Qs,on,Uf,on,1],[n,Vf+".{fff}",zl+" "+Qs,on,Fa+" "+Qs,on,Uf,on,1]];function p(s){return(a,u,l,o,c,d)=>{let w=[],b=c>=y,I=c>=g&&c<y,T=s(l),S=hn(T*n,3),C=Uu(T.getFullYear(),b?0:T.getMonth(),I||b?1:T.getDate()),R=hn(C*n,3);if(I||b){let L=I?c/g:0,F=b?c/y:0,E=S==R?S:hn(Uu(C.getFullYear()+F,C.getMonth()+L,1)*n,3),H=new Date(rr(E/n)),P=H.getFullYear(),O=H.getMonth();for(let _=0;E<=o;_++){let A=Uu(P+F*_,O+L*_,1),N=A-s(hn(A*n,3));E=hn((+A+N)*n,3),E<=o&&w.push(E)}}else{let L=c>=m?m:c,F=ei(l)-ei(S),E=R+F+Pl(S-R,L);w.push(E);let H=s(E),P=H.getHours()+H.getMinutes()/e+H.getSeconds()/r,O=c/r,_=a.axes[u]._space,A=d/_;for(;E=hn(E+c,n==1?0:3),!(E>o);)if(O>1){let N=ei(hn(P+O,6))%24,B=s(E).getHours()-N;B>1&&(B=-1),E-=B*r,P=(P+O)%24;let U=w[w.length-1];hn((E-U)/c,3)*A>=.7&&w.push(E)}else w.push(E)}return w}}return[x,h,p]}const[jk,Hk,Uk]=qf(1),[Vk,qk,Kk]=qf(.001);Oa(2,-53,53,[1]);function Kf(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 Gf(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,l;return r.map(o=>{let c=n(o),d=c.getFullYear(),w=c.getMonth(),b=c.getDate(),I=c.getHours(),T=c.getMinutes(),S=c.getSeconds(),C=d!=h&&x[2]||w!=p&&x[3]||b!=s&&x[4]||I!=a&&x[5]||T!=u&&x[6]||S!=l&&x[7]||x[1];return h=d,p=w,s=b,a=I,u=T,l=S,C(c)})}}function Gk(n,t){let e=ju(t);return(r,m,g,y,x)=>m.map(h=>e(n(h)))}function Uu(n,t,e){return new Date(n,t,e)}function Yf(n,t){return t(n)}const Yk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Xf(n,t){return(e,r,m,g)=>g==null?Eu:t(n(r))}function Xk(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function Qk(n,t){return n.series[t].fill(n,t)}const Zk={show:!0,live:!0,isolate:!1,mount:vk,markers:{show:!0,width:2,stroke:Xk,fill:Qk,dash:"solid"},idx:null,idxs:null,values:[]};function Jk(n,t){let e=n.cursor.points,r=di(),m=e.size(n,t);yn(r,Ea,m),yn(r,Ia,m);let g=m/-2;yn(r,"marginLeft",g),yn(r,"marginTop",g);let y=e.width(n,t,m);return y&&yn(r,"borderWidth",y),r}function eS(n,t){let e=n.series[t].points;return e._fill||e._stroke}function tS(n,t){let e=n.series[t].points;return e._stroke||e._fill}function nS(n,t){return n.series[t].points.size}const Vu=[0,0];function rS(n,t,e){return Vu[0]=t,Vu[1]=e,Vu}function jl(n,t,e,r=!0){return m=>{m.button==0&&(!r||m.target==t)&&e(m)}}function qu(n,t,e,r=!0){return m=>{(!r||m.target==t)&&e(m)}}const iS={show:!0,x:!0,y:!0,lock:!1,move:rS,points:{one:!1,show:Jk,size:nS,width:0,stroke:tS,fill:eS},bind:{mousedown:jl,mouseup:jl,click:jl,dblclick:jl,mousemove:qu,mouseleave:qu,mouseenter:qu},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},Qf={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Ku=Gn({},Qf,{filter:$f}),Zf=Gn({},Ku,{size:10}),Jf=Gn({},Qf,{show:!1}),Gu='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"',em="bold "+Gu,tm=1.5,nm={show:!0,scale:"x",stroke:$u,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:em,side:2,grid:Ku,ticks:Zf,border:Jf,font:Gu,lineGap:tm,rotate:0},oS="Value",sS="Time",rm={show:!0,scale:"x",auto:!1,sorted:1,min:dr,max:-1/0,idxs:[]};function aS(n,t,e,r,m){return t.map(g=>g==null?"":Pu(g))}function lS(n,t,e,r,m,g,y){let x=[],h=Oo.get(m)||0;e=y?e:hn(Pl(e,m),h);for(let p=e;p<=r;p=hn(p+m,h))x.push(Object.is(p,-0)?0:p);return x}function Yu(n,t,e,r,m,g,y){const x=[],h=n.scales[n.axes[t].scale].log,p=h==10?so:kf,s=ei(p(e));m=Gs(h,s),h==10&&(m=gs[Ei(m,gs)]);let a=e,u=m*h;h==10&&(u=gs[Ei(u,gs)]);do x.push(a),a=a+m,h==10&&!Oo.has(a)&&(a=hn(a,Oo.get(m))),a>=u&&(m=a,u=m*h,h==10&&(u=gs[Ei(u,gs)]));while(a<=r);return x}function cS(n,t,e,r,m,g,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Yu(n,t,Mr(x,e),r,m):[x],p=r>=0&&e<=0?[0]:[];return(e<-x?Yu(n,t,Mr(x,-r),-e,m):[x]).reverse().map(s=>-s).concat(p,h)}const im=/./,uS=/[12357]/,hS=/[125]/,om=/1/,Xu=(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 dS(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?im:h(7,y)-s>=p?uS:h(5,y)-s>=p?hS:om;if(a==om){let u=nr(h(1,y)-s);if(u<p)return Xu(t.slice().reverse(),x.distr,a,pi(p/u)).reverse()}return Xu(t,x.distr,a,1)}function pS(n,t,e,r,m){let g=n.axes[e],y=g.scale,x=g._space,h=n.valToPos,p=nr(h(1,y)-h(2,y));return p<x?Xu(t.slice().reverse(),3,im,pi(x/p)).reverse():t}function gS(n,t,e,r){return r==null?Eu:t==null?"":Pu(t)}const sm={show:!0,scale:"y",stroke:$u,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:em,side:3,grid:Ku,ticks:Zf,border:Jf,font:Gu,lineGap:tm,rotate:0};function fS(n,t){let e=3+(n||1)*2;return hn(e*t,3)}function mS(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=nr(y-g),h=n.series[t],p=x/(h.points.space*Jt);return r[1]-r[0]<=p}const am={scale:null,auto:!0,sorted:0,min:dr,max:-1/0},lm=(n,t,e,r,m)=>m,cm={show:!0,auto:!0,sorted:0,gaps:lm,alpha:1,facets:[Gn({},am,{scale:"x"}),Gn({},am,{scale:"y"})]},um={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:lm,alpha:1,points:{show:mS,filter:null},values:null,min:dr,max:-1/0,idxs:[],path:null,clip:null};function vS(n,t,e,r,m){return e/10}const hm={time:jC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},yS=Gn({},hm,{time:!1,ori:1}),dm={};function pm(n,t){let e=dm[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&&(dm[n]=e)),e}const Zs=1,Qu=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,l=x.top,o=x.width,c=x.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(m,h,p,s,a,d,w,u,l,o,c,Ul,Js,ql,mm,ym):e(m,h,p,s,a,w,d,l,u,c,o,Vl,ea,eh,vm,wm)}function Zu(n,t){let e=0,r=0,m=Qt(n.bands,zu);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 wS(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,l,o,c,d)=>{let w=y.pxRound;const b=p.dir*(p.ori==0?1:-1),I=p.ori==0?Js:ea;let T,S;b==1?(T=e,S=r):(T=r,S=e);let C=w(a(x[T],p,c,l)),R=w(u(h[T],s,d,o)),L=w(a(x[S],p,c,l)),F=w(u(g==1?s.max:s.min,s,d,o)),E=new Path2D(m);return I(E,L,F),I(E,C,F),I(E,C,R),E})}function Hl(n,t,e,r,m,g){let y=null;if(n.length>0){y=new Path2D;const x=t==0?ql:eh;let h=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let l=u[0]-h;l>0&&x(y,h,r,l,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 bS(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Ju(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]),l=a==s?u:g(n[a]),o=s-m;u=y<=0&&o>=0&&o<h?g(n[o]):u;let c=a+m;l=y>=0&&c>=0&&c<h?g(n[c]):l,l>=u&&x.push([u,l])}return x}function gm(n){return n==0?_f:n==1?rr:t=>ps(t,n)}function fm(n){let t=n==0?Ul:Vl,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=Ii(p,x/2,h/2),s=Ii(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 Ul=(n,t,e)=>{n.moveTo(t,e)},Vl=(n,t,e)=>{n.moveTo(e,t)},Js=(n,t,e)=>{n.lineTo(t,e)},ea=(n,t,e)=>{n.lineTo(e,t)},ql=fm(0),eh=fm(1),mm=(n,t,e,r,m,g)=>{n.arc(t,e,r,m,g)},vm=(n,t,e,r,m,g)=>{n.arc(e,t,r,m,g)},ym=(n,t,e,r,m,g,y)=>{n.bezierCurveTo(t,e,r,m,g,y)},wm=(n,t,e,r,m,g,y)=>{n.bezierCurveTo(e,t,m,r,y,g)};function bm(n){return(t,e,r,m,g)=>fs(t,e,(y,x,h,p,s,a,u,l,o,c,d)=>{let{pxRound:w,points:b}=y,I,T;p.ori==0?(I=Ul,T=mm):(I=Vl,T=vm);const S=hn(b.width*Jt,3);let C=(b.size-b.width)/2*Jt,R=hn(C*2,3),L=new Path2D,F=new Path2D,{left:E,top:H,width:P,height:O}=t.bbox;ql(F,E-R,H-R,P+R*2,O+R*2);const _=A=>{if(h[A]!=null){let N=w(a(x[A],p,c,l)),B=w(u(h[A],s,d,o));I(L,N+C,B),T(L,N,B,C,0,Fl*2)}};if(g)g.forEach(_);else for(let A=r;A<=m;A++)_(A);return{stroke:S>0?L:null,fill:L,clip:F,flags:Zs|Qu}})}function xm(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 xS=xm(Js),CS=xm(ea);function Cm(n){const t=Qt(n==null?void 0:n.alignGaps,0);return(e,r,m,g)=>fs(e,r,(y,x,h,p,s,a,u,l,o,c,d)=>{[m,g]=Ol(h,m,g);let w=y.pxRound,b=P=>w(a(P,p,c,l)),I=P=>w(u(P,s,d,o)),T,S;p.ori==0?(T=Js,S=xS):(T=ea,S=CS);const C=p.dir*(p.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Zs},L=R.stroke;let F=!1;if(g-m>=c*4){let P=he=>e.posToVal(he,p.key,!0),O=null,_=null,A,N,B,U=b(x[C==1?m:g]),K=b(x[m]),Z=b(x[g]),te=P(C==1?K+1:Z-1);for(let he=C==1?m:g;he>=m&&he<=g;he+=C){let ne=x[he],ae=(C==1?ne<te:ne>te)?U:b(ne),ue=h[he];ae==U?ue!=null?(N=ue,O==null?(T(L,ae,I(N)),A=O=_=N):N<O?O=N:N>_&&(_=N)):ue===null&&(F=!0):(O!=null&&S(L,U,I(O),I(_),I(A),I(N)),ue!=null?(N=ue,T(L,ae,I(N)),O=_=A=N):(O=_=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=_&&B!=U&&S(L,U,I(O),I(_),I(A),I(N))}else for(let P=C==1?m:g;P>=m&&P<=g;P+=C){let O=h[P];O===null?F=!0:O!=null&&T(L,b(x[P]),I(O))}let[E,H]=Zu(e,r);if(y.fill!=null||E!=0){let P=R.fill=new Path2D(L),O=y.fillTo(e,r,y.min,y.max,E),_=I(O),A=b(x[m]),N=b(x[g]);C==-1&&([N,A]=[A,N]),T(P,N,_),T(P,A,_)}if(!y.spanGaps){let P=[];F&&P.push(...Ju(x,h,m,g,C,b,t)),R.gaps=P=y.gaps(e,r,m,g,P),R.clip=Hl(P,p.ori,l,o,c,d)}return H!=0&&(R.band=H==2?[ao(e,r,m,g,L,-1),ao(e,r,m,g,L,1)]:ao(e,r,m,g,L,H)),R})}function kS(n){const t=Qt(n.align,1),e=Qt(n.ascDesc,!1),r=Qt(n.alignGaps,0),m=Qt(n.extend,!1);return(g,y,x,h)=>fs(g,y,(p,s,a,u,l,o,c,d,w,b,I)=>{[x,h]=Ol(a,x,h);let T=p.pxRound,{left:S,width:C}=g.bbox,R=Z=>T(o(Z,u,b,d)),L=Z=>T(c(Z,l,I,w)),F=u.ori==0?Js:ea;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Zs},H=E.stroke,P=u.dir*(u.ori==0?1:-1);let O=L(a[P==1?x:h]),_=R(s[P==1?x:h]),A=_,N=_;m&&t==-1&&(N=S,F(H,N,O)),F(H,_,O);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=L(te);t==1?F(H,he,O):F(H,A,ne),F(H,he,ne),O=ne,A=he}let B=A;m&&t==1&&(B=S+C,F(H,B,O));let[U,K]=Zu(g,y);if(p.fill!=null||U!=0){let Z=E.fill=new Path2D(H),te=p.fillTo(g,y,p.min,p.max,U),he=L(te);F(Z,B,he),F(Z,N,he)}if(!p.spanGaps){let Z=[];Z.push(...Ju(s,a,x,h,P,R,r));let te=p.width*Jt/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),E.gaps=Z=p.gaps(g,y,x,h,Z),E.clip=Hl(Z,u.ori,d,w,b,I)}return K!=0&&(E.band=K==2?[ao(g,y,x,h,H,-1),ao(g,y,x,h,H,1)]:ao(g,y,x,h,H,K)),E})}function km(n,t,e,r,m,g,y=dr){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=nr(n[h]-n[x]);s<p&&(p=s,y=nr(e(n[h],r,m,g)-e(n[x],r,m,g)))}x=h}}return y}function SS(n){n=n||Na;const t=Qt(n.size,[.6,dr,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=Ht(m),y=1-t[0],x=Qt(t[1],dr),h=Qt(t[2],1),p=Qt(n.disp,Na),s=Qt(n.each,l=>{}),{fill:a,stroke:u}=p;return(l,o,c,d)=>fs(l,o,(w,b,I,T,S,C,R,L,F,E,H)=>{let P=w.pxRound,O=e,_=r*Jt,A=x*Jt,N=h*Jt,B,U;T.ori==0?[B,U]=g(l,o):[U,B]=g(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?ql:eh,te=T.ori==0?s:(He,ke,ze,Ye,pt,kt,Ct)=>{s(He,ke,ze,pt,Ye,Ct,kt)},he=Qt(l.bands,zu).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ue=P(R(ae,S,H,F)),ce,fe,$e,Te=E,Ee=P(w.width*Jt),Ge=!1,qe=null,ht=null,tt=null,dt=null;a!=null&&(Ee==0||u!=null)&&(Ge=!0,qe=a.values(l,o,c,d),ht=new Map,new Set(qe).forEach(He=>{He!=null&&ht.set(He,new Path2D)}),Ee>0&&(tt=u.values(l,o,c,d),dt=new Map,new Set(tt).forEach(He=>{He!=null&&dt.set(He,new Path2D)})));let{x0:tn,size:pn}=p;if(tn!=null&&pn!=null){O=1,b=tn.values(l,o,c,d),tn.unit==2&&(b=b.map(ke=>l.posToVal(L+ke*E,T.key,!0)));let He=pn.values(l,o,c,d);pn.unit==2?fe=He[0]*E:fe=C(He[0],T,E,L)-C(0,T,E,L),Te=km(b,I,C,T,E,L,Te),$e=Te-fe+_}else Te=km(b,I,C,T,E,L,Te),$e=Te*y+_,fe=Te-$e;$e<1&&($e=0),Ee>=fe/2&&(Ee=0),$e<5&&(P=_f);let Yt=$e>0,pr=Te-$e-(Yt?Ee:0);fe=P(Bu(pr,N,A)),ce=(O==0?fe/2:O==K?0:fe)-O*K*((O==0?_/2:0)+(Yt?Ee/2:0));const gn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},En=Ge?null:new Path2D;let In=null;if(he!=null)In=l.data[he.series[1]];else{let{y0:He,y1:ke}=p;He!=null&&ke!=null&&(I=ke.values(l,o,c,d),In=He.values(l,o,c,d))}let Xn=B*fe,yt=U*fe;for(let He=K==1?c:d;He>=c&&He<=d;He+=K){let ke=I[He];if(ke==null)continue;if(In!=null){let ut=In[He]??0;if(ke-ut==0)continue;ue=R(ut,S,H,F)}let ze=T.distr!=2||p!=null?b[He]:He,Ye=C(ze,T,E,L),pt=R(Qt(ke,ae),S,H,F),kt=P(Ye-ce),Ct=P(Mr(pt,ue)),Ot=P(Ii(pt,ue)),Rt=Ct-Ot;if(ke!=null){let ut=ke<0?yt:Xn,wt=ke<0?Xn:yt;Ge?(Ee>0&&tt[He]!=null&&Z(dt.get(tt[He]),kt,Ot+ei(Ee/2),fe,Mr(0,Rt-Ee),ut,wt),qe[He]!=null&&Z(ht.get(qe[He]),kt,Ot+ei(Ee/2),fe,Mr(0,Rt-Ee),ut,wt)):Z(En,kt,Ot+ei(Ee/2),fe,Mr(0,Rt-Ee),ut,wt),te(l,o,He,kt-Ee/2,Ot,fe+Ee,Rt)}}return Ee>0?gn.stroke=Ge?dt:En:Ge||(gn._fill=w.width==0?w._fill:w._stroke??w._fill,gn.width=0),gn.fill=Ge?ht:En,gn})}function AS(n,t){const e=Qt(t==null?void 0:t.alignGaps,0);return(r,m,g,y)=>fs(r,m,(x,h,p,s,a,u,l,o,c,d,w)=>{[g,y]=Ol(p,g,y);let b=x.pxRound,I=B=>b(u(B,s,d,o)),T=B=>b(l(B,a,w,c)),S,C,R;s.ori==0?(S=Ul,R=Js,C=ym):(S=Vl,R=ea,C=wm);const L=s.dir*(s.ori==0?1:-1);let F=I(h[L==1?g:y]),E=F,H=[],P=[];for(let B=L==1?g:y;B>=g&&B<=y;B+=L)if(p[B]!=null){let U=h[B],K=I(U);H.push(E=K),P.push(T(p[B]))}const O={stroke:n(H,P,S,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Zs},_=O.stroke;let[A,N]=Zu(r,m);if(x.fill!=null||A!=0){let B=O.fill=new Path2D(_),U=x.fillTo(r,m,x.min,x.max,A),K=T(U);R(B,E,K),R(B,F,K)}if(!x.spanGaps){let B=[];B.push(...Ju(h,p,g,y,L,I,e)),O.gaps=B=x.gaps(r,m,g,y,B),O.clip=Hl(B,s.ori,o,c,d,w)}return N!=0&&(O.band=N==2?[ao(r,m,g,y,_,-1),ao(r,m,g,y,_,1)]:ao(r,m,g,y,_,N)),O})}function _S(n){return AS($S,n)}function $S(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 th=new Set;function Sm(){for(let n of th)n.syncRect(!0)}qs&&(hs(ak,Ks,Sm),hs(lk,Ks,Sm,!0),hs(Rl,Ks,()=>{wr.pxRatio=Jt}));const TS=Cm(),MS=bm();function Am(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((m,g)=>nh(m,g,t,e))}function ES(n,t){return n.map((e,r)=>r==0?{}:Gn({},t,e))}function nh(n,t,e,r){return Gn({},t==0?e:r,n)}function _m(n,t,e){return t==null?Ys:[t,e]}const IS=_m;function RS(n,t,e){return t==null?Ys:Dl(t,e,Fu,!0)}function $m(n,t,e,r){return t==null?Ys:Nl(t,e,n.scales[r].log,!1)}const LS=$m;function Tm(n,t,e,r){return t==null?Ys:Du(t,e,n.scales[r].log,!1)}const OS=Tm;function NS(n,t,e,r,m){let g=Mr(Sf(n),Sf(t)),y=t-n,x=Ei(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 Mm(n){let t,e;return n=n.replace(/(\d+)px/,(r,m)=>(t=rr((e=+m)*Jt))+"px"),[n,t,e]}function DS(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=hn(t[2]*Jt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function wr(n,t,e){const r={mode:Qt(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=di(HC);if(n.id!=null&&(p.id=n.id),Zr(p,n.class),n.title){let V=di(qC,p);V.textContent=n.title}const s=Mi("canvas"),a=r.ctx=s.getContext("2d"),u=di(KC,p);hs("click",u,V=>{V.target===o&&(rn!=vi||Vt!=no)&&Ln.click(r,V)},!0);const l=r.under=di(GC,u);u.appendChild(s);const o=r.over=di(YC,u);n=Xs(n);const c=+Qt(n.pxAlign,1),d=gm(c);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=m==1?Am(n.series||[],rm,um,!1):ES(n.series||[null],cm),I=r.axes=Am(n.axes||[],nm,sm,!0),T=r.scales={},S=r.bands=n.bands||[];S.forEach(V=>{V.fill=Ht(V.fill||null),V.dir=Qt(V.dir,-1)});const C=m==2?b[1].facets[0].scale:b[0].scale,R={axes:go,series:aa},L=(n.drawOrder||["axes","series"]).map(V=>R[V]);function F(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=>Wu(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 E(V){let X=T[V];if(X==null){let ie=(n.scales||Na)[V]||Na;if(ie.from!=null){E(ie.from);let oe=Gn({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=Gn({},V==C?hm:yS,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?bf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?bf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&Wl(ge))){let Me=ge;ge=(Fe,We,Ve)=>We==null?Ys:Dl(We,Ve,Me)}X.range=Ht(ge||(oe?IS:V==C?X.distr==3?LS:X.distr==4?OS:_m:X.distr==3?$m:X.distr==4?Tm:RS)),X.auto=Ht(be?!1:X.auto),X.clamp=Ht(X.clamp||vS),X._min=X._max=null,X.valToPct=F(X)}}}E("x"),E("y"),m==1&&b.forEach(V=>{E(V.scale)}),I.forEach(V=>{E(V.scale)});for(let V in n.scales)E(V);const H=T[C],P=H.distr;let O,_;H.ori==0?(Zr(p,UC),O=g,_=y):(Zr(p,VC),O=y,_=g);const A={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(rr(V/w))),B=n.fmtDate||ju,U=w==1?Uk(N):Kk(N),K=Gf(N,Kf(w==1?Hk:qk,B)),Z=Xf(N,Yf(Yk,B)),te=[],he=r.legend=Gn({},Zk,n.legend),ne=r.cursor=Gn({},iS,{drag:{y:m==2}},n.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Ht(ce.width),ce.dash=Ht(ce.dash),ce.stroke=Ht(ce.stroke),ce.fill=Ht(ce.fill);let fe,$e,Te,Ee=[],Ge=[],qe,ht=!1,tt={};if(he.live){const V=b[1]?b[1].values:null;ht=V!=null,qe=ht?V(r,1,0):{_:0};for(let X in qe)tt[X]=Eu}if(ae)if(fe=Mi("table",tk,p),Te=Mi("tbody",null,fe),he.mount(r,fe),ht){$e=Mi("thead",null,fe,Te);let V=Mi("tr",null,$e);Mi("th",null,V);for(var dt in qe)Mi("th",rf,V).textContent=dt}else Zr(fe,rk),he.live&&Zr(fe,nk);const tn={show:!0},pn={show:!1};function Yt(V,X){if(X==0&&(ht||!he.live||m==2))return Ys;let ie=[],oe=Mi("tr",ik,Te,Te.childNodes[X]);Zr(oe,V.class),V.show||Zr(oe,us);let ge=Mi("th",null,oe);if(ce.show){let Fe=di(ok,ge);if(X>0){let We=ce.width(r,X);We&&(Fe.style.border=We+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Fe.style.background=ce.fill(r,X)}}let be=di(rf,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)),gn("click",ge,Fe=>{if(ne._lock)return;Oi(Fe);let We=b.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ve=b.some((Xe,Ze)=>Ze>0&&Ze!=We&&Xe.show);b.forEach((Xe,Ze)=>{Ze>0&&Rr(Ze,Ve?Ze==We?tn:pn:tn,!0,lt.setSeries)})}else Rr(We,{show:!V.show},!0,lt.setSeries)},!1),Ni&&gn(lf,ge,Fe=>{ne._lock||(Oi(Fe),Rr(b.indexOf(V),bi,!0,lt.setSeries))},!1));for(var Me in qe){let Fe=Mi("td",sk,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const pr=new Map;function gn(V,X,ie,oe=!0){const ge=pr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(hs(V,X,ge[V]=be),pr.set(X,ge))}function En(V,X,ie){const oe=pr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Nu(ge,X,oe[ge]),delete oe[ge]);V==null&&pr.delete(X)}let In=0,Xn=0,yt=0,He=0,ke=0,ze=0,Ye=ke,pt=ze,kt=yt,Ct=He,Ot=0,Rt=0,ut=0,wt=0;r.bbox={};let xn=!1,xr=!1,Hr=!1,Li=!1,lo=!1,gr=!1;function co(V,X,ie){(ie||V!=r.width||X!=r.height)&&Do(V,X),Wi(!1),Hr=!0,xr=!0,to()}function Do(V,X){r.width=In=yt=V,r.height=Xn=He=X,ke=ze=0,ws(),ia();let ie=r.bbox;Ot=ie.left=ps(ke*Jt,.5),Rt=ie.top=ps(ze*Jt,.5),ut=ie.width=ps(yt*Jt,.5),wt=ie.height=ps(He*Jt,.5)}const Ua=3;function ti(){let V=!1,X=0;for(;!V;){X++;let ie=la(X),oe=Ga(X);V=X==Ua||ie&&oe,V||(Do(r.width,r.height),xr=!0)}}function Va({width:V,height:X}){co(V,X)}r.setSize=Va;function ws(){let V=!1,X=!1,ie=!1,oe=!1;I.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:Fe}=ge,We=Me%2,Ve=ge.label!=null?ge.labelSize:0,Xe=Fe+Ve;Xe>0&&(We?(yt-=Xe,Me==3?(ke+=Xe,oe=!0):ie=!0):(He-=Xe,Me==0?(ze+=Xe,V=!0):X=!0))}}),Fi[0]=V,Fi[1]=ie,Fi[2]=X,Fi[3]=oe,yt-=Sr[1]+Sr[3],ke+=Sr[3],He-=Sr[2]+Sr[0],ze+=Sr[0]}function ia(){let V=ke+yt,X=ze+He,ie=ke,oe=ze;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}}I.forEach((be,Me)=>{if(be.show&&be._show){let Fe=be.side;be._pos=ge(Fe,be._size),be.label!=null&&(be._lpos=ge(Fe,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=Ht(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,Fe)=>{if(be==0)return Me;let We=Me,Ve=ie(ge,be,Me,Fe)??dr,Xe=Ve>=0&&Ve<dr,Ze=H.ori==0?yt:He,xt=ne.left,zt=t[0],At=t[be];if(X.has(At[Me])){We=null;let Wt=null,gt=null,rt;if(oe==0||oe==-1)for(rt=Me;Wt==null&&rt-- >0;)X.has(At[rt])||(Wt=rt);if(oe==0||oe==1)for(rt=Me;gt==null&&rt++<At.length;)X.has(At[rt])||(gt=rt);if(Wt!=null||gt!=null)if(Xe){let dn=Wt==null?-1/0:O(zt[Wt],H,Ze,0),Sn=gt==null?1/0:O(zt[gt],H,Ze,0),Jn=xt-dn,Kt=Sn-xt;Jn<=Kt?Jn<=Ve&&(We=Wt):Kt<=Ve&&(We=gt)}else We=gt==null?Wt:Wt==null?gt:Me-Wt<=gt-Me?Wt:gt}else Xe&&nr(xt-O(zt[Me],H,Ze,0))>Ve&&(We=null);return We}}const Oi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let jn=ne.points;jn.show=Ht(jn.show),jn.size=Ht(jn.size),jn.stroke=Ht(jn.stroke),jn.width=Ht(jn.width),jn.fill=Ht(jn.fill);const Cr=r.focus=Gn({},n.focus||{alpha:.3},ne.focus),Ni=Cr.prox>=0,_n=Ni&&jn.one;let kr=[],Qi=[],Di=[];function bs(V,X){let ie=jn.show(r,X);if(ie instanceof HTMLElement)return Zr(ie,ek),Zr(ie,V.class),Ki(ie,-10,-10,yt,He),o.insertBefore(ie,kr[X]),ie}function oa(V,X){if(m==1||X>0){let ie=m==1&&T[V.scale].time,oe=V.value;V.value=ie?Lf(oe)?Xf(N,Yf(oe,B)):oe||Z:oe||gS,V.label=V.label||(ie?sS:oS)}if(_n||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||TS||yk,V.fillTo=Ht(V.fillTo||wS),V.pxAlign=+Qt(V.pxAlign,c),V.pxRound=gm(V.pxAlign),V.stroke=Ht(V.stroke||null),V.fill=Ht(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=fS(Mr(1,V.width),1),oe=V.points=Gn({},{size:ie,width:Mr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:MS,_stroke:null,_fill:null},V.points);oe.show=Ht(oe.show),oe.filter=Ht(oe.filter),oe.fill=Ht(oe.fill),oe.stroke=Ht(oe.stroke),oe.paths=Ht(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Yt(V,X);Ee.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;_n?X==0&&(ie=bs(V,X)):X>0&&(ie=bs(V,X)),kr.splice(X,0,ie),Qi.splice(X,0,0),Di.splice(X,0,0)}et("addSeries",X)}function qa(V,X){X=X??b.length,V=m==1?nh(V,X,rm,um):nh(V,X,{},cm),b.splice(X,0,V),oa(b[X],X)}r.addSeries=qa;function Ka(V){if(b.splice(V,1),ae){he.values.splice(V,1),Ge.splice(V,1);let X=Ee.splice(V,1)[0];En(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),kr.splice(V,1)[0].remove(),Qi.splice(V,1),Di.splice(V,1)),et("delSeries",V)}r.delSeries=Ka;const Fi=[!1,!1,!1,!1];function ni(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=T[V.scale]);let ge=oe.time;V.size=Ht(V.size),V.space=Ht(V.space),V.rotate=Ht(V.rotate),No(V.incrs)&&V.incrs.forEach(Me=>{!Oo.has(Me)&&Oo.set(Me,If(Me))}),V.incrs=Ht(V.incrs||(oe.distr==2?Bk:ge?w==1?jk:Vk:gs)),V.splits=Ht(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Yu:oe.distr==4?cS:lS)),V.stroke=Ht(V.stroke),V.grid.stroke=Ht(V.grid.stroke),V.ticks.stroke=Ht(V.ticks.stroke),V.border.stroke=Ht(V.border.stroke);let be=V.values;V.values=No(be)&&!No(be[0])?Ht(be):ge?No(be)?Gf(N,Kf(be,B)):Lf(be)?Gk(N,be):be||K:be||aS,V.filter=Ht(V.filter||(oe.distr>=3&&oe.log==10?dS:oe.distr==3&&oe.log==2?pS:$f)),V.font=Mm(V.font),V.labelFont=Mm(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=di(XC,u))}}function Ut(V,X,ie,oe){let[ge,be,Me,Fe]=ie,We=X%2,Ve=0;return We==0&&(Fe||be)&&(Ve=X==0&&!ge||X==2&&!Me?rr(nm.size/3):0),We==1&&(ge||Me)&&(Ve=X==1&&!be||X==3&&!Fe?rr(sm.size/2):0),Ve}const sa=r.padding=(n.padding||[Ut,Ut,Ut,Ut]).map(V=>Ht(Qt(V,Ut))),Sr=r._padding=sa.map((V,X)=>V(r,X,Fi,0));let Hn,fn=null,Rn=null;const gi=m==1?b[0].idxs:null;let Ar=null,fi=!1;function Fo(V,X){if(t=V??[],r.data=r._data=t,m==2){Hn=0;for(let ie=1;ie<b.length;ie++)Hn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Ar=t[0],Hn=Ar.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(Hn);for(let ge=0;ge<Hn;ge++)oe[ge]=ge}r._data=t=ie}if(Wi(!0),et("setData"),P==2&&(Hr=!0),X!==!1){let ie=H;ie.auto(r,fi)?xs():Qn(C,ie.min,ie.max),Li=Li||ne.left>=0,gr=!0,to()}}r.setData=Fo;function xs(){fi=!0;let V,X;m==1&&(Hn>0?(fn=gi[0]=0,Rn=gi[1]=Hn-1,V=t[0][fn],X=t[0][Rn],P==2?(V=fn,X=Rn):V==X&&(P==3?[V,X]=Nl(V,V,H.log,!1):P==4?[V,X]=Du(V,V,H.log,!1):H.time?X=V+rr(86400/w):[V,X]=Dl(V,X,Fu,!0))):(fn=gi[0]=V=null,Rn=gi[1]=X=null)),Qn(C,V,X)}let Zi,Ur,uo,Po,Vr,Wo,Cs,ks,Bo,ir;function Ss(V,X,ie,oe,ge,be){V??(V=sf),ie??(ie=zu),oe??(oe="butt"),ge??(ge=sf),be??(be="round"),V!=Zi&&(a.strokeStyle=Zi=V),ge!=Ur&&(a.fillStyle=Ur=ge),X!=uo&&(a.lineWidth=uo=X),be!=Vr&&(a.lineJoin=Vr=be),oe!=Wo&&(a.lineCap=Wo=oe),ie!=Po&&a.setLineDash(Po=ie)}function ho(V,X,ie,oe){X!=Ur&&(a.fillStyle=Ur=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,fi)&&(X==null||X.min==null)){let be=Qt(fn,0),Me=Qt(Rn,oe.length-1),Fe=ie.min==null?dk(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Ii(V.min,ie.min=Fe[0]),V.max=Mr(V.max,ie.max=Fe[1])}}const jo={min:null,max:null};function Ji(){for(let oe in T){let ge=T[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,fi))&&(A[oe]=jo)}for(let oe in T){let ge=T[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=jo)}A[C]!=null&&Wi(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let be=V[oe]=Xs(T[oe],xk);if(ge.min!=null)Gn(be,ge);else if(oe!=C||m==2)if(Hn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=dr,be.max=-1/0}}if(Hn>0){b.forEach((oe,ge)=>{if(m==1){let be=oe.scale,Me=A[be];if(Me==null)return;let Fe=V[be];if(ge==0){let We=Fe.range(r,Fe.min,Fe.max,be);Fe.min=We[0],Fe.max=We[1],fn=Ei(Fe.min,t[0]),Rn=Ei(Fe.max,t[0]),Rn-fn>1&&(t[0][fn]<Fe.min&&fn++,t[0][Rn]>Fe.max&&Rn--),oe.min=Ar[fn],oe.max=Ar[Rn]}else oe.show&&oe.auto&&zo(Fe,Me,oe,t[ge],oe.sorted);oe.idxs[0]=fn,oe.idxs[1]=Rn}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,Fe=be.scale,We=Me.scale,[Ve,Xe]=t[ge],Ze=V[Fe],xt=V[We];Ze!=null&&zo(Ze,A[Fe],be,Ve,be.sorted),xt!=null&&zo(xt,A[We],Me,Xe,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=A[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==dr?null:ge.min,ge.max==-1/0?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=T[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?Wu(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?so(be.max):Me==4?Wu(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)Hr=!0,et("setScale",oe);ue&&ne.left>=0&&(Li=gr=!0)}for(let oe in A)A[oe]=null}function As(V){let X=Bu(fn-1,0,Hn-1),ie=Bu(Rn+1,0,Hn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Hn-1;)ie++;return[X,ie]}function aa(){if(Hn>0){let V=b.some(X=>X._focus)&&ir!=Cr.alpha;V&&(a.globalAlpha=ir=Cr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(Ho(ie,!1),Ho(ie,!0),X._paths==null)){let oe=ir;ir!=X.alpha&&(a.globalAlpha=ir=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]),ir!=oe&&(a.globalAlpha=ir=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=ir;ir!=X.alpha&&(a.globalAlpha=ir=X.alpha),X._paths!=null&&Uo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,fn,Rn,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,fn,Rn,Me),Uo(ie,!0))}ir!=oe&&(a.globalAlpha=ir=oe),et("drawSeries",ie)}}),V&&(a.globalAlpha=ir=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:Fe=ie._stroke,_fill:We=ie._fill,_width:Ve=ie.width}=ie._paths;Ve=hn(Ve*Jt,3);let Xe=null,Ze=Ve%2/2;X&&We==null&&(We=Ve>0?"#fff":Fe);let xt=ie.pxAlign==1&&Ze>0;if(xt&&a.translate(Ze,Ze),!X){let zt=Ot-Ve/2,At=Rt-Ve/2,Wt=ut+Ve,gt=wt+Ve;Xe=new Path2D,Xe.rect(zt,At,Wt,gt)}X?po(Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,be):_s(V,Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,Xe,be),xt&&a.translate(-Ze,-Ze)}function _s(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe){let Ze=!1;We!=0&&S.forEach((xt,zt)=>{if(xt.series[0]==V){let At=b[xt.series[1]],Wt=t[xt.series[1]],gt=(At._paths||Na).band;No(gt)&&(gt=xt.dir==1?gt[0]:gt[1]);let rt,dn=null;At.show&>&&gk(Wt,fn,Rn)?(dn=xt.fill(r,zt)||be,rt=At._paths.clip):gt=null,po(X,ie,oe,ge,dn,Me,Fe,We,Ve,Xe,rt,gt),Ze=!0}}),Ze||po(X,ie,oe,ge,be,Me,Fe,We,Ve,Xe)}const Vo=Zs|Qu;function po(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe,Ze){Ss(V,X,ie,oe,ge),(We||Ve||Ze)&&(a.save(),We&&a.clip(We),Ve&&a.clip(Ve)),Ze?(Fe&Vo)==Vo?(a.clip(Ze),Xe&&a.clip(Xe),or(ge,Me),mi(V,be,X)):Fe&Qu?(or(ge,Me),a.clip(Ze),mi(V,be,X)):Fe&Zs&&(a.save(),a.clip(Ze),Xe&&a.clip(Xe),or(ge,Me),a.restore(),mi(V,be,X)):(or(ge,Me),mi(V,be,X)),(We||Ve||Ze)&&a.restore()}function mi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=Zi=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function or(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Ur=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function eo(V,X,ie,oe){let ge=I[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),Fe=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=NS(X,ie,Fe,oe,Me)}return ge._found=be}function Pi(V,X,ie,oe,ge,be,Me,Fe,We,Ve){let Xe=Me%2/2;c==1&&a.translate(Xe,Xe),Ss(Fe,Me,We,Ve,Fe),a.beginPath();let Ze,xt,zt,At,Wt=ge+(oe==0||oe==3?-be:be);ie==0?(xt=ge,At=Wt):(Ze=ge,zt=Wt);for(let gt=0;gt<V.length;gt++)X[gt]!=null&&(ie==0?Ze=zt=V[gt]:xt=At=V[gt],a.moveTo(Ze,xt),a.lineTo(zt,At));a.stroke(),c==1&&a.translate(-Xe,-Xe)}function la(V){let X=!0;return I.forEach((ie,oe)=>{if(!ie.show)return;let ge=T[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:Fe,max:We}=ge,[Ve,Xe]=eo(oe,Fe,We,Me==0?yt:He);if(Xe==0)return;let Ze=ge.distr==2,xt=ie._splits=ie.splits(r,oe,Fe,We,Ve,Xe,Ze),zt=ge.distr==2?xt.map(rt=>Ar[rt]):xt,At=ge.distr==2?Ar[xt[1]]-Ar[xt[0]]:Ve,Wt=ie._values=ie.values(r,ie.filter(r,zt,oe,Xe,At),oe,Xe,At);ie._rotate=be==2?ie.rotate(r,Wt,oe,Xe):0;let gt=ie._size;ie._size=pi(ie.size(r,Wt,oe,V)),gt!=null&&ie._size!=gt&&(X=!1)}),X}function Ga(V){let X=!0;return sa.forEach((ie,oe)=>{let ge=ie(r,oe,Fi,V);ge!=Sr[oe]&&(X=!1),Sr[oe]=ge}),X}function go(){for(let V=0;V<I.length;V++){let X=I[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,Ve]=X._found;if(X.label!=null){let un=X.labelGap*Fe,ur=rr((X._lpos+un)*Jt);ho(X.labelFont[0],Me,"center",ie==2?Ra:of),a.save(),oe==1?(ge=be=0,a.translate(ur,rr(Rt+wt/2)),a.rotate((ie==3?-Fl:Fl)/2)):(ge=rr(Ot+ut/2),be=ur);let wo=Af(X.label)?X.label(r,V,We,Ve):X.label;a.fillText(wo,ge,be),a.restore()}if(Ve==0)continue;let Xe=T[X.scale],Ze=oe==0?ut:wt,xt=oe==0?Ot:Rt,zt=X._splits,At=Xe.distr==2?zt.map(un=>Ar[un]):zt,Wt=Xe.distr==2?Ar[zt[1]]-Ar[zt[0]]:We,gt=X.ticks,rt=X.border,dn=gt.show?gt.size:0,Sn=rr(dn*Jt),Jn=rr((X.alignTo==2?X._size-dn-X.gap:X.gap)*Jt),Kt=X._rotate*-Fl/180,pe=d(X._pos*Jt),Se=(Sn+Jn)*Fe,xe=pe+Se;be=oe==0?xe:0,ge=oe==1?xe:0;let je=X.font[0],ct=X.align==1?Vs:X.align==2?_u:Kt>0?Vs:Kt<0?_u:oe==0?"center":ie==3?_u:Vs,It=Kt||oe==1?"middle":ie==2?Ra:of;ho(je,Me,ct,It);let Xt=X.font[1]*X.lineGap,Nt=zt.map(un=>d(x(un,Xe,Ze,xt))),Lr=X._values;for(let un=0;un<Lr.length;un++){let ur=Lr[un];if(ur!=null){oe==0?ge=Nt[un]:be=Nt[un],ur=""+ur;let wo=ur.indexOf(`
|
1491
|
+
`)==-1?[ur]:ur.split(/\n/gm);for(let Dn=0;Dn<wo.length;Dn++){let Ts=wo[Dn];Kt?(a.save(),a.translate(ge,be+Dn*Xt),a.rotate(Kt),a.fillText(Ts,0,0),a.restore()):a.fillText(Ts,ge,be+Dn*Xt)}}}gt.show&&Pi(Nt,gt.filter(r,At,V,Ve,Wt),oe,ie,pe,Sn,hn(gt.width*Jt,3),gt.stroke(r,V),gt.dash,gt.cap);let xi=X.grid;xi.show&&Pi(Nt,xi.filter(r,At,V,Ve,Wt),oe,oe==0?2:1,oe==0?Rt:Ot,oe==0?wt:ut,hn(xi.width*Jt,3),xi.stroke(r,V),xi.dash,xi.cap),rt.show&&Pi([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Rt:Ot,oe==1?wt:ut,hn(rt.width*Jt,3),rt.stroke(r,V),rt.dash,rt.cap)}et("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 fo=!1,qo=!1,mo=[];function ca(){qo=!1;for(let V=0;V<mo.length;V++)et(...mo[V]);mo.length=0}function to(){fo||(Tk(ua),fo=!0)}function Pe(V,X=!1){fo=!0,qo=X,V(r),ua(),X&&mo.length>0&&queueMicrotask(ca)}r.batch=Pe;function ua(){if(xn&&(Ji(),xn=!1),Hr&&(ti(),Hr=!1),xr){if(yn(l,Vs,ke),yn(l,Ra,ze),yn(l,Ea,yt),yn(l,Ia,He),yn(o,Vs,ke),yn(o,Ra,ze),yn(o,Ea,yt),yn(o,Ia,He),yn(u,Ea,In),yn(u,Ia,Xn),s.width=rr(In*Jt),s.height=rr(Xn*Jt),I.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;yn(V,Me?"left":"top",oe-be),yn(V,Me?"width":"height",ie),yn(V,Me?"top":"left",Me?ze:ke),yn(V,Me?"height":"width",Me?He:yt),Lu(V,us)}else Zr(V,us)}),Zi=Ur=uo=Vr=Wo=Cs=ks=Bo=Po=null,ir=1,W(!0),ke!=Ye||ze!=pt||yt!=kt||He!=Ct){Wi(!1);let V=yt/kt,X=He/Ct;if(ue&&!Li&&ne.left>=0){ne.left*=V,ne.top*=X,ri&&Ki(ri,rr(ne.left),0,yt,He),Un&&Ki(Un,0,rr(ne.top),yt,He);for(let ie=0;ie<kr.length;ie++){let oe=kr[ie];oe!=null&&(Qi[ie]*=V,Di[ie]*=X,Ki(oe,pi(Qi[ie]),pi(Di[ie]),yt,He))}}if(bt.show&&!lo&&bt.left>=0&&bt.width>0){bt.left*=V,bt.width*=V,bt.top*=X,bt.height*=X;for(let ie in Y)yn(Ir,ie,bt[ie])}Ye=ke,pt=ze,kt=yt,Ct=He}et("setSize"),xr=!1}In>0&&Xn>0&&(a.clearRect(0,0,s.width,s.height),et("drawClear"),L.forEach(V=>V()),et("draw")),bt.show&&lo&&(cn(bt),lo=!1),ue&&Li&&(k(null,!0,!1),Li=!1),he.show&&he.live&&gr&&(v(),gr=!1),h||(h=!0,r.status=1,et("ready")),fi=!1,fo=!1}r.redraw=(V,X)=>{Hr=X||!1,V!==!1?Qn(C,H.min,H.max):to()};function Ne(V,X){let ie=T[V];if(ie.from==null){if(Hn==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(Hn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Hn>0&&(X.min=Ei(X.min,t[0]),X.max=Ei(X.max,t[0]),X.min==X.max&&X.max++),A[V]=X,xn=!0,to()}}r.setScale=Ne;let $n,vo,ri,Un,ha,yo,vi,no,nn,Zt,rn,Vt,yi=!1;const Ln=ne.drag;let Be=Ln.x,mn=Ln.y;ue&&(ne.x&&($n=di(ZC,o)),ne.y&&(vo=di(JC,o)),H.ori==0?(ri=$n,Un=vo):(ri=vo,Un=$n),rn=ne.left,Vt=ne.top);const bt=r.select=Gn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Ir=bt.show?di(QC,bt.over?o:l):null;function cn(V,X){if(bt.show){for(let ie in V)bt[ie]=V[ie],ie in Y&&yn(Ir,ie,V[ie]);X!==!1&&et("setSelect")}}r.setSelect=cn;function wn(V){if(b[V].show)ae&&Lu(Ee[V],us);else if(ae&&Zr(Ee[V],us),ue){let X=_n?kr[0]:kr[V];X!=null&&Ki(X,-10,-10,yt,He)}}function Qn(V,X,ie){Ne(V,{min:X,max:ie})}function Rr(V,X,ie,oe){X.focus!=null&&ar(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,wn(be),m==2?(Qn(ge.facets[0].scale,null,null),Qn(ge.facets[1].scale,null,null)):Qn(ge.scale,null,null),to())}),ie!==!1&&et("setSeries",V,X),oe&&Et("setSeries",r,V,X)}r.setSeries=Rr;function wi(V,X){Gn(S[V],X)}function On(V,X){V.fill=Ht(V.fill||null),V.dir=Qt(V.dir,-1),X=X??S.length,S.splice(X,0,V)}function qr(V){V==null?S.length=0:S.splice(V,1)}r.addBand=On,r.setBand=wi,r.delBand=qr;function Ko(V,X){b[V].alpha=X,ue&&kr[V]!=null&&(kr[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let Nn,ii,oi;const bi={focus:!0};function ar(V){if(V!=oi){let X=V==null,ie=Cr.alpha!=1;b.forEach((oe,ge)=>{if(m==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&Ko(ge,be?1:Cr.alpha)}}),oi=V,ie&&to()}}ae&&Ni&&gn(cf,fe,V=>{ne._lock||(Oi(V),oi!=null&&Rr(null,bi,!0,lt.setSeries))});function lr(V,X,ie){let oe=T[X];ie&&(V=V/Jt-(oe.ori==1?ze:ke));let ge=yt;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,Fe=V/ge,We=be+(Me-be)*Fe,Ve=oe.distr;return Ve==3?Gs(10,We):Ve==4?mk(We,oe.asinh):Ve==100?oe.bwd(We):We}function fr(V,X){let ie=lr(V,C,X);return Ei(ie,t[0],fn,Rn)}r.valToIdx=V=>Ei(V,t[0]),r.posToIdx=fr,r.posToVal=lr,r.valToPos=(V,X,ie)=>T[X].ori==0?g(V,T[X],ie?ut:yt,ie?Ot:0):y(V,T[X],ie?wt:He,ie?Rt:0),r.setCursor=(V,X,ie)=>{rn=V.left,Vt=V.top,k(null,X,ie)};function $s(V,X){yn(Ir,Vs,bt.left=V),yn(Ir,Ea,bt.width=X)}function mr(V,X){yn(Ir,Ra,bt.top=V),yn(Ir,Ia,bt.height=X)}let _r=H.ori==0?$s:mr,si=H.ori==1?$s:mr;function ai(){if(ae&&he.live)for(let V=m==2?1:0;V<b.length;V++){if(V==0&&ht)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}):bk(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||m==1&&!ht)&&$(ie,te[ie]);ai()}gr=!1,X!==!1&&et("setLegend")}r.setLegend=v;function $(V,X){let ie=b[V],oe=V==0&&P==2?Ar:t[V],ge;ht?ge=ie.values(r,V,X)??tt:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?tt:{_:ge}),he.values[V]=ge}function k(V,X,ie){nn=rn,Zt=Vt,[rn,Vt]=ne.move(r,rn,Vt),ne.left=rn,ne.top=Vt,ue&&(ri&&Ki(ri,rr(rn),0,yt,He),Un&&Ki(Un,0,rr(Vt),yt,He));let oe,ge=fn>Rn;Nn=dr,ii=null;let be=H.ori==0?yt:He,Me=H.ori==1?yt:He;if(rn<0||Hn==0||ge){oe=ne.idx=null;for(let Fe=0;Fe<b.length;Fe++){let We=kr[Fe];We!=null&&Ki(We,-10,-10,yt,He)}Ni&&Rr(null,bi,!0,V==null&<.setSeries),he.live&&(te.fill(oe),gr=!0)}else{let Fe,We,Ve;m==1&&(Fe=H.ori==0?rn:Vt,We=lr(Fe,C),oe=ne.idx=Ei(We,t[0],fn,Rn),Ve=O(t[0][oe],H,be,0));let Xe=-10,Ze=-10,xt=0,zt=0,At=!0,Wt="",gt="";for(let rt=m==2?1:0;rt<b.length;rt++){let dn=b[rt],Sn=te[rt],Jn=Sn==null?null:m==1?t[rt][Sn]:t[rt][1][Sn],Kt=ne.dataIdx(r,rt,oe,We),pe=Kt==null?null:m==1?t[rt][Kt]:t[rt][1][Kt];if(gr=gr||pe!=Jn||Kt!=Sn,te[rt]=Kt,rt>0&&dn.show){let Se=Kt==null?-10:Kt==oe?Ve:O(m==1?t[0][Kt]:t[rt][0][Kt],H,be,0),xe=pe==null?-10:_(pe,m==1?T[dn.scale]:T[dn.facets[1].scale],Me,0);if(Ni&&pe!=null){let je=H.ori==1?rn:Vt,ct=nr(Cr.dist(r,rt,Kt,xe,je));if(ct<Nn){let It=Cr.bias;if(It!=0){let Xt=lr(je,dn.scale),Nt=pe>=0?1:-1,Lr=Xt>=0?1:-1;Lr==Nt&&(Lr==1?It==1?pe>=Xt:pe<=Xt:It==1?pe<=Xt:pe>=Xt)&&(Nn=ct,ii=rt)}else Nn=ct,ii=rt}}if(gr||_n){let je,ct;H.ori==0?(je=Se,ct=xe):(je=xe,ct=Se);let It,Xt,Nt,Lr,xi,un,ur=!0,wo=jn.bbox;if(wo!=null){ur=!1;let Dn=wo(r,rt);Nt=Dn.left,Lr=Dn.top,It=Dn.width,Xt=Dn.height}else Nt=je,Lr=ct,It=Xt=jn.size(r,rt);if(un=jn.fill(r,rt),xi=jn.stroke(r,rt),_n)rt==ii&&Nn<=Cr.prox&&(Xe=Nt,Ze=Lr,xt=It,zt=Xt,At=ur,Wt=un,gt=xi);else{let Dn=kr[rt];Dn!=null&&(Qi[rt]=Nt,Di[rt]=Lr,mf(Dn,It,Xt,ur),gf(Dn,un,xi),Ki(Dn,pi(Nt),pi(Lr),yt,He))}}}}if(_n){let rt=Cr.prox,dn=oi==null?Nn<=rt:Nn>rt||ii!=oi;if(gr||dn){let Sn=kr[0];Sn!=null&&(Qi[0]=Xe,Di[0]=Ze,mf(Sn,xt,zt,At),gf(Sn,Wt,gt),Ki(Sn,pi(Xe),pi(Ze),yt,He))}}}if(bt.show&&yi)if(V!=null){let[Fe,We]=lt.scales,[Ve,Xe]=lt.match,[Ze,xt]=V.cursor.sync.scales,zt=V.cursor.drag;if(Be=zt._x,mn=zt._y,Be||mn){let{left:At,top:Wt,width:gt,height:rt}=V.select,dn=V.scales[Ze].ori,Sn=V.posToVal,Jn,Kt,pe,Se,xe,je=Fe!=null&&Ve(Fe,Ze),ct=We!=null&&Xe(We,xt);je&&Be?(dn==0?(Jn=At,Kt=gt):(Jn=Wt,Kt=rt),pe=T[Fe],Se=O(Sn(Jn,Ze),pe,be,0),xe=O(Sn(Jn+Kt,Ze),pe,be,0),_r(Ii(Se,xe),nr(xe-Se))):_r(0,be),ct&&mn?(dn==1?(Jn=At,Kt=gt):(Jn=Wt,Kt=rt),pe=T[We],Se=_(Sn(Jn,xt),pe,Me,0),xe=_(Sn(Jn+Kt,xt),pe,Me,0),si(Ii(Se,xe),nr(xe-Se))):si(0,Me)}else Q()}else{let Fe=nr(nn-ha),We=nr(Zt-yo);if(H.ori==1){let xt=Fe;Fe=We,We=xt}Be=Ln.x&&Fe>=Ln.dist,mn=Ln.y&&We>=Ln.dist;let Ve=Ln.uni;Ve!=null?Be&&mn&&(Be=Fe>=Ve,mn=We>=Ve,!Be&&!mn&&(We>Fe?mn=!0:Be=!0)):Ln.x&&Ln.y&&(Be||mn)&&(Be=mn=!0);let Xe,Ze;Be&&(H.ori==0?(Xe=vi,Ze=rn):(Xe=no,Ze=Vt),_r(Ii(Xe,Ze),nr(Ze-Xe)),mn||si(0,Me)),mn&&(H.ori==1?(Xe=vi,Ze=rn):(Xe=no,Ze=Vt),si(Ii(Xe,Ze),nr(Ze-Xe)),Be||_r(0,be)),!Be&&!mn&&(_r(0,0),si(0,0))}if(Ln._x=Be,Ln._y=mn,V==null){if(ie){if(Cn!=null){let[Fe,We]=lt.scales;lt.values[0]=Fe!=null?lr(H.ori==0?rn:Vt,Fe):null,lt.values[1]=We!=null?lr(H.ori==1?rn:Vt,We):null}Et(Tu,r,rn,Vt,yt,He,oe)}if(Ni){let Fe=ie&<.setSeries,We=Cr.prox;oi==null?Nn<=We&&Rr(ii,bi,!0,Fe):Nn>We?Rr(null,bi,!0,Fe):ii!=oi&&Rr(ii,bi,!0,Fe)}}gr&&(he.idx=oe,v()),X!==!1&&et("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&W(!1),D}});function W(V=!1){V?D=null:(D=o.getBoundingClientRect(),et("syncRect",D))}function z(V,X,ie,oe,ge,be,Me){ne._lock||yi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?k(null,!0,!0):k(X,!0,!1))}function q(V,X,ie,oe,ge,be,Me,Fe,We){if(D==null&&W(!1),Oi(V),V!=null)ie=V.clientX-D.left,oe=V.clientY-D.top;else{if(ie<0||oe<0){rn=-10,Vt=-10;return}let[Ve,Xe]=lt.scales,Ze=X.cursor.sync,[xt,zt]=Ze.values,[At,Wt]=Ze.scales,[gt,rt]=lt.match,dn=X.axes[0].side%2==1,Sn=H.ori==0?yt:He,Jn=H.ori==1?yt:He,Kt=dn?be:ge,pe=dn?ge:be,Se=dn?oe:ie,xe=dn?ie:oe;if(At!=null?ie=gt(Ve,At)?x(xt,T[Ve],Sn,0):-10:ie=Sn*(Se/Kt),Wt!=null?oe=rt(Xe,Wt)?x(zt,T[Xe],Jn,0):-10:oe=Jn*(xe/pe),H.ori==1){let je=ie;ie=oe,oe=je}}We&&(X==null||X.cursor.event.type==Tu)&&((ie<=1||ie>=yt-1)&&(ie=ps(ie,yt)),(oe<=1||oe>=He-1)&&(oe=ps(oe,He))),Fe?(ha=ie,yo=oe,[vi,no]=ne.move(r,ie,oe)):(rn=ie,Vt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){cn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,ge,be,Me){yi=!0,Be=mn=Ln._x=Ln._y=!1,q(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(gn(Mu,Iu,we,!1),Et(af,r,vi,no,yt,He,null));let{left:Fe,top:We,width:Ve,height:Xe}=bt;re=Fe,se=We,ye=Ve,Ce=Xe}function we(V,X,ie,oe,ge,be,Me){yi=Ln._x=Ln._y=!1,q(V,X,ie,oe,ge,be,Me,!1,!0);let{left:Fe,top:We,width:Ve,height:Xe}=bt,Ze=Ve>0||Xe>0,xt=re!=Fe||se!=We||ye!=Ve||Ce!=Xe;if(Ze&&xt&&cn(bt),Ln.setScale&&Ze&&xt){let zt=Fe,At=Ve,Wt=We,gt=Xe;if(H.ori==1&&(zt=We,At=Xe,Wt=Fe,gt=Ve),Be&&Qn(C,lr(zt,C),lr(zt+At,C)),mn)for(let rt in T){let dn=T[rt];rt!=C&&dn.from==null&&dn.min!=dr&&Qn(rt,lr(Wt+gt,rt),lr(Wt,rt))}Q()}else ne.lock&&(ne._lock=!ne._lock,k(X,!0,V!=null));V!=null&&(En(Mu,Iu),Et(Mu,r,rn,Vt,yt,He,null))}function Oe(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Oi(V);let Fe=yi;if(yi){let We=!0,Ve=!0,Xe=10,Ze,xt;H.ori==0?(Ze=Be,xt=mn):(Ze=mn,xt=Be),Ze&&xt&&(We=rn<=Xe||rn>=yt-Xe,Ve=Vt<=Xe||Vt>=He-Xe),Ze&&We&&(rn=rn<vi?0:yt),xt&&Ve&&(Vt=Vt<no?0:He),k(null,!0,!0),yi=!1}rn=-10,Vt=-10,te.fill(null),k(null,!0,!0),Fe&&(yi=Fe)}function Le(V,X,ie,oe,ge,be,Me){ne._lock||(Oi(V),xs(),Q(),V!=null&&Et(uf,r,rn,Vt,yt,He,null))}function Ue(){I.forEach(DS),co(r.width,r.height,!0)}hs(Rl,Ks,Ue);const st={};st.mousedown=me,st.mousemove=z,st.mouseup=we,st.dblclick=Le,st.setSeries=(V,X,ie,oe)=>{let ge=lt.match[2];ie=ge(r,X,ie),ie!=-1&&Rr(ie,oe,!0,!1)},ue&&(gn(af,o,me),gn(Tu,o,z),gn(lf,o,V=>{Oi(V),W(!1)}),gn(cf,o,Oe),gn(uf,o,Le),th.add(r),r.syncRect=W);const Qe=r.hooks=n.hooks||{};function et(V,X,ie){qo?mo.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 vn=(V,X,ie)=>ie,lt=Gn({key:null,setSeries:!1,filters:{pub:Tf,sub:Tf},scales:[C,b[1]?b[1].scale:null],match:[Mf,Mf,vn],values:[null,null]},ne.sync);lt.match.length==2&<.match.push(vn),ne.sync=lt;const Cn=lt.key,St=pm(Cn);function Et(V,X,ie,oe,ge,be,Me){lt.filters.pub(V,X,ie,oe,ge,be,Me)&&St.pub(V,X,ie,oe,ge,be,Me)}St.sub(r);function Zn(V,X,ie,oe,ge,be,Me){lt.filters.sub(V,X,ie,oe,ge,be,Me)&&st[V](null,X,ie,oe,ge,be,Me)}r.pub=Zn;function cr(){St.unsub(r),th.delete(r),pr.clear(),Nu(Rl,Ks,Ue),p.remove(),fe==null||fe.remove(),et("destroy")}r.destroy=cr;function kn(){et("init",n,t),Fo(t||n.data,!1),A[C]?Ne(C,A[C]):xs(),lo=bt.show&&(bt.width>0||bt.height>0),Li=gr=!0,co(n.width,n.height)}return b.forEach(oa),I.forEach(ni),e?e instanceof HTMLElement?(e.appendChild(p),kn()):e(r,kn):kn(),r}wr.assign=Gn,wr.fmtNum=Pu,wr.rangeNum=Dl,wr.rangeLog=Nl,wr.rangeAsinh=Du,wr.orient=fs,wr.pxRatio=Jt,wr.join=$k,wr.fmtDate=ju,wr.tzDate=Pk,wr.sync=pm;{wr.addGap=bS,wr.clipGaps=Hl;let n=wr.paths={points:bm};n.linear=Cm,n.stepped=kS,n.bars=SS,n.spline=_S}var Em,Im;function FS(){return Im||(Im=1,Em=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}),Em}var PS=FS();const aN=Pn("f",pl(PS));var rh,Rm;function WS(){if(Rm)return rh;Rm=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 rh=n,rh}var ih,Lm;function BS(){if(Lm)return ih;Lm=1;var n=WS();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 ih=t,ih}var oh,Om;function Nm(){if(Om)return oh;Om=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 oh=h,oh}var sh,Dm;function zS(){if(Dm)return sh;Dm=1;function n(t){return t.split("")}return sh=n,sh}var ah,Fm;function jS(){if(Fm)return ah;Fm=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]",l="\\u200d",o=p+"?",c="["+g+"]?",d="(?:"+l+"(?:"+[s,a,u].join("|")+")"+c+o+")*",w=c+o+d,b="(?:"+[s+x+"?",x,a,u,y].join("|")+")",I=RegExp(h+"(?="+h+")|"+b+w,"g");function T(S){return S.match(I)||[]}return ah=T,ah}var lh,Pm;function HS(){if(Pm)return lh;Pm=1;var n=zS(),t=Nm(),e=jS();function r(m){return t(m)?e(m):n(m)}return lh=r,lh}var ch,Wm;function US(){if(Wm)return ch;Wm=1;var n=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo;return ch=n,ch}var uh,Bm;function VS(){if(Bm)return uh;Bm=1;var n=US(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return uh=e,uh}var hh,zm;function dh(){if(zm)return hh;zm=1;var n=VS(),t=n.Symbol;return hh=t,hh}var ph,jm;function qS(){if(jm)return ph;jm=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 ph=n,ph}var gh,Hm;function KS(){if(Hm)return gh;Hm=1;var n=Array.isArray;return gh=n,gh}var fh,Um;function GS(){if(Um)return fh;Um=1;var n=dh(),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 fh=g,fh}var mh,Vm;function YS(){if(Vm)return mh;Vm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return mh=e,mh}var vh,qm;function XS(){if(qm)return vh;qm=1;var n=dh(),t=GS(),e=YS(),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 vh=y,vh}var yh,Km;function QS(){if(Km)return yh;Km=1;function n(t){return t!=null&&typeof t=="object"}return yh=n,yh}var wh,Gm;function ZS(){if(Gm)return wh;Gm=1;var n=XS(),t=QS(),e="[object Symbol]";function r(m){return typeof m=="symbol"||t(m)&&n(m)==e}return wh=r,wh}var bh,Ym;function JS(){if(Ym)return bh;Ym=1;var n=dh(),t=qS(),e=KS(),r=ZS(),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 bh=y,bh}var xh,Xm;function Kl(){if(Xm)return xh;Xm=1;var n=JS();function t(e){return e==null?"":n(e)}return xh=t,xh}var Ch,Qm;function eA(){if(Qm)return Ch;Qm=1;var n=BS(),t=Nm(),e=HS(),r=Kl();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 Ch=m,Ch}var kh,Zm;function Jm(){if(Zm)return kh;Zm=1;var n=eA(),t=n("toUpperCase");return kh=t,kh}var tA=Jm();const nA=pl(tA);var Sh,ev;function rA(){if(ev)return Sh;ev=1;var n=Kl(),t=Jm();function e(r){return t(n(r).toLowerCase())}return Sh=e,Sh}var Ah,tv;function iA(){if(tv)return Ah;tv=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 Ah=n,Ah}var _h,nv;function oA(){if(nv)return _h;nv=1;function n(t){return function(e){return t==null?void 0:t[e]}}return _h=n,_h}var $h,rv;function sA(){if(rv)return $h;rv=1;var n=oA(),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 $h=e,$h}var Th,iv;function aA(){if(iv)return Th;iv=1;var n=sA(),t=Kl(),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 Th=p,Th}var Mh,ov;function lA(){if(ov)return Mh;ov=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Mh=t,Mh}var Eh,sv;function cA(){if(sv)return Eh;sv=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 Eh=t,Eh}var Ih,av;function uA(){if(av)return Ih;av=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",l=x+h+p+s,o="['’]",c="["+l+"]",d="["+m+"]",w="\\d+",b="["+g+"]",I="["+y+"]",T="[^"+n+l+w+g+y+a+"]",S="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+S+")",R="[^"+n+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+a+"]",H="\\u200d",P="(?:"+I+"|"+T+")",O="(?:"+E+"|"+T+")",_="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+N+U,he="(?:"+[b,L,F].join("|")+")"+te,ne=RegExp([E+"?"+I+"+"+_+"(?="+[c,E,"$"].join("|")+")",O+"+"+A+"(?="+[c,E+P,"$"].join("|")+")",E+"?"+P+"+"+_,E+"+"+A,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return Ih=ae,Ih}var Rh,lv;function hA(){if(lv)return Rh;lv=1;var n=lA(),t=cA(),e=Kl(),r=uA();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 Rh=m,Rh}var Lh,cv;function dA(){if(cv)return Lh;cv=1;var n=iA(),t=aA(),e=hA(),r="['’]",m=RegExp(r,"g");function g(y){return function(x){return n(e(t(x).replace(m,"")),y,"")}}return Lh=g,Lh}var Oh,uv;function pA(){if(uv)return Oh;uv=1;var n=rA(),t=dA(),e=t(function(r,m,g){return m=m.toLowerCase(),r+(g?n(m):m)});return Oh=e,Oh}var gA=pA();const fA=pl(gA),mA=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-DAZApfkV-2d1b5b118f998989a958.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-BfsxDplv-b1e6f9d804eb78dae660.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-SDCUWcMQ-edeef73d29abe20bb91d.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-BVMjwC19-3fac2ccb297d788991fe.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-bVkufjRQ-f8a5c23980b229f8c6d4.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget-DpniFfca-f8737f1b6ef9a745c386.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-DHOSz-dJ-f0e9afbb9714000c0adf.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-zrURWWUL-6f5f320b1d33d183e0b5.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-D-XAMifp-31cf85ec812518ba00ef.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-BsIdBtEb-51fbc6ba569ef37deff2.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-CA2aPGRg-f1286048615bb5f700ad.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-J7epKRlo-d74b3f7b68b4f676863d.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-ByH-PDRG-941f6164b10840985272.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-Bdm_fMzW-92420a39ce9a36f589bc.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-BaQqthC7-d7e6b35f69c53a6618cf.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-CfMtj7H8-b8caf1acd10aa7ac5238.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget--H5B9i_Y-2a7d8bcdfd7aa164c34f.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-D_gzrOWs-f278d7d00474f99e3f44.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-GDcjO-UB-47800408a736723d8fe0.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-DZvOYFxf-fbcf1ac5d88a86b516e8.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-CuUav9b3-b7f6d0d1e20fd427a2e3.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-BMZ6REN4-5f2e19a2e68fa86bcb73.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-oh6FIG6s-390c9d4a44ee3f55d9fe.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-Bic36les-de0d4273398751de217e.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-CqIiGoDb-d05aa715c5b219749056.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-DLhmqO02-161cebd576c62c7f62a0.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-BefwSSVq-a52d21407be6baa90e80.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-NxrCzznm-54db0e493fee04b5f1b8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-pq7qoolL-b3ed8d46fd5eb3a97bda.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-edkpogsl-1d3a4aacb86e114c34fc.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-DpJNv9dh-6776c4748657a15512c4.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget--4eSxBnn-5b4e501c768df88c8619.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-BQaumgRt-14fd2237a9de4399f1a6.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-BBF9sRtF-675d491b16c1adcff91c.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-DZZtSoXw-ec2c694db039ea1e7523.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-DTLZmyWs-38e6e96910795a584759.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-dpgZz4wR-fe30559474f289f7fc62.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-7cYr8136-f228ebaa10b9e42956d0.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-DTfn-7F2-9516baa81defead4afe2.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-DWvTpw94-1722e9a1342505816ebc.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-CG2Y7eYp-e8b88eecd38dfbf9d6c4.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-C6HKTfCR-dd69122eb9d6b4dcf9fd.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-DvhBCYd2-e7b1d670e0820f141827.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-BZIoGjam-b05357b8ab1c89872a38.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-YBS8RZIE-70b8b7ee98ecff02a5db.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-BMhY9vYe-c8940b78c4a47dcc26cf.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-RfET19pq-c09bb3cd64c076c7d91e.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-M8vFBSxS-ca85806a5f5bc1eca286.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget-Dev7lCsT-a0ac820f98e71778be9b.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-CQzn13rQ-6bb39013e2924d5d47de.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-C4zbSian-ac1d1f33e58cb60dc918.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-BVI6uUVX-5e6354bbcfac8d565f2d.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-BiIcery0-949bf93827a3c82d216c.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-BiRI8GbI-d19441bb12342ec8bd64.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-CtMFQu9--83eaf00523afe9c256d1.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-CRmcpQBn-792b5dafca1536fed3d0.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-C-qChjug-a35ce83739c205b61ca8.js"),void 0)}),vA=Object.entries(mA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=nA(fA(t.replace(/\.\w+$/,"")));return{...n,[r]:np(e)}},{}),lN=Pn("U",{components:vA});function hv(n,t){return function(){return n.apply(t,arguments)}}const{toString:yA}=Object.prototype,{getPrototypeOf:Nh}=Object,{iterator:Gl,toStringTag:dv}=Symbol,Yl=(n=>t=>{const e=yA.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ri=n=>(n=n.toLowerCase(),t=>Yl(t)===n),Xl=n=>t=>typeof t===n,{isArray:ta}=Array,Pa=Xl("undefined");function wA(n){return n!==null&&!Pa(n)&&n.constructor!==null&&!Pa(n.constructor)&&zr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const pv=Ri("ArrayBuffer");function bA(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&pv(n.buffer),t}const xA=Xl("string"),zr=Xl("function"),gv=Xl("number"),Ql=n=>n!==null&&typeof n=="object",CA=n=>n===!0||n===!1,Zl=n=>{if(Yl(n)!=="object")return!1;const t=Nh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dv in n)&&!(Gl in n)},kA=Ri("Date"),SA=Ri("File"),AA=Ri("Blob"),_A=Ri("FileList"),$A=n=>Ql(n)&&zr(n.pipe),TA=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||zr(n.append)&&((t=Yl(n))==="formdata"||t==="object"&&zr(n.toString)&&n.toString()==="[object FormData]"))},MA=Ri("URLSearchParams"),[EA,IA,RA,LA]=["ReadableStream","Request","Response","Headers"].map(Ri),OA=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wa(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,m;if(typeof n!="object"&&(n=[n]),ta(n))for(r=0,m=n.length;r<m;r++)t.call(null,n[r],r,n);else{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 fv(n,t){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,mv=n=>!Pa(n)&&n!==ms;function Dh(){const{caseless:n}=mv(this)&&this||{},t={},e=(r,m)=>{const g=n&&fv(t,m)||m;Zl(t[g])&&Zl(r)?t[g]=Dh(t[g],r):Zl(r)?t[g]=Dh({},r):ta(r)?t[g]=r.slice():t[g]=r};for(let r=0,m=arguments.length;r<m;r++)arguments[r]&&Wa(arguments[r],e);return t}const NA=(n,t,e,{allOwnKeys:r}={})=>(Wa(t,(m,g)=>{e&&zr(m)?n[g]=hv(m,e):n[g]=m},{allOwnKeys:r}),n),DA=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),FA=(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)},PA=(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&&Nh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},WA=(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},BA=n=>{if(!n)return null;if(ta(n))return n;let t=n.length;if(!gv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},zA=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Nh(Uint8Array)),jA=(n,t)=>{const e=(n&&n[Gl]).call(n);let r;for(;(r=e.next())&&!r.done;){const m=r.value;t.call(n,m[0],m[1])}},HA=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},UA=Ri("HTMLFormElement"),VA=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),vv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),qA=Ri("RegExp"),yv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Wa(e,(m,g)=>{let y;(y=t(m,g,n))!==!1&&(r[g]=y||m)}),Object.defineProperties(n,r)},KA=n=>{yv(n,(t,e)=>{if(zr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(zr(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+"'")})}})},GA=(n,t)=>{const e={},r=m=>{m.forEach(g=>{e[g]=!0})};return ta(n)?r(n):r(String(n).split(t)),e},YA=()=>{},XA=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function QA(n){return!!(n&&zr(n.append)&&n[dv]==="FormData"&&n[Gl])}const ZA=n=>{const t=new Array(10),e=(r,m)=>{if(Ql(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[m]=r;const g=ta(r)?[]:{};return Wa(r,(y,x)=>{const h=e(y,m+1);!Pa(h)&&(g[x]=h)}),t[m]=void 0,g}}return r};return e(n,0)},JA=Ri("AsyncFunction"),e_=n=>n&&(Ql(n)||zr(n))&&zr(n.then)&&zr(n.catch),wv=((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",zr(ms.postMessage)),t_=typeof queueMicrotask<"u"?queueMicrotask.bind(ms):typeof process<"u"&&process.nextTick||wv,n_=n=>n!=null&&zr(n[Gl]),_e={isArray:ta,isArrayBuffer:pv,isBuffer:wA,isFormData:TA,isArrayBufferView:bA,isString:xA,isNumber:gv,isBoolean:CA,isObject:Ql,isPlainObject:Zl,isReadableStream:EA,isRequest:IA,isResponse:RA,isHeaders:LA,isUndefined:Pa,isDate:kA,isFile:SA,isBlob:AA,isRegExp:qA,isFunction:zr,isStream:$A,isURLSearchParams:MA,isTypedArray:zA,isFileList:_A,forEach:Wa,merge:Dh,extend:NA,trim:OA,stripBOM:DA,inherits:FA,toFlatObject:PA,kindOf:Yl,kindOfTest:Ri,endsWith:WA,toArray:BA,forEachEntry:jA,matchAll:HA,isHTMLForm:UA,hasOwnProperty:vv,hasOwnProp:vv,reduceDescriptors:yv,freezeMethods:KA,toObjectSet:GA,toCamelCase:VA,noop:YA,toFiniteNumber:XA,findKey:fv,global:ms,isContextDefined:mv,isSpecCompliantForm:QA,toJSONObject:ZA,isAsyncFn:JA,isThenable:e_,setImmediate:wv,asap:t_,isIterable:n_};function Mt(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)}_e.inherits(Mt,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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const bv=Mt.prototype,xv={};["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=>{xv[n]={value:n}}),Object.defineProperties(Mt,xv),Object.defineProperty(bv,"isAxiosError",{value:!0}),Mt.from=(n,t,e,r,m,g)=>{const y=Object.create(bv);return _e.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),Mt.call(y,n.message,t,e,r,m),y.cause=n,y.name=n.name,g&&Object.assign(y,g),y};const r_=null;function Fh(n){return _e.isPlainObject(n)||_e.isArray(n)}function Cv(n){return _e.endsWith(n,"[]")?n.slice(0,-2):n}function kv(n,t,e){return n?n.concat(t).map(function(r,m){return r=Cv(r),!e&&m?"["+r+"]":r}).join(e?".":""):t}function i_(n){return _e.isArray(n)&&!n.some(Fh)}const o_=_e.toFlatObject(_e,{},null,function(n){return/^is[A-Z]/.test(n)});function Jl(n,t,e){if(!_e.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=_e.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!_e.isUndefined(o[l])});const r=e.metaTokens,m=e.visitor||p,g=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(m))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(_e.isDate(l))return l.toISOString();if(!x&&_e.isBlob(l))throw new Mt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(l)||_e.isTypedArray(l)?x&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function p(l,o,c){let d=l;if(l&&!c&&typeof l=="object"){if(_e.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(_e.isArray(l)&&i_(l)||(_e.isFileList(l)||_e.endsWith(o,"[]"))&&(d=_e.toArray(l)))return o=Cv(o),d.forEach(function(w,b){!(_e.isUndefined(w)||w===null)&&t.append(y===!0?kv([o],b,g):y===null?o:o+"[]",h(w))}),!1}return Fh(l)?!0:(t.append(kv(c,o,g),h(l)),!1)}const s=[],a=Object.assign(o_,{defaultVisitor:p,convertValue:h,isVisitable:Fh});function u(l,o){if(!_e.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),_e.forEach(l,function(c,d){(!(_e.isUndefined(c)||c===null)&&m.call(t,c,_e.isString(d)?d.trim():d,o,a))===!0&&u(c,o?o.concat(d):[d])}),s.pop()}}if(!_e.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Sv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ph(n,t){this._pairs=[],n&&Jl(n,this,t)}const Av=Ph.prototype;Av.append=function(n,t){this._pairs.push([n,t])},Av.toString=function(n){const t=n?function(e){return n.call(this,e,Sv)}:Sv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function s_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _v(n,t,e){if(!t)return n;const r=e&&e.encode||s_;_e.isFunction(e)&&(e={serialize:e});const m=e&&e.serialize;let g;if(m?g=m(t,e):g=_e.isURLSearchParams(t)?t.toString():new Ph(t,e).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}let $v=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(e){e!==null&&t(e)})}};const Tv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},a_=typeof URLSearchParams<"u"?URLSearchParams:Ph,l_=typeof FormData<"u"?FormData:null,c_=typeof Blob<"u"?Blob:null,u_={isBrowser:!0,classes:{URLSearchParams:a_,FormData:l_,Blob:c_},protocols:["http","https","file","blob","url","data"]},Wh=typeof window<"u"&&typeof document<"u",Bh=typeof navigator=="object"&&navigator||void 0,h_=Wh&&(!Bh||["ReactNative","NativeScript","NS"].indexOf(Bh.product)<0),d_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",p_=Wh&&window.location.href||"http://localhost",g_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wh,hasStandardBrowserEnv:h_,hasStandardBrowserWebWorkerEnv:d_,navigator:Bh,origin:p_},Symbol.toStringTag,{value:"Module"})),br={...g_,...u_};function f_(n,t){return Jl(n,new br.classes.URLSearchParams,Object.assign({visitor:function(e,r,m,g){return br.isNode&&_e.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)}},t))}function m_(n){return _e.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function v_(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 Mv(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&&_e.isArray(m)?m.length:y,h?(_e.hasOwnProp(m,y)?m[y]=[m[y],r]:m[y]=r,!x):((!m[y]||!_e.isObject(m[y]))&&(m[y]=[]),t(e,r,m[y],g)&&_e.isArray(m[y])&&(m[y]=v_(m[y])),!x)}if(_e.isFormData(n)&&_e.isFunction(n.entries)){const e={};return _e.forEachEntry(n,(r,m)=>{t(m_(r),m,e,0)}),e}return null}function y_(n,t,e){if(_e.isString(n))try{return(t||JSON.parse)(n),_e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Ba={transitional:Tv,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,m=_e.isObject(n);if(m&&_e.isHTMLForm(n)&&(n=new FormData(n)),_e.isFormData(n))return r?JSON.stringify(Mv(n)):n;if(_e.isArrayBuffer(n)||_e.isBuffer(n)||_e.isStream(n)||_e.isFile(n)||_e.isBlob(n)||_e.isReadableStream(n))return n;if(_e.isArrayBufferView(n))return n.buffer;if(_e.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(m){if(e.indexOf("application/x-www-form-urlencoded")>-1)return f_(n,this.formSerializer).toString();if((g=_e.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Jl(g?{"files[]":n}:n,y&&new y,this.formSerializer)}}return m||r?(t.setContentType("application/json",!1),y_(n)):n}],transformResponse:[function(n){const t=this.transitional||Ba.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(_e.isResponse(n)||_e.isReadableStream(n))return n;if(n&&_e.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"?Mt.from(g,Mt.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:br.classes.FormData,Blob:br.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],n=>{Ba.headers[n]={}});const w_=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),b_=n=>{const t={};let e,r,m;return n&&n.split(`
|
1492
|
+
`).forEach(function(g){m=g.indexOf(":"),e=g.substring(0,m).trim().toLowerCase(),r=g.substring(m+1).trim(),!(!e||t[e]&&w_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Ev=Symbol("internals");function za(n){return n&&String(n).trim().toLowerCase()}function ec(n){return n===!1||n==null?n:_e.isArray(n)?n.map(ec):String(n)}function x_(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 C_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function zh(n,t,e,r,m){if(_e.isFunction(r))return r.call(this,t,e);if(m&&(t=e),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function k_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function S_(n,t){const e=_e.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 jr=class{constructor(t){t&&this.set(t)}set(t,e,r){const m=this;function g(x,h,p){const s=za(h);if(!s)throw new Error("header name must be a non-empty string");const a=_e.findKey(m,s);(!a||m[a]===void 0||p===!0||p===void 0&&m[a]!==!1)&&(m[a||h]=ec(x))}const y=(x,h)=>_e.forEach(x,(p,s)=>g(p,s,h));if(_e.isPlainObject(t)||t instanceof this.constructor)y(t,e);else if(_e.isString(t)&&(t=t.trim())&&!C_(t))y(b_(t),e);else if(_e.isObject(t)&&_e.isIterable(t)){let x={},h,p;for(const s of t){if(!_e.isArray(s))throw TypeError("Object iterator must return a key-value pair");x[p=s[0]]=(h=x[p])?_e.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}y(x,e)}else t!=null&&g(e,t,r);return this}get(t,e){if(t=za(t),t){const r=_e.findKey(this,t);if(r){const m=this[r];if(!e)return m;if(e===!0)return x_(m);if(_e.isFunction(e))return e.call(this,m,r);if(_e.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=za(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||zh(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let m=!1;function g(y){if(y=za(y),y){const x=_e.findKey(r,y);x&&(!e||zh(r,r[x],x,e))&&(delete r[x],m=!0)}}return _e.isArray(t)?t.forEach(g):g(t),m}clear(t){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const g=e[r];(!t||zh(this,this[g],g,t,!0))&&(delete this[g],m=!0)}return m}normalize(t){const e=this,r={};return _e.forEach(this,(m,g)=>{const y=_e.findKey(r,g);if(y){e[y]=ec(m),delete e[g];return}const x=t?k_(g):String(g).trim();x!==g&&delete e[g],e[x]=ec(m),r[x]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return _e.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=t&&_e.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
1493
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(m=>r.set(m)),r}static accessor(t){const e=(this[Ev]=this[Ev]={accessors:{}}).accessors,r=this.prototype;function m(g){const y=za(g);e[y]||(S_(r,g),e[y]=!0)}return _e.isArray(t)?t.forEach(m):m(t),this}};jr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(jr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),_e.freezeMethods(jr);function jh(n,t){const e=this||Ba,r=t||e,m=jr.from(r.headers);let g=r.data;return _e.forEach(n,function(y){g=y.call(e,g,m.normalize(),t?t.status:void 0)}),m.normalize(),g}function Iv(n){return!!(n&&n.__CANCEL__)}function na(n,t,e){Mt.call(this,n??"canceled",Mt.ERR_CANCELED,t,e),this.name="CanceledError"}_e.inherits(na,Mt,{__CANCEL__:!0});function Rv(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new Mt("Request failed with status code "+e.status,[Mt.ERR_BAD_REQUEST,Mt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function A_(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function __(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 $_(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.apply(null,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 tc=(n,t,e=3)=>{let r=0;const m=__(50,250);return $_(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)},Lv=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Ov=n=>(...t)=>_e.asap(()=>n(...t)),T_=br.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,br.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(br.origin),br.navigator&&/(msie|trident)/i.test(br.navigator.userAgent)):()=>!0,M_=br.hasStandardBrowserEnv?{write(n,t,e,r,m,g){const y=[n+"="+encodeURIComponent(t)];_e.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),_e.isString(r)&&y.push("path="+r),_e.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 E_(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function I_(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Nv(n,t,e){let r=!E_(t);return n&&(r||e==!1)?I_(n,t):t}const Dv=n=>n instanceof jr?{...n}:n;function vs(n,t){t=t||{};const e={};function r(p,s,a,u){return _e.isPlainObject(p)&&_e.isPlainObject(s)?_e.merge.call({caseless:u},p,s):_e.isPlainObject(s)?_e.merge({},s):_e.isArray(s)?s.slice():s}function m(p,s,a,u){if(_e.isUndefined(s)){if(!_e.isUndefined(p))return r(void 0,p,a,u)}else return r(p,s,a,u)}function g(p,s){if(!_e.isUndefined(s))return r(void 0,s)}function y(p,s){if(_e.isUndefined(s)){if(!_e.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(Dv(p),Dv(s),a,!0)};return _e.forEach(Object.keys(Object.assign({},n,t)),function(p){const s=h[p]||m,a=s(n[p],t[p],p);_e.isUndefined(a)&&s!==x||(e[p]=a)}),e}const Fv=n=>{const t=vs({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:m,xsrfCookieName:g,headers:y,auth:x}=t;t.headers=y=jr.from(y),t.url=_v(Nv(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(_e.isFormData(e)){if(br.hasStandardBrowserEnv||br.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(br.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&T_(t.url))){const p=m&&g&&M_.read(g);p&&y.set(m,p)}return t},R_=typeof XMLHttpRequest<"u",L_=R_&&function(n){return new Promise(function(t,e){const r=Fv(n);let m=r.data;const g=jr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,p,s,a,u,l;function o(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function d(){if(!c)return;const b=jr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),I={data:!y||y==="text"||y==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:b,config:n,request:c};Rv(function(T){t(T),o()},function(T){e(T),o()},I),c=null}"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(e(new Mt("Request aborted",Mt.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new Mt("Network Error",Mt.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||Tv;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new Mt(b,I.clarifyTimeoutError?Mt.ETIMEDOUT:Mt.ECONNABORTED,n,c)),c=null},m===void 0&&g.setContentType(null),"setRequestHeader"in c&&_e.forEach(g.toJSON(),function(b,I){c.setRequestHeader(I,b)}),_e.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),y&&y!=="json"&&(c.responseType=r.responseType),h&&([a,l]=tc(h,!0),c.addEventListener("progress",a)),x&&c.upload&&([s,u]=tc(x),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=b=>{c&&(e(!b||b.type?new na(null,n,c):b),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=A_(r.url);if(w&&br.protocols.indexOf(w)===-1){e(new Mt("Unsupported protocol "+w+":",Mt.ERR_BAD_REQUEST,n));return}c.send(m||null)})},O_=(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 Mt?s:new na(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,g(new Mt(`timeout ${t} of ms exceeded`,Mt.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=()=>_e.asap(x),h}},N_=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},D_=async function*(n,t){for await(const e of F_(n))yield*N_(e,t)},F_=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()}},Pv=(n,t,e,r)=>{const m=D_(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})},nc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wv=nc&&typeof ReadableStream=="function",P_=nc&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Bv=(n,...t)=>{try{return!!n(...t)}catch{return!1}},W_=Wv&&Bv(()=>{let n=!1;const t=new Request(br.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),zv=64*1024,Hh=Wv&&Bv(()=>_e.isReadableStream(new Response("").body)),rc={stream:Hh&&(n=>n.body)};nc&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!rc[t]&&(rc[t]=_e.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new Mt(`Response type '${t}' is not supported`,Mt.ERR_NOT_SUPPORT,r)})})})(new Response);const B_=async n=>{if(n==null)return 0;if(_e.isBlob(n))return n.size;if(_e.isSpecCompliantForm(n))return(await new Request(br.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(n)||_e.isArrayBuffer(n))return n.byteLength;if(_e.isURLSearchParams(n)&&(n=n+""),_e.isString(n))return(await P_(n)).byteLength},z_=async(n,t)=>_e.toFiniteNumber(n.getContentLength())??B_(t),j_=nc&&(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}=Fv(n);p=p?(p+"").toLowerCase():"text";let l=O_([m,g&&g.toAbortSignal()],y),o;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let d;try{if(h&&W_&&e!=="get"&&e!=="head"&&(d=await z_(s,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=S.headers.get("content-type"))&&s.setContentType(C),S.body){const[R,L]=Lv(d,tc(Ov(h)));r=Pv(S.body,zv,R,L)}}_e.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:l,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o);const I=Hh&&(p==="stream"||p==="response");if(Hh&&(x||I&&c)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=b[F]});const C=_e.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&Lv(C,tc(Ov(x),!0))||[];b=new Response(Pv(b.body,zv,R,()=>{L&&L(),c&&c()}),S)}p=p||"text";let T=await rc[_e.findKey(rc,p)||"text"](b,n);return!I&&c&&c(),await new Promise((S,C)=>{Rv(S,C,{data:T,headers:jr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Mt("Network Error",Mt.ERR_NETWORK,n,o),{cause:w.cause||w}):Mt.from(w,w&&w.code,n,o)}}),Uh={http:r_,xhr:L_,fetch:j_};_e.forEach(Uh,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const jv=n=>`- ${n}`,H_=n=>_e.isFunction(n)||n===null||n===!1,Hv={getAdapter:n=>{n=_e.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,!H_(e)&&(r=Uh[(y=String(e)).toLowerCase()],r===void 0))throw new Mt(`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 :
|
1494
|
+
`+g.map(jv).join(`
|
1495
|
+
`):" "+jv(g[0]):"as no adapter specified";throw new Mt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:Uh};function Vh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new na(null,n)}function Uv(n){return Vh(n),n.headers=jr.from(n.headers),n.data=jh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Hv.getAdapter(n.adapter||Ba.adapter)(n).then(function(t){return Vh(n),t.data=jh.call(n,n.transformResponse,t),t.headers=jr.from(t.headers),t},function(t){return Iv(t)||(Vh(n),t&&t.response&&(t.response.data=jh.call(n,n.transformResponse,t.response),t.response.headers=jr.from(t.response.headers))),Promise.reject(t)})}const Vv="1.9.0",ic={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{ic[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const qv={};ic.transitional=function(n,t,e){function r(m,g){return"[Axios v"+Vv+"] Transitional option '"+m+"'"+g+(e?". "+e:"")}return(m,g,y)=>{if(n===!1)throw new Mt(r(g," has been removed"+(t?" in "+t:"")),Mt.ERR_DEPRECATED);return t&&!qv[g]&&(qv[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}},ic.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function U_(n,t,e){if(typeof n!="object")throw new Mt("options must be an object",Mt.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 Mt("option "+g+" must be "+h,Mt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Mt("Unknown option "+g,Mt.ERR_BAD_OPTION)}}const oc={assertOptions:U_,validators:ic},Gi=oc.validators;let ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new $v,response:new $v}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const g=m.stack?m.stack.replace(/^.+\n/,""):"";try{r.stack?g&&!String(r.stack).endsWith(g.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
1496
|
+
`+g):r.stack=g}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=vs(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:g}=e;r!==void 0&&oc.assertOptions(r,{silentJSONParsing:Gi.transitional(Gi.boolean),forcedJSONParsing:Gi.transitional(Gi.boolean),clarifyTimeoutError:Gi.transitional(Gi.boolean)},!1),m!=null&&(_e.isFunction(m)?e.paramsSerializer={serialize:m}:oc.assertOptions(m,{encode:Gi.function,serialize:Gi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),oc.assertOptions(e,{baseUrl:Gi.spelling("baseURL"),withXsrfToken:Gi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let y=g&&_e.merge(g.common,g[e.method]);g&&_e.forEach(["delete","get","head","post","put","patch","common"],o=>{delete g[o]}),e.headers=jr.concat(y,g);const x=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(e)===!1||(h=h&&o.synchronous,x.unshift(o.fulfilled,o.rejected))});const p=[];this.interceptors.response.forEach(function(o){p.push(o.fulfilled,o.rejected)});let s,a=0,u;if(!h){const o=[Uv.bind(this),void 0];for(o.unshift.apply(o,x),o.push.apply(o,p),u=o.length,s=Promise.resolve(e);a<u;)s=s.then(o[a++],o[a++]);return s}u=x.length;let l=e;for(a=0;a<u;){const o=x[a++],c=x[a++];try{l=o(l)}catch(d){c.call(this,d);break}}try{s=Uv.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,u=p.length;a<u;)s=s.then(p[a++],p[a++]);return s}getUri(t){t=vs(this.defaults,t);const e=Nv(t.baseURL,t.url,t.allowAbsoluteUrls);return _v(e,t.params,t.paramsSerializer)}};_e.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}))}}),_e.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 V_=class yb{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 na(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 yb(function(e){t=e}),cancel:t}}};function q_(n){return function(t){return n.apply(null,t)}}function K_(n){return _e.isObject(n)&&n.isAxiosError===!0}const qh={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(qh).forEach(([n,t])=>{qh[t]=n});function Kv(n){const t=new ys(n),e=hv(ys.prototype.request,t);return _e.extend(e,ys.prototype,t,{allOwnKeys:!0}),_e.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Kv(vs(n,r))},e}const Yn=Pn("E",Kv(Ba));Yn.Axios=ys,Yn.CanceledError=na,Yn.CancelToken=V_,Yn.isCancel=Iv,Yn.VERSION=Vv,Yn.toFormData=Jl,Yn.AxiosError=Mt,Yn.Cancel=Yn.CanceledError,Yn.all=function(n){return Promise.all(n)},Yn.spread=q_,Yn.isAxiosError=K_,Yn.mergeConfig=vs,Yn.AxiosHeaders=jr,Yn.formToJSON=n=>Mv(_e.isHTMLForm(n)?new FormData(n):n),Yn.getAdapter=Hv.getAdapter,Yn.HttpStatusCode=qh,Yn.default=Yn;const{Axios:cN,AxiosError:uN,CanceledError:hN,isCancel:dN,CancelToken:pN,VERSION:gN,all:fN,Cancel:mN,isAxiosError:vN,spread:yN,toFormData:wN,AxiosHeaders:bN,HttpStatusCode:xN,formToJSON:CN,getAdapter:kN,mergeConfig:SN}=Yn;function Gv(){return Object.assign({},Ws())}function G_(n,t,e){const r=bn(n,void 0);return r.setTime(r.getTime()+t*hl),r}function Y_(n,t){const e=()=>Kn(void 0,NaN),r=J_(n);let m;if(r.date){const h=e$(r.date,2);m=t$(h.restDateString,h.year)}if(!m||isNaN(+m))return e();const g=+m;let y=0,x;if(r.time&&(y=n$(r.time),isNaN(y)))return e();if(r.timezone){if(x=r$(r.timezone),isNaN(x))return e()}else{const h=new Date(g+y),p=bn(0,void 0);return p.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),p.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),p}return bn(g+y+x,void 0)}const sc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},X_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Q_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Z_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function J_(n){const t={},e=n.split(sc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],sc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(sc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const m=sc.timezone.exec(r);m?(t.time=r.replace(m[1],""),t.timezone=m[1]):t.time=r}return t}function e$(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 t$(n,t){if(t===null)return new Date(NaN);const e=n.match(X_);if(!e)return new Date(NaN);const r=!!e[4],m=ja(e[1]),g=ja(e[2])-1,y=ja(e[3]),x=ja(e[4]),h=ja(e[5])-1;if(r)return l$(t,x,h)?i$(t,x,h):new Date(NaN);{const p=new Date(0);return!s$(t,g,y)||!a$(t,m)?new Date(NaN):(p.setUTCFullYear(t,g,Math.max(m,y)),p)}}function ja(n){return n?parseInt(n):1}function n$(n){const t=n.match(Q_);if(!t)return NaN;const e=Kh(t[1]),r=Kh(t[2]),m=Kh(t[3]);return c$(e,r,m)?e*Qc+r*hl+m*1e3:NaN}function Kh(n){return n&&parseFloat(n.replace(",","."))||0}function r$(n){if(n==="Z")return 0;const t=n.match(Z_);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),m=t[3]&&parseInt(t[3])||0;return u$(r,m)?e*(r*Qc+m*hl):NaN}function i$(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 o$=[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 s$(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(o$[t]||(Yv(n)?29:28))}function a$(n,t){return t>=1&&t<=(Yv(n)?366:365)}function l$(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function c$(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function u$(n,t){return t>=0&&t<=59}function h$(n,t,e){return G_(n,-t)}function Xv(n,t,e){const r=Gv(),m=g$(n,e.timeZone,e.locale??r.locale);return"formatToParts"in m?d$(m,t):p$(m,t)}function d$(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 p$(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function g$(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function f$(n,t){const e=b$(t);return"formatToParts"in e?v$(e,n):y$(e,n)}const m$={year:0,month:1,day:2,hour:3,minute:4,second:5};function v$(n,t){try{const e=n.formatToParts(t),r=[];for(let m=0;m<e.length;m++){const g=m$[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 y$(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 Gh={},Qv=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")),w$=Qv==="06/25/2014, 00:00:00"||Qv==="06/25/2014 00:00:00";function b$(n){return Gh[n]||(Gh[n]=w$?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"})),Gh[n]}function Zv(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 Jv=36e5,x$=6e4,Yh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Xh(n,t,e){if(!n)return 0;let r=Yh.timezoneZ.exec(n);if(r)return 0;let m,g;if(r=Yh.timezoneHH.exec(n),r)return m=parseInt(r[1],10),ey(m)?-(m*Jv):NaN;if(r=Yh.timezoneHHMM.exec(n),r){m=parseInt(r[2],10);const y=parseInt(r[3],10);return ey(m,y)?(g=Math.abs(m)*Jv+y*x$,r[1]==="+"?-g:g):NaN}if(S$(n)){t=new Date(t||Date.now());const y=e?t:C$(t),x=Qh(y,n);return-(e?x:k$(t,x,n))}return NaN}function C$(n){return Zv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Qh(n,t){const e=f$(n,t),r=Zv(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 k$(n,t,e){let r=n.getTime()-t;const m=Qh(new Date(r),e);if(t===m)return t;r-=m-t;const g=Qh(new Date(r),e);return m===g?m:Math.max(m,g)}function ey(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const ty={};function S$(n){if(ty[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),ty[n]=!0,!0}catch{return!1}}const A$=60*1e3,_$={X:function(n,t,e){const r=Zh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return ny(r);case"XXXX":case"XX":return ra(r);case"XXXXX":case"XXX":default:return ra(r,":")}},x:function(n,t,e){const r=Zh(e.timeZone,n);switch(t){case"x":return ny(r);case"xxxx":case"xx":return ra(r);case"xxxxx":case"xxx":default:return ra(r,":")}},O:function(n,t,e){const r=Zh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+$$(r,":");case"OOOO":default:return"GMT"+ra(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Xv("short",n,e);case"zzzz":default:return Xv("long",n,e)}}};function Zh(n,t){const e=n?Xh(n,t,!0)/A$:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ac(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ra(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=ac(Math.floor(r/60),2),g=ac(Math.floor(r%60),2);return e+m+t+g}function ny(n,t){return n%60===0?(n>0?"-":"+")+ac(Math.abs(n)/60,2):ra(n,t)}function $$(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+ac(g,2)}function ry(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 T$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Jh=36e5,iy=6e4,M$=2,Er={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:T$};function oy(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?M$:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=E$(n),{year:m,restDateString:g}=I$(r.date,e),y=R$(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=L$(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(p=Xh(r.timeZone||t.timeZone,new Date(x+h)),isNaN(p))return new Date(NaN)}else p=ry(new Date(x+h)),p=ry(new Date(x+h+p));return new Date(x+h+p)}else return new Date(NaN)}function E$(n){const t={};let e=Er.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Er.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const m=Er.timeZone.exec(r);m?(t.time=r.replace(m[1],""),t.timeZone=m[1].trim()):t.time=r}return t}function I$(n,t){if(n){const e=Er.YYY[t],r=Er.YYYYY[t];let m=Er.YYYY.exec(n)||r.exec(n);if(m){const g=m[1];return{year:parseInt(g,10),restDateString:n.slice(g.length)}}if(m=Er.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 R$(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=Er.MM.exec(n);if(g)return e=new Date(0),r=parseInt(g[1],10)-1,ly(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(g=Er.DDD.exec(n),g){e=new Date(0);const y=parseInt(g[1],10);return D$(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(g=Er.MMDD.exec(n),g){e=new Date(0),r=parseInt(g[1],10)-1;const y=parseInt(g[2],10);return ly(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(g=Er.Www.exec(n),g)return m=parseInt(g[1],10)-1,cy(m)?sy(t,m):new Date(NaN);if(g=Er.WwwD.exec(n),g){m=parseInt(g[1],10)-1;const y=parseInt(g[2],10)-1;return cy(m,y)?sy(t,m,y):new Date(NaN)}return null}function L$(n){let t,e,r=Er.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),ed(t)?t%24*Jh:NaN;if(r=Er.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),ed(t,e)?t%24*Jh+e*iy:NaN;if(r=Er.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return ed(t,e,m)?t%24*Jh+e*iy+m*1e3:NaN}return null}function sy(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 O$=[31,28,31,30,31,30,31,31,30,31,30,31],N$=[31,29,31,30,31,30,31,31,30,31,30,31];function ay(n){return n%400===0||n%4===0&&n%100!==0}function ly(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=ay(n);if(r&&e>N$[t]||!r&&e>O$[t])return!1}return!0}function D$(n,t){if(t<1)return!1;const e=ay(n);return!(e&&t>366||!e&&t>365)}function cy(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function ed(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const F$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function P$(n,t,e={}){t=String(t);const r=t.match(F$);if(r){const m=oy(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,"'"+_$[y[0]](m,y,e)+"'");return h?p.substring(0,x-1)+p.substring(x+1):p},t)}return rs(n,t,e)}function W$(n,t,e){n=oy(n,e);const r=Xh(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 lc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},P$(W$(n,t,{timeZone:r.timeZone}),e,r)}const cc="yyyy-MM-dd",uy="HH:mm:ss.SSS",hy="HH:mm:ss",uc=`${cc} ${uy}`,dy=`${cc} ${hy}`,AN=Pn("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"?h$(n,n.getTimezoneOffset()):n,uc)},formatDateTime(n,t){return!t||t==="local"?rs(n,uc):lc(n,t,uc)},formatDateTimeHMS(n,t){return!t||t==="local"?rs(n,dy):lc(n,t,dy)},formatDate:function(n,t){return!t||t==="local"?rs(n,cc):lc(n,this.timeZone,cc)},formatTime:function(n,t,e=uy){return!t||t==="local"?rs(n,e):lc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,hy)},formatTimestamp(n,t){return this.formatDateTime(Y_(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 B$=Object.defineProperty,z$=(n,t,e)=>t in n?B$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>z$(n,typeof t!="symbol"?t+"":t,e);function td(n,t,e){const r=bn(n,e==null?void 0:e.in);return isNaN(t)?Kn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function j$(n,t){const e=bn(n,void 0).getDay();return e===0?7:e}function H$(n,t){const e=U$(t)?new t(0):Kn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function U$(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const V$=10;let py=class{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}};class q$ extends py{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)}}class K$ extends py{constructor(t,e){super(),Je(this,"priority",V$),Je(this,"subPriority",-1),this.context=t||(r=>Kn(e,r))}set(t,e){return e.timestampIsSet?t:Kn(t,H$(t,this.context))}}class en{run(t,e,r,m){const g=this.parse(t,e,r,m);return g?{setter:new q$(g.value,this.validate,this.set,this.priority,this.subPriority),rest:g.rest}:null}validate(t,e,r){return!0}}class G$ extends en{constructor(){super(...arguments),Je(this,"priority",140),Je(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 Bn={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}/},Yi={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 zn(n,t){return n&&{value:t(n.value),rest:n.rest}}function An(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Xi(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*Qc+g*hl+y*Db),rest:t.slice(e[0].length)}}function gy(n){return An(Bn.anyDigitsSigned,n)}function Mn(n,t){switch(n){case 1:return An(Bn.singleDigit,t);case 2:return An(Bn.twoDigits,t);case 3:return An(Bn.threeDigits,t);case 4:return An(Bn.fourDigits,t);default:return An(new RegExp("^\\d{1,"+n+"}"),t)}}function fy(n,t){switch(n){case 1:return An(Bn.singleDigitSigned,t);case 2:return An(Bn.twoDigitsSigned,t);case 3:return An(Bn.threeDigitsSigned,t);case 4:return An(Bn.fourDigitsSigned,t);default:return An(new RegExp("^-?\\d{1,"+n+"}"),t)}}function nd(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 my(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 vy(n){return n%400===0||n%4===0&&n%100!==0}class Y$ extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(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 zn(Mn(4,t),m);case"yo":return zn(r.ordinalNumber(t,{unit:"year"}),m);default:return zn(Mn(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=my(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}}let X$=class extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(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 zn(Mn(4,t),m);case"Yo":return zn(r.ordinalNumber(t,{unit:"year"}),m);default:return zn(Mn(e.length,t),m)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,m){const g=Jc(t,m);if(r.isTwoDigitYear){const x=my(r.year,g);return t.setFullYear(x,0,m.firstWeekContainsDate),t.setHours(0,0,0,0),Io(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),Io(t,m)}};class Q$ extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return fy(e==="R"?4:e.length,t)}set(t,e,r){const m=Kn(t,0);return m.setFullYear(r,0,4),m.setHours(0,0,0,0),Bs(m)}}class Z$ extends en{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return fy(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class J$ extends en{constructor(){super(...arguments),Je(this,"priority",120),Je(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 Mn(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}}class eT extends en{constructor(){super(...arguments),Je(this,"priority",120),Je(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 Mn(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}}class tT extends en{constructor(){super(...arguments),Je(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Je(this,"priority",110)}parse(t,e,r){const m=g=>g-1;switch(e){case"M":return zn(An(Bn.month,t),m);case"MM":return zn(Mn(2,t),m);case"Mo":return zn(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}}class nT extends en{constructor(){super(...arguments),Je(this,"priority",110),Je(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 zn(An(Bn.month,t),m);case"LL":return zn(Mn(2,t),m);case"Lo":return zn(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 rT(n,t,e){const r=bn(n,e==null?void 0:e.in),m=_p(r,e)-t;return r.setDate(r.getDate()-m*7),bn(r,e==null?void 0:e.in)}class iT extends en{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return An(Bn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,m){return Io(rT(t,r,m),m)}}function oT(n,t,e){const r=bn(n,void 0),m=Ap(r)-t;return r.setDate(r.getDate()-m*7),r}class sT extends en{constructor(){super(...arguments),Je(this,"priority",100),Je(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 An(Bn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Bs(oT(t,r))}}const aT=[31,28,31,30,31,30,31,31,30,31,30,31],lT=[31,29,31,30,31,30,31,31,30,31,30,31];class cT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subPriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return An(Bn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Mn(e.length,t)}}validate(t,e){const r=t.getFullYear(),m=vy(r),g=t.getMonth();return m?e>=1&&e<=lT[g]:e>=1&&e<=aT[g]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class uT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subpriority",1),Je(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 An(Bn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Mn(e.length,t)}}validate(t,e){const r=t.getFullYear();return vy(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 rd(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=bn(n,e==null?void 0:e.in),s=p.getDay(),a=(t%7+7)%7,u=7-h,l=t<0||t>6?t-(s+u)%7:(a+u)%7-(s+u)%7;return td(p,l,e)}class hT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(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=rd(t,r,m),t.setHours(0,0,0,0),t}}class dT extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(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 zn(Mn(e.length,t),g);case"eo":return zn(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=rd(t,r,m),t.setHours(0,0,0,0),t}}let pT=class extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(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 zn(Mn(e.length,t),g);case"co":return zn(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=rd(t,r,m),t.setHours(0,0,0,0),t}};function gT(n,t,e){const r=bn(n,void 0),m=j$(r),g=t-m;return td(r,g,e)}let fT=class extends en{constructor(){super(...arguments),Je(this,"priority",90),Je(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 Mn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return zn(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 zn(r.day(t,{width:"narrow",context:"formatting"}),m);case"iiiiii":return zn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),m);case"iiii":default:return zn(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=gT(t,r),t.setHours(0,0,0,0),t}};class mT extends en{constructor(){super(...arguments),Je(this,"priority",80),Je(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(nd(r),0,0,0),t}}class vT extends en{constructor(){super(...arguments),Je(this,"priority",80),Je(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(nd(r),0,0,0),t}}class yT extends en{constructor(){super(...arguments),Je(this,"priority",80),Je(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(nd(r),0,0,0),t}}class wT extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return An(Bn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(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 bT extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return An(Bn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class xT extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return An(Bn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(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}}class CT extends en{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return An(Bn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(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}}class kT extends en{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return An(Bn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class ST extends en{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return An(Bn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class AT extends en{constructor(){super(...arguments),Je(this,"priority",30),Je(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=m=>Math.trunc(m*Math.pow(10,-e.length+3));return zn(Mn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class _T extends en{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Xi(Yi.basicOptionalMinutes,t);case"XX":return Xi(Yi.basic,t);case"XXXX":return Xi(Yi.basicOptionalSeconds,t);case"XXXXX":return Xi(Yi.extendedOptionalSeconds,t);case"XXX":default:return Xi(Yi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Kn(t,t.getTime()-dl(t)-r)}}class $T extends en{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Xi(Yi.basicOptionalMinutes,t);case"xx":return Xi(Yi.basic,t);case"xxxx":return Xi(Yi.basicOptionalSeconds,t);case"xxxxx":return Xi(Yi.extendedOptionalSeconds,t);case"xxx":default:return Xi(Yi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Kn(t,t.getTime()-dl(t)-r)}}class TT extends en{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return gy(t)}set(t,e,r){return[Kn(t,r*1e3),{timestampIsSet:!0}]}}class MT extends en{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return gy(t)}set(t,e,r){return[Kn(t,r),{timestampIsSet:!0}]}}const ET={G:new G$,y:new Y$,Y:new X$,R:new Q$,u:new Z$,Q:new J$,q:new eT,M:new tT,L:new nT,w:new iT,I:new sT,d:new cT,D:new uT,E:new hT,e:new dT,c:new pT,i:new fT,a:new mT,b:new vT,B:new yT,h:new wT,H:new bT,K:new xT,k:new CT,m:new kT,s:new ST,S:new AT,X:new _T,x:new $T,t:new TT,T:new MT},IT=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RT=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,LT=/^'([^]*?)'?$/,OT=/''/g,NT=/\S/,DT=/[a-zA-Z]/;function FT(n,t,e,r){var m,g,y,x;const h=()=>Kn(e,NaN),p=Gv(),s=p.locale??Sp,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():bn(e,void 0);const l={firstWeekContainsDate:a,weekStartsOn:u,locale:s},o=[new K$(void 0,e)],c=t.match(RT).map(T=>{const S=T[0];if(S in eu){const C=eu[S];return C(T,s.formatLong)}return T}).join("").match(IT),d=[];for(let T of c){Lp(T)&&tu(T,t,n),Rp(T)&&tu(T,t,n);const S=T[0],C=ET[S];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const F=d.find(E=>R.includes(E.token)||E.token===S);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);d.push({token:S,fullToken:T});const L=C.run(n,T,s.match,l);if(!L)return h();o.push(L.setter),n=L.rest}else{if(S.match(DT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(T==="''"?T="'":S==="'"&&(T=PT(T)),n.indexOf(T)===0)n=n.slice(T.length);else return h()}}if(n.length>0&&NT.test(n))return h();const w=o.map(T=>T.priority).sort((T,S)=>S-T).filter((T,S,C)=>C.indexOf(T)===S).map(T=>o.filter(S=>S.priority===T).sort((S,C)=>C.subPriority-S.subPriority)).map(T=>T[0]);let b=bn(e,void 0);if(isNaN(+b))return h();const I={};for(const T of w){if(!T.validate(b,l))return h();const S=T.set(b,I,l);Array.isArray(S)?(b=S[0],Object.assign(I,S[1])):b=S}return b}function PT(n){return n.match(LT)[1].replace(OT,"'")}const WT="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=",BT={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return WT},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=KT.indexOf(yy[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 zT(n,t,e,r,m,g){return er(),Ui("div",{style:ba(g.iconStyle)},null,4)}const jT=Eo(BT,[["render",zT]]),HT={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function UT(n,t,e,r,m,g){const y=$t("rux-icon");return er(),Hi(y,{size:e.size,icon:e.icon,style:ba(g.colorStyle)},null,8,["size","icon","style"])}const VT=Eo(HT,[["render",UT],["__scopeId","data-v-9af48e85"]]),yy={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"},id={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},qT=function(n){const t="#000000",e="#ffffff",r=id[yy[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},KT=Object.keys(id),GT={astro:{component:n=>Fs(VT,{...n})},"astro-status":{component:n=>Fs(jT,{...n,status:n.icon})}},YT={extras:{component:n=>Fs(Nb,{...n})}},_N=Pn("N",{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})}}}),XT={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}`)})}}},QT={class:"mt-4 pa-3"},ZT=["textContent"];function JT(n,t,e,r,m,g){const y=$t("v-spacer"),x=$t("v-toolbar"),h=$t("v-text-field"),p=$t("v-row"),s=$t("v-btn"),a=$t("v-data-table"),u=$t("v-card-text"),l=$t("v-card-actions"),o=$t("v-card"),c=$t("v-dialog");return er(),Hi(c,{modelValue:g.show,"onUpdate:modelValue":t[4]||(t[4]=d=>g.show=d),width:"600",onKeydown:Kc(g.cancel,["esc"])},{default:Ft(()=>[at(o,null,{default:Ft(()=>[Fr("form",{onSubmit:t[3]||(t[3]=Ps((...d)=>g.success&&g.success(...d),["prevent"]))},[at(x,{height:"24"},{default:Ft(()=>[at(y),t[5]||(t[5]=Fr("span",null,"Open Configuration",-1)),at(y)]),_:1}),at(u,null,{default:Ft(()=>[Fr("div",QT,[at(p,{dense:""},{default:Ft(()=>[at(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}),at(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":Ft(({item:d})=>[at(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"]),at(p,{dense:""},{default:Ft(()=>[cl(Fr("span",{class:"ma-2 text-red",textContent:Qr(g.error)},null,8,ZT),[[ul,g.error]])]),_:1})])]),_:1}),at(l,{class:"px-2"},{default:Ft(()=>[at(y),at(s,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:g.cancel},{default:Ft(()=>t[6]||(t[6]=[Pr(" Cancel ")])),_:1},8,["onClick"]),at(s,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!g.error,onClick:Ps(g.success,["prevent"])},{default:Ft(()=>t[7]||(t[7]=[Pr(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const $N=Pn("v",Eo(XT,[["render",JT]])),eM={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}`)})}}},tM={class:"mt-4 pa-3"},nM=["textContent"];function rM(n,t,e,r,m,g){const y=$t("v-spacer"),x=$t("v-toolbar"),h=$t("v-text-field"),p=$t("v-row"),s=$t("v-btn"),a=$t("v-data-table"),u=$t("v-card-text"),l=$t("v-card-actions"),o=$t("v-card"),c=$t("v-dialog");return er(),Hi(c,{modelValue:g.show,"onUpdate:modelValue":t[5]||(t[5]=d=>g.show=d),width:"600",onKeydown:Kc(g.cancel,["esc"])},{default:Ft(()=>[at(o,null,{default:Ft(()=>[Fr("form",{onSubmit:t[4]||(t[4]=Ps((...d)=>g.success&&g.success(...d),["prevent"]))},[at(x,{height:"24"},{default:Ft(()=>[at(y),t[6]||(t[6]=Fr("span",null,"Save Configuration",-1)),at(y)]),_:1}),at(u,null,{default:Ft(()=>[Fr("div",tM,[at(p,{dense:""},{default:Ft(()=>[at(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}),at(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":Ft(({item:d})=>[at(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"]),at(p,{dense:""},{default:Ft(()=>[at(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}),at(p,{dense:""},{default:Ft(()=>[cl(Fr("span",{class:"ma-2 text-red",textContent:Qr(g.error)},null,8,nM),[[ul,g.error]])]),_:1})])]),_:1}),at(l,{class:"px-2"},{default:Ft(()=>[at(y),at(s,{variant:"outlined",onClick:g.cancel},{default:Ft(()=>t[7]||(t[7]=[Pr(" Cancel ")])),_:1},8,["onClick"]),at(s,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!g.error,onClick:Ps(g.success,["prevent"])},{default:Ft(()=>t[8]||(t[8]=[Pr(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const TN=Pn("a",Eo(eM,[["render",rM]])),wy="single-spa:app-change",iM={data(){return{show:!1}},created(){window.addEventListener(wy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=pp().length===0},150)},unmounted(){window.removeEventListener(wy,this.handleAppChange)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED}}},oM={class:"mx-1"};function sM(n,t,e,r,m,g){const y=$t("v-card-title"),x=$t("v-card-text"),h=$t("v-card");return m.show?(er(),Hi(h,{key:0},{default:Ft(()=>[at(y,null,{default:Ft(()=>t[0]||(t[0]=[Pr(" 404 Not Found ")])),_:1}),at(x,{class:"d-flex align-center mt-3"},{default:Ft(()=>[t[1]||(t[1]=Pr(" The requested URL ")),Fr("code",oM,Qr(n.$route.fullPath),1),t[2]||(t[2]=Pr(" was not routable. ")),t[3]||(t[3]=Fr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Mo("",!0)}const by=[{path:"/:target?/:screen?",name:"TlmViewer",component:()=>ot(()=>it.import("./TlmViewer-ec16698033f1b973c2ae.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Eo(iM,[["render",sM]])}];by.forEach(vp);const aM=hp({history:dp(),routes:by}),lM={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"}},cM={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=""}}},uM=["innerHTML"],hM={key:2},dM={key:3,class:"validate mt-4"};function pM(n,t,e,r,m,g){const y=$t("v-spacer"),x=$t("v-toolbar"),h=$t("v-icon"),p=$t("v-text-field"),s=$t("v-card-text"),a=$t("v-btn"),u=$t("v-card-actions"),l=$t("v-card"),o=$t("v-dialog"),c=$t("v-app");return er(),Hi(c,null,{default:Ft(()=>[at(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:Ft(()=>[at(l,null,{default:Ft(()=>[at(x,{height:"24"},{default:Ft(()=>[at(y),Fr("span",null,Qr(n.params.title),1),at(y)]),_:1}),at(s,{class:"mt-4 pa-3"},{default:Ft(()=>[n.params.validateText?(er(),Hi(h,{key:0,class:"mr-2"},{default:Ft(()=>t[2]||(t[2]=[Pr(" mdi-alert ")])),_:1})):Mo("",!0),n.params.html?(er(),Ui("span",{key:1,innerHTML:n.params.text},null,8,uM)):(er(),Ui("span",hM,Qr(n.params.text),1)),n.params.validateText?(er(),Ui("div",dM,[Pr(" Enter "+Qr(n.params.validateText)+" to confirm! ",1),at(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"])])):Mo("",!0)]),_:1}),at(u,{class:"px-2"},{default:Ft(()=>[at(y),n.params.cancelText?(er(),Hi(a,{key:0,variant:"outlined","data-test":g.dataTestCancel,onClick:g.cancel},{default:Ft(()=>[Pr(Qr(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Mo("",!0),at(a,{variant:"flat",color:n.params.okClass,"data-test":g.dataTestOk,onClick:g.ok},{default:Ft(()=>[Pr(Qr(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const gM=Eo(cM,[["render",pM],["__scopeId","data-v-de532a0f"]]);class fM{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(gM);t.use(sd);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 mM={install(n,t){const e=new fM;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},vM={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`
|
1497
|
+
--toast-bg-color:${id[this.toastNotification.level]};
|
1498
|
+
--toast-fg-color:${qT(this.toastNotification.level)};
|
1499
|
+
`},contentStyle:function(){return`
|
1500
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1501
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1502
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1503
|
+
`}},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}}},yM={key:0,class:"text-subtitle-1 mr-1 notification-text"},wM={key:1,class:"text-body-2 notification-text"},bM={key:2,class:"text-body-2 notification-text"};function xM(n,t,e,r,m,g){const y=$t("v-icon"),x=$t("v-spacer"),h=$t("v-btn"),p=$t("v-sheet"),s=$t("v-slide-y-transition");return er(),Hi(s,null,{default:Ft(()=>[cl(at(p,{style:ba(g.toastStyle),class:"toast-notification",onClick:g.expand},{default:Ft(()=>[at(y,{class:"mr-1 notification-text"},{default:Ft(()=>[Pr(Qr(g.toastNotificationIcon),1)]),_:1}),Fr("div",{class:"toast-content",style:ba(g.contentStyle)},[n.toastNotification.title?(er(),Ui("span",yM,Qr(n.toastNotification.title)+": ",1)):Mo("",!0),n.toastNotification.body?(er(),Ui("span",wM,Qr(n.toastNotification.body),1)):Mo("",!0),n.toastNotification.message?(er(),Ui("span",bM,Qr(n.toastNotification.message),1)):Mo("",!0)],4),at(x),at(h,{variant:"text",onClick:Ps(g.hide,["stop"]),class:"notification-text"},{default:Ft(()=>t[0]||(t[0]=[Pr(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ul,n.showToast]])]),_:1})}const CM=Eo(vM,[["render",xM],["__scopeId","data-v-b0459ba8"]]);class kM{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=Yc(CM);t.use(sd);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 SM={install(n,t){const e=new kM(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},xy=100,Cy=gp({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory:(n,t)=>{n.notifyHistory.length>=xy&&(n.notifyHistory.length=xy-1),n.notifyHistory.unshift(t)},notifyClearHistory:n=>{n.notifyHistory=[]},setNamedWidget:(n,t)=>{Object.assign(n.namedWidgets,t)},clearNamedWidget:(n,t)=>{delete n.namedWidgets[t]}},modules:{}});function ky(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function AM(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function Sy(){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(ky(g)&&ky(y)){r[m]=Sy(g,y,e);continue}if(e&&Array.isArray(g)&&Array.isArray(y)){r[m]=e(g,y);continue}r[m]=y}return r}function Ha(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ha.cache.has(n))return Ha.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ha.cache.set(n,t),t}Ha.cache=new Map;function _M(n){ip(`Vuetify: ${n}`)}function Ay(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 _y(n,t){const e=lp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function $M(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_y("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const od=Symbol.for("vuetify:defaults");function $y(){const n=op(od);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function TM(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[Ha(t)]<"u")}function MM(){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]:$y();const r=_y("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const m=Gc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),g=new Proxy(n,{get(h,p){var s,a,u,l;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(TM(r.vnode,p))return o;const c=(a=m.value)==null?void 0:a[p];if(c!==void 0)return c;const d=(l=(u=e.value)==null?void 0:u.global)==null?void 0:l[p];return d!==void 0?d:o}}),y=sp();ap(()=>{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=$M(od,r);cp(od,Gc(()=>y.value?Sy((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:g,provideSubDefaults:x}}function hc(n){if(n._setup=n._setup??n.setup,!n.name)return _M("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Ay(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return AM(e,t)},n.props._as=String,n.setup=function(e,r){const m=$y();if(!m.value)return n._setup(e,r);const{props:g,provideSubDefaults:y}=MM(e,e._as??n.name,m),x=n._setup(g,r);return y(),x}}return n}function EM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?hc:rp)(t)}const IM=[String,Function,Object,Array],dc=Ay({icon:{type:IM},tag:{type:[String,Object,Function],required:!0}},"icon");EM()({name:"VComponentIcon",props:dc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return at(n.tag,null,{default:()=>{var m;return[n.icon?at(r,null,null):(m=e.default)==null?void 0:m.call(e)]}})}}}),hc({name:"VSvgIcon",inheritAttrs:!1,props:dc(),setup(n,t){let{attrs:e}=t;return()=>at(n.tag,up(e,{style:null}),{default:()=>[at("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)?at("path",{d:r[0],"fill-opacity":r[1]},null):at("path",{d:r},null)):at("path",{d:n.icon},null)])]})}}),hc({name:"VLigatureIcon",props:dc(),setup(n){return()=>at(n.tag,null,{default:()=>[n.icon]})}});const RM=hc({name:"VClassIcon",props:dc(),setup(n){return()=>at(n.tag,{class:n.icon},null)}}),LM={component:n=>Fs(RM,{...n,class:"mdi"})},sd=fp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:lM}},icons:{defaultSet:"mdi",sets:{mdi:LM,...GT,...YT}}}),ad=xb({createApp:Yc,appOptions:{render(){return Fs(Mb,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(aM),n.use(Cy),n.use(sd),n.use(mM),n.use(SM,{store:Cy})}}),EN=Pn("g",ad.bootstrap),IN=Pn("h",ad.mount),RN=Pn("u",ad.unmount)}}});
|