openc3-cosmos-tool-cmdtlmserver 7.2.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/{ArrayWidget-D1PArcGr-1cb78ca7cb83e47908ee.js → ArrayWidget-DMSm_P6c-694a5d20f37aee56e971.js} +2 -2
- data/tools/cmdtlmserver/{ArrayplotWidget-DPUPy0qM-9c5325ed3b6e0c89df8f.js → ArrayplotWidget-fdXLhGAl-ee49423a88f0830f3d10.js} +1 -1
- data/tools/cmdtlmserver/{BarColumn-BpdscDQf-2d19bc70f89b83debf2b.js → BarColumn-Bb305iCi-1d6370d3a5948e7070fb.js} +1 -1
- data/tools/cmdtlmserver/{BlockWidget-_VUsK5T9-87cecde84ec9eee53d78.js → BlockWidget-Do3W6tZh-0465ab5ccbba95c9cd95.js} +2 -2
- data/tools/cmdtlmserver/{ButtonWidget-DE41o-cg-c5cd6e74dbabd0420d0e.js → ButtonWidget-DukCQt0F-73553c5eb8665f5a122c.js} +2 -2
- data/tools/cmdtlmserver/CanvasWidget-BRdVWln5-ecfd6c23ebdef1641cbe.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-DV8PeDWz-9ea509837174f807accc.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-COv_Qnc8-53c8b97c1eff0cb369be.js → CanvasimageWidget-Czbq1GuF-f6237d2815bb4fb67627.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-BhuUqLOo-388fa33a3da2d971b05b.js → CanvasimagevalueWidget-DKt5JgEt-4d4748409b4390fd9317.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-DW2I1ra1-21be90e9689988d7cc0b.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-BhzvZVfD-98ba8f4d0b737ae50149.js +1 -0
- data/tools/cmdtlmserver/{CanvaslineWidget-D1K_6mAY-957ef26c77ffcf3c26aa.js → CanvaslineWidget-DsjY37tp-333343a7e55e7ced336a.js} +1 -1
- data/tools/cmdtlmserver/{CanvaslinevalueWidget-D4eaxWhR-488c1eb347eb93f3db22.js → CanvaslinevalueWidget-ihI97G8T-a999105fab2c48e7d5a3.js} +1 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-B778Z-Zo-929c0f581f4e6fc8bb9b.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-5213fff88faeff8c2bf0.js → CmdPacketsTab-ab63982334bccb674566.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-db96cc7a37046fc23e08.js → CmdTlmServer-dbb3257de023db2ad7db.js} +2 -2
- data/tools/cmdtlmserver/ComboboxWidget-CuuvOL9K-580e3a816c2a39c9dc31.js +1 -0
- data/tools/cmdtlmserver/DataFlowsTab-651405c9f3cd11ec53ae.js +1 -0
- data/tools/cmdtlmserver/{DateWidget-DkNWx28s-7f519b2f30faeb9fe3fd.js → DateWidget-COvQTAeo-8e7e5760cca1eca77fb7.js} +1 -1
- data/tools/cmdtlmserver/{DetailsDialog-F4KgYM6m-df810d02cfb5e0198172.js → DetailsDialog-DE7lK17G-f251b58f150be03f9878.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-BuSbQVhf-18179cf5a61cbc723d72.js → DynamicWidget-BuSbQVhf-d28b4dd265895ced834e.js} +1 -1
- data/tools/cmdtlmserver/{FilechecksumWidget-DSfNEnDJ-b6d7f28b678c6b571db9.js → FilechecksumWidget-DRnOt_UE-e8bcb330e9f8161abcb5.js} +1 -1
- data/tools/cmdtlmserver/{FiledisplayWidget-D2cxMmrP-91c627968612f56bef53.js → FiledisplayWidget-26R46EjS-50600e2205e679c6e7a3.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-6-bj_PJO-5621420fe3506d1932e4.js → FormatvalueWidget-BxyscMJc-deb6fbbd21db3f9b9533.js} +1 -1
- data/tools/cmdtlmserver/Graph-BKw7xw1a-cafa3fdb6d474421c777.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-COXK3Dab-3f26903e4d5da289ab20.js → GraphWidget-Cs9mvqUu-bb3bb075fd0ea3764beb.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalWidget-C9UFBPsk-84c81a59fc34282ffe71.js → HorizontalWidget-fWLFj7Kg-87dfe4a783ca9d8718a3.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalboxWidget-CWLfmRtr-09493eb27796c1b12919.js → HorizontalboxWidget-DEaXhKEz-3cc78a62e93fced5cc2d.js} +1 -1
- data/tools/cmdtlmserver/HorizontallineWidget-Bvu1QP3S-1c0a38d8daf4285046b0.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-Bn9eGzrq-fdd10b58ac32de3de437.js → IframeWidget-B143k4lo-211336261edc12558ba4.js} +1 -1
- data/tools/cmdtlmserver/{ImageLoader-_gAudhVo-003969d31d1c3d9e5b32.js → ImageLoader-BCpmQHIl-e1f186d47f7443384752.js} +1 -1
- data/tools/cmdtlmserver/{ImageviewerWidget-BUWhF32Z-751c45f6392ccbe675d5.js → ImageviewerWidget-CLrvr6dw-dbefc7bb490747b4d32b.js} +1 -1
- data/tools/cmdtlmserver/{InterfaceFlowChart-cfadd36d819b485a73ef.js → InterfaceFlowChart-87892813bbc3da7dd816.js} +1 -1
- data/tools/cmdtlmserver/{InterfacesTab-dca6d7668848c4078e8d.js → InterfacesTab-c3d2cc4844087b3f946d.js} +1 -1
- data/tools/cmdtlmserver/{LabelWidget-BhzkN06D-4209a141ff664143bb0f.js → LabelWidget-CA1bTX2B-2c9d603681176335c5dd.js} +1 -1
- data/tools/cmdtlmserver/{LabelledWidget-vx8NvW1b-a9879fd6ddfc57fa36b9.js → LabelledWidget-BDhvr03J-fe41df86dd3cc7e1d625.js} +1 -1
- data/tools/cmdtlmserver/{LabelprogressbarWidget-t5PvKuS4-feb53cc1f8715b39f864.js → LabelprogressbarWidget-g7A5CE8S-17fe760704ac3e7697ad.js} +1 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-B27xXxWg-960e3827bda04825c04a.js +1 -0
- data/tools/cmdtlmserver/{LabelvalueWidget-Cbs1DBK2-ce888769e60d2e4aad2c.js → LabelvalueWidget-DFn8o6LC-382c91895aa50abef201.js} +1 -1
- data/tools/cmdtlmserver/{LabelvaluedescWidget-B7OIOGc0-878e5a0b12c95f9dc732.js → LabelvaluedescWidget-BQpaxFaB-abcd49094e4d21057a3d.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C-z96q8z-1f5e8f4cf393ac65098f.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D2TMEv9O-11b6844f84b58504c3aa.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluerangebarWidget-Pt_evm3v-77436cdf1233d55bfb62.js → LabelvaluerangebarWidget-D99dZCjz-2c72dd417308f8cf3b83.js} +1 -1
- data/tools/cmdtlmserver/{Layout-CKmC50QZ-85f8ef7d9d4b778fc3f8.js → Layout--_zNJWnw-9367ae190fb0e9bf1b84.js} +1 -1
- data/tools/cmdtlmserver/{LedWidget-D1lmNXpi-3a5b364ce2a97685e9dd.js → LedWidget-D2uxHxe3-22c8c1f89536f753f5e6.js} +1 -1
- data/tools/cmdtlmserver/{LimitsBar-D5IZu7eX-07cdd7c4da705a5b2cac.js → LimitsBar-DN1s8-MS-d3248be80e3262273e82.js} +1 -1
- data/tools/cmdtlmserver/{LimitsbarWidget-VpxQXE-e-a756975fa42f4776712f.js → LimitsbarWidget-Cqhh7LKU-7f40da6484ccbe5da287.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-79P41CX7-ad179ada10464166cfb2.js → LimitscolorWidget-haGB4RbY-ddf6b0791eb1be4ac6c5.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-BFDXhJeZ-ded4fac25cb92257eb32.js → LimitscolumnWidget-B1GdmlR_-86b9a2cc5c084b705674.js} +1 -1
- data/tools/cmdtlmserver/{LinegraphWidget-VqkpOlws-fdf5639852f6b641d75f.js → LinegraphWidget-COSOQ0uM-a5300046319a8e9bc2ac.js} +1 -1
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget--ihvirDP-13588dfd9e05a20284cf.js → MatrixbycolumnsWidget-coHlLETG-e799eaa675cfbf970ed5.js} +1 -1
- data/tools/cmdtlmserver/{OpenC3TimePicker-B0lAIU91-1d7cb9e69fdb3e2d19db.js → OpenC3TimePicker-B8Vu9GBz-89d21b420245131e470d.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-BIB3r9SL-89623753647970ec01f0.js → ProgressbarWidget-D_yFssIZ-2510755cf05a8167431f.js} +1 -1
- data/tools/cmdtlmserver/{RadiobuttonWidget-C5rxLM7K-572c4d7c32c43b82c96b.js → RadiobuttonWidget-DL0jVTcb-101358296cb6f3e5ac75.js} +1 -1
- data/tools/cmdtlmserver/{RadiogroupWidget-CciTCv1U-ebc68de8edecb013d87d.js → RadiogroupWidget-2-td69IA-98144436c4729f2db047.js} +1 -1
- data/tools/cmdtlmserver/{RangebarWidget-MPQYi2Km-6b2b3f2e820d4e5ce633.js → RangebarWidget-i2mlnxys-3ecd19c88b6a2f13fc7a.js} +1 -1
- data/tools/cmdtlmserver/{RawBuffer-ebb6aadc11fa84048a7f.js → RawBuffer-5a59e58e37f6021cf46c.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-4383b630959e2310610e.js → RawDialog-3a0c000973893535a456.js} +1 -1
- data/tools/cmdtlmserver/{RollupWidget-CfjGAhzg-6b1de39f95e298a21e0f.js → RollupWidget-BEJ2Icg1-416b8d9160f2a81fd538.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-7438fce73b7c2c45c9c7.js → RoutersTab-7710ec67843901567d25.js} +1 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-BU1cRpL8-d99f9e1c5467abc7ed03.js +1 -0
- data/tools/cmdtlmserver/{SignalWidget-C-qecoTO-b31583be1fe1a7a01769.js → SignalWidget-hiTkeem9-9efe6cdd22515ebf8555.js} +1 -1
- data/tools/cmdtlmserver/SpacerWidget-CBmzzS_X-e8f51b2251bb08fed6b0.js +1 -0
- data/tools/cmdtlmserver/SparklineWidget-CizRh6QR-92a3ebcc84a5687d3b93.js +1 -0
- data/tools/cmdtlmserver/{StatusTab-7f111deb77c4a2bc05b0.js → StatusTab-efcdd278c79f71b06e9b.js} +1 -1
- data/tools/cmdtlmserver/{TabbookWidget-CXklff-l-8ad144458fb01c903478.js → TabbookWidget-CvL3Ozmx-19c91b22633cf0927a1e.js} +1 -1
- data/tools/cmdtlmserver/{TargetsTab-29f400440b894771ad34.js → TargetsTab-326711a03f6c9686634d.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-BtEwXzDO-52792ac2b6593c85c776.js +1 -0
- data/tools/cmdtlmserver/TextfieldWidget-BDbb57HP-7306fcc70fc27079b1d3.js +1 -0
- data/tools/cmdtlmserver/TimeWidget-DzD8U8l8-db805689f0b8dbaab9f7.js +1 -0
- data/tools/cmdtlmserver/TitleWidget-CL53vf14-c0987297e98b6c858650.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-6453f72e7567b78bb979.js → TlmPacketsTab-91250bba537c7eb02f7c.js} +1 -1
- data/tools/cmdtlmserver/{Updater-d97ddec520bea4a73d3f.js → Updater-af04370b0601580396d1.js} +1 -1
- data/tools/cmdtlmserver/{VWidget-oMbywhLA-03a02aaf028be7a3c9c0.js → VWidget-5qOYva88-5dc877752d53235d987d.js} +1 -1
- data/tools/cmdtlmserver/ValueWidget-CAkuc_w_-0721aa9556f274d056ba.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-Y8sO05E1-f729f6e347b2f5825407.js +1 -0
- data/tools/cmdtlmserver/{ValuelimitscolumnWidget-BVt6nLXq-ca32b86e6abfcdcca7df.js → ValuelimitscolumnWidget-iOjB_fCj-ae174dd346919467bac7.js} +1 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-DsCoeAm6-7804711bfe999dad21a6.js +1 -0
- data/tools/cmdtlmserver/VerticalWidget-C6O0dhRU-a30bbb27eaa68c233c89.js +1 -0
- data/tools/cmdtlmserver/{VerticalboxWidget-C7RrkfY0-f0cc6f904b80b09e5ba7.js → VerticalboxWidget-B-CoqRJG-ba12b0177fbcd7fb76e1.js} +1 -1
- data/tools/cmdtlmserver/{Widget-D_HaosJK-e286c8e7e2106d81e87c.js → Widget-CtYQauzA-69fc956797d4c4719727.js} +1 -1
- data/tools/cmdtlmserver/main-78902a467d9f5f7771dd.js +1499 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-fee3a04fec3ff6af8998.js +10 -0
- metadata +84 -84
- data/tools/cmdtlmserver/CanvasWidget-BEi8h3Mq-e35c5a9baa7ecd914bcf.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-eZuMgkhL-fda5d43523fafb058839.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-DtvbgeYH-6e001a64a4a18263f0ee.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-C_FRIeNb-4134766817f8dcab10e9.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-ByxMDkiS-6e069bf3ea2500374efe.js +0 -1
- data/tools/cmdtlmserver/ComboboxWidget-CAGxGv2r-d17c3e9aaa2b1b02ab46.js +0 -1
- data/tools/cmdtlmserver/DataFlowsTab-324bc5957f403e4d2794.js +0 -1
- data/tools/cmdtlmserver/Graph-Cz0Ns1FD-0efdbbd522a909650069.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-DeFkOaYO-257ec3426ecc547ca94f.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-CebbEH-j-f503f09d02fa4f3918c1.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C57kf-oQ-0be9055fc642dd213441.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BRlNDEqp-e812057ca64792e7caed.js +0 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-CupaygNN-1554ccfbbfa2766e4301.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-VVkOCb6N-dbdf2c2f889a818d027b.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-Dsmn38z_-1d9eba2ef6ba778585cd.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-CHs2VYIv-939d75e16d4590c1f1f8.js +0 -1
- data/tools/cmdtlmserver/TextfieldWidget-CdANAW-6-6a6919e7eb62ef86954f.js +0 -1
- data/tools/cmdtlmserver/TimeWidget-D0xT1wXR-19f76febd2f5779fae7a.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-68NWCcXB-7507be046b0a9b3c127c.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-B1aGUBP7-af6d1d1a57943374ee79.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-B7KcRjLS-de09e4004f70b97b84bc.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-uVZEI32U-d5bd219c6bc362dc1229.js +0 -1
- data/tools/cmdtlmserver/VerticalWidget-DlftYBjH-7f2f1e45111c6a438cd3.js +0 -1
- data/tools/cmdtlmserver/main-ae88870307d629b1ce0e.js +0 -1499
- data/tools/cmdtlmserver/services-a7fe7e9b036652e7b4b1.js +0 -10
|
@@ -0,0 +1,1499 @@
|
|
|
1
|
+
System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Yn,it){"use strict";var tn,jn,Po,Dn,qt,li,Yr,kf,Sf,Js,Zs,Ml,_i,Jr,zo,$f,Tf,Rf,hu,Ef,Mf,If,Lf,Of,du,Nf,Df,Pf,zf,Ff,Bf,Wf,jf,Hf,fu,Uf;return{setters:[Rt=>{tn=Rt.resolveComponent,jn=Rt.openBlock,Po=Rt.createBlock,Dn=Rt.withCtx,qt=Rt.createVNode,li=Rt.createElementBlock,Yr=Rt.createElementVNode,kf=Rt.useCssVars,Sf=Rt.defineAsyncComponent,Js=Rt.h,Zs=Rt.normalizeStyle,Ml=Rt.Fragment,_i=Rt.createTextVNode,Jr=Rt.toDisplayString,zo=Rt.createCommentVNode,$f=Rt.defineComponent,Tf=Rt.warn,Rf=Rt.inject,hu=Rt.computed,Ef=Rt.shallowRef,Mf=Rt.watchEffect,If=Rt.normalizeClass,Lf=Rt.getCurrentInstance,Of=Rt.provide,du=Rt.createApp,Nf=Rt.withKeys,Df=Rt.withDirectives,Pf=Rt.withModifiers,zf=Rt.vShow,Ff=Rt.mergeProps},Rt=>{Bf=Rt.createRouter,Wf=Rt.createWebHistory},Rt=>{jf=Rt.defineStore,Hf=Rt.createPinia},Rt=>{fu=Rt.getMountedApps},Rt=>{Uf=Rt.createVuetify}],execute:(function(){Yn({A:oa,H:Zr,J:Ga,X:Wu,Z:ia,c:lg,d:gg,e:ag,h:mg,j:Fu,n:Oy,o:zr,p:Co,t:cg,u:vg});var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vf(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable}))),e.push.apply(e,r)}return e}function vs(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Vf(Object(e),!0).forEach((function(r){bw(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Vf(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function bw(t,n,e){return(n=(function(r){var m=(function(d,p){if(ys(d)!=="object"||d===null)return d;var w=d[Symbol.toPrimitive];if(w!==void 0){var u=w.call(d,p);if(ys(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(d)})(r,"string");return ys(m)==="symbol"?m:String(m)})(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function ys(t){return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ys(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var n=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,m=String(e),d=m.length,p=-1,w="",u=m.charCodeAt(0);++p<d;)(r=m.charCodeAt(p))!=0?w+=r>=1&&r<=31||r==127||p==0&&r>=48&&r<=57||p==1&&r>=48&&r<=57&&u==45?"\\"+r.toString(16)+" ":p==0&&d==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+m.charAt(p):m.charAt(p):w+="�";return w};t.CSS||(t.CSS={}),t.CSS.escape=n})(Rt);var ww={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function xw(t){if(ys(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=vs(vs({},ww),t);if(!n.Vue&&!n.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!n.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(n.appOptions.el&&typeof n.appOptions.el!="string"&&!(n.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ys(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var e={};return{bootstrap:Cw.bind(null,n,e),mount:_w.bind(null,n,e),unmount:kw.bind(null,n,e),update:Aw.bind(null,n,e)}}function Cw(t){return t.loadRootComponent?t.loadRootComponent().then((function(n){return t.rootComponent=n})):Promise.resolve()}function _w(t,n,e){var r={};return Promise.resolve().then((function(){return(function(m,d){return typeof m.appOptions=="function"?m.appOptions(d):Promise.resolve(vs({},m.appOptions))})(t,e).then((function(m){var d;if(e.domElement&&!m.el&&(m.el=e.domElement),m.el)if(typeof m.el=="string"){if(!(d=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(d=m.el).id||(d.id="single-spa-application:".concat(e.name)),m.el="#".concat(CSS.escape(d.id));else{var p="single-spa-application:".concat(e.name);m.el="#".concat(CSS.escape(p)),(d=document.getElementById(p))||((d=document.createElement("div")).id=p,document.body.appendChild(d))}if(!t.replaceMode&&(m.el=m.el+" .single-spa-container",!d.querySelector(".single-spa-container"))){var w=document.createElement("div");w.className="single-spa-container",d.appendChild(w)}r.domEl=d,m.render||m.template||!t.rootComponent||(m.render=function(f){return f(t.rootComponent)}),m.data||(m.data={});var u=m.data;if(m.data=function(){return vs(vs({},typeof u=="function"?u.call(this,this):u),e)},t.createApp){if(r.vueInstance=t.createApp(m),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(m.el),n[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(m.el)}else if(r.vueInstance=new t.Vue(m),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return n[e.name]=r,r.vueInstance}));return n[e.name]=r,r.vueInstance}))}))}function Aw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name],m=vs(vs({},t.appOptions.data||{}),e),d=r.root||r.vueInstance;for(var p in m)d[p]=m[p]}))}function kw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name];t.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const Sw=Yn("_",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),$w={};function Tw(t,n){const e=tn("router-view"),r=tn("v-app");return jn(),Po(r,{id:"innerapp"},{default:Dn(()=>[qt(e)]),_:1})}const Rw=Sw($w,[["render",Tw]]),fD="modulepreload",pD=function(t){return"/"+t},gD={},ot=function(n,e,r){let m=Promise.resolve();function d(p){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=p,window.dispatchEvent(w),!w.defaultPrevented)throw p}return m.then(p=>{for(const w of p||[])w.status==="rejected"&&d(w.reason);return n().catch(d)})},qf=function(t){!t.name!=="NotFound"&&(t.path=`/tools/cmdtlmserver/${t.path.replace(/^\//,"")}`),t.children?.forEach(qf)},bs=Yn("i",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),Ew="/icons/customIcons.svg",pu={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Ew+"#"+this.icon}}},Gf=()=>{kf(t=>({v4ccb3d08:t.color}))},Kf=pu.setup;pu.setup=Kf?(t,n)=>(Gf(),Kf(t,n)):Gf;const Mw={class:"cosmos-custom-icon"},Iw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Lw=["href"];function Ow(t,n,e,r,m,d){return jn(),li("span",Mw,[(jn(),li("svg",Iw,[Yr("use",{href:d.iconSrc},null,8,Lw)]))])}const Nw=bs(pu,[["render",Ow],["__scopeId","data-v-54b83b01"]]);function Yf(t,n){return function(){return t.apply(n,arguments)}}const{toString:Dw}=Object.prototype,{getPrototypeOf:Xs}=Object,{iterator:Pa,toStringTag:Jf}=Symbol,Il=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),za=(t,n)=>{let e=t;const r=[];for(;e!=null&&e!==Object.prototype;){if(r.indexOf(e)!==-1)return!1;if(r.push(e),Il(e,n))return!0;e=Xs(e)}return!1},Pw=(t,n)=>t!=null&&za(t,n)?t[n]:void 0,gu=(t=>n=>{const e=Dw.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),oo=t=>(t=t.toLowerCase(),n=>gu(n)===t),Ll=t=>n=>typeof n===t,{isArray:ws}=Array,Qs=Ll("undefined");function ea(t){return t!==null&&!Qs(t)&&t.constructor!==null&&!Qs(t.constructor)&&ci(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Zf=oo("ArrayBuffer");function zw(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Zf(t.buffer),n}const Fw=Ll("string"),ci=Ll("function"),Xf=Ll("number"),ta=t=>t!==null&&typeof t=="object",Bw=t=>t===!0||t===!1,Ol=t=>{if(!ta(t))return!1;const n=Xs(t);return(n===null||n===Object.prototype||Xs(n)===null)&&!za(t,Jf)&&!za(t,Pa)},Ww=t=>{if(!ta(t)||ea(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},jw=oo("Date"),Hw=oo("File"),Uw=t=>!!(t&&typeof t.uri<"u"),Vw=t=>t&&typeof t.getParts<"u",qw=oo("Blob"),Gw=oo("FileList"),Kw=t=>ta(t)&&ci(t.pipe);function Yw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qf=Yw(),ep=typeof Qf.FormData<"u"?Qf.FormData:void 0,Jw=t=>{if(!t)return!1;if(ep&&t instanceof ep)return!0;const n=Xs(t);if(!n||n===Object.prototype||!ci(t.append))return!1;const e=gu(t);return e==="formdata"||e==="object"&&ci(t.toString)&&t.toString()==="[object FormData]"},Zw=oo("URLSearchParams"),[Xw,Qw,ex,tx]=["ReadableStream","Request","Response","Headers"].map(oo),nx=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fa(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),ws(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(ea(t))return;const d=e?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let w;for(r=0;r<p;r++)w=d[r],n.call(null,t[w],w,t)}}function tp(t,n){if(ea(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,np=t=>!Qs(t)&&t!==xs;function mu(...t){const{caseless:n,skipUndefined:e}=np(this)&&this||{},r={},m=(d,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const w=n&&typeof p=="string"&&tp(r,p)||p,u=Il(r,w)?r[w]:void 0;Ol(u)&&Ol(d)?r[w]=mu(u,d):Ol(d)?r[w]=mu({},d):ws(d)?r[w]=d.slice():(!e||!Qs(d))&&(r[w]=d)};for(let d=0,p=t.length;d<p;d++){const w=t[d];if(!w||ea(w)||(Fa(w,m),typeof w!="object"||ws(w)))continue;const u=Object.getOwnPropertySymbols(w);for(let f=0;f<u.length;f++){const a=u[f];px.call(w,a)&&m(w[a],a)}}return r}const rx=(t,n,e,{allOwnKeys:r}={})=>(Fa(n,(m,d)=>{e&&ci(m)?Object.defineProperty(t,d,{__proto__:null,value:Yf(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,d,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),ix=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ox=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),e&&Object.assign(t.prototype,e)},sx=(t,n,e,r)=>{let m,d,p;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),d=m.length;d-- >0;)p=m[d],(!r||r(p,t,n))&&!w[p]&&(n[p]=t[p],w[p]=!0);t=e!==!1&&Xs(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},ax=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},lx=t=>{if(!t)return null;if(ws(t))return t;let n=t.length;if(!Xf(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},cx=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&Xs(Uint8Array)),ux=(t,n)=>{const e=(t&&t[Pa]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},hx=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},dx=oo("HTMLFormElement"),fx=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),{propertyIsEnumerable:px}=Object.prototype,gx=oo("RegExp"),rp=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};Fa(e,(m,d)=>{let p;(p=n(m,d,t))!==!1&&(r[d]=p||m)}),Object.defineProperties(t,r)},mx=t=>{rp(t,(n,e)=>{if(ci(t)&&["arguments","caller","callee"].includes(e))return!1;const r=t[e];if(ci(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},vx=(t,n)=>{const e={},r=m=>{m.forEach(d=>{e[d]=!0})};return ws(t)?r(t):r(String(t).split(n)),e},yx=()=>{},bx=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function wx(t){return!!(t&&ci(t.append)&&t[Jf]==="FormData"&&t[Pa])}const xx=t=>{const n=new WeakSet,e=r=>{if(ta(r)){if(n.has(r))return;if(ea(r))return r;if(!("toJSON"in r)){n.add(r);const m=ws(r)?[]:{};return Fa(r,(d,p)=>{const w=e(d);!Qs(w)&&(m[p]=w)}),n.delete(r),m}}return r};return e(t)},Cx=oo("AsyncFunction"),_x=t=>t&&(ta(t)||ci(t))&&ci(t.then)&&ci(t.catch),ip=((t,n)=>t?setImmediate:n?((e,r)=>(xs.addEventListener("message",({source:m,data:d})=>{m===xs&&d===e&&r.length&&r.shift()()},!1),m=>{r.push(m),xs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ci(xs.postMessage)),Ax=typeof queueMicrotask<"u"?queueMicrotask.bind(xs):typeof process<"u"&&process.nextTick||ip,op=t=>t!=null&&ci(t[Pa]),kx=t=>t!=null&&za(t,Pa)&&op(t),ve={isArray:ws,isArrayBuffer:Zf,isBuffer:ea,isFormData:Jw,isArrayBufferView:zw,isString:Fw,isNumber:Xf,isBoolean:Bw,isObject:ta,isPlainObject:Ol,isEmptyObject:Ww,isReadableStream:Xw,isRequest:Qw,isResponse:ex,isHeaders:tx,isUndefined:Qs,isDate:jw,isFile:Hw,isReactNativeBlob:Uw,isReactNative:Vw,isBlob:qw,isRegExp:gx,isFunction:ci,isStream:Kw,isURLSearchParams:Zw,isTypedArray:cx,isFileList:Gw,forEach:Fa,merge:mu,extend:rx,trim:nx,stripBOM:ix,inherits:ox,toFlatObject:sx,kindOf:gu,kindOfTest:oo,endsWith:ax,toArray:lx,forEachEntry:ux,matchAll:hx,isHTMLForm:dx,hasOwnProperty:Il,hasOwnProp:Il,hasOwnInPrototypeChain:za,getSafeProp:Pw,reduceDescriptors:rp,freezeMethods:mx,toObjectSet:vx,toCamelCase:fx,noop:yx,toFiniteNumber:bx,findKey:tp,global:xs,isContextDefined:np,isSpecCompliantForm:wx,toJSONObject:xx,isAsyncFn:Cx,isThenable:_x,setImmediate:ip,asap:Ax,isIterable:op,isSafeIterable:kx},Sx=ve.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$x=t=>{const n={};let e,r,m;return t&&t.split(`
|
|
2
|
+
`).forEach(function(d){m=d.indexOf(":"),e=d.substring(0,m).trim().toLowerCase(),r=d.substring(m+1).trim(),!(!e||n[e]&&Sx[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n};function Tx(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}const Rx=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ex=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vu(t,n){return ve.isArray(t)?t.map(e=>vu(e,n)):Tx(String(t).replace(n,""))}const Mx=t=>vu(t,Rx),Ix=t=>vu(t,Ex);function sp(t){const n=Object.create(null);return ve.forEach(t.toJSON(),(e,r)=>{n[r]=Ix(e)}),n}const ap=Symbol("internals");function Ba(t){return t&&String(t).trim().toLowerCase()}function Nl(t){return t===!1||t==null?t:ve.isArray(t)?t.map(Nl):Mx(String(t))}function Lx(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const Ox=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function yu(t,n,e,r,m){if(ve.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!ve.isString(n)){if(ve.isString(r))return n.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(n)}}function Nx(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function Dx(t,n){const e=ve.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{__proto__:null,value:function(m,d,p){return this[r].call(this,n,m,d,p)},configurable:!0})})}let Dr=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function d(w,u,f){const a=Ba(u);if(!a)return;const s=ve.findKey(m,a);(!s||m[s]===void 0||f===!0||f===void 0&&m[s]!==!1)&&(m[s||u]=Nl(w))}const p=(w,u)=>ve.forEach(w,(f,a)=>d(f,a,u));if(ve.isPlainObject(n)||n instanceof this.constructor)p(n,e);else if(ve.isString(n)&&(n=n.trim())&&!Ox(n))p($x(n),e);else if(ve.isObject(n)&&ve.isSafeIterable(n)){let w=Object.create(null),u,f;for(const a of n){if(!ve.isArray(a))throw new TypeError("Object iterator must return a key-value pair");f=a[0],ve.hasOwnProp(w,f)?(u=w[f],w[f]=ve.isArray(u)?[...u,a[1]]:[u,a[1]]):w[f]=a[1]}p(w,e)}else n!=null&&d(e,n,r);return this}get(n,e){if(n=Ba(n),n){const r=ve.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return Lx(m);if(ve.isFunction(e))return e.call(this,m,r);if(ve.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=Ba(n),n){const r=ve.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||yu(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function d(p){if(p=Ba(p),p){const w=ve.findKey(r,p);w&&(!e||yu(r,r[w],w,e))&&(delete r[w],m=!0)}}return ve.isArray(n)?n.forEach(d):d(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const d=e[r];(!n||yu(this,this[d],d,n,!0))&&(delete this[d],m=!0)}return m}normalize(n){const e=this,r={};return ve.forEach(this,(m,d)=>{const p=ve.findKey(r,d);if(p){e[p]=Nl(m),delete e[d];return}const w=n?Nx(d):String(d).trim();w!==d&&delete e[d],e[w]=Nl(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return ve.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&ve.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[ap]=this[ap]={accessors:{}}).accessors,r=this.prototype;function m(d){const p=Ba(d);e[p]||(Dx(r,d),e[p]=!0)}return ve.isArray(n)?n.forEach(m):m(n),this}};Dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(Dr.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),ve.freezeMethods(Dr);const Px="[REDACTED ****]";function zx(t){if(ve.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(ve.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function Fx(t,n){const e=new Set(n.map(d=>String(d).toLowerCase())),r=[],m=d=>{if(d===null||typeof d!="object"||ve.isBuffer(d))return d;if(r.indexOf(d)!==-1)return;d instanceof Dr&&(d=d.toJSON()),r.push(d);let p;if(ve.isArray(d))p=[],d.forEach((w,u)=>{const f=m(w);ve.isUndefined(f)||(p[u]=f)});else{if(!ve.isPlainObject(d)&&zx(d))return r.pop(),d;p=Object.create(null);for(const[w,u]of Object.entries(d)){const f=e.has(w.toLowerCase())?Px:m(u);ve.isUndefined(f)||(p[w]=f)}}return r.pop(),p};return m(t)}let Xe=class gw extends Error{static from(n,e,r,m,d,p){const w=new gw(n.message,e||n.code,r,m,d);return Object.defineProperty(w,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),p&&Object.assign(w,p),w}constructor(n,e,r,m,d){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),d&&(this.response=d,this.status=d.status)}toJSON(){const n=this.config,e=n&&ve.hasOwnProp(n,"redact")?n.redact:void 0,r=ve.isArray(e)&&e.length>0?Fx(n,e):ve.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Xe.ERR_BAD_OPTION="ERR_BAD_OPTION",Xe.ECONNABORTED="ECONNABORTED",Xe.ETIMEDOUT="ETIMEDOUT",Xe.ECONNREFUSED="ECONNREFUSED",Xe.ERR_NETWORK="ERR_NETWORK",Xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Xe.ERR_DEPRECATED="ERR_DEPRECATED",Xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Xe.ERR_CANCELED="ERR_CANCELED",Xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Xe.ERR_INVALID_URL="ERR_INVALID_URL",Xe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Bx=null,lp=100;function bu(t){return ve.isPlainObject(t)||ve.isArray(t)}function cp(t){return ve.endsWith(t,"[]")?t.slice(0,-2):t}function wu(t,n,e){return t?t.concat(n).map(function(r,m){return r=cp(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function Wx(t){return ve.isArray(t)&&!t.some(bu)}const jx=ve.toFlatObject(ve,{},null,function(t){return/^is[A-Z]/.test(t)});function Dl(t,n,e){if(!ve.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=ve.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!ve.isUndefined(x[b])});const r=e.metaTokens,m=e.visitor||o,d=e.dots,p=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,u=e.maxDepth===void 0?lp:e.maxDepth,f=w&&ve.isSpecCompliantForm(n),a=[];if(!ve.isFunction(m))throw new TypeError("visitor must be a function");function s(b){if(b===null)return"";if(ve.isDate(b))return b.toISOString();if(ve.isBoolean(b))return b.toString();if(!f&&ve.isBlob(b))throw new Xe("Blob is not supported. Use a Buffer instead.");if(ve.isArrayBuffer(b)||ve.isTypedArray(b)){if(f&&typeof w=="function")return new w([b]);if(typeof Buffer<"u")return Buffer.from(b);throw new Xe("Blob is not supported. Use a Buffer instead.",Xe.ERR_NOT_SUPPORT)}return b}function c(b){if(b>u)throw new Xe("Object is too deeply nested ("+b+" levels). Max depth: "+u,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(b,x){if(u===1/0)return JSON.stringify(b);const E=[];return JSON.stringify(b,function($,_){if(!ve.isObject(_))return _;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(_),c(x+E.length-1),_})}function o(b,x,E){let $=b;if(ve.isReactNative(n)&&ve.isReactNativeBlob(b))return n.append(wu(E,x,d),s(b)),!1;if(b&&!E&&typeof b=="object"){if(ve.endsWith(x,"{}"))x=r?x:x.slice(0,-2),b=h(b,1);else if(ve.isArray(b)&&Wx(b)||(ve.isFileList(b)||ve.endsWith(x,"[]"))&&($=ve.toArray(b)))return x=cp(x),$.forEach(function(_,C){!(ve.isUndefined(_)||_===null)&&n.append(p===!0?wu([x],C,d):p===null?x:x+"[]",s(_))}),!1}return bu(b)?!0:(n.append(wu(E,x,d),s(b)),!1)}const l=Object.assign(jx,{defaultVisitor:o,convertValue:s,isVisitable:bu});function g(b,x,E=0){if(!ve.isUndefined(b)){if(c(E),a.indexOf(b)!==-1)throw new Error("Circular reference detected in "+x.join("."));a.push(b),ve.forEach(b,function($,_){(!(ve.isUndefined($)||$===null)&&m.call(n,$,ve.isString(_)?_.trim():_,x,l))===!0&&g($,x?x.concat(_):[_],E+1)}),a.pop()}}if(!ve.isObject(t))throw new TypeError("data must be an object");return g(t),n}function up(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function xu(t,n){this._pairs=[],t&&Dl(t,this,n)}const hp=xu.prototype;hp.append=function(t,n){this._pairs.push([t,n])},hp.toString=function(t){const n=t?e=>t.call(this,e,up):up;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function Hx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dp(t,n,e){if(!n)return t;t=t||"";const r=ve.isFunction(e)?{serialize:e}:e,m=ve.getSafeProp(r,"encode")||Hx,d=ve.getSafeProp(r,"serialize");let p;if(d?p=d(n,r):p=ve.isURLSearchParams(n)?n.toString():new xu(n,r).toString(m),p){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+p}return t}let fp=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){ve.forEach(this.handlers,function(e){e!==null&&n(e)})}};const Cu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ux=typeof URLSearchParams<"u"?URLSearchParams:xu,Vx=typeof FormData<"u"?FormData:null,qx=typeof Blob<"u"?Blob:null,Gx={isBrowser:!0,classes:{URLSearchParams:Ux,FormData:Vx,Blob:qx},protocols:["http","https","file","blob","url","data"]},_u=typeof window<"u"&&typeof document<"u",Au=typeof navigator=="object"&&navigator||void 0,Kx=_u&&(!Au||["ReactNative","NativeScript","NS"].indexOf(Au.product)<0),Yx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jx=_u&&window.location.href||"http://localhost",Zx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_u,hasStandardBrowserEnv:Kx,hasStandardBrowserWebWorkerEnv:Yx,navigator:Au,origin:Jx},Symbol.toStringTag,{value:"Module"})),Ar={...Zx,...Gx};function Xx(t,n){return Dl(t,new Ar.classes.URLSearchParams,{visitor:function(e,r,m,d){return Ar.isNode&&ve.isBuffer(e)?(this.append(r,e.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...n})}const pp=lp;function gp(t){if(t>pp)throw new Xe("FormData field is too deeply nested ("+t+" levels). Max depth: "+pp,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Qx(t){const n=[],e=/\w+|\[(\w*)]/g;let r;for(;(r=e.exec(t))!==null;)gp(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function e1(t){const n={},e=Object.keys(t);let r;const m=e.length;let d;for(r=0;r<m;r++)d=e[r],n[d]=t[d];return n}function mp(t){function n(e,r,m,d){gp(d);let p=e[d++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),u=d>=e.length;return p=!p&&ve.isArray(m)?m.length:p,u?(ve.hasOwnProp(m,p)?m[p]=ve.isArray(m[p])?m[p].concat(r):[m[p],r]:m[p]=r,!w):((!ve.hasOwnProp(m,p)||!ve.isObject(m[p]))&&(m[p]=[]),n(e,r,m[p],d)&&ve.isArray(m[p])&&(m[p]=e1(m[p])),!w)}if(ve.isFormData(t)&&ve.isFunction(t.entries)){const e={};return ve.forEachEntry(t,(r,m)=>{n(Qx(r),m,e,0)}),e}return null}const na=(t,n)=>t!=null&&ve.hasOwnProp(t,n)?t[n]:void 0;function t1(t,n,e){if(ve.isString(t))try{return(n||JSON.parse)(t),ve.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const Wa={transitional:Cu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=ve.isObject(t);if(m&&ve.isHTMLForm(t)&&(t=new FormData(t)),ve.isFormData(t))return r?JSON.stringify(mp(t)):t;if(ve.isArrayBuffer(t)||ve.isBuffer(t)||ve.isStream(t)||ve.isFile(t)||ve.isBlob(t)||ve.isReadableStream(t))return t;if(ve.isArrayBufferView(t))return t.buffer;if(ve.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(m){const p=na(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return Xx(t,p).toString();if((d=ve.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=na(this,"env"),u=w&&w.FormData;return Dl(d?{"files[]":t}:t,u&&new u,p)}}return m||r?(n.setContentType("application/json",!1),t1(t)):t}],transformResponse:[function(t){const n=na(this,"transitional")||Wa.transitional,e=n&&n.forcedJSONParsing,r=na(this,"responseType"),m=r==="json";if(ve.isResponse(t)||ve.isReadableStream(t))return t;if(t&&ve.isString(t)&&(e&&!r||m)){const d=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,na(this,"parseReviver"))}catch(p){if(d)throw p.name==="SyntaxError"?Xe.from(p,Xe.ERR_BAD_RESPONSE,this,null,na(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ar.classes.FormData,Blob:Ar.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(["delete","get","head","post","put","patch","query"],t=>{Wa.headers[t]={}});function ku(t,n){const e=this||Wa,r=n||e,m=Dr.from(r.headers);let d=r.data;return ve.forEach(t,function(p){d=p.call(e,d,m.normalize(),n?n.status:void 0)}),m.normalize(),d}function vp(t){return!!(t&&t.__CANCEL__)}let ja=class extends Xe{constructor(n,e,r){super(n??"canceled",Xe.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function yp(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new Xe("Request failed with status code "+e.status,e.status>=400&&e.status<500?Xe.ERR_BAD_REQUEST:Xe.ERR_BAD_RESPONSE,e.config,e.request,e))}function n1(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function r1(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,d=0,p;return n=n!==void 0?n:1e3,function(w){const u=Date.now(),f=r[d];p||(p=u),e[m]=w,r[m]=u;let a=d,s=0;for(;a!==m;)s+=e[a++],a=a%t;if(m=(m+1)%t,m===d&&(d=(d+1)%t),u-p<n)return;const c=f&&u-f;return c?Math.round(s*1e3/c):void 0}}function i1(t,n){let e=0,r=1e3/n,m,d;const p=(w,u=Date.now())=>{e=u,m=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const u=Date.now(),f=u-e;f>=r?p(w,u):(m=w,d||(d=setTimeout(()=>{d=null,p(m)},r-f)))},()=>m&&p(m)]}const Pl=(t,n,e=3)=>{let r=0;const m=r1(50,250);return i1(d=>{if(!d||typeof d.loaded!="number")return;const p=d.loaded,w=d.lengthComputable?d.total:void 0,u=w!=null?Math.min(p,w):p,f=Math.max(0,u-r),a=m(f);r=Math.max(r,u);const s={loaded:u,total:w,progress:w?u/w:void 0,bytes:f,rate:a||void 0,estimated:a&&w?(w-u)/a:void 0,event:d,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(s)},e)},bp=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},wp=t=>(...n)=>ve.asap(()=>t(...n)),o1=Ar.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,Ar.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(Ar.origin),Ar.navigator&&/(msie|trident)/i.test(Ar.navigator.userAgent)):()=>!0,s1=Ar.hasStandardBrowserEnv?{write(t,n,e,r,m,d,p){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];ve.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),ve.isString(r)&&w.push(`path=${r}`),ve.isString(m)&&w.push(`domain=${m}`),d===!0&&w.push("secure"),ve.isString(p)&&w.push(`SameSite=${p}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let e=0;e<n.length;e++){const r=n[e].replace(/^\s+/,""),m=r.indexOf("=");if(m!==-1&&r.slice(0,m)===t)try{return decodeURIComponent(r.slice(m+1))}catch{return r.slice(m+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function a1(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function l1(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}const c1=/^https?:(?!\/\/)/i,u1=/[\t\n\r]/g;function h1(t){let n=0;for(;n<t.length&&t.charCodeAt(n)<=32;)n++;return t.slice(n)}function d1(t){return h1(t).replace(u1,"")}function xp(t,n){if(typeof t=="string"&&c1.test(d1(t)))throw new Xe('Invalid URL: missing "//" after protocol',Xe.ERR_INVALID_URL,n)}function Cp(t,n,e,r){xp(n,r);let m=!a1(n);return t&&(m||e===!1)?(xp(t,r),l1(t,n)):n}const _p=t=>t instanceof Dr?{...t}:t;function Cs(t,n){t=t||{},n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,s,c,h){return ve.isPlainObject(a)&&ve.isPlainObject(s)?ve.merge.call({caseless:h},a,s):ve.isPlainObject(s)?ve.merge({},s):ve.isArray(s)?s.slice():s}function m(a,s,c,h){if(ve.isUndefined(s)){if(!ve.isUndefined(a))return r(void 0,a,c,h)}else return r(a,s,c,h)}function d(a,s){if(!ve.isUndefined(s))return r(void 0,s)}function p(a,s){if(ve.isUndefined(s)){if(!ve.isUndefined(a))return r(void 0,a)}else return r(void 0,s)}function w(a){const s=ve.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ve.isUndefined(s))if(ve.isPlainObject(s)){if(ve.hasOwnProp(s,a))return s[a]}else return;const c=ve.hasOwnProp(t,"transitional")?t.transitional:void 0;if(ve.isPlainObject(c)&&ve.hasOwnProp(c,a))return c[a]}function u(a,s,c){if(ve.hasOwnProp(n,c))return r(a,s);if(ve.hasOwnProp(t,c))return r(void 0,a)}const f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,allowedSocketPaths:p,responseEncoding:p,validateStatus:u,headers:(a,s,c)=>m(_p(a),_p(s),c,!0)};return ve.forEach(Object.keys({...t,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=ve.hasOwnProp(f,a)?f[a]:m,c=ve.hasOwnProp(t,a)?t[a]:void 0,h=ve.hasOwnProp(n,a)?n[a]:void 0,o=s(c,h,a);ve.isUndefined(o)&&s!==u||(e[a]=o)}),ve.hasOwnProp(n,"validateStatus")&&ve.isUndefined(n.validateStatus)&&w("validateStatusUndefinedResolves")===!1&&(ve.hasOwnProp(t,"validateStatus")?e.validateStatus=r(void 0,t.validateStatus):delete e.validateStatus),e}const f1=["content-type","content-length"];function p1(t,n,e){if(e!=="content-only"){t.set(n);return}Object.entries(n||{}).forEach(([r,m])=>{f1.includes(r.toLowerCase())&&t.set(r,m)})}const g1=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16)));function Ap(t){const n=Cs({},t),e=c=>ve.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const d=e("xsrfHeaderName"),p=e("xsrfCookieName");let w=e("headers");const u=e("auth"),f=e("baseURL"),a=e("allowAbsoluteUrls"),s=e("url");if(n.headers=w=Dr.from(w),n.url=dp(Cp(f,s,a,n),e("params"),e("paramsSerializer")),u){const c=ve.getSafeProp(u,"username")||"",h=ve.getSafeProp(u,"password")||"";try{w.set("Authorization","Basic "+btoa(c+":"+(h?g1(h):"")))}catch(o){throw Xe.from(o,Xe.ERR_BAD_OPTION_VALUE,t)}}if(ve.isFormData(r)&&(Ar.hasStandardBrowserEnv||Ar.hasStandardBrowserWebWorkerEnv||ve.isReactNative(r)?w.setContentType(void 0):ve.isFunction(r.getHeaders)&&p1(w,r.getHeaders(),e("formDataHeaderPolicy"))),Ar.hasStandardBrowserEnv&&(ve.isFunction(m)&&(m=m(n)),m===!0||m==null&&o1(n.url))){const c=d&&p&&s1.read(p);c&&w.set(d,c)}return n}const m1=typeof XMLHttpRequest<"u",v1=m1&&function(t){return new Promise(function(n,e){const r=Ap(t);let m=r.data;const d=Dr.from(r.headers).normalize();let{responseType:p,onUploadProgress:w,onDownloadProgress:u}=r,f,a,s,c,h;function o(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function g(){if(!l)return;const x=Dr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:t,request:l};yp(function($){n($),o()},function($){e($),o()},E),l=null}"onloadend"in l?l.onloadend=g:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.startsWith("file:"))||setTimeout(g)},l.onabort=function(){l&&(e(new Xe("Request aborted",Xe.ECONNABORTED,t,l)),o(),l=null)},l.onerror=function(x){const E=x&&x.message?x.message:"Network Error",$=new Xe(E,Xe.ERR_NETWORK,t,l);$.event=x||null,e($),o(),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Cu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new Xe(x,E.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,t,l)),o(),l=null},m===void 0&&d.setContentType(null),"setRequestHeader"in l&&ve.forEach(sp(d),function(x,E){l.setRequestHeader(E,x)}),ve.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),u&&([s,h]=Pl(u,!0),l.addEventListener("progress",s)),w&&l.upload&&([a,c]=Pl(w),l.upload.addEventListener("progress",a),l.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(f=x=>{l&&(e(!x||x.type?new ja(null,t,l):x),l.abort(),o(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const b=n1(r.url);if(b&&!Ar.protocols.includes(b)){e(new Xe("Unsupported protocol "+b+":",Xe.ERR_BAD_REQUEST,t)),o();return}l.send(m||null)})},y1=(t,n)=>{if(t=t?t.filter(Boolean):[],!n&&!t.length)return;const e=new AbortController;let r=!1;const m=function(u){if(!r){r=!0,p();const f=u instanceof Error?u:this.reason;e.abort(f instanceof Xe?f:new ja(f instanceof Error?f.message:f))}};let d=n&&setTimeout(()=>{d=null,m(new Xe(`timeout of ${n}ms exceeded`,Xe.ETIMEDOUT))},n);const p=()=>{t&&(d&&clearTimeout(d),d=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(m):u.removeEventListener("abort",m)}),t=null)};t.forEach(u=>u.addEventListener("abort",m,{once:!0}));const{signal:w}=e;return w.unsubscribe=()=>ve.asap(p),w},b1=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},w1=async function*(t,n){for await(const e of x1(t))yield*b1(e,n)},x1=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},kp=(t,n,e,r)=>{const m=w1(t,n);let d=0,p,w=u=>{p||(p=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:a}=await m.next();if(f){w(),u.close();return}let s=a.byteLength;if(e){let c=d+=s;e(c)}u.enqueue(new Uint8Array(a))}catch(f){throw w(f),f}},cancel(u){return w(u),m.return()}},{highWaterMark:2})},zl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,C1=(t,n,e)=>n+2<e&&zl(t.charCodeAt(n+1))&&zl(t.charCodeAt(n+2));function _1(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const e=t.slice(5,n),r=t.slice(n+1);if(/;base64/i.test(e)){let d=r.length;const p=r.length;for(let s=0;s<p;s++)if(r.charCodeAt(s)===37&&s+2<p){const c=r.charCodeAt(s+1),h=r.charCodeAt(s+2);zl(c)&&zl(h)&&(d-=2,s+=2)}let w=0,u=p-1;const f=s=>s>=2&&r.charCodeAt(s-2)===37&&r.charCodeAt(s-1)===51&&(r.charCodeAt(s)===68||r.charCodeAt(s)===100);u>=0&&(r.charCodeAt(u)===61?(w++,u--):f(u)&&(w++,u-=3)),w===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&w++;const a=Math.floor(d/4)*3-(w||0);return a>0?a:0}let m=0;for(let d=0,p=r.length;d<p;d++){const w=r.charCodeAt(d);if(w===37&&C1(r,d,p))m+=1,d+=2;else if(w<128)m+=1;else if(w<2048)m+=2;else if(w>=55296&&w<=56319&&d+1<p){const u=r.charCodeAt(d+1);u>=56320&&u<=57343?(m+=4,d++):m+=3}else m+=3}return m}const Su="1.18.1",Sp=64*1024,{isFunction:Fl}=ve,A1=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16))),$p=t=>{if(!ve.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Tp=(t,...n)=>{try{return!!t(...n)}catch{return!1}},k1=t=>{const n=t.indexOf("://");let e=t;return n!==-1&&(e=e.slice(n+3)),e.includes("@")||e.includes(":")},S1=t=>{const n=ve.global!==void 0&&ve.global!==null?ve.global:globalThis,{ReadableStream:e,TextEncoder:r}=n;t=ve.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:m,Request:d,Response:p}=t,w=m?Fl(m):typeof fetch=="function",u=Fl(d),f=Fl(p);if(!w)return!1;const a=w&&Fl(e),s=w&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new d(b).arrayBuffer())),c=u&&a&&Tp(()=>{let b=!1;const x=new d(Ar.origin,{body:new e,method:"POST",get duplex(){return b=!0,"half"}}),E=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!E}),h=f&&a&&Tp(()=>ve.isReadableStream(new p("").body)),o={stream:h&&(b=>b.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!o[b]&&(o[b]=(x,E)=>{let $=x&&x[b];if($)return $.call(x);throw new Xe(`Response type '${b}' is not supported`,Xe.ERR_NOT_SUPPORT,E)})});const l=async b=>{if(b==null)return 0;if(ve.isBlob(b))return b.size;if(ve.isSpecCompliantForm(b))return(await new d(Ar.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(ve.isArrayBufferView(b)||ve.isArrayBuffer(b))return b.byteLength;if(ve.isURLSearchParams(b)&&(b=b+""),ve.isString(b))return(await s(b)).byteLength},g=async(b,x)=>ve.toFiniteNumber(b.getContentLength())??l(x);return async b=>{let{url:x,method:E,data:$,signal:_,cancelToken:C,timeout:L,onDownloadProgress:D,onUploadProgress:I,responseType:M,headers:W,withCredentials:z="same-origin",fetchOptions:O,maxContentLength:T,maxBodyLength:A}=Ap(b);const N=ve.isNumber(T)&&T>-1,B=ve.isNumber(A)&&A>-1,U=ie=>ve.hasOwnProp(b,ie)?b[ie]:void 0;let G=m||fetch;M=M?(M+"").toLowerCase():"text";let J=y1([_,C&&C.toAbortSignal()],L),Q=null;const le=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let re,ce=null;const de=()=>new Xe("Request body larger than maxBodyLength limit",Xe.ERR_BAD_REQUEST,b,Q);try{let ie;const fe=U("auth");if(fe){const Me=ve.getSafeProp(fe,"username")||"",$t=ve.getSafeProp(fe,"password")||"";ie={username:Me,password:$t}}if(k1(x)){const Me=new URL(x,Ar.origin);if(!ie&&(Me.username||Me.password)){const $t=$p(Me.username),lt=$p(Me.password);ie={username:$t,password:lt}}(Me.username||Me.password)&&(Me.username="",Me.password="",x=Me.href)}if(ie&&(W.delete("authorization"),W.set("Authorization","Basic "+btoa(A1((ie.username||"")+":"+(ie.password||""))))),N&&typeof x=="string"&&x.startsWith("data:")&&_1(x)>T)throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,b,Q);if(B&&E!=="get"&&E!=="head"){const Me=await l($);if(typeof Me=="number"&&isFinite(Me)&&(re=Me,Me>A))throw de()}const $e=B&&(ve.isReadableStream($)||ve.isStream($)),Re=(Me,$t,lt)=>kp(Me,Sp,Jt=>{if(B&&Jt>A)throw ce=de();$t&&$t(Jt)},lt);if(c&&E!=="get"&&E!=="head"&&(I||$e)){if(re=re??await g(W,$),re!==0||$e){let Me=new d(x,{method:"POST",body:$,duplex:"half"}),$t;if(ve.isFormData($)&&($t=Me.headers.get("content-type"))&&W.setContentType($t),Me.body){const[lt,Jt]=I&&bp(re,Pl(wp(I)))||[];$=Re(Me.body,lt,Jt)}}}else if($e&&!u&&a&&E!=="get"&&E!=="head")$=Re($);else if($e&&u&&!c&&E!=="get"&&E!=="head")throw new Xe("Stream request bodies are not supported by the current fetch implementation",Xe.ERR_NOT_SUPPORT,b,Q);ve.isString(z)||(z=z?"include":"omit");const Ee=u&&"credentials"in d.prototype;if(ve.isFormData($)){const Me=W.getContentType();Me&&/^multipart\/form-data/i.test(Me)&&!/boundary=/i.test(Me)&&W.delete("content-type")}W.set("User-Agent","axios/"+Su,!1);const Ue={...O,signal:J,method:E.toUpperCase(),headers:sp(W.normalize()),body:$,duplex:"half",credentials:Ee?z:void 0};Q=u&&new d(x,Ue);let He=await(u?G(Q,O):G(x,Ue));const Ge=Dr.from(He.headers);if(N){const Me=ve.toFiniteNumber(Ge.getContentLength());if(Me!=null&&Me>T)throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,b,Q)}const ct=h&&(M==="stream"||M==="response");if(h&&He.body&&(D||N||ct&&le)){const Me={};["status","statusText","headers"].forEach(Nt=>{Me[Nt]=He[Nt]});const $t=ve.toFiniteNumber(Ge.getContentLength()),[lt,Jt]=D&&bp($t,Pl(wp(D),!0))||[];let hn=0;const Zn=Nt=>{if(N&&(hn=Nt,hn>T))throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,b,Q);lt&<(Nt)};He=new p(kp(He.body,Sp,Zn,()=>{Jt&&Jt(),le&&le()}),Me)}M=M||"text";let We=await o[ve.findKey(o,M)||"text"](He,b);if(N&&!h&&!ct){let Me;if(We!=null&&(typeof We.byteLength=="number"?Me=We.byteLength:typeof We.size=="number"?Me=We.size:typeof We=="string"&&(Me=typeof r=="function"?new r().encode(We).byteLength:We.length)),typeof Me=="number"&&Me>T)throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,b,Q)}return!ct&&le&&le(),await new Promise((Me,$t)=>{yp(Me,$t,{data:We,headers:Dr.from(He.headers),status:He.status,statusText:He.statusText,config:b,request:Q})})}catch(ie){if(le&&le(),J&&J.aborted&&J.reason instanceof Xe){const fe=J.reason;throw fe.config=b,Q&&(fe.request=Q),ie!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:ie,writable:!0,enumerable:!1,configurable:!0}),fe}if(ce)throw Q&&!ce.request&&(ce.request=Q),ce;if(ie instanceof Xe)throw Q&&!ie.request&&(ie.request=Q),ie;if(ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)){const fe=new Xe("Network Error",Xe.ERR_NETWORK,b,Q,ie&&ie.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:ie.cause||ie,writable:!0,enumerable:!1,configurable:!0}),fe}throw Xe.from(ie,ie&&ie.code,b,Q,ie&&ie.response)}}},$1=new Map,Rp=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,d=[r,m,e];let p=d.length,w=p,u,f,a=$1;for(;w--;)u=d[w],f=a.get(u),f===void 0&&a.set(u,f=w?new Map:S1(n)),a=f;return f};Rp();const $u={http:Bx,xhr:v1,fetch:{get:Rp}};ve.forEach($u,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const Ep=t=>`- ${t}`,T1=t=>ve.isFunction(t)||t===null||t===!1;function R1(t,n){t=ve.isArray(t)?t:[t];const{length:e}=t;let r,m;const d={};for(let p=0;p<e;p++){r=t[p];let w;if(m=r,!T1(r)&&(m=$u[(w=String(r)).toLowerCase()],m===void 0))throw new Xe(`Unknown adapter '${w}'`);if(m&&(ve.isFunction(m)||(m=m.get(n))))break;d[w||"#"+p]=m}if(!m){const p=Object.entries(d).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let w=e?p.length>1?`since :
|
|
4
|
+
`+p.map(Ep).join(`
|
|
5
|
+
`):" "+Ep(p[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+w,Xe.ERR_NOT_SUPPORT)}return m}const Mp={getAdapter:R1,adapters:$u};function Tu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ja(null,t)}function Ip(t){return Tu(t),t.headers=Dr.from(t.headers),t.data=ku.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Mp.getAdapter(t.adapter||Wa.adapter,t)(t).then(function(n){Tu(t),t.response=n;try{n.data=ku.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=Dr.from(n.headers),n},function(n){if(!vp(n)&&(Tu(t),n&&n.response)){t.response=n.response;try{n.response.data=ku.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=Dr.from(n.response.headers)}return Promise.reject(n)})}const Bl={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Bl[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const Lp={};Bl.transitional=function(t,n,e){function r(m,d){return"[Axios v"+Su+"] Transitional option '"+m+"'"+d+(e?". "+e:"")}return(m,d,p)=>{if(t===!1)throw new Xe(r(d," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!Lp[d]&&(Lp[d]=!0,console.warn(r(d," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,d,p):!0}},Bl.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function E1(t,n,e){if(typeof t!="object"||t===null)throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const d=r[m],p=Object.prototype.hasOwnProperty.call(n,d)?n[d]:void 0;if(p){const w=t[d],u=w===void 0||p(w,d,t);if(u!==!0)throw new Xe("option "+d+" must be "+u,Xe.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Xe("Unknown option "+d,Xe.ERR_BAD_OPTION)}}const Wl={assertOptions:E1,validators:Bl},Pr=Wl.validators;let _s=class{constructor(n){this.defaults=n||{},this.interceptors={request:new fp,response:new fp}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const d=(()=>{if(!m.stack)return"";const p=m.stack.indexOf(`
|
|
6
|
+
`);return p===-1?"":m.stack.slice(p+1)})();try{if(!r.stack)r.stack=d;else if(d){const p=d.indexOf(`
|
|
7
|
+
`),w=p===-1?-1:d.indexOf(`
|
|
8
|
+
`,p+1),u=w===-1?"":d.slice(w+1);String(r.stack).endsWith(u)||(r.stack+=`
|
|
9
|
+
`+d)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=Cs(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:d}=e;r!==void 0&&Wl.assertOptions(r,{silentJSONParsing:Pr.transitional(Pr.boolean),forcedJSONParsing:Pr.transitional(Pr.boolean),clarifyTimeoutError:Pr.transitional(Pr.boolean),legacyInterceptorReqResOrdering:Pr.transitional(Pr.boolean),advertiseZstdAcceptEncoding:Pr.transitional(Pr.boolean),validateStatusUndefinedResolves:Pr.transitional(Pr.boolean)},!1),m!=null&&(ve.isFunction(m)?e.paramsSerializer={serialize:m}:Wl.assertOptions(m,{encode:Pr.function,serialize:Pr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Wl.assertOptions(e,{baseUrl:Pr.spelling("baseURL"),withXsrfToken:Pr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=d&&ve.merge(d.common,d[e.method]);d&&ve.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete d[o]}),e.headers=Dr.concat(p,d);const w=[];let u=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;u=u&&o.synchronous;const l=e.transitional||Cu;l&&l.legacyInterceptorReqResOrdering?w.unshift(o.fulfilled,o.rejected):w.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let a,s=0,c;if(!u){const o=[Ip.bind(this),void 0];for(o.unshift(...w),o.push(...f),c=o.length,a=Promise.resolve(e);s<c;)a=a.then(o[s++],o[s++]);return a}c=w.length;let h=e;for(;s<c;){const o=w[s++],l=w[s++];try{h=o(h)}catch(g){l.call(this,g);break}}try{a=Ip.call(this,h)}catch(o){return Promise.reject(o)}for(s=0,c=f.length;s<c;)a=a.then(f[s++],f[s++]);return a}getUri(n){n=Cs(this.defaults,n);const e=Cp(n.baseURL,n.url,n.allowAbsoluteUrls,n);return dp(e,n.params,n.paramsSerializer)}};ve.forEach(["delete","get","head","options"],function(t){_s.prototype[t]=function(n,e){return this.request(Cs(e||{},{method:t,url:n,data:e&&ve.hasOwnProp(e,"data")?e.data:void 0}))}}),ve.forEach(["post","put","patch","query"],function(t){function n(e){return function(r,m,d){return this.request(Cs(d||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}_s.prototype[t]=n(),t!=="query"&&(_s.prototype[t+"Form"]=n(!0))});let M1=class mw{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](m);r._listeners=null}),this.promise.then=m=>{let d;const p=new Promise(w=>{r.subscribe(w),d=w}).then(m);return p.cancel=function(){r.unsubscribe(d)},p},n(function(m,d,p){r.reason||(r.reason=new ja(m,d,p),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new mw(function(e){n=e}),cancel:n}}};function I1(t){return function(n){return t.apply(null,n)}}function L1(t){return ve.isObject(t)&&t.isAxiosError===!0}const Ru={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ru).forEach(([t,n])=>{Ru[n]=t});function Op(t){const n=new _s(t),e=Yf(_s.prototype.request,n);return ve.extend(e,_s.prototype,n,{allOwnKeys:!0}),ve.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return Op(Cs(t,r))},e}const Jn=Op(Wa);Jn.Axios=_s,Jn.CanceledError=ja,Jn.CancelToken=M1,Jn.isCancel=vp,Jn.VERSION=Su,Jn.toFormData=Dl,Jn.AxiosError=Xe,Jn.Cancel=Jn.CanceledError,Jn.all=function(t){return Promise.all(t)},Jn.spread=I1,Jn.isAxiosError=L1,Jn.mergeConfig=Cs,Jn.AxiosHeaders=Dr,Jn.formToJSON=t=>mp(ve.isHTMLForm(t)?new FormData(t):t),Jn.getAdapter=Mp.getAdapter,Jn.HttpStatusCode=Ru,Jn.default=Jn;const{Axios:mD,AxiosError:vD,CanceledError:yD,isCancel:bD,CancelToken:wD,VERSION:xD,all:CD,Cancel:_D,isAxiosError:AD,spread:kD,toFormData:SD,AxiosHeaders:$D,HttpStatusCode:TD,formToJSON:RD,getAdapter:ED,mergeConfig:MD,create:ID}=Jn,Eu=Jn.create({baseURL:location.origin,timeout:6e4,params:{}});Eu.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let n=`HTTP ${t.response.status} - `;t.response?.statusText&&(n+=`${t.response.statusText} `),t.response?.config?.data&&(n+=`${t.response.config.data} `),t.response?.data?.message?n+=`${t.response.data.message}`:t.response?.data?.exception?n+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(n+=`${t.response.data.error.class} `),n+=`${t.response.data.error.message}`):n+=`${t.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:n}),t}else throw t});const jl=async function(t,n,{data:e,params:r={},headers:m,noAuth:d=!1,noScope:p=!1,onUploadProgress:w=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}m.Authorization=localStorage.openc3Token}return m.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),Eu({method:t,url:n,data:e,params:r,headers:m,onUploadProgress:w})},Mu={Accept:"application/json"},Np={...Mu,"Content-Type":"application/json"},LD=Yn("D",{get:function(t,{params:n,headers:e=Mu,noScope:r,noAuth:m,onUploadProgress:d}={}){return jl("get",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:d})},put:function(t,{data:n,params:e,headers:r=Np,noScope:m,noAuth:d,onUploadProgress:p}={}){return jl("put",t,{data:n,params:e,headers:r,noScope:m,noAuth:d,onUploadProgress:p})},post:function(t,{data:n,params:e,headers:r=Np,noScope:m,noAuth:d,onUploadProgress:p}={}){return jl("post",t,{data:n,params:e,headers:r,noScope:m,noAuth:d,onUploadProgress:p})},delete:function(t,{params:n,headers:e=Mu,noScope:r,noAuth:m,onUploadProgress:d}={}){return jl("delete",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:d})}});let Hl=()=>({emit(t,...n){for(let e=this.events[t]||[],r=0,m=e.length;r<m;r++)e[r](...n)},events:{},on(t,n){return(this.events[t]||=[]).push(n),()=>{this.events[t]=this.events[t]?.filter(e=>n!==e)}}}),Ha=class extends Error{constructor(n,e){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=e,this.name="ReasonError"}},Iu=class extends Ha{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}};class O1 extends Ha{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}let so=class extends Ha{constructor(n,e){e?super(n,e):super("Disconnected",n),this.name="DisconnectedError"}};class N1 extends so{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}}function Dp(t){return t?`{${Object.keys(t).sort().filter(n=>t[n]!==void 0).map(n=>{let e=JSON.stringify(t[n]);return`${JSON.stringify(n)}:${e}`}).join(",")}}`:""}class D1{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,e){if(!this._info)return this._info={id:String(n),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((e,{id:r,info:m})=>(e[r]=m,e),{})}}const As=Symbol("state");let Pp=class{constructor(n={}){this.emitter=Hl(),this.params=Object.freeze(n),this.presence=new D1(this),this.initialConnect=!0,this[As]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Dp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[As]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[As]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[As]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[As]="connected";let n=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[As]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[As]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,e)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(n,e){this.emit("message",n,e)}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}emit(n,...e){return this.emitter.emit(n,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((n,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(m=>m()),n()})),r.push(this.on("close",m=>{r.forEach(d=>d()),e(m||new Ha("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class P1{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let e=this.channels.indexOf(n);e>-1&&this.channels.splice(e,1)}notify(n,...e){this.state=n==="restored"?"connected":n,e.length===1?this.channels.forEach(r=>r[n](e[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let e=this._pendings[0];return!e||e.intent!==n?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(n){this._checkIntent(n);let e,r={promise:new Promise(d=>{e=d}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},m=this._pendingTop;return this._pendings.push(r),m&&await m.promise,this.gvl&&await this.gvl.acquire(r,n),r.acquired=!0,r}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let e=this._pendingTop;return!e||e.acquired||e.intent!==n?!1:(this._pendings.pop(),e.canceled=!0,!0)}}let z1=class{constructor(){this.queue=[]}async acquire(n,e){e==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}};class F1{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new z1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:e,unsubscribe:r}){let m=this._subscriptions[n]=new P1(n);return m.remoteId=this._localToRemote[n],m.subscriber=e,m.unsubscriber=r,m.gvl=this.glv,m}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,e){this._localToRemote[n]=e;let r=this.get(n);r&&(r.remoteId=e)}}class B1{constructor(n={}){this.subscriptions=new F1(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,e){this._remoteToLocal[e]=n,this.subscriptions.storeRemoteId(n,e),this.flush(e)}unsubscribe(n){let e=this.subscriptions.get(n);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,e,r){let m=this._remoteToLocal[n];if(!m){this._pendingMessages.push([n,e,r]);return}let d=this.subscriptions.get(m);d&&d.channels.forEach(p=>{p.receive(e,r)})}notify(n,e,r){let m=this._remoteToLocal[n];if(!m)return;let d=this.subscriptions.get(m);d&&d.channels.forEach(p=>p.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let e=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const zp={debug:0,info:1,warn:2,error:3};let Fp=class{constructor(n){this.level=n||"warn"}log(n,e,r){zp[n]<zp[this.level]||this.writeLogEntry(n,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,e){this.log("debug",n,e)}info(n,e){this.log("info",n,e)}warn(n,e){this.log("warn",n,e)}error(n,e){this.log("error",n,e)}},Ua=class extends Fp{writeLogEntry(){}};class W1{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}}let j1=0,Bp=class{constructor(n={}){let{logger:e}=n;this.logger=e||new Ua,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,e){let r={channel:n};e&&Object.assign(r,e);let m=Dp(r);if(this.pendingUnsubscriptions[m]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,m),new Promise(w=>{setTimeout(()=>{w(this.subscribe(n,e))},p)})}if(this.pendingSubscriptions[m])return this.logger.warn("subscription is already pending, skipping",m),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((p,w)=>{let u=++j1;this.pendingSubscriptions[m]={resolve:p,reject:w,id:u},this.cable.send(this.buildSubscribeRequest(m)),this.maybeRetrySubscribe(u,m,d)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(n,e,r))},r)}maybeExpireSubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(delete this.pendingSubscriptions[e],m.reject(new O1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,e,r){return e==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,e){return this.cable.send({command:"whisper",identifier:n,data:e}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m,reason:d,reconnect:p}=n;if(e==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="welcome"){let w=n.sid;return w&&this.cable.setSessionId(w),this.cable.connected()}if(e==="disconnect"){let w=new so(d);this.reset(w),p===!1?this.cable.closed(w):this.cable.disconnected(w);return}if(e==="confirm_subscription"){let w=this.pendingSubscriptions[r];if(!w){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],w.resolve(r)}if(e==="reject_subscription"){let w=this.pendingSubscriptions[r];return w?(delete this.pendingSubscriptions[r],w.reject(new Iu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(m)return{identifier:r,message:m};this.logger.warn(`unknown message type: ${e}`,{message:n})}reset(n){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const Wp=()=>Date.now()/1e3|0;class H1 extends Bp{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Wp()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let e in this.pendingPresence)this.pendingPresence[e].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m}=n;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(e==="reject_subscription")return super.receive(n);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(e==="ping")return this.restoreSince&&(this.restoreSince=Wp()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let d=n.restored_ids||Object.keys(this.subscriptionStreams);for(let p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(e==="presence"){let d=m.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(m))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:m}}if(m){let d=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:m,meta:d}}this.logger.warn(`unknown message type: ${e}`,{message:n})}perform(n,e,r){switch(e){case"$presence:join":return this.join(n,r);case"$presence:leave":return this.leave(n,r);case"$presence:info":return this.presence(n,r)}return super.perform(n,e,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let e=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(e.history=r,this.pendingHistory[n]=!0);let m=this.presenceInfo[n];return m&&(e.presence=m),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let e={},r=!1;if(this.subscriptionStreams[n])for(let m of this.subscriptionStreams[n]){let d=this.streamsPositions[m];d&&(r=!0,e[m]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(n,e,r,m){if(!(!e||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(e),this.streamsPositions[e]={epoch:r,offset:m},{stream:e,epoch:r,offset:m}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,e){return this.presenceInfo[n]=e,this.cable.send({command:"join",identifier:n,presence:e}),Promise.resolve()}async leave(n,e){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:e}),Promise.resolve()}presence(n,e){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,m)=>{this.pendingPresence[n]={resolve:r,reject:m},this.cable.send({command:"presence",identifier:n,data:e})})}}class U1 extends Ha{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}let jp=class extends Pp{static identifier="__ghost__";constructor(n,e){super(e),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}};const V1="$pubsub";let Hp=class extends Pp{static identifier=V1;async perform(n,e){if(n.startsWith("$"))return super.perform(n,e);throw Error("not implemented")}};const ks=Symbol("state");let q1=class{constructor({transport:t,protocol:n,encoder:e,logger:r,lazy:m,hubOptions:d,performFailures:p,transportConfigurator:w}){this.emitter=Hl(),this.transport=t,this.encoder=e,this.logger=r||new Ua,this.protocol=n,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new B1(d||{}),this[ks]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=w,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,m===!1&&this.connect().catch(()=>{})}get state(){return this[ks]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[ks]="connecting";let n=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(e){this.handleClose(e)}return n}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[ks]="connected",this.recovering&&this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",new so("recovery_failed"))),this.hub.subscriptions.all().forEach(n=>this._resubscribe(n));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[ks]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new so("recovery_failed")),this._resubscribe(r))});let n=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}notify(t,n,e){n&&typeof n!="string"&&(e=n,n=void 0),n?this.hub.notify(n,"info",{type:t,data:e}):this.emit("info",{type:t,data:e})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new so(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[ks]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(n=>n.notify("connecting")):this.hub.subscriptions.all().forEach(n=>{n.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let n;t&&(n=t instanceof so?t:new so(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[ks]="closed";let e=n||new so("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",n)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let n=this.encoder.decode(t);if(n===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",n);let e=this.protocol.receive(n);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:m,message:d,meta:p}=e;r?this.hub.notify(m,r,d):this.hub.transmit(m,d,p)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let n=this.encoder.encode(t);if(n===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(n)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let n=new Hp({stream_name:t});return this.subscribe(n)}streamFromSigned(t){let n=new Hp({signed_stream_name:t});return this.subscribe(n)}subscribeTo(t,n){let e,r;return typeof t=="string"&&(r=t,t=jp),e=r?new t(r,n):new t(n),this.subscribe(e)}subscribe(t){if(!t.attached(this))return t;let n=t.identifier;t.connecting();let e=this.hub.subscriptions.get(n)||this.hub.subscriptions.create(n,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(t),e.intent==="subscribed"&&e.state==="connected"&&t.connected(),e.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,n,e){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let m=await t.acquire("subscribed");if(m.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),m.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),m.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),m.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),m.release();return}let d={identifier:n,params:e};this.logger.debug("subscribing",d);try{let p=await this.protocol.subscribe(n,e);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof Iu&&this.logger.warn("rejected",d),p instanceof so){this.logger.debug("disconnected during subscription; will retry on connect",d),m.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),this.hub.unsubscribe(r)}m.release()}unsubscribe(t){let n=t.identifier,e=this.hub.subscriptions.get(n);if(!e)throw Error(`Subscription not found: ${n}`);e.remove(t),t.closed(),e.maybeUnsubscribe()}async _unsubscribe(t){let n=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:n});let e=await t.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:n}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:n}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:n,intent:t.intent}),e.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:n}),e.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:n}),t.close(),this.hub.unsubscribe(n),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:n})}catch(m){m&&(m instanceof so?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:n,error:m}):this.logger.error("unsubscribe failed",{id:n,error:m}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(n)):t.state="closed",e.release()}async perform(t,n,e){if(this.performFailures==="throw")return this._perform(t,n,e);try{return await this._perform(t,n,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,n,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new U1;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let m=r.remoteId,d={id:m,action:n,payload:e};this.logger.debug("perform",d);try{let p=await this.protocol.perform(m,n,e);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}on(t,n){return this.emitter.on(t,n)}once(t,n){let e=this.emitter.on(t,(...r)=>{e(),n(...r)});return e}emit(t,...n){return this.emitter.emit(t,...n)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,n)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),t()})),e.push(this.on("close",r=>{e.forEach(m=>m()),n(r)})),e.push(this.on("disconnect",r=>{e.forEach(m=>m()),n(r)}))}),this._pendingConnect)}};const G1={maxMissingPings:2,maxReconnectAttempts:1/0},ra=()=>Date.now(),Up=(t,n)=>{n=n||{};let{backoffRate:e,jitterRatio:r,maxInterval:m}=n;return e=e||2,r===void 0&&(r=.5),d=>{let p=t*e**d,w=p*e,u=p+(w-p)*Math.random(),f=2*(Math.random()-.5)*r;return u=u*(1+f),m&&m<u&&(u=m),u}};let Vp=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},G1,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Ua,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ra()}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=ra(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ra(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ra(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ra()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(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=ra()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new N1))}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 K1{constructor(n,e={}){this.transports=n,this.transport=null,this.emitter=Hl(),this.unbind=[],this.logger=e.logger||new Ua}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let e=this.transports[n];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(n,e){this.transports.forEach(r=>{r.setParam(n,e)})}setToken(n,e){this.transports.forEach(r=>{r.setToken(n,e)})}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}}class Y1{constructor(n,e={}){this.url=n;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Hl();let{format:m,subprotocol:d,authStrategy:p}=e;this.format=m||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=p||"param",this.authProtocol="",this.subprotocol=d}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let m=[];m.push(this.once("open",()=>{m.forEach(d=>d()),e()})),m.push(this.once("close",()=>{m.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,e){let r=new URL(this.url);r.searchParams.set(n,e);let m=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(m)}setToken(n,e="jid"){if(this.authStrategy==="param")this.setParam(e,n);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(m=>m.toLowerCase()===r)||r,this.connectionOptions.headers[r]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let e=n.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class J1{constructor(n){this.channel=n}notify(n,...e){typeof this[n]=="function"&&this[n](...e)}perform(n,e={}){this.channel.perform(n,e)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Z1 extends jp{constructor(n,e,r){super(n,e),this.subscription=new J1(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 Iu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class X1{constructor(n){this.cable=n}create(n,e){let r,m;typeof n=="object"?(r=n.channel,delete n.channel,m=n):(r=n,m={});let d=new Z1(r,m,e);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(n){return this.cable.hub.channels.filter(e=>e.identifier===n).map(e=>e.subscription)}}class Q1{constructor(n){this.cable=n,this.subscriptions=new X1(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const qp={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function eC(t,n){if(typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),n=n||{},!t&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},qp,n);let{protocol:e,websocketImplementation:r,websocketFormat:m,websocketOptions:d,websocketAuthStrategy:p,fallbacks:w,logLevel:u,logger:f,transport:a,encoder:s,lazy:c,monitor:h,pingInterval:o,reconnectStrategy:l,maxMissingPings:g,maxReconnectAttempts:b,subprotocol:x,tokenRefresher:E,historyTimestamp:$,protocolOptions:_,concurrentSubscribes:C,performFailures:L,transportConfigurator:D,auth:I}=n;if(f=f||new Ua(u),typeof e=="string"){x=x||e;let z=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(_=_||{},z==="actioncable-v1")e=new Bp({logger:f,..._});else if(z==="actioncable-v1-ext")e=new H1({logger:f,historyTimestamp:$,..._});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")s=s||new W1,m=m||"text";else if(O==="msgpack"){if(m="binary",!s)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",!s)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");a=a||new Y1(t,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:p,format:m}),w&&(a=new K1([a,...w],{logger:f})),I&&I.token&&a.setToken(I.token,I.param||"jid"),l=l||Up(o),h!==!1&&(h=h||new Vp({pingInterval:o,reconnectStrategy:l,maxMissingPings:g,maxReconnectAttempts:b,logger:f}));let M={concurrentSubscribes:C},W=new q1({protocol:e,transport:a,encoder:s,logger:f,lazy:c,hubOptions:M,performFailures:L,transportConfigurator:D});return h&&(h.watch(W),W.monitor=h),E&&tC(W,async()=>{try{await E(a)}catch(z){return f.error("Failed to refresh authentication token: "+z),!1}return W.connect().catch(()=>{}),!0}),W}function tC(t,n){let e=!1;t.on("connect",()=>e=!1),t.on("close",async r=>{if(r){if(e){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await n())}})}class nC extends Fp{writeLogEntry(n,e,r){r?console[n](e,r):console[n](e)}}class rC extends Vp{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=m=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:m})},r=()=>this.disconnect(new so("page_frozen"));document.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",n,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}}const iC=["cable","action-cable"],oC="/cable",Ul=(t,n)=>{for(let e of iC){let r=t.head.querySelector(`meta[name='${e}-${n}']`);if(r)return r.getAttribute("content")}},Gp=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,sC=()=>{if(typeof document<"u"&&document.head){let t=Ul(document,"url");if(t)return Gp(t)}return Gp(oC)},aC=()=>{if(typeof document<"u"&&document.head){let t=Ul(document,"history-timestamp");if(t)return t|0}},lC=()=>{if(typeof document<"u"&&document.head)return Ul(document,"token")},cC=()=>{if(typeof document<"u"&&document.head)return Ul(document,"token-param")};function uC(t,n){typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),t=t||sC(),n=n||{},n.historyTimestamp||=aC();let e=lC();if(e){let f=cC();n.auth=Object.assign({token:e,param:f},n.auth||{})}n=Object.assign({},qp,n);let{logLevel:r,logger:m,pingInterval:d,reconnectStrategy:p,maxMissingPings:w,maxReconnectAttempts:u}=n;return m=n.logger=n.logger||new nC(r),p=n.reconnectStrategy=n.reconnectStrategy||Up(d),n.monitor!==!1&&(n.monitor=n.monitor||new rC({pingInterval:d,reconnectStrategy:p,maxMissingPings:w,maxReconnectAttempts:u,logger:m})),eC(t,n)}function hC(t,n){let e=uC(t,n);return new Q1(e)}class Kp{constructor(n="/openc3-api/cable"){this._cable=null,this._url=n}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,e,r={},m={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){const p=new URL(this._url,document.baseURI);p.searchParams.set("scope",e),this._cable=hC(p.href)}return this._cable.subscriptions.create({channel:n,token:localStorage.openc3Token,...m},r)})}recordPing(){}}Yn("I",Kp),Yn("K",class{constructor(n,e,r="",m=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=e,this.usage=r,this.url=m}});function Va(t){return dC.test(t)}const dC=/^-?[0-9]+$/;function Yp(t){return fC.test(t)}const fC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Jp(t,n){if(Va(t))return Number.isSafeInteger(Number.parseInt(t,10));const e=Number.parseFloat(t),r=String(e);if(t===r)return!0;const m=Zp(t),d=Zp(r);return!!(m===d||n?.approx===!0&&!Va(t)&&d.length>=14&&m.startsWith(d.substring(0,14)))}let qa=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function pC(t){if(Jp(t,{approx:!1}))return;if(Va(t))return qa.truncate_integer;const n=Number.parseFloat(t);return Number.isFinite(n)?n===0?qa.underflow:qa.truncate_float:qa.overflow}function Zp(t){const{start:n,end:e}=gC(t),r=t.substring(n,e),m=r.indexOf(".");return m===-1?r:r.substring(0,m)+r.substring(m+1)}function gC(t){let n=0;for(t[0]==="-"&&n++;t[n]==="0"||t[n]===".";)n++;let e=t.lastIndexOf("e");for(e===-1&&(e=t.lastIndexOf("E")),e===-1&&(e=t.length);(t[e-1]==="0"||t[e-1]===".")&&e>n;)e--;return{start:n,end:e}}class mC{isLosslessNumber=!0;constructor(n){if(!Yp(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=pC(this.value);if(n===void 0||n===qa.truncate_float)return Number.parseFloat(this.value);if(Va(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function vC(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function yC(t){return new mC(t)}function bC(t,n){return Lu({"":t},"",t,n)}function Lu(t,n,e,r){return Array.isArray(e)?r.call(t,n,xC(e,r)):e&&typeof e=="object"&&!vC(e)?r.call(t,n,wC(e,r)):r.call(t,n,e)}function wC(t,n){for(const e of Object.keys(t)){const r=Lu(t,e,t[e],n);r!==void 0?t[e]=r:delete t[e]}return t}function xC(t,n){for(let e=0;e<t.length;e++)t[e]=Lu(t,String(e),t[e],n);return t}function CC(t,n,e){const r=typeof e=="function"?{parseNumber:e}:e,m=r?.parseNumber??yC,d=r?.onDuplicateKey??L;let p=0;const w=a();return b(w),E(),n?bC(w,n):w;function u(){if(t.charCodeAt(p)===TC){p++,c();const B={};let U=!0;for(;p<t.length&&t.charCodeAt(p)!==Qp;){U?U=!1:(l(),c());const G=p,J=h();if(J===void 0){C();return}c(),g();const Q=a();if(Q===void 0){z();return}if(Object.prototype.hasOwnProperty.call(B,J)&&!Ou(Q,B[J])){const le=d({key:J,position:G+1,oldValue:B[J],newValue:Q});le!==void 0&&(B[J]=le)}else B[J]=Q}return t.charCodeAt(p)!==Qp&&D(),p++,B}}function f(){if(t.charCodeAt(p)===RC){p++,c();const B=[];let U=!0;for(;p<t.length&&t.charCodeAt(p)!==eg;){U?U=!1:l();const G=a();x(G),B.push(G)}return t.charCodeAt(p)!==eg&&I(),p++,B}}function a(){c();const B=h()??o()??u()??f()??s("true",!0)??s("false",!1)??s("null",null);return c(),B}function s(B,U){if(t.slice(p,p+B.length)===B)return p+=B.length,U}function c(){for(;_C(t.charCodeAt(p));)p++}function h(){if(t.charCodeAt(p)===Nu){p++;let B="";for(;p<t.length&&t.charCodeAt(p)!==Nu;){if(t.charCodeAt(p)===$C){const U=t[p+1],G=SC[U];G!==void 0?(B+=G,p++):U==="u"?Vl(t.charCodeAt(p+2))&&Vl(t.charCodeAt(p+3))&&Vl(t.charCodeAt(p+4))&&Vl(t.charCodeAt(p+5))?(B+=String.fromCharCode(Number.parseInt(t.slice(p+2,p+6),16)),p+=5):O(p):W(p)}else kC(t.charCodeAt(p))?B+=t[p]:M(t[p]);p++}return _(),p++,B}}function o(){const B=p;if(t.charCodeAt(p)===tg&&(p++,$(B)),t.charCodeAt(p)===Du)p++;else if(AC(t.charCodeAt(p)))for(p++;ql(t.charCodeAt(p));)p++;if(t.charCodeAt(p)===PC)for(p++,$(B);ql(t.charCodeAt(p));)p++;if(t.charCodeAt(p)===jC||t.charCodeAt(p)===WC)for(p++,(t.charCodeAt(p)===tg||t.charCodeAt(p)===OC)&&p++,$(B);ql(t.charCodeAt(p));)p++;if(p>B)return m(t.slice(B,p))}function l(){if(t.charCodeAt(p)!==DC)throw new SyntaxError(`Comma ',' expected after value ${N()}`);p++}function g(){if(t.charCodeAt(p)!==zC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);p++}function b(B){if(B===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function x(B){if(B===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function E(){if(p<t.length)throw new SyntaxError(`Expected end of input ${N()}`)}function $(B){if(!ql(t.charCodeAt(p))){const U=t.slice(B,p);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${N()}`)}}function _(){if(t.charCodeAt(p)!==Nu)throw new SyntaxError(`End of string '"' expected ${N()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function L(B){let{key:U,position:G}=B;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${G}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function M(B){throw new SyntaxError(`Invalid character '${B}' ${T()}`)}function W(B){const U=t.slice(B,B+2);throw new SyntaxError(`Invalid escape character '${U}' ${T()}`)}function z(){throw new SyntaxError(`Object value expected after ':' ${T()}`)}function O(B){const U=t.slice(B,B+6);throw new SyntaxError(`Invalid unicode character '${U}' ${T()}`)}function T(){return`at position ${p}`}function A(){return p<t.length?`but got '${t[p]}'`:"but reached end of input"}function N(){return`${A()} ${T()}`}}function _C(t){return t===EC||t===MC||t===IC||t===LC}function Vl(t){return t>=Du&&t<=Pu||t>=FC&&t<=HC||t>=BC&&t<=UC}function ql(t){return t>=Du&&t<=Pu}function AC(t){return t>=NC&&t<=Pu}function kC(t){return t>=32&&t<=1114111}function Ou(t,n){return t===n?!0:Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>Ou(e,n[r])):Xp(t)&&Xp(n)?[...new Set([...Object.keys(t),...Object.keys(n)])].every(e=>Ou(t[e],n[e])):!1}function Xp(t){return typeof t=="object"&&t!==null}const SC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
10
|
+
`,r:"\r",t:" "},$C=92,TC=123,Qp=125,RC=91,eg=93,EC=32,MC=10,IC=9,LC=13,Nu=34,OC=43,tg=45,Du=48,NC=49,Pu=57,DC=44,PC=46,zC=58,FC=65,BC=97,WC=69,jC=101,HC=70,UC=102;function ng(t,n,e,r){return m(t);function m(u,f){if(Array.isArray(r)){const a=r.find(s=>s.test(u));if(a){const s=a.stringify(u);if(typeof s!="string"||!Yp(s))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${s})`);return s}}if(typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u===null||u instanceof Date||u instanceof Boolean||u instanceof Number||u instanceof String)return JSON.stringify(u);if(u?.isLosslessNumber||typeof u=="bigint")return u.toString();if(Array.isArray(u))return d(u);if(u&&typeof u=="object")return p(u)}function d(u,f){if(u.length===0)return"[]";let a="[";for(let s=0;s<u.length;s++){const c=u[s];typeof c<"u"&&typeof c!="function"?a+=m(c):a+="null",s<u.length-1&&(a+=",")}return a+="]",a}function p(u,f){if(typeof u.toJSON=="function")return ng(u.toJSON(),n,e,void 0);const a=Array.isArray(n)?n.map(String):Object.keys(u);if(a.length===0)return"{}";let s=!0,c="{";for(const h of a){const o=u[h];if(w(h,o)){s?s=!1:c+=",";const l=JSON.stringify(h);c+=`${l}:`,c+=m(o)}}return c+="}",c}function w(u,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function VC(t){return Va(t)&&!Jp(t)?BigInt(t):parseFloat(t)}class qC{id=1;constructor(){}async exec(n,e,r={},m={},d=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 Eu.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...m},timeout:d,transformRequest:[(p,w)=>ng(p)],transformResponse:[p=>{try{return CC(p,void 0,VC)}catch{const w=typeof p=="string"?p.substring(0,200):String(p),u=new Error(`Server returned non-JSON response: ${w}`);throw u.name="ServerError",u}}]})).data.result}catch(p){let w=new Error;throw p.response?(w.name=p.response.data.error.data.class,w.message=p.response.data.error.data.message,w.object=p.response.data.error):p.request?(w.name="Request error",w.message="Request error, no response received"):w=p,w}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,e,r,m,d){return this.exec("map_target_to_interface",[n,e],{cmd_only:r,tlm_only:m,unmap_old:d})}unmap_target_from_interface(n,e,r,m){return this.exec("unmap_target_from_interface",[n,e],{cmd_only:r,tlm_only:m})}connect_interface(n,...e){return e.length>0?this.exec("connect_interface",[n,...e]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,e,...r){return this.exec("interface_cmd",[n,e,...r])}interface_target_enable(n,e,r=!1,m=!1){return this.exec("interface_target_enable",[n,e],{cmd_only:r,tlm_only:m})}interface_target_disable(n,e,r=!1,m=!1){return this.exec("interface_target_disable",[n,e],{cmd_only:r,tlm_only:m})}interface_details(n){return this.exec("interface_details",[n])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(n,e,r,m,d){return this.exec("map_target_to_router",[n,e],{cmd_only:r,tlm_only:m,unmap_old:d})}unmap_target_from_router(n,e,r,m){return this.exec("unmap_target_from_router",[n,e],{cmd_only:r,tlm_only:m})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,e,r=!1,m=!1){return this.exec("router_target_enable",[n,e],{cmd_only:r,tlm_only:m})}router_target_disable(n,e,r=!1,m=!1){return this.exec("router_target_disable",[n,e],{cmd_only:r,tlm_only:m})}router_details(n){return this.exec("router_details",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,e,r){return this.exec("get_item",[n,e,r])}get_param(n,e,r){return this.exec("get_param",[n,e,r])}get_parameter(n,e,r){return this.exec("get_param",[n,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}delete_limits_set(n){return this.exec("delete_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(n,e){return this.exec("get_tlm",[n,e])}get_telemetry(n,e){return this.exec("get_tlm",[n,e])}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.exec("get_all_tlm",[n])}get_all_tlm_names(n,e=!1){return this.exec("get_all_tlm_names",[n],{hidden:e})}get_all_telemetry_names(n){return this.exec("get_all_tlm_names",[n])}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,e,r,m=30){const d=await this.exec("get_tlm_packet",[n,e],{type:r,stale_time:m});if(d!=null){let p=d.length,w=null;for(let u=0;u<p;u++)w=this.decode_openc3_type(d[u][1]),w!==null&&(d[u][1]=w)}return d}get_packet_derived_items(n,e){return this.exec("get_packet_derived_items",[n,e])}get_tlm_buffer(n,e){return this.exec("get_tlm_buffer",[n,e])}get_tlm_available(n){return this.exec("get_tlm_available",[n])}async get_tlm_values(n,e=30,r=null,m=null,d=null){let p={stale_time:e};r!==null&&(p.cache_timeout=r),m!==null&&(p.start_time=m.toISOString()),d!==null&&(p.end_time=d.toISOString());const w=await this.exec("get_tlm_values",[n],p,{},1e4);if(w&&w.length>0){let u=w.length,f=null;for(let a=0;a<u;a++)f=this.decode_openc3_type(w[a][0]),f!==null&&(w[a][0]=f)}return w}get_limits(n,e,r){return this.exec("get_limits",[n,e,r])}async tlm(n,e,r,m="CONVERTED"){let d=null;if(e===void 0)d=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))d=await this.exec("tlm",[n],{type:e});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,w}else d=await this.exec("tlm",[n,e,r],{type:m});let p=this.decode_openc3_type(d);return p!==null&&(d=p),d}async inject_tlm(n,e,r=null,m="CONVERTED",d=!1){await this.exec("inject_tlm",[n,e,r],{type:m,stored:d})}set_tlm(n,e,r,m){return this.exec("set_tlm",[n,e,r],{type:m})}override_tlm(n,e,r,m){return this.exec("override_tlm",[n,e,r],{type:m})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,e,r,m){return this.exec("normalize_tlm",[n,e,r],{type:m})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.exec("get_all_cmds",[n])}get_all_cmd_names(n,e=!1){return this.exec("get_all_cmd_names",[n],{hidden:e})}get_all_command_names(n){return this.exec("get_all_cmd_names",[n])}get_cmd(n,e){return this.exec("get_cmd",[n,e])}get_command(n,e){return this.exec("get_cmd",[n,e])}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,e,r,m="CONVERTED"){return this.exec("get_cmd_value",[n,e,r,m])}get_cmd_buffer(n,e){return this.exec("get_cmd_buffer",[n,e])}_cmd(n,e,r,m,d,p={}){let w=null;for(let u in m)Object.prototype.hasOwnProperty.call(m,u)&&(w=this.encode_openc3_type(m[u]),w!==null&&(m[u]=w));return this.exec(n,[e,r,m],p,d)}get_cmd_hazardous(n,e,r,m={}){return e===void 0?this.exec("get_cmd_hazardous",n,{},m):this._cmd("get_cmd_hazardous",n,e,r,m)}cmd(n,e,r,m={},d={}){return e===void 0?this.exec("cmd",n,d,m):this._cmd("cmd",n,e,r,m,d)}cmd_no_range_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_no_range_check",n,d,m):this._cmd("cmd_no_range_check",n,e,r,m,d)}cmd_raw(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw",n,d,m):this._cmd("cmd_raw",n,e,r,m,d)}cmd_raw_no_range_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw_no_range_check",n,d,m):this._cmd("cmd_raw_no_range_check",n,e,r,m,d)}cmd_no_hazardous_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_no_hazardous_check",n,d,m):this._cmd("cmd_no_hazardous_check",n,e,r,m,d)}cmd_no_checks(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_no_checks",n,d,m):this._cmd("cmd_no_checks",n,e,r,m,d)}cmd_raw_no_hazardous_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",n,d,m):this._cmd("cmd_raw_no_hazardous_check",n,e,r,m,d)}cmd_raw_no_checks(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw_no_checks",n,d,m):this._cmd("cmd_raw_no_checks",n,e,r,m,d)}build_cmd(n,e,r,m={},d={}){return e===void 0?this.exec("build_cmd",n,d,m):this._cmd("build_cmd",n,e,r,m,d)}build_command(n,e,r,m={},d={}){return e===void 0?this.exec("build_cmd",n,d,m):this._cmd("build_cmd",n,e,r,m,d)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,e){return this.exec("send_raw",[n,e])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,e){return this.exec("load_config",[n,e])}save_config(n,e,r){return this.exec("save_config",[n,e,r])}delete_config(n,e){return this.exec("delete_config",[n,e])}enable_limits(n,e,r){return this.exec("enable_limits",[n,e,r])}disable_limits(n,e,r){return this.exec("disable_limits",[n,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,e){return this.exec("get_setting",[n],e)}get_settings(n,e){return this.exec("get_settings",n,e)}set_setting(n,e){return this.exec("set_setting",[n,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,e){return this.exec("set_setting",[n,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const e=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",e),m=new Uint8Array(r);return Array.from(m).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Yn("F",qC);const rg=6048e5,GC=864e5,Gl=6e4,zu=36e5,KC=1e3,ig=Symbol.for("constructDateFrom");Yn({L:Gl,U:zu,q:KC});function Co(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&ig in t?t[ig](n):t instanceof Date?new t.constructor(n):new Date(n)}function Zr(t,n){return Co(n||t,t)}let YC={};function ia(){return YC}function oa(t,n){const e=ia(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,m=Zr(t,n?.in),d=m.getDay(),p=(d<r?7:0)+d-r;return m.setDate(m.getDate()-p),m.setHours(0,0,0,0),m}function Ga(t,n){return oa(t,{...n,weekStartsOn:1})}function og(t,n){const e=Zr(t,n?.in),r=e.getFullYear(),m=Co(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const d=Ga(m),p=Co(e,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const w=Ga(p);return e.getTime()>=d.getTime()?r+1:e.getTime()>=w.getTime()?r:r-1}function Fu(t){const n=Zr(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function JC(t,...n){const e=Co.bind(null,n.find(r=>typeof r=="object"));return n.map(e)}function sg(t,n){const e=Zr(t,n?.in);return e.setHours(0,0,0,0),e}function ZC(t,n,e){const[r,m]=JC(e?.in,t,n),d=sg(r),p=sg(m),w=+d-Fu(d),u=+p-Fu(p);return Math.round((w-u)/GC)}function XC(t,n){const e=og(t,n),r=Co(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Ga(r)}function QC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function ag(t){return!(!QC(t)&&typeof t!="number"||isNaN(+Zr(t)))}function e_(t,n){const e=Zr(t,n?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const t_={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"}},n_=(t,n,e)=>{let r;const m=t_[t];return typeof m=="string"?r=m:n===1?r=m.one:r=m.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Bu(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const r_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},i_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},o_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s_={date:Bu({formats:r_,defaultWidth:"full"}),time:Bu({formats:i_,defaultWidth:"full"}),dateTime:Bu({formats:o_,defaultWidth:"full"})},a_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},l_=(t,n,e,r)=>a_[t];function Ka(t){return(n,e)=>{const r=e?.context?String(e.context):"standalone";let m;if(r==="formatting"&&t.formattingValues){const p=t.defaultFormattingWidth||t.defaultWidth,w=e?.width?String(e.width):p;m=t.formattingValues[w]||t.formattingValues[p]}else{const p=t.defaultWidth,w=e?.width?String(e.width):t.defaultWidth;m=t.values[w]||t.values[p]}const d=t.argumentCallback?t.argumentCallback(n):n;return m[d]}}const c_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},u_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},h_={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"]},d_={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"]},f_={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"}},p_={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"}},g_=(t,n)=>{const e=Number(t),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},m_={ordinalNumber:g_,era:Ka({values:c_,defaultWidth:"wide"}),quarter:Ka({values:u_,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ka({values:h_,defaultWidth:"wide"}),day:Ka({values:d_,defaultWidth:"wide"}),dayPeriod:Ka({values:f_,defaultWidth:"wide",formattingValues:p_,defaultFormattingWidth:"wide"})};function Ya(t){return(n,e={})=>{const r=e.width,m=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=n.match(m);if(!d)return null;const p=d[0],w=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(w)?y_(w,s=>s.test(p)):v_(w,s=>s.test(p));let f;f=t.valueCallback?t.valueCallback(u):u,f=e.valueCallback?e.valueCallback(f):f;const a=n.slice(p.length);return{value:f,rest:a}}}function v_(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function y_(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function b_(t){return(n,e={})=>{const r=n.match(t.matchPattern);if(!r)return null;const m=r[0],d=n.match(t.parsePattern);if(!d)return null;let p=t.valueCallback?t.valueCallback(d[0]):d[0];p=e.valueCallback?e.valueCallback(p):p;const w=n.slice(m.length);return{value:p,rest:w}}}const w_=/^(\d+)(th|st|nd|rd)?/i,x_=/\d+/i,C_={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},__={any:[/^b/i,/^(a|c)/i]},A_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},k_={any:[/1/i,/2/i,/3/i,/4/i]},S_={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},$_={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]},T_={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},R_={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]},E_={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},M_={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}},I_={ordinalNumber:b_({matchPattern:w_,parsePattern:x_,valueCallback:t=>parseInt(t,10)}),era:Ya({matchPatterns:C_,defaultMatchWidth:"wide",parsePatterns:__,defaultParseWidth:"any"}),quarter:Ya({matchPatterns:A_,defaultMatchWidth:"wide",parsePatterns:k_,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Ya({matchPatterns:S_,defaultMatchWidth:"wide",parsePatterns:$_,defaultParseWidth:"any"}),day:Ya({matchPatterns:T_,defaultMatchWidth:"wide",parsePatterns:R_,defaultParseWidth:"any"}),dayPeriod:Ya({matchPatterns:E_,defaultMatchWidth:"any",parsePatterns:M_,defaultParseWidth:"any"})},L_=Yn("G",{code:"en-US",formatDistance:n_,formatLong:s_,formatRelative:l_,localize:m_,match:I_,options:{weekStartsOn:0,firstWeekContainsDate:1}});function O_(t,n){const e=Zr(t,n?.in);return ZC(e,e_(e))+1}function lg(t,n){const e=Zr(t,n?.in),r=+Ga(e)-+XC(e);return Math.round(r/rg)+1}function Wu(t,n){const e=Zr(t,n?.in),r=e.getFullYear(),m=ia(),d=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??m.firstWeekContainsDate??m.locale?.options?.firstWeekContainsDate??1,p=Co(n?.in||t,0);p.setFullYear(r+1,0,d),p.setHours(0,0,0,0);const w=oa(p,n),u=Co(n?.in||t,0);u.setFullYear(r,0,d),u.setHours(0,0,0,0);const f=oa(u,n);return+e>=+w?r+1:+e>=+f?r:r-1}function N_(t,n){const e=ia(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,m=Wu(t,n),d=Co(n?.in||t,0);return d.setFullYear(m,0,r),d.setHours(0,0,0,0),oa(d,n)}function cg(t,n){const e=Zr(t,n?.in),r=+oa(e,n)-+N_(e,n);return Math.round(r/rg)+1}function un(t,n){const e=t<0?"-":"",r=Math.abs(t).toString().padStart(n,"0");return e+r}const ts={y(t,n){const e=t.getFullYear(),r=e>0?e:1-e;return un(n==="yy"?r%100:r,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):un(e+1,2)},d(t,n){return un(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(t,n){return un(t.getHours()%12||12,n.length)},H(t,n){return un(t.getHours(),n.length)},m(t,n){return un(t.getMinutes(),n.length)},s(t,n){return un(t.getSeconds(),n.length)},S(t,n){const e=n.length,r=t.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return un(m,n.length)}},sa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ug={G:function(t,n,e){const r=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){const r=t.getFullYear(),m=r>0?r:1-r;return e.ordinalNumber(m,{unit:"year"})}return ts.y(t,n)},Y:function(t,n,e,r){const m=Wu(t,r),d=m>0?m:1-m;if(n==="YY"){const p=d%100;return un(p,2)}return n==="Yo"?e.ordinalNumber(d,{unit:"year"}):un(d,n.length)},R:function(t,n){const e=og(t);return un(e,n.length)},u:function(t,n){const e=t.getFullYear();return un(e,n.length)},Q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return un(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return un(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){const r=t.getMonth();switch(n){case"M":case"MM":return ts.M(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){const r=t.getMonth();switch(n){case"L":return String(r+1);case"LL":return un(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,e,r){const m=cg(t,r);return n==="wo"?e.ordinalNumber(m,{unit:"week"}):un(m,n.length)},I:function(t,n,e){const r=lg(t);return n==="Io"?e.ordinalNumber(r,{unit:"week"}):un(r,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):ts.d(t,n)},D:function(t,n,e){const r=O_(t);return n==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):un(r,n.length)},E:function(t,n,e){const r=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){const m=t.getDay(),d=(m-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(d);case"ee":return un(d,2);case"eo":return e.ordinalNumber(d,{unit:"day"});case"eee":return e.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(m,{width:"short",context:"formatting"});default:return e.day(m,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){const m=t.getDay(),d=(m-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(d);case"cc":return un(d,n.length);case"co":return e.ordinalNumber(d,{unit:"day"});case"ccc":return e.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(m,{width:"narrow",context:"standalone"});case"cccccc":return e.day(m,{width:"short",context:"standalone"});default:return e.day(m,{width:"wide",context:"standalone"})}},i:function(t,n,e){const r=t.getDay(),m=r===0?7:r;switch(n){case"i":return String(m);case"ii":return un(m,n.length);case"io":return e.ordinalNumber(m,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,e){const r=t.getHours();let m;switch(r===12?m=sa.noon:r===0?m=sa.midnight:m=r/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(t,n,e){const r=t.getHours();let m;switch(r>=17?m=sa.evening:r>=12?m=sa.afternoon:r>=4?m=sa.morning:m=sa.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let r=t.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return ts.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):ts.H(t,n)},K:function(t,n,e){const r=t.getHours()%12;return n==="Ko"?e.ordinalNumber(r,{unit:"hour"}):un(r,n.length)},k:function(t,n,e){let r=t.getHours();return r===0&&(r=24),n==="ko"?e.ordinalNumber(r,{unit:"hour"}):un(r,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):ts.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):ts.s(t,n)},S:function(t,n){return ts.S(t,n)},X:function(t,n,e){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return dg(r);case"XXXX":case"XX":return Ss(r);default:return Ss(r,":")}},x:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"x":return dg(r);case"xxxx":case"xx":return Ss(r);default:return Ss(r,":")}},O:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+hg(r,":");default:return"GMT"+Ss(r,":")}},z:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+hg(r,":");default:return"GMT"+Ss(r,":")}},t:function(t,n,e){const r=Math.trunc(+t/1e3);return un(r,n.length)},T:function(t,n,e){return un(+t,n.length)}};function hg(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.trunc(r/60),d=r%60;return d===0?e+String(m):e+String(m)+n+un(d,2)}function dg(t,n){return t%60===0?(t>0?"-":"+")+un(Math.abs(t)/60,2):Ss(t,n)}function Ss(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=un(Math.trunc(r/60),2),d=un(r%60,2);return e+m+n+d}const fg=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},pg=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},D_=(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return fg(t,n);let d;switch(r){case"P":d=n.dateTime({width:"short"});break;case"PP":d=n.dateTime({width:"medium"});break;case"PPP":d=n.dateTime({width:"long"});break;default:d=n.dateTime({width:"full"});break}return d.replace("{{date}}",fg(r,n)).replace("{{time}}",pg(m,n))},P_=Yn("l",{p:pg,P:D_}),z_=/^D+$/,F_=/^Y+$/,B_=["D","DD","YY","YYYY"];function gg(t){return z_.test(t)}function mg(t){return F_.test(t)}function vg(t,n,e){const r=W_(t,n,e);if(console.warn(r),B_.includes(t))throw new RangeError(r)}function W_(t,n,e){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const j_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U_=/^'([^]*?)'?$/,V_=/''/g,q_=/[a-zA-Z]/;function ns(t,n,e){const r=ia(),m=e?.locale??r.locale??L_,d=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,p=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,w=Zr(t,e?.in);if(!ag(w))throw new RangeError("Invalid time value");let u=n.match(H_).map(a=>{const s=a[0];if(s==="p"||s==="P"){const c=P_[s];return c(a,m.formatLong)}return a}).join("").match(j_).map(a=>{if(a==="''")return{isToken:!1,value:"'"};const s=a[0];if(s==="'")return{isToken:!1,value:G_(a)};if(ug[s])return{isToken:!0,value:a};if(s.match(q_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return{isToken:!1,value:a}});m.localize.preprocessor&&(u=m.localize.preprocessor(w,u));const f={firstWeekContainsDate:d,weekStartsOn:p,locale:m};return u.map(a=>{if(!a.isToken)return a.value;const s=a.value;(!e?.useAdditionalWeekYearTokens&&mg(s)||!e?.useAdditionalDayOfYearTokens&&gg(s))&&vg(s,n,String(t));const c=ug[s[0]];return c(w,s,m.localize,f)}).join("")}function G_(t){const n=t.match(U_);return n?n[1].replace(V_,"'"):t}var rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yg={exports:{}},bg;function K_(){return bg||(bg=1,(function(t,n){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var m=function(a,s,c){if(typeof a!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=s),m.modules[a]||(m.payloads[a]=c,m.modules[a]=null)};m.modules={},m.payloads={};var d=function(a,s,c){if(typeof s=="string"){var h=u(a,s);if(h!=null)return c&&c(),h}else if(Object.prototype.toString.call(s)==="[object Array]"){for(var o=[],l=0,g=s.length;l<g;++l){var b=u(a,s[l]);if(b==null&&p.original)return;o.push(b)}return c&&c.apply(null,o)||!0}},p=function(a,s){var c=d("",a,s);return c==null&&p.original?p.original.apply(this,arguments):c},w=function(a,s){if(s.indexOf("!")!==-1){var c=s.split("!");return w(a,c[0])+"!"+w(a,c[1])}if(s.charAt(0)=="."){var h=a.split("/").slice(0,-1).join("/");for(s=h+"/"+s;s.indexOf(".")!==-1&&o!=s;){var o=s;s=s.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return s},u=function(a,s){s=w(a,s);var c=m.modules[s];if(!c){if(c=m.payloads[s],typeof c=="function"){var h={},o={id:s,uri:"",exports:h,packaged:!0},l=function(b,x){return d(s,b,x)},g=c(l,h,o);h=g||o.exports,m.modules[s]=h,delete m.payloads[s]}c=m.modules[s]=h||c}return c};function f(a){var s=r;r[a]||(r[a]={}),s=r[a],(!s.define||!s.define.packaged)&&(m.original=s.define,s.define=m,s.define.packaged=!0),(!s.require||!s.require.packaged)&&(p.original=s.require,s.require=p,s.require.packaged=!0)}f(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,m){function d(p,w,u){Object.defineProperty(p,w,{value:u,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,w){return w=w||0,this.lastIndexOf(p,w)===w}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,w){var u=this;(w===void 0||w>u.length)&&(w=u.length),w-=p.length;var f=u.indexOf(p,w);return f!==-1&&f===w}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var w="",u=this;p>0;)p&1&&(w+=u),(p>>=1)&&(u+=u);return w}),String.prototype.includes||d(String.prototype,"includes",function(p,w){return this.indexOf(p,w)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(p),u=1;u<arguments.length;u++){var f=arguments[u];f!=null&&Object.keys(f).forEach(function(a){w[a]=f[a]})}return w}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(w){return p[w]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var w=this.length,u=arguments[1],f=0;f<w;f++){var a=this[f];if(p.call(u,a,f,this))return a}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var w=this.length,u=arguments[1],f=0;f<w;f++){var a=this[f];if(p.call(u,a,f,this))return f}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,w){return this.indexOf(p,w)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var w=this,u=w.length>>>0,f=arguments[1],a=f>>0,s=a<0?Math.max(u+a,0):Math.min(a,u),c=arguments[2],h=c===void 0?u:c>>0,o=h<0?Math.max(u+h,0):Math.min(h,u);s<o;)w[s]=p,s++;return w}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,m){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,m){r.deepCopy=function d(p){if(typeof p!="object"||!p)return p;var w;if(Array.isArray(p)){w=[];for(var u=0;u<p.length;u++)w[u]=d(p[u]);return w}if(Object.prototype.toString.call(p)!=="[object Object]")return p;w={};for(var u in p)w[u]=d(p[u]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,u){for(var f="";u>0;)u&1&&(f+=w),(u>>=1)&&(w+=w);return f};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(d,"")},r.stringTrimRight=function(w){return w.replace(p,"")},r.copyObject=function(w){var u={};for(var f in w)u[f]=w[f];return u},r.copyArray=function(w){for(var u=[],f=0,a=w.length;f<a;f++)w[f]&&typeof w[f]=="object"?u[f]=this.copyObject(w[f]):u[f]=w[f];return u},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var u={},f=0;f<w.length;f++)u[w[f]]=1;return u},r.createMap=function(w){var u=Object.create(null);for(var f in w)u[f]=w[f];return u},r.arrayRemove=function(w,u){for(var f=0;f<=w.length;f++)u===w[f]&&w.splice(f,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(w,u){var f=[];return w.replace(u,function(a){f.push({offset:arguments[arguments.length-2],length:a.length})}),f},r.deferredCall=function(w){var u=null,f=function(){u=null,w()},a=function(s){return a.cancel(),u=setTimeout(f,s||0),a};return a.schedule=a,a.call=function(){return this.cancel(),w(),a},a.cancel=function(){return clearTimeout(u),u=null,a},a.isPending=function(){return u},a},r.delayedCall=function(w,u){var f=null,a=function(){f=null,w()},s=function(c){f==null&&(f=setTimeout(a,c||u))};return s.delay=function(c){f&&clearTimeout(f),f=setTimeout(a,c||u)},s.schedule=s,s.call=function(){this.cancel(),w()},s.cancel=function(){f&&clearTimeout(f),f=null},s.isPending=function(){return f},s},r.sleep=function(w){return new Promise(function(u){setTimeout(u,w)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(w,u,f){return f&&w.codePointAt(u)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,m){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),w=d.userAgent||"",u=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=u=="Microsoft Internet Explorer"||u.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=w.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(w.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,r.isAIR=w.indexOf("AdobeAIR")>=0,r.isAndroid=w.indexOf("Android")>=0,r.isChromeOS=w.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(w)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,m){var d=e("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function c(h,o,l){if(typeof h=="string"&&h){var g=document.createTextNode(h);return o&&o.appendChild(g),g}if(!Array.isArray(h))return h&&h.appendChild&&o&&o.appendChild(h),h;if(typeof h[0]!="string"||!h[0]){for(var b=[],x=0;x<h.length;x++){var E=c(h[x],o,l);E&&b.push(E)}return b}var $=document.createElement(h[0]),_=h[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<h.length;x++)c(h[x],$,l);return C==2&&Object.keys(_).forEach(function(L){var D=_[L];L==="class"?$.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||L=="value"||L[0]=="$"?$[L]=D:L==="ref"?l&&(l[D]=$):L==="style"?typeof D=="string"&&($.style.cssText=D):D!=null&&$.setAttribute(L,D)}),o&&o.appendChild($),$},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,h){return document.createElementNS?document.createElementNS(h||p,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,h){var o=h?h.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var h=c?c.ownerDocument:document;return h.createDocumentFragment()},r.hasCssClass=function(c,h){var o=(c.className+"").split(/\s+/g);return o.indexOf(h)!==-1},r.addCssClass=function(c,h){r.hasCssClass(c,h)||(c.className+=" "+h)},r.removeCssClass=function(c,h){for(var o=c.className.split(/\s+/g);;){var l=o.indexOf(h);if(l==-1)break;o.splice(l,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,h){for(var o=c.className.split(/\s+/g),l=!0;;){var g=o.indexOf(h);if(g==-1)break;l=!1,o.splice(g,1)}return l&&o.push(h),c.className=o.join(" "),l},r.setCssClass=function(c,h,o){o?r.addCssClass(c,h):r.removeCssClass(c,h)},r.hasCssString=function(c,h){var o=0,l;if(h=h||document,l=h.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===c)return!0}},r.removeElementById=function(c,h){h=h||document,h.getElementById(c)&&h.getElementById(c).remove()};var w,u=[];r.useStrictCSP=function(c){w=c,c==!1?f():u||(u=[])};function f(){var c=u;u=null,c&&c.forEach(function(h){a(h[0],h[1])})}function a(c,h,o){if(!(typeof document>"u")){if(u){if(o)f();else if(o===!1)return u.push([c,h])}if(!w){var l=o;!o||!o.getRootNode?l=document:(l=o.getRootNode(),(!l||l==o)&&(l=document));var g=l.ownerDocument||l;if(h&&r.hasCssString(h,l))return null;h&&(c+=`
|
|
11
|
+
/*# sourceURL=ace/css/`+h+" */");var b=r.createElement("style");b.appendChild(g.createTextNode(c)),h&&(b.id=h),l==g&&(l=r.getDocumentHead(g)),l.insertBefore(b,l.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(c,h){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(h))},r.$fixPositionBug=function(c){var h=c.getBoundingClientRect();if(c.style.left){var o=parseFloat(c.style.left),l=+h.left;Math.abs(o-l)>1&&(c.style.left=2*o-l+"px")}if(c.style.right){var o=parseFloat(c.style.right),l=window.innerWidth-h.right;Math.abs(o-l)>1&&(c.style.right=2*o-l+"px")}if(c.style.top){var o=parseFloat(c.style.top),l=+h.top;Math.abs(o-l)>1&&(c.style.top=2*o-l+"px")}if(c.style.bottom){var o=parseFloat(c.style.bottom),l=window.innerHeight-h.bottom;Math.abs(o-l)>1&&(c.style.bottom=2*o-l+"px")}},r.scrollbarWidth=function(c){var h=r.createElement("ace_inner");h.style.width="100%",h.style.minWidth="0px",h.style.height="200px",h.style.display="block";var o=r.createElement("ace_outer"),l=o.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",o.appendChild(h);var g=c&&c.documentElement||document&&document.documentElement;if(!g)return 0;g.appendChild(o);var b=h.offsetWidth;l.overflow="scroll";var x=h.offsetWidth;return b===x&&(x=o.clientWidth),g.removeChild(o),b-x},r.computedStyle=function(c,h){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,h,o){c[h]!==o&&(c[h]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var s=document.createElement("div");r.HI_DPI&&s.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof s.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),s=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,h,o){c.style.transform="translate("+Math.round(h)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,h,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(h)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("./dom");r.get=function(p,w){var u=new XMLHttpRequest;u.open("GET",p,!0),u.onreadystatechange=function(){u.readyState===4&&w(u.responseText)},u.send(null)},r.loadScript=function(p,w){var u=d.getDocumentHead(),f=document.createElement("script");f.src=p,u.appendChild(f),f.onload=f.onreadystatechange=function(a,s){(s||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,s||w())}},r.qualifyURL=function(p){var w=document.createElement("a");return w.href=p,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,m){r.inherits=function(d,p){d.super_=p,d.prototype=Object.create(p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,p){for(var w in p)d[w]=p[w];return d},r.implement=function(d,p){r.mixin(d,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,m){var d={},p=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(u,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[u]||[],s=this._defaultHandlers[u];if(!(!a.length&&!s)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=u),f.stopPropagation||(f.stopPropagation=p),f.preventDefault||(f.preventDefault=w),a=a.slice();for(var c=0;c<a.length&&(a[c](f,this),!f.propagationStopped);c++);if(s&&!f.defaultPrevented)return s(f,this)}},d._signal=function(u,f){var a=(this._eventRegistry||{})[u];if(a){a=a.slice();for(var s=0;s<a.length;s++)a[s](f,this)}},d.once=function(u,f){var a=this;if(this.on(u,function s(){a.off(u,s),f.apply(null,arguments)}),!f)return new Promise(function(s){f=s})},d.setDefaultHandler=function(u,f){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[u]){var s=a[u],c=a._disabled_[u];c||(a._disabled_[u]=c=[]),c.push(s);var h=c.indexOf(f);h!=-1&&c.splice(h,1)}a[u]=f},d.removeDefaultHandler=function(u,f){var a=this._defaultHandlers;if(a){var s=a._disabled_[u];if(a[u]==f)s&&this.setDefaultHandler(u,s.pop());else if(s){var c=s.indexOf(f);c!=-1&&s.splice(c,1)}}},d.on=d.addEventListener=function(u,f,a){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[u];return s||(s=this._eventRegistry[u]=[]),s.indexOf(f)==-1&&s[a?"unshift":"push"](f),f},d.off=d.removeListener=d.removeEventListener=function(u,f){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[u];if(a){var s=a.indexOf(f);s!==-1&&a.splice(s,1)}},d.removeAllListeners=function(u){u||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[u]=void 0),this._defaultHandlers&&(this._defaultHandlers[u]=void 0)},r.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,m){r.reportError=function(d,p){var w=new Error(d);w.data=p,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,m){var d={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=d}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,r,m){"no use strict";var d=e("./oop"),p=e("./event_emitter").EventEmitter,w=e("./report_error").reportError,u=e("./default_english_messages").defaultEnglishMessages,f={setOptions:function(o){Object.keys(o).forEach(function(l){this.setOption(l,o[l])},this)},getOptions:function(o){var l={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var g=this.$options;o=Object.keys(g).filter(function(b){return!g[b].hidden})}return o.forEach(function(b){l[b]=this.getOption(b)},this),l},setOption:function(o,l){if(this["$"+o]!==l){var g=this.$options[o];if(!g)return a('misspelled option "'+o+'"');if(g.forwardTo)return this[g.forwardTo]&&this[g.forwardTo].setOption(o,l);g.handlesSet||(this["$"+o]=l),g&&g.set&&g.set.call(this,l)}},getOption:function(o){var l=this.$options[o];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(o):l&&l.get?l.get.call(this):this["$"+o]:a('misspelled option "'+o+'"')}};function a(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var s,c,h=(function(){function o(){this.$defaultOptions={},s=u,c="dollarSigns"}return o.prototype.defineOptions=function(l,g,b){return l.$options||(this.$defaultOptions[g]=l.$options={}),Object.keys(b).forEach(function(x){var E=b[x];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=x),l.$options[E.name]=E,"initialValue"in E&&(l["$"+E.name]=E.initialValue)}),d.implement(l,f),this},o.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(g){var b=l.$options[g];"value"in b&&l.setOption(g,b.value)})},o.prototype.setDefaultValue=function(l,g,b){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][g])break;if(!this.$defaultOptions[l][g])return!1}var x=this.$defaultOptions[l]||(this.$defaultOptions[l]={});x[g]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,g,b):x[g].value=b)},o.prototype.setDefaultValues=function(l,g){Object.keys(g).forEach(function(b){this.setDefaultValue(l,b,g[b])},this)},o.prototype.setMessages=function(l,g){s=l,g&&g.placeholders&&(c=g.placeholders)},o.prototype.nls=function(l,g,b){s[l]||(a("No message found for the key '"+l+"' in messages with id "+s.$id+", trying to find a translation for the default string '"+g+"'."),s[g]||a("No message found for the default string '"+g+"' in the provided messages. Falling back to the default English message."));var x=s[l]||s[g]||g;return b&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(E,$){return $=="$"?"$":b[$]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(E,$){return b[$]}))),x},o})();h.prototype.warn=a,h.prototype.reportError=w,d.implement(h.prototype,p),r.AppConfig=h}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-tm .ace_gutter {
|
|
12
|
+
background: #f0f0f0;
|
|
13
|
+
color: #333;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ace-tm .ace_print-margin {
|
|
17
|
+
width: 1px;
|
|
18
|
+
background: #e8e8e8;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ace-tm .ace_fold {
|
|
22
|
+
background-color: #6B72E6;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ace-tm {
|
|
26
|
+
background-color: #FFFFFF;
|
|
27
|
+
color: black;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ace-tm .ace_cursor {
|
|
31
|
+
color: black;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ace-tm .ace_invisible {
|
|
35
|
+
color: rgb(191, 191, 191);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ace-tm .ace_storage,
|
|
39
|
+
.ace-tm .ace_keyword {
|
|
40
|
+
color: blue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ace-tm .ace_constant {
|
|
44
|
+
color: rgb(197, 6, 11);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ace-tm .ace_constant.ace_buildin {
|
|
48
|
+
color: rgb(88, 72, 246);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ace-tm .ace_constant.ace_language {
|
|
52
|
+
color: rgb(88, 92, 246);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ace-tm .ace_constant.ace_library {
|
|
56
|
+
color: rgb(6, 150, 14);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ace-tm .ace_invalid {
|
|
60
|
+
background-color: rgba(255, 0, 0, 0.1);
|
|
61
|
+
color: red;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ace-tm .ace_support.ace_function {
|
|
65
|
+
color: rgb(60, 76, 114);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ace-tm .ace_support.ace_constant {
|
|
69
|
+
color: rgb(6, 150, 14);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ace-tm .ace_support.ace_type,
|
|
73
|
+
.ace-tm .ace_support.ace_class {
|
|
74
|
+
color: rgb(109, 121, 222);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ace-tm .ace_keyword.ace_operator {
|
|
78
|
+
color: rgb(104, 118, 135);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ace-tm .ace_string {
|
|
82
|
+
color: rgb(3, 106, 7);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ace-tm .ace_comment {
|
|
86
|
+
color: rgb(76, 136, 107);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ace-tm .ace_comment.ace_doc {
|
|
90
|
+
color: rgb(0, 102, 255);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
94
|
+
color: rgb(128, 159, 191);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ace-tm .ace_constant.ace_numeric {
|
|
98
|
+
color: rgb(0, 0, 205);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ace-tm .ace_variable {
|
|
102
|
+
color: rgb(49, 132, 149);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ace-tm .ace_xml-pe {
|
|
106
|
+
color: rgb(104, 104, 91);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
|
110
|
+
color: #0000A2;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
.ace-tm .ace_heading {
|
|
115
|
+
color: rgb(12, 7, 255);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ace-tm .ace_list {
|
|
119
|
+
color:rgb(185, 6, 144);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ace-tm .ace_meta.ace_tag {
|
|
123
|
+
color:rgb(0, 22, 142);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.ace-tm .ace_string.ace_regex {
|
|
127
|
+
color: rgb(255, 0, 0)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
|
131
|
+
background: rgb(181, 213, 255);
|
|
132
|
+
}
|
|
133
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
134
|
+
box-shadow: 0 0 3px 0px white;
|
|
135
|
+
}
|
|
136
|
+
.ace-tm .ace_marker-layer .ace_step {
|
|
137
|
+
background: rgb(252, 255, 0);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
|
141
|
+
background: rgb(164, 229, 101);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
|
145
|
+
margin: -1px 0 0 -1px;
|
|
146
|
+
border: 1px solid rgb(192, 192, 192);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
|
150
|
+
background: rgba(0, 0, 0, 0.07);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ace-tm .ace_gutter-active-line {
|
|
154
|
+
background-color : #dcdcdc;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
158
|
+
background: rgb(250, 250, 255);
|
|
159
|
+
border: 1px solid rgb(200, 200, 250);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.ace-tm .ace_indent-guide {
|
|
163
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ace-tm .ace_indent-guide-active {
|
|
167
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
168
|
+
}
|
|
169
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,m){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var d=e("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,r,m){"no use strict";var d=e("./lib/lang"),p=e("./lib/net"),w=e("./lib/dom"),u=e("./lib/app_config").AppConfig;m.exports=r=new u;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(h){if(!f.hasOwnProperty(h))throw new Error("Unknown config key: "+h);return f[h]},r.set=function(h,o){if(f.hasOwnProperty(h))f[h]=o;else if(this.setDefaultValue("",h,o)==!1)throw new Error("Unknown config key: "+h);h=="useStrictCSP"&&w.useStrictCSP(o)},r.all=function(){return d.copyObject(f)},r.$modes={},r.moduleUrl=function(h,o){if(f.$moduleUrls[h])return f.$moduleUrls[h];var l=h.split("/");o=o||l[l.length-2]||"";var g=o=="snippets"?"/":"-",b=l[l.length-1];if(o=="worker"&&g=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");b=b.replace(x,"")}(!b||b==o)&&l.length>1&&(b=l[l.length-2]);var E=f[o+"Path"];return E==null?E=f.basePath:g=="/"&&(o=g=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+g+b+this.get("suffix")},r.setModuleUrl=function(h,o){return f.$moduleUrls[h]=o};var a=function(h,o){if(h==="ace/theme/textmate"||h==="./theme/textmate")return o(null,e("./theme/textmate"));if(s)return s(h,o);console.error("loader is not configured")},s;r.setLoader=function(h){s=h},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(h,o){var l;if(Array.isArray(h))var g=h[0],b=h[1];else if(typeof h=="string")var b=h;var x=function(E){if(E&&!r.$loading[b])return o&&o(E);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(o),!(r.$loading[b].length>1)){var $=function(){a(b,function(_,C){C&&(r.$loaded[b]=C),r._emit("load.module",{name:b,module:C});var L=r.$loading[b];r.$loading[b]=null,L.forEach(function(D){D&&D(C)})})};if(!r.get("packaged"))return $();p.loadScript(r.moduleUrl(b,g),$),c()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(E){E.default?x(E.default):x(E)});else{try{l=this.$require(b)}catch{}x(l||r.$loaded[b])}},r.$require=function(h){if(typeof m.require=="function"){var o="require";return m[o](h)}},r.setModuleLoader=function(h,o){r.dynamicModules[h]=o};var c=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};r.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,m){e("./lib/fixoldbrowsers");var d=e("./config");d.setLoader(function(f,a){e([f],function(s){a(null,s)})});var p=(function(){return this||typeof window<"u"&&window})();m.exports=function(f){d.init=w,d.$require=e,f.require=e},w(!0);function w(f){if(!(!p||!p.document)){d.set("packaged",f||e.packaged||m.packaged||p.define&&(void 0).packaged);var a={},s="",c=document.currentScript||document._currentScript,h=c&&c.ownerDocument||document;c&&c.src&&(s=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=h.getElementsByTagName("script"),l=0;l<o.length;l++){var g=o[l],b=g.src||g.getAttribute("src");if(b){for(var x=g.attributes,E=0,$=x.length;E<$;E++){var _=x[E];_.name.indexOf("data-ace-")===0&&(a[u(_.name.replace(/^data-ace-/,""))]=_.value)}var C=b.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(s=C[1])}}s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var L in a)typeof a[L]<"u"&&d.set(L,a[L])}}function u(f){return f.replace(/-(.)/g,function(a,s){return s.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,m){var d=(function(){function p(w,u,f,a){this.start={row:w,column:u},this.end={row:f,column:a}}return p.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(w,u){return this.compare(w,u)==0},p.prototype.compareRange=function(w){var u,f=w.end,a=w.start;return u=this.compare(f.row,f.column),u==1?(u=this.compare(a.row,a.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(a.row,a.column),u==-1?-1:u==1?42:0)},p.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},p.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},p.prototype.intersects=function(w){var u=this.compareRange(w);return u==-1||u==0||u==1},p.prototype.isEnd=function(w,u){return this.end.row==w&&this.end.column==u},p.prototype.isStart=function(w,u){return this.start.row==w&&this.start.column==u},p.prototype.setStart=function(w,u){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=u)},p.prototype.setEnd=function(w,u){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=u)},p.prototype.inside=function(w,u){return this.compare(w,u)==0?!(this.isEnd(w,u)||this.isStart(w,u)):!1},p.prototype.insideStart=function(w,u){return this.compare(w,u)==0?!this.isEnd(w,u):!1},p.prototype.insideEnd=function(w,u){return this.compare(w,u)==0?!this.isStart(w,u):!1},p.prototype.compare=function(w,u){return!this.isMultiLine()&&w===this.start.row?u<this.start.column?-1:u>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?u>=this.start.column?0:-1:this.end.row===w?u<=this.end.column?0:1:0},p.prototype.compareStart=function(w,u){return this.start.row==w&&this.start.column==u?-1:this.compare(w,u)},p.prototype.compareEnd=function(w,u){return this.end.row==w&&this.end.column==u?1:this.compare(w,u)},p.prototype.compareInside=function(w,u){return this.end.row==w&&this.end.column==u?1:this.start.row==w&&this.start.column==u?-1:this.compare(w,u)},p.prototype.clipRows=function(w,u){if(this.end.row>u)var f={row:u+1,column:0};else if(this.end.row<w)var f={row:w,column:0};if(this.start.row>u)var a={row:u+1,column:0};else if(this.start.row<w)var a={row:w,column:0};return p.fromPoints(a||this.start,f||this.end)},p.prototype.extend=function(w,u){var f=this.compare(w,u);if(f==0)return this;if(f==-1)var a={row:w,column:u};else var s={row:w,column:u};return p.fromPoints(a||this.start,s||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(w){var u=w.documentToScreenPosition(this.start),f=w.documentToScreenPosition(this.end);return new p(u.row,u.column,f.row,f.column)},p.prototype.moveBy=function(w,u){this.start.row+=w,this.start.column+=u,this.end.row+=w,this.end.column+=u},p})();d.fromPoints=function(p,w){return new d(p.row,p.column,w.row,w.column)},d.comparePoints=function(p,w){return p.row-w.row||p.column-w.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,m){for(var d=e("./oop"),p={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},w={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},u=0;u<10;u++)w["Digit"+u]=48+u,w["Numpad"+u]=96+u,p.PRINTABLE_KEYS[48+u]=""+u,p.FUNCTION_KEYS[96+u]="Numpad"+u;for(var u=65;u<91;u++){var f=String.fromCharCode(u+32);w["Key"+f.toUpperCase()]=u,p.PRINTABLE_KEYS[u]=f}for(var u=1;u<13;u++)w["F"+u]=111+u,p.FUNCTION_KEYS[111+u]="F"+u;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var s in a)w[s]=w[s+"Left"]=w[s+"Right"]=a[s];r.$codeToKeyCode=w,p.PRINTABLE_KEYS[173]="-";for(var c in p.FUNCTION_KEYS){var h=p.FUNCTION_KEYS[c].toLowerCase();p[h]=parseInt(c,10)}for(var c in p.PRINTABLE_KEYS){var h=p.PRINTABLE_KEYS[c].toLowerCase();p[h]=parseInt(c,10)}d.mixin(p,p.MODIFIER_KEYS),d.mixin(p,p.PRINTABLE_KEYS),d.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)p.KEY_MODS[l]=o.filter(function(g){return l&p.KEY_MODS[g]}).join("-")+"-"})(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",d.mixin(r,p),r.default=r,r.keyCodeToString=function(o){var l=p[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var d=e("./keys"),p=e("./useragent"),w=null,u=0,f;function a(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function s(){return f==null&&a(),f}function c(E,$,_){this.elem=E,this.type=$,this.callback=_}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=r.addListener=function(E,$,_,C){E.addEventListener($,_,s()),C&&C.$toDestroy.push(new c(E,$,_))},o=r.removeListener=function(E,$,_){E.removeEventListener($,_,s())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||p.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,$,_){var C=E&&E.ownerDocument||document;function L(D){$&&$(D),_&&_(D),o(C,"mousemove",$),o(C,"mouseup",L),o(C,"dragstart",L)}return h(C,"mousemove",$),h(C,"mouseup",L),h(C,"dragstart",L),L},r.addMouseWheelListener=function(E,$,_){h(E,"wheel",function(C){var L=.15,D=C.deltaX||0,I=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=D*L,C.wheelY=I*L;break;case C.DOM_DELTA_LINE:var M=15;C.wheelX=D*M,C.wheelY=I*M;break;case C.DOM_DELTA_PAGE:var W=150;C.wheelX=D*W,C.wheelY=I*W;break}$(C)},_)},r.addMultiMouseDownListener=function(E,$,_,C,L){var D=0,I,M,W,z={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(T){if(r.getButton(T)!==0?D=0:T.detail>1?(D++,D>4&&(D=1)):D=1,p.isIE){var A=Math.abs(T.clientX-I)>5||Math.abs(T.clientY-M)>5;(!W||A)&&(D=1),W&&clearTimeout(W),W=setTimeout(function(){W=null},$[D-1]||600),D==1&&(I=T.clientX,M=T.clientY)}if(T._clicks=D,_[C]("mousedown",T),D>4)D=0;else if(D>1)return _[C](z[D],T)}Array.isArray(E)||(E=[E]),E.forEach(function(T){h(T,"mousedown",O,L)})};function l(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return d.KEY_MODS[l(E)]};function g(E,$,_){var C=l($);if(!_&&$.code&&(_=d.$codeToKeyCode[$.code]||_),!p.isMac&&w){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),w.altGr)if((3&C)!=3)w.altGr=0;else return;if(_===18||_===17){var L=$.location;if(_===17&&L===1)w[_]==1&&(u=$.timeStamp);else if(_===18&&C===3&&L===2){var D=$.timeStamp-u;D<50&&(w.altGr=!0)}}}if(_ in d.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&$.location===3&&(E($,C,-_),$.defaultPrevented))){if(p.isChromeOS&&C&8){if(E($,C,_),$.defaultPrevented)return;C&=-9}return!C&&!(_ in d.FUNCTION_KEYS)&&!(_ in d.PRINTABLE_KEYS)?!1:E($,C,_)}}r.addCommandKeyListener=function(E,$,_){var C=null;h(E,"keydown",function(L){w[L.keyCode]=(w[L.keyCode]||0)+1;var D=g($,L,L.keyCode);return C=L.defaultPrevented,D},_),h(E,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},_),h(E,"keyup",function(L){w[L.keyCode]=null},_),w||(b(),h(window,"focus",b))};function b(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var x=1;r.nextTick=function(E,$){$=$||window;var _="zero-timeout-message-"+x++,C=function(L){L.data==_&&(r.stopPropagation(L),o($,"message",C),E())};h($,"message",C),$.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,$){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):E()},$)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,m){var d;m.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,m){var d=e("../lib/event"),p=e("../config").nls,w=e("../lib/useragent"),u=e("../lib/dom"),f=e("../lib/lang"),a=e("../clipboard"),s=w.isChrome<18,c=w.isIE,h=w.isChrome>63,o=400,l=e("../lib/keys"),g=l.KEY_MODS,b=w.isIOS,x=b?/\s/:/\n/,E=w.isMobile,$=(function(){function _(C,L){var D=this;this.host=L,this.text=u.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),d.addListener(this.text,"blur",function(I){D.ignoreFocusEvents||(L.onBlur(I),D.$isFocused=!1)},L),d.addListener(this.text,"focus",function(I){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}L.onFocus(I),w.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},L),this.$focusScroll=!1,L.on("beforeEndOperation",function(){var I=L.curOp,M=I&&I.command&&I.command.name;if(M!="insertstring"){var W=M&&(I.docChanged||I.selectionChanged);D.inComposition&&W&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),L.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=b?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&L.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,d.addCommandKeyListener(this.text,function(I,M,W){if(!D.inComposition)return L.onCommandKey(I,M,W)},L),d.addListener(this.text,"select",this.onSelect.bind(this),L),d.addListener(this.text,"input",this.onInput.bind(this),L),d.addListener(this.text,"cut",this.onCut.bind(this),L),d.addListener(this.text,"copy",this.onCopy.bind(this),L),d.addListener(this.text,"paste",this.onPaste.bind(this),L),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&d.addListener(C,"keydown",function(I){if(!(w.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:D.onCopy(I);break;case 86:D.onPaste(I);break;case 88:D.onCut(I);break}},L),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),d.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),L),d.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),L),d.addListener(this.text,"keyup",this.onKeyup.bind(this),L),d.addListener(this.text,"keydown",this.syncComposition.bind(this),L),d.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),L),this.closeTimeout,d.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),L),d.addListener(this.text,"mousedown",function(I){I.preventDefault(),D.onContextMenuClose()},L),d.addListener(L.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),L),d.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),L),b&&this.addIosSelectionHandler(C,L,this.text)}return _.prototype.addIosSelectionHandler=function(C,L,D){var I=this,M=null,W=!1;D.addEventListener("keydown",function(O){M&&clearTimeout(M),W=!0},!0),D.addEventListener("keyup",function(O){M=setTimeout(function(){W=!1},100)},!0);var z=function(O){if(document.activeElement===D&&!(W||I.inComposition||L.$mouseHandler.isMousePressed)&&!I.copied){var T=D.selectionStart,A=D.selectionEnd,N=null,B=0;if(T==0?N=l.up:T==1?N=l.home:A>I.lastSelectionEnd&&I.lastValue[A]==`
|
|
170
|
+
`?N=l.end:T<I.lastSelectionStart&&I.lastValue[T-1]==" "?(N=l.left,B=g.option):T<I.lastSelectionStart||T==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&T==A?N=l.left:A>I.lastSelectionEnd&&I.lastValue.slice(0,A).split(`
|
|
171
|
+
`).length>2?N=l.down:A>I.lastSelectionEnd&&I.lastValue[A-1]==" "?(N=l.right,B=g.option):(A>I.lastSelectionEnd||A==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&T==A)&&(N=l.right),T!==A&&(B|=g.shift),N){var U=L.onCommandKey({},B,N);if(!U&&L.commands){N=l.keyCodeToString(N);var G=L.commands.findKeyCommand(B,N);G&&L.execCommand(G)}I.lastSelectionStart=T,I.lastSelectionEnd=A,I.resetSelection("")}}};document.addEventListener("selectionchange",z),L.on("destroy",function(){document.removeEventListener("selectionchange",z)})},_.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},_.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},_.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},_.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},_.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var L=this.host.getSelectionRange();L.end.row=L.start.row,L.end.column=L.start.column,this.inComposition.markerRange=L,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},_.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},_.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},_.prototype.onCut=function(C){this.doCopy(C,!0)},_.prototype.onCopy=function(C){this.doCopy(C,!1)},_.prototype.onPaste=function(C){var L=this.handleClipboardData(C);a.pasteCancelled()||(typeof L=="string"?(L&&this.host.onPaste(L,C),w.isIE&&setTimeout(this.resetSelection),d.preventDefault(C)):(this.text.value="",this.pasted=!0))},_.prototype.doCopy=function(C,L){var D=this,I=this.host.getCopyText();if(!I)return d.preventDefault(C);this.handleClipboardData(C,I)?(b&&(this.resetSelection(I),this.copied=I,setTimeout(function(){D.copied=!1},10)),L?this.host.onCut():this.host.onCopy(),d.preventDefault(C)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),L?D.host.onCut():D.host.onCopy()}))},_.prototype.handleClipboardData=function(C,L,D){var I=C.clipboardData||window.clipboardData;if(!(!I||s)){var M=c||D?"Text":"text/plain";try{return L?I.setData(M,L)!==!1:I.getData(M)}catch(W){if(!D)return this.handleClipboardData(W,L,!0)}}},_.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var L=this.text.value,D=this.sendText(L,!0);(L.length>o+100||x.test(D)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},_.prototype.sendText=function(C,L){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var D=this.text.selectionStart,I=this.text.selectionEnd,M=this.lastSelectionStart,W=this.lastValue.length-this.lastSelectionEnd,z=C,O=C.length-D,T=C.length-I,A=0;M>0&&this.lastValue[A]==C[A];)A++,M--;for(z=z.slice(A),A=1;W>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,W--;O-=A-1,T-=A-1;var N=z.length-A+1;if(N<0&&(M=-N,N=0),z=z.slice(0,N),!L&&!z&&!O&&!M&&!W&&!T)return"";this.sendingText=!0;var B=!1;return w.isAndroid&&z==". "&&(z=" ",B=!0),z&&!M&&!W&&!O&&!T||this.commandMode?this.host.onTextInput(z):this.host.onTextInput(z,{extendLeft:M,extendRight:W,restoreStart:O,restoreEnd:T}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=D,this.lastSelectionEnd=I,this.lastRestoreEnd=T,B?`
|
|
172
|
+
`:z},_.prototype.onSelect=function(C){var L=this;if(!this.inComposition){var D=function(I){return I.selectionStart===0&&I.selectionEnd>=L.lastValue.length&&I.value===L.lastValue&&L.lastValue&&I.selectionEnd!==L.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},_.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var L=`
|
|
173
|
+
ab`+C+`cde fg
|
|
174
|
+
`;L!=this.text.value&&(this.text.value=this.lastValue=L);var D=4,I=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(D,I),this.lastSelectionStart=D,this.lastSelectionEnd=I}},_.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var L=0,D=0,I="",M=function(G,J){for(var Q=J,le=1;le<=G-C.rowStart&&le<2*C.numberOfExtraLines+1;le++)Q+=C.host.session.getLine(G-le).length+1;return Q};if(this.host.session){var W=this.host.selection,z=W.getRange(),O=W.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var T=[],A=this.rowStart;A<=this.rowEnd;A++)T.push(this.host.session.getLine(A));if(I=T.join(`
|
|
175
|
+
`),L=M(z.start.row,z.start.column),D=M(z.end.row,z.end.column),z.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);L=z.start.row<this.rowStart-1?0:L,D+=N.length+1,I=N+`
|
|
176
|
+
`+I}else if(z.end.row>this.rowEnd){var B=this.host.session.getLine(this.rowEnd+1);D=z.end.row>this.rowEnd+1?B.length:z.end.column,D+=I.length+1,I=I+`
|
|
177
|
+
`+B}else E&&O>0&&(I=`
|
|
178
|
+
`+I,D+=1,L+=1);I.length>o&&(L<o&&D<o?I=I.slice(0,o):(I=`
|
|
179
|
+
`,L==D?L=D=0:(L=0,D=1)));var U=I+`
|
|
180
|
+
|
|
181
|
+
`;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=L||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(L,D),this.lastSelectionStart=L,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},_.prototype.setHost=function(C){this.host=C},_.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},_.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var L=this.host.session.selection.cursor.row;C+=p("text-input.aria-label","Cursor at row $0",[L+1])}this.text.setAttribute("aria-label",C)},_.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},_.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||h||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var L=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(D)for(var M=this.text.parentElement;M&&M.nodeType==1;)I.push(M),M.setAttribute("ace_nocontext","true"),!M.parentElement&&M.getRootNode?M=M.getRootNode().host:M=M.parentElement;this.text.focus({preventScroll:!0}),D&&I.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=L)},0)},_.prototype.blur=function(){this.text.blur()},_.prototype.isFocused=function(){return this.$isFocused},_.prototype.setInputHandler=function(C){this.inputHandler=C},_.prototype.getInputHandler=function(){return this.inputHandler},_.prototype.getElement=function(){return this.text},_.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},_.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},_.prototype.setCopyWithEmptySelection=function(C){},_.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},_.prototype.moveToMouse=function(C,L){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(L?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),M=u.computedStyle(this.host.container),W=I.top+(parseInt(M.borderTopWidth)||0),z=I.left+(parseInt(M.borderLeftWidth)||0),O=I.bottom-W-this.text.clientHeight-2,T=function(A){u.translate(D.text,A.clientX-z-2,Math.min(A.clientY-W-2,O))};T(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&d.capture(this.host.container,T,this.onContextMenuClose.bind(this)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_})();r.TextInput=$,r.$setUserAgentForTests=function(_,C){E=_,b=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,m){var d=e("../lib/useragent"),p=0,w=550,u=(function(){function s(c){c.$clickSelection=null;var h=c.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){c[l]=this[l]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return s.prototype.onMouseDown=function(c){var h=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var l=this.editor,g=c.getButton();if(g!==0){var b=l.getSelectionRange(),x=b.isEmpty();(x||g==1)&&l.selection.moveToPosition(o),g==2&&(l.textInput.onContextMenu(c.domEvent),d.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},s.prototype.startSelect=function(c,h){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):h||o.selection.moveToPosition(c),h||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},s.prototype.select=function(){var c,h=this.editor,o=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)c=this.$clickSelection.end;else if(l==1)c=this.$clickSelection.start;else{var g=a(this.$clickSelection,o,h.session);o=g.cursor,c=g.anchor}h.selection.setSelectionAnchor(c.row,c.column)}h.selection.selectToPosition(o),h.renderer.scrollCursorIntoView()},s.prototype.extendSelectionBy=function(c){var h,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),g=o.selection[c](l.row,l.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(g.start),x=this.$clickSelection.comparePoint(g.end);if(b==-1&&x<=0)h=this.$clickSelection.end,(g.end.row!=l.row||g.end.column!=l.column)&&(l=g.start);else if(x==1&&b>=0)h=this.$clickSelection.start,(g.start.row!=l.row||g.start.column!=l.column)&&(l=g.end);else if(b==-1&&x==1)l=g.end,h=g.start;else{var E=a(this.$clickSelection,l,o.session);l=E.cursor,h=E.anchor}o.selection.setSelectionAnchor(h.row,h.column)}o.selection.selectToPosition(l),o.renderer.scrollCursorIntoView()},s.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},s.prototype.focusWait=function(){var c=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(c>p||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},s.prototype.onDoubleClick=function(c){var h=c.getDocumentPosition(),o=this.editor,l=o.session,g=l.getBracketRange(h);g?(g.isEmpty()&&(g.start.column--,g.end.column++),this.setState("select")):(g=o.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=g,this.select()},s.prototype.onTripleClick=function(c){var h=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var l=o.getSelectionRange();l.isMultiLine()&&l.contains(h.row,h.column)?(this.$clickSelection=o.selection.getLineRange(l.start.row),this.$clickSelection.end=o.selection.getLineRange(l.end.row).end):this.$clickSelection=o.selection.getLineRange(h.row),this.select()},s.prototype.onQuadClick=function(c){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},s.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=c.domEvent.timeStamp,g=l-o.t,b=g?c.wheelX/g:o.vx,x=g?c.wheelY/g:o.vy;g<w&&(b=(b+o.vx)/2,x=(x+o.vy)/2);var E=Math.abs(b/x),$=!1;if(E>=1&&h.renderer.isScrollableBy(c.wheelX*c.speed,0)&&($=!0),E<=1&&h.renderer.isScrollableBy(0,c.wheelY*c.speed)&&($=!0),$)o.allowed=l;else if(l-o.allowed<w){var _=Math.abs(b)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);_?($=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=b,o.vy=x,$)return h.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},s})();u.prototype.selectEnd=u.prototype.selectByLinesEnd,u.prototype.selectAllEnd=u.prototype.selectByLinesEnd,u.prototype.selectByWordsEnd=u.prototype.selectByLinesEnd,r.DefaultHandlers=u;function f(s,c,h,o){return Math.sqrt(Math.pow(h-s,2)+Math.pow(o-c,2))}function a(s,c,h){if(s.start.row==s.end.row)var o=2*c.column-s.start.column-s.end.column;else if(s.start.row==s.end.row-1&&!s.start.column&&!s.end.column)var o=3*c.column-2*h.getLine(s.start.row).length;else var o=2*c.row-s.start.row-s.end.row;return o<0?{cursor:s.start,anchor:s.end}:{cursor:s.end,anchor:s.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var d=e("../lib/event"),p=e("../lib/useragent"),w=(function(){function u(f,a){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=a,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return u.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},u.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},u.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},u.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},u.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(f,0),s=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-s},u.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,a=f.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var s=this.getDocumentPosition();this.$inSelection=a.contains(s.row,s.column)}return this.$inSelection},u.prototype.getButton=function(){return d.getButton(this.domEvent)},u.prototype.getShiftKey=function(){return this.domEvent.shiftKey},u.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},u})();r.MouseEvent=w}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,m){r.preventParentScroll=function(d){d.stopPropagation();var p=d.currentTarget,w=p.scrollHeight>p.clientHeight;w||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,m){var d=this&&this.__extends||(function(){var l=function(g,b){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(x[$]=E[$])},l(g,b)};return function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");l(g,b);function x(){this.constructor=g}g.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}})(),p=this&&this.__values||function(l){var g=typeof Symbol=="function"&&Symbol.iterator,b=g&&l[g],x=0;if(b)return b.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&x>=l.length&&(l=void 0),{value:l&&l[x++],done:!l}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("./lib/dom");e("./lib/event");var u=e("./range").Range,f=e("./lib/scroll").preventParentScroll,a="ace_tooltip",s=(function(){function l(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return l.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(g){this.getElement().textContent=g},l.prototype.setHtml=function(g){this.getElement().innerHTML=g},l.prototype.setPosition=function(g,b){this.getElement().style.left=g+"px",this.getElement().style.top=b+"px"},l.prototype.setClassName=function(g){w.addCssClass(this.getElement(),g)},l.prototype.setTheme=function(g){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),g.isDark&&w.addCssClass(this.getElement(),"ace_dark"),g.cssClass&&w.addCssClass(this.getElement(),g.cssClass),this.theme={isDark:g.isDark,cssClass:g.cssClass}},l.prototype.show=function(g,b,x){g!=null&&this.setText(g),b!=null&&x!=null&&this.setPosition(b,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(g){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l})(),c=(function(){function l(){this.popups=[]}return l.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},l.prototype.removePopup=function(g){var b=this.popups.indexOf(g);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},l.prototype.updatePopups=function(){var g,b,x,E;this.popups.sort(function(z,O){return O.priority-z.priority});var $=[];try{for(var _=p(this.popups),C=_.next();!C.done;C=_.next()){var L=C.value,D=!0;try{for(var I=(x=void 0,p($)),M=I.next();!M.done;M=I.next()){var W=M.value;if(this.doPopupsOverlap(W,L)){D=!1;break}}}catch(z){x={error:z}}finally{try{M&&!M.done&&(E=I.return)&&E.call(I)}finally{if(x)throw x.error}}D?$.push(L):L.hide()}}catch(z){g={error:z}}finally{try{C&&!C.done&&(b=_.return)&&b.call(_)}finally{if(g)throw g.error}}},l.prototype.doPopupsOverlap=function(g,b){var x=g.getElement().getBoundingClientRect(),E=b.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},l})(),h=new c;r.popupManager=h,r.Tooltip=s;var o=(function(l){d(g,l);function g(b){b===void 0&&(b=document.body);var x=l.call(this,b)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",f),x}return g.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(b,x){this.lastEvent=b,this.lastT=Date.now();var E=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(b){var x=b.editor,E=b.getDocumentPosition(),$=x.session.getLine(E.row);if(E.column==$.length){var _=x.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),C=x.session.documentToScreenPosition(E.row,E.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},g.prototype.setDataProvider=function(b){this.$gatherData=b},g.prototype.showForRange=function(b,x,E,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=b.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.range=u.fromPoints(x.start,x.end);var C=_.textToScreenCoordinates(x.start.row,x.start.column),L=_.scroller.getBoundingClientRect();C.pageX<L.left&&(C.pageX=L.left);var D=this.getElement();D.innerHTML="",D.appendChild(E),D.style.maxHeight="",D.style.display="block",this.$setPosition(b,C,!0,x),w.$fixPositionBug(D)}},g.prototype.$setPosition=function(b,x,E,$){var _=10;E&&this.addMarker($,b.session);var C=b.renderer,L=this.getElement(),D=L.offsetHeight,I=L.offsetWidth,M=x.pageY,W=x.pageX,z=window.innerHeight-M-C.lineHeight,O=this.$shouldPlaceAbove(D,M,z-_);L.style.maxHeight=(O?M:z)-_+"px",L.style.top=O?"":M+C.lineHeight+"px",L.style.bottom=O?window.innerHeight-M+"px":"",L.style.left=Math.min(W,window.innerWidth-I-_)+"px"},g.prototype.$shouldPlaceAbove=function(b,x,E){return!(x-b<0&&x<E)},g.prototype.addMarker=function(b,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(b,"ace_highlight-marker","text")},g.prototype.hide=function(b){b&&this.$fromKeyboard&&b.type=="keydown"&&b.code=="Escape"||!b&&document.activeElement==this.getElement()||b&&b.target&&(b.type!="keydown"||b.ctrlKey||b.metaKey)&&this.$element.contains(b.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(b){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!b.relatedTarget||this.getElement().contains(b.relatedTarget)||b&&b.currentTarget.contains(b.relatedTarget)||b.relatedTarget.classList.contains("ace_content")||this.hide())},g})(s);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,m){var d=this&&this.__extends||(function(){var o=function(l,g){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(b[E]=x[E])},o(l,g)};return function(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");o(l,g);function b(){this.constructor=l}l.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}})(),p=this&&this.__values||function(o){var l=typeof Symbol=="function"&&Symbol.iterator,g=l&&o[l],b=0;if(g)return g.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&b>=o.length&&(o=void 0),{value:o&&o[b++],done:!o}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("../lib/dom"),u=e("./mouse_event").MouseEvent,f=e("../tooltip").HoverTooltip,a=e("../config").nls,s=e("../range").Range;function c(o){var l=o.editor,g=l.renderer.$gutterLayer;o.$tooltip=new h(l),o.$tooltip.addToEditor(l),o.$tooltip.setDataProvider(function(b,x){var E=b.getDocumentPosition().row;o.$tooltip.showTooltip(E)}),o.editor.setDefaultHandler("guttermousedown",function(b){if(!(!l.isFocused()||b.getButton()!=0)){var x=g.getRegion(b);if(x!="foldWidgets"){var E=b.getDocumentPosition().row,$=l.session.selection;if(b.getShiftKey())$.selectTo(E,0);else{if(b.domEvent.detail==2)return l.selectAll(),b.preventDefault();o.$clickSelection=l.selection.getLineRange(E)}return o.setState("selectByLines"),o.captureMouse(b),b.preventDefault()}}})}r.GutterHandler=c;var h=(function(o){d(l,o);function l(g){var b=o.call(this,g.container)||this;b.id="gt"+ ++l.$uid,b.editor=g,b.visibleTooltipRow;var x=b.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",b.id),x.style.pointerEvents="auto",b.idleTime=50,b.onDomMouseMove=b.onDomMouseMove.bind(b),b.onDomMouseOut=b.onDomMouseOut.bind(b),b.setClassName("ace_gutter-tooltip"),b}return l.prototype.onDomMouseMove=function(g){var b=new u(g,this.editor);this.onMouseMove(b,this.editor)},l.prototype.onDomMouseOut=function(g){var b=new u(g,this.editor);this.onMouseOut(b)},l.prototype.addToEditor=function(g){var b=g.renderer.$gutter;b.addEventListener("mousemove",this.onDomMouseMove),b.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,g)},l.prototype.removeFromEditor=function(g){var b=g.renderer.$gutter;b.removeEventListener("mousemove",this.onDomMouseMove),b.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,g)},l.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(l,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),l.prototype.showTooltip=function(g){var b,x=this.editor.renderer.$gutterLayer,E=x.$annotations[g],$;E?$={displayText:Array.from(E.displayText),type:Array.from(E.type)}:$={displayText:[],type:[]};var _=x.session.getFoldLine(g);if(_&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},D,I=g+1;I<=_.end.row;I++)if(x.$annotations[I])for(var M=0;M<x.$annotations[I].text.length;M++){var W=x.$annotations[I].type[M];C[W].push(x.$annotations[I].text[M]),(!D||L[W]<L[D])&&(D=W)}if(["error","security","warning"].includes(D)){var z="".concat(l.annotationsToSummaryString(C)," in folded code.");$.displayText.push(z),$.type.push(D+"_fold")}}if($.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},T=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<$.displayText.length;I++){var A=w.createElement("span"),N=w.createElement("span");(b=N.classList).add.apply(b,["ace_".concat($.type[I]),T]),N.setAttribute("aria-label","".concat(l.annotationLabels[$.type[I].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(w.createTextNode(" ")),A.appendChild(N),A.appendChild(w.createTextNode($.displayText[I])),A.appendChild(w.createElement("br")),O[$.type[I].replace("_fold","")].push(A)}var B=w.createElement("span");O.error.forEach(function(J){return B.appendChild(J)}),O.security.forEach(function(J){return B.appendChild(J)}),O.warning.forEach(function(J){return B.appendChild(J)}),O.info.forEach(function(J){return B.appendChild(J)}),O.hint.forEach(function(J){return B.appendChild(J)}),B.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(g);U&&U.setAttribute("aria-describedby",this.id);var G=s.fromPoints({row:g,column:0},{row:g,column:0});this.showForRange(this.editor,G,B),this.visibleTooltipRow=g,this.editor._signal("showGutterTooltip",this)},l.prototype.$setPosition=function(g,b,x,E){var $=this.$findCellByRow(E.start.row);if($){var _=$&&$.element,C=_&&_.querySelector(".ace_gutter_annotation");if(C){var L=C.getBoundingClientRect();if(L){var D={pageX:L.right,pageY:L.top};return o.prototype.$setPosition.call(this,g,D,!1,E)}}}},l.prototype.$shouldPlaceAbove=function(g,b,x){return x<g},l.prototype.$findLinkedAnnotationNode=function(g){var b=this.$findCellByRow(g);if(b){var x=b.element;if(x.childNodes.length>2)return x.childNodes[2]}},l.prototype.$findCellByRow=function(g){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===g})},l.prototype.hide=function(g){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var b=this.$findLinkedAnnotationNode(this.visibleTooltipRow);b&&b.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,g)}},l.annotationsToSummaryString=function(g){var b,x,E=[],$=["error","security","warning","info","hint"];try{for(var _=p($),C=_.next();!C.done;C=_.next()){var L=C.value;if(g[L].length){var D=g[L].length===1?l.annotationLabels[L].singular:l.annotationLabels[L].plural;E.push("".concat(g[L].length," ").concat(D))}}}catch(I){b={error:I}}finally{try{C&&!C.done&&(x=_.return)&&x.call(_)}finally{if(b)throw b.error}}return E.join(", ")},l.prototype.isOutsideOfText=function(g){var b=g.editor,x=b.renderer.$gutter.getBoundingClientRect();return!(g.clientX>=x.left&&g.clientX<=x.right&&g.clientY>=x.top&&g.clientY<=x.bottom)},l})(f);h.$uid=0,r.GutterTooltip=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,m){var d=e("../lib/dom"),p=e("../lib/event"),w=e("../lib/useragent"),u=200,f=200,a=5;function s(h){var o=h.editor,l=d.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var g=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];g.forEach(function(re){h[re]=this[re]},this),o.on("mousedown",this.onMouseDown.bind(h));var b=o.container,x,E,$,_,C,L,D=0,I,M,W,z,O;this.onDragStart=function(re){if(this.cancelDrag||!b.draggable){var ce=this;return setTimeout(function(){ce.startSelect(),ce.captureMouse(re)},0),re.preventDefault()}C=o.getSelectionRange();var de=re.dataTransfer;de.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(l),de.setDragImage&&de.setDragImage(l,0,0),setTimeout(function(){o.container.removeChild(l)}),de.clearData(),de.setData("Text",o.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(re){if(b.draggable=!1,M=!1,this.setState(null),!o.getReadOnly()){var ce=re.dataTransfer.dropEffect;!I&&ce=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(re){if(!(o.getReadOnly()||!Q(re.dataTransfer)))return E=re.clientX,$=re.clientY,x||B(),D++,re.dataTransfer.dropEffect=I=le(re),p.preventDefault(re)},this.onDragOver=function(re){if(!(o.getReadOnly()||!Q(re.dataTransfer)))return E=re.clientX,$=re.clientY,x||(B(),D++),G!==null&&(G=null),re.dataTransfer.dropEffect=I=le(re),p.preventDefault(re)},this.onDragLeave=function(re){if(D--,D<=0&&x)return U(),I=null,p.preventDefault(re)},this.onDrop=function(re){if(L){var ce=re.dataTransfer;if(M)switch(I){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=o.moveText(C,L);break;case"copy":C=o.moveText(C,L,!0);break}else{var de=ce.getData("Text");C={start:L,end:o.session.insert(L,de)},o.focus(),I=null}return U(),p.preventDefault(re)}},p.addListener(b,"dragstart",this.onDragStart.bind(h),o),p.addListener(b,"dragend",this.onDragEnd.bind(h),o),p.addListener(b,"dragenter",this.onDragEnter.bind(h),o),p.addListener(b,"dragover",this.onDragOver.bind(h),o),p.addListener(b,"dragleave",this.onDragLeave.bind(h),o),p.addListener(b,"drop",this.onDrop.bind(h),o);function T(re,ce){var de=Date.now(),ie=!ce||re.row!=ce.row,fe=!ce||re.column!=ce.column;if(!z||ie||fe)o.moveCursorToPosition(re),z=de,O={x:E,y:$};else{var $e=c(O.x,O.y,E,$);$e>a?z=null:de-z>=f&&(o.renderer.scrollCursorIntoView(),z=null)}}function A(re,ce){var de=Date.now(),ie=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,$e=o.renderer.scroller.getBoundingClientRect(),Re={x:{left:E-$e.left,right:$e.right-E},y:{top:$-$e.top,bottom:$e.bottom-$}},Ee=Math.min(Re.x.left,Re.x.right),Ue=Math.min(Re.y.top,Re.y.bottom),He={row:re.row,column:re.column};Ee/fe<=2&&(He.column+=Re.x.left<Re.x.right?-3:2),Ue/ie<=1&&(He.row+=Re.y.top<Re.y.bottom?-1:1);var Ge=re.row!=He.row,ct=re.column!=He.column,We=!ce||re.row!=ce.row;Ge||ct&&!We?W?de-W>=u&&o.renderer.scrollCursorIntoView(He):W=de:W=null}function N(){var re=L;L=o.renderer.screenToTextCoordinates(E,$),T(L,re),A(L,re)}function B(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),N(),_=setInterval(N,20),D=0,p.addListener(document,"mousemove",J)}function U(){clearInterval(_),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!M&&o.$resetCursorStyle(),C=null,L=null,D=0,W=null,z=null,p.removeListener(document,"mousemove",J)}var G=null;function J(){G==null&&(G=setTimeout(function(){G!=null&&x&&U()},20))}function Q(re){var ce=re.types;return!ce||Array.prototype.some.call(ce,function(de){return de=="text/plain"||de=="Text"})}function le(re){var ce=["copy","copymove","all","uninitialized"],de=["move","copymove","linkmove","all","uninitialized"],ie=w.isMac?re.altKey:re.ctrlKey,fe="uninitialized";try{fe=re.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return ie&&ce.indexOf(fe)>=0?$e="copy":de.indexOf(fe)>=0?$e="move":ce.indexOf(fe)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,o=h.container;o.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var l=w.isWin?"default":"move";h.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(h){var o=this.editor.container;if(w.isIE&&this.state=="dragReady"){var l=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var o=this.editor,l=h.inSelection(),g=h.getButton(),b=h.domEvent.detail||1;if(b===1&&g===0&&l){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(s.prototype);function c(h,o,l,g){return Math.sqrt(Math.pow(l-h,2)+Math.pow(g-o,2))}r.DragdropHandler=s}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,m){var d=e("./mouse_event").MouseEvent,p=e("../lib/event"),w=e("../lib/dom");r.addTouchListeners=function(u,f){var a="scroll",s,c,h,o,l,g,b=0,x,E=0,$=0,_=0,C,L;function D(){var T=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var G=f.getCopyText(),J=f.session.getUndoManager().hasUndo();L.replaceChild(w.buildDom(A?["span",!G&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],T&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],J&&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"]),L.firstChild)},B=function(G){return f.commands.canExecute(G,f)},U=function(G){var J=G.target.getAttribute("action");if(J=="more"||!A)return A=!A,N();J=="paste"?T.readText().then(function(Q){f.execCommand(J,Q)}):J&&((J=="cut"||J=="copy")&&(T?T.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(J)),L.firstChild.style.display="none",A=!1,J!="openCommandPalette"&&f.focus()};L=w.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container),L.addEventListener("touchstart",function(G){a="menu",G.stopPropagation(),G.preventDefault(),f.textInput.focus()}),L.addEventListener("touchend",function(G){G.stopPropagation(),G.preventDefault(),U(G)})}function I(){if(!f.getOption("enableMobileMenu")){L&&M();return}L||D();var T=f.selection.cursor,A=f.renderer.textToScreenCoordinates(T.row,T.column),N=f.renderer.textToScreenCoordinates(0,0).pageX,B=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();L.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=N+B-U.left+"px"),L.style.display="",L.firstChild.style.display="none",f.on("input",M)}function M(T){L&&(L.style.display="none"),f.off("input",M)}function W(){l=null,clearTimeout(l);var T=f.selection.getRange(),A=T.contains(x.row,x.column);(T.isEmpty()||!A)&&(f.selection.moveToPosition(x),f.selection.selectWord()),a="wait",I()}function z(){l=null,clearTimeout(l),f.selection.moveToPosition(x);var T=E>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);T&&!T.isEmpty()?f.selection.setRange(T):f.selection.selectWord(),a="wait"}p.addListener(u,"contextmenu",function(T){if(C){var A=f.textInput.getElement();A.focus()}},f),p.addListener(u,"touchstart",function(T){var A=T.touches;if(l||A.length>1){clearTimeout(l),l=null,h=-1,a="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var N=f.renderer.layerConfig.lineHeight,B=f.renderer.layerConfig.lineHeight,U=T.timeStamp;o=U;var G=A[0],J=G.clientX,Q=G.clientY;Math.abs(s-J)+Math.abs(c-Q)>N&&(h=-1),s=T.clientX=J,c=T.clientY=Q,$=_=0;var le=new d(T,f);if(x=le.getDocumentPosition(),U-h<500&&A.length==1&&!b)E++,T.preventDefault(),T.button=0,z();else{E=0;var re=f.selection.cursor,ce=f.selection.isEmpty()?re:f.selection.anchor,de=f.renderer.$cursorLayer.getPixelPosition(re,!0),ie=f.renderer.$cursorLayer.getPixelPosition(ce,!0),fe=f.renderer.scroller.getBoundingClientRect(),$e=f.renderer.layerConfig.offset,Re=f.renderer.scrollLeft,Ee=function(Ge,ct){return Ge=Ge/B,ct=ct/N-.75,Ge*Ge+ct*ct};if(T.clientX<fe.left){a="zoom";return}var Ue=Ee(T.clientX-fe.left-de.left+Re,T.clientY-fe.top-de.top+$e),He=Ee(T.clientX-fe.left-ie.left+Re,T.clientY-fe.top-ie.top+$e);Ue<3.5&&He<3.5&&(a=Ue>He?"cursor":"anchor"),He<3.5?a="anchor":Ue<3.5?a="cursor":a="scroll",l=setTimeout(W,450)}h=U},f),p.addListener(u,"touchend",function(T){C=f.$mouseHandler.isMousePressed=!1,g&&clearInterval(g),a=="zoom"?(a="",b=0):l?(f.selection.moveToPosition(x),b=0,I()):a=="scroll"?(O(),M()):I(),clearTimeout(l),l=null},f),p.addListener(u,"touchmove",function(T){l&&(clearTimeout(l),l=null);var A=T.touches;if(!(A.length>1||a=="zoom")){var N=A[0],B=s-N.clientX,U=c-N.clientY;if(a=="wait")if(B*B+U*U>4)a="cursor";else return T.preventDefault();s=N.clientX,c=N.clientY,T.clientX=N.clientX,T.clientY=N.clientY;var G=T.timeStamp,J=G-o;if(o=G,a=="scroll"){var Q=new d(T,f);Q.speed=1,Q.wheelX=B,Q.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),J!=0&&($=B/J,_=U/J),f._emit("mousewheel",Q),Q.propagationStopped||($=_=0)}else{var le=new d(T,f),re=le.getDocumentPosition();a=="cursor"?f.selection.moveCursorToPosition(re):a=="anchor"&&f.selection.setSelectionAnchor(re.row,re.column),f.renderer.scrollCursorIntoView(re),T.preventDefault()}}},f);function O(){b+=60,g=setInterval(function(){b--<=0&&(clearInterval(g),g=null),Math.abs($)<.01&&($=0),Math.abs(_)<.01&&(_=0),b<20&&($=.9*$),b<20&&(_=.9*_);var T=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*_),T==f.session.getScrollTop()&&(b=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,m){var d=e("../lib/event"),p=e("../lib/useragent"),w=e("./default_handlers").DefaultHandlers,u=e("./default_gutter_handler").GutterHandler,f=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,s=e("./touch_handler").addTouchListeners,c=e("../config"),h=(function(){function o(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var g=this;this.editor=l,new w(this),new u(this),new a(this);var b=function($){var _=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());_&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},x=l.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),l),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),d.addMultiMouseDownListener([x,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),d.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),s(l.container,l);var E=l.renderer.$gutter;d.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(x,"mousedown",b,l),d.addListener(E,"mousedown",b,l),p.isIE&&l.renderer.scrollBarV&&(d.addListener(l.renderer.scrollBarV.element,"mousedown",b,l),d.addListener(l.renderer.scrollBarH.element,"mousedown",b,l)),l.on("mousemove",function($){if(!(g.state||g.$dragDelay||!g.$dragEnabled)){var _=l.renderer.screenToTextCoordinates($.x,$.y),C=l.session.selection.getRange(),L=l.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},l)}return o.prototype.onMouseEvent=function(l,g){this.editor.session&&this.editor._emit(l,new f(g,this.editor))},o.prototype.onMouseMove=function(l,g){var b=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!b||!b.length||this.editor._emit(l,new f(g,this.editor))},o.prototype.onMouseWheel=function(l,g){var b=new f(g,this.editor);b.speed=this.$scrollSpeed*2,b.wheelX=g.wheelX,b.wheelY=g.wheelY,this.editor._emit(l,b)},o.prototype.setState=function(l){this.state=l},o.prototype.captureMouse=function(l,g){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var b=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,$=!0,_=function(M){if(M){if(p.isWebKit&&!M.which&&E.releaseMouse)return E.releaseMouse();E.x=M.clientX,E.y=M.clientY,g&&g(M),E.mouseEvent=new f(M,E.editor),E.$mouseMoved=!0}},C=function(M){b.off("beforeEndOperation",I),$=!1,b.session&&L(),E[E.state+"End"]&&E[E.state+"End"](M),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,M&&E.onMouseEvent("mouseup",M),b.endOperation()},L=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},D=function(){$&&(L(),d.nextFrame(D))};if(p.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){C(l)});var I=function(M){E.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};b.on("beforeEndOperation",I),b.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=_,E.releaseMouse=d.capture(this.editor.container,_,C),D()},o.prototype.cancelContextMenu=function(){var l=(function(g){g&&g.domEvent&&g.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),g&&g.domEvent&&d.stopEvent(g.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();h.prototype.releaseMouse=null,c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("../lib/dom"),p=(function(){function w(u){u.on("click",function(f){var a=f.getDocumentPosition(),s=u.session,c=s.getFoldAt(a.row,a.column,1);c&&(f.getAccelKey()?s.removeFold(c):s.expandFold(c),f.stop());var h=f.domEvent&&f.domEvent.target;h&&d.hasCssClass(h,"ace_inline_button")&&d.hasCssClass(h,"ace_toggle_wrap")&&(s.setOption("wrap",!s.getUseWrapMode()),u.renderer.scrollCursorIntoView())}),u.on("gutterclick",function(f){var a=u.renderer.$gutterLayer.getRegion(f);if(a=="foldWidgets"){var s=f.getDocumentPosition().row,c=u.session;c.foldWidgets&&c.foldWidgets[s]&&u.session.onFoldWidgetClick(s,f),u.isFocused()||u.focus(),f.stop()}}),u.on("gutterdblclick",function(f){var a=u.renderer.$gutterLayer.getRegion(f);if(a=="foldWidgets"){var s=f.getDocumentPosition().row,c=u.session,h=c.getParentFoldRangeData(s,!0),o=h.range||h.firstRange;if(o){s=o.start.row;var l=c.getFoldAt(s,c.getLine(s).length,1);l?c.removeFold(l):(c.addFold("...",o),u.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}f.stop()}})}return w})();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,m){var d=e("../lib/keys"),p=e("../lib/event"),w=(function(){function u(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return u.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},u.prototype.setKeyboardHandler=function(f){var a=this.$handlers;if(a[a.length-1]!=f){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(f,1)}},u.prototype.addKeyboardHandler=function(f,a){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var s=this.$handlers.indexOf(f);s!=-1&&this.$handlers.splice(s,1),a==null?this.$handlers.push(f):this.$handlers.splice(a,0,f),s==-1&&f.attach&&f.attach(this.$editor)}},u.prototype.removeKeyboardHandler=function(f){var a=this.$handlers.indexOf(f);return a==-1?!1:(this.$handlers.splice(a,1),f.detach&&f.detach(this.$editor),!0)},u.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},u.prototype.getStatusText=function(){var f=this.$data,a=f.editor;return this.$handlers.map(function(s){return s.getStatusText&&s.getStatusText(a,f)||""}).filter(Boolean).join(" ")},u.prototype.$callKeyboardHandlers=function(f,a,s,c){for(var h,o=!1,l=this.$editor.commands,g=this.$handlers.length;g--&&(h=this.$handlers[g].handleKeyboard(this.$data,f,a,s,c),!(!(!h||!h.command)&&(h.command=="null"?o=!0:o=l.exec(h.command,this.$editor,h.args,c),o&&c&&f!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&p.stopEvent(c),o))););return!o&&f==-1&&(h={command:"insertstring"},o=l.exec("insertstring",this.$editor,a)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),o},u.prototype.onCommandKey=function(f,a,s){var c=d.keyCodeToString(s);return this.$callKeyboardHandlers(a,c,s,f)},u.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},u})();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,m){var d=0,p=0,w=!1,u=!1,f=!1,a=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],s=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],c=0,h=1,o=0,l=1,g=2,b=3,x=4,E=5,$=6,_=7,C=8,L=9,D=10,I=11,M=12,W=13,z=14,O=15,T=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,$,E,$,C,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,E,E,$,C,x,x,I,I,I,x,x,x,x,x,D,L,D,L,L,g,g,g,g,g,g,g,g,g,g,L,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,N,N,N,N,N,N,E,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,L,x,I,I,I,I,x,x,x,x,o,x,x,N,x,x,I,I,g,g,x,o,x,x,x,g,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,l,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,E,W,z,O,T,A,L,I,I,I,I,I,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function G(re,ce,de,ie){var fe=d?s:a,$e=null,Re=null,Ee=null,Ue=0,He=null,Ge=null,ct=-1,We=null,Me=null,$t=[];if(!ie)for(We=0,ie=[];We<de;We++)ie[We]=le(re[We]);for(p=d,w=!1,u=!1,f=!1,Me=0;Me<de;Me++){if($e=Ue,$t[Me]=Re=Q(re,ie,$t,Me),Ue=fe[$e][Re],He=Ue&240,Ue&=15,ce[Me]=Ee=fe[Ue][5],He>0)if(He==16){for(We=ct;We<Me;We++)ce[We]=1;ct=-1}else ct=-1;if(Ge=fe[Ue][6],Ge)ct==-1&&(ct=Me);else if(ct>-1){for(We=ct;We<Me;We++)ce[We]=Ee;ct=-1}ie[Me]==E&&(ce[Me]=0),p|=Ee}if(f){for(We=0;We<de;We++)if(ie[We]==$){ce[We]=d;for(var lt=We-1;lt>=0&&ie[lt]==C;lt--)ce[lt]=d}}}function J(re,ce,de){if(!(p<re)){if(re==1&&d==h&&!u){de.reverse();return}for(var ie=de.length,fe=0,$e,Re,Ee,Ue;fe<ie;){if(ce[fe]>=re){for($e=fe+1;$e<ie&&ce[$e]>=re;)$e++;for(Re=fe,Ee=$e-1;Re<Ee;Re++,Ee--)Ue=de[Re],de[Re]=de[Ee],de[Ee]=Ue;fe=$e}fe++}}}function Q(re,ce,de,ie){var fe=ce[ie],$e,Re,Ee,Ue;switch(fe){case o:case l:w=!1;case x:case b:return fe;case g:return w?b:g;case _:return w=!0,l;case C:return x;case L:return ie<1||ie+1>=ce.length||($e=de[ie-1])!=g&&$e!=b||(Re=ce[ie+1])!=g&&Re!=b?x:(w&&(Re=b),Re==$e?Re:x);case D:return $e=ie>0?de[ie-1]:E,$e==g&&ie+1<ce.length&&ce[ie+1]==g?g:x;case I:if(ie>0&&de[ie-1]==g)return g;if(w)return x;for(Ue=ie+1,Ee=ce.length;Ue<Ee&&ce[Ue]==I;)Ue++;return Ue<Ee&&ce[Ue]==g?g:x;case M:for(Ee=ce.length,Ue=ie+1;Ue<Ee&&ce[Ue]==M;)Ue++;if(Ue<Ee){var He=re[ie],Ge=He>=1425&&He<=2303||He==64286;if($e=ce[Ue],Ge&&($e==l||$e==_))return l}return ie<1||($e=ce[ie-1])==E?x:de[ie-1];case E:return w=!1,u=!0,d;case $:return f=!0,x;case W:case z:case T:case A:case O:w=!1;case N:return x}}function le(re){var ce=re.charCodeAt(0),de=ce>>8;return de==0?ce>191?o:B[ce]:de==5?/[\u0591-\u05f4]/.test(re)?l:o:de==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(re)?M:/[\u0660-\u0669\u066b-\u066c]/.test(re)?b:ce==1642?I:/[\u06f0-\u06f9]/.test(re)?g:_:de==32&&ce<=8287?U[ce&255]:de==254&&ce>=65136?_:x}r.L=o,r.R=l,r.EN=g,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(re,ce,de){if(re.length<2)return{};var ie=re.split(""),fe=new Array(ie.length),$e=new Array(ie.length),Re=[];d=de?h:c,G(ie,Re,ie.length,ce);for(var Ee=0;Ee<fe.length;fe[Ee]=Ee,Ee++);J(2,Re,fe),J(1,Re,fe);for(var Ee=0;Ee<fe.length-1;Ee++)ce[Ee]===b?Re[Ee]=r.AN:Re[Ee]===l&&(ce[Ee]>_&&ce[Ee]<W||ce[Ee]===x||ce[Ee]===N)?Re[Ee]=r.ON_R:Ee>0&&ie[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ie[Ee])&&(Re[Ee-1]=Re[Ee]=r.R_H,Ee++);ie[ie.length-1]===r.DOT&&(Re[ie.length-1]=r.B),ie[0]===""&&(Re[0]=r.RLE);for(var Ee=0;Ee<fe.length;Ee++)$e[Ee]=Re[fe[Ee]];return{logicalFromVisual:fe,bidiLevels:$e}},r.hasBidiCharacters=function(re,ce){for(var de=!1,ie=0;ie<re.length;ie++)ce[ie]=le(re.charAt(ie)),!de&&(ce[ie]==l||ce[ie]==_||ce[ie]==b)&&(de=!0);return de},r.getVisualFromLogicalIdx=function(re,ce){for(var de=0;de<ce.logicalFromVisual.length;de++)if(ce.logicalFromVisual[de]==re)return de;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,m){var d=e("./lib/bidiutil"),p=e("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,u=(function(){function f(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=w.test(a.getValue())}return f.prototype.isBidiRow=function(a,s,c){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(s,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&w.test(a.lines.join(`
|
|
182
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var a=0,s=this.session.$screenRowCache;if(s.length){var c=this.session.$getRowCacheIndex(s,this.currentRow);c>=0&&(a=this.session.$docRowCache[c])}return a},f.prototype.getSplitIndex=function(){var a=0,s=this.session.$screenRowCache;if(s.length)for(var c,h=this.session.$getRowCacheIndex(s,this.currentRow);this.currentRow-a>0&&(c=this.session.$getRowCacheIndex(s,this.currentRow-a-1),c===h);)h=c,a++;else a=this.currentRow;return a},f.prototype.updateRowLine=function(a,s){a===void 0&&(a=this.getDocumentRow());var c=a===this.session.getLength()-1,h=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[a];o&&(s===void 0&&(s=this.getSplitIndex()),s>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=s<o.length?this.line.substring(o[s-1],o[s]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[s]),s==o.length&&(this.line+=this.showInvisibles?h:d.DOT))}else this.line+=this.showInvisibles?h:d.DOT;var l=this.session,g=0,b;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||l.isFullWidth(x.charCodeAt(0))?(b=x===" "?l.getScreenTabSize(E+g):2,g+=b-1,p.stringRepeat(d.DOT,b)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},f.prototype.updateBidiMap=function(){var a=[];d.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var s=this.characterWidth=a.$characterSize.width,c=a.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=s,this.charWidths[d.R]=this.charWidths[d.AN]=c,this.charWidths[d.R_H]=c*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},f.prototype.setEolChar=function(a){this.EOL=a},f.prototype.setContentWidth=function(a){this.contentWidth=a},f.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(a,s){for(var c=a.getCursorPosition(),h=a.selection.getSelectionAnchor().row;h<=c.row;h++)!s&&a.session.getLine(h).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(h,0,1):s&&a.session.getLine(h).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:h},a.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(a){a-=this.wrapIndent;var s=this.line.charAt(0)===this.RLE?1:0,c=a>s?this.session.getOverwrite()?a:a-1:s,h=d.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&a<=s&&o[h]%2!==0&&h++;for(var g=0;g<h;g++)l+=this.charWidths[o[g]];return!this.session.getOverwrite()&&a>s&&o[h]%2===0&&(l+=this.charWidths[o[h]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},f.prototype.getSelections=function(a,s){var c=this.bidiMap,h=c.bidiLevels,o,l=[],g=0,b=Math.min(a,s)-this.wrapIndent,x=Math.max(a,s)-this.wrapIndent,E=!1,$=!1,_=0;this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<h.length;L++)C=c.logicalFromVisual[L],o=h[L],E=C>=b&&C<x,E&&!$?_=g:!E&&$&&l.push({left:_,width:g-_}),g+=this.charWidths[o],$=E;if(E&&L===h.length&&l.push({left:_,width:g-_}),this.isRtlDir)for(var D=0;D<l.length;D++)l[D].left+=this.rtlLineOffset;return l},f.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var s=0,c=Math.max(c,0),h=0,o=0,l=this.bidiMap.bidiLevels,g=this.charWidths[l[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>h+g/2;){if(h+=g,o===l.length-1){g=0;break}g=this.charWidths[l[++o]]}return o>0&&l[o-1]%2!==0&&l[o]%2===0?(c<h&&o--,s=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?s=1+(c>h?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===l.length-1&&g===0&&l[o-1]%2===0||!this.isRtlDir&&o===0&&l[o]%2!==0?s=1+this.bidiMap.logicalFromVisual[o]:(o>0&&l[o-1]%2!==0&&g!==0&&o--,s=this.bidiMap.logicalFromVisual[o]),s===0&&this.isRtlDir&&s++,s+this.wrapIndent},f})();r.BidiHandler=u}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,m){var d=e("./lib/oop"),p=e("./lib/lang"),w=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,f=(function(){function a(s){this.session=s,this.doc=s.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(h){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&h.old.column!=h.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(s,c){this.$isEmpty=!1,this.anchor.setPosition(s,c)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var s=this.anchor,c=this.lead;return s.row>c.row||s.row==c.row&&s.column>c.column},a.prototype.getRange=function(){var s=this.anchor,c=this.lead;return this.$isEmpty?u.fromPoints(c,c):this.isBackwards()?u.fromPoints(c,s):u.fromPoints(s,c)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(s,c){var h=c?s.end:s.start,o=c?s.start:s.end;this.$setSelection(h.row,h.column,o.row,o.column)},a.prototype.$setSelection=function(s,c,h,o){if(!this.$silent){var l=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(s,c),this.cursor.setPosition(h,o),this.$isEmpty=!u.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||g)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(s){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),s.call(this)},a.prototype.selectTo=function(s,c){this.$moveSelection(function(){this.moveCursorTo(s,c)})},a.prototype.selectToPosition=function(s){this.$moveSelection(function(){this.moveCursorToPosition(s)})},a.prototype.moveTo=function(s,c){this.clearSelection(),this.moveCursorTo(s,c)},a.prototype.moveToPosition=function(s){this.clearSelection(),this.moveCursorToPosition(s)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(s,c){if(typeof c>"u"){var h=s||this.lead;s=h.row,c=h.column}return this.session.getWordRange(s,c)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var s=this.getCursor(),c=this.session.getAWordRange(s.row,s.column);this.setSelectionRange(c)},a.prototype.getLineRange=function(s,c){var h=typeof s=="number"?s:this.lead.row,o,l=this.session.getFoldLine(h);return l?(h=l.start.row,o=l.end.row):o=h,c===!0?new u(h,0,o,this.session.getLine(o).length):new u(h,0,o+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(s,c,h){var o=s.column,l=s.column+c;return h<0&&(o=s.column-c,l=s.column),this.session.isTabStop(s)&&this.doc.getLine(s.row).slice(o,l).split(" ").length-1==c},a.prototype.moveCursorLeft=function(){var s=this.lead.getPosition(),c;if(c=this.session.getFoldAt(s.row,s.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(s.column===0)s.row>0&&this.moveCursorTo(s.row-1,this.doc.getLine(s.row-1).length);else{var h=this.session.getTabSize();this.wouldMoveIntoSoftTab(s,h,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-h):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var s=this.lead.getPosition(),c;if(c=this.session.getFoldAt(s.row,s.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var h=this.session.getTabSize(),s=this.lead;this.wouldMoveIntoSoftTab(s,h,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,h):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var s=this.lead.row,c=this.lead.column,h=this.session.documentToScreenRow(s,c),o=this.session.screenToDocumentPosition(h,0),l=this.session.getDisplayLine(s,null,o.row,o.column),g=l.match(/^\s*/);g[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=g[0].length),this.moveCursorToPosition(o)},a.prototype.moveCursorLineEnd=function(){var s=this.lead,c=this.session.getDocumentLastRowColumnPosition(s.row,s.column);if(this.lead.column==c.column){var h=this.session.getLine(c.row);if(c.column==h.length){var o=h.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},a.prototype.moveCursorFileEnd=function(){var s=this.doc.getLength()-1,c=this.doc.getLine(s).length;this.moveCursorTo(s,c)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var s=this.lead.row,c=this.lead.column,h=this.doc.getLine(s),o=h.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(s,c,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=h.substring(c)),c>=h.length){this.moveCursorTo(s,h.length),this.moveCursorRight(),s<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,c)},a.prototype.moveCursorLongWordLeft=function(){var s=this.lead.row,c=this.lead.column,h;if(h=this.session.getFoldAt(s,c,-1)){this.moveCursorTo(h.start.row,h.start.column);return}var o=this.session.getFoldStringAt(s,c,-1);o==null&&(o=this.doc.getLine(s).substring(0,c));var l=p.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(c-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(s,0),this.moveCursorLeft(),s>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,c)},a.prototype.$shortWordEndIndex=function(s){var c=0,h,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(s))c=this.session.tokenRe.lastIndex;else{for(;(h=s[c])&&o.test(h);)c++;if(c<1){for(l.lastIndex=0;(h=s[c])&&!l.test(h);)if(l.lastIndex=0,c++,o.test(h))if(c>2){c--;break}else{for(;(h=s[c])&&o.test(h);)c++;if(c>2)break}}}return l.lastIndex=0,c},a.prototype.moveCursorShortWordRight=function(){var s=this.lead.row,c=this.lead.column,h=this.doc.getLine(s),o=h.substring(c),l=this.session.getFoldAt(s,c,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(c==h.length){var g=this.doc.getLength();do s++,o=this.doc.getLine(s);while(s<g&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var b=this.$shortWordEndIndex(o);this.moveCursorTo(s,c+b)},a.prototype.moveCursorShortWordLeft=function(){var s=this.lead.row,c=this.lead.column,h;if(h=this.session.getFoldAt(s,c,-1))return this.moveCursorTo(h.start.row,h.start.column);var o=this.session.getLine(s).substring(0,c);if(c===0){do s--,o=this.doc.getLine(s);while(s>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var l=p.stringReverse(o),g=this.$shortWordEndIndex(l);return this.moveCursorTo(s,c-g)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(s,c){var h=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(s!==0&&(this.session.$bidiHandler.isBidiRow(h.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(h.column),h.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=h.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?h.column=this.$desiredColumn:this.$desiredColumn=h.column),s!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];s<0?s-=l.rowsAbove||0:s>0&&(s+=l.rowCount-(l.rowsAbove||0))}var g=this.session.screenToDocumentPosition(h.row+s,h.column,o);s!==0&&c===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+c,c===0)},a.prototype.moveCursorToPosition=function(s){this.moveCursorTo(s.row,s.column)},a.prototype.moveCursorTo=function(s,c,h){var o=this.session.getFoldAt(s,c,1);o&&(s=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(s);/[\uDC00-\uDFFF]/.test(l.charAt(c))&&l.charAt(c-1)&&(this.lead.row==s&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(s,c),this.$keepDesiredColumnOnChange=!1,h||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(s,c,h){var o=this.session.screenToDocumentPosition(s,c);this.moveCursorTo(o.row,o.column,h)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(s){this.setSelectionRange(s,s.cursor==s.start),this.$desiredColumn=s.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(s){var c=this.getRange();return s?(s.start.column=c.start.column,s.start.row=c.start.row,s.end.column=c.end.column,s.end.row=c.end.row):s=c,s.cursor=this.isBackwards()?s.start:s.end,s.desiredColumn=this.$desiredColumn,s},a.prototype.getRangeOfMovements=function(s){var c=this.getCursor();try{s(this);var h=this.getCursor();return u.fromPoints(c,h)}catch{return u.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},a.prototype.toJSON=function(){if(this.rangeCount)var s=this.ranges.map(function(c){var h=c.clone();return h.isBackwards=c.cursor==c.start,h});else{var s=this.getRange();s.isBackwards=this.isBackwards()}return s},a.prototype.fromJSON=function(s){if(s.start==null)if(this.rangeList&&s.length>1){this.toSingleRange(s[0]);for(var c=s.length;c--;){var h=u.fromPoints(s[c].start,s[c].end);s[c].isBackwards&&(h.cursor=h.start),this.addRange(h,!0)}return}else s=s[0];this.rangeList&&this.toSingleRange(s),this.setSelectionRange(s,s.isBackwards)},a.prototype.isEqual=function(s){if((s.length||this.rangeCount)&&s.length!=this.rangeCount)return!1;if(!s.length||!this.ranges)return this.getRange().isEqual(s);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(s[c]))return!1;return!0},a})();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,d.implement(f.prototype,w),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,m){var d=e("./lib/report_error").reportError,p=2e3,w=(function(){function u(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var a in this.states){for(var s=this.states[a],c=[],h=0,o=this.matchMappings[a]={defaultToken:"text"},l="g",g=[],b=0;b<s.length;b++){var x=s[b];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),x.unicode&&l.indexOf("u")===-1&&(l+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var E=x.regex,$=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?E=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+h+1)}):($=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&g.push(x)),o[h]=b,h+=$,c.push(E),x.onMatch||(x.onMatch=null)}}c.length||(o[0]=0,c.push("$")),g.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,l)},this),this.regExps[a]=new RegExp("("+c.join(")|(")+")|($)",l)}}return u.prototype.$setMaxTokenCount=function(f){p=f|0},u.prototype.$applyToken=function(f){var a=this.splitRegex.exec(f).slice(1),s=this.token.apply(this,a);if(typeof s=="string")return[{type:s,value:f}];for(var c=[],h=0,o=s.length;h<o;h++)a[h]&&(c[c.length]={type:s[h],value:a[h]});return c},u.prototype.$arrayTokens=function(f){if(!f)return[];var a=this.splitRegex.exec(f);if(!a)return"text";for(var s=[],c=this.tokenArray,h=0,o=c.length;h<o;h++)a[h+1]&&(s[s.length]={type:c[h],value:a[h+1]});return s},u.prototype.removeCapturingGroups=function(f){var a=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(s,c){return c?"(?:":s});return a},u.prototype.createSplitterRegexp=function(f,a){if(f.indexOf("(?=")!=-1){var s=0,c=!1,h={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,g,b,x,E){return c?c=x!="]":x?c=!0:b?(s==h.stack&&(h.end=E+1,h.stack=-1),s--):g&&(s++,g.length!=1&&(h.stack=s,h.start=E)),o}),h.end!=null&&/^\)*$/.test(f.substr(h.end))&&(f=f.substring(0,h.start)+f.substr(h.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(a||"").replace("g",""))},u.prototype.getLineTokens=function(f,a){if(a&&typeof a!="string"){var s=a.slice(0);a=s[0],a==="#tmp"&&(s.shift(),a=s.shift())}else var s=[];var c=a||"start",h=this.states[c];h||(c="start",h=this.states[c]);var o=this.matchMappings[c],l=this.regExps[c];l.lastIndex=0;for(var g,b=[],x=0,E=0,$={type:null,value:""};g=l.exec(f);){var _=o.defaultToken,C=null,L=g[0],D=l.lastIndex;if(D-L.length>x){var I=f.substring(x,D-L.length);$.type==_?$.value+=I:($.type&&b.push($),$={type:_,value:I})}for(var M=0;M<g.length-2;M++)if(g[M+1]!==void 0){C=h[o[M]],C.onMatch?_=C.onMatch(L,c,s,f):_=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,s),h=this.states[c],h||(this.reportError("state doesn't exist",c),c="start",h=this.states[c]),o=this.matchMappings[c],x=D,l=this.regExps[c],l.lastIndex=D),C.consumeLineEnd&&(x=D);break}if(L){if(typeof _=="string")(!C||C.merge!==!1)&&$.type===_?$.value+=L:($.type&&b.push($),$={type:_,value:L});else if(_){$.type&&b.push($),$={type:null,value:""};for(var M=0;M<_.length;M++)b.push(_[M])}}if(x==f.length)break;if(x=D,E++>p){for(E>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:f});x<f.length;)$.type&&b.push($),$={value:f.substring(x,x+=500),type:"overflow"};c="start",s=[];break}}return $.type&&b.push($),s.length>1&&s[0]!==c&&s.unshift("#tmp",c),{tokens:b,state:s.length?s:c}},u})();w.prototype.reportError=d,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){var d=e("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,a){if(!a){for(var s in f)this.$rules[s]=f[s];return}for(var s in f){for(var c=f[s],h=0;h<c.length;h++){var o=c[h];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(a)!==0&&(o.next=a+o.next),o.nextState&&o.nextState.indexOf(a)!==0&&(o.nextState=a+o.nextState))}this.$rules[a+s]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(f,a,s,c,h){var o=typeof f=="function"?new f().getRules():f;if(c)for(var l=0;l<c.length;l++)c[l]=a+c[l];else{c=[];for(var g in o)c.push(a+g)}if(this.addRules(o,a),s)for(var b=Array.prototype[h?"push":"unshift"],l=0;l<c.length;l++)b.apply(this.$rules[c[l]],d(s));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var w=function(f,a){return(f!="start"||a.length)&&a.unshift(this.nextState,f),this.nextState},u=function(f,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var f=0,a=this.$rules;function s(c){var h=a[c];h.processed=!0;for(var o=0;o<h.length;o++){var l=h[o],g=null;Array.isArray(l)&&(g=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var b=l.next||l.push;if(b&&Array.isArray(b)){var x=l.stateName;x||(x=l.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=f++)),a[x]=b,l.next=x,s(x)}else b=="pop"&&(l.next=u);if(l.push&&(l.nextState=l.next||l.push,l.next=w,delete l.push),l.rules)for(var E in l.rules)a[E]?a[E].push&&a[E].push.apply(a[E],l.rules[E]):a[E]=l.rules[E];var $=typeof l=="string"?l:l.include;if($&&($==="$self"&&($="start"),Array.isArray($)?g=$.map(function(C){return a[C]}):g=a[$]),g){var _=[o,1].concat(g);l.noEscape&&(_=_.filter(function(C){return!C.next})),h.splice.apply(h,_),o--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(a).forEach(s,this)},this.createKeywordMapper=function(f,a,s,c){var h=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(o){for(var l=f[o],g=l.split(c||"|"),b=g.length;b--;){var x=g[b];this.$keywordList.push(x),s&&(x=x.toLowerCase()),h[x]=o}},this),f=null,s?function(o){return h[o.toLowerCase()]||a}:function(o){return h[o]||a}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,m){var d;d=function(){this.$behaviours={}},(function(){this.add=function(p,w,u){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][w]=u},this.addBehaviours=function(p){for(var w in p)for(var u in p[w])this.add(w,u,p[w][u])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,w){if(typeof p=="function")var u=new p().getBehaviours(w);else var u=p.getBehaviours(w);this.addBehaviours(u)},this.getBehaviours=function(p){if(p){for(var w={},u=0;u<p.length;u++)this.$behaviours[p[u]]&&(w[p[u]]=this.$behaviours[p[u]]);return w}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,m){var d=e("./range").Range,p=(function(){function w(u,f,a){this.$session=u,this.$row=f,this.$rowTokens=u.getTokens(f);var s=u.getTokenAt(f,a);this.$tokenIndex=s?s.index:-1}return w.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},w.prototype.stepForward=function(){this.$tokenIndex+=1;for(var u;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,u||(u=this.$session.getLength()),this.$row>=u)return this.$row=u-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var u=this.$rowTokens,f=this.$tokenIndex,a=u[f].start;if(a!==void 0)return a;for(a=0;f>0;)f-=1,a+=u[f].value.length;return a},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var u=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new d(this.$row,f,this.$row,f+u.value.length)},w})();r.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,m){var d=e("../../lib/oop"),p=e("../behaviour").Behaviour,w=e("../../token_iterator").TokenIterator,u=e("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],s,c={},h={'"':'"',"'":"'"},o=function(b){var x=-1;if(b.multiSelect&&(x=b.selection.index,c.rangeCount!=b.multiSelect.rangeCount&&(c={rangeCount:b.multiSelect.rangeCount})),c[x])return s=c[x];s=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(b,x,E,$){var _=b.end.row-b.start.row;return{text:E+x+$,selection:[0,b.start.column+1,_,b.end.column+(_?0:1)]}},g;g=function(b){b=b||{},this.add("braces","insertion",function(x,E,$,_,C){var L=$.getCursorPosition(),D=_.doc.getLine(L.row);if(C=="{"){o($);var I=$.getSelectionRange(),M=_.doc.getTextRange(I),W=_.getTokenAt(L.row,L.column);if(M!==""&&M!=="{"&&$.getWrapBehavioursEnabled())return l(I,M,"{","}");if(W&&/(?:string)\.quasi|\.xml/.test(W.type)){var z=[/tag\-(?:open|name)/,/attribute\-name/];return z.some(function(G){return G.test(W.type)})||/(string)\.quasi/.test(W.type)&&W.value[L.column-W.start-1]!=="$"?void 0:(g.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]})}else if(g.isSaneInsertion($,_))return/[\]\}\)]/.test(D[L.column])||$.inMultiSelectMode||b.braces?(g.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert($,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o($);var O=D.substring(L.column,L.column+1);if(O=="}"){var T=_.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(T!==null&&g.isAutoInsertedClosing(L,D,C))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
|
183
|
+
`||C==`\r
|
|
184
|
+
`){o($);var A="";g.isMaybeInsertedClosing(L,D)&&(A=u.stringRepeat("}",s.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var O=D.substring(L.column,L.column+1);if(O==="}"){var N=_.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!N)return null;var B=this.$getIndent(_.getLine(N.row))}else if(A)var B=this.$getIndent(D);else{g.clearMaybeInsertedClosing();return}var U=B+_.getTabString();return{text:`
|
|
185
|
+
`+U+`
|
|
186
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else g.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,E,$,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){o($);var D=_.doc.getLine(C.start.row),I=D.substring(C.end.column,C.end.column+1);if(I=="}")return C.end.column++,C;s.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,E,$,_,C){if(C=="("){o($);var L=$.getSelectionRange(),D=_.doc.getTextRange(L);if(D!==""&&$.getWrapBehavioursEnabled())return l(L,D,"(",")");if(g.isSaneInsertion($,_))return g.recordAutoInsert($,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o($);var I=$.getCursorPosition(),M=_.doc.getLine(I.row),W=M.substring(I.column,I.column+1);if(W==")"){var z=_.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(z!==null&&g.isAutoInsertedClosing(I,M,C))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,E,$,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){o($);var D=_.doc.getLine(C.start.row),I=D.substring(C.start.column+1,C.start.column+2);if(I==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,E,$,_,C){if(C=="["){o($);var L=$.getSelectionRange(),D=_.doc.getTextRange(L);if(D!==""&&$.getWrapBehavioursEnabled())return l(L,D,"[","]");if(g.isSaneInsertion($,_))return g.recordAutoInsert($,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o($);var I=$.getCursorPosition(),M=_.doc.getLine(I.row),W=M.substring(I.column,I.column+1);if(W=="]"){var z=_.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(z!==null&&g.isAutoInsertedClosing(I,M,C))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,E,$,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){o($);var D=_.doc.getLine(C.start.row),I=D.substring(C.start.column+1,C.start.column+2);if(I=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,E,$,_,C){var L=_.$mode.$quotes||h;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o($);var D=C,I=$.getSelectionRange(),M=_.doc.getTextRange(I);if(M!==""&&(M.length!=1||!L[M])&&$.getWrapBehavioursEnabled())return l(I,M,D,D);if(!M){var W=$.getCursorPosition(),z=_.doc.getLine(W.row),O=z.substring(W.column-1,W.column),T=z.substring(W.column,W.column+1),A=_.getTokenAt(W.row,W.column),N=_.getTokenAt(W.row,W.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),G;if(T==D)G=B!==U,G&&/string\.end/.test(N.type)&&(G=!1);else{if(B&&!U||B&&U)return null;var J=_.$mode.tokenRe;J.lastIndex=0;var Q=J.test(O);J.lastIndex=0;var le=J.test(T),re=_.$mode.$pairQuotesAfter,ce=re&&re[D]&&re[D].test(O);if(!ce&&Q||le||T&&!/[\s;,.})\]\\]/.test(T))return null;var de=z[W.column-2];if(O==D&&(de==D||J.test(de)))return null;G=!0}return{text:G?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,E,$,_,C){var L=_.$mode.$quotes||h,D=_.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(D)){o($);var I=_.doc.getLine(C.start.row),M=I.substring(C.start.column+1,C.start.column+2);if(M==D)return C.end.column++,C}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,E,$,_,C){if(x==="doc-start"&&(C===`
|
|
187
|
+
`||C===`\r
|
|
188
|
+
`)&&$.selection.isEmpty()){var L=$.getCursorPosition();if(L.column===0)return;for(var D=_.doc.getLine(L.row),I=_.doc.getLine(L.row+1),M=_.getTokens(L.row),W=0,z=0;z<M.length;z++){W+=M[z].value.length;var O=M[z];if(W>=L.column){if(W===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var T=M[z+1];if(!T||!/\.doc/.test(T.type))return}}var A=L.column-(W-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(D);if(/\s*\*/.test(I))return/^\s*\*/.test(D)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(D.substring(0,L.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},g.isSaneInsertion=function(b,x){var E=b.getCursorPosition(),$=new w(x,E.row,E.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(b.session.getLine(E.row)[E.column]))return!0;var _=new w(x,E.row,E.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==E.row||this.$matchTokenType($.getCurrentToken()||"text",a)},g.$matchTokenType=function(b,x){return x.indexOf(b.type||b)>-1},g.recordAutoInsert=function(b,x,E){var $=b.getCursorPosition(),_=x.doc.getLine($.row);this.isAutoInsertedClosing($,_,s.autoInsertedLineEnd[0])||(s.autoInsertedBrackets=0),s.autoInsertedRow=$.row,s.autoInsertedLineEnd=E+_.substr($.column),s.autoInsertedBrackets++},g.recordMaybeInsert=function(b,x,E){var $=b.getCursorPosition(),_=x.doc.getLine($.row);this.isMaybeInsertedClosing($,_)||(s.maybeInsertedBrackets=0),s.maybeInsertedRow=$.row,s.maybeInsertedLineStart=_.substr(0,$.column)+E,s.maybeInsertedLineEnd=_.substr($.column),s.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(b,x,E){return s.autoInsertedBrackets>0&&b.row===s.autoInsertedRow&&E===s.autoInsertedLineEnd[0]&&x.substr(b.column)===s.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(b,x){return s.maybeInsertedBrackets>0&&b.row===s.maybeInsertedRow&&x.substr(b.column)===s.maybeInsertedLineEnd&&x.substr(0,b.column)==s.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){s.autoInsertedLineEnd=s.autoInsertedLineEnd.substr(1),s.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){s&&(s.maybeInsertedBrackets=0,s.maybeInsertedRow=-1)},d.inherits(g,p),r.CstyleBehaviour=g}),ace.define("ace/unicode",["require","exports","module"],function(e,r,m){for(var d=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],p=0,w=[],u=0;u<d.length;u+=2)w.push(p+=d[u]),d[u+1]&&w.push(45,p+=d[u+1]);r.wordChars=String.fromCharCode.apply(null,w)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,r,m){var d=e("../config"),p=e("../tokenizer").Tokenizer,w=e("./text_highlight_rules").TextHighlightRules,u=e("./behaviour/cstyle").CstyleBehaviour,f=e("../unicode"),a=e("../lib/lang"),s=e("../token_iterator").TokenIterator,c=e("../range").Range,h;h=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new u,this.tokenRe=new RegExp("^["+f.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,g,b){var x=l.doc,E=!0,$=!0,_=1/0,C=l.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var D=this.lineCommentStart.map(a.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var D=a.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;D=new RegExp("^(\\s*)(?:"+D+") ?"),L=l.getUseSoftTabs();var M=function(G,J){var Q=G.match(D);if(Q){var le=Q[1].length,re=Q[0].length;!T(G,le,re)&&Q[0][re-1]==" "&&re--,x.removeInLine(J,le,re)}},W=I+" ",z=function(G,J){(!E||/\S/.test(G))&&(T(G,_,_)?x.insertInLine({row:J,column:_},W):x.insertInLine({row:J,column:_},I))},O=function(G,J){return D.test(G)},T=function(G,J,Q){for(var le=0;J--&&G.charAt(J)==" ";)le++;if(le%C!=0)return!1;for(var le=0;G.charAt(Q++)==" ";)le++;return C>2?le%C!=C-1:le%C==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,A=this.blockComment.end,D=new RegExp("^(\\s*)(?:"+a.escapeRegExp(I)+")"),N=new RegExp("(?:"+a.escapeRegExp(A)+")\\s*$"),z=function(ce,de){O(ce,de)||(!E||/\S/.test(ce))&&(x.insertInLine({row:de,column:ce.length},A),x.insertInLine({row:de,column:_},I))},M=function(ce,de){var ie;(ie=ce.match(N))&&x.removeInLine(de,ce.length-ie[0].length,ce.length),(ie=ce.match(D))&&x.removeInLine(de,ie[1].length,ie[0].length)},O=function(ce,de){if(D.test(ce))return!0;for(var ie=l.getTokens(de),fe=0;fe<ie.length;fe++)if(ie[fe].type==="comment")return!0}}function B(G){for(var J=g;J<=b;J++)G(x.getLine(J),J)}var U=1/0;B(function(G,J){var Q=G.search(/\S/);Q!==-1?(Q<_&&(_=Q),$&&!O(G,J)&&($=!1)):U>G.length&&(U=G.length)}),_==1/0&&(_=U,E=!1,$=!1),L&&_%C!=0&&(_=Math.floor(_/C)*C),B($?M:z)},this.toggleBlockComment=function(o,l,g,b){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var E=new s(l,b.row,b.column),$=E.getCurrentToken();l.selection;var _=l.selection.toOrientedRange(),C,L;if($&&/comment/.test($.type)){for(var D,I;$&&/comment/.test($.type);){var M=$.value.indexOf(x.start);if(M!=-1){var W=E.getCurrentTokenRow(),z=E.getCurrentTokenColumn()+M;D=new c(W,z,W,z+x.start.length);break}$=E.stepBackward()}for(var E=new s(l,b.row,b.column),$=E.getCurrentToken();$&&/comment/.test($.type);){var M=$.value.indexOf(x.end);if(M!=-1){var W=E.getCurrentTokenRow(),z=E.getCurrentTokenColumn()+M;I=new c(W,z,W,z+x.end.length);break}$=E.stepForward()}I&&l.remove(I),D&&(l.remove(D),C=D.start.row,L=-x.start.length)}else L=x.start.length,C=g.start.row,l.insert(g.end,x.end),l.insert(g.start,x.start);_.start.row==C&&(_.start.column+=L),_.end.row==C&&(_.end.column+=L),l.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,l,g){return this.$getIndent(l)},this.checkOutdent=function(o,l,g){return!1},this.autoOutdent=function(o,l,g){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var l in o)if(o[l]){var g=o[l],b=g.prototype.$id,x=d.$modes[b];x||(d.$modes[b]=x=new g),d.$modes[l]||(d.$modes[l]=x),this.$embeds.push(l),this.$modes[l]=x}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(L){(function(D){var I=E[L],M=D[I];D[E[L]]=function(){return this.$delegator(I,arguments,M)}})(_)},_=this,l=0;l<E.length;l++)$(l)},this.$delegator=function(o,l,g){var b=l[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var x=b[2][b[2].length-1],E=this.$modes[x];if(E)return E[o].apply(E,[b[1]].concat([].slice.call(l,1)))}b=b[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var _=b.split(this.$embeds[$]);if(!_[0]&&_[1]){l[0]=_[1];var E=this.$modes[this.$embeds[$]];return E[o].apply(E,l)}}var C=g.apply(this,l);return g?C:void 0},this.transformAction=function(o,l,g,b,x){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var $ in E)if(E[$][l]){var _=E[$][l].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,g=[];for(var b in l)for(var x=l[b],E=0,$=x.length;E<$;E++)if(typeof x[E].token=="string")/keyword|support|storage/.test(x[E].token)&&g.push(x[E].regex);else if(typeof x[E].token=="object"){for(var _=0,C=x[E].token.length;_<C;_++)if(/keyword|support|storage/.test(x[E].token[_])){var b=x[E].regex.match(/\(.+?\)/g)[_];g.push(b.substr(1,b.length-2))}}this.completionKeywords=g}return o?g.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,l,g,b){var x=this.$keywordList||this.$createKeywordList();return x.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),r.Mode=h}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("./lib/dom"),p=(function(){function w(u){this.session=u,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return w.prototype.getRowLength=function(u){var f;return this.lineWidgets?f=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[u]?1+f:this.$wrapData[u].length+1+f},w.prototype.$getWidgetScreenLength=function(){var u=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(u+=f.rowCount)}),u},w.prototype.$onChangeEditor=function(u){this.attach(u.editor)},w.prototype.attach=function(u){u&&u.widgetManager&&u.widgetManager!=this&&u.widgetManager.detach(),this.editor!=u&&(this.detach(),this.editor=u,u&&(u.widgetManager=this,u.renderer.on("beforeRender",this.measureWidgets),u.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(u){var f=this.editor;if(f){this.editor=null,f.widgetManager=null,f.renderer.off("beforeRender",this.measureWidgets),f.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(s){s&&s.el&&s.el.parentNode&&(s._inDocument=!1,s.el.parentNode.removeChild(s.el))})}},w.prototype.updateOnFold=function(u,f){var a=f.lineWidgets;if(!(!a||!u.action)){for(var s=u.data,c=s.start.row,h=s.end.row,o=u.action=="add",l=c+1;l<h;l++)a[l]&&(a[l].hidden=o);a[h]&&(o?a[c]?a[h].hidden=o:a[c]=a[h]:(a[c]==a[h]&&(a[c]=void 0),a[h].hidden=o))}},w.prototype.updateOnChange=function(u){var f=this.session.lineWidgets;if(f){var a=u.start.row,s=u.end.row-a;if(s!==0)if(u.action=="remove"){var c=f.splice(a+1,s);!f[a]&&c[c.length-1]&&(f[a]=c.pop()),c.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var h=new Array(s);f[a]&&f[a].column!=null&&u.start.column>f[a].column&&a++,h.unshift(a,0),f.splice.apply(f,h),this.$updateRows()}}},w.prototype.$updateRows=function(){var u=this.session.lineWidgets;if(u){var f=!0;u.forEach(function(a,s){if(a)for(f=!1,a.row=s;a.$oldWidget;)a.$oldWidget.row=s,a=a.$oldWidget}),f&&(this.session.lineWidgets=null)}},w.prototype.$registerLineWidget=function(u){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[u.row];return f&&(u.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[u.row]=u,u},w.prototype.addLineWidget=function(u){if(this.$registerLineWidget(u),u.session=this.session,!this.editor)return u;var f=this.editor.renderer;u.html&&!u.el&&(u.el=d.createElement("div"),u.el.innerHTML=u.html),u.text&&!u.el&&(u.el=d.createElement("div"),u.el.textContent=u.text),u.el&&(d.addCssClass(u.el,"ace_lineWidgetContainer"),u.className&&d.addCssClass(u.el,u.className),u.el.style.position="absolute",u.el.style.zIndex="5",f.container.appendChild(u.el),u._inDocument=!0,u.coverGutter||(u.el.style.zIndex="3"),u.pixelHeight==null&&(u.pixelHeight=u.el.offsetHeight)),u.rowCount==null&&(u.rowCount=u.pixelHeight/f.layerConfig.lineHeight);var a=this.session.getFoldAt(u.row,0);if(u.$fold=a,a){var s=this.session.lineWidgets;u.row==a.end.row&&!s[a.start.row]?s[a.start.row]=u:u.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(u),u},w.prototype.removeLineWidget=function(u){if(u._inDocument=!1,u.session=null,u.el&&u.el.parentNode&&u.el.parentNode.removeChild(u.el),u.editor&&u.editor.destroy)try{u.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[u.row];if(f==u)this.session.lineWidgets[u.row]=u.$oldWidget,u.$oldWidget&&this.onWidgetChanged(u.$oldWidget);else for(;f;){if(f.$oldWidget==u){f.$oldWidget=u.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(u){for(var f=this.session.lineWidgets,a=f&&f[u],s=[];a;)s.push(a),a=a.$oldWidget;return s},w.prototype.onWidgetChanged=function(u){this.session._changedWidgets.push(u),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(u,f){var a=this.session._changedWidgets,s=f.layerConfig;if(!(!a||!a.length)){for(var c=1/0,h=0;h<a.length;h++){var o=a[h];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,f.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/s.characterWidth));var l=o.h/s.lineHeight;o.coverLine&&(l-=this.session.getRowLineCount(o.row),l<0&&(l=0)),o.rowCount!=l&&(o.rowCount=l,o.row<c&&(c=o.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(u,f){var a=f.layerConfig,s=this.session.lineWidgets;if(s){for(var c=Math.min(this.firstRow,a.firstRow),h=Math.max(this.lastRow,a.lastRow,s.length);c>0&&!s[c];)c--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,f.$cursorLayer.config=a;for(var o=c;o<=h;o++){var l=s[o];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,f.container.appendChild(l.el));var g=f.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;l.coverLine||(g+=a.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=g-a.offset+"px";var b=l.coverGutter?0:f.gutterWidth;l.fixedWidth||(b-=f.scrollLeft),l.el.style.left=b+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=a.width+2*a.padding+"px"),l.fixedWidth?l.el.style.right=f.scrollBar.getWidth()+"px":l.el.style.right=""}}}},w})();r.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,m){r.applyDelta=function(d,p,w){var u=p.start.row,f=p.start.column,a=d[u]||"";switch(p.action){case"insert":var s=p.lines;if(s.length===1)d[u]=a.substring(0,f)+p.lines[0]+a.substring(f);else{var c=[u,1].concat(p.lines);d.splice.apply(d,c),d[u]=a.substring(0,f)+d[u],d[u+p.lines.length-1]+=a.substring(f)}break;case"remove":var h=p.end.column,o=p.end.row;u===o?d[u]=a.substring(0,f)+a.substring(h):d.splice(u,o-u+1,a.substring(0,f)+d[o].substring(h));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var d=e("./lib/oop"),p=e("./lib/event_emitter").EventEmitter,w=(function(){function a(s,c,h){this.$onChange=this.onChange.bind(this),this.attach(s),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,h)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(s){if(!(s.start.row==s.end.row&&s.start.row!=this.row)&&!(s.start.row>this.row)){var c=f(s,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},a.prototype.setPosition=function(s,c,h){var o;if(h?o={row:s,column:c}:o=this.$clipPositionToDocument(s,c),!(this.row==o.row&&this.column==o.column)){var l={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:l,value:o})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(s){this.document=s||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(s,c){var h={};return s>=this.document.getLength()?(h.row=Math.max(0,this.document.getLength()-1),h.column=this.document.getLine(h.row).length):s<0?(h.row=0,h.column=0):(h.row=s,h.column=Math.min(this.document.getLine(h.row).length,Math.max(0,c))),c<0&&(h.column=0),h},a})();w.prototype.$insertRight=!1,d.implement(w.prototype,p);function u(a,s,c){var h=c?a.column<=s.column:a.column<s.column;return a.row<s.row||a.row==s.row&&h}function f(a,s,c){var h=a.action=="insert",o=(h?1:-1)*(a.end.row-a.start.row),l=(h?1:-1)*(a.end.column-a.start.column),g=a.start,b=h?g:a.end;return u(s,g,c)?{row:s.row,column:s.column}:u(b,s,!c)?{row:s.row+o,column:s.column+(s.row==b.row?l:0)}:{row:g.row,column:g.column}}r.Anchor=w}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,m){var d=e("./lib/oop"),p=e("./apply_delta").applyDelta,w=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,f=e("./anchor").Anchor,a=(function(){function s(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return s.prototype.setValue=function(c){var h=this.getLength()-1;this.remove(new u(0,0,h,this.getLine(h).length)),this.insert({row:0,column:0},c||"")},s.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},s.prototype.createAnchor=function(c,h){return new f(this,c,h)},s.prototype.$detectNewLine=function(c){var h=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=h?h[1]:`
|
|
189
|
+
`,this._signal("changeNewLineMode")},s.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
190
|
+
`;case"unix":return`
|
|
191
|
+
`;default:return this.$autoNewLine||`
|
|
192
|
+
`}},s.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},s.prototype.getNewLineMode=function(){return this.$newLineMode},s.prototype.isNewLine=function(c){return c==`\r
|
|
193
|
+
`||c=="\r"||c==`
|
|
194
|
+
`},s.prototype.getLine=function(c){return this.$lines[c]||""},s.prototype.getLines=function(c,h){return this.$lines.slice(c,h+1)},s.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},s.prototype.getLength=function(){return this.$lines.length},s.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},s.prototype.getLinesForRange=function(c){var h;if(c.start.row===c.end.row)h=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{h=this.getLines(c.start.row,c.end.row),h[0]=(h[0]||"").substring(c.start.column);var o=h.length-1;c.end.row-c.start.row==o&&(h[o]=h[o].substring(0,c.end.column))}return h},s.prototype.insertLines=function(c,h){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,h)},s.prototype.removeLines=function(c,h){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,h)},s.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},s.prototype.insert=function(c,h){return this.getLength()<=1&&this.$detectNewLine(h),this.insertMergedLines(c,this.$split(h))},s.prototype.insertInLine=function(c,h){var o=this.clippedPos(c.row,c.column),l=this.pos(c.row,c.column+h.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[h]},!0),this.clonePos(l)},s.prototype.clippedPos=function(c,h){var o=this.getLength();c===void 0?c=o:c<0?c=0:c>=o&&(c=o-1,h=void 0);var l=this.getLine(c);return h==null&&(h=l.length),h=Math.min(Math.max(h,0),l.length),{row:c,column:h}},s.prototype.clonePos=function(c){return{row:c.row,column:c.column}},s.prototype.pos=function(c,h){return{row:c,column:h}},s.prototype.$clipPosition=function(c){var h=this.getLength();return c.row>=h?(c.row=Math.max(0,h-1),c.column=this.getLine(h-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},s.prototype.insertFullLines=function(c,h){c=Math.min(Math.max(c,0),this.getLength());var o=0;c<this.getLength()?(h=h.concat([""]),o=0):(h=[""].concat(h),c--,o=this.$lines[c].length),this.insertMergedLines({row:c,column:o},h)},s.prototype.insertMergedLines=function(c,h){var o=this.clippedPos(c.row,c.column),l={row:o.row+h.length-1,column:(h.length==1?o.column:0)+h[h.length-1].length};return this.applyDelta({start:o,end:l,action:"insert",lines:h}),this.clonePos(l)},s.prototype.remove=function(c){var h=this.clippedPos(c.start.row,c.start.column),o=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:h,end:o,action:"remove",lines:this.getLinesForRange({start:h,end:o})}),this.clonePos(h)},s.prototype.removeInLine=function(c,h,o){var l=this.clippedPos(c,h),g=this.clippedPos(c,o);return this.applyDelta({start:l,end:g,action:"remove",lines:this.getLinesForRange({start:l,end:g})},!0),this.clonePos(l)},s.prototype.removeFullLines=function(c,h){c=Math.min(Math.max(0,c),this.getLength()-1),h=Math.min(Math.max(0,h),this.getLength()-1);var o=h==this.getLength()-1&&c>0,l=h<this.getLength()-1,g=o?c-1:c,b=o?this.getLine(g).length:0,x=l?h+1:h,E=l?0:this.getLine(x).length,$=new u(g,b,x,E),_=this.$lines.slice(c,h+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),_},s.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},s.prototype.replace=function(c,h){if(c instanceof u||(c=u.fromPoints(c.start,c.end)),h.length===0&&c.isEmpty())return c.start;if(h==this.getTextRange(c))return c.end;this.remove(c);var o;return h?o=this.insert(c.start,h):o=c.start,o},s.prototype.applyDeltas=function(c){for(var h=0;h<c.length;h++)this.applyDelta(c[h])},s.prototype.revertDeltas=function(c){for(var h=c.length-1;h>=0;h--)this.revertDelta(c[h])},s.prototype.applyDelta=function(c,h){var o=c.action=="insert";(o?c.lines.length<=1&&!c.lines[0]:!u.comparePoints(c.start,c.end))||(o&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(p(this.$lines,c,h),this._signal("change",c)))},s.prototype.$safeApplyDelta=function(c){var h=this.$lines.length;(c.action=="remove"&&c.start.row<h&&c.end.row<h||c.action=="insert"&&c.start.row<=h)&&this.applyDelta(c)},s.prototype.$splitAndapplyLargeDelta=function(c,h){for(var o=c.lines,l=o.length-h+1,g=c.start.row,b=c.start.column,x=0,E=0;x<l;x=E){E+=h-1;var $=o.slice(x,E);$.push(""),this.applyDelta({start:this.pos(g+x,b),end:this.pos(g+E,b=0),action:c.action,lines:$},!0)}c.lines=o.slice(x),c.start.row=g+x,c.start.column=b,this.applyDelta(c,!0)},s.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},s.prototype.indexToPosition=function(c,h){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,g=h||0,b=o.length;g<b;g++)if(c-=o[g].length+l,c<0)return{row:g,column:c+o[g].length+l};return{row:b-1,column:c+o[b-1].length+l}},s.prototype.positionToIndex=function(c,h){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,g=0,b=Math.min(c.row,o.length),x=h||0;x<b;++x)g+=o[x].length+l;return g+c.column},s.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},s})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",d.implement(a.prototype,w),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var d=e("./lib/oop"),p=e("./lib/event_emitter").EventEmitter,w=(function(){function u(f,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var s=this;this.$worker=function(){if(s.running){for(var c=new Date,h=s.currentLine,o=-1,l=s.doc,g=h;s.lines[h];)h++;var b=l.getLength(),x=0;for(s.running=!1;h<b;){s.$tokenizeRow(h),o=h;do h++;while(s.lines[h]);if(x++,x%5===0&&new Date-c>20){s.running=setTimeout(s.$worker,20);break}}s.currentLine=h,o==-1&&(o=h),g<=o&&s.fireUpdateEvent(g,o)}}}return u.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},u.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},u.prototype.fireUpdateEvent=function(f,a){var s={first:f,last:a};this._signal("update",{data:s})},u.prototype.start=function(f){this.currentLine=Math.min(f||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},u.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},u.prototype.$updateOnChange=function(f){var a=f.start.row,s=f.end.row-a;if(s===0)this.lines[a]=null;else if(f.action=="remove")this.lines.splice(a,s+1,null),this.states.splice(a,s+1,null);else{var c=Array(s+1);c.unshift(a,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},u.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},u.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},u.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},u.prototype.$tokenizeRow=function(f){var a=this.doc.getLine(f),s=this.states[f-1],c=this.tokenizer.getLineTokens(a,s,f);return this.states[f]+""!=c.state+""?(this.states[f]=c.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=c.tokens},u.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},u})();d.implement(w.prototype,p),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,m){var d=e("./lib/lang"),p=e("./range").Range,w=(function(){function u(f,a,s){s===void 0&&(s="text"),this.setRegexp(f),this.clazz=a,this.type=s,this.docLen=0}return u.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},u.prototype.update=function(f,a,s,c){if(this.regExp){for(var h=c.firstRow,o=c.lastRow,l={},g=s.$editor&&s.$editor.$search,b=g&&g.$isMultilineSearch(s.$editor.getLastSearchOptions()),x=h;x<=o;x++){var E=this.cache[x];if(E==null||s.getValue().length!=this.docLen){if(b){E=[];var $=g.$multiLineForward(s,this.regExp,x,o);if($){var _=$.endRow<=o?$.endRow-1:o;_>x&&(x=_),E.push(new p($.startRow,$.startCol,$.endRow,$.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=d.getMatchOffsets(s.getLine(x),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(I){return new p(x,I.offset,x,I.offset+I.length)});this.cache[x]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var L=E[C].toScreenRange(s),D=L.toString();l[D]||(l[D]=!0,a.drawSingleLineMarker(f,L,this.clazz,c))}}this.docLen=s.getValue().length}},u})();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,m){var d=(function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,L,D){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var I=this.$undoStack.length;I>this.$undoDepth-1&&this.$undoStack.splice(0,I-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},_.prototype.addSelection=function(C,L){this.selections.push({value:C,rev:L||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,L){L==null&&(L=this.$rev+1);for(var D=this.$undoStack,I=D.length;I--;){var M=D[I][0];if(M.id<=C)break;M.id<L&&(M.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,L){for(var D=this.selections,I=D.length;I--;){var M=D[I];if(M.rev<C)return L&&(M=D[I+1]),M}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var D=this.$undoStack,I=null,M=0,W=D.length;W--;){var z=D[W][0];if(z.id<L&&!I&&(I=W+1),z.id<=C){M=W+1;break}}return D.slice(M,I)},_.prototype.getChangedRanges=function(C,L){L==null&&(L=this.$rev+1)},_.prototype.getChangedLines=function(C,L){L==null&&(L=this.$rev+1)},_.prototype.undo=function(C,L){this.lastDeltas=null;var D=this.$undoStack;if(p(D,D.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var I=D.pop(),M=null;return I&&(M=C.undoChanges(I,L),this.$redoStack.push(I),this.$syncRev()),this.$fromUndo=!1,M}},_.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(W){W[0].id=++this.$maxRev},this)}var I=this.$redoStack.pop(),M=null;return I&&(M=C.redoChanges(I,L),this.$undoStack.push(I),this.$syncRev()),this.$fromUndo=!1,M},_.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],D=L&&L[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},_.prototype.$prettyPrint=function(C){return C?s(C):s(this.$undoStack)+`
|
|
195
|
+
---
|
|
196
|
+
`+s(this.$redoStack)},_})();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function p(_,C){for(var L=C;L--;){var D=_[L];if(D&&!D[0].ignore){for(;L<C-1;){var I=o(_[L],_[L+1]);_[L]=I[0],_[L+1]=I[1],L++}return!0}}}var w=e("./range").Range,u=w.comparePoints;w.comparePoints;function f(_){return{row:_.row,column:_.column}}function a(_){return{start:f(_.start),end:f(_.end),action:_.action,lines:_.lines.slice()}}function s(_){if(_=_||this,Array.isArray(_))return _.map(s).join(`
|
|
197
|
+
`);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(c).join(`
|
|
198
|
+
`):C=c(_.value)),_.start&&(C+=c(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function c(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function h(_,C){var L=_.action=="insert",D=C.action=="insert";if(L&&D)if(u(C.start,_.end)>=0)g(C,_,-1);else if(u(C.start,_.start)<=0)g(_,C,1);else return null;else if(L&&!D)if(u(C.start,_.end)>=0)g(C,_,-1);else if(u(C.end,_.start)<=0)g(_,C,-1);else return null;else if(!L&&D)if(u(C.start,_.start)>=0)g(C,_,1);else if(u(C.start,_.start)<=0)g(_,C,1);else return null;else if(!L&&!D)if(u(C.start,_.start)>=0)g(C,_,1);else if(u(C.end,_.start)<=0)g(_,C,-1);else return null;return[C,_]}function o(_,C){for(var L=_.length;L--;)for(var D=0;D<C.length;D++)if(!h(_[L],C[D])){for(;L<_.length;){for(;D--;)h(C[D],_[L]);D=C.length,L++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function l(_,C){var L=_.action=="insert",D=C.action=="insert";if(L&&D)u(_.start,C.start)<0?g(C,_,1):g(_,C,1);else if(L&&!D)u(_.start,C.end)>=0?g(_,C,-1):(u(_.start,C.start)<=0||g(_,w.fromPoints(C.start,_.start),-1),g(C,_,1));else if(!L&&D)u(C.start,_.end)>=0?g(C,_,-1):(u(C.start,_.start)<=0||g(C,w.fromPoints(_.start,C.start),-1),g(_,C,1));else if(!L&&!D)if(u(C.start,_.end)>=0)g(C,_,-1);else if(u(C.end,_.start)<=0)g(_,C,-1);else{var I,M;return u(_.start,C.start)<0&&(I=_,_=x(_,C.start)),u(_.end,C.end)>0&&(M=x(_,C.end)),b(C.end,_.start,_.end,-1),M&&!I&&(_.lines=M.lines,_.start=M.start,_.end=M.end,M=_),[C,I,M].filter(Boolean)}return[C,_]}function g(_,C,L){b(_.start,C.start,C.end,L),b(_.end,C.start,C.end,L)}function b(_,C,L,D){_.row==(D==1?C:L).row&&(_.column+=D*(L.column-C.column)),_.row+=D*(L.row-C.row)}function x(_,C){var L=_.lines,D=_.end;_.end=f(C);var I=_.end.row-_.start.row,M=L.splice(I,L.length),W=I?C.column:C.column-_.start.column;L.push(M[0].substring(0,W)),M[0]=M[0].substr(W);var z={start:f(C),end:D,lines:M,action:_.action};return z}function E(_,C){C=a(C);for(var L=_.length;L--;){for(var D=_[L],I=0;I<D.length;I++){var M=D[I],W=l(M,C);C=W[0],W.length!=2&&(W[2]?(D.splice(I+1,1,W[1],W[2]),I++):W[1]||(D.splice(I,1),I--))}D.length||_.splice(L,1)}return _}function $(_,C){for(var L=0;L<C.length;L++)for(var D=C[L],I=0;I<D.length;I++)E(_,D[I])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,p=(function(){function w(u,f){this.foldData=u,Array.isArray(f)?this.folds=f:f=this.folds=[f];var a=f[f.length-1];this.range=new d(f[0].start.row,f[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(s){s.setFoldLine(this)},this)}return w.prototype.shiftRow=function(u){this.start.row+=u,this.end.row+=u,this.folds.forEach(function(f){f.start.row+=u,f.end.row+=u})},w.prototype.addFold=function(u){if(u.sameRow){if(u.start.row<this.startRow||u.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(u),this.folds.sort(function(f,a){return-f.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(u.start.row,u.start.column)>0?(this.end.row=u.end.row,this.end.column=u.end.column):this.range.compareStart(u.end.row,u.end.column)<0&&(this.start.row=u.start.row,this.start.column=u.start.column)}else if(u.start.row==this.end.row)this.folds.push(u),this.end.row=u.end.row,this.end.column=u.end.column;else if(u.end.row==this.start.row)this.folds.unshift(u),this.start.row=u.start.row,this.start.column=u.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");u.foldLine=this},w.prototype.containsRow=function(u){return u>=this.start.row&&u<=this.end.row},w.prototype.walk=function(u,f,a){var s=0,c=this.folds,h,o,l,g=!0;f==null&&(f=this.end.row,a=this.end.column);for(var b=0;b<c.length;b++){if(h=c[b],o=h.range.compareStart(f,a),o==-1){u(null,f,a,s,g);return}if(l=u(null,h.start.row,h.start.column,s,g),l=!l&&u(h.placeholder,h.start.row,h.start.column,s),l||o===0)return;g=!h.sameRow,s=h.end.column}u(null,f,a,s,g)},w.prototype.getNextFoldTo=function(u,f){for(var a,s,c=0;c<this.folds.length;c++){if(a=this.folds[c],s=a.range.compareEnd(u,f),s==-1)return{fold:a,kind:"after"};if(s===0)return{fold:a,kind:"inside"}}return null},w.prototype.addRemoveChars=function(u,f,a){var s=this.getNextFoldTo(u,f),c,h;if(s){if(c=s.fold,s.kind=="inside"&&c.start.column!=f&&c.start.row!=u)window.console&&window.console.log(u,f,c);else if(c.start.row==u){h=this.folds;var o=h.indexOf(c);for(o===0&&(this.start.column+=a),o;o<h.length;o++){if(c=h[o],c.start.column+=a,!c.sameRow)return;c.end.column+=a}this.end.column+=a}}},w.prototype.split=function(u,f){var a=this.getNextFoldTo(u,f);if(!a||a.kind=="inside")return null;var s=a.fold,c=this.folds,h=this.foldData,o=c.indexOf(s),l=c[o-1];this.end.row=l.end.row,this.end.column=l.end.column,c=c.splice(o,c.length-o);var g=new w(h,c);return h.splice(h.indexOf(this)+1,0,g),g},w.prototype.merge=function(u){for(var f=u.folds,a=0;a<f.length;a++)this.addFold(f[a]);var s=this.foldData;s.splice(s.indexOf(u),1)},w.prototype.toString=function(){var u=[this.range.toString()+": ["];return this.folds.forEach(function(f){u.push(" "+f.toString())}),u.push("]"),u.join(`
|
|
199
|
+
`)},w.prototype.idxToPosition=function(u){for(var f=0,a=0;a<this.folds.length;a++){var s=this.folds[a];if(u-=s.start.column-f,u<0)return{row:s.start.row,column:s.start.column+u};if(u-=s.placeholder.length,u<0)return s.start;f=s.end.column}return{row:this.end.row,column:this.end.column+u}},w})();r.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,m){var d=e("./range").Range,p=d.comparePoints,w=(function(){function u(){this.ranges=[],this.$bias=1}return u.prototype.pointIndex=function(f,a,s){for(var c=this.ranges,h=s||0;h<c.length;h++){var o=c[h],l=p(f,o.end);if(!(l>0)){var g=p(f,o.start);return l===0?a&&g!==0?-h-2:h:g>0||g===0&&!a?h:-h-1}}return-h-1},u.prototype.add=function(f){var a=!f.isEmpty(),s=this.pointIndex(f.start,a);s<0&&(s=-s-1);var c=this.pointIndex(f.end,a,s);return c<0?c=-c-1:c++,this.ranges.splice(s,c-s,f)},u.prototype.addList=function(f){for(var a=[],s=f.length;s--;)a.push.apply(a,this.add(f[s]));return a},u.prototype.substractPoint=function(f){var a=this.pointIndex(f);if(a>=0)return this.ranges.splice(a,1)},u.prototype.merge=function(){var f=[],a=this.ranges;a=a.sort(function(l,g){return p(l.start,g.start)});for(var s=a[0],c,h=1;h<a.length;h++){c=s,s=a[h];var o=p(c.end,s.start);o<0||o==0&&!c.isEmpty()&&!s.isEmpty()||(p(c.end,s.end)<0&&(c.end.row=s.end.row,c.end.column=s.end.column),a.splice(h,1),f.push(s),s=c,h--)}return this.ranges=a,f},u.prototype.contains=function(f,a){return this.pointIndex({row:f,column:a})>=0},u.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},u.prototype.rangeAtPoint=function(f){var a=this.pointIndex(f);if(a>=0)return this.ranges[a]},u.prototype.clipRows=function(f,a){var s=this.ranges;if(s[0].start.row>a||s[s.length-1].start.row<f)return[];var c=this.pointIndex({row:f,column:0});c<0&&(c=-c-1);var h=this.pointIndex({row:a,column:0},c);h<0&&(h=-h-1);for(var o=[],l=c;l<h;l++)o.push(s[l]);return o},u.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},u.prototype.attach=function(f){this.session&&this.detach(),this.session=f,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},u.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},u.prototype.$onChange=function(f){for(var a=f.start,s=f.end,c=a.row,h=s.row,o=this.ranges,l=0,g=o.length;l<g;l++){var b=o[l];if(b.end.row>=c)break}if(f.action=="insert")for(var x=h-c,E=-a.column+s.column;l<g;l++){var b=o[l];if(b.start.row>c)break;if(b.start.row==c&&b.start.column>=a.column&&(b.start.column==a.column&&this.$bias<=0||(b.start.column+=E,b.start.row+=x)),b.end.row==c&&b.end.column>=a.column){if(b.end.column==a.column&&this.$bias<0)continue;b.end.column==a.column&&E>0&&l<g-1&&b.end.column>b.start.column&&b.end.column==o[l+1].start.column&&(b.end.column-=E),b.end.column+=E,b.end.row+=x}}else for(var x=c-h,E=a.column-s.column;l<g;l++){var b=o[l];if(b.start.row>h)break;b.end.row<h&&(c<b.end.row||c==b.end.row&&a.column<b.end.column)?(b.end.row=c,b.end.column=a.column):b.end.row==h?b.end.column<=s.column?(x||b.end.column>a.column)&&(b.end.column=a.column,b.end.row=a.row):(b.end.column+=E,b.end.row+=x):b.end.row>h&&(b.end.row+=x),b.start.row<h&&(c<b.start.row||c==b.start.row&&a.column<b.start.column)?(b.start.row=c,b.start.column=a.column):b.start.row==h?b.start.column<=s.column?(x||b.start.column>a.column)&&(b.start.column=a.column,b.start.row=a.row):(b.start.column+=E,b.start.row+=x):b.start.row>h&&(b.start.row+=x)}if(x!=0&&l<g)for(;l<g;l++){var b=o[l];b.start.row+=x,b.end.row+=x}},u})();w.prototype.comparePoints=p,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,m){var d=this&&this.__extends||(function(){var c=function(h,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,g){l.__proto__=g}||function(l,g){for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(l[b]=g[b])},c(h,o)};return function(h,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(h,o);function l(){this.constructor=h}h.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),p=e("../range_list").RangeList,w=(function(c){d(h,c);function h(o,l){var g=c.call(this)||this;return g.foldLine=null,g.placeholder=l,g.range=o,g.start=o.start,g.end=o.end,g.sameRow=o.start.row==o.end.row,g.subFolds=g.ranges=[],g}return h.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},h.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(l){l.setFoldLine(o)})},h.prototype.clone=function(){var o=this.range.clone(),l=new h(o,this.placeholder);return this.subFolds.forEach(function(g){l.subFolds.push(g.clone())}),l.collapseChildren=this.collapseChildren,l},h.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){f(o,this.start);for(var l=o.start.row,g=o.start.column,b=0,x=-1;b<this.subFolds.length&&(x=this.subFolds[b].range.compare(l,g),x==1);b++);var E=this.subFolds[b],$=0;if(x==0){if(E.range.containsRange(o))return E.addSubFold(o);$=1}for(var l=o.range.end.row,g=o.range.end.column,_=b,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(l,g),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(b,_-b,o),L=x==0?C.length-1:C.length,D=$;D<L;D++)o.addSubFold(C[D]);return o.setFoldLine(this.foldLine),o}},h.prototype.restoreRange=function(o){return s(o,this.start)},h})(p);function u(c,h){c.row-=h.row,c.row==0&&(c.column-=h.column)}function f(c,h){u(c.start,h),u(c.end,h)}function a(c,h){c.row==0&&(c.column+=h.column),c.row+=h.row}function s(c,h){a(c.start,h),a(c.end,h)}r.Fold=w}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,r,m){var d=e("../range").Range,p=e("./fold_line").FoldLine,w=e("./fold").Fold,u=e("../token_iterator").TokenIterator,f=e("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(s,c,h){var o=this.getFoldLine(s);if(!o)return null;for(var l=o.folds,g=0;g<l.length;g++){var b=l[g].range;if(b.contains(s,c)){if(h==1&&b.isEnd(s,c)&&!b.isEmpty()||h==-1&&b.isStart(s,c)&&!b.isEmpty())continue;return l[g]}}},this.getFoldsInRange=function(s){var c=s.start,h=s.end,o=this.$foldData,l=[];c.column+=1,h.column-=1;for(var g=0;g<o.length;g++){var b=o[g].range.compareRange(s);if(b!=2){if(b==-2)break;for(var x=o[g].folds,E=0;E<x.length;E++){var $=x[E];if(b=$.range.compareRange(s),b==-2)break;if(b!=2){if(b==42)break;l.push($)}}}}return c.column-=1,h.column+=1,l},this.getFoldsInRangeList=function(s){if(Array.isArray(s)){var c=[];s.forEach(function(o){c=c.concat(this.getFoldsInRange(o))},this)}else var c=this.getFoldsInRange(s);return c},this.getAllFolds=function(){for(var s=[],c=this.$foldData,h=0;h<c.length;h++)for(var o=0;o<c[h].folds.length;o++)s.push(c[h].folds[o]);return s},this.getFoldStringAt=function(s,c,h,o){if(o=o||this.getFoldLine(s),!o)return null;for(var l={end:{column:0}},g,b,x=0;x<o.folds.length;x++){b=o.folds[x];var E=b.range.compareEnd(s,c);if(E==-1){g=this.getLine(b.start.row).substring(l.end.column,b.start.column);break}else if(E===0)return null;l=b}return g||(g=this.getLine(b.start.row).substring(l.end.column)),h==-1?g.substring(0,c-l.end.column):h==1?g.substring(c-l.end.column):g},this.getFoldLine=function(s,c){var h=this.$foldData,o=0;for(c&&(o=h.indexOf(c)),o==-1&&(o=0),o;o<h.length;o++){var l=h[o];if(l.start.row<=s&&l.end.row>=s)return l;if(l.end.row>s)return null}return null},this.getNextFoldLine=function(s,c){var h=this.$foldData,o=0;for(c&&(o=h.indexOf(c)),o==-1&&(o=0),o;o<h.length;o++){var l=h[o];if(l.end.row>=s)return l}return null},this.getFoldedRowCount=function(s,c){for(var h=this.$foldData,o=c-s+1,l=0;l<h.length;l++){var g=h[l],b=g.end.row,x=g.start.row;if(b>=c){x<c&&(x>=s?o-=c-x:o=0);break}else b>=s&&(x>=s?o-=b-x:o-=b-s+1)}return o},this.$addFoldLine=function(s){return this.$foldData.push(s),this.$foldData.sort(function(c,h){return c.start.row-h.start.row}),s},this.addFold=function(s,c){var h=this.$foldData,o=!1,l;s instanceof w?l=s:(l=new w(c,s),l.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(l.range);var g=l.start.row,b=l.start.column,x=l.end.row,E=l.end.column,$=this.getFoldAt(g,b,1),_=this.getFoldAt(x,E,-1);if($&&_==$)return $.addSubFold(l);$&&!$.range.isStart(g,b)&&this.removeFold($),_&&!_.range.isEnd(x,E)&&this.removeFold(_);var C=this.getFoldsInRange(l.range);C.length>0&&(this.removeFolds(C),l.collapseChildren||C.forEach(function(M){l.addSubFold(M)}));for(var L=0;L<h.length;L++){var D=h[L];if(x==D.start.row){D.addFold(l),o=!0;break}else if(g==D.end.row){if(D.addFold(l),o=!0,!l.sameRow){var I=h[L+1];if(I&&I.start.row==x){D.merge(I);break}}break}else if(x<=D.start.row)break}return o||(D=this.$addFoldLine(new p(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(s){s.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(s){var c=s.foldLine,h=c.start.row,o=c.end.row,l=this.$foldData,g=c.folds;if(g.length==1)l.splice(l.indexOf(c),1);else if(c.range.isEnd(s.end.row,s.end.column))g.pop(),c.end.row=g[g.length-1].end.row,c.end.column=g[g.length-1].end.column;else if(c.range.isStart(s.start.row,s.start.column))g.shift(),c.start.row=g[0].start.row,c.start.column=g[0].start.column;else if(s.sameRow)g.splice(g.indexOf(s),1);else{var b=c.split(s.start.row,s.start.column);g=b.folds,g.shift(),b.start.row=g[0].start.row,b.start.column=g[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(h,o):this.$updateRowLengthCache(h,o)),this.$modified=!0,this._signal("changeFold",{data:s,action:"remove"})},this.removeFolds=function(s){for(var c=[],h=0;h<s.length;h++)c.push(s[h]);c.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(s){this.removeFold(s),s.subFolds.forEach(function(c){s.restoreRange(c),this.addFold(c)},this),s.collapseChildren>0&&this.foldAll(s.start.row+1,s.end.row,s.collapseChildren-1),s.subFolds=[]},this.expandFolds=function(s){s.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(s,c){var h,o;if(s==null)h=new d(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof s=="number")h=new d(s,0,s,this.getLine(s).length);else if("row"in s)h=d.fromPoints(s,s);else{if(Array.isArray(s))return o=[],s.forEach(function(g){o=o.concat(this.unfold(g))},this),o;h=s}o=this.getFoldsInRangeList(h);for(var l=o;o.length==1&&d.comparePoints(o[0].start,h.start)<0&&d.comparePoints(o[0].end,h.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(h);if(c!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(s,c){return!!this.getFoldLine(s,c)},this.getRowFoldEnd=function(s,c){var h=this.getFoldLine(s,c);return h?h.end.row:s},this.getRowFoldStart=function(s,c){var h=this.getFoldLine(s,c);return h?h.start.row:s},this.getFoldDisplayLine=function(s,c,h,o,l){o==null&&(o=s.start.row),l==null&&(l=0),c==null&&(c=s.end.row),h==null&&(h=this.getLine(c).length);var g=this.doc,b="";return s.walk(function(x,E,$,_){if(!(E<o)){if(E==o){if($<l)return;_=Math.max(l,_)}x!=null?b+=x:b+=g.getLine(E).substring(_,$)}},c,h),b},this.getDisplayLine=function(s,c,h,o){var l=this.getFoldLine(s);if(l)return this.getFoldDisplayLine(l,s,c,h,o);var g;return g=this.doc.getLine(s),g.substring(o||0,c||g.length)},this.$cloneFoldData=function(){var s=[];return s=this.$foldData.map(function(c){var h=c.folds.map(function(o){return o.clone()});return new p(s,h)}),s},this.toggleFold=function(s){var c=this.selection,h=c.getRange(),o,l;if(h.isEmpty()){var g=h.start;if(o=this.getFoldAt(g.row,g.column),o){this.expandFold(o);return}else if(s){var b=this.getFoldLine(g.row);b&&this.expandFolds(b.folds);return}else(l=this.findMatchingBracket(g))?h.comparePoint(l)==1?h.end=l:(h.start=l,h.start.column++,h.end.column--):(l=this.findMatchingBracket({row:g.row,column:g.column+1}))?(h.comparePoint(l)==1?h.end=l:h.start=l,h.start.column++):h=this.getCommentFoldRange(g.row,g.column)||h}else{var x=this.getFoldsInRange(h);if(s&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(h.start.row,h.start.column)),o&&o.range.toString()==h.toString()){this.expandFold(o);return}var E="...";if(!h.isMultiLine()){if(E=this.getTextRange(h),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,h)},this.getCommentFoldRange=function(s,c,h){var o=new u(this,s,c),l=o.getCurrentToken(),g=l&&l.type;if(l&&/^comment|string/.test(g)){g=g.match(/comment|string/)[0],g=="comment"&&(g+="|doc-start|\\.doc");var b=new RegExp(g),x=new d;if(h!=1){do l=o.stepBackward();while(l&&b.test(l.type));l=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+l.value.length,o=new u(this,s,c);var E=this.getState(o.$row);if(h!=-1){var $=-1;do if(l=o.stepForward(),$==-1){var _=this.getState(o.$row);E.toString()!==_.toString()&&($=o.$row)}else if(o.$row>$)break;while(l&&b.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(s,c,h,o){h==null&&(h=1e5);var l=this.foldWidgets;if(l){c=c||this.getLength(),s=s||0;for(var g=s;g<c;g++)if(l[g]==null&&(l[g]=this.getFoldWidget(g)),l[g]=="start"&&!(o&&!o(g))){var b=this.getFoldWidgetRange(g);b&&b.isMultiLine()&&b.end.row<=c&&b.start.row>=s&&(g=b.end.row,b.collapseChildren=h,this.addFold("...",b))}}},this.foldToLevel=function(s){for(this.foldAll();s-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var s=this;this.foldAll(null,null,null,function(c){for(var h=s.getTokens(c),o=0;o<h.length;o++){var l=h[o];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(s){if(!this.$foldStyles[s])throw new Error("invalid fold style: "+s+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=s){this.$foldStyle=s,s=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(s){if(this.$foldMode!=s){if(this.$foldMode=s,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!s||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=s.getFoldWidget.bind(s,this,this.$foldStyle),this.getFoldWidgetRange=s.getFoldWidgetRange.bind(s,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(s,c){var h=this.foldWidgets;if(!h||c&&h[s])return{};for(var o=s-1,l;o>=0;){var g=h[o];if(g==null&&(g=h[o]=this.getFoldWidget(o)),g=="start"){var b=this.getFoldWidgetRange(o);if(l||(l=b),b&&b.end.row>=s)break}o--}return{range:o!==-1&&b,firstRange:l}},this.onFoldWidgetClick=function(s,c){c instanceof f&&(c=c.domEvent);var h={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},o=this.$toggleFoldWidget(s,h);if(!o){var l=c.target||c.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(s,c){if(this.getFoldWidget){var h=this.getFoldWidget(s),o=this.getLine(s),l=h==="end"?-1:1,g=this.getFoldAt(s,l===-1?0:o.length,l);if(g)return c.children||c.all?this.removeFold(g):this.expandFold(g),g;var b=this.getFoldWidgetRange(s,!0);if(b&&!b.isMultiLine()&&(g=this.getFoldAt(b.start.row,b.start.column,1),g&&b.isEqual(g.range)))return this.removeFold(g),g;if(c.siblings){var x=this.getParentFoldRangeData(s);if(x.range)var E=x.range.start.row+1,$=x.range.end.row;this.foldAll(E,$,c.all?1e4:0)}else c.children?($=b?b.end.row:this.getLength(),this.foldAll(s+1,$,c.all?1e4:0)):b&&(c.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(s){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var h=this.$toggleFoldWidget(c,{});if(!h){var o=this.getParentFoldRangeData(c,!0);if(h=o.range||o.firstRange,h){c=h.start.row;var l=this.getFoldAt(c,this.getLine(c).length,1);l?this.removeFold(l):this.addFold("...",h)}}},this.updateFoldWidgets=function(s){var c=s.start.row,h=s.end.row-c;if(h===0)this.foldWidgets[c]=null;else if(s.action=="remove")this.foldWidgets.splice(c,h+1,null);else{var o=Array(h+1);o.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(s){var c=s.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,m){var d=e("../token_iterator").TokenIterator,p=e("../range").Range;function w(){this.findMatchingBracket=function(u,f){if(u.column==0)return null;var a=f||this.getLine(u.row).charAt(u.column-1);if(a=="")return null;var s=a.match(/([\(\[\{])|([\)\]\}])/);return s?s[1]?this.$findClosingBracket(s[1],u):this.$findOpeningBracket(s[2],u):null},this.getBracketRange=function(u){var f=this.getLine(u.row),a=!0,s,c=f.charAt(u.column-1),h=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(h||(c=f.charAt(u.column),u={row:u.row,column:u.column+1},h=c&&c.match(/([\(\[\{])|([\)\]\}])/),a=!1),!h)return null;if(h[1]){var o=this.$findClosingBracket(h[1],u);if(!o)return null;s=p.fromPoints(u,o),a||(s.end.column++,s.start.column--),s.cursor=s.end}else{var o=this.$findOpeningBracket(h[2],u);if(!o)return null;s=p.fromPoints(o,u),a||(s.start.column++,s.end.column--),s.cursor=s.start}return s},this.getMatchingBracketRanges=function(u,f){var a=this.getLine(u.row),s=/([\(\[\{])|([\)\]\}])/,c=!f&&a.charAt(u.column-1),h=c&&c.match(s);if(h||(c=(f===void 0||f)&&a.charAt(u.column),u={row:u.row,column:u.column+1},h=c&&c.match(s)),!h)return null;var o=new p(u.row,u.column-1,u.row,u.column),l=h[1]?this.$findClosingBracket(h[1],u):this.$findOpeningBracket(h[2],u);if(!l)return[o];var g=new p(l.row,l.column,l.row,l.column+1);return[o,g]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(u,f,a){var s=this.$brackets[u],c=1,h=new d(this,f.row,f.column),o=h.getCurrentToken();if(o||(o=h.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=f.column-h.getCurrentTokenColumn()-2,g=o.value;;){for(;l>=0;){var b=g.charAt(l);if(b==s){if(c-=1,c==0)return{row:h.getCurrentTokenRow(),column:l+h.getCurrentTokenColumn()}}else b==u&&(c+=1);l-=1}do o=h.stepBackward();while(o&&!a.test(o.type));if(o==null)break;g=o.value,l=g.length-1}return null}},this.$findClosingBracket=function(u,f,a){var s=this.$brackets[u],c=1,h=new d(this,f.row,f.column),o=h.getCurrentToken();if(o||(o=h.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=f.column-h.getCurrentTokenColumn();;){for(var g=o.value,b=g.length;l<b;){var x=g.charAt(l);if(x==s){if(c-=1,c==0)return{row:h.getCurrentTokenRow(),column:l+h.getCurrentTokenColumn()}}else x==u&&(c+=1);l+=1}do o=h.stepForward();while(o&&!a.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(u){var f=new d(this,u.row,u.column),a=this.$findTagName(f);if(a){var s=f.stepBackward();return s.value==="<"?this.$findClosingTag(f,a):this.$findOpeningTag(f,a)}},this.$findTagName=function(u){var f=u.getCurrentToken(),a=!1,s=!1;if(f&&f.type.indexOf("tag-name")===-1)do s?f=u.stepBackward():f=u.stepForward(),f&&(f.value==="/>"?s=!0:f.type.indexOf("tag-name")!==-1&&(a=!0));while(f&&!a);return f},this.$findClosingTag=function(u,f){var a,s=f.value,c=f.value,h=0,o=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);f=u.stepForward();var l=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+f.value.length),g=!1;do{if(a=f,a.type.indexOf("tag-close")!==-1&&!g){var b=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);g=!0}if(f=u.stepForward(),f){if(f.value===">"&&!g){var b=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);g=!0}if(f.type.indexOf("tag-name")!==-1){if(s=f.value,c===s){if(a.value==="<")h++;else if(a.value==="</"&&(h--,h<0)){u.stepBackward();var x=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2);f=u.stepForward();var E=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=u.stepForward()),f&&f.value===">")var $=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);else return}}}else if(c===s&&f.value==="/>"&&(h--,h<0))var x=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2),E=x,$=E,b=new p(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(f&&h>=0);if(o&&b&&x&&$&&l&&E)return{openTag:new p(o.start.row,o.start.column,b.end.row,b.end.column),closeTag:new p(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:l,closeTagName:E}},this.$findOpeningTag=function(u,f){var a=u.getCurrentToken(),s=f.value,c=0,h=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),l=o+2,g=new p(h,o,h,l);u.stepForward();var b=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=u.stepForward()),!(!f||f.value!==">")){var x=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);u.stepBackward(),u.stepBackward();do if(f=a,h=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),l=o+f.value.length,a=u.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(s===f.value)if(a.value==="<"){if(c++,c>0){var E=new p(h,o,h,l),$=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);do f=u.stepForward();while(f&&f.value!==">");var _=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1)}}else a.value==="</"&&c--}else if(f.value==="/>"){for(var C=0,L=a;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===s){c--;break}else if(L.value==="<")break;L=u.stepBackward(),C++}for(var D=0;D<C;D++)u.stepForward()}}while(a&&c<=0);if($&&_&&g&&x&&E&&b)return{openTag:new p($.start.row,$.start.column,_.end.row,_.end.column),closeTag:new p(g.start.row,g.start.column,x.end.row,x.end.column),openTagName:E,closeTagName:b}}}}r.BracketMatch=w}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,r,m){var d=e("./lib/oop"),p=e("./lib/lang"),w=e("./bidihandler").BidiHandler,u=e("./config"),f=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,s=e("./mode/text").Mode,c=e("./range").Range,h=e("./line_widgets").LineWidgets,o=e("./document").Document,l=e("./background_tokenizer").BackgroundTokenizer,g=e("./search_highlight").SearchHighlight,b=e("./undomanager").UndoManager,x=(function(){function z(O,T){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"+ ++z.$uid,this.$foldData.toString=function(){return this.join(`
|
|
200
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new s().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 a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),u.resetOptions(this),this.setMode(T),u._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return z.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=p.delayedCall(this.endOperation.bind(this,!0))},z.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)},z.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 T=this.selection.toJSON();this.curOp.selectionAfter=T,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(T),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},z.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()},z.prototype.getDocument=function(){return this.doc},Object.defineProperty(z.prototype,"widgetManager",{get:function(){var O=new h(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}),z.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var T=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;T>A&&(this.$docRowCache.splice(A,T),this.$screenRowCache.splice(A,T))},z.prototype.$getRowCacheIndex=function(O,T){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if(T>U)A=B+1;else if(T<U)N=B-1;else return B}return A-1},z.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},z.prototype.onChangeFold=function(O){var T=O.data;this.$resetRowCache(T.start.row)},z.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var T=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(T&&T.length&&(this.$undoManager.add({action:"removeFolds",folds:T},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)},z.prototype.onSelectionChange=function(){this._signal("changeSelection")},z.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},z.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var T=new b;T.$undoStack=O.history.$undoStack,T.$redoStack=O.history.$redoStack,T.mark=O.history.mark,T.$rev=O.history.rev;var A=new z(O.value);return O.folds.forEach(function(N){A.addFold("...",c.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(T),A.selection.fromJSON(O.selection),A},z.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()}},z.prototype.toString=function(){return this.doc.getValue()},z.prototype.getSelection=function(){return this.selection},z.prototype.getState=function(O){return this.bgTokenizer.getState(O)},z.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},z.prototype.getTokenAt=function(O,T){var A=this.bgTokenizer.getTokens(O),N,B=0;if(T==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>=T));U++);return N=A[U],N?(N.index=U,N.start=B-N.value.length,N):null},z.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var T=this;O.addSession(this),this.$syncInformUndoManager=function(){T.$informUndoManager.cancel(),T.mergeUndoDeltas=!1},this.$informUndoManager=p.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},z.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},z.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},z.prototype.getTabString=function(){return this.getUseSoftTabs()?p.stringRepeat(" ",this.getTabSize()):" "},z.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},z.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},z.prototype.setTabSize=function(O){this.setOption("tabSize",O)},z.prototype.getTabSize=function(){return this.$tabSize},z.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},z.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},z.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},z.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},z.prototype.getOverwrite=function(){return this.$overwrite},z.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},z.prototype.addGutterDecoration=function(O,T){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+T,this._signal("changeBreakpoint",{})},z.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},z.prototype.addGutterCustomWidget=function(O,T){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,T)},z.prototype.removeGutterDecoration=function(O,T){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+T,""),this._signal("changeBreakpoint",{})},z.prototype.getBreakpoints=function(){return this.$breakpoints},z.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var T=0;T<O.length;T++)this.$breakpoints[O[T]]="ace_breakpoint";this._signal("changeBreakpoint",{})},z.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},z.prototype.setBreakpoint=function(O,T){T===void 0&&(T="ace_breakpoint"),T?this.$breakpoints[O]=T:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},z.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},z.prototype.addMarker=function(O,T,A,N){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:T,inFront:!!N,id:B};return N?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},z.prototype.addDynamicMarker=function(O,T){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!T,T?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},z.prototype.removeMarker=function(O){var T=this.$frontMarkers[O]||this.$backMarkers[O];if(T){var A=T.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(T.inFront?"changeFrontMarker":"changeBackMarker")}},z.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},z.prototype.highlight=function(O){if(!this.$searchHighlight){var T=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(T)}this.$searchHighlight.setRegexp(O)},z.prototype.highlightLines=function(O,T,A,N){typeof T!="number"&&(A=T,T=O),A||(A="ace_step");var B=new c(O,0,T,1/0);return B.id=this.addMarker(B,A,"fullLine",N),B},z.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},z.prototype.getAnnotations=function(){return this.$annotations||[]},z.prototype.clearAnnotations=function(){this.setAnnotations([])},z.prototype.$detectNewLine=function(O){var T=O.match(/^.*?(\r?\n)/m);T?this.$autoNewLine=T[1]:this.$autoNewLine=`
|
|
201
|
+
`},z.prototype.getWordRange=function(O,T){var A=this.getLine(O),N=!1;if(T>0&&(N=!!A.charAt(T-1).match(this.tokenRe)),N||(N=!!A.charAt(T).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(T-1,T+1)))var B=/\s/;else var B=this.nonTokenRe;var U=T;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var G=T;G<A.length&&A.charAt(G).match(B);)G++;return new c(O,U,O,G)},z.prototype.getAWordRange=function(O,T){for(var A=this.getWordRange(O,T),N=this.getLine(A.end.row);N.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},z.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},z.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},z.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},z.prototype.getUseWorker=function(){return this.$useWorker},z.prototype.onReloadTokenizer=function(O){var T=O.data;this.bgTokenizer.start(T.first),this._signal("tokenizerUpdate",O)},z.prototype.setMode=function(O,T){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 s),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),T&&T();return}this.$modeId=N,u.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return T&&T();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)),T&&T()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},z.prototype.$onChangeMode=function(O,T){if(T||(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,T||(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}))}},z.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},z.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){u.warn("Could not load worker",O),this.$worker=null}},z.prototype.getMode=function(){return this.$mode},z.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},z.prototype.getScrollTop=function(){return this.$scrollTop},z.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},z.prototype.getScrollLeft=function(){return this.$scrollLeft},z.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},z.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(T){T&&T.screenWidth>O&&(O=T.screenWidth)}),this.lineWidgetWidth=O},z.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var T=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],G=U?U.start.row:1/0,J=T.length,Q=0;Q<J;Q++){if(Q>G){if(Q=U.end.row+1,Q>=J)break;U=this.$foldData[B++],G=U?U.start.row:1/0}A[Q]==null&&(A[Q]=this.$getStringScreenWidth(T[Q])[0]),A[Q]>N&&(N=A[Q])}this.screenWidth=N}},z.prototype.getLine=function(O){return this.doc.getLine(O)},z.prototype.getLines=function(O,T){return this.doc.getLines(O,T)},z.prototype.getLength=function(){return this.doc.getLength()},z.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},z.prototype.insert=function(O,T){return this.doc.insert(O,T)},z.prototype.remove=function(O){return this.doc.remove(O)},z.prototype.removeFullLines=function(O,T){return this.doc.removeFullLines(O,T)},z.prototype.undoChanges=function(O,T){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)}!T&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},z.prototype.redoChanges=function(O,T){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)}!T&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},z.prototype.setUndoSelect=function(O){this.$undoSelect=O},z.prototype.$getUndoSelection=function(O,T){function A(J){return T?J.action!=="insert":J.action==="insert"}for(var N,B,U=0;U<O.length;U++){var G=O[U];if(G.start){if(!N){A(G)?N=c.fromPoints(G.start,G.end):N=c.fromPoints(G.start,G.start);continue}A(G)?(B=G.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=G.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=G.start,N.compare(B.row,B.column)==-1&&(N=c.fromPoints(G.start,G.start)))}}return N},z.prototype.replace=function(O,T){return this.doc.replace(O,T)},z.prototype.moveText=function(O,T,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=c.fromPoints(T,T);if(!A){this.remove(O);var G=O.start.row-O.end.row,J=G?-O.end.column:O.start.column-O.end.column;J&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=J),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=J)),G&&U.start.row>=O.end.row&&(U.start.row+=G,U.end.row+=G)}if(U.end=this.insert(U.start,N),B.length){var Q=O.start,le=U.start,G=le.row-Q.row,J=le.column-Q.column;this.addFolds(B.map(function(de){return de=de.clone(),de.start.row==Q.row&&(de.start.column+=J),de.end.row==Q.row&&(de.end.column+=J),de.start.row+=G,de.end.row+=G,de}))}return U},z.prototype.indentRows=function(O,T,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=T;N++)this.doc.insertInLine({row:N,column:0},A)},z.prototype.outdentRows=function(O){for(var T=O.collapseRows(),A=new c(0,0,0,0),N=this.getTabSize(),B=T.start.row;B<=T.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var G=0;G<N&&U.charAt(G)==" ";++G);G<N&&U.charAt(G)==" "?(A.start.column=G,A.end.column=G+1):(A.start.column=0,A.end.column=G),this.remove(A)}},z.prototype.$moveLines=function(O,T,A){if(O=this.getRowFoldStart(O),T=this.getRowFoldEnd(T),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(T+A);if(N>this.doc.getLength()-1)return 0;var B=N-T}else{O=this.$clipRowToDocument(O),T=this.$clipRowToDocument(T);var B=T-O+1}var U=new c(O,0,T,Number.MAX_VALUE),G=this.getFoldsInRange(U).map(function(Q){return Q=Q.clone(),Q.start.row+=B,Q.end.row+=B,Q}),J=A==0?this.doc.getLines(O,T):this.doc.removeFullLines(O,T);return this.doc.insertFullLines(O+B,J),G.length&&this.addFolds(G),B},z.prototype.moveLinesUp=function(O,T){return this.$moveLines(O,T,-1)},z.prototype.moveLinesDown=function(O,T){return this.$moveLines(O,T,1)},z.prototype.duplicateLines=function(O,T){return this.$moveLines(O,T,0)},z.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},z.prototype.$clipColumnToRow=function(O,T){return T<0?0:Math.min(this.doc.getLine(O).length,T)},z.prototype.$clipPositionToDocument=function(O,T){if(T=Math.max(0,T),O<0)O=0,T=0;else{var A=this.doc.getLength();O>=A?(O=A-1,T=this.doc.getLine(A-1).length):T=Math.min(this.doc.getLine(O).length,T)}return{row:O,column:T}},z.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 T=this.doc.getLength()-1;return O.end.row>T?(O.end.row=T,O.end.column=this.doc.getLine(T).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},z.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var T=this.getLength();this.$wrapData=Array(T),this.$updateWrapData(0,T-1)}this._signal("changeWrapMode")}},z.prototype.getUseWrapMode=function(){return this.$useWrapMode},z.prototype.setWrapLimitRange=function(O,T){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==T)&&(this.$wrapLimitRange={min:O,max:T},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},z.prototype.adjustWrapLimit=function(O,T){var A=this.$wrapLimitRange;A.max<0&&(A={min:T,max:T});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},z.prototype.$constrainWrapLimit=function(O,T,A){return T&&(O=Math.max(T,O)),A&&(O=Math.min(A,O)),O},z.prototype.getWrapLimit=function(){return this.$wrapLimit},z.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},z.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},z.prototype.$updateInternalDataOnChange=function(O){var T=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,G=B.row,J=G-U,Q=null;if(this.$updating=!0,J!=0)if(A==="remove"){this[T?"$wrapData":"$rowLengthCache"].splice(U,J);var le=this.$foldData;Q=this.getFoldsInRange(O),this.removeFolds(Q);var re=this.getFoldLine(B.row),ce=0;if(re){re.addRemoveChars(B.row,B.column,N.column-B.column),re.shiftRow(-J);var de=this.getFoldLine(U);de&&de!==re&&(de.merge(re),re=de),ce=le.indexOf(re)+1}for(ce;ce<le.length;ce++){var re=le[ce];re.start.row>=B.row&&re.shiftRow(-J)}G=U}else{var ie=Array(J);ie.unshift(U,0);var fe=T?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ie);var le=this.$foldData,re=this.getFoldLine(U),ce=0;if(re){var $e=re.range.compareInside(N.row,N.column);$e==0?(re=re.split(N.row,N.column),re&&(re.shiftRow(J),re.addRemoveChars(G,0,B.column-N.column))):$e==-1&&(re.addRemoveChars(U,0,B.column-N.column),re.shiftRow(J)),ce=le.indexOf(re)+1}for(ce;ce<le.length;ce++){var re=le[ce];re.start.row>=U&&re.shiftRow(J)}}else{J=Math.abs(O.start.column-O.end.column),A==="remove"&&(Q=this.getFoldsInRange(O),this.removeFolds(Q),J=-J);var re=this.getFoldLine(U);re&&re.addRemoveChars(U,N.column,J)}return T&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,T?this.$updateWrapData(U,G):this.$updateRowLengthCache(U,G),Q},z.prototype.$updateRowLengthCache=function(O,T){this.$rowLengthCache[O]=null,this.$rowLengthCache[T]=null},z.prototype.$updateWrapData=function(O,T){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,G,J,Q=O;for(T=Math.min(T,A.length-1);Q<=T;)J=this.getFoldLine(Q,J),J?(G=[],J.walk((function(le,re,ce,de){var ie;if(le!=null){ie=this.$getDisplayTokens(le,G.length),ie[0]=_;for(var fe=1;fe<ie.length;fe++)ie[fe]=C}else ie=this.$getDisplayTokens(A[re].substring(de,ce),G.length);G=G.concat(ie)}).bind(this),J.end.row,A[J.end.row].length+1),B[J.start.row]=this.$computeWrapSplits(G,U,N),Q=J.end.row+1):(G=this.$getDisplayTokens(A[Q]),B[Q]=this.$computeWrapSplits(G,U,N),Q++)},z.prototype.$computeWrapSplits=function(O,T,A){if(O.length==0)return[];var N=[],B=O.length,U=0,G=0,J=this.$wrapAsCode,Q=this.$indentedSoftWrap,le=T<=Math.max(2*A,8)||Q===!1?0:Math.floor(T/2);function re(){var $e=0;if(le===0)return $e;if(Q)for(var Re=0;Re<O.length;Re++){var Ee=O[Re];if(Ee==D)$e+=1;else if(Ee==I)$e+=A;else{if(Ee==M)continue;break}}return J&&Q!==!1&&($e+=A),Math.min($e,le)}function ce($e){for(var Re=$e-U,Ee=U;Ee<$e;Ee++){var Ue=O[Ee];(Ue===12||Ue===2)&&(Re-=1)}N.length||(de=re(),N.indent=de),G+=Re,N.push(G),U=$e}for(var de=0;B-U>T-de;){var ie=U+T-de;if(O[ie-1]>=D&&O[ie]>=D){ce(ie);continue}if(O[ie]==_||O[ie]==C){for(ie;ie!=U-1&&O[ie]!=_;ie--);if(ie>U){ce(ie);continue}for(ie=U+T,ie;ie<O.length&&O[ie]==C;ie++);if(ie==O.length)break;ce(ie);continue}for(var fe=Math.max(ie-(T-(T>>2)),U-1);ie>fe&&O[ie]<_;)ie--;if(J){for(;ie>fe&&O[ie]<_;)ie--;for(;ie>fe&&O[ie]==L;)ie--}else for(;ie>fe&&O[ie]<D;)ie--;if(ie>fe){ce(++ie);continue}ie=U+T,O[ie]==$&&ie--,ce(ie-de)}return N},z.prototype.$getDisplayTokens=function(O,T){var A=[],N;T=T||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+T),A.push(I);for(var G=1;G<N;G++)A.push(M)}else U==32?A.push(D):U>39&&U<48||U>57&&U<64?A.push(L):U>=4352&&W(U)?A.push(E,$):A.push(E)}return A},z.prototype.$getStringScreenWidth=function(O,T,A){if(T==0)return[0,0];T==null&&(T=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&&W(N)?A+=2:A+=1,!(A>T));B++);return[A,B]},z.prototype.getRowLength=function(O){var T=1;return this.lineWidgets&&(T+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?T:this.$wrapData[O].length+T},z.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},z.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var T=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[T.row];return A.length&&A[0]<T.column?A.indent:0}else return 0},z.prototype.getScreenLastRowColumn=function(O){var T=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(T.row,T.column)},z.prototype.getDocumentLastRowColumn=function(O,T){var A=this.documentToScreenRow(O,T);return this.getScreenLastRowColumn(A)},z.prototype.getDocumentLastRowColumnPosition=function(O,T){var A=this.documentToScreenRow(O,T);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},z.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},z.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},z.prototype.screenToDocumentRow=function(O,T){return this.screenToDocumentPosition(O,T).row},z.prototype.screenToDocumentColumn=function(O,T){return this.screenToDocumentPosition(O,T).column},z.prototype.screenToDocumentPosition=function(O,T,A){if(O<0)return{row:0,column:0};var N,ce=0,B=0,U,re=0,G=0,J=this.$screenRowCache,Q=this.$getRowCacheIndex(J,O),le=J.length;if(le&&Q>=0)var re=J[Q],ce=this.$docRowCache[Q],de=O>J[le-1];else var de=!le;for(var ie=this.getLength()-1,fe=this.getNextFoldLine(ce),$e=fe?fe.start.row:1/0;re<=O&&(G=this.getRowLength(ce),!(re+G>O||ce>=ie));)re+=G,ce++,ce>$e&&(ce=fe.end.row+1,fe=this.getNextFoldLine(ce,fe),$e=fe?fe.start.row:1/0),de&&(this.$docRowCache.push(ce),this.$screenRowCache.push(re));if(fe&&fe.start.row<=ce)N=this.getFoldDisplayLine(fe),ce=fe.start.row;else{if(re+G<=O||ce>ie)return{row:ie,column:this.getLine(ie).length};N=this.getLine(ce),fe=null}var Re=0,Ee=Math.floor(O-re);if(this.$useWrapMode){var Ue=this.$wrapData[ce];Ue&&(U=Ue[Ee],Ee>0&&Ue.length&&(Re=Ue.indent,B=Ue[Ee-1]||Ue[Ue.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(re+Ee,ce,Ee)&&(T=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,T-Re)[1],this.$useWrapMode&&B>=U&&(B=U-1),fe?fe.idxToPosition(B):{row:ce,column:B}},z.prototype.documentToScreenPosition=function(O,T){if(typeof T>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,T);O=A.row,T=A.column;var re=0,N=null,B=null;B=this.getFoldAt(O,T,1),B&&(O=B.start.row,T=B.start.column);var U,le=0,G=this.$docRowCache,J=this.$getRowCacheIndex(G,O),Q=G.length;if(Q&&J>=0)var le=G[J],re=this.$screenRowCache[J],ce=O>G[Q-1];else var ce=!Q;for(var de=this.getNextFoldLine(le),ie=de?de.start.row:1/0;le<O;){if(le>=ie){if(U=de.end.row+1,U>O)break;de=this.getNextFoldLine(U,de),ie=de?de.start.row:1/0}else U=le+1;re+=this.getRowLength(le),le=U,ce&&(this.$docRowCache.push(le),this.$screenRowCache.push(re))}var fe="";de&&le>=ie?(fe=this.getFoldDisplayLine(de,O,T),N=de.start.row):(fe=this.getLine(O).substring(0,T),N=O);var $e=0;if(this.$useWrapMode){var Re=this.$wrapData[N];if(Re){for(var Ee=0;fe.length>=Re[Ee];)re++,Ee++;fe=fe.substring(Re[Ee-1]||0,fe.length),$e=Ee>0?Re.indent:0}}return this.lineWidgets&&this.lineWidgets[le]&&this.lineWidgets[le].rowsAbove&&(re+=this.lineWidgets[le].rowsAbove),{row:re,column:$e+this.$getStringScreenWidth(fe)[0]}},z.prototype.documentToScreenColumn=function(O,T){return this.documentToScreenPosition(O,T).column},z.prototype.documentToScreenRow=function(O,T){return this.documentToScreenPosition(O,T).row},z.prototype.getScreenLength=function(){var O=0,T=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,T=this.$foldData[B++],U=T?T.start.row:1/0;N<A;){var G=this.$wrapData[N];O+=G?G.length+1:1,N++,N>U&&(N=T.end.row+1,T=this.$foldData[B++],U=T?T.start.row:1/0)}else{O=this.getLength();for(var J=this.$foldData,B=0;B<J.length;B++)T=J[B],O-=T.end.row-T.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},z.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(T,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<T.length&&(B=T.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>A));U++);return[N,U]})},z.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var T=this.getLine(O.row);return T[O.column-1]},z.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()},z})();x.$uid=0,x.prototype.$modes=u.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=W,d.implement(x.prototype,f);var E=1,$=2,_=3,C=4,L=9,D=10,I=11,M=12;function W(z){return z<4352?!1:z>=4352&&z<=4447||z>=4515&&z<=4519||z>=4602&&z<=4607||z>=9001&&z<=9002||z>=11904&&z<=11929||z>=11931&&z<=12019||z>=12032&&z<=12245||z>=12272&&z<=12283||z>=12288&&z<=12350||z>=12353&&z<=12438||z>=12441&&z<=12543||z>=12549&&z<=12589||z>=12593&&z<=12686||z>=12688&&z<=12730||z>=12736&&z<=12771||z>=12784&&z<=12830||z>=12832&&z<=12871||z>=12880&&z<=13054||z>=13056&&z<=19903||z>=19968&&z<=42124||z>=42128&&z<=42182||z>=43360&&z<=43388||z>=44032&&z<=55203||z>=55216&&z<=55238||z>=55243&&z<=55291||z>=63744&&z<=64255||z>=65040&&z<=65049||z>=65072&&z<=65106||z>=65108&&z<=65126||z>=65128&&z<=65131||z>=65281&&z<=65376||z>=65504&&z<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),u.defineOptions(x.prototype,"session",{wrap:{set:function(z){if(!z||z=="off"?z=!1:z=="free"?z=!0:z=="printMargin"?z=-1:typeof z=="string"&&(z=parseInt(z,10)||!1),this.$wrap!=z)if(this.$wrap=z,!z)this.setUseWrapMode(!1);else{var O=typeof z=="number"?z: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(z){z=z=="auto"?this.$mode.type!="text":z!="text",z!=this.$wrapAsCode&&(this.$wrapAsCode=z,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(z){this.$useWorker=z,this.$stopWorker(),z&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(z){z=parseInt(z),z>0&&this.$tabSize!==z&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=z,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(z){this.setFoldStyle(z)},handlesSet:!0},overwrite:{set:function(z){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(z){this.doc.setNewLineMode(z)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(z){this.setMode(z)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,m){var d=e("./lib/lang"),p=e("./lib/oop"),w=e("./range").Range,u=(function(){function c(){this.$options={}}return c.prototype.set=function(h){return p.mixin(this.$options,h),this},c.prototype.getOptions=function(){return d.copyObject(this.$options)},c.prototype.setOptions=function(h){this.$options=h},c.prototype.find=function(h){var o=this.$options,l=this.$matchIterator(h,o);if(!l)return!1;var g=null;return l.forEach(function(b,x,E,$){return g=new w(b,x,E,$),x==$&&o.start&&o.start.start&&o.skipCurrent!=!1&&g.isEqual(o.start)?(g=null,!1):!0}),g},c.prototype.findAll=function(h){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var l=o.range,g=l?h.getLines(l.start.row,l.end.row):h.doc.getAllLines(),b=[],x=o.re;if(o.$isMultiLine){var E=x.length,$=g.length-E,_;e:for(var C=x.offset||0;C<=$;C++){for(var L=0;L<E;L++)if(g[C+L].search(x[L])==-1)continue e;var D=g[C],I=g[C+E-1],M=D.length-D.match(x[0])[0].length,W=I.match(x[E-1])[0].length;_&&_.end.row===C&&_.end.column>M||(b.push(_=new w(C,M,C+E-1,W)),E>2&&(C=C+E-2))}}else for(var z,O=0;O<g.length;O++)if(this.$isMultilineSearch(o)){var T=g.length-1;if(z=this.$multiLineForward(h,x,O,T),z){var A=z.endRow<=T?z.endRow-1:T;A>O&&(O=A),b.push(new w(z.startRow,z.startCol,z.endRow,z.endCol))}}else{z=d.getMatchOffsets(g[O],x);for(var L=0;L<z.length;L++){var N=z[L];b.push(new w(O,N.offset,O,N.offset+N.length))}}if(l){for(var B=l.start.column,U=l.end.column,O=0,L=b.length-1;O<L&&b[O].start.column<B&&b[O].start.row==0;)O++;for(var G=l.end.row-l.start.row;O<L&&b[L].end.column>U&&b[L].end.row==G;)L--;for(b=b.slice(O,L+1),O=0,L=b.length;O<L;O++)b[O].start.row+=l.start.row,b[O].end.row+=l.start.row}return b},c.prototype.parseReplaceString=function(h){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",g=0,b=h.length;g<b;g++){var x=h.charCodeAt(g);if(x===o.Backslash){if(g++,g>=b){l+="\\";break}var E=h.charCodeAt(g);switch(E){case o.Backslash:l+="\\";break;case o.n:l+=`
|
|
202
|
+
`;break;case o.t:l+=" ";break}continue}if(x===o.DollarSign){if(g++,g>=b){l+="$";break}var $=h.charCodeAt(g);if($===o.DollarSign){l+="$$";continue}if($===o.Digit0||$===o.Ampersand){l+="$&";continue}if(o.Digit1<=$&&$<=o.Digit9){l+="$"+h[g];continue}}l+=h[g]}return l||h},c.prototype.replace=function(h,o){var l=this.$options,g=this.$assembleRegExp(l);if(l.$isMultiLine)return o;if(g){var b=this.$isMultilineSearch(l);b&&(h=h.replace(/\r\n|\r|\n/g,`
|
|
203
|
+
`));var x=g.exec(h);if(!x||!b&&x[0].length!=h.length)return null;if(o=l.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=h.replace(g,o),l.preserveCase){o=o.split("");for(var E=Math.min(h.length,h.length);E--;){var $=h[E];$&&$.toLowerCase()!=$?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},c.prototype.$assembleRegExp=function(h,o){if(h.needle instanceof RegExp)return h.re=h.needle;var l=h.needle;if(!h.needle)return h.re=!1;h.regExp||(l=d.escapeRegExp(l));var g=h.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),h.$supportsUnicodeFlag=!0,g+="u"}catch{h.$supportsUnicodeFlag=!1}if(h.wholeWord&&(l=f(l,h)),h.$isMultiLine=!o&&/[\n\r]/.test(l),h.$isMultiLine)return h.re=this.$assembleMultilineRegExp(l,g);try{var b=new RegExp(l,g)}catch{b=!1}return h.re=b},c.prototype.$assembleMultilineRegExp=function(h,o){for(var l=h.replace(/\r\n|\r|\n/g,`$
|
|
204
|
+
^`).split(`
|
|
205
|
+
`),g=[],b=0;b<l.length;b++)try{g.push(new RegExp(l[b],o))}catch{return!1}return g},c.prototype.$isMultilineSearch=function(h){return h.re&&/\\r\\n|\\r|\\n/.test(h.re.source)&&h.regExp&&!h.$isMultiLine},c.prototype.$multiLineForward=function(h,o,l,g){for(var b,x=s(h,l),E=l;E<=g;){for(var $=0;$<x&&!(E>g);$++){var _=h.getLine(E++);b=b==null?_:b+`
|
|
206
|
+
`+_}var C=o.exec(b);if(o.lastIndex=0,C){var L=b.slice(0,C.index).split(`
|
|
207
|
+
`),D=C[0].split(`
|
|
208
|
+
`),I=l+L.length-1,M=L[L.length-1].length,W=I+D.length-1,z=D.length==1?M+D[0].length:D[D.length-1].length;return{startRow:I,startCol:M,endRow:W,endCol:z}}}return null},c.prototype.$multiLineBackward=function(h,o,l,g,b){for(var x,E=s(h,g),$=h.getLine(g).length-l,_=g;_>=b;){for(var C=0;C<E&&_>=b;C++){var L=h.getLine(_--);x=x==null?L:L+`
|
|
209
|
+
`+x}var D=a(x,o,$);if(D){var I=x.slice(0,D.index).split(`
|
|
210
|
+
`),M=D[0].split(`
|
|
211
|
+
`),W=_+I.length,z=I[I.length-1].length,O=W+M.length-1,T=M.length==1?z+M[0].length:M[M.length-1].length;return{startRow:W,startCol:z,endRow:O,endCol:T}}}return null},c.prototype.$matchIterator=function(h,o){var l=this.$assembleRegExp(o);if(!l)return!1;var g=this.$isMultilineSearch(o),b=this.$multiLineForward,x=this.$multiLineBackward,E=o.backwards==!0,$=o.skipCurrent!=!1,_=l.unicode,C=o.range,L=o.start;L||(L=C?C[E?"end":"start"]:h.selection.getRange()),L.start&&(L=L[$!=E?"end":"start"]);var D=C?C.start.row:0,I=C?C.end.row:h.getLength()-1;if(E)var M=function(O){var T=L.row;if(!z(T,L.column,O)){for(T--;T>=D;T--)if(z(T,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(T=I,D=L.row;T>=D;T--)if(z(T,Number.MAX_VALUE,O))return}}};else var M=function(O){var T=L.row;if(!z(T,L.column,O)){for(T=T+1;T<=I;T++)if(z(T,0,O))return;if(o.wrap!=!1){for(T=D,I=L.row;T<=I;T++)if(z(T,0,O))return}}};if(o.$isMultiLine)var W=l.length,z=function(O,T,A){var N=E?O-W+1:O;if(!(N<0||N+W>h.getLength())){var B=h.getLine(N),U=B.search(l[0]);if(!(!E&&U<T||U===-1)){for(var G=1;G<W;G++)if(B=h.getLine(N+G),B.search(l[G])==-1)return;var J=B.match(l[W-1])[0].length;if(!(E&&J>T)&&A(N,U,N+W-1,J))return!0}}};else if(E)var z=function(O,T,A){if(g){var N=x(h,l,T,O,D);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=h.getLine(O),U=[],G,J=0;for(l.lastIndex=0;G=l.exec(B);){var Q=G[0].length;if(J=G.index,!Q){if(J>=B.length)break;l.lastIndex=J+=d.skipEmptyMatch(B,J,_)}if(G.index+Q>T)break;U.push(G.index,Q)}for(var le=U.length-1;le>=0;le-=2){var re=U[le-1],Q=U[le];if(A(O,re,O,re+Q))return!0}}};else var z=function(O,T,A){if(l.lastIndex=T,g){var N=b(h,l,O,I);if(N){var B=N.endRow<=I?N.endRow-1:I;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=h.getLine(O),G,J;J=l.exec(U);){var Q=J[0].length;if(G=J.index,A(O,G,O,G+Q))return!0;if(!Q&&(l.lastIndex=G+=d.skipEmptyMatch(U,G,_),G>=U.length))return!1}};return{forEach:M}},c})();function f(c,h){var o=d.supportsLookbehind();function l(E,$){$===void 0&&($=!0);var _=o&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(E)||h.regExp?o&&h.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var g=Array.from(c),b=g[0],x=g[g.length-1];return l(b)+c+l(x,!1)}function a(c,h,o){for(var l=null,g=0;g<=c.length;){h.lastIndex=g;var b=h.exec(c);if(!b)break;var x=b.index+b[0].length;if(x>c.length-o)break;(!l||x>l.index+l[0].length)&&(l=b),g=b.index+1}return l}function s(c,h){var o=5e3,l={row:h,column:0},g=c.doc.positionToIndex(l),b=g+o,x=c.doc.indexToPosition(b),E=x.row;return E+1}r.Search=u}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var d=this&&this.__extends||(function(){var c=function(h,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,g){l.__proto__=g}||function(l,g){for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(l[b]=g[b])},c(h,o)};return function(h,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(h,o);function l(){this.constructor=h}h.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),p=e("../lib/keys"),w=e("../lib/useragent"),u=p.KEY_MODS,f=(function(){function c(h,o){this.$init(h,o,!1)}return c.prototype.$init=function(h,o,l){this.platform=o||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(h),this.$singleCommand=l},c.prototype.addCommand=function(h){this.commands[h.name]&&this.removeCommand(h),this.commands[h.name]=h,h.bindKey&&this._buildKeyHash(h)},c.prototype.removeCommand=function(h,o){var l=h&&(typeof h=="string"?h:h.name);h=this.commands[l],o||delete this.commands[l];var g=this.commandKeyBinding;for(var b in g){var x=g[b];if(x==h)delete g[b];else if(Array.isArray(x)){var E=x.indexOf(h);E!=-1&&(x.splice(E,1),x.length==1&&(g[b]=x[0]))}}},c.prototype.bindKey=function(h,o,l){if(typeof h=="object"&&h&&(l==null&&(l=h.position),h=h[this.platform]),!!h){if(typeof o=="function")return this.addCommand({exec:o,bindKey:h,name:o.name||h});h.split("|").forEach(function(g){var b="";if(g.indexOf(" ")!=-1){var x=g.split(/\s+/);g=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),L=u[C.hashId]+C.key;b+=(b?" ":"")+L,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var E=this.parseKeys(g),$=u[E.hashId]+E.key;this._addCommandToBinding(b+$,o,l)},this)}},c.prototype._addCommandToBinding=function(h,o,l){var g=this.commandKeyBinding,b;if(!o)delete g[h];else if(!g[h]||this.$singleCommand)g[h]=o;else{Array.isArray(g[h])?(b=g[h].indexOf(o))!=-1&&g[h].splice(b,1):g[h]=[g[h]],typeof l!="number"&&(l=a(o));var x=g[h];for(b=0;b<x.length;b++){var E=x[b],$=a(E);if($>l)break}x.splice(b,0,o)}},c.prototype.addCommands=function(h){h&&Object.keys(h).forEach(function(o){var l=h[o];if(l){if(typeof l=="string")return this.bindKey(l,o);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=o),this.addCommand(l))}},this)},c.prototype.removeCommands=function(h){Object.keys(h).forEach(function(o){this.removeCommand(h[o])},this)},c.prototype.bindKeys=function(h){Object.keys(h).forEach(function(o){this.bindKey(o,h[o])},this)},c.prototype._buildKeyHash=function(h){this.bindKey(h.bindKey,h)},c.prototype.parseKeys=function(h){var o=h.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),l=o.pop(),g=p[l];if(p.FUNCTION_KEYS[g])l=p.FUNCTION_KEYS[g].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var b=0,x=o.length;x--;){var E=p.KEY_MODS[o[x]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+h),!1;b|=E}return{key:l,hashId:b}},c.prototype.findKeyCommand=function(h,o){var l=u[h]+o;return this.commandKeyBinding[l]},c.prototype.handleKeyboard=function(h,o,l,g){if(!(g<0)){var b=u[o]+l,x=this.commandKeyBinding[b];return h.$keyChain&&(h.$keyChain+=" "+b,x=this.commandKeyBinding[h.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(h.$keyChain=h.$keyChain||b,{command:"null"}):(h.$keyChain&&((!o||o==4)&&l.length==1?h.$keyChain=h.$keyChain.slice(0,-b.length-1):(o==-1||g>0)&&(h.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(h,o){return o.$keyChain||""},c})();function a(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var s=(function(c){d(h,c);function h(o,l){var g=c.call(this,o,l)||this;return g.$singleCommand=!0,g}return h})(f);s.call=function(c,h,o){f.prototype.$init.call(c,h,o,!0)},f.call=function(c,h,o){f.prototype.$init.call(c,h,o,!1)},r.HashHandler=s,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,m){var d=this&&this.__extends||(function(){var a=function(s,c){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h[l]=o[l])},a(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");a(s,c);function h(){this.constructor=s}s.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}})(),p=e("../lib/oop"),w=e("../keyboard/hash_handler").MultiHashHandler,u=e("../lib/event_emitter").EventEmitter,f=(function(a){d(s,a);function s(c,h){var o=a.call(this,h,c)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),o}return s.prototype.exec=function(c,h,o){if(Array.isArray(c)){for(var l=c.length;l--;)if(this.exec(c[l],h,o))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var g={editor:h,command:c,args:o};return this.canExecute(c,h)?(g.returnValue=this._emit("exec",g),this._signal("afterExec",g),g.returnValue!==!1):(this._signal("commandUnavailable",g),!1)},s.prototype.canExecute=function(c,h){return typeof c=="string"&&(c=this.commands[c]),!(!c||h&&h.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(h))},s.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(h){this.macro.push([h.command,h.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},s.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(h){typeof h=="string"?this.exec(h,c):this.exec(h[0],c,h[1])},this)}finally{this.$inReplay=!1}}},s.prototype.trimMacro=function(c){return c.map(function(h){return typeof h[0]!="string"&&(h[0]=h[0].name),h[1]||(h=h[0]),h})},s})(w);p.implement(f.prototype,u),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,m){var d=e("../lib/lang"),p=e("../config"),w=e("../range").Range;function u(a,s){return{win:a,mac:s}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:u("Ctrl-,","Command-,"),exec:function(a){p.loadModule("ace/ext/settings_menu",function(s){s.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:u("Alt-E","F4"),exec:function(a){p.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:u("Alt-Shift-E","Shift-F4"),exec:function(a){p.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:u("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:u(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:u("Ctrl-L","Command-L"),exec:function(a,s){typeof s=="number"&&!isNaN(s)&&a.gotoLine(s),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:u("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:u("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:u("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:u("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:u("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:u("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:u("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:u("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:u("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:u("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:u("Ctrl-F","Command-F"),exec:function(a){p.loadModule("ace/ext/searchbox",function(s){s.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:u("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:u("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:u("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:u("Up","Up|Ctrl-P"),exec:function(a,s){a.navigateUp(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:u("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:u("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:u("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:u("Down","Down|Ctrl-N"),exec:function(a,s){a.navigateDown(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:u("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:u("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:u("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:u("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:u("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:u("Left","Left|Ctrl-B"),exec:function(a,s){a.navigateLeft(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:u("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:u("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:u("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:u("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:u("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:u("Right","Right|Ctrl-F"),exec:function(a,s){a.navigateRight(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:u(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:u("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:u(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:u("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:u("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:u("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:u("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:u("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:u("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:u("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:u(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var s=a.$copyWithEmptySelection&&a.selection.isEmpty(),c=s?a.selection.getLineRange():a.selection.getRange();a._emit("cut",c),c.isEmpty()||a.session.remove(c),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,s){a.$handlePaste(s)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:u("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:u("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:u("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:u("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:u("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:u("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:u("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:u("Ctrl-H","Command-Option-F"),exec:function(a){p.loadModule("ace/ext/searchbox",function(s){s.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:u("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:u("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:u("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:u("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:u("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:u("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:u("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:u("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:u("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:u("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:u("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:u("Ctrl-Shift-Backspace",null),exec:function(a){var s=a.selection.getRange();s.start.column=0,a.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:u("Ctrl-Shift-Delete",null),exec:function(a){var s=a.selection.getRange();s.end.column=Number.MAX_VALUE,a.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:u("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:u("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:u("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:u("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:u("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:u("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,s){a.insert(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,s){a.insert(d.stringRepeat(s.text||"",s.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:u(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:u("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:u("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:u("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:u(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:u("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var s=a.selection.getRange();s.start.column=s.end.column=0,s.end.row++,a.selection.setRange(s,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:u("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:u(null,null),exec:function(a){for(var s=a.selection.isBackwards(),c=s?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),h=s?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),o=a.session.doc.getLine(c.row).length,l=a.session.doc.getTextRange(a.selection.getRange()),g=l.replace(/\n\s*/," ").length,b=a.session.doc.getLine(c.row),x=c.row+1;x<=h.row+1;x++){var E=d.stringTrimLeft(d.stringTrimRight(a.session.doc.getLine(x)));E.length!==0&&(E=" "+E),b+=E}h.row+1<a.session.doc.getLength()-1&&(b+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new w(c.row,0,h.row+2,0),b),g>0?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+g)):(o=a.session.doc.getLine(c.row).length>o?o+1:o,a.selection.moveCursorTo(c.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:u(null,null),exec:function(a){var s=a.session.doc.getLength()-1,c=a.session.doc.getLine(s).length,h=a.selection.rangeList.ranges,o=[];h.length<1&&(h=[a.selection.getRange()]);for(var l=0;l<h.length;l++)l==h.length-1&&(h[l].end.row===s&&h[l].end.column===c||o.push(new w(h[l].end.row,h[l].end.column,s,c))),l===0?h[l].start.row===0&&h[l].start.column===0||o.push(new w(0,0,h[l].start.row,h[l].start.column)):o.push(new w(h[l-1].end.row,h[l-1].end.column,h[l].start.row,h[l].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var l=0;l<o.length;l++)a.selection.addRange(o[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
|
|
212
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var s=a.getCursorPosition();a.selection.moveTo(s.row-1,Number.MAX_VALUE),a.insert(`
|
|
213
|
+
`),s.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:u("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:u(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,m){var d=e("../lib/keys"),p=(function(){function u(f){this.editor=f,this.gutterLayer=f.renderer.$gutterLayer,this.element=f.renderer.$gutter,this.lines=f.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(f){if(this.annotationTooltip.isOpen){f.preventDefault(),f.keyCode===d.escape&&this.annotationTooltip.hide();return}if(f.target===this.element){if(f.keyCode!=d.enter)return;f.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var s=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(s),h=this.$findNearestAnnotation(s);if(!(c===null&&h===null)){var o=this.$findClosestNumber(c,h,s);if(o===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=h,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(f),setTimeout((function(){this.editor._signal("gutterkeydown",new w(f,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(f){if(f.keyCode===d.tab){f.preventDefault();return}if(f.keyCode===d.escape){f.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(f.keyCode===d.up){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(f.keyCode===d.down){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(f.keyCode===d.left){f.preventDefault(),this.$switchLane("annotation");return}if(f.keyCode===d.right){f.preventDefault(),this.$switchLane("fold");return}if(f.keyCode===d.enter||f.keyCode===d.space){switch(f.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),s=this.editor.session.$gutterCustomWidgets[a];if(s)s.callbacks&&s.callbacks.onClick&&s.callbacks.onClick(f,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),f),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},u.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},u.prototype.$isFoldWidgetVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),s=this.$getFoldWidget(f).style.display!=="none";return a&&s},u.prototype.$isCustomWidgetVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),s=!!this.$getCustomWidget(f);return a&&s},u.prototype.$isAnnotationVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),s=this.$getAnnotation(f).style.display!=="none";return a&&s},u.prototype.$getFoldWidget=function(f){var a=this.lines.get(f),s=a.element;return s.childNodes[1]},u.prototype.$getCustomWidget=function(f){var a=this.lines.get(f),s=a.element;return s.childNodes[3]},u.prototype.$getAnnotation=function(f){var a=this.lines.get(f),s=a.element;return s.childNodes[2]},u.prototype.$findNearestFoldLaneWidget=function(f){if(this.$isCustomWidgetVisible(f)||this.$isFoldWidgetVisible(f))return f;for(var a=0;f-a>0||f+a<this.lines.getLength()-1;){if(a++,f-a>=0&&this.$isCustomWidgetVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(f+a))return f+a;if(f-a>=0&&this.$isFoldWidgetVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(f+a))return f+a}return null},u.prototype.$findNearestAnnotation=function(f){if(this.$isAnnotationVisible(f))return f;for(var a=0;f-a>0||f+a<this.lines.getLength()-1;){if(a++,f-a>=0&&this.$isAnnotationVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(f+a))return f+a}return null},u.prototype.$focusFoldWidget=function(f){if(f!=null){var a=this.$getFoldWidget(f);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},u.prototype.$focusCustomWidget=function(f){if(f!=null){var a=this.$getCustomWidget(f);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},u.prototype.$focusAnnotation=function(f){if(f!=null){var a=this.$getAnnotation(f);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},u.prototype.$blurFoldWidget=function(f){var a=this.$getFoldWidget(f);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},u.prototype.$blurCustomWidget=function(f){var a=this.$getCustomWidget(f);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},u.prototype.$blurAnnotation=function(f){var a=this.$getAnnotation(f);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$findClosestNumber=function(f,a,s){return f===null?a:a===null||Math.abs(s-f)<=Math.abs(s-a)?f:a},u.prototype.$switchLane=function(f){switch(f){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 s=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(s===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$isCustomWidgetVisible(s)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},u.prototype.$rowIndexToRow=function(f){var a=this.lines.get(f);return a?a.row:null},u.prototype.$rowToRowIndex=function(f){for(var a=0;a<this.lines.getLength();a++){var s=this.lines.get(a);if(s.row==f)return a}return null},u})();r.GutterKeyboardHandler=p;var w=(function(){function u(f,a){this.gutterKeyboardHandler=a,this.domEvent=f}return u.prototype.getKey=function(){return d.keyCodeToString(this.domEvent.keyCode)},u.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},u.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},u.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},u})();r.GutterKeyboardEvent=w}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,r,m){var d=this&&this.__values||function(T){var A=typeof Symbol=="function"&&Symbol.iterator,N=A&&T[A],B=0;if(N)return N.call(T);if(T&&typeof T.length=="number")return{next:function(){return T&&B>=T.length&&(T=void 0),{value:T&&T[B++],done:!T}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},p=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/lang"),f=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,s=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,l=e("./search").Search,g=e("./range").Range,b=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,E=e("./commands/default_commands").commands,$=e("./config"),_=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,L=e("./config").nls,D=e("./clipboard"),I=e("./lib/keys"),M=e("./lib/event"),W=e("./tooltip").HoverTooltip,z=(function(){function T(A,N,B){this.id="editor"+ ++T.$uid,this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.commands=new x(f.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new a(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new s(this),new c(this)),this.keyBinding=new h(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=u.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,J){J._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new o("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return T.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},T.prototype.startOperation=function(A){this.session.startOperation(A)},T.prototype.endOperation=function(A){this.session.endOperation(A)},T.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},T.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(),G=this.renderer.layerConfig;(U.start.row>=G.lastRow||U.end.row<=G.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}},T.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 G=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&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())}},T.prototype.setKeyboardHandler=function(A,N){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;$.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()},T.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},T.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()}},T.prototype.getSession=function(){return this.session},T.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},T.prototype.getValue=function(){return this.session.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.resize=function(A){this.renderer.onResize(A)},T.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},T.prototype.getTheme=function(){return this.renderer.getTheme()},T.prototype.setStyle=function(A,N){this.renderer.setStyle(A,N)},T.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},T.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},T.prototype.setFontSize=function(A){this.setOption("fontSize",A)},T.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(de){N.removeMarker(de)}),N.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),J=N.getMatchingBracketRanges(B,G);if(!J){var Q=new _(N,B.row,B.column),le=Q.getCurrentToken();if(le&&/\b(?:tag-open|tag-name)/.test(le.type)){var re=N.getMatchingTags(B);re&&(J=[re.openTagName.isEmpty()?re.openTag:re.openTagName,re.closeTagName.isEmpty()?re.closeTag:re.closeTagName])}}if(!J&&N.$mode.getMatching&&(J=N.$mode.getMatching(A.session)),!J){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ce="ace_bracket";Array.isArray(J)?J.length==1&&(ce="ace_error_bracket"):J=[J],J.length==2&&(g.comparePoints(J[0].end,J[1].start)==0?J=[g.fromPoints(J[0].start,J[1].end)]:g.comparePoints(J[0].start,J[1].end)==0&&(J=[g.fromPoints(J[1].start,J[0].end)])),N.$bracketHighlight={ranges:J,markerIds:J.map(function(de){return N.addMarker(de,ce,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},T.prototype.focus=function(){this.textInput.focus()},T.prototype.isFocused=function(){return this.textInput.isFocused()},T.prototype.blur=function(){this.textInput.blur()},T.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},T.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},T.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},T.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()},T.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},T.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},T.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},T.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},T.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 g(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"))},T.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 G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},T.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,G=A.getLine(N.start.row),J=G.substring(B,U);if(!(J.length>5e3||!/[\w\d]/.test(J))){var Q=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:J}),le=G.substring(B-1,U+1);if(Q.test(le))return Q}}},T.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},T.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},T.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},T.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},T.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},T.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},T.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},T.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},T.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},T.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(),G=0;G<U.length;G++){var J=U[G];G&&U[G-1].start.row==J.start.row||(A+=this.session.getLine(J.start.row)+N)}}var Q={text:A};return this._signal("copy",Q),D.lineMode=B?Q.text:!1,Q.text},T.prototype.onCopy=function(){this.commands.exec("copy",this)},T.prototype.onCut=function(){this.commands.exec("cut",this)},T.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},T.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===D.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(ce){U.insert({row:ce.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),J=this.selection.rangeList.ranges,Q=G.length==2&&(!G[0]||!G[1]);if(G.length!=J.length||Q)return this.commands.exec("insertstring",this,N);for(var le=J.length;le--;){var re=J[le];re.isEmpty()||U.remove(re),U.insert(re.start,G[le])}}},T.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},T.prototype.insert=function(A,N){var B=this.session,U=B.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var J=U.transformAction(B.getState(G.row),"insertion",this,B,A);J&&(A!==J.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=J.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
|
|
214
|
+
`)==-1){var Q=g.fromPoints(G,G);Q.end.column+=A.length,this.session.remove(Q)}}else{var Q=this.getSelectionRange();G=this.session.remove(Q),this.clearSelection()}if(A==`
|
|
215
|
+
`||A==`\r
|
|
216
|
+
`){var de=B.getLine(G.row);if(G.column>de.search(/\S|$/)){var le=de.substr(G.column).search(/\S|$/);B.doc.removeInLine(G.row,G.column,G.column+le)}}this.clearSelection();var re=G.column,ce=B.getState(G.row),de=B.getLine(G.row),ie=U.checkOutdent(ce,de,A);if(B.insert(G,A),J&&J.selection&&(J.selection.length==2?this.selection.setSelectionRange(new g(G.row,re+J.selection[0],G.row,re+J.selection[1])):this.selection.setSelectionRange(new g(G.row+J.selection[0],J.selection[1],G.row+J.selection[2],J.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(A)){var fe=U.getNextLineIndent(ce,de.slice(0,G.column),B.getTabString());B.insert({row:G.row+1,column:0},fe)}ie&&U.autoOutdent(ce,B,G.row)}},T.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new g(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",J="",Q=A.getTabString(),le=0;le<B.length;le++)for(var re=B[le].start.row,ce=B[le].end.row,de=re;de<=ce;de++){de>0&&(U=A.getState(de-1),G=A.getLine(de-1),J=N.getNextLineIndent(U,G,Q));var ie=A.getLine(de),fe=N.$getIndent(ie);if(J!==fe){if(fe.length>0){var $e=new g(de,0,de,fe.length);A.remove($e)}J.length>0&&A.insert({row:de,column:0},J)}N.autoOutdent(U,A,de)}},T.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()},T.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)}},T.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},T.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},T.prototype.getOverwrite=function(){return this.session.getOverwrite()},T.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},T.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},T.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},T.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},T.prototype.getDragDelay=function(){return this.getOption("dragDelay")},T.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},T.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},T.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},T.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},T.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},T.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},T.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},T.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},T.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},T.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},T.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},T.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},T.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},T.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},T.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},T.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},T.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},T.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},T.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},T.prototype.getReadOnly=function(){return this.getOption("readOnly")},T.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},T.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},T.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},T.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},T.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},T.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},T.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.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),G=B.getMode().transformAction(U,"deletion",this,B,N);if(N.end.column===0){var J=B.getTextRange(N);if(J[J.length-1]==`
|
|
217
|
+
`){var Q=B.getLine(N.end.row);/^\s+$/.test(Q)&&(N.end.column=Q.length)}}G&&(N=G)}this.session.remove(N),this.clearSelection()},T.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.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()},T.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
|
218
|
+
`),this.moveCursorToPosition(A)},T.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},T.prototype.removeGhostText=function(){this.renderer.removeGhostText()},T.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,G;N<B.length?(U=B.charAt(N)+B.charAt(N-1),G=new g(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),G=new g(A.row,N-2,A.row,N)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},T.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)},T.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)},T.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 G=A.getLine(N.start.row),J=N.start,Q=A.getTabSize(),le=A.documentToScreenColumn(J.row,J.column);if(this.session.getUseSoftTabs())var re=Q-le%Q,ce=u.stringRepeat(" ",re);else{for(var re=le%Q;G[N.start.column-1]==" "&&re;)N.start.column--,re--;this.selection.setSelectionRange(N),ce=" "}return this.insert(ce)},T.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},T.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},T.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(Q,le){return Q.toLowerCase()<le.toLowerCase()?-1:Q.toLowerCase()>le.toLowerCase()?1:0});for(var G=new g(0,0,0,0),U=A.first;U<=A.last;U++){var J=N.getLine(U);G.start.row=U,G.end.row=U,G.end.column=J.length,N.replace(G,B[U-A.first])}},T.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)},T.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)},T.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 G=B.exec(U);if(G.index<=N&&G.index+G[0].length>=N){var J={value:G[0],start:G.index,end:G.index+G[0].length};return J}}return null},T.prototype.modifyNumber=function(A){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new g(N,B-1,N,B),G=this.session.getTextRange(U);if(!isNaN(parseFloat(G))&&isFinite(G)){var J=this.getNumberAt(N,B);if(J){var Q=J.value.indexOf(".")>=0?J.start+J.value.indexOf(".")+1:J.end,le=J.start+J.value.length-Q,re=parseFloat(J.value);re*=Math.pow(10,le),Q!==J.end&&B<Q?A*=Math.pow(10,J.end-B-1):A*=Math.pow(10,J.end-B),re+=A,re/=Math.pow(10,le);var ce=re.toFixed(le),de=new g(N,J.start,N,J.end);this.session.replace(de,ce),this.moveCursorTo(N,Math.max(J.start+1,B+ce.length-J.value.length))}}else this.toggleWord()},T.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,G=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),J=N-U-1;J<0&&(J=0);var Q=0,le=0,re=this;B.match(/[A-Za-z0-9_]+/)&&G.forEach(function(He,Ge){le=Q+He.length,J>=Q&&J<=le&&(B=He,re.selection.clearSelection(),re.moveCursorTo(A,Q+U),re.selection.selectTo(A,le+U)),Q=le});for(var ce=this.$toggleWordPairs,de,ie=0;ie<ce.length;ie++)for(var fe=ce[ie],$e=0;$e<=1;$e++){var Re=+!$e,Ee=B.match(new RegExp("^\\s?_?("+u.escapeRegExp(fe[$e])+")\\s?$","i"));if(Ee){var Ue=B.match(new RegExp("([_]|^|\\s)("+u.escapeRegExp(Ee[1])+")($|\\s)","g"));Ue&&(de=B.replace(new RegExp(u.escapeRegExp(fe[$e]),"i"),function(He){var Ge=fe[Re];return He.toUpperCase()==He?Ge=Ge.toUpperCase():He.charAt(0).toUpperCase()==He.charAt(0)&&(Ge=Ge.substr(0,0)+fe[Re].charAt(0).toUpperCase()+Ge.substr(1)),Ge}),this.insert(de),de="")}}},T.prototype.findLinkAt=function(A,N){var B,U,G=this.session.getLine(A),J=G.split(/((?:https?|ftp):\/\/[\S]+)/),Q=N;Q<0&&(Q=0);var le=0,re=0,ce;try{for(var de=d(J),ie=de.next();!ie.done;ie=de.next()){var fe=ie.value;if(re=le+fe.length,Q>=le&&Q<=re&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){ce=fe.replace(/[\s:.,'";}\]]+$/,"");break}le=re}}catch($e){B={error:$e}}finally{try{ie&&!ie.done&&(U=de.return)&&U.call(de)}finally{if(B)throw B.error}}return ce},T.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},T.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},T.prototype.duplicateSelection=function(){var A=this.selection,N=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var G=B.start.row;N.duplicateLines(G,G)}else{var J=U?B.start:B.end,Q=N.insert(J,N.getTextRange(B));B.start=J,B.end=Q,A.setSelectionRange(B,U)}},T.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},T.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},T.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},T.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},T.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},T.prototype.$moveLines=function(A,N){var B,U,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var J=G.toOrientedRange();B=this.$getSelectedRows(J),U=this.session.$moveLines(B.first,B.last,N?0:A),N&&A==-1&&(U=0),J.moveBy(U,0),G.fromOrientedRange(J)}else{var Q=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var le=0,re=0,ce=Q.length,de=0;de<ce;de++){var ie=de;Q[de].moveBy(le,0),B=this.$getSelectedRows(Q[de]);for(var fe=B.first,$e=B.last;++de<ce;){re&&Q[de].moveBy(re,0);var Re=this.$getSelectedRows(Q[de]);if(N&&Re.first!=$e||!N&&Re.first>$e+1)break;$e=Re.last}for(de--,le=this.session.$moveLines(fe,$e,N?0:A),N&&A==-1&&(ie=de+1);ie<=de;)Q[ie].moveBy(le,0),ie++;N||(le=0),re+=le}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},T.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},T.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},T.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},T.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},T.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},T.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},T.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},T.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},T.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},T.prototype.$moveByPage=function(A,N){var B=this.renderer,U=this.renderer.layerConfig,G=A*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var J=B.scrollTop;B.scrollBy(0,G*U.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(J)},T.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},T.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},T.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},T.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},T.prototype.scrollPageDown=function(){this.$moveByPage(1)},T.prototype.scrollPageUp=function(){this.$moveByPage(-1)},T.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},T.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},T.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)},T.prototype.getCursorPosition=function(){return this.selection.getCursor()},T.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},T.prototype.getSelectionRange=function(){return this.selection.getRange()},T.prototype.selectAll=function(){this.selection.selectAll()},T.prototype.clearSelection=function(){this.selection.clearSelection()},T.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},T.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},T.prototype.jumpToMatching=function(A,N){var B=this.getCursorPosition(),U=new _(this.session,B.row,B.column),G=U.getCurrentToken(),J=0;G&&G.type.indexOf("tag-name")!==-1&&(G=U.stepBackward());var Q=G||U.stepForward();if(Q){var le,re=!1,ce={},de=B.column-Q.start,ie,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Q.value.match(/[{}()\[\]]/g)){for(;de<Q.value.length&&!re;de++)if(fe[Q.value[de]])switch(ie=fe[Q.value[de]]+"."+Q.type.replace("rparen","lparen"),isNaN(ce[ie])&&(ce[ie]=0),Q.value[de]){case"(":case"[":case"{":ce[ie]++;break;case")":case"]":case"}":ce[ie]--,ce[ie]===-1&&(le="bracket",re=!0);break}}else Q.type.indexOf("tag-name")!==-1&&(isNaN(ce[Q.value])&&(ce[Q.value]=0),G.value==="<"&&J>1?ce[Q.value]++:G.value==="</"&&ce[Q.value]--,ce[Q.value]===-1&&(le="tag",re=!0));re||(G=Q,J++,Q=U.stepForward(),de=0)}while(Q&&!re);if(le){var $e,Re;if(le==="bracket")$e=this.session.getBracketRange(B),$e||($e=new g(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+de-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+de-1),Re=$e.start,(N||Re.row===B.row&&Math.abs(Re.column-B.column)<2)&&($e=this.session.getBracketRange(Re)));else if(le==="tag"){if(!Q||Q.type.indexOf("tag-name")===-1)return;if($e=new g(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,Re=$e.start):($e=Ee.openTag,Ee.closeTag.start.row===B.row&&Ee.closeTag.start.column===B.column?Re=$e.end:Re=$e.start))}Re=Re||$e.start}Re=$e&&$e.cursor||Re,Re&&(A?$e&&N?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Re.row,Re.column):this.selection.moveTo(Re.row,Re.column))}}},T.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)},T.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},T.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)},T.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)},T.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()},T.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()},T.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},T.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},T.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},T.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},T.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},T.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},T.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},T.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 G=this.getSelectionRange();this.selection.moveTo(0,0);for(var J=B.length-1;J>=0;--J)this.$tryReplace(B[J],A)&&U++;return this.selection.setSelectionRange(G),U},T.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},T.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},T.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&p.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 G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,B),G;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},T.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},T.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},T.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)},T.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},T.prototype.setAutoScrollEditorIntoView=function(A){if(A){var N,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var J=this.on("changeSelection",function(){U=!0}),Q=this.renderer.on("beforeRender",function(){U&&(N=B.renderer.container.getBoundingClientRect())}),le=this.renderer.on("afterRender",function(){if(U&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var re=B.renderer,ce=re.$cursorLayer.$pixelPos,de=re.layerConfig,ie=ce.top-de.offset;ce.top>=0&&ie+N.top<0?U=!0:ce.top<de.height&&ce.top+N.top+de.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(G.style.top=ie+"px",G.style.left=ce.left+"px",G.style.height=de.lineHeight+"px",G.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(re){re||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",J),this.renderer.off("afterRender",le),this.renderer.off("beforeRender",Q))}}},T.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",w.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},T.prototype.prompt=function(A,N,B){var U=this;$.loadModule("ace/ext/prompt",function(G){G.prompt(U,A,N,B)})},Object.defineProperty(T.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new W(this.container))},set:function(A){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=A},enumerable:!1,configurable:!0}),T})();z.$uid=0,z.prototype.curOp=null,z.prototype.prevOp={},z.prototype.$mergeableCommands=["backspace","del","insertstring"],z.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],p.implement(z.prototype,b),$.defineOptions(z.prototype,"editor",{selectionStyle:{set:function(T){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:T})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(T){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(T){var A=this;if(this.textInput.setReadOnly(T),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),U=B.key.length==1),!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){var G=w.createElement("div");G.textContent=L("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),G)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var N=this.textInput.getElement();T?(M.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(T){this.textInput.setCopyWithEmptySelection(T)},initialValue:!1},cursorStyle:{set:function(T){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(T){this.setAutoScrollEditorIntoView(T)}},keyboardHandler:{set:function(T){this.setKeyboardHandler(T)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(T){this.session.setValue(T)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(T){this.setSession(T)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(T){this.renderer.$gutterLayer.setShowLineNumbers(T),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),T&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(T){this.$showLineNumbers&&T?O.attach(this):O.detach(this)}},placeholder:{set:function(T){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),w.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),w.addCssClass(this.container,"ace_hasPlaceholder");var N=w.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(T){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===I.enter){U.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},B;T?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("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(T){this.$textInputAriaLabel=T},initialValue:""},enableMobileMenu:{set:function(T){this.$enableMobileMenu=T},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(T,A){return(Math.abs(T.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(T,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(T,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(T){T.renderer.$gutterLayer.$renderer=this,T.on("changeSelection",this.update),this.update(null,T)},detach:function(T){T.renderer.$gutterLayer.$renderer==this&&(T.renderer.$gutterLayer.$renderer=null),T.off("changeSelection",this.update),this.update(null,T)}};r.Editor=z}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("../lib/dom"),p=(function(){function w(u,f){this.element=u,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(u){d.translate(this.element,0,-(u.firstRowScreen*u.lineHeight%this.canvasHeight)-u.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(u,f){return Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(u,f,a){var s=f.firstRowScreen*f.lineHeight,c=Math.floor(s/this.canvasHeight),h=a.documentToScreenRow(u,0)*f.lineHeight;return h-c*this.canvasHeight},w.prototype.computeLineHeight=function(u,f,a){return f.lineHeight*a.getRowLineCount(u)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(u){return this.cells[u]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(u){if(Array.isArray(u)){this.cells.push.apply(this.cells,u);for(var f=d.createFragment(this.element),a=0;a<u.length;a++)f.appendChild(u[a].element);this.element.appendChild(f)}else this.cells.push(u),this.element.appendChild(u.element)},w.prototype.unshift=function(u){if(Array.isArray(u)){this.cells.unshift.apply(this.cells,u);for(var f=d.createFragment(this.element),a=0;a<u.length;a++)f.appendChild(u[a].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}else this.cells.unshift(u),this.element.insertAdjacentElement("afterbegin",u.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(u){u&&(u.element.remove(),this.cellCache.push(u))},w.prototype.createCell=function(u,f,a,s){var c=this.cellCache.pop();if(!c){var h=d.createElement("div");s&&s(h),this.element.appendChild(h),c={element:h,text:"",row:u}}return c.row=u,c},w})();r.Lines=p}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,r,m){var d=e("../lib/dom"),p=e("../lib/oop"),w=e("../lib/lang"),u=e("../lib/event_emitter").EventEmitter,f=e("./lines").Lines,a=e("../config").nls,s=(function(){function h(o){this.$showCursorMarker=null,this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return h.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},h.prototype.addGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,l)},h.prototype.removeGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,l)},h.prototype.setAnnotations=function(o){this.$annotations=[];for(var l=0;l<o.length;l++){var g=o[l],b=g.row,x=this.$annotations[b];x||(x=this.$annotations[b]={text:[],type:[],displayText:[]});var E=g.text,$=g.text,_=g.type;E=E?w.escapeHTML(E):g.html||"",$=$||g.html||"",x.text.indexOf(E)===-1&&(x.text.push(E),x.type.push(_),x.displayText.push($));var C=g.className;C?x.className=C:_==="error"?x.className=" ace_error":_==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":_==="info"&&!x.className?x.className=" ace_info":_==="hint"&&!x.className&&(x.className=" ace_hint")}},h.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var l=o.start.row,g=o.end.row-l;if(g!==0)if(o.action=="remove")this.$annotations.splice(l,g+1,null);else{var b=new Array(g+1);b.unshift(l,1),this.$annotations.splice.apply(this.$annotations,b)}}},h.prototype.update=function(o){this.config=o;var l=this.session,g=o.firstRow,b=Math.min(o.lastRow+o.gutterOffset,l.getLength()-1);this.oldLastRow=b,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=l.getNextFoldLine(g),E=x?x.start.row:1/0,$=null,_=-1,C=g;;){if(C>E&&(C=x.end.row+1,x=l.getNextFoldLine(C,x),E=x?x.start.row:1/0),C>b){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}$=this.$lines.get(++_),$?$.row=C:($=this.$lines.createCell(C,o,this.session,c),this.$lines.push($)),this.$renderCell($,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},h.prototype.$updateGutterWidth=function(o){var l=this.session,g=l.gutterRenderer||this.$renderer,b=l.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(x=l.getLength()+b-1);var E=g?g.getWidth(l,x,o):x.toString().length*o.characterWidth,$=this.$padding||this.$computePadding();E+=$.left+$.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},h.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},h.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var g=0;g<l.length;g++){var b=l[g];if(b.row>=this.$cursorRow){if(b.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(g>0&&x&&x.start.row==l[g-1].row)b=l[g-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},h.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=d.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var l=o.selection.cursor,g=this.config,b=this.$lines,x=g.firstRowScreen*g.lineHeight,E=Math.floor(x/b.canvasHeight),$=o.documentToScreenRow(l)*g.lineHeight,_=$-E*b.canvasHeight;d.setStyle(this.$highlightElement.style,"height",g.lineHeight+"px"),d.setStyle(this.$highlightElement.style,"top",_+"px")}},h.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var g=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=g,!l||b<o.firstRow)return this.update(o);if(g<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(b>g)for(var x=this.session.getFoldedRowCount(g+1,b);x>0;x--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,l.firstRow-1)),g>b&&this.$lines.push(this.$renderLines(o,b+1,g)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},h.prototype.$renderLines=function(o,l,g){for(var b=[],x=l,E=this.session.getNextFoldLine(x),$=E?E.start.row:1/0;x>$&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),$=E?E.start.row:1/0),!(x>g);){var _=this.$lines.createCell(x,o,this.session,c);this.$renderCell(_,o,E,x),b.push(_),x++}return b},h.prototype.$renderCell=function(o,l,g,b){var x=o.element,E=this.session,$=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],L=x.childNodes[3],D=C.firstChild,I=E.$firstLineNumber,M=E.$breakpoints,W=E.$decorations,z=E.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&E.foldWidgets,T=g?g.start.row:Number.MAX_VALUE,A=l.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(z?z.getText(E,b):b+I).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||g&&b<this.$cursorRow&&b>=T&&this.$cursorRow<=g.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)),M[b]&&(N+=M[b]),W[b]&&(N+=W[b]),this.$annotations[b]&&b!==T&&(N+=this.$annotations[b].className),O){var G=O[b];G==null&&(G=O[b]=E.getFoldWidget(b))}if(G){var J="ace_fold-widget ace_"+G,Q=G=="start"&&b==T&&b<g.end.row;if(Q){J+=" ace_closed";for(var le="",re=!1,ce=b+1;ce<=g.end.row;ce++)if(this.$annotations[ce]){if(this.$annotations[ce].className===" ace_error"){re=!0,le=" ace_error_fold";break}this.$annotations[ce].className===" ace_security"?(re=!0,le=" ace_security_fold"):this.$annotations[ce].className===" ace_warning"&&le!==" ace_security_fold"&&(re=!0,le=" ace_warning_fold")}N+=le}else J+=" ace_open";_.className!=J&&(_.className=J),d.setStyle(_.style,"height",A),d.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var de=E.getFoldWidgetRange(b);de?_.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[de.start.row+1,de.end.row+1])):g?_.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[g.start.row+1,g.end.row+1])):_.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),Q?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else _&&(d.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));var ie=this.session.$gutterCustomWidgets[b];if(ie?this.$addCustomWidget(b,ie,o):L&&this.$removeCustomWidget(b,o),re&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",D.className=B,D.className+=le,d.setStyle(D.style,"height",A),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",A);var fe;switch(le){case" ace_error_fold":fe=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":fe=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":fe=a("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[b]){C.className="ace_gutter_annotation",D.className=B,this.$useSvgGutterIcons?D.className+=this.$annotations[b].className:x.classList.add(this.$annotations[b].className.replace(" ","")),d.setStyle(D.style,"height",A),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",A);var fe;switch(this.$annotations[b].className){case" ace_error":fe=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":fe=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":fe=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":fe=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":fe=a("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 d.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=N&&(x.className=N),d.setStyle(o.element.style,"height",this.$lines.computeLineHeight(b,l,E)+"px"),d.setStyle(o.element.style,"top",this.$lines.computeLineTop(b,l,E)+"px"),o.text=U,C.style.display==="none"&&_.style.display==="none"&&!ie?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},h.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},h.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},h.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},h.prototype.setShowFoldWidgets=function(o){o?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},h.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},h.prototype.$hideFoldWidget=function(o,l){var g=l||this.$getGutterCell(o);if(g&&g.element){var b=g.element.childNodes[1];b&&d.setStyle(b.style,"display","none")}},h.prototype.$showFoldWidget=function(o,l){var g=l||this.$getGutterCell(o);if(g&&g.element){var b=g.element.childNodes[1];b&&this.session.foldWidgets&&this.session.foldWidgets[g.row]&&d.setStyle(b.style,"display","inline-block")}},h.prototype.$getGutterCell=function(o){var l=this.$lines.cells,g=0,b=l.length-1;if(!(o<l[0].row||o>l[b].row)){for(;g<=b;){var x=Math.floor((g+b)/2),E=l[x];if(E.row>o)b=x-1;else if(E.row<o)g=x+1;else return E}return E}},h.prototype.$addCustomWidget=function(o,l,g){var b=l.className,x=l.label,E=l.title,$=l.callbacks;this.session.$gutterCustomWidgets[o]={className:b,label:x,title:E,callbacks:$},this.$hideFoldWidget(o,g);var _=g||this.$getGutterCell(o);if(_&&_.element){var C=_.element.querySelector(".ace_custom-widget");C&&C.remove(),C=d.createElement("span"),C.className="ace_custom-widget ".concat(b),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",E),d.setStyle(C.style,"display","inline-block"),d.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(L){$.onClick(L,o),L.stopPropagation()}),_.element.appendChild(C)}},h.prototype.$removeCustomWidget=function(o,l){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,l);var g=l||this.$getGutterCell(o);if(g&&g.element){var b=g.element.querySelector(".ace_custom-widget");b&&g.element.removeChild(b)}},h.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=d.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},h.prototype.getRegion=function(o){var l=this.$padding||this.$computePadding(),g=this.element.getBoundingClientRect();if(o.x<l.left+g.left)return"markers";if(this.$showFoldWidgets&&o.x>g.right-l.right)return"foldWidgets"},h})();s.prototype.$fixedWidth=!1,s.prototype.$highlightGutterLine=!0,s.prototype.$renderer=void 0,s.prototype.$showLineNumbers=!0,s.prototype.$showFoldWidgets=!0,p.implement(s.prototype,u);function c(h){var o=document.createTextNode("");h.appendChild(o);var l=d.createElement("span");h.appendChild(l);var g=d.createElement("span");h.appendChild(g);var b=d.createElement("span");return g.appendChild(b),h}r.Gutter=s}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,m){var d=e("../range").Range,p=e("../lib/dom"),w=(function(){function f(a){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return f.prototype.setPadding=function(a){this.$padding=a},f.prototype.setSession=function(a){this.session=a},f.prototype.setMarkers=function(a){this.markers=a},f.prototype.elt=function(a,s){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=s,c.className=a},f.prototype.update=function(a){if(a){this.config=a,this.i=0;var s;for(var c in this.markers){var h=this.markers[c];if(!h.range){h.update(s,this,this.session,a);continue}var o=h.range.clipRows(a.firstRow,a.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),h.renderer){var l=this.$getTop(o.start.row,a),g=this.$padding+o.start.column*a.characterWidth;h.renderer(s,o,g,l,a)}else h.type=="fullLine"?this.drawFullLineMarker(s,o,h.clazz,a):h.type=="screenLine"?this.drawScreenLineMarker(s,o,h.clazz,a):o.isMultiLine()?h.type=="text"?this.drawTextMarker(s,o,h.clazz,a):this.drawMultiLineMarker(s,o,h.clazz,a):this.drawSingleLineMarker(s,o,h.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(a,s){return(a-s.firstRowScreen)*s.lineHeight},f.prototype.drawTextMarker=function(a,s,c,h,o){for(var l=this.session,g=s.start.row,b=s.end.row,x=g,E=0,$=0,_=l.getScreenLastRowColumn(x),C=new d(x,s.start.column,x,$);x<=b;x++)C.start.row=C.end.row=x,C.start.column=x==g?s.start.column:l.getRowWrapIndent(x),C.end.column=_,E=$,$=_,_=x+1<b?l.getScreenLastRowColumn(x+1):x==b?0:s.end.column,this.drawSingleLineMarker(a,C,c+(x==g?" ace_start":"")+" ace_br"+u(x==g||x==g+1&&s.start.column,E<$,$>_,x==b),h,x==b?0:1,o)},f.prototype.drawMultiLineMarker=function(a,s,c,h,o){var l=this.$padding,g=h.lineHeight,b=this.$getTop(s.start.row,h),x=l+s.start.column*h.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(s.start.row)){var E=s.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(a,E,c+" ace_br1 ace_start",h,null,o)}else this.elt(c+" ace_br1 ace_start","height:"+g+"px;right:"+l+"px;top:"+b+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(s.end.row)){var E=s.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(a,E,c+" ace_br12",h,null,o)}else{b=this.$getTop(s.end.row,h);var $=s.end.column*h.characterWidth;this.elt(c+" ace_br12","height:"+g+"px;width:"+$+"px;top:"+b+"px;left:"+l+"px;"+(o||""))}if(g=(s.end.row-s.start.row-1)*h.lineHeight,!(g<=0)){b=this.$getTop(s.start.row+1,h);var _=(s.start.column?1:0)|(s.end.column?0:8);this.elt(c+(_?" ace_br"+_:""),"height:"+g+"px;right:"+l+"px;top:"+b+"px;left:"+l+"px;"+(o||""))}},f.prototype.drawSingleLineMarker=function(a,s,c,h,o,l){if(this.session.$bidiHandler.isBidiRow(s.start.row))return this.drawBidiSingleLineMarker(a,s,c,h,o,l);var g=h.lineHeight,b=(s.end.column+(o||0)-s.start.column)*h.characterWidth,x=this.$getTop(s.start.row,h),E=this.$padding+s.start.column*h.characterWidth;this.elt(c,"height:"+g+"px;width:"+b+"px;top:"+x+"px;left:"+E+"px;"+(l||""))},f.prototype.drawBidiSingleLineMarker=function(a,s,c,h,o,l){var g=h.lineHeight,b=this.$getTop(s.start.row,h),x=this.$padding,E=this.session.$bidiHandler.getSelections(s.start.column,s.end.column);E.forEach(function($){this.elt(c,"height:"+g+"px;width:"+($.width+(o||0))+"px;top:"+b+"px;left:"+(x+$.left)+"px;"+(l||""))},this)},f.prototype.drawFullLineMarker=function(a,s,c,h,o){var l=this.$getTop(s.start.row,h),g=h.lineHeight;s.start.row!=s.end.row&&(g+=this.$getTop(s.end.row,h)-l),this.elt(c,"height:"+g+"px;top:"+l+"px;left:0;right:0;"+(o||""))},f.prototype.drawScreenLineMarker=function(a,s,c,h,o){var l=this.$getTop(s.start.row,h),g=h.lineHeight;this.elt(c,"height:"+g+"px;top:"+l+"px;left:0;right:0;"+(o||""))},f})();w.prototype.$padding=0;function u(f,a,s,c){return(f?1:0)|(a?2:0)|(s?4:0)|(c?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,m){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(p){return d.has(p)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,m){var d=e("../lib/oop"),p=e("../lib/dom"),w=e("../lib/lang"),u=e("./lines").Lines,f=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,s=e("./text_util").isTextToken,c=(function(){function h(o){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new u(this.element)}return h.prototype.$updateEolChar=function(){var o=this.session.doc,l=o.getNewLineCharacter()==`
|
|
219
|
+
`&&o.getNewLineMode()!="windows",g=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},h.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},h.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},h.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},h.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},h.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},h.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},h.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},h.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},h.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},h.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},h.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var l=this.$tabStrings=[0],g=1;g<o+1;g++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=w.stringRepeat(this.TAB_CHAR,g),l.push(b)}else l.push(this.dom.createTextNode(w.stringRepeat(" ",g),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):$,b=this.dom.createElement("span");b.className=x+E,b.textContent=$,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=x+_,b.textContent=C,this.$tabStrings[" "]=b}},h.prototype.updateLines=function(o,l,g){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var b=Math.max(l,o.firstRow),x=Math.min(g,o.lastRow),E=this.element.childNodes,$=0,_=o.firstRow;_<b;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(b)){b=C.start.row;break}else _=C.end.row;$++}for(var L=!1,_=b,C=this.session.getNextFoldLine(_),D=C?C.start.row:1/0;_>D&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),D=C?C.start.row:1/0),!(_>x);){var I=E[$++];if(I){this.dom.removeChildren(I),this.$renderLine(I,_,_==D?C:!1),L&&(I.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var M=o.lineHeight*this.session.getRowLength(_)+"px";I.style.height!=M&&(L=!0,I.style.height=M)}_++}if(L)for(;$<this.$lines.cells.length;){var W=this.$lines.cells[$++];W.element.style.top=this.$lines.computeLineTop(W.row,o,this.session)+"px"}},h.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var g=o.lastRow,b=l?l.lastRow:-1;if(!l||b<o.firstRow)return this.update(o);if(g<l.firstRow)return this.update(o);if(!l||l.lastRow<o.firstRow)return this.update(o);if(o.lastRow<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);x>0;x--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,l.firstRow-1)),o.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(o,l.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},h.prototype.$renderLinesFragment=function(o,l,g){for(var b=[],x=l,E=this.session.getNextFoldLine(x),$=E?E.start.row:1/0;x>$&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),$=E?E.start.row:1/0),!(x>g);){var _=this.$lines.createCell(x,o,this.session),C=_.element;this.dom.removeChildren(C),p.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),p.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==$?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",b.push(_),x++}return b},h.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var l=o.firstRow,g=o.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(o,l,g))},h.prototype.$renderToken=function(o,l,g,b){for(var x=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),_,C=0;_=E.exec(b);){var L=_[1],D=_[2],I=_[3],M=_[4],W=_[5];if(!(!x.showSpaces&&D)){var z=C!=_.index?b.slice(C,_.index):"";if(C=_.index+_[0].length,z&&$.appendChild(this.dom.createTextNode(z,this.element)),L){var O=x.session.getScreenTabSize(l+_.index),T=x.$tabStrings[O].cloneNode(!0);T.charCount=1,$.appendChild(T),l+=O-1}else if(D)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=w.stringRepeat(x.SPACE_CHAR,D.length),$.appendChild(A)}else $.appendChild(this.dom.createTextNode(D,this.element));else if(I){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=w.stringRepeat(x.SPACE_CHAR,I.length),$.appendChild(A)}else if(M){l+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",A.textContent=x.showSpaces?x.SPACE_CHAR:M,$.appendChild(A)}else if(W){l+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className="ace_cjk",A.textContent=W,$.appendChild(A)}}}if($.appendChild(this.dom.createTextNode(C?b.slice(C):b,this.element)),s(g.type))o.appendChild($);else{var N="ace_"+g.type.replace(/\./g," ace_"),A=this.dom.createElement("span");g.type=="fold"&&(A.style.width=g.value.length*this.config.characterWidth+"px",A.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),A.className=N,A.appendChild($),o.appendChild(A)}return l+b.length},h.prototype.renderIndentGuide=function(o,l,g){var b=l.search(this.$indentGuideRe);if(b<=0||b>=g)return l;if(l[0]==" "){b-=b%this.tabSize;for(var x=b/this.tabSize,E=0;E<x;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(b)}else if(l[0]==" "){for(var E=0;E<b;E++){var $=this.$tabStrings[" "].cloneNode(!0);$.charCount=1,o.appendChild($)}return this.$highlightIndentGuide(),l.substr(b)}return this.$highlightIndentGuide(),l},h.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var l=this.session.selection.getCursor(),g=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,b=Math.floor(g/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:l.row};var x=this.session.$bracketHighlight;if(x){for(var E=this.session.$bracketHighlight.ranges,$=0;$<E.length;$++)if(l.row!==E[$].start.row){this.$highlightIndentGuideMarker.end=E[$].start.row+1,l.row>E[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=l.row+1;$<o.length;$++){var _=o[$],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=$,C<=g))break}}this.$renderHighlightIndentGuide()}}},h.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<o.length;l++)o[l].classList.remove("ace_indent-guide-active")},h.prototype.$setIndentGuideActive=function(o,l){var g=this.session.doc.getLine(o.row);if(g!==""){var b=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)b=o.element.childNodes[0];else return;var x=b.childNodes;if(x){var E=x[l-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},h.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g<o.length;g++){var b=o[g];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,l)}}else for(var g=o.length-1;g>=0;g--){var b=o[g];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,l)}}}},h.prototype.$createLineElement=function(o){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},h.prototype.$renderWrappedLine=function(o,l,g){var b=0,x=0,E=g[0],$=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<l.length;C++){var L=l[C],D=L.value;if(C==0&&this.displayIndentGuides){if(b=D.length,D=this.renderIndentGuide(_,D,E),!D)continue;b-=D.length}if(b+D.length<E)$=this.$renderToken(_,$,L,D),b+=D.length;else{for(;b+D.length>=E;){$=this.$renderToken(_,$,L,D.substring(0,E-b)),D=D.substring(E-b),b=E,_=this.$createLineElement(),o.appendChild(_);var I=this.dom.createTextNode(w.stringRepeat(" ",g.indent),this.element);I.charCount=0,_.appendChild(I),x++,$=0,E=g[x]||Number.MAX_VALUE}D.length!=0&&(b+=D.length,$=this.$renderToken(_,$,L,D))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,$,null,"",!0)},h.prototype.$renderSimpleLine=function(o,l){for(var g=0,b=0;b<l.length;b++){var x=l[b],E=x.value;if(!(b==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(g+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,g,x,E);g=this.$renderToken(o,g,x,E)}}},h.prototype.$renderOverflowMessage=function(o,l,g,b,x){g&&this.$renderToken(o,l,g,b.slice(0,this.MAX_LINE_LENGTH-l));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=x?"<hide>":"<click to see more...>",o.appendChild(E)},h.prototype.$renderLine=function(o,l,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(l)),g)var b=this.$getFoldLineTokens(l,g);else var b=this.session.getTokens(l);var x=o;if(b.length){var E=this.session.getRowSplitData(l);if(E&&E.length){this.$renderWrappedLine(o,b,E);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,b)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){g&&(l=g.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},h.prototype.$getFoldLineTokens=function(o,l){var g=this.session,b=[];function x($,_,C){for(var L=0,D=0;D+$[L].value.length<_;)if(D+=$[L].value.length,L++,L==$.length)return;if(D!=_){var I=$[L].value.substring(_-D);I.length>C-_&&(I=I.substring(0,C-_)),b.push({type:$[L].type,value:I}),D=_+I.length,L+=1}for(;D<C&&L<$.length;){var I=$[L].value;I.length+D>C?b.push({type:$[L].type,value:I.substring(0,C-D)}):b.push($[L]),D+=I.length,L+=1}}var E=g.getTokens(o);return l.walk(function($,_,C,L,D){$!=null?b.push({type:"fold",value:$}):(D&&(E=g.getTokens(_)),E.length&&x(E,L,C))},l.end.row,this.session.getLine(l.end.row).length),b},h.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},h})();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,d.implement(c.prototype,f),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("../lib/dom"),p=(function(){function w(u){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",u.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(u){for(var f=this.cursors,a=f.length;a--;)d.setStyle(f[a].style,"opacity",u?"":"0")},w.prototype.$startCssAnimation=function(){for(var u=this.cursors,f=u.length;f--;)u[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(u){this.$padding=u},w.prototype.setSession=function(u){this.session=u},w.prototype.setBlinking=function(u){u!=this.isBlinking&&(this.isBlinking=u,this.restartTimer())},w.prototype.setBlinkInterval=function(u){u!=this.blinkInterval&&(this.blinkInterval=u,this.restartTimer())},w.prototype.setSmoothBlinking=function(u){u!=this.smoothBlinking&&(this.smoothBlinking=u,d.setCssClass(this.element,"ace_smooth-blinking",u),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var u=d.createElement("div");return u.className="ace_cursor",this.element.appendChild(u),this.cursors.push(u),u},w.prototype.removeCursor=function(){if(this.cursors.length>1){var u=this.cursors.pop();return u.parentNode.removeChild(u),u}},w.prototype.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var u=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),u(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&d.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){u(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){u(!0),f()},this.blinkInterval),f()}},w.prototype.getPixelPosition=function(u,f){if(!this.config||!this.session)return{left:0,top:0};u||(u=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(u),s=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,u.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),c=(a.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:s,top:c}},w.prototype.isCursorInView=function(u,f){return u.top>=0&&u.top<f.maxHeight},w.prototype.update=function(u){this.config=u;var f=this.session.$selectionMarkers,a=0,s=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var a=0,c=f.length;a<c;a++){var h=this.getPixelPosition(f[a].cursor,!0);if(!((h.top>u.height+u.offset||h.top<0)&&a>1)){var o=this.cursors[s++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,h,u,f[a],this.session):this.isCursorInView(h,u)?(d.setStyle(l,"display","block"),d.translate(o,h.left,h.top),d.setStyle(l,"width",Math.round(u.characterWidth)+"px"),d.setStyle(l,"height",u.lineHeight+"px")):d.setStyle(l,"display","none")}}for(;this.cursors.length>s;)this.removeCursor();var g=this.session.getOverwrite();this.$setOverwrite(g),this.$pixelPos=h,this.restartTimer()},w.prototype.$setOverwrite=function(u){u!=this.overwrite&&(this.overwrite=u,u?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();p.prototype.$padding=0,p.prototype.drawCursor=null,r.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var d=this&&this.__extends||(function(){var o=function(l,g){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(b[E]=x[E])},o(l,g)};return function(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");o(l,g);function b(){this.constructor=l}l.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}})(),p=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter,a=32768,s=(function(){function o(l,g){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+g,this.element.tabIndex=-1,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addListener(this.element,"scroll",this.onScroll.bind(this)),u.addListener(this.element,"mousedown",u.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o})();p.implement(s.prototype,f);var c=(function(o){d(l,o);function l(g,b){var x=o.call(this,g,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,b.$scrollbarWidth=x.width=w.scrollbarWidth(g.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var g=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-g)/(this.coeff-g)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(g){this.element.style.height=g+"px"},l.prototype.setScrollHeight=function(g){this.scrollHeight=g,g>a?(this.coeff=a/g,g=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=g+"px"},l.prototype.setScrollTop=function(g){this.scrollTop!=g&&(this.skipEvent=!0,this.scrollTop=g,this.element.scrollTop=g*this.coeff)},l})(s);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var h=(function(o){d(l,o);function l(g,b){var x=o.call(this,g,"-h")||this;return x.scrollLeft=0,x.height=b.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(g){this.element.style.width=g+"px"},l.prototype.setInnerWidth=function(g){this.inner.style.width=g+"px"},l.prototype.setScrollWidth=function(g){this.inner.style.width=g+"px"},l.prototype.setScrollLeft=function(g){this.scrollLeft!=g&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=g)},l})(s);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=h,r.VScrollBar=c,r.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var d=this&&this.__extends||(function(){var h=function(o,l){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(g[x]=b[x])},h(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");h(o,l);function g(){this.constructor=o}o.prototype=l===null?Object.create(l):(g.prototype=l.prototype,new g)}})(),p=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter;w.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
220
|
+
position: absolute;
|
|
221
|
+
background: rgba(128, 128, 128, 0.6);
|
|
222
|
+
-moz-box-sizing: border-box;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
border: 1px solid #bbb;
|
|
225
|
+
border-radius: 2px;
|
|
226
|
+
z-index: 8;
|
|
227
|
+
}
|
|
228
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
229
|
+
position: absolute;
|
|
230
|
+
z-index: 6;
|
|
231
|
+
background: none;
|
|
232
|
+
overflow: hidden!important;
|
|
233
|
+
}
|
|
234
|
+
.ace_editor>.ace_sb-v {
|
|
235
|
+
z-index: 6;
|
|
236
|
+
right: 0;
|
|
237
|
+
top: 0;
|
|
238
|
+
width: 12px;
|
|
239
|
+
}
|
|
240
|
+
.ace_editor>.ace_sb-v div {
|
|
241
|
+
z-index: 8;
|
|
242
|
+
right: 0;
|
|
243
|
+
width: 100%;
|
|
244
|
+
}
|
|
245
|
+
.ace_editor>.ace_sb-h {
|
|
246
|
+
bottom: 0;
|
|
247
|
+
left: 0;
|
|
248
|
+
height: 12px;
|
|
249
|
+
}
|
|
250
|
+
.ace_editor>.ace_sb-h div {
|
|
251
|
+
bottom: 0;
|
|
252
|
+
height: 100%;
|
|
253
|
+
}
|
|
254
|
+
.ace_editor>.ace_sb_grabbed {
|
|
255
|
+
z-index: 8;
|
|
256
|
+
background: #000;
|
|
257
|
+
}`,"ace_scrollbar.css",!1);var a=(function(){function h(o,l){this.element=w.createElement("div"),this.element.className="ace_sb"+l,this.inner=w.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return h.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},h})();p.implement(a.prototype,f);var s=(function(h){d(o,h);function o(l,g){var b=h.call(this,l,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=l,b.width=b.VScrollWidth,b.renderer=g,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return o.prototype.onMouseDown=function(l,g){if(l==="mousedown"&&!(u.getButton(g)!==0||g.detail===2)){if(g.target===this.inner){var b=this,x=g.clientY,E=function(M){x=M.clientY},$=function(){clearInterval(D)},_=g.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var M=b.scrollTopFromThumbTop(C+x-_);M!==b.scrollTop&&b._emit("scroll",{data:M})}};u.capture(this.inner,E,$);var D=setInterval(L,20);return u.preventDefault(g)}var I=g.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),u.preventDefault(g)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(l){var g=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return g=g>>0,g<0?g=0:g>this.pageHeight-this.viewHeight&&(g=this.pageHeight-this.viewHeight),g},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(l,g){this.pageHeight===l&&!g||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(a);s.prototype.setInnerHeight=s.prototype.setScrollHeight;var c=(function(h){d(o,h);function o(l,g){var b=h.call(this,l,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=g,b}return o.prototype.onMouseDown=function(l,g){if(l==="mousedown"&&!(u.getButton(g)!==0||g.detail===2)){if(g.target===this.inner){var b=this,x=g.clientX,E=function(M){x=M.clientX},$=function(){clearInterval(D)},_=g.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var M=b.scrollLeftFromThumbLeft(C+x-_);M!==b.scrollLeft&&b._emit("scroll",{data:M})}};u.capture(this.inner,E,$);var D=setInterval(L,20);return u.preventDefault(g)}var I=g.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),u.preventDefault(g)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(l){var g=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return g=g>>0,g<0?g=0:g>this.pageWidth-this.viewWidth&&(g=this.pageWidth-this.viewWidth),g},o.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(l,g){this.pageWidth===l&&!g||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(a);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=s,r.ScrollBarV=s,r.ScrollBarH=c,r.VScrollBar=s,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,m){var d=e("./lib/event"),p=(function(){function w(u,f){this.onRender=u,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var a=this;this._flush=function(s){a.pending=!1;var c=a.changes;if(c&&(d.blockIdle(100),a.changes=0,a.onRender(c)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return w.prototype.schedule=function(u){this.changes=this.changes|u,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(u){var f=this.changes;return this.changes=0,f},w})();r.RenderLoop=p}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,m){var d=e("../lib/oop"),p=e("../lib/dom"),w=e("../lib/lang"),u=e("../lib/event"),f=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,s=512,c=typeof ResizeObserver=="function",h=200,o=(function(){function l(g){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),g.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",s),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(g,b){g.width=g.height="auto",g.left=g.top="0px",g.visibility="hidden",g.position="absolute",g.whiteSpace="pre",f.isIE<8?g["font-family"]="inherit":g.font="inherit",g.overflow=b?"hidden":"visible"},l.prototype.checkForSizeChanges=function(g){if(g===void 0&&(g=this.$measureSizes()),g&&(this.$characterSize.width!==g.width||this.$characterSize.height!==g.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=g,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===g.width&&b.height===g.height,this._emit("changeCharacterSize",{data:g})}},l.prototype.$addObserver=function(){var g=this;this.$observer=new window.ResizeObserver(function(b){g.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var g=this;return this.$pollSizeChangesTimer=u.onIdle(function b(){g.checkForSizeChanges(),u.onIdle(b,500)},500)},l.prototype.setPolling=function(g){g?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(g){var b={height:(g||this.$measureNode).clientHeight,width:(g||this.$measureNode).clientWidth/s};return b.width===0||b.height===0?null:b},l.prototype.$measureCharWidth=function(g){this.$main.textContent=w.stringRepeat(g,s);var b=this.$main.getBoundingClientRect();return b.width/s},l.prototype.getCharacterWidth=function(g){var b=this.charSizes[g];return b===void 0&&(b=this.charSizes[g]=this.$measureCharWidth(g)/this.$characterSize.width),b},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(g){return!g||!g.parentElement?1:(Number(window.getComputedStyle(g).zoom)||1)*this.$getZoom(g.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var g=function(b,x){return["div",{style:"position: absolute;top:"+b+"px;left:"+x+"px;"}]};this.els=p.buildDom([g(0,0),g(h,0),g(0,h),g(h,h)],this.el)},l.prototype.transformCoordinates=function(g,b){if(g){var x=this.$getZoom(this.el);g=C(1/x,g)}function E(J,Q,le){var re=J[1]*Q[0]-J[0]*Q[1];return[(-Q[1]*le[0]+Q[0]*le[1])/re,(+J[1]*le[0]-J[0]*le[1])/re]}function $(J,Q){return[J[0]-Q[0],J[1]-Q[1]]}function _(J,Q){return[J[0]+Q[0],J[1]+Q[1]]}function C(J,Q){return[J*Q[0],J*Q[1]]}this.els||this.$initTransformMeasureNodes();function L(J){var Q=J.getBoundingClientRect();return[Q.left,Q.top]}var D=L(this.els[0]),I=L(this.els[1]),M=L(this.els[2]),W=L(this.els[3]),z=E($(W,I),$(W,M),$(_(I,M),_(W,D))),O=C(1+z[0],$(I,D)),T=C(1+z[1],$(M,D));if(b){var A=b,N=z[0]*A[0]/h+z[1]*A[1]/h+1,B=_(C(A[0],O),C(A[1],T));return _(C(1/N/h,B),D)}var U=$(g,D),G=E($(O,C(z[0],U)),$(T,C(z[1],U)),U);return C(h,G)},l})();o.prototype.$characterSize={width:0,height:0},d.implement(o.prototype,a),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,m){m.exports=`
|
|
258
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
|
259
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
|
260
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
261
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
262
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
263
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
264
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
265
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
266
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
267
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
268
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
269
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
270
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
271
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
272
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
.ace_editor {
|
|
276
|
+
position: relative;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
padding: 0;
|
|
279
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
280
|
+
direction: ltr;
|
|
281
|
+
text-align: left;
|
|
282
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
283
|
+
forced-color-adjust: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.ace_scroller {
|
|
287
|
+
position: absolute;
|
|
288
|
+
overflow: hidden;
|
|
289
|
+
top: 0;
|
|
290
|
+
bottom: 0;
|
|
291
|
+
background-color: inherit;
|
|
292
|
+
-ms-user-select: none;
|
|
293
|
+
-moz-user-select: none;
|
|
294
|
+
-webkit-user-select: none;
|
|
295
|
+
user-select: none;
|
|
296
|
+
cursor: text;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ace_content {
|
|
300
|
+
position: absolute;
|
|
301
|
+
box-sizing: border-box;
|
|
302
|
+
min-width: 100%;
|
|
303
|
+
contain: style size layout;
|
|
304
|
+
font-variant-ligatures: no-common-ligatures;
|
|
305
|
+
}
|
|
306
|
+
.ace_invisible {
|
|
307
|
+
font-variant-ligatures: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ace_keyboard-focus:focus {
|
|
311
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
312
|
+
outline: none;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ace_dragging .ace_scroller:before{
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: 0;
|
|
318
|
+
left: 0;
|
|
319
|
+
right: 0;
|
|
320
|
+
bottom: 0;
|
|
321
|
+
content: '';
|
|
322
|
+
background: rgba(250, 250, 250, 0.01);
|
|
323
|
+
z-index: 1000;
|
|
324
|
+
}
|
|
325
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
|
326
|
+
background: rgba(0, 0, 0, 0.01);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.ace_gutter {
|
|
330
|
+
position: absolute;
|
|
331
|
+
overflow : hidden;
|
|
332
|
+
width: auto;
|
|
333
|
+
top: 0;
|
|
334
|
+
bottom: 0;
|
|
335
|
+
left: 0;
|
|
336
|
+
cursor: default;
|
|
337
|
+
z-index: 4;
|
|
338
|
+
-ms-user-select: none;
|
|
339
|
+
-moz-user-select: none;
|
|
340
|
+
-webkit-user-select: none;
|
|
341
|
+
user-select: none;
|
|
342
|
+
contain: style size layout;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ace_gutter-active-line {
|
|
346
|
+
position: absolute;
|
|
347
|
+
left: 0;
|
|
348
|
+
right: 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.ace_scroller.ace_scroll-left:after {
|
|
352
|
+
content: "";
|
|
353
|
+
position: absolute;
|
|
354
|
+
top: 0;
|
|
355
|
+
right: 0;
|
|
356
|
+
bottom: 0;
|
|
357
|
+
left: 0;
|
|
358
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
359
|
+
pointer-events: none;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
363
|
+
position: absolute;
|
|
364
|
+
top: 0;
|
|
365
|
+
left: 0;
|
|
366
|
+
right: 0;
|
|
367
|
+
padding-left: 19px;
|
|
368
|
+
padding-right: 6px;
|
|
369
|
+
background-repeat: no-repeat;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
373
|
+
margin-left: -14px;
|
|
374
|
+
float: left;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
|
378
|
+
margin-left: -19px;
|
|
379
|
+
float: left;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
|
|
383
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
|
384
|
+
background-repeat: no-repeat;
|
|
385
|
+
background-position: 2px center;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
389
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
|
390
|
+
background-repeat: no-repeat;
|
|
391
|
+
background-position: 2px center;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
395
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
396
|
+
background-repeat: no-repeat;
|
|
397
|
+
background-position: 2px center;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
|
|
401
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.ace_icon_svg.ace_error {
|
|
405
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
406
|
+
background-color: crimson;
|
|
407
|
+
}
|
|
408
|
+
.ace_icon_svg.ace_security {
|
|
409
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
410
|
+
background-color: crimson;
|
|
411
|
+
}
|
|
412
|
+
.ace_icon_svg.ace_warning {
|
|
413
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
414
|
+
background-color: darkorange;
|
|
415
|
+
}
|
|
416
|
+
.ace_icon_svg.ace_info {
|
|
417
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
418
|
+
background-color: royalblue;
|
|
419
|
+
}
|
|
420
|
+
.ace_icon_svg.ace_hint {
|
|
421
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
422
|
+
background-color: silver;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.ace_icon_svg.ace_error_fold {
|
|
426
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
427
|
+
background-color: crimson;
|
|
428
|
+
}
|
|
429
|
+
.ace_icon_svg.ace_security_fold {
|
|
430
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
431
|
+
background-color: crimson;
|
|
432
|
+
}
|
|
433
|
+
.ace_icon_svg.ace_warning_fold {
|
|
434
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
435
|
+
background-color: darkorange;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.ace_scrollbar {
|
|
439
|
+
contain: strict;
|
|
440
|
+
position: absolute;
|
|
441
|
+
right: 0;
|
|
442
|
+
bottom: 0;
|
|
443
|
+
z-index: 6;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.ace_scrollbar-inner {
|
|
447
|
+
position: absolute;
|
|
448
|
+
cursor: text;
|
|
449
|
+
left: 0;
|
|
450
|
+
top: 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.ace_scrollbar-v{
|
|
454
|
+
overflow-x: hidden;
|
|
455
|
+
overflow-y: scroll;
|
|
456
|
+
top: 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.ace_scrollbar-h {
|
|
460
|
+
overflow-x: scroll;
|
|
461
|
+
overflow-y: hidden;
|
|
462
|
+
left: 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ace_print-margin {
|
|
466
|
+
position: absolute;
|
|
467
|
+
height: 100%;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.ace_text-input {
|
|
471
|
+
position: absolute;
|
|
472
|
+
z-index: 0;
|
|
473
|
+
width: 0.5em;
|
|
474
|
+
height: 1em;
|
|
475
|
+
opacity: 0;
|
|
476
|
+
background: transparent;
|
|
477
|
+
-moz-appearance: none;
|
|
478
|
+
appearance: none;
|
|
479
|
+
border: none;
|
|
480
|
+
resize: none;
|
|
481
|
+
outline: none;
|
|
482
|
+
overflow: hidden;
|
|
483
|
+
font: inherit;
|
|
484
|
+
padding: 0 1px;
|
|
485
|
+
margin: 0 -1px;
|
|
486
|
+
contain: strict;
|
|
487
|
+
-ms-user-select: text;
|
|
488
|
+
-moz-user-select: text;
|
|
489
|
+
-webkit-user-select: text;
|
|
490
|
+
user-select: text;
|
|
491
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
|
492
|
+
white-space: pre!important;
|
|
493
|
+
}
|
|
494
|
+
.ace_text-input.ace_composition {
|
|
495
|
+
background: transparent;
|
|
496
|
+
color: inherit;
|
|
497
|
+
z-index: 1000;
|
|
498
|
+
opacity: 1;
|
|
499
|
+
}
|
|
500
|
+
.ace_composition_placeholder { color: transparent }
|
|
501
|
+
.ace_composition_marker {
|
|
502
|
+
border-bottom: 1px solid;
|
|
503
|
+
position: absolute;
|
|
504
|
+
border-radius: 0;
|
|
505
|
+
margin-top: 1px;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
[ace_nocontext=true] {
|
|
509
|
+
transform: none!important;
|
|
510
|
+
filter: none!important;
|
|
511
|
+
clip-path: none!important;
|
|
512
|
+
mask : none!important;
|
|
513
|
+
contain: none!important;
|
|
514
|
+
perspective: none!important;
|
|
515
|
+
mix-blend-mode: initial!important;
|
|
516
|
+
z-index: auto;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.ace_layer {
|
|
520
|
+
z-index: 1;
|
|
521
|
+
position: absolute;
|
|
522
|
+
overflow: hidden;
|
|
523
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
524
|
+
word-wrap: normal;
|
|
525
|
+
white-space: pre;
|
|
526
|
+
height: 100%;
|
|
527
|
+
width: 100%;
|
|
528
|
+
box-sizing: border-box;
|
|
529
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
530
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
|
531
|
+
pointer-events: none;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.ace_gutter-layer {
|
|
535
|
+
position: relative;
|
|
536
|
+
width: auto;
|
|
537
|
+
text-align: right;
|
|
538
|
+
pointer-events: auto;
|
|
539
|
+
height: 1000000px;
|
|
540
|
+
contain: style size layout;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.ace_text-layer {
|
|
544
|
+
font: inherit !important;
|
|
545
|
+
position: absolute;
|
|
546
|
+
height: 1000000px;
|
|
547
|
+
width: 1000000px;
|
|
548
|
+
contain: style size layout;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
552
|
+
contain: style size layout;
|
|
553
|
+
position: absolute;
|
|
554
|
+
top: 0;
|
|
555
|
+
left: 0;
|
|
556
|
+
right: 0;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.ace_hidpi .ace_text-layer,
|
|
560
|
+
.ace_hidpi .ace_gutter-layer,
|
|
561
|
+
.ace_hidpi .ace_content,
|
|
562
|
+
.ace_hidpi .ace_gutter {
|
|
563
|
+
contain: strict;
|
|
564
|
+
}
|
|
565
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
|
566
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
567
|
+
contain: strict;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.ace_cjk {
|
|
571
|
+
display: inline-block;
|
|
572
|
+
text-align: center;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.ace_cursor-layer {
|
|
576
|
+
z-index: 4;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.ace_cursor {
|
|
580
|
+
z-index: 4;
|
|
581
|
+
position: absolute;
|
|
582
|
+
box-sizing: border-box;
|
|
583
|
+
border-left: 2px solid;
|
|
584
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
585
|
+
transform: translatez(0);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.ace_multiselect .ace_cursor {
|
|
589
|
+
border-left-width: 1px;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.ace_slim-cursors .ace_cursor {
|
|
593
|
+
border-left-width: 1px;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.ace_overwrite-cursors .ace_cursor {
|
|
597
|
+
border-left-width: 0;
|
|
598
|
+
border-bottom: 1px solid;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.ace_hidden-cursors .ace_cursor {
|
|
602
|
+
opacity: 0.2;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
606
|
+
opacity: 0;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.ace_smooth-blinking .ace_cursor {
|
|
610
|
+
transition: opacity 0.18s;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.ace_animate-blinking .ace_cursor {
|
|
614
|
+
animation-duration: 1000ms;
|
|
615
|
+
animation-timing-function: step-end;
|
|
616
|
+
animation-name: blink-ace-animate;
|
|
617
|
+
animation-iteration-count: infinite;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
621
|
+
animation-duration: 1000ms;
|
|
622
|
+
animation-timing-function: ease-in-out;
|
|
623
|
+
animation-name: blink-ace-animate-smooth;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
@keyframes blink-ace-animate {
|
|
627
|
+
from, to { opacity: 1; }
|
|
628
|
+
60% { opacity: 0; }
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
@keyframes blink-ace-animate-smooth {
|
|
632
|
+
from, to { opacity: 1; }
|
|
633
|
+
45% { opacity: 1; }
|
|
634
|
+
60% { opacity: 0; }
|
|
635
|
+
85% { opacity: 0; }
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
639
|
+
position: absolute;
|
|
640
|
+
z-index: 3;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.ace_marker-layer .ace_selection {
|
|
644
|
+
position: absolute;
|
|
645
|
+
z-index: 5;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.ace_marker-layer .ace_bracket {
|
|
649
|
+
position: absolute;
|
|
650
|
+
z-index: 6;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.ace_marker-layer .ace_error_bracket {
|
|
654
|
+
position: absolute;
|
|
655
|
+
border-bottom: 1px solid #DE5555;
|
|
656
|
+
border-radius: 0;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.ace_marker-layer .ace_active-line {
|
|
660
|
+
position: absolute;
|
|
661
|
+
z-index: 2;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ace_marker-layer .ace_selected-word {
|
|
665
|
+
position: absolute;
|
|
666
|
+
z-index: 4;
|
|
667
|
+
box-sizing: border-box;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.ace_line .ace_fold {
|
|
671
|
+
box-sizing: border-box;
|
|
672
|
+
|
|
673
|
+
display: inline-block;
|
|
674
|
+
height: 11px;
|
|
675
|
+
margin-top: -2px;
|
|
676
|
+
vertical-align: middle;
|
|
677
|
+
|
|
678
|
+
background-image:
|
|
679
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
680
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
681
|
+
background-repeat: no-repeat, repeat-x;
|
|
682
|
+
background-position: center center, top left;
|
|
683
|
+
color: transparent;
|
|
684
|
+
|
|
685
|
+
border: 1px solid black;
|
|
686
|
+
border-radius: 2px;
|
|
687
|
+
|
|
688
|
+
cursor: pointer;
|
|
689
|
+
pointer-events: auto;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.ace_dark .ace_fold {
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.ace_fold:hover{
|
|
696
|
+
background-image:
|
|
697
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
698
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.ace_tooltip {
|
|
702
|
+
background-color: #f5f5f5;
|
|
703
|
+
border: 1px solid gray;
|
|
704
|
+
border-radius: 1px;
|
|
705
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
706
|
+
color: black;
|
|
707
|
+
padding: 3px 4px;
|
|
708
|
+
position: fixed;
|
|
709
|
+
z-index: 999999;
|
|
710
|
+
box-sizing: border-box;
|
|
711
|
+
cursor: default;
|
|
712
|
+
white-space: pre-wrap;
|
|
713
|
+
word-wrap: break-word;
|
|
714
|
+
line-height: normal;
|
|
715
|
+
font-style: normal;
|
|
716
|
+
font-weight: normal;
|
|
717
|
+
letter-spacing: normal;
|
|
718
|
+
pointer-events: none;
|
|
719
|
+
overflow: auto;
|
|
720
|
+
max-width: min(33em, 66vw);
|
|
721
|
+
overscroll-behavior: contain;
|
|
722
|
+
}
|
|
723
|
+
.ace_tooltip pre {
|
|
724
|
+
white-space: pre-wrap;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.ace_tooltip.ace_dark {
|
|
728
|
+
background-color: #636363;
|
|
729
|
+
color: #fff;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.ace_tooltip:focus {
|
|
733
|
+
outline: 1px solid #5E9ED6;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.ace_icon {
|
|
737
|
+
display: inline-block;
|
|
738
|
+
width: 18px;
|
|
739
|
+
vertical-align: top;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.ace_icon_svg {
|
|
743
|
+
display: inline-block;
|
|
744
|
+
width: 12px;
|
|
745
|
+
vertical-align: top;
|
|
746
|
+
-webkit-mask-repeat: no-repeat;
|
|
747
|
+
-webkit-mask-size: 12px;
|
|
748
|
+
-webkit-mask-position: center;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
752
|
+
padding-right: 13px;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.ace_fold-widget, .ace_custom-widget {
|
|
756
|
+
box-sizing: border-box;
|
|
757
|
+
|
|
758
|
+
margin: 0 -12px 0 1px;
|
|
759
|
+
display: none;
|
|
760
|
+
width: 11px;
|
|
761
|
+
vertical-align: top;
|
|
762
|
+
|
|
763
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
764
|
+
background-repeat: no-repeat;
|
|
765
|
+
background-position: center;
|
|
766
|
+
|
|
767
|
+
border-radius: 3px;
|
|
768
|
+
|
|
769
|
+
border: 1px solid transparent;
|
|
770
|
+
cursor: pointer;
|
|
771
|
+
pointer-events: auto;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.ace_custom-widget {
|
|
775
|
+
background: none;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.ace_folding-enabled .ace_fold-widget {
|
|
779
|
+
display: inline-block;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.ace_fold-widget.ace_end {
|
|
783
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.ace_fold-widget.ace_closed {
|
|
787
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.ace_fold-widget:hover {
|
|
791
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
792
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
793
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.ace_fold-widget:active {
|
|
797
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
798
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
799
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Dark version for fold widgets
|
|
803
|
+
*/
|
|
804
|
+
.ace_dark .ace_fold-widget {
|
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
806
|
+
}
|
|
807
|
+
.ace_dark .ace_fold-widget.ace_end {
|
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
809
|
+
}
|
|
810
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
|
811
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
812
|
+
}
|
|
813
|
+
.ace_dark .ace_fold-widget:hover {
|
|
814
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
815
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
816
|
+
}
|
|
817
|
+
.ace_dark .ace_fold-widget:active {
|
|
818
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.ace_inline_button {
|
|
822
|
+
border: 1px solid lightgray;
|
|
823
|
+
display: inline-block;
|
|
824
|
+
margin: -1px 8px;
|
|
825
|
+
padding: 0 5px;
|
|
826
|
+
pointer-events: auto;
|
|
827
|
+
cursor: pointer;
|
|
828
|
+
}
|
|
829
|
+
.ace_inline_button:hover {
|
|
830
|
+
border-color: gray;
|
|
831
|
+
background: rgba(200,200,200,0.2);
|
|
832
|
+
display: inline-block;
|
|
833
|
+
pointer-events: auto;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.ace_fold-widget.ace_invalid {
|
|
837
|
+
background-color: #FFB4B4;
|
|
838
|
+
border-color: #DE5555;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
|
842
|
+
transition: opacity 0.4s ease 0.05s;
|
|
843
|
+
opacity: 0;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
847
|
+
transition: opacity 0.05s ease 0.05s;
|
|
848
|
+
opacity:1;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
.ace_underline {
|
|
852
|
+
text-decoration: underline;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.ace_bold {
|
|
856
|
+
font-weight: bold;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.ace_nobold .ace_bold {
|
|
860
|
+
font-weight: normal;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.ace_italic {
|
|
864
|
+
font-style: italic;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
.ace_error-marker {
|
|
869
|
+
background-color: rgba(255, 0, 0,0.2);
|
|
870
|
+
position: absolute;
|
|
871
|
+
z-index: 9;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.ace_highlight-marker {
|
|
875
|
+
background-color: rgba(255, 255, 0,0.2);
|
|
876
|
+
position: absolute;
|
|
877
|
+
z-index: 8;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.ace_mobile-menu {
|
|
881
|
+
position: absolute;
|
|
882
|
+
line-height: 1.5;
|
|
883
|
+
border-radius: 4px;
|
|
884
|
+
-ms-user-select: none;
|
|
885
|
+
-moz-user-select: none;
|
|
886
|
+
-webkit-user-select: none;
|
|
887
|
+
user-select: none;
|
|
888
|
+
background: white;
|
|
889
|
+
box-shadow: 1px 3px 2px grey;
|
|
890
|
+
border: 1px solid #dcdcdc;
|
|
891
|
+
color: black;
|
|
892
|
+
}
|
|
893
|
+
.ace_dark > .ace_mobile-menu {
|
|
894
|
+
background: #333;
|
|
895
|
+
color: #ccc;
|
|
896
|
+
box-shadow: 1px 3px 2px grey;
|
|
897
|
+
border: 1px solid #444;
|
|
898
|
+
|
|
899
|
+
}
|
|
900
|
+
.ace_mobile-button {
|
|
901
|
+
padding: 2px;
|
|
902
|
+
cursor: pointer;
|
|
903
|
+
overflow: hidden;
|
|
904
|
+
}
|
|
905
|
+
.ace_mobile-button:hover {
|
|
906
|
+
background-color: #eee;
|
|
907
|
+
opacity:1;
|
|
908
|
+
}
|
|
909
|
+
.ace_mobile-button:active {
|
|
910
|
+
background-color: #ddd;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.ace_placeholder {
|
|
914
|
+
position: relative;
|
|
915
|
+
font-family: arial;
|
|
916
|
+
transform: scale(0.9);
|
|
917
|
+
transform-origin: left;
|
|
918
|
+
white-space: pre;
|
|
919
|
+
opacity: 0.7;
|
|
920
|
+
margin: 0 10px;
|
|
921
|
+
z-index: 1;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.ace_ghost_text {
|
|
925
|
+
opacity: 0.5;
|
|
926
|
+
font-style: italic;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.ace_ghost_text_container > div {
|
|
930
|
+
white-space: pre;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.ghost_text_line_wrapped::after {
|
|
934
|
+
content: "↩";
|
|
935
|
+
position: absolute;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
|
939
|
+
margin: 0px 4px
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.ace_screenreader-only {
|
|
943
|
+
position:absolute;
|
|
944
|
+
left:-10000px;
|
|
945
|
+
top:auto;
|
|
946
|
+
width:1px;
|
|
947
|
+
height:1px;
|
|
948
|
+
overflow:hidden;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.ace_hidden_token {
|
|
952
|
+
display: none;
|
|
953
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var d=e("../lib/dom"),p=e("../lib/oop"),w=e("../lib/event_emitter").EventEmitter,u=(function(){function f(a,s){this.renderer=s,this.pixelRatio=1,this.maxHeight=s.layerConfig.maxHeight,this.lineHeight=s.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(a)}return f.prototype.$createCanvas=function(){this.canvas=d.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},f.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var s=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var c=this.canvas.getContext("2d");function h(O,T){return O.priority<T.priority?-1:O.priority>T.priority?1:0}var o=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),o){var l={info:1,warning:2,error:3};o.forEach(function(O){O.priority=l[O.type]||null}),o=o.sort(h);for(var g=0;g<o.length;g++){var b=o[g].row,x=this.getVerticalOffsetForRow(b),E=x+this.lineHeight,$=Math.round(this.heightRatio*x),_=Math.round(this.heightRatio*E),C=Math.round(($+_)/2),L=_-C;L<this.halfMinDecorationHeight&&(L=this.halfMinDecorationHeight),C-L<0&&(C=L),C+L>this.canvasHeight&&(C=this.canvasHeight-L);var D=C-L,I=C+L,M=I-D;c.fillStyle=s[o[g].type]||null,c.fillRect(0,D,Math.round(this.oneZoneWidth-1),M)}}var W=this.renderer.session.selection.getCursor();if(W){var z=Math.round(this.getVerticalOffsetForRow(W.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,z,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(a){a=a|0;var s=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return s},f.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},f.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},f.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},f})();p.implement(u.prototype,w),r.Decorator=u}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,r,m){var d=e("./lib/oop"),p=e("./lib/dom"),w=e("./lib/lang"),u=e("./config"),f=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,s=e("./layer/text").Text,c=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,l=e("./scrollbar_custom").HScrollBar,g=e("./scrollbar_custom").VScrollBar,b=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,E=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),_=e("./layer/decorators").Decorator,C=e("./lib/useragent"),L=e("./layer/text_util").isTextToken;p.importCssString($,"ace_editor.css",!1);var D=(function(){function I(M,W){var z=this;this.container=M||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(W),u.get("useStrictCSP")==null&&u.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var O=this.$textLayer=new s(this.content);this.canvas=O.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",function(T){z.$scrollAnimation||z.session.setScrollTop(T.data-z.scrollMargin.top)}),this.scrollBarH.on("scroll",function(T){z.$scrollAnimation||z.session.setScrollLeft(T.data-z.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(T){z.updateCharacterSize(),z.onResize(!0,z.gutterWidth,z.$size.width,z.$size.height),z._signal("changeCharacterSize",T)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),u.resetOptions(this),u._signal("renderer",this)}return I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(M){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=M,M&&this.scrollMargin.top&&M.getScrollTop()<=0&&M.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(M),this.$markerBack.setSession(M),this.$markerFront.setSession(M),this.$gutterLayer.setSession(M),this.$textLayer.setSession(M),M&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},I.prototype.updateLines=function(M,W,z){if(W===void 0&&(W=1/0),this.$changedLines?(this.$changedLines.firstRow>M&&(this.$changedLines.firstRow=M),this.$changedLines.lastRow<W&&(this.$changedLines.lastRow=W)):this.$changedLines={firstRow:M,lastRow:W},this.$changedLines.lastRow<this.layerConfig.firstRow)if(z)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(M,W,z,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var T=this.container;O||(O=T.clientHeight||T.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!T.style.height||T.style.height=="0px")&&(T.style.height="1px",O=T.clientHeight||T.scrollHeight),z||(z=T.clientWidth||T.scrollWidth);var A=this.$updateCachedSize(M,W,z,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!z&&!O)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?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)}},I.prototype.$updateCachedSize=function(M,W,z,O){O-=this.$extraHeight||0;var T=0,A=this.$size,N={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(M||A.height!=O)&&(A.height=O,T|=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",T=T|this.CHANGE_SCROLL),z&&(M||A.width!=z)){T|=this.CHANGE_SIZE,A.width=z,W==null&&(W=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=W,p.setStyle(this.scrollBarH.element.style,"left",W+"px"),p.setStyle(this.scroller.style,"left",W+this.margin.left+"px"),A.scrollerWidth=Math.max(0,z-W-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",B),p.setStyle(this.scroller.style,"right",B),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(T|=this.CHANGE_FULL)}return A.$dirty=!z||!O,T&&this._signal("resize",N),T},I.prototype.onGutterResize=function(M){var W=this.$showGutter?M:0;W!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,W,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},I.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,W=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(W,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},I.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},I.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=p.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var W=this.$printMarginEl.style;W.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",W.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,W=this.$composition;if(!this.$keepTextAreaAtCursor&&!W){p.translate(this.textarea,-100,0);return}var z=this.$cursorLayer.$pixelPos;if(z){W&&W.markerRange&&(z=this.$cursorLayer.getPixelPosition(W.markerRange.start,!0));var O=this.layerConfig,T=z.top,A=z.left;T-=O.offset;var N=W&&W.useTextareaForIME||C.isMobile?this.lineHeight:1;if(T<0||T>O.height-N){p.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!W)T+=this.lineHeight;else if(W.useTextareaForIME){var G=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else T+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,p.setStyle(M,"height",N+"px"),p.setStyle(M,"width",B+"px"),p.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(T,U))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,W=M.lastRow,z=this.session.documentToScreenRow(W,0)*M.lineHeight;return z-this.session.getScrollTop()>M.height-M.lineHeight?W-1:W},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(M,W,z,O){var T=this.scrollMargin;T.top=M|0,T.bottom=W|0,T.right=O|0,T.left=z|0,T.v=T.top+T.bottom,T.h=T.left+T.right,T.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-T.top),this.updateFull()},I.prototype.setMargin=function(M,W,z,O){var T=this.margin;T.top=M|0,T.bottom=W|0,T.right=O|0,T.left=z|0,T.v=T.top+T.bottom,T.h=T.left+T.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},I.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,W=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(W-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-W&&(M=this.scrollTop+W,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(M,W){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!W){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var z=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),z.firstRow!=this.layerConfig.firstRow&&z.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(z.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}z=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-z.offset);var T=z.width+2*this.$padding+"px",A=z.minHeight+"px";p.setStyle(this.content.style,"width",T),p.setStyle(this.content.style,"height",A)}if(M&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-z.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(z),this.$showGutter&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z),this.$markerBack.update(z),this.$markerFront.update(z),this.$cursorLayer.update(z),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(z):this.$textLayer.scrollLines(z),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(z):this.$gutterLayer.scrollLines(z)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z),this.$markerBack.update(z),this.$markerFront.update(z),this.$cursorLayer.update(z),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(z),this.$showGutter&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(z),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(z),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(z),this._signal("afterRender",M)},I.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,W=this.$maxLines*this.lineHeight,z=Math.min(W,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(z+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&z>this.$maxPixelHeight&&(z=this.$maxPixelHeight);var O=z<=2*this.lineHeight,T=!O&&M>W;if(z!=this.desiredHeight||this.$size.height!=this.desiredHeight||T!=this.$vScroll){T!=this.$vScroll&&(this.$vScroll=T,this.scrollBarV.setVisible(T));var A=this.container.clientWidth;this.container.style.height=z+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,z),this.desiredHeight=z,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var M=this.session,W=this.$size,z=W.height<=2*this.lineHeight,O=this.session.getScreenLength(),T=O*this.lineHeight,A=this.$getLongestLine(),N=!z&&(this.$hScrollBarAlwaysVisible||W.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(),z=W.height<=2*this.lineHeight);var G=W.scrollerHeight+this.lineHeight,J=!this.$maxLines&&this.$scrollPastEnd?(W.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;T+=J;var Q=this.scrollMargin;this.session.setScrollTop(Math.max(-Q.top,Math.min(this.scrollTop,T-W.scrollerHeight+Q.bottom))),this.session.setScrollLeft(Math.max(-Q.left,Math.min(this.scrollLeft,A+2*this.$padding-W.scrollerWidth+Q.right)));var le=!z&&(this.$vScrollBarAlwaysVisible||W.scrollerHeight-T+J<0||this.scrollTop>Q.top),re=U!==le;re&&(this.$vScroll=le,this.scrollBarV.setVisible(le));var ce=this.scrollTop%this.lineHeight,de=Math.ceil(G/this.lineHeight)-1,ie=Math.max(0,Math.round((this.scrollTop-ce)/this.lineHeight)),fe=ie+de,$e,Re,Ee=this.lineHeight;ie=M.screenToDocumentRow(ie,0);var Ue=M.getFoldLine(ie);Ue&&(ie=Ue.start.row),$e=M.documentToScreenRow(ie,0),Re=M.getRowLength(ie)*Ee,fe=Math.min(M.screenToDocumentRow(fe,0),M.getLength()-1),G=W.scrollerHeight+M.getRowLength(fe)*Ee+Re,ce=this.scrollTop-$e*Ee,ce<0&&$e>0&&($e=Math.max(0,$e+Math.floor(ce/Ee)),ce=this.scrollTop-$e*Ee);var He=0;return(this.layerConfig.width!=A||B)&&(He=this.CHANGE_H_SCROLL),(B||re)&&(He|=this.$updateCachedSize(!0,this.gutterWidth,W.width,W.height),this._signal("scrollbarVisibilityChanged"),re&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:ie,firstRowScreen:$e,lastRow:fe,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:G,maxHeight:T,offset:ce,gutterOffset:Ee?Math.max(0,Math.ceil((ce+W.height-W.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),He},I.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,W=this.$changedLines.lastRow;this.$changedLines=null;var z=this.layerConfig;if(!(M>z.lastRow+1)&&!(W<z.firstRow)){if(W===1/0){this.$showGutter&&this.$gutterLayer.update(z),this.$textLayer.update(z);return}return this.$textLayer.updateLines(z,M,W),!0}}},I.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(M,W){this.$gutterLayer.addGutterDecoration(M,W)},I.prototype.removeGutterDecoration=function(M,W){this.$gutterLayer.removeGutterDecoration(M,W)},I.prototype.updateBreakpoints=function(M){this._rows=M,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(M,W,z){this.scrollCursorIntoView(M,z),this.scrollCursorIntoView(W,z)},I.prototype.scrollCursorIntoView=function(M,W,z){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(M),T=O.left,A=O.top,N=z&&z.top||0,B=z&&z.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>A?(W&&U+N>A+this.lineHeight&&(A-=W*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(W&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=W*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var G=this.scrollLeft,J=2*this.layerConfig.characterWidth;T-J<G?(T-=J,T<this.$padding+J&&(T=-this.scrollMargin.left),this.session.setScrollLeft(T)):(T+=J,G+this.$size.scrollerWidth<T+this.characterWidth?this.session.setScrollLeft(Math.round(T+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&T-G<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(M){this.session.setScrollTop(M*this.lineHeight)},I.prototype.alignCursor=function(M,W){typeof M=="number"&&(M={row:M,column:0});var z=this.$cursorLayer.getPixelPosition(M),O=this.$size.scrollerHeight-this.lineHeight,T=z.top-O*(W||0);return this.session.setScrollTop(T),T},I.prototype.$calcSteps=function(M,W){var z=0,O=this.STEPS,T=[],A=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(z=0;z<O;++z)T.push(A(z/this.STEPS,M,W-M));return T},I.prototype.scrollToLine=function(M,W,z,O){var T=this.$cursorLayer.getPixelPosition({row:M,column:0}),A=T.top;W&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),z!==!1&&this.animateScrolling(N,O)},I.prototype.animateScrolling=function(M,W){var z=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(M==z)return;if(this.$scrollAnimation){var T=this.$scrollAnimation.steps;if(T.length&&(M=T[0],M==z))return}var A=O.$calcSteps(M,z);this.$scrollAnimation={from:M,to:z,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=z;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,W&&W()}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=z):z!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(z),z=null):N()},10)},I.prototype.scrollToY=function(M){this.scrollTop!==M&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=M)},I.prototype.scrollToX=function(M){this.scrollLeft!==M&&(this.scrollLeft=M),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(M,W){this.session.setScrollTop(W),this.session.setScrollLeft(M)},I.prototype.scrollBy=function(M,W){W&&this.session.setScrollTop(this.session.getScrollTop()+W),M&&this.session.setScrollLeft(this.session.getScrollLeft()+M)},I.prototype.isScrollableBy=function(M,W){if(W<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||W>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(M,W){var z;if(this.$hasCssTransforms){z={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([M,W]);M=O[1]-this.gutterWidth-this.margin.left,W=O[0]}else z=this.scroller.getBoundingClientRect();var T=M+this.scrollLeft-z.left-this.$padding,A=T/this.characterWidth,N=Math.floor((W+this.scrollTop-z.top)/this.lineHeight),B=this.$blockCursor?Math.floor(A):Math.round(A);return{row:N,column:B,side:A-B>0?1:-1,offsetX:T}},I.prototype.screenToTextCoordinates=function(M,W){var z;if(this.$hasCssTransforms){z={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([M,W]);M=O[1]-this.gutterWidth-this.margin.left,W=O[0]}else z=this.scroller.getBoundingClientRect();var T=M+this.scrollLeft-z.left-this.$padding,A=T/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=(W+this.scrollTop-z.top)/this.lineHeight;return this.session.screenToDocumentPosition(B,Math.max(N,0),T)},I.prototype.textToScreenCoordinates=function(M,W){var z=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(M,W),T=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,M)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:z.left+T-this.scrollLeft,pageY:z.top+A-this.scrollTop}},I.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(M){var W=this.session.selection.cursor;this.addToken(M,"composition_placeholder",W.row,W.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(M,W){var z=this.session.selection.cursor,O=W||{row:z.row,column:z.column};this.removeGhostText();var T=this.$calculateWrappedTextChunks(M,O);this.addToken(T[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:M,position:{row:O.row,column:O.column}};var A=p.createElement("div");if(T.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;T.slice(1).forEach(function(re){var ce=p.createElement("div"),de=p.createElement("span");de.className="ace_ghost_text",re.wrapped&&(ce.className="ghost_text_line_wrapped"),re.text.length===0&&(re.text=" "),de.appendChild(p.createTextNode(re.text)),ce.appendChild(de),A.appendChild(ce),B=ce}),N.forEach(function(re){var ce=p.createElement("span");L(re.type)||(ce.className="ace_"+re.type.replace(/\./g," ace_")),ce.appendChild(p.createTextNode(re.value)),B.appendChild(ce)}),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),G=this.container,J=G.getBoundingClientRect().height,Q=T.length*this.lineHeight,le=Q<J-U.top;if(le)return;Q<J?this.scrollBy(0,(T.length-1)*this.lineHeight):this.scrollToRow(O.row)}},I.prototype.$calculateWrappedTextChunks=function(M,W){var z=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(z/this.characterWidth)-2;O=O<=0?60:O;for(var T=M.split(/\r?\n/),A=[],N=0;N<T.length;N++){var B=this.session.$getDisplayTokens(T[N],W.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var G=0;U.push(T[N].length);for(var J=0;J<U.length;J++){var Q=T[N].slice(G,U[J]);A.push({text:Q,wrapped:!0}),G=U[J]}}else A.push({text:T[N],wrapped:!1})}return A},I.prototype.removeGhostText=function(){if(this.$ghostText){var M=this.$ghostText.position;this.removeExtraToken(M.row,M.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(M,W,z,O){var T=this.session;T.bgTokenizer.lines[z]=null;var A={type:W,value:M},N=T.getTokens(z);if(O==null||!N.length)N.push(A);else for(var B=0,U=0;U<N.length;U++){var G=N[U];if(B+=G.value.length,O<=B){var J=G.value.length-(B-O),Q=G.value.slice(0,J),le=G.value.slice(J);N.splice(U,1,{type:G.type,value:Q},A,{type:G.type,value:le});break}}this.updateLines(z,z)},I.prototype.hideTokensAfterPosition=function(M,W){for(var z=this.session.getTokens(M),O=0,T=!1,A=[],N=0;N<z.length;N++){var B=z[N];if(O+=B.value.length,B.type!=="ghost_text"){if(T){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===W&&(T=!0)}}return this.updateLines(M,M),A},I.prototype.removeExtraToken=function(M,W){this.session.bgTokenizer.lines[M]=null,this.updateLines(M,M)},I.prototype.setTheme=function(M,W){var z=this;if(this.$themeId=M,z._dispatchEvent("themeChange",{theme:M}),!M||typeof M=="string"){var O=M||this.$options.theme.initialValue;u.loadModule(["theme",O],T)}else T(M);function T(A){if(z.$themeId!=M)return W&&W();if(!A||!A.cssClass)throw new Error("couldn't load module "+M+" or it didn't call define");A.$id&&(z.$themeId=A.$id),p.importCssString(A.cssText,A.cssClass,z.container),z.theme&&p.removeCssClass(z.container,z.theme.cssClass);var N="padding"in A?A.padding:"padding"in(z.theme||{})?4:z.$padding;if(z.$padding&&N!=z.$padding&&z.setPadding(N),z.$gutterLayer){var B=A.$showGutterCursorMarker;B&&!z.$gutterLayer.$showCursorMarker?z.$gutterLayer.$showCursorMarker="theme":!B&&z.$gutterLayer.$showCursorMarker=="theme"&&(z.$gutterLayer.$showCursorMarker=null)}z.$theme=A.cssClass,z.theme=A,p.addCssClass(z.container,A.cssClass),p.setCssClass(z.container,"ace_dark",A.isDark),z.$size&&(z.$size.width=0,z.$updateSizeAsync()),z._dispatchEvent("themeLoaded",{theme:A}),W&&W(),C.isSafari&&z.scroller&&(z.scroller.style.background="red",z.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(M,W){p.setCssClass(this.container,M,W!==!1)},I.prototype.unsetStyle=function(M){p.removeCssClass(this.container,M)},I.prototype.setCursorStyle=function(M){p.setStyle(this.scroller.style,"cursor",M)},I.prototype.setMouseCursor=function(M){p.setStyle(this.scroller.style,"cursor",M)},I.prototype.attachToShadowRoot=function(){p.importCssString($,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(M){var W=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),M===!0?(this.scrollBarV=new g(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollTop(z.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollLeft(z.data-W.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollTop(z.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollLeft(z.data-W.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var M=this;this.$resizeTimer=w.delayedCall(function(){M.destroyed||M.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(W){var z=W[0].contentRect.width,O=W[0].contentRect.height;Math.abs(M.$size.width-z)>1||Math.abs(M.$size.height-O)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I})();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,d.implement(D.prototype,E),u.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=D}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,m){var d=e("../lib/oop"),p=e("../lib/net"),w=e("../lib/event_emitter").EventEmitter,u=e("../config");function f(h){var o="importScripts('"+p.qualifyURL(h)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,g=new l;return g.append(o),g.getBlob("application/javascript")}}function a(h){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(u.get("loadWorkerFromBlob")){var o=f(h),l=window.URL||window.webkitURL,g=l.createObjectURL(o);return new Worker(g)}return new Worker(h)}var s=function(h){h.postMessage||(h=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=h,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){d.implement(this,w),this.$createWorkerFromOldConfig=function(h,o,l,g,b){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),u.get("packaged")||!e.toUrl)g=g||u.moduleUrl(o,"worker");else{var x=this.$normalizePath;g=g||x(e.toUrl("ace/worker/worker.js",null,"_"));var E={};h.forEach(function($){E[$]=x(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(g),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:l}),this.$worker},this.onMessage=function(h){var o=h.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var l=this.callbacks[o.id];l&&(l(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(h){window.console&&console.error&&console.error(h)},this.$normalizePath=function(h){return p.qualifyURL(h)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(h){h.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(h,o){this.$worker.postMessage({command:h,args:o})},this.call=function(h,o,l){if(l){var g=this.callbackId++;this.callbacks[g]=l,o.push(g)}this.send(h,o)},this.emit=function(h,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:h,data:{data:o.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(h){this.$doc&&this.terminate(),this.$doc=h,this.call("setValue",[h.getValue()]),h.on("change",this.changeListener,!0)},this.changeListener=function(h){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),h.action=="insert"?this.deltaQueue.push(h.start,h.lines):this.deltaQueue.push(h.start,h.end)},this.$sendDeltaQueue=function(){var h=this.deltaQueue;h&&(this.deltaQueue=null,h.length>50&&h.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:h}))}}).call(s.prototype);var c=function(h,o,l){var g=null,b=!1,x=Object.create(w),E=[],$=new s({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),g&&(b?setTimeout(_):_())}});$.setEmitSync=function(C){b=C};var _=function(){var C=E.shift();C.command?g[C.command].apply(g,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,L){this.postMessage({type:"call",id:L,data:C})},x.emit=function(C,L){this.postMessage({type:"event",name:C,data:L})},u.loadModule(["worker",o],function(C){for(g=new C[l](x);E.length;)_()}),$};r.UIWorkerClient=c,r.WorkerClient=s,r.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,m){var d=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,w=e("./lib/oop"),u=(function(){function f(a,s,c,h,o,l){var g=this;this.length=s,this.session=a,this.doc=a.getDocument(),this.mainClass=o,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=h,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var b=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var a=this,s=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=s.createAnchor(this.$pos.row,this.$pos.column);var h=this.pos;h.$insertRight=!0,h.detach(),h.markerId=c.addMarker(new d(h.row,h.column,h.row,h.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var l=s.createAnchor(o.row,o.column);l.$insertRight=!0,l.detach(),a.others.push(l)}),c.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,s=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new d(c.row,c.column,c.row,c.column+s.length),s.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},f.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var s=a;if(s.start.row===s.end.row&&s.start.row===this.pos.row){this.$updating=!0;var c=a.action==="insert"?s.end.column-s.start.column:s.start.column-s.end.column,h=s.start.column>=this.pos.column&&s.start.column<=this.pos.column+this.length+1,o=s.start.column-this.pos.column;if(this.updateAnchors(a),h&&(this.length+=c),h&&!this.session.$fromUndo){if(a.action==="insert")for(var l=this.others.length-1;l>=0;l--){var g=this.others[l],b={row:g.row,column:g.column+o};this.doc.insertMergedLines(b,a.lines)}else if(a.action==="remove")for(var l=this.others.length-1;l>=0;l--){var g=this.others[l],b={row:g.row,column:g.column+o};this.doc.remove(new d(b.row,b.column,b.row,b.column-c))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var s=this.others.length;s--;)this.others[s].onChange(a);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var a=this,s=this.session,c=function(o,l){s.removeMarker(o.markerId),o.markerId=s.addMarker(new d(o.row,o.column,o.row,o.column+a.length),l,null,!1)};c(this.pos,this.mainClass);for(var h=this.others.length;h--;)c(this.others[h],this.othersClass)}},f.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var s=this.session.selection.getCursor();s.row===this.pos.row&&s.column>=this.pos.column&&s.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},f.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),s=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;c<s;c++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f})();w.implement(u.prototype,p),r.PlaceHolder=u}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var d=e("../lib/event"),p=e("../lib/useragent");function w(f,a){return f.row==a.row&&f.column==a.column}function u(f){var a=f.domEvent,s=a.altKey,c=a.shiftKey,h=a.ctrlKey,o=f.getAccelKey(),l=f.getButton();if(h&&p.isMac&&(l=a.button),f.editor.inMultiSelectMode&&l==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!h&&!s&&!o){l===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(l===0){var g=f.editor,b=g.selection,x=g.inMultiSelectMode,E=f.getDocumentPosition(),$=b.getCursor(),_=f.inSelection()||b.isEmpty()&&w(E,$),C=f.x,L=f.y,D=function(Q){C=Q.clientX,L=Q.clientY},I=g.session,M=g.renderer.pixelToScreenCoordinates(C,L),W=M,z;if(g.$mouseHandler.$enableJumpToDef)h&&s||o&&s?z=c?"block":"add":s&&g.$blockSelectEnabled&&(z="block");else if(o&&!s){if(z="add",!x&&c)return}else s&&g.$blockSelectEnabled&&(z="block");if(z&&p.isMac&&a.ctrlKey&&g.$mouseHandler.cancelContextMenu(),z=="add"){if(!x&&_)return;if(!x){var O=b.toOrientedRange();g.addSelectionMarker(O)}var T=b.rangeList.rangeAtPoint(E);g.inVirtualSelectionMode=!0,c&&(T=null,O=b.ranges[0]||O,g.removeSelectionMarker(O)),g.once("mouseup",function(){var Q=b.toOrientedRange();T&&Q.isEmpty()&&w(T.cursor,Q.cursor)?b.substractPoint(Q.cursor):(c?b.substractPoint(O.cursor):O&&(g.removeSelectionMarker(O),b.addRange(O)),b.addRange(Q)),g.inVirtualSelectionMode=!1})}else if(z=="block"){f.stop(),g.inVirtualSelectionMode=!0;var A,N=[],B=function(){var Q=g.renderer.pixelToScreenCoordinates(C,L),le=I.screenToDocumentPosition(Q.row,Q.column,Q.offsetX);w(W,Q)&&w(le,b.lead)||(W=Q,g.selection.moveToPosition(le),g.renderer.scrollCursorIntoView(),g.removeSelectionMarkers(N),N=b.rectangularRangeBlock(W,M),g.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=g.$mouseHandler.$clickSelection.clone()),N.forEach(g.addSelectionMarker,g),g.updateSelectionMarkers())};x&&!o?b.toSingleRange():!x&&o&&(A=b.toOrientedRange(),g.addSelectionMarker(A)),c?M=I.documentToScreenPosition(b.lead):b.moveToPosition(E),W={row:-1,column:-1};var U=function(Q){B(),clearInterval(J),g.removeSelectionMarkers(N),N.length||(N=[b.toOrientedRange()]),A&&(g.removeSelectionMarker(A),b.toSingleRange(A));for(var le=0;le<N.length;le++)b.addRange(N[le]);g.inVirtualSelectionMode=!1,g.$mouseHandler.$clickSelection=null},G=B;d.capture(g.container,D,U);var J=setInterval(function(){G()},20);return f.preventDefault()}}}r.onMouseDown=u}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,m){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(p){p.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(p){p.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(p){p.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var d=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new d(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,m){var d=e("./range_list").RangeList,p=e("./range").Range,w=e("./selection").Selection,u=e("./mouse/multi_select_handler").onMouseDown,f=e("./lib/event"),a=e("./lib/lang"),s=e("./commands/multi_select_commands");r.commands=s.defaultCommands.concat(s.multiSelectCommands);var c=e("./search").Search,h=new c;function o($,_,C){return h.$options.wrap=!0,h.$options.needle=_,h.$options.backwards=C==-1,h.find($)}var l=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,_){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var L=this.rangeList.add($);return this.$onAddRange($),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),$&&this.fromOrientedRange($)},this.substractPoint=function($){var _=this.rangeList.substractPoint($);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();$.push(_),this.rangeCount=0}for(var C=$.length;C--;){var L=this.ranges.indexOf($[C]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<$.length;C++){var L=$[C],D=L.start.row,I=L.end.row;if(D===I)_.push(L.clone());else{for(_.push(new p(D,L.start.column,D,this.session.getLine(D).length));++D<I;)_.push(this.getLineRange(D,!0));_.push(new p(I,0,I,L.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var $=this.rangeList.ranges,_=$[$.length-1],C=p.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,_=$[$.length-1],C=p.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var L=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(L,D);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,_,C){var L=[],D=$.column<_.column;if(D)var I=$.column,M=_.column,W=$.offsetX,z=_.offsetX;else var I=_.column,M=$.column,W=_.offsetX,z=$.offsetX;var O=$.row<_.row;if(O)var T=$.row,A=_.row;else var T=_.row,A=$.row;I<0&&(I=0),T<0&&(T=0),T==A&&(C=!0);for(var N,B=T;B<=A;B++){var U=p.fromPoints(this.session.screenToDocumentPosition(B,I,W),this.session.screenToDocumentPosition(B,M,z));if(U.isEmpty()){if(N&&b(U.end,N))break;N=U.end}U.cursor=D?U.start:U.end,L.push(U)}if(O&&L.reverse(),!C){for(var G=L.length-1;L[G].isEmpty()&&G>0;)G--;if(G>0)for(var J=0;L[J].isEmpty();)J++;for(var Q=G;Q>=J;Q--)L[Q].isEmpty()&&L.splice(Q,1)}return L}}).call(w.prototype);var g=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var _=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",_),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var _=this.session.$selectionMarkers.indexOf($);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var _=this.session.$selectionMarkers,C=$.length;C--;){var L=$[C];if(L.marker){this.session.removeMarker(L.marker);var D=_.indexOf(L);D!=-1&&_.splice(D,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(s.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(s.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var _=$.command,C=$.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?L=C.forEachSelection(_,$.args):_.multiSelectAction=="forEachLine"?L=C.forEachSelection(_,$.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=_.exec(C,$.args||{})):L=_.multiSelectAction(C,$.args||{});else{var L=_.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function($,_,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,D=C==!0||C&&C.$byLines,I=this.session,M=this.selection,W=M.rangeList,z=(L?M:W).ranges,O;if(!z.length)return $.exec?$.exec(this,_||{}):$(this,_||{});var T=M._eventRegistry;M._eventRegistry={};var A=new w(I);this.inVirtualSelectionMode=!0;for(var N=z.length;N--;){if(D)for(;N>0&&z[N].start.row==z[N-1].end.row;)N--;A.fromOrientedRange(z[N]),A.index=N,this.selection=I.selection=A;var B=$.exec?$.exec(this,_||{}):$(this,_||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(z[N])}A.detach(),this.selection=I.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=T,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],L=0;L<_.length;L++)C.push(this.session.getTextRange(_[L]));var D=this.session.getDocument().getNewLineCharacter();$=C.join(D),$.length==(C.length-1)*D.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var L=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;L.row!=_.row||this.session.$clipPositionToDocument(L.row,L.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,_,C){if(_=_||{},_.needle=$||_.needle,_.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(L)}this.$search.set(_);var D=this.$search.findAll(this.session);if(!D.length)return 0;var I=this.multiSelect;C||I.toSingleRange(D[0]);for(var M=D.length;M--;)I.addRange(D[M],!0);return L&&I.rangeList.rangeAtPoint(L.start)&&I.addRange(L,!0),D.length},this.selectMoreLines=function($,_){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,D=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(D.row+$,D.column);if(C.isEmpty())var W=I;else var M=this.session.documentToScreenPosition(L?C.end:C.start),W=this.session.screenToDocumentPosition(M.row+$,M.column);if(L){var z=p.fromPoints(I,W);z.cursor=z.start}else{var z=p.fromPoints(W,I);z.cursor=z.end}if(z.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var O=C.cursor;this.selection.addRange(z),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var _=this.session,C=_.multiSelect,L=C.ranges,D=L.length;D--;){var I=L[D];if(I.isEmpty()){var M=_.getWordRange(I.start.row,I.start.column);I.start.row=M.start.row,I.start.column=M.start.column,I.end.row=M.end.row,I.end.column=M.end.column}}C.mergeOverlappingRanges();for(var W=[],D=L.length;D--;){var I=L[D];W.unshift(_.getTextRange(I))}$<0?W.unshift(W.pop()):W.push(W.shift());for(var D=L.length;D--;){var I=L[D],z=I.clone();_.replace(I,W[D]),I.start.row=z.start.row,I.start.column=z.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,_,C){var L=this.session,D=L.multiSelect,I=D.toOrientedRange();if(!(I.isEmpty()&&(I=L.getWordRange(I.start.row,I.start.column),I.cursor=$==-1?I.start:I.end,this.multiSelect.addRange(I),C))){var M=L.getTextRange(I),W=o(L,M,$);W&&(W.cursor=$==-1?W.start:W.end,this.session.unfold(W),this.multiSelect.addRange(W),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var $=this.session,_=$.multiSelect,C=_.ranges,L=-1,D=C.filter(function(G){if(G.cursor.row==L)return!0;L=G.cursor.row});if(!C.length||D.length==C.length-1){var I=this.selection.getRange(),M=I.start.row,W=I.end.row,z=M==W;if(z){var O=this.session.getLength(),T;do T=this.session.getLine(W);while(/[=:]/.test(T)&&++W<O);do T=this.session.getLine(M);while(/[=:]/.test(T)&&--M>0);M<0&&(M=0),W>=O&&(W=O-1)}var A=this.session.removeFullLines(M,W);A=this.$reAlignText(A,z),this.session.insert({row:M,column:0},A.join(`
|
|
954
|
+
`)+`
|
|
955
|
+
`),z||(I.start.column=0,I.end.column=A[A.length-1].length),this.selection.setRange(I)}else{D.forEach(function(G){_.substractPoint(G.cursor)});var N=0,B=1/0,U=C.map(function(G){var J=G.cursor,Q=$.getLine(J.row),le=Q.substr(J.column).search(/\S/g);return le==-1&&(le=0),J.column>N&&(N=J.column),le<B&&(B=le),le});C.forEach(function(G,J){var Q=G.cursor,le=N-Q.column,re=U[J]-B;le>re?$.insert(Q,a.stringRepeat(" ",le-re)):$.remove(new p(Q.row,Q.column,Q.row,Q.column-le+re)),G.start.column=G.end.column=N,G.start.row=G.end.row=Q.row,G.cursor=G.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,_){var C=!0,L=!0,D,I,M;return $.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,I=N[2].length,M=N[3].length,N):(D+I+M!=N[1].length+N[2].length+N[3].length&&(L=!1),D!=N[1].length&&(C=!1),D>N[1].length&&(D=N[1].length),I<N[2].length&&(I=N[2].length),M>N[3].length&&(M=N[3].length),N):[A]}).map(_?z:C?L?O:z:T);function W(A){return a.stringRepeat(" ",A)}function z(A){return A[2]?W(D)+A[2]+W(I-A[2].length+M)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?W(D+I-A[2].length)+A[2]+W(M)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function T(A){return A[2]?W(D)+A[2]+W(M)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(g.prototype);function b($,_){return $.row==_.row&&$.column==_.column}r.onSessionChange=function($){var _=$.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",u),$.commands.addCommands(s.defaultCommands),E($))}function E($){if(!$.textInput)return;var _=$.textInput.getElement(),C=!1;f.addListener(_,"keydown",function(D){var I=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);$.$blockSelectEnabled&&I?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},$),f.addListener(_,"keyup",L,$),f.addListener(_,"blur",L,$);function L(D){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function($){x(this),$?this.on("mousedown",u):this.off("mousedown",u)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,m){var d=e("../../range").Range,p=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,u,f){var a=w.getLine(f);return this.foldingStartMarker.test(a)?"start":u=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(w,u,f){return null},this.indentationBlock=function(w,u,f){var a=/\S/,s=w.getLine(u),c=s.search(a);if(c!=-1){for(var h=f||s.length,o=w.getLength(),l=u,g=u;++u<o;){var b=w.getLine(u).search(a);if(b!=-1){if(b<=c){var x=w.getTokenAt(u,0);if(!x||x.type!=="string")break}g=u}}if(g>l){var E=w.getLine(g).length;return new d(l,h,g,E)}}},this.openingBracketBlock=function(w,u,f,a,s){var c={row:f,column:a+1},h=w.$findClosingBracket(u,c,s);if(h){var o=w.foldWidgets[h.row];return o==null&&(o=w.getFoldWidget(h.row)),o=="start"&&h.row>c.row&&(h.row--,h.column=w.getLine(h.row).length),d.fromPoints(c,h)}},this.closingBracketBlock=function(w,u,f,a,s){var c={row:f,column:a},h=w.$findOpeningBracket(u,c);if(h)return h.column++,c.column--,d.fromPoints(h,c)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,m){var d=e("../lib/dom"),p=e("../range").Range,w=e("../config").nls;function u(a,s,c){for(var h=0,o=a.length-1;h<=o;){var l=h+o>>1,g=c(s,a[l]);if(g>0)h=l+1;else if(g<0)o=l-1;else return l}return-(h+1)}function f(a,s,c){var h=a.getAnnotations().sort(p.comparePoints);if(h.length){var o=u(h,{row:s,column:-1},p.comparePoints);o<0&&(o=-o-1),o>=h.length?o=c>0?0:h.length-1:o===0&&c<0&&(o=h.length-1);var l=h[o];if(!(!l||!c)){if(l.row===s){do l=h[o+=c];while(l&&l.row===s);if(!l)return h.slice()}var g=[];s=l.row;do g[c<0?"unshift":"push"](l),l=h[o+=c];while(l&&l.row==s);return g.length&&g}}}r.showErrorMarker=function(a,s){var c=a.session,h=a.getCursorPosition(),o=h.row,l=c.widgetManager.getWidgetsAtRow(o).filter(function(D){return D.type=="errorMarker"})[0];l?l.destroy():o-=s;var g=f(c,o,s),b;if(g){var x=g[0];h.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,h.row=x.row,b=a.renderer.$gutterLayer.$annotations[h.row]}else{if(l)return;b={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(h.row),a.selection.moveToPosition(h);var E={row:h.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},$=E.el.appendChild(d.createElement("div")),_=E.el.appendChild(d.createElement("div"));_.className="error_widget_arrow "+b.className;var C=a.renderer.$cursorLayer.getPixelPosition(h).left;_.style.left=C+a.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",$.className="error_widget "+b.className,b.displayText.forEach(function(D,I){$.appendChild(d.createTextNode(D)),I<b.displayText.length-1&&$.appendChild(d.createElement("br"))}),$.appendChild(d.createElement("div"));var L=function(D,I,M){if(I===0&&(M==="esc"||M==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(E),a.off("changeSelection",E.destroy),a.off("changeSession",E.destroy),a.off("mouseup",E.destroy),a.off("change",E.destroy))},a.keyBinding.addKeyboardHandler(L),a.on("changeSelection",E.destroy),a.on("changeSession",E.destroy),a.on("mouseup",E.destroy),a.on("change",E.destroy),a.session.widgetManager.addLineWidget(E),E.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},d.importCssString(`
|
|
956
|
+
.error_widget_wrapper {
|
|
957
|
+
background: inherit;
|
|
958
|
+
color: inherit;
|
|
959
|
+
border:none
|
|
960
|
+
}
|
|
961
|
+
.error_widget {
|
|
962
|
+
border-top: solid 2px;
|
|
963
|
+
border-bottom: solid 2px;
|
|
964
|
+
margin: 5px 0;
|
|
965
|
+
padding: 10px 40px;
|
|
966
|
+
white-space: pre-wrap;
|
|
967
|
+
}
|
|
968
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
969
|
+
border-color: #ff5a5a
|
|
970
|
+
}
|
|
971
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
972
|
+
border-color: #F1D817
|
|
973
|
+
}
|
|
974
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
975
|
+
border-color: #5a5a5a
|
|
976
|
+
}
|
|
977
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
978
|
+
border-color: #5aaa5a
|
|
979
|
+
}
|
|
980
|
+
.error_widget_arrow {
|
|
981
|
+
position: absolute;
|
|
982
|
+
border: solid 5px;
|
|
983
|
+
border-top-color: transparent!important;
|
|
984
|
+
border-right-color: transparent!important;
|
|
985
|
+
border-left-color: transparent!important;
|
|
986
|
+
top: -5px;
|
|
987
|
+
}
|
|
988
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,m){e("./loader_build")(r);var d=e("./lib/dom"),p=e("./range").Range,w=e("./editor").Editor,u=e("./edit_session").EditSession,f=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(c,h){if(typeof c=="string"){var o=c;if(c=document.getElementById(o),!c)throw new Error("ace.edit can't find div #"+o)}if(c&&c.env&&c.env.editor instanceof w)return c.env.editor;var l="";if(c&&/input|textarea/i.test(c.tagName)){var g=c;l=g.value,c=d.createElement("pre"),g.parentNode.replaceChild(c,g)}else c&&(l=c.textContent,c.innerHTML="");var b=r.createEditSession(l),x=new w(new a(c),b,h),E={document:b,editor:x,onResize:x.resize.bind(x,null)};return g&&(E.textarea=g),x.on("destroy",function(){E.editor.container.env=null}),x.container.env=x.env=E,x},r.createEditSession=function(c,h){var o=new u(c,h);return o.setUndoManager(new f),o},r.Range=p,r.Editor=w,r.EditSession=u,r.UndoManager=f,r.VirtualRenderer=a;var s=r.config.version;r.version=s}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var m in e)e.hasOwnProperty(m)&&(r.ace[m]=e[m]);r.ace.default=r.ace,t&&(t.exports=r.ace)})})()})(yg)),yg.exports}var ND=Yn("m",K_()),wg={exports:{}},xg;function Y_(){return xg||(xg=1,(function(t,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,w=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var u=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},s=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},h=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},g=function(){var b="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":E,"variable.language":$,"support.function":b,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},c,h,w,u,o,f,a,s,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(D,I,M){var W=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",z=D.split(this.splitRegex);return M.push(W,z[3]),[{type:"constant",value:z[1]},{type:"string",value:z[2]},{type:"support.class",value:z[3]},{type:"string",value:z[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(D,I,M){return D===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(D,I,M){return D===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,I){return I[0]==="heredoc"||I[0]==="indentedHeredoc"?I[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,I,M){return this.next="",D=="}"&&M.length>1&&M[1]!="start"&&(M.shift(),this.next=M.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,I,M){return M.length&&D[0]===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};d.inherits(g,p),r.RubyHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var f=w.getLine(u),a=f.match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,c=w.findMatchingBracket({row:u,column:s});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new d(u,0,u,s-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,m){var d=e("../../lib/oop"),p=e("./fold_mode").FoldMode,w=e("../../range").Range,u=e("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};d.inherits(f,p),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(a,s,c){var h=a.getLine(c),o=this.foldingStartMarker.test(h),l=this.foldingStopMarker.test(h);if(o&&!l){var g=h.match(this.foldingStartMarker);if(g[1]){if((g[1]=="if"||g[1]=="else"||g[1]=="while"||g[1]=="until"||g[1]=="unless")&&(g[1]=="else"&&/^\s*else\s*$/.test(h)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(h)===!1)||g[1]=="when"&&/\sthen\s/.test(h)===!0)return;if(a.getTokenAt(c,g.index+2).type==="keyword")return"start"}else if(!g[3]||a.getTokenAt(c,g.index+1).type==="comment.multiline")return"start"}if(s!="markbeginend"||!l||o&&l)return"";var g=h.match(this.foldingStopMarker);if(g[3]==="end"){if(a.getTokenAt(c,g.index+1).type==="keyword")return"end"}else if(!g[1]||a.getTokenAt(c,g.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,s,c){var h=a.doc.getLine(c),o=this.foldingStartMarker.exec(h);if(o)return o[1]||o[3]?this.rubyBlock(a,c,o.index+2):this.openingBracketBlock(a,"{",c,o.index);var o=this.foldingStopMarker.exec(h);if(o)return o[3]==="end"&&a.getTokenAt(c,o.index+1).type==="keyword"?this.rubyBlock(a,c,o.index+1):o[1]==="=end"&&a.getTokenAt(c,o.index+1).type==="comment.multiline"?this.rubyBlock(a,c,o.index+1):this.closingBracketBlock(a,"}",c,o.index+o[0].length)},this.rubyBlock=function(a,s,c,h){var o=new u(a,s,c),l=o.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var g=l.value,b=a.getLine(s);switch(l.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);if(!x.test(b))return;var E=this.indentKeywords[g];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");if(!x.test(b))return;var E=1;break;default:var E=this.indentKeywords[g]}var $=[g];if(E){var _=E===-1?a.getLine(s-1).length:a.getLine(s).length,C=s,L=[];if(L.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(E==1){if(_=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=o.step();){var D=!1;if(l.type==="keyword"){var I=E*this.indentKeywords[l.value];switch(b=a.getLine(o.getCurrentTokenRow()),l.value){case"do":for(var M=o.$tokenIndex-1;M>=0;M--){var W=o.$rowTokens[M];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){I=0;break}}break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");(!x.test(b)||g=="case")&&(I=0,D=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);x.test(b)||(I=0,D=!0);break;case"when":(/\sthen\s/.test(b)||g=="case")&&(I=0,D=!0)}if(I>0)$.unshift(l.value);else if(I<=0&&D===!1){if($.shift(),!$.length&&((g=="while"||g=="until"||g=="for")&&l.value!="do"||l.value=="do"&&E==-1&&I!=0||l.value!="do"))break;I===0&&$.unshift(l.value)}}}if(!l)return null;if(h)return L.push(o.getCurrentTokenRange()),L;var s=o.getCurrentTokenRow();if(E===-1){if(l.type==="comment.multiline")var z=6;else var z=a.getLine(s).length;return new w(s,z,C-1,_)}return new w(C,_,s-1,a.getLine(s-1).length)}}}}).call(f.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,r,m){var d=e("../lib/oop"),p=e("./text").Mode,w=e("./ruby_highlight_rules").RubyHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../range").Range,a=e("./folding/ruby").FoldMode,s=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(s,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h),g=this.getTokenizer().getLineTokens(h,c),b=g.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(c=="start"){var x=h.match(/^.*[\{\(\[]\s*$/),E=h.match(/^\s*(class|def|module)\s.*$/),$=h.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=h.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||E||$||_)&&(l+=o)}return l},this.checkOutdent=function(c,h,o){return/^\s+(end|else|rescue|ensure)$/.test(h+o)||this.$outdent.checkOutdent(h,o)},this.autoOutdent=function(c,h,o){var l=h.getLine(o);if(/}/.test(l))return this.$outdent.autoOutdent(h,o);var g=this.$getIndent(l),b=h.getLine(o-1),x=this.$getIndent(b),E=h.getTabString();x.length<=g.length&&g.slice(-E.length)==E&&h.remove(new f(o,g.length-E.length,o,g.length))},this.getMatching=function(c,h,o){if(h==null){var l=c.selection.lead;o=l.column,h=l.row}var g=c.getTokenAt(h,o);if(g&&g.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,h,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/ruby"],function(e){t&&(t.exports=e)})})()})(wg)),wg.exports}Y_();var Cg={exports:{}},_g;function J_(){return _g||(_g=1,(function(t,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,w=function(){var u="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",f="True|False|None|NotImplemented|Ellipsis|__debug__",a="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",s=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":a,"variable.language":"self|cls","constant.language":f,keyword:u},"identifier"),c="[uU]?",h="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",g="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",$="(?:"+g+"|"+b+"|"+x+"|"+E+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",D="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",I="(?:(?:"+D+"|"+L+")"+_+")",M="(?:"+I+"|"+D+")",W=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:h+'"{3}',next:"rawqqstring3"},{token:"string",regex:h+'"(?=.)',next:"rawqqstring"},{token:"string",regex:h+"'{3}",next:"rawqstring3"},{token:"string",regex:h+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+M+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:M},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(w,p),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),p=e("./fold_mode").FoldMode,w=r.FoldMode=function(u){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+u+")(?:\\s*)(?:#.*)?$")};d.inherits(w,p),(function(){this.getFoldWidgetRange=function(u,f,a){var s=u.getLine(a),c=s.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(u,c[1],a,c.index):c[2]?this.indentationBlock(u,a,c.index+c[2].length):this.indentationBlock(u,a)}}).call(w.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,r,m){var d=e("../lib/oop"),p=e("./text").Mode,w=e("./python_highlight_rules").PythonHighlightRules,u=e("./folding/pythonic").FoldMode,f=e("../range").Range,a=function(){this.HighlightRules=w,this.foldingRules=new u("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(a,p),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h),g=this.getTokenizer().getLineTokens(h,c),b=g.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(c=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(l+=o)}return l};var s={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,h,o){if(o!==`\r
|
|
989
|
+
`&&o!=="\r"&&o!==`
|
|
990
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(h.trim(),c).tokens;if(!l)return!1;do var g=l.pop();while(g&&(g.type=="comment"||g.type=="text"&&g.value.match(/^\s+$/)));return g?g.type=="keyword"&&s[g.value]:!1},this.autoOutdent=function(c,h,o){o+=1;var l=this.$getIndent(h.getLine(o)),g=h.getTabString();l.slice(-g.length)==g&&h.remove(new f(o,l.length-g.length,o,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/python"],function(e){t&&(t.exports=e)})})()})(Cg)),Cg.exports}J_();var Ag={exports:{}},kg;function Z_(){return kg||(kg=1,(function(t,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};d.inherits(w,p),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var f=w.getLine(u),a=f.match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,c=w.findMatchingBracket({row:u,column:s});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new d(u,0,u,s-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),p=e("../../range").Range,w=e("./fold_mode").FoldMode,u=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};d.inherits(u,w),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,s){var c=f.getLine(s);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var h=this._getFoldWidgetBase(f,a,s);return!h&&this.startRegionRe.test(c)?"start":h},this.getFoldWidgetRange=function(f,a,s,c){var h=f.getLine(s);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(f,h,s);var o=h.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(f,o[1],s,l);var g=f.getCommentFoldRange(s,l+o[0].length,1);return g&&!g.isMultiLine()&&(c?g=this.getSectionRange(f,s):a!="all"&&(g=null)),g}if(a!=="markbegin"){var o=h.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],s,l):f.getCommentFoldRange(s,l,-1)}}},this.getSectionRange=function(f,a){var s=f.getLine(a),c=s.search(/\S/),h=a,o=s.length;a+=1;for(var l=a,g=f.getLength();++a<g;){s=f.getLine(a);var b=s.search(/\S/);if(b!==-1){if(c>b)break;var x=this.getFoldWidgetRange(f,"all",a);if(x){if(x.start.row<=h)break;if(x.isMultiLine())a=x.end.row;else if(c==b)break}l=a}}return new p(h,o,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,a,s){for(var c=a.search(/\s*$/),h=f.getLength(),o=s,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++s<h;){a=f.getLine(s);var b=l.exec(a);if(b&&(b[1]?g--:g++,!g))break}var x=s;if(x>o)return new p(o,c,x,a.length)}}).call(u.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,m){var d=e("../lib/oop"),p=e("./text").Mode,w=e("./json_highlight_rules").JsonHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,s=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};d.inherits(s,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h);if(c=="start"){var g=h.match(/^.*[\{\(\[]\s*$/);g&&(l+=o)}return l},this.checkOutdent=function(c,h,o){return this.$outdent.checkOutdent(h,o)},this.autoOutdent=function(c,h,o){this.$outdent.autoOutdent(h,o)},this.createWorker=function(c){var h=new a(["ace"],"ace/mode/json_worker","JsonWorker");return h.attachToDocument(c.getDocument()),h.on("annotate",function(o){c.setAnnotations(o.data)}),h.on("terminate",function(){c.clearAnnotations()}),h},this.$id="ace/mode/json"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/json"],function(e){t&&(t.exports=e)})})()})(Ag)),Ag.exports}Z_();var Sg={exports:{}},$g;function X_(){return $g||($g=1,(function(t,n){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop");e("../lib/lang");var p=e("./text_highlight_rules").TextHighlightRules,w=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=r.supportFunction="rgb|rgba|url|attr|counter|counters",f=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",a=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",s=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var g=this.createKeywordMapper({"support.function":u,"support.constant":f,"support.type":w,"support.constant.color":a,"support.constant.fonts":s},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:g,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};d.inherits(l,p),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},w.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};d.inherits(w,p),w.getTagRule=function(u){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(u){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:u}},w.getEndRule=function(u){return{token:"comment.doc",regex:"\\*\\/",next:u}},r.JsDocCommentHighlightRules=w}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,r,m){function d(){var c=a.replace("\\d","\\d\\-"),h={onMatch:function(l,g,b){var x=l.charAt(1)=="/"?2:1;return x==1?(g!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):x==2&&g==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:l.slice(0,x)},{type:"meta.tag.tag-name.xml",value:l.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(h);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,h,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,g,b){return g==b[0]&&b.shift(),l.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},o,p("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},h],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function p(c){return[{token:"comment",regex:/\/\*/,next:[u.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[u.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var w=e("../lib/oop"),u=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",s=function(c){var h={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(h,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",b="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(h).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[u.getStartRule("doc-start"),p("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[u.getStartRule("doc-start"),p("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[p("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,$,_){if(this.next=E=="{"?this.nextState:"",E=="{"&&_.length)_.unshift("start",$);else if(E=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!c||c.jsx!=0)&&d.call(this)),this.embedRules(u,"doc-",[u.getEndRule("no_regex")]),this.normalizeRules()};w.inherits(s,f),r.JavaScriptHighlightRules=s}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,w=function(u){var f="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+f+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:f},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+f+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+f+":)?"+f+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===w&&this.normalizeRules()};(function(){this.embedTagRules=function(u,f,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(s,c,h){return h.splice(0),this.token}}],this.embedRules(u,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(p.prototype),d.inherits(w,p),r.XmlHighlightRules=w}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("../lib/lang"),w=e("./css_highlight_rules").CssHighlightRules,u=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=e("./xml_highlight_rules").XmlHighlightRules,a=p.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),s=function(){f.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(c,h){var o=a[h];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(w,"css-","style"),this.embedTagRules(new u({jsx:!1}).getRules(),"js-","script"),this.constructor===s&&this.normalizeRules()};d.inherits(s,f),r.HtmlHighlightRules=s}),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 d=e("../config").$modes,p=e("../lib/oop"),w=e("../lib/lang"),u=e("./text_highlight_rules").TextHighlightRules,f=e("./html_highlight_rules").HtmlHighlightRules,a=function(c){return"(?:[^"+w.escapeRegExp(c)+"\\\\]|\\\\.)*"},s=function(){f.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,g,b){var x=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(x[3])[0];return d[E]||(E=""),g.unshift("githubblock",[],[x[1],x[2],E],l),this.token},next:"githubblock"},h=[{token:"support.function",regex:".*",onMatch:function(o,l,g,b){var x=g[1],E=g[2][0],$=g[2][1],_=g[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<E.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return g.splice(0,3),this.next=g.shift(),this.token;if(this.next="",_&&d[_]){var L=d[_].getTokenizer().getLineTokens(o,x.slice(0));return g[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},c,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:h}),this.normalizeRules()};p.inherits(s,u),r.MarkdownHighlightRules=s}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,m){var d=e("../../lib/oop"),p=e("./fold_mode").FoldMode,w=e("../../range").Range,u=r.FoldMode=function(){};d.inherits(u,p),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,a,s){var c=f.getLine(s);return this.foldingStartMarker.test(c)?c[0]=="`"&&f.bgTokenizer.getState(s)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,a,s){function c(D){return E=f.getTokens(D)[0],E&&E.type.lastIndexOf($,0)===0}function h(){var D=E.value[0];return D=="="?6:D=="-"?5:7-E.value.search(/[^#]|$/)}var o=f.getLine(s),l=o.length,g=f.getLength(),b=s,x=s;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(f.bgTokenizer.getState(s)!=="start"){for(;++s<g&&(o=f.getLine(s),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(b,l,s,0)}for(;s-- >0&&(o=f.getLine(s),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(s,o.length,b,0)}var E,$="markup.heading";if(c(s)){for(var _=h();++s<g;)if(c(s)){var C=h();if(C>=_)break}if(x=s-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),x>b)for(;x>b&&/^\s*$/.test(f.getLine(x));)x--;if(x>b){var L=f.getLine(x).length;return new w(b,l,x,L)}}}}}).call(u.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var f=w.getLine(u),a=f.match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,c=w.findMatchingBracket({row:u,column:s});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new d(u,0,u,s-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,m){function d(a,s){return a&&a.type.lastIndexOf(s+".xml")>-1}var p=e("../../lib/oop"),w=e("../behaviour").Behaviour,u=e("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(a,s,c,h,o){if(o=='"'||o=="'"){var l=o,g=h.doc.getTextRange(c.getSelectionRange());if(g!==""&&g!=="'"&&g!='"'&&c.getWrapBehavioursEnabled())return{text:l+g+l,selection:!1};var b=c.getCursorPosition(),x=h.doc.getLine(b.row),E=x.substring(b.column,b.column+1),$=new u(h,b.row,b.column),_=$.getCurrentToken();if(E==l&&(d(_,"attribute-value")||d(_,"string")))return{text:"",selection:[1,1]};if(_||(_=$.stepBackward()),!_)return;for(;d(_,"tag-whitespace")||d(_,"whitespace");)_=$.stepBackward();var C=!E||E.match(/\s/);if(d(_,"attribute-equals")&&(C||E==">")||d(_,"decl-attribute-equals")&&(C||E=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,s,c,h,o){var l=h.doc.getTextRange(o);if(!o.isMultiLine()&&(l=='"'||l=="'")){var g=h.doc.getLine(o.start.row),b=g.substring(o.start.column+1,o.start.column+2);if(b==l)return o.end.column++,o}}),this.add("autoclosing","insertion",function(a,s,c,h,o){if(o==">"){var l=c.getSelectionRange().start,g=new u(h,l.row,l.column),b=g.getCurrentToken()||g.stepBackward();if(!b||!(d(b,"tag-name")||d(b,"tag-whitespace")||d(b,"attribute-name")||d(b,"attribute-equals")||d(b,"attribute-value"))||d(b,"reference.attribute-value"))return;if(d(b,"attribute-value")){var x=g.getCurrentTokenColumn()+b.value.length;if(l.column<x)return;if(l.column==x){var E=g.stepForward();if(E&&d(E,"attribute-value"))return;g.stepBackward()}}if(/^\s*>/.test(h.getLine(l.row).slice(l.column)))return;for(;!d(b,"tag-name");)if(b=g.stepBackward(),b.value=="<"){b=g.stepForward();break}var $=g.getCurrentTokenRow(),_=g.getCurrentTokenColumn();if(d(g.stepBackward(),"end-tag-open"))return;var C=b.value;return $==l.row&&(C=C.substring(0,l.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,s,c,h,o){if(o==`
|
|
991
|
+
`){var l=c.getCursorPosition(),g=h.getLine(l.row),b=new u(h,l.row,l.column),x=b.getCurrentToken();if(d(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=b.stepBackward();if(!x)return;var E=x.value,$=b.getCurrentTokenRow();if(x=b.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var _=h.getTokenAt(l.row,l.column+1),g=h.getLine($),C=this.$getIndent(g),L=C+h.getTabString();return _&&_.value==="</"?{text:`
|
|
992
|
+
`+L+`
|
|
993
|
+
`+C,selection:[1,L.length,1,L.length]}:{text:`
|
|
994
|
+
`+L}}}}})};p.inherits(f,w),r.XmlBehaviour=f}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,m){var d=e("../../lib/oop"),p=e("../../token_iterator").TokenIterator,w=e("../behaviour/cstyle").CstyleBehaviour,u=e("../behaviour/xml").XmlBehaviour,f=function(){var a=new u({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(w),this.add("autoclosing-fragment","insertion",function(s,c,h,o,l){if(l==">"){var g=h.getSelectionRange().start,b=new p(o,g.row,g.column),x=b.getCurrentToken()||b.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};d.inherits(f,w),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){function d(s,c){return s&&s.type&&s.type.lastIndexOf(c+".xml")>-1}var p=e("../../lib/oop"),w=e("../../range").Range,u=e("./fold_mode").FoldMode,f=r.FoldMode=function(s,c){u.call(this),this.voidElements=s||{},this.optionalEndTags=p.mixin({},this.voidElements),c&&p.mixin(this.optionalEndTags,c)};p.inherits(f,u);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(s,c,h){var o=this._getFirstTagInLine(s,h);return o?o.closing||!o.tagName&&o.selfClosing?c==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(s,h,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(s,h)},this.getCommentFoldWidget=function(s,c){return/comment/.test(s.getState(c))&&/<!-/.test(s.getLine(c))?"start":""},this._getFirstTagInLine=function(s,c){for(var h=s.getTokens(c),o=new a,l=0;l<h.length;l++){var g=h[l];if(d(g,"tag-open")){if(o.end.column=o.start.column+g.value.length,o.closing=d(g,"end-tag-open"),g=h[++l],!g)return null;if(o.tagName=g.value,g.value===""){if(g=h[++l],!g)return null;o.tagName=g.value}for(o.end.column+=g.value.length,l++;l<h.length;l++)if(g=h[l],o.end.column+=g.value.length,d(g,"tag-close")){o.selfClosing=g.value=="/>";break}return o}if(d(g,"tag-close"))return o.selfClosing=g.value=="/>",o;o.start.column+=g.value.length}return null},this._findEndTagInLine=function(s,c,h,o){for(var l=s.getTokens(c),g=0,b=0;b<l.length;b++){var x=l[b];if(g+=x.value.length,!(g<o-1)&&d(x,"end-tag-open")&&(x=l[b+1],d(x,"tag-name")&&x.value===""&&(x=l[b+2]),x&&x.value==h))return!0}return!1},this.getFoldWidgetRange=function(s,c,h){var o=this._getFirstTagInLine(s,h);if(!o)return this.getCommentFoldWidget(s,h)&&s.getCommentFoldRange(h,s.getLine(h).length);var l=s.getMatchingTags({row:h,column:0});if(l)return new w(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),p=e("../../range").Range,w=e("./fold_mode").FoldMode,u=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};d.inherits(u,w),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,s){var c=f.getLine(s);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var h=this._getFoldWidgetBase(f,a,s);return!h&&this.startRegionRe.test(c)?"start":h},this.getFoldWidgetRange=function(f,a,s,c){var h=f.getLine(s);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(f,h,s);var o=h.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(f,o[1],s,l);var g=f.getCommentFoldRange(s,l+o[0].length,1);return g&&!g.isMultiLine()&&(c?g=this.getSectionRange(f,s):a!="all"&&(g=null)),g}if(a!=="markbegin"){var o=h.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],s,l):f.getCommentFoldRange(s,l,-1)}}},this.getSectionRange=function(f,a){var s=f.getLine(a),c=s.search(/\S/),h=a,o=s.length;a+=1;for(var l=a,g=f.getLength();++a<g;){s=f.getLine(a);var b=s.search(/\S/);if(b!==-1){if(c>b)break;var x=this.getFoldWidgetRange(f,"all",a);if(x){if(x.start.row<=h)break;if(x.isMultiLine())a=x.end.row;else if(c==b)break}l=a}}return new p(h,o,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,a,s){for(var c=a.search(/\s*$/),h=f.getLength(),o=s,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++s<h;){a=f.getLine(s);var b=l.exec(a);if(b&&(b[1]?g--:g++,!g))break}var x=s;if(x>o)return new p(o,c,x,a.length)}}).call(u.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../../lib/oop"),p=e("./xml").FoldMode,w=e("./cstyle").FoldMode,u=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new p};d.inherits(u,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,s){var c=this.getFoldWidgetBase(f,a,s);return c||this.xmlFoldMode.getFoldWidget(f,a,s)},this.getFoldWidgetRange=function(f,a,s,c){var h=this.getFoldWidgetRangeBase(f,a,s,c);return h||this.xmlFoldMode.getFoldWidgetRange(f,a,s)}}).call(u.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,m){var d=e("../lib/oop"),p=e("./text").Mode,w=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,s=e("./folding/javascript").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=new a,this.foldingRules=new s};d.inherits(c,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(h,o,l){var g=this.$getIndent(o),b=this.getTokenizer().getLineTokens(o,h),x=b.tokens,E=b.state;if(x.length&&x[x.length-1].type=="comment")return g;if(h=="start"||h=="no_regex"){var $=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(g+=l)}else if(h=="doc-start"&&(E=="start"||E=="no_regex"))return"";return g},this.checkOutdent=function(h,o,l){return this.$outdent.checkOutdent(o,l)},this.autoOutdent=function(h,o,l){this.$outdent.autoOutdent(o,l)},this.createWorker=function(h){var o=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(h.getDocument()),o.on("annotate",function(l){h.setAnnotations(l.data)}),o.on("terminate",function(){h.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,m){var d={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},p=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var u in w)if(typeof w[u]=="string"){var f=u.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});d.hasOwnProperty(f)||(d[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,u,f,a){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||u.$mode.$id=="ace/mode/scss"){var s=u.getLine(f.row).substr(0,f.column),c=/\([^)]*$/.test(s);return c&&(s=s.substr(s.lastIndexOf("(")+1)),/:[^;]+$/.test(s)?this.getPropertyValueCompletions(w,u,f,a):this.getPropertyCompletions(w,u,f,a,c)}return[]},this.getPropertyCompletions=function(w,u,f,a,s){s=s||!1;var c=Object.keys(d);return c.map(function(h){return{caption:h,snippet:h+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,u,f,a){var s=u.getLine(f.row).substr(0,f.column),c=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!c)return[];var h=[];return c in d&&typeof d[c]=="object"&&(h=Object.keys(d[c])),h.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(p.prototype),r.CssCompletions=p}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,m){var d=e("../../lib/oop");e("../behaviour").Behaviour;var p=e("./cstyle").CstyleBehaviour,w=e("../../token_iterator").TokenIterator,u=function(){this.inherit(p),this.add("colon","insertion",function(f,a,s,c,h){if(h===":"&&s.selection.isEmpty()){var o=s.getCursorPosition(),l=new w(c,o.row,o.column),g=l.getCurrentToken();if(g&&g.value.match(/\s+/)&&(g=l.stepBackward()),g&&g.type==="support.type"){var b=c.doc.getLine(o.row),x=b.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,a,s,c,h){var o=c.doc.getTextRange(h);if(!h.isMultiLine()&&o===":"){var l=s.getCursorPosition(),g=new w(c,l.row,l.column),b=g.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=g.stepBackward()),b&&b.type==="support.type"){var x=c.doc.getLine(h.start.row),E=x.substring(h.end.column,h.end.column+1);if(E===";")return h.end.column++,h}}}),this.add("semicolon","insertion",function(f,a,s,c,h){if(h===";"&&s.selection.isEmpty()){var o=s.getCursorPosition(),l=c.doc.getLine(o.row),g=l.substring(o.column,o.column+1);if(g===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,a,s,c,h){if(h==="!"&&s.selection.isEmpty()){var o=s.getCursorPosition(),l=c.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(u,p),r.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../lib/oop"),p=e("./text").Mode,w=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,s=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=new s,this.$completer=new a,this.foldingRules=new c};d.inherits(h,p),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,g){var b=this.$getIndent(l),x=this.getTokenizer().getLineTokens(l,o).tokens;if(x.length&&x[x.length-1].type=="comment")return b;var E=l.match(/^.*\{\s*$/);return E&&(b+=g),b},this.checkOutdent=function(o,l,g){return this.$outdent.checkOutdent(l,g)},this.autoOutdent=function(o,l,g){this.$outdent.autoOutdent(l,g)},this.getCompletions=function(o,l,g,b){return this.$completer.getCompletions(o,l,g,b)},this.createWorker=function(o){var l=new f(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(o.getDocument()),l.on("annotate",function(g){o.setAnnotations(g.data)}),l.on("terminate",function(){o.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),p=e("./fold_mode").FoldMode,w=r.FoldMode=function(u,f){this.defaultMode=u,this.subModes=f};d.inherits(w,p),(function(){this.$getMode=function(u){typeof u!="string"&&(u=u[0]);for(var f in this.subModes)if(u.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(u,f,a,s){var c=this.$getMode(u);return c?c.getFoldWidget(f,a,s):""},this.getFoldWidget=function(u,f,a){return this.$tryMode(u.getState(a-1),u,f,a)||this.$tryMode(u.getState(a),u,f,a)||this.defaultMode.getFoldWidget(u,f,a)},this.getFoldWidgetRange=function(u,f,a){var s=this.$getMode(u.getState(a-1));return(!s||!s.getFoldWidget(u,f,a))&&(s=this.$getMode(u.getState(a))),(!s||!s.getFoldWidget(u,f,a))&&(s=this.defaultMode),s.getFoldWidgetRange(u,f,a)}}).call(w.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../../lib/oop"),p=e("./mixed").FoldMode,w=e("./xml").FoldMode,u=e("./cstyle").FoldMode,f=r.FoldMode=function(a,s){p.call(this,new w(a,s),{"js-":new u,"css-":new u})};d.inherits(f,p)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,m){function d(l,g){return l.type.lastIndexOf(g+".xml")>-1}function p(l,g){for(var b=new u(l,g.row,g.column),x=b.getCurrentToken();x&&!d(x,"tag-name");)x=b.stepBackward();if(x)return x.value}function w(l,g){for(var b=new u(l,g.row,g.column),x=b.getCurrentToken();x&&!d(x,"attribute-name");)x=b.stepBackward();if(x)return x.value}var u=e("../token_iterator").TokenIterator,f=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],s=f.concat(a),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},h=Object.keys(c),o=function(){};(function(){this.getCompletions=function(l,g,b,x){var E=g.getTokenAt(b.row,b.column);if(!E)return[];if(d(E,"tag-name")||d(E,"tag-open")||d(E,"end-tag-open"))return this.getTagCompletions(l,g,b,x);if(d(E,"tag-whitespace")||d(E,"attribute-name"))return this.getAttributeCompletions(l,g,b,x);if(d(E,"attribute-value"))return this.getAttributeValueCompletions(l,g,b,x);var $=g.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(l,g,b,x):[]},this.getTagCompletions=function(l,g,b,x){return h.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,g,b,x){var E=p(g,b);if(!E)return[];var $=s;return E in c&&($=$.concat(Object.keys(c[E]))),$.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,g,b,x){var E=p(g,b),$=w(g,b);if(!E)return[];var _=[];return E in c&&$ in c[E]&&typeof c[E][$]=="object"&&(_=Object.keys(c[E][$])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,g,b,x){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,m){var d=e("../lib/oop"),p=e("../lib/lang"),w=e("./text").Mode,u=e("./javascript").Mode,f=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,s=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,h=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],g=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new s,this.$completer=new h,this.createModeDelegates({"js-":u,"css-":f}),this.foldingRules=new c(this.voidElements,p.arrayToMap(g))};d.inherits(b,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=p.arrayToMap(l),this.getNextLineIndent=function(x,E,$){return this.$getIndent(E)},this.checkOutdent=function(x,E,$){return!1},this.getCompletions=function(x,E,$,_){return this.$completer.getCompletions(x,E,$,_)},this.createWorker=function(x){if(this.constructor==b){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(x.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function($){x.setAnnotations($.data)}),E.on("terminate",function(){x.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),r.Mode=b}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),p=e("./text_highlight_rules").TextHighlightRules,w=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",u=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",f=function(){var a=this.createKeywordMapper({keyword:w,"support.function.builtin":u,"invalid.deprecated":"debugger"},"identifier"),s="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",h="(?:\\d+)",o="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",l="(?:(?:"+o+"|"+h+"))",g="(?:"+l+"|"+o+")",b="(?:&"+h+")",x="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,L,D){var I=C[2]=="-"?"indentedHeredoc":"heredoc",M=C.split(this.splitRegex);return D.push(I,M[4]),[{type:"constant",value:M[1]},{type:"text",value:M[2]},{type:"string",value:M[3]},{type:"support.class",value:M[4]},{type:"string",value:M[5]}]},rules:{heredoc:[{onMatch:function(C,L,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:b},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:g},{token:"constant.numeric",regex:s+"\\b"},{token:a,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};d.inherits(f,p),r.ShHighlightRules=f}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../lib/oop"),p=e("./text").Mode,w=e("./sh_highlight_rules").ShHighlightRules,u=e("../range").Range,f=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=w,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};d.inherits(a,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h),g=this.getTokenizer().getLineTokens(h,c),b=g.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(c=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(l+=o)}return l};var s={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,h,o){if(o!==`\r
|
|
995
|
+
`&&o!=="\r"&&o!==`
|
|
996
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(h.trim(),c).tokens;if(!l)return!1;do var g=l.pop();while(g&&(g.type=="comment"||g.type=="text"&&g.value.match(/^\s+$/)));return g?g.type=="keyword"&&s[g.value]:!1},this.autoOutdent=function(c,h,o){o+=1;var l=this.$getIndent(h.getLine(o)),g=h.getTabString();l.slice(-g.length)==g&&h.remove(new u(o,l.length-g.length,o,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(a.prototype),r.Mode=a}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,r,m){var d=e("../lib/oop"),p=e("../lib/lang"),w=e("./text").Mode,u=e("./xml_highlight_rules").XmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,s=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=u,this.$behaviour=new f,this.foldingRules=new a};d.inherits(c,w),(function(){this.voidElements=p.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(h){var o=new s(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(h.getDocument()),o.on("error",function(l){h.setAnnotations(l.data)}),o.on("terminate",function(){h.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,m){var d=e("../lib/oop"),p=e("./behaviour/cstyle").CstyleBehaviour,w=e("./text").Mode,u=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=u,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new f,this.$behaviour=new p({braces:!0})};d.inherits(a,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(s,c,h){if(s=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/markdown"],function(e){t&&(t.exports=e)})})()})(Sg)),Sg.exports}X_();var Tg={exports:{}},Rg;function Q_(){return Rg||(Rg=1,(function(t,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-twilight .ace_gutter {
|
|
997
|
+
background: #232323;
|
|
998
|
+
color: #E2E2E2
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.ace-twilight .ace_print-margin {
|
|
1002
|
+
width: 1px;
|
|
1003
|
+
background: #232323
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.ace-twilight {
|
|
1007
|
+
background-color: #141414;
|
|
1008
|
+
color: #F8F8F8
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.ace-twilight .ace_cursor {
|
|
1012
|
+
color: #A7A7A7
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
|
1016
|
+
background: rgba(221, 240, 255, 0.20)
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
|
1020
|
+
box-shadow: 0 0 3px 0px #141414;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
|
1024
|
+
background: rgb(102, 82, 0)
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
|
1028
|
+
margin: -1px 0 0 -1px;
|
|
1029
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
|
1033
|
+
background: rgba(255, 255, 255, 0.031)
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.ace-twilight .ace_gutter-active-line {
|
|
1037
|
+
background-color: rgba(255, 255, 255, 0.031)
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
|
1041
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.ace-twilight .ace_invisible {
|
|
1045
|
+
color: rgba(255, 255, 255, 0.25)
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.ace-twilight .ace_keyword,
|
|
1049
|
+
.ace-twilight .ace_meta {
|
|
1050
|
+
color: #CDA869
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.ace-twilight .ace_constant,
|
|
1054
|
+
.ace-twilight .ace_constant.ace_character,
|
|
1055
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
|
1056
|
+
.ace-twilight .ace_constant.ace_other,
|
|
1057
|
+
.ace-twilight .ace_heading,
|
|
1058
|
+
.ace-twilight .ace_markup.ace_heading,
|
|
1059
|
+
.ace-twilight .ace_support.ace_constant {
|
|
1060
|
+
color: #CF6A4C
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
|
1064
|
+
color: #F8F8F8;
|
|
1065
|
+
background-color: rgba(86, 45, 86, 0.75)
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
|
1069
|
+
text-decoration: underline;
|
|
1070
|
+
font-style: italic;
|
|
1071
|
+
color: #D2A8A1
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.ace-twilight .ace_support {
|
|
1075
|
+
color: #9B859D
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.ace-twilight .ace_fold {
|
|
1079
|
+
background-color: #AC885B;
|
|
1080
|
+
border-color: #F8F8F8
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.ace-twilight .ace_support.ace_function {
|
|
1084
|
+
color: #DAD085
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.ace-twilight .ace_list,
|
|
1088
|
+
.ace-twilight .ace_markup.ace_list,
|
|
1089
|
+
.ace-twilight .ace_storage {
|
|
1090
|
+
color: #F9EE98
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
|
1094
|
+
.ace-twilight .ace_meta.ace_tag {
|
|
1095
|
+
color: #AC885B
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.ace-twilight .ace_string {
|
|
1099
|
+
color: #8F9D6A
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.ace-twilight .ace_string.ace_regexp {
|
|
1103
|
+
color: #E9C062
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.ace-twilight .ace_comment {
|
|
1107
|
+
font-style: italic;
|
|
1108
|
+
color: #5F5A60
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.ace-twilight .ace_variable {
|
|
1112
|
+
color: #7587A6
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.ace-twilight .ace_xml-pe {
|
|
1116
|
+
color: #494949
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
.ace-twilight .ace_indent-guide {
|
|
1120
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.ace-twilight .ace_indent-guide-active {
|
|
1124
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1125
|
+
}
|
|
1126
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,m){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var d=e("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){t&&(t.exports=e)})})()})(Tg)),Tg.exports}Q_();var Eg={exports:{}},Mg;function eA(){return Mg||(Mg=1,(function(t,n){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,m){function d(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var p=e("./lib/dom"),w=e("./lib/oop"),u=e("./lib/event_emitter").EventEmitter,f=e("./lib/lang"),a=e("./range").Range,s=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,o=e("./clipboard"),l={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,D){var I=C.session.getTextRange();return D?I.replace(/\n\r?([ \t]*\S)/g,`
|
|
1127
|
+
`+D+"$1"):I},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(C){var L=C.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var g=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function D(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var I={regex:"/("+D("/")+"+)/",onMatch:function(M,W,z){var O=z[0];return O.fmtString=!0,O.guard=M.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(M,W,z){var O=M[1];return(O=="}"&&z.length||"`$\\".indexOf(O)!=-1)&&(M=O),[M]}},{regex:/}/,onMatch:function(M,W,z){return[z.length?z.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,W,z){var O=L(M.substr(1));return z.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(M,W,z){var O=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(T){return T.length==2?T[1]:"\0"}).split("\0").map(function(T){return{value:T}});return z[0].choices=O,[O[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,W,z){return z.length&&z[0].expectElse?(z[0].expectElse=!1,z[0].ifEnd={elseEnd:z[0]},[z[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,W,z){var O=M[1];return O=="}"&&z.length||"`$\\".indexOf(O)!=-1?M=O:O=="n"?M=`
|
|
1128
|
+
`:O=="t"?M=" ":"ulULE".indexOf(O)!=-1&&(M={changeCase:O,local:O>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,W,z){var O=z.shift();return O&&(O.flag=M.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,W,z){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,W,z){var O={text:M.slice(2)};return z.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,W,z){var O=z.shift();return this.next=O&&O.tabstopId?"start":"",[O||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,W,z){var O=z[0];return O.formatFunction=M.slice(2,-1),[z.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(M,W,z){M[1]=="+"&&(z[0].ifEnd=z[0]),M[1]=="?"&&(z[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(L,D){return this.getTokenizer().getLineTokens(L,D).tokens.map(function(I){return I.value||I})},C.prototype.getVariableValue=function(L,D,I){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var M=this.variables[D];return typeof M=="function"&&(M=this.variables[D](L,D,I)),M??""},C.prototype.tmStrFormat=function(L,D,I){if(!D.fmt)return L;var M=D.flag||"",W=D.guard;W=new RegExp(W,M.replace(/[^gim]/g,""));var z=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,T=L.replace(W,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(z,I),B="E",U=0;U<N.length;U++){var G=N[U];if(typeof G=="object")if(N[U]="",G.changeCase&&G.local){var J=N[U+1];J&&typeof J=="string"&&(G.changeCase=="u"?N[U]=J[0].toUpperCase():N[U]=J[0].toLowerCase(),N[U+1]=J.substr(1))}else G.changeCase&&(B=G.changeCase);else B=="U"?N[U]=G.toUpperCase():B=="L"&&(N[U]=G.toLowerCase())}return O.variables.__=A,N.join("")});return T},C.prototype.tmFormatFunction=function(L,D,I){return D.formatFunction=="upcase"?L.toUpperCase():D.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,D){function I(B){var U=L.indexOf(B,O+1);U!=-1&&(O=U)}for(var M=[],W="",z=!0,O=0;O<L.length;O++){var T=L[O];if(typeof T=="string"){M.push(T),T==`
|
|
1129
|
+
`?(z=!0,W=""):z&&(W=/^\t*/.exec(T)[0],z=/\S/.test(T));continue}if(T){if(z=!1,T.fmtString){var A=L.indexOf(T,O+1);A==-1&&(A=L.length),T.fmt=L.slice(O+1,A),O=A}if(T.text){var N=this.getVariableValue(D,T.text,W)+"";T.fmtString&&(N=this.tmStrFormat(N,T,D)),T.formatFunction&&(N=this.tmFormatFunction(N,T,D)),N&&!T.ifEnd?(M.push(N),I(T)):!N&&T.ifEnd&&I(T.ifEnd)}else T.elseEnd?I(T.elseEnd):(T.tabstopId!=null||T.changeCase!=null)&&M.push(T)}}return M},C.prototype.getDisplayTextForSnippet=function(L,D){var I=b.call(this,L,D);return I.text},C.prototype.insertSnippetForSelection=function(L,D,I){I===void 0&&(I={});var M=b.call(this,L,D,I),W=L.getSelectionRange(),z=L.session.replace(W,M.text),O=new x(L),T=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(M.tabstops,W.start,z,T)},C.prototype.insertSnippet=function(L,D,I){I===void 0&&(I={});var M=this;if(L.inVirtualSelectionMode)return M.insertSnippetForSelection(L,D,I);L.forEachSelection(function(){M.insertSnippetForSelection(L,D,I)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var D=L.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!L.session.$mode.inlinePhp&&(D="html");var I=L.getCursorPosition(),M=L.session.getState(I.row);typeof M=="object"&&(M=M[0]),M.substring&&(M.substring(0,3)=="js-"?D="javascript":M.substring(0,4)=="css-"?D="css":M.substring(0,4)=="php-"&&(D="php"))}return D},C.prototype.getActiveScopes=function(L){var D=this.$getScope(L),I=[D],M=this.snippetMap;return M[D]&&M[D].includeScopes&&I.push.apply(I,M[D].includeScopes),I.push("_"),I},C.prototype.expandWithTab=function(L,D){var I=this,M=L.forEachSelection(function(){return I.expandSnippetForSelection(L,D)},null,{keepOrder:!0});return M&&L.tabstopManager&&L.tabstopManager.tabNext(),M},C.prototype.expandSnippetForSelection=function(L,D){var I=L.getCursorPosition(),M=L.session.getLine(I.row),W=M.substring(0,I.column),z=M.substr(I.column),O=this.snippetMap,T;return this.getActiveScopes(L).some(function(A){var N=O[A];return N&&(T=this.findMatchingSnippet(N,W,z)),!!T},this),T?(D&&D.dryRun||(L.session.doc.removeInLine(I.row,I.column-T.replaceBefore.length,I.column+T.replaceAfter.length),this.variables.M__=T.matchBefore,this.variables.T__=T.matchAfter,this.insertSnippetForSelection(L,T.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,D,I){for(var M=L.length;M--;){var W=L[M];if(!(W.startRe&&!W.startRe.test(D))&&!(W.endRe&&!W.endRe.test(I))&&!(!W.startRe&&!W.endRe))return W.matchBefore=W.startRe?W.startRe.exec(D):[""],W.matchAfter=W.endRe?W.endRe.exec(I):[""],W.replaceBefore=W.triggerRe?W.triggerRe.exec(D)[0]:"",W.replaceAfter=W.endTriggerRe?W.endTriggerRe.exec(I)[0]:"",W}},C.prototype.register=function(L,D){function I(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function M(A,N,B){return A=I(A),N=I(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function W(A){A.scope||(A.scope=D||"_"),D=A.scope,z[D]||(z[D]=[],O[D]={});var N=O[D];if(A.name){var B=N[A.name];B&&T.unregister(B),N[A.name]=A}z[D].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
|
1130
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=f.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=M(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=M(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var z=this.snippetMap,O=this.snippetNameMap,T=this;L||(L=[]),Array.isArray(L)?L.forEach(W):Object.keys(L).forEach(function(A){W(L[A])}),this._signal("registerSnippets",{scope:D})},C.prototype.unregister=function(L,D){function I(z){var O=W[z.scope||D];if(O&&O[z.name]){delete O[z.name];var T=M[z.scope||D],A=T&&T.indexOf(z);A>=0&&T.splice(A,1)}}var M=this.snippetMap,W=this.snippetNameMap;L.content?I(L):Array.isArray(L)&&L.forEach(I)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var D=[],I={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,W;W=M.exec(L);){if(W[1])try{I=JSON.parse(W[1]),D.push(I)}catch{}if(W[4])I.content=W[4].replace(/^\t/gm,""),D.push(I),I={};else{var z=W[2],O=W[3];if(z=="regex"){var T=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=T.exec(O)[1],I.trigger=T.exec(O)[1],I.endTrigger=T.exec(O)[1],I.endGuard=T.exec(O)[1]}else z=="snippet"?(I.tabTrigger=O.match(/^\S*/)[0],I.name||(I.name=O)):z&&(I[z]=O)}}return D},C.prototype.getSnippetByName=function(L,D){var I=this.snippetNameMap,M;return this.getActiveScopes(D).some(function(W){var z=I[W];return z&&(M=z[L]),!!M},this),M},C})();w.implement(g.prototype,u);var b=function(C,L,D){function I(ie){for(var fe=[],$e=0;$e<ie.length;$e++){var Re=ie[$e];if(typeof Re=="object"){if(N[Re.tabstopId])continue;var Ee=ie.lastIndexOf(Re,$e-1);Re=fe[Ee]||{tabstopId:Re.tabstopId}}fe[$e]=Re}return fe}D===void 0&&(D={});var M=C.getCursorPosition(),W=C.session.getLine(M.row),z=C.session.getTabString(),O=W.match(/^\s*/)[0];M.column<O.length&&(O=O.slice(0,M.column)),L=L.replace(/\r/g,"");var T=this.tokenizeTmSnippet(L);T=this.resolveVariables(T,C),T=T.map(function(ie){return ie==`
|
|
1131
|
+
`&&!D.excludeExtraIndent?ie+O:typeof ie=="string"?ie.replace(/\t/g,z):ie});var A=[];T.forEach(function(ie,fe){if(typeof ie=="object"){var $e=ie.tabstopId,Re=A[$e];if(Re||(Re=A[$e]=[],Re.index=$e,Re.value="",Re.parents={}),Re.indexOf(ie)===-1){ie.choices&&!Re.choices&&(Re.choices=ie.choices),Re.push(ie);var Ee=T.indexOf(ie,fe+1);if(Ee!==-1){var Ue=T.slice(fe+1,Ee),He=Ue.some(function(Ge){return typeof Ge=="object"});He&&!Re.value?Re.value=Ue:Ue.length&&(!Re.value||typeof Re.value!="string")&&(Re.value=Ue.join(""))}}}}),A.forEach(function(ie){ie.length=0});for(var N={},B=0;B<T.length;B++){var U=T[B];if(typeof U=="object"){var G=U.tabstopId,J=A[G],Q=T.indexOf(U,B+1);if(N[G]){N[G]===U&&(delete N[G],Object.keys(N).forEach(function(ie){J.parents[ie]=!0}));continue}N[G]=U;var le=J.value;typeof le!="string"?le=I(le):U.fmt&&(le=this.tmStrFormat(le,U,C)),T.splice.apply(T,[B+1,Math.max(0,Q-B)].concat(le,U)),J.indexOf(U)===-1&&J.push(U)}}var re=0,ce=0,de="";return T.forEach(function(ie){if(typeof ie=="string"){var fe=ie.split(`
|
|
1132
|
+
`);fe.length>1?(ce=fe[fe.length-1].length,re+=fe.length-1):ce+=ie.length,de+=ie}else ie&&(ie.start?ie.end={row:re,column:ce}:ie.start={row:re,column:ce})}),{text:de,tabstops:A,tokens:T}},x=(function(){function C(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return C.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.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(L){for(var D=L.action[0]=="r",I=this.selectedTabstop||{},M=I.parents||{},W=this.tabstops.slice(),z=0;z<W.length;z++){var O=W[z],T=O==I||M[O.index];if(O.rangeList.$bias=T?0:1,L.action=="remove"&&O!==I){var A=O.parents&&O.parents[I.index],N=O.rangeList.pointIndex(L.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(L.end,A);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(N,B),G=0;G<U.length;G++)this.removeRange(U[G])}O.rangeList.$onChange(L)}var J=this.session;!this.$inChange&&D&&J.getLength()==1&&!J.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var D=this.session,I=D.getTextRange(L.firstNonLinked),M=0;M<L.length;M++){var W=L[M];if(W.linked){var z=W.original,O=r.snippetManager.tmStrFormat(I,z,this.editor);D.replace(W,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,D=this.editor.selection.anchor,I=this.editor.selection.isEmpty(),M=0;M<this.ranges.length;M++)if(!this.ranges[M].linked){var W=this.ranges[M].contains(L.row,L.column),z=I||this.ranges[M].contains(D.row,D.column);if(W&&z)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var D=this.tabstops.length,I=this.index+(L||1);I=Math.min(Math.max(I,1),D),I==D&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=L,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var I=D.firstNonLinked||D;if(D.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var M=this.editor.multiSelect;M.toSingleRange(I);for(var W=0;W<D.length;W++)D.hasLinkedRanges&&D[W].linked||M.addRange(D[W].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(L,D,I){var M=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var W=a.fromPoints(I,I);$(W.start,D),$(W.end,D),L[0]=[W],L[0].index=0}var z=this.index,O=[z+1,0],T=this.ranges,A=this.snippetId=(this.snippetId||0)+1;L.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=A;for(var G=0;G<N.length;G++){var J=N[G],Q=a.fromPoints(J.start,J.end||J.start);E(Q.start,D),E(Q.end,D),Q.original=J,Q.tabstop=U,T.push(Q),U!=N?U.unshift(Q):U[G]=Q,J.fmtString||U.firstNonLinked&&M?(Q.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=Q)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new s,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(L){var D=this.session;L.forEach(function(I){I.markerId||(I.markerId=D.addMarker(I,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var D=this.session;L.forEach(function(I){D.removeMarker(I.markerId),I.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(D){D.snippetId===L?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},C.prototype.removeRange=function(L){var D=L.tabstop.indexOf(L);D!=-1&&L.tabstop.splice(D,1),D=this.ranges.indexOf(L),D!=-1&&this.ranges.splice(D,1),D=L.tabstop.rangeList.ranges.indexOf(L),D!=-1&&L.tabstop.splice(D,1),this.session.removeMarker(L.markerId),L.tabstop.length||(D=this.tabstops.indexOf(L.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new c,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var E=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},$=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};p.importCssString(`
|
|
1133
|
+
.ace_snippet-marker {
|
|
1134
|
+
-moz-box-sizing: border-box;
|
|
1135
|
+
box-sizing: border-box;
|
|
1136
|
+
background: rgba(194, 193, 208, 0.09);
|
|
1137
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
1138
|
+
position: absolute;
|
|
1139
|
+
}`,"snippets.css",!1),r.snippetManager=new g;var _=e("./editor").Editor;(function(){this.insertSnippet=function(C,L){return r.snippetManager.insertSnippet(this,C,L)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,m){var d=e("../virtual_renderer").VirtualRenderer,p=e("../editor").Editor,w=e("../range").Range,u=e("../lib/event"),f=e("../lib/lang"),a=e("../lib/dom"),s=e("../config").nls,c=e("./../lib/useragent"),h=function(E){return"suggest-aria-id:".concat(E)},o=c.isSafari?"menu":"listbox",l=c.isSafari?"menuitem":"option",g=c.isSafari?"aria-current":"aria-selected",b=function(E){var $=new d(E);$.$maxLines=4;var _=new p($);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=(function(){function E($){var _=a.createElement("div"),C=b(_);$&&$.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",s("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",s("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var L=function(){};C.focus=L,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=L,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(T){var A=T.getDocumentPosition();C.selection.moveToPosition(A),M.start.row=M.end.row=A.row,T.stop()});var D,I=new w(-1,0,-1,1/0),M=new w(-1,0,-1,1/0);M.id=C.session.addMarker(M,"ace_active-line","fullLine"),C.setSelectOnHover=function(T){T?I.id&&(C.session.removeMarker(I.id),I.id=null):I.id=C.session.addMarker(I,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(T){if(!D){D=T;return}if(!(D.x==T.x&&D.y==T.y)){D=T,D.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=D.getDocumentPosition().row;I.start.row!=A&&(I.id||C.setRow(A),z(A))}}),C.renderer.on("beforeRender",function(){if(D&&I.start.row!=-1){D.$pos=null;var T=D.getDocumentPosition().row;I.id||C.setRow(T),z(T,!0)}}),C.renderer.on("afterRender",function(){for(var T=C.renderer.$textLayer,A=T.config.firstRow,N=T.config.lastRow;A<=N;A++){var B=T.element.childNodes[A-T.config.firstRow];B.setAttribute("role",l),B.setAttribute("aria-roledescription",s("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 G="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",G)}var J=B.querySelectorAll(".ace_completion-highlight");J.forEach(function(Q){Q.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var T=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[T-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(g),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=h(T);a.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(g,"true")}});var W=function(){z(-1)},z=function(T,A){T!==I.start.row&&(I.start.row=I.end.row=T,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return I.start.row},u.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,W()}),C.on("hide",W),C.on("changeSelection",W),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(T){var A=C.data[T];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(T){function A(ie,fe){ie&&B.push({type:(N.className||"")+(fe||""),value:ie})}var N=C.data[T],B=[];if(!N)return B;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,G=U.toLowerCase(),J=(C.filterText||"").toLowerCase(),Q=0,le=0,re=0;re<=J.length;re++)if(re!=le&&(N.matchMask&1<<re||re==J.length)){var ce=J.slice(le,re);le=re;var de=G.indexOf(ce,Q);if(de==-1)continue;A(U.slice(Q,de),""),Q=de+ce.length,A(U.slice(de,Q),"completion-highlight")}return A(U.slice(Q,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=L,O.start=L,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(T,A){C.filterText=A||"",C.setValue(f.stringRepeat(`
|
|
1140
|
+
`,T.length),-1),C.data=T||[],C.setRow(0)},C.getData=function(T){return C.data[T]},C.getRow=function(){return M.start.row},C.setRow=function(T){T=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,T)),M.start.row!=T&&(C.selection.clearSelection(),M.start.row=M.end.row=T||0,C.session._emit("changeBackMarker"),C.moveCursorTo(T||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(T,A,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===T.top&&C.anchorPos.left===T.left&&C.anchor===N)return!0;var U=this.container,G=this.renderer.scrollBar.width||10,J=window.innerHeight-G,Q=window.innerWidth-G,le=this.renderer,re=le.$maxLines*A*1.4,ce={top:0,bottom:0},de=J-T.top-3*this.$borderSize-A,ie=T.top-3*this.$borderSize;N||(ie<=de||de>=re?N="bottom":N="top"),N==="top"?(ce.bottom=T.top-this.$borderSize,ce.top=ce.bottom-re):N==="bottom"&&(ce.top=T.top+A+this.$borderSize,ce.bottom=ce.top+re);var fe=ce.top>=0&&ce.bottom<=J;if(!B&&!fe)return!1;fe?le.$maxPixelHeight=null:N==="top"?le.$maxPixelHeight=ie:le.$maxPixelHeight=de,N==="top"?(U.style.top="",U.style.bottom=J+G-ce.bottom+"px",C.isTopdown=!1):(U.style.top=ce.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var $e=T.left;return $e+U.offsetWidth>Q&&($e=Q-U.offsetWidth),U.style.left=$e+"px",U.style.right="",a.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),D=null),C.anchorPos=T,C.anchor=N,!0},C.show=function(T,A,N){this.tryShow(T,A,N?"bottom":void 0,!0)},C.goTo=function(T){var A=this.getRow(),N=this.session.getLength()-1;switch(T){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 E})();a.importCssString(`
|
|
1141
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1142
|
+
background-color: #CAD6FA;
|
|
1143
|
+
z-index: 1;
|
|
1144
|
+
}
|
|
1145
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1146
|
+
background-color: #3a674e;
|
|
1147
|
+
}
|
|
1148
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1149
|
+
border: 1px solid #abbffe;
|
|
1150
|
+
margin-top: -1px;
|
|
1151
|
+
background: rgba(233,233,253,0.4);
|
|
1152
|
+
position: absolute;
|
|
1153
|
+
z-index: 2;
|
|
1154
|
+
}
|
|
1155
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1156
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
1157
|
+
background: rgba(58, 103, 78, 0.62);
|
|
1158
|
+
}
|
|
1159
|
+
.ace_completion-meta {
|
|
1160
|
+
opacity: 0.5;
|
|
1161
|
+
margin-left: 0.9em;
|
|
1162
|
+
}
|
|
1163
|
+
.ace_completion-message {
|
|
1164
|
+
margin-left: 0.9em;
|
|
1165
|
+
color: blue;
|
|
1166
|
+
}
|
|
1167
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1168
|
+
color: #2d69c7;
|
|
1169
|
+
}
|
|
1170
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1171
|
+
color: #93ca12;
|
|
1172
|
+
}
|
|
1173
|
+
.ace_editor.ace_autocomplete {
|
|
1174
|
+
width: 300px;
|
|
1175
|
+
z-index: 200000;
|
|
1176
|
+
border: 1px lightgray solid;
|
|
1177
|
+
position: fixed;
|
|
1178
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
1179
|
+
line-height: 1.4;
|
|
1180
|
+
background: #fefefe;
|
|
1181
|
+
color: #111;
|
|
1182
|
+
}
|
|
1183
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
|
1184
|
+
border: 1px #484747 solid;
|
|
1185
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
1186
|
+
line-height: 1.4;
|
|
1187
|
+
background: #25282c;
|
|
1188
|
+
color: #c1c1c1;
|
|
1189
|
+
}
|
|
1190
|
+
.ace_autocomplete .ace_text-layer {
|
|
1191
|
+
width: calc(100% - 8px);
|
|
1192
|
+
}
|
|
1193
|
+
.ace_autocomplete .ace_line {
|
|
1194
|
+
display: flex;
|
|
1195
|
+
align-items: center;
|
|
1196
|
+
}
|
|
1197
|
+
.ace_autocomplete .ace_line > * {
|
|
1198
|
+
min-width: 0;
|
|
1199
|
+
flex: 0 0 auto;
|
|
1200
|
+
}
|
|
1201
|
+
.ace_autocomplete .ace_line .ace_ {
|
|
1202
|
+
flex: 0 1 auto;
|
|
1203
|
+
overflow: hidden;
|
|
1204
|
+
text-overflow: ellipsis;
|
|
1205
|
+
}
|
|
1206
|
+
.ace_autocomplete .ace_completion-spacer {
|
|
1207
|
+
flex: 1;
|
|
1208
|
+
}
|
|
1209
|
+
.ace_autocomplete.ace_loading:after {
|
|
1210
|
+
content: "";
|
|
1211
|
+
position: absolute;
|
|
1212
|
+
top: 0px;
|
|
1213
|
+
height: 2px;
|
|
1214
|
+
width: 8%;
|
|
1215
|
+
background: blue;
|
|
1216
|
+
z-index: 100;
|
|
1217
|
+
animation: ace_progress 3s infinite linear;
|
|
1218
|
+
animation-delay: 300ms;
|
|
1219
|
+
transform: translateX(-100%) scaleX(1);
|
|
1220
|
+
}
|
|
1221
|
+
@keyframes ace_progress {
|
|
1222
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
|
1223
|
+
50% { transform: translateX(625%) scaleX(2) }
|
|
1224
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
|
1225
|
+
}
|
|
1226
|
+
@media (prefers-reduced-motion) {
|
|
1227
|
+
.ace_autocomplete.ace_loading:after {
|
|
1228
|
+
transform: translateX(625%) scaleX(2);
|
|
1229
|
+
animation: none;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
`,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=b,r.getAriaId=h}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,m){var d=(function(){function p(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return p.prototype.setScreenReaderContent=function(w){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var f=this.popup.getRow(),a=this.popup.renderer.$textLayer,s=a.element.childNodes[f-a.config.firstRow];if(s){for(var c="doc-tooltip ",h=0;h<this._lines.length;h++)c+="ace-inline-screenreader-line-".concat(h," ");s.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var u=this.createCodeBlock();this.screenReaderDiv.appendChild(u)},p.prototype.destroy=function(){this.screenReaderDiv.remove()},p.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.setAttribute("id","ace-inline-screenreader");for(var u=0;u<this._lines.length;u++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(u));var a=document.createTextNode(this._lines[u]);f.appendChild(a),w.appendChild(f)}return w},p})();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,m){var d=e("../snippets").snippetManager,p=e("./inline_screenreader").AceInlineScreenReader,w=(function(){function u(){this.editor=null}return u.prototype.show=function(f,a,s){if(s=s||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new p(f));var c=a.snippet?d.getDisplayTextForSnippet(f,a.snippet):a.value;return a.hideInlinePreview||!c||!c.startsWith(s)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(s.length),c===""?f.removeGhostText():f.setGhostText(c),!0)},u.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},u.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},u.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},u})();r.AceInline=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,m){r.parForEach=function(p,w,u){var f=0,a=p.length;a===0&&u();for(var s=0;s<a;s++)w(p[s],function(c,h){f++,f===a&&u(c,h)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(p,w,u){u=u||d;for(var f=[],a=w-1;a>=0&&u.test(p[a]);a--)f.push(p[a]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(p,w,u){u=u||d;for(var f=[],a=w;a<p.length&&u.test(p[a]);a++)f.push(p[a]);return f},r.getCompletionPrefix=function(p){var w=p.getCursorPosition(),u=p.session.getLine(w.row),f;return p.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(s){!f&&s&&(f=this.retrievePrecedingIdentifier(u,w.column,s))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(u,w.column)},r.triggerAutocomplete=function(p,u){var u=u??p.session.getPrecedingCharacter();return p.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(u)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,r,m){var d=e("./keyboard/hash_handler").HashHandler,p=e("./autocomplete/popup").AcePopup,w=e("./autocomplete/inline").AceInline,u=e("./autocomplete/popup").getAriaId,f=e("./autocomplete/util"),a=e("./lib/lang"),s=e("./lib/dom"),c=e("./snippets").snippetManager,h=e("./config"),o=e("./lib/event"),l=e("./lib/scroll").preventParentScroll,g=function($,_){_.completer&&_.completer.destroy()},b=(function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new d,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new E($.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:h.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new p(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},$.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(_){var C=this.base.row,L=this.base.column,D=this.editor.getCursorPosition().column,I=this.editor.session.getLine(C).slice(L,D);this.inlineRenderer.show(this.editor,_,I)?this.$seen(_):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var L=this.popup.getData(C);L&&(!_||L.hideInlinePreview)&&this.$seen(L)}},$.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,L=C.layerConfig.lineHeight,D=C.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var I=_.container.getBoundingClientRect();D.top+=I.top-C.layerConfig.offset,D.left+=I.left-_.renderer.scrollLeft,D.left+=C.gutterWidth;var M={top:D.top,left:D.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(M.top+=C.$ghostTextWidget.el.offsetHeight);var W=_.container.getBoundingClientRect().bottom-L,z=W<M.top?{top:W,left:M.left}:M;this.popup.tryShow(z,L,"bottom")||this.popup.tryShow(D,L,"top")||this.popup.show(D,L)},$.prototype.openPopup=function(_,C,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),I=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:u(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var M;this.stickySelection&&(M=this.popup.data.indexOf(I)),(!M||M===-1)&&(M=0),this.popup.setRow(this.autoSelect?M:-1),M===D&&I!==this.completions.filtered[M]&&this.$onPopupChange();var W=this.inlineRenderer&&this.inlineEnabled;if(M===D&&W){var z=this.popup.getData(this.popup.getRow());this.$updateGhostText(z)}L||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(_){var C=document.activeElement,L=this.editor.textInput.getElement(),D=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),I=this.popup&&this.popup.container;C!=L&&C.parentNode!=I&&!D&&C!=this.tooltipNode&&_.relatedTarget!=L&&this.detach()},$.prototype.mousedownListener=function(_){this.detach()},$.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(_){this.popup.goTo(_)},$.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var L=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,_,L.filterText,C);return this.completions==L&&this.detach(),D},$.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},$.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},$.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var D=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:D});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,_);return}if(C&&C.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var L=this.editor.getSession(),D=this.editor.getCursorPosition(),I=f.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(D.row,D.column-I.length),this.base.$insertRight=!0;var M={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:D}).provideCompletions(this.editor,M,(function(W,z,O){var T=z.filtered,A=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!T.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new E(B),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(T.length==1&&T[0].value==A&&!T[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&T.length==1)return this.insertMatch(T[0])}this.completions=!O&&this.showLoadingState?new E($.completionsForLoading.concat(T),z.filterText):z,this.openPopup(this.editor,A,_),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)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[_.getHoveredRow()]||C[_.getRow()]),D=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,M=0;M<I;M++){var W=this.editor.completers[M];if(W.getDocTooltip&&L.completerId===W.id){D=W.getDocTooltip(L);break}}if(!D&&typeof L!="string"&&(D=L),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},$.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=s.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",l));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var L=this.tooltipNode;_.docHTML?L.innerHTML=_.docHTML:_.docText&&(L.textContent=_.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,I=D.container.getBoundingClientRect(),M=400,W=300,z=D.renderer.scrollBar.width||10,O=I.left,T=window.innerWidth-I.right-z,A=D.isTopdown?window.innerHeight-z-I.bottom:I.top,N=[Math.min(T/M,1),Math.min(O/M,1),Math.min(A/W,1)*.9],B=Math.max.apply(Math,N),U=L.style;U.display="block",B==N[0]||N[0]>=1?(U.left=I.right+1+"px",U.right="",U.maxWidth=M*B+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-z-I.top,W)+"px"):B==N[1]||N[1]>=1?(U.right=window.innerWidth-I.left+"px",U.left="",U.maxWidth=M*B+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-z-I.top,W)+"px"):B==N[2]&&(U.left=I.left+"px",U.right="",U.maxWidth=Math.min(M,window.innerWidth-I.left)+"px",D.isTopdown?(U.top=I.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-z-I.bottom,W)+"px"):(U.top="",U.bottom=window.innerHeight-I.top+"px",U.maxHeight=Math.min(I.top,W)+"px")),s.$fixPositionBug(L)},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},$.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",g),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(_){return _.completer instanceof $||(_.completer&&(_.completer.destroy(),_.completer=null),h.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),_.completer=$.$sharedInstance):(_.completer=new $,_.once("destroy",g))),_.completer},$})();b.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var _=$.completer.insertMatch();if(_||$.tabstopManager)return _;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var _=f.getCompletionPrefix($);!_&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function($,_){var C=b.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function $(_){this.initialPosition=_,this.active=!0}return $.prototype.insertByIndex=function(_,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],L)},$.prototype.insertMatch=function(_,C,L){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var D=this.completions.filterText.length,I=0;if(C.range&&C.range.start.row===C.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-C.range.start.column,I+=C.range.end.column-this.initialPosition.pos.column),D||I){var M;_.selection.getAllRanges?M=_.selection.getAllRanges():M=[_.getSelectionRange()];for(var W=0,z;z=M[W];W++)z.start.column-=D,z.end.column+=I,_.session.remove(z)}C.snippet?c.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},$.prototype.$insertString=function(_,C){var L=C.value||C;_.execCommand("insertstring",L)},$.prototype.gatherCompletions=function(_,C){var L=_.getSession(),D=_.getCursorPosition(),I=f.getCompletionPrefix(_),M=[];this.completers=_.completers;var W=_.completers.length;return _.completers.forEach(function(z,O){z.getCompletions(_,L,D,I,function(T,A){z.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:z.hideInlinePreview})})),!T&&A&&(M=M.concat(A)),C(null,{prefix:f.getCompletionPrefix(_),matches:M,finished:--W===0})})}),!0},$.prototype.provideCompletions=function(_,C,L){var D=(function(z){var O=z.prefix,T=z.matches;this.completions=new E(T),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(z.finished||this.completions.filtered.length)&&L(null,this.completions,z.finished)}).bind(this),I=!0,M=null;if(this.gatherCompletions(_,(function(z,O){if(this.active){z&&(L(z,[],!0),this.detach());var T=O.prefix;if(T.indexOf(O.prefix)===0){if(I){M=O;return}D(O)}}}).bind(this)),I=!1,M){var W=M;M=null,D(W)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},$})(),E=(function(){function $(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(D,I){return I.exactMatch-D.exactMatch||I.$score-D.$score||(D.caption||D.value).localeCompare(I.caption||I.value)});var L=null;C=C.filter(function(D){var I=D.snippet||D.caption||D.value;return I===L?!1:(L=I,!0)}),this.filtered=C},$.prototype.filterCompletions=function(_,C){var L=[],D=C.toUpperCase(),I=C.toLowerCase();e:for(var M=0,W;W=_[M];M++){if(W.skipFilter){W.$score=W.score,L.push(W);continue}var z=!this.ignoreCaption&&W.caption||W.value||W.snippet;if(z){var O=-1,T=0,A=0,N,B;if(this.exactMatch){if(C!==z.substr(0,C.length))continue e}else{var U=z.toLowerCase().indexOf(I);if(U>-1)A=U;else for(var G=0;G<C.length;G++){var J=z.indexOf(I[G],O+1),Q=z.indexOf(D[G],O+1);if(N=J>=0&&(Q<0||J<Q)?J:Q,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,T|=1<<G),O=N}}W.matchMask=T,W.exactMatch=A?0:1,W.$score=(W.score||0)-A,L.push(W)}}return L},$})();r.Autocomplete=b,r.CompletionProvider=x,r.FilteredList=E}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,m){var d=(function(){function p(w,u){u&&(this.markerType=u.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return p.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(u){return u.range.contains(w.row,w.column)})},p.prototype.markersComparator=function(w,u){return w.range.start.row-u.range.start.row},p.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},p.prototype.update=function(w,u,f,a){if(!(!this.markers||!this.markers.length))for(var s=a.firstRow,c=a.lastRow,h,o=0,l=0,g=0;g<this.markers.length;g++){var b=this.markers[g];if(!(b.range.end.row<s)&&!(b.range.start.row>c)&&(b.range.start.row===l?o++:(l=b.range.start.row,o=0),!(o>200))){var x=b.range.clipRows(s,c);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var E=x.toScreenRange(f);if(E.isEmpty()){h=f.getNextFoldLine(x.end.row,h),h&&h.end.row>x.end.row&&(s=h.end.row);continue}this.markerType==="fullLine"?u.drawFullLineMarker(w,E,b.className,a):E.isMultiLine()?this.markerType==="line"?u.drawMultiLineMarker(w,E,b.className,a):u.drawTextMarker(w,E,b.className,a):u.drawSingleLineMarker(w,E,b.className+" ace_br15",a)}}}},p})();d.prototype.MAX_MARKERS=1e4,r.MarkerGroup=d}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,m){function d(f,a){var s=f.getTextRange(w.fromPoints({row:0,column:0},a));return s.split(u).length-1}function p(f,a){var s=d(f,a),c=f.getValue().split(u),h=Object.create(null),o=c[s];return c.forEach(function(l,g){if(!(!l||l===o)){var b=Math.abs(s-g),x=c.length-b;h[l]?h[l]=Math.max(x,h[l]):h[l]=x}}),h}var w=e("../range").Range,u=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(f,a,s,c,h){var o=p(a,s),l=Object.keys(o);h(null,l.map(function(g){return{caption:g,value:g,score:o[g],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,m){var d=e("../snippets").snippetManager,p=e("../autocomplete").Autocomplete,w=e("../config"),u=e("../lib/lang"),f=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,s=e("../autocomplete/text_completer"),c={getCompletions:function(I,M,W,z,O){if(M.$mode.completer)return M.$mode.completer.getCompletions(I,M,W,z,O);var T=I.session.getState(W.row),A=M.$mode.getCompletions(T,M,W,z);A=A.map(function(N){return N.completerId=c.id,N}),O(null,A)},id:"keywordCompleter"},h=function(I){var M={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(W,z,O,T){return M[z]=T||""}).replace(/\$(\d+?)/g,function(W,z){return M[z]})},o={getCompletions:function(I,M,W,z,O){var T=[],A=M.getTokenAt(W.row,W.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?T.push("html-tag"):T=d.getActiveScopes(I);var N=d.snippetMap,B=[];T.forEach(function(U){for(var G=N[U]||[],J=G.length;J--;){var Q=G[J],le=Q.name||Q.tabTrigger;le&&B.push({caption:le,snippet:Q.content,meta:Q.tabTrigger&&!Q.name?Q.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),O(null,B)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",u.escapeHTML(I.caption),"</b>","<hr></hr>",u.escapeHTML(h(I.snippet))].join(""))},id:"snippetCompleter"},l=[o,s,c];r.setCompleters=function(I){l.length=0,I&&l.push.apply(l,I)},r.addCompleter=function(I){l.push(I)},r.textCompleter=s,r.keyWordCompleter=c,r.snippetCompleter=o;var g={name:"expandSnippet",exec:function(I){return d.expandWithTab(I)},bindKey:"Tab"},b=function(I,M){x(M.session.$mode)},x=function(I){typeof I=="string"&&(I=w.$modes[I]),I&&(d.files||(d.files={}),E(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(x))},E=function(I,M){!M||!I||d.files[I]||(d.files[I]={},w.loadModule(M,function(W){W&&(d.files[I]=W,!W.snippets&&W.snippetText&&(W.snippets=d.parseSnippetFile(W.snippetText)),d.register(W.snippets||[],W.scope),W.includeScopes&&(d.snippetMap[W.scope].includeScopes=W.includeScopes,W.includeScopes.forEach(function(z){x("ace/mode/"+z)})))}))},$=function(I){var M=I.editor,W=M.completer&&M.completer.activated;if(I.command.name==="backspace")W&&!f.getCompletionPrefix(M)&&M.completer.detach();else if(I.command.name==="insertstring"&&!W){_=I;var z=I.editor.$liveAutocompletionDelay;z?C.delay(z):L(I)}},_,C=u.delayedCall(function(){L(_)},0),L=function(I){var M=I.editor,W=f.getCompletionPrefix(M),z=I.args,O=f.triggerAutocomplete(M,z);if(W&&W.length>=M.$liveAutocompletionThreshold||O){var T=p.for(M);T.autoShown=!0,T.showPopup(M)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(p.for(this),this.completers||(this.completers=Array.isArray(I)?I:l),this.commands.addCommand(p.startCommand)):this.commands.removeCommand(p.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:l),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(g),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(g),this.off("changeMode",b))},value:!1}}),r.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function(e){t&&(t.exports=e)})})()})(Eg)),Eg.exports}eA();var Ig={exports:{}},Lg;function tA(){return Lg||(Lg=1,(function(t,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.exports=`
|
|
1233
|
+
|
|
1234
|
+
/* ------------------------------------------------------------------------------------------
|
|
1235
|
+
* Editor Search Form
|
|
1236
|
+
* --------------------------------------------------------------------------------------- */
|
|
1237
|
+
.ace_search {
|
|
1238
|
+
background-color: #ddd;
|
|
1239
|
+
color: #666;
|
|
1240
|
+
border: 1px solid #cbcbcb;
|
|
1241
|
+
border-top: 0 none;
|
|
1242
|
+
overflow: hidden;
|
|
1243
|
+
margin: 0;
|
|
1244
|
+
padding: 4px 6px 0 4px;
|
|
1245
|
+
position: absolute;
|
|
1246
|
+
top: 0;
|
|
1247
|
+
z-index: 99;
|
|
1248
|
+
white-space: normal;
|
|
1249
|
+
}
|
|
1250
|
+
.ace_search.left {
|
|
1251
|
+
border-left: 0 none;
|
|
1252
|
+
border-radius: 0px 0px 5px 0px;
|
|
1253
|
+
left: 0;
|
|
1254
|
+
}
|
|
1255
|
+
.ace_search.right {
|
|
1256
|
+
border-radius: 0px 0px 0px 5px;
|
|
1257
|
+
border-right: 0 none;
|
|
1258
|
+
right: 0;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.ace_search_form, .ace_replace_form {
|
|
1262
|
+
margin: 0 20px 4px 0;
|
|
1263
|
+
overflow: hidden;
|
|
1264
|
+
line-height: 1.9;
|
|
1265
|
+
}
|
|
1266
|
+
.ace_replace_form {
|
|
1267
|
+
margin-right: 0;
|
|
1268
|
+
}
|
|
1269
|
+
.ace_search_form.ace_nomatch {
|
|
1270
|
+
outline: 1px solid red;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.ace_search_field {
|
|
1274
|
+
border-radius: 3px 0 0 3px;
|
|
1275
|
+
background-color: white;
|
|
1276
|
+
color: black;
|
|
1277
|
+
border: 1px solid #cbcbcb;
|
|
1278
|
+
border-right: 0 none;
|
|
1279
|
+
outline: 0;
|
|
1280
|
+
padding: 0;
|
|
1281
|
+
font-size: inherit;
|
|
1282
|
+
margin: 0;
|
|
1283
|
+
line-height: inherit;
|
|
1284
|
+
padding: 0 6px;
|
|
1285
|
+
min-width: 17em;
|
|
1286
|
+
vertical-align: top;
|
|
1287
|
+
min-height: 1.8em;
|
|
1288
|
+
box-sizing: content-box;
|
|
1289
|
+
}
|
|
1290
|
+
.ace_searchbtn {
|
|
1291
|
+
border: 1px solid #cbcbcb;
|
|
1292
|
+
line-height: inherit;
|
|
1293
|
+
display: inline-block;
|
|
1294
|
+
padding: 0 6px;
|
|
1295
|
+
background: #fff;
|
|
1296
|
+
border-right: 0 none;
|
|
1297
|
+
border-left: 1px solid #dcdcdc;
|
|
1298
|
+
cursor: pointer;
|
|
1299
|
+
margin: 0;
|
|
1300
|
+
position: relative;
|
|
1301
|
+
color: #666;
|
|
1302
|
+
}
|
|
1303
|
+
.ace_searchbtn:last-child {
|
|
1304
|
+
border-radius: 0 3px 3px 0;
|
|
1305
|
+
border-right: 1px solid #cbcbcb;
|
|
1306
|
+
}
|
|
1307
|
+
.ace_searchbtn:disabled {
|
|
1308
|
+
background: none;
|
|
1309
|
+
cursor: default;
|
|
1310
|
+
}
|
|
1311
|
+
.ace_searchbtn:hover {
|
|
1312
|
+
background-color: #eef1f6;
|
|
1313
|
+
}
|
|
1314
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
|
1315
|
+
padding: 0px 0.7em
|
|
1316
|
+
}
|
|
1317
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
|
1318
|
+
content: "";
|
|
1319
|
+
border: solid 2px #888;
|
|
1320
|
+
width: 0.5em;
|
|
1321
|
+
height: 0.5em;
|
|
1322
|
+
border-width: 2px 0 0 2px;
|
|
1323
|
+
display:inline-block;
|
|
1324
|
+
transform: rotate(-45deg);
|
|
1325
|
+
}
|
|
1326
|
+
.ace_searchbtn.next:after {
|
|
1327
|
+
border-width: 0 2px 2px 0 ;
|
|
1328
|
+
}
|
|
1329
|
+
.ace_searchbtn_close {
|
|
1330
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
|
1331
|
+
border-radius: 50%;
|
|
1332
|
+
border: 0 none;
|
|
1333
|
+
color: #656565;
|
|
1334
|
+
cursor: pointer;
|
|
1335
|
+
font: 16px/16px Arial;
|
|
1336
|
+
padding: 0;
|
|
1337
|
+
height: 14px;
|
|
1338
|
+
width: 14px;
|
|
1339
|
+
top: 9px;
|
|
1340
|
+
right: 7px;
|
|
1341
|
+
position: absolute;
|
|
1342
|
+
}
|
|
1343
|
+
.ace_searchbtn_close:hover {
|
|
1344
|
+
background-color: #656565;
|
|
1345
|
+
background-position: 50% 100%;
|
|
1346
|
+
color: white;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
.ace_button {
|
|
1350
|
+
margin-left: 2px;
|
|
1351
|
+
cursor: pointer;
|
|
1352
|
+
-webkit-user-select: none;
|
|
1353
|
+
-moz-user-select: none;
|
|
1354
|
+
-o-user-select: none;
|
|
1355
|
+
-ms-user-select: none;
|
|
1356
|
+
user-select: none;
|
|
1357
|
+
overflow: hidden;
|
|
1358
|
+
opacity: 0.7;
|
|
1359
|
+
border: 1px solid rgba(100,100,100,0.23);
|
|
1360
|
+
padding: 1px;
|
|
1361
|
+
box-sizing: border-box!important;
|
|
1362
|
+
color: black;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
.ace_button:hover {
|
|
1366
|
+
background-color: #eee;
|
|
1367
|
+
opacity:1;
|
|
1368
|
+
}
|
|
1369
|
+
.ace_button:active {
|
|
1370
|
+
background-color: #ddd;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
.ace_button.checked {
|
|
1374
|
+
border-color: #3399ff;
|
|
1375
|
+
opacity:1;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
.ace_search_options{
|
|
1379
|
+
margin-bottom: 3px;
|
|
1380
|
+
text-align: right;
|
|
1381
|
+
-webkit-user-select: none;
|
|
1382
|
+
-moz-user-select: none;
|
|
1383
|
+
-o-user-select: none;
|
|
1384
|
+
-ms-user-select: none;
|
|
1385
|
+
user-select: none;
|
|
1386
|
+
clear: both;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
.ace_search_counter {
|
|
1390
|
+
float: left;
|
|
1391
|
+
font-family: arial;
|
|
1392
|
+
padding: 0 8px;
|
|
1393
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,m){var d=e("../lib/dom"),p=e("../lib/lang"),w=e("../lib/event"),u=e("./searchbox-css"),f=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),s=e("../config").nls,c=999;d.importCssString(u,"ace_searchbox",!1);var h=(function(){function g(b,x,E){this.activeInput,this.element=d.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:s("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"},s("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:s("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},s("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},s("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:s("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:s("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:s("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:s("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:s("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(b),d.importCssString(u,"ace_searchbox",b.container),w.addListener(this.element,"touchstart",function($){$.stopPropagation()},b)}return g.prototype.setEditor=function(b){b.searchBox=this,b.renderer.scroller.appendChild(this.element),this.editor=b},g.prototype.setSession=function(b){this.searchRange=null,this.$syncOptions(!0)},g.prototype.onEditorInput=function(){this.find(!1,!1,!0)},g.prototype.$initElements=function(b){this.searchBox=b.querySelector(".ace_search_form"),this.replaceBox=b.querySelector(".ace_replace_form"),this.searchOption=b.querySelector("[action=searchInSelection]"),this.replaceOption=b.querySelector("[action=toggleReplace]"),this.regExpOption=b.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=b.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=b.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=b.querySelector(".ace_search_counter")},g.prototype.$init=function(){var b=this.element;this.$initElements(b);var x=this;w.addListener(b,"mousedown",function(E){setTimeout(function(){x.activeInput.focus()},0),w.stopPropagation(E)}),w.addListener(b,"click",function(E){var $=E.target||E.srcElement,_=$.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),w.stopPropagation(E)}),w.addCommandKeyListener(b,function(E,$,_){var C=a.keyCodeToString(_),L=x.$searchBarKb.findKeyCommand($,C);L&&L.exec&&(L.exec(x),w.stopEvent(E))}),this.$onChange=p.delayedCall(function(){x.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),w.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},g.prototype.setSearchRange=function(b){this.searchRange=b,b?this.searchRangeMarker=this.editor.session.addMarker(b,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},g.prototype.$syncOptions=function(b){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,b)},g.prototype.highlight=function(b){this.editor.session.highlight(b||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},g.prototype.find=function(b,x,E){if(this.editor.session){var $=this.editor.find(this.searchInput.value,{skipCurrent:b,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),_=!$&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},g.prototype.updateCounter=function(){var b=this.editor,x=b.$search.$options.re,E=x.unicode,$=0,_=0;if(x){var C=this.searchRange?b.session.getTextRange(this.searchRange):b.getValue();b.$search.$isMultilineSearch(b.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
|
1394
|
+
`),b.session.doc.$autoNewLine=`
|
|
1395
|
+
`);var L=b.session.doc.positionToIndex(b.selection.anchor);this.searchRange&&(L-=b.session.doc.positionToIndex(this.searchRange.start));for(var D=x.lastIndex=0,I;(I=x.exec(C))&&($++,D=I.index,D<=L&&_++,!($>c||!I[0]&&(x.lastIndex=D+=p.skipEmptyMatch(C,D,E),D>=C.length))););}this.searchCounter.textContent=s("search-box.search-counter","$0 of $1",[_,$>c?c+"+":$])},g.prototype.findNext=function(){this.find(!0,!1)},g.prototype.findPrev=function(){this.find(!0,!0)},g.prototype.findAll=function(){var b=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!b&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},g.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},g.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},g.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},g.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()},g.prototype.show=function(b,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(b=p.escapeRegExp(b)),b!=null&&(this.searchInput.value=b),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},g.prototype.isFocused=function(){var b=document.activeElement;return b==this.searchInput||b==this.replaceInput},g})(),o=new f;o.bindKeys({"Ctrl-f|Command-f":function(g){var b=g.isReplace=!g.isReplace;g.replaceBox.style.display=b?"":"none",g.replaceOption.checked=!1,g.$syncOptions(),g.searchInput.focus()},"Ctrl-H|Command-Option-F":function(g){g.editor.getReadOnly()||(g.replaceOption.checked=!0,g.$syncOptions(),g.replaceInput.focus())},"Ctrl-G|Command-G":function(g){g.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(g){g.findPrev()},esc:function(g){setTimeout(function(){g.hide()})},Return:function(g){g.activeInput==g.replaceInput&&g.replace(),g.findNext()},"Shift-Return":function(g){g.activeInput==g.replaceInput&&g.replace(),g.findPrev()},"Alt-Return":function(g){g.activeInput==g.replaceInput&&g.replaceAll(),g.findAll()},"Tab|Shift-Tab":function(g){(g.activeInput==g.replaceInput?g.searchInput:g.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(g){g.regExpOption.checked=!g.regExpOption.checked,g.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(g){g.caseSensitiveOption.checked=!g.caseSensitiveOption.checked,g.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(g){g.wholeWordOption.checked=!g.wholeWordOption.checked,g.$syncOptions()}},{name:"toggleReplace",exec:function(g){g.replaceOption.checked=!g.replaceOption.checked,g.$syncOptions()}},{name:"searchInSelection",exec:function(g){g.searchOption.checked=!g.searchRange,g.setSearchRange(g.searchOption.checked&&g.editor.getSelectionRange()),g.$syncOptions()}}]);var l=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(g){g.searchBox.hide()}}]);h.prototype.$searchBarKb=o,h.prototype.$closeSearchBarKb=l,r.SearchBox=h,r.Search=function(g,b){var x=g.searchBox||new h(g),E=g.session.selection.getRange(),$=E.isMultiLine()?"":g.session.getTextRange(E);x.show($,b)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){t&&(t.exports=e)})})()})(Ig)),Ig.exports}tA();var Og={exports:{}},Ng;function nA(){return Ng||(Ng=1,(function(t,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,m){function d(f,a){function s(I,M,W){if(!(I.length<M)){var z=I.slice(0,M),O=I.slice(M),T=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(z),N=0,B=0;if(A&&!A[2]&&(N=M-A[1].length,B=M),T&&!T[2]&&(N||(N=M),B=M+T[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>W)return{start:A.index,end:A.index+A[2].length};if(T&&T[2])return N=M+T[2].length,{start:N,end:N+T[3].length}}}for(var c=a.column||f.getOption("printMarginColumn"),h=a.allowMerge!=0,o=Math.min(a.startRow,a.endRow),l=Math.max(a.startRow,a.endRow),g=f.session;o<=l;){var b=g.getLine(o);if(b.length>c){var x=s(b,c,5);if(x){var E=/^\s*/.exec(b)[0];g.replace(new w(o,x.start,o,x.end),`
|
|
1396
|
+
`+E)}l++}else if(h&&/\S/.test(b)&&o!=l){var $=g.getLine(o+1);if($&&/\S/.test($)){var _=b.replace(/\s+$/,""),C=$.replace(/^\s+/,""),L=_+" "+C,x=s(L,c,5);if(x&&x.start>_.length||L.length<c){var D=new w(o,_.length,o+1,$.length-C.length);g.replace(D," "),o--,l--}else _.length<b.length&&g.remove(new w(o,_.length,o,b.length))}}o++}}function p(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var a=f.editor,s=a.selection.cursor;if(s.column<=a.renderer.$printMarginColumn)return;var c=a.session.$undoManager.$lastDelta;d(a,{startRow:s.row,endRow:s.row,allowMerge:!1}),c!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var w=e("../range").Range,u=e("../editor").Editor;e("../config").defineOptions(u.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=d}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,m){function d(y){return{row:y.line,column:y.ch}}function p(y){return new ze(y.row,y.column)}function w(y,S,k){if(S.line===k.line&&S.ch>=k.ch-1){var P=y.getLine(S.line),F=P.charCodeAt(S.ch);55296<=F&&F<=55551&&(k.ch+=1)}return{start:S,end:k}}function u(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),je.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",Li),L(y),je.on(y.getInputField(),"paste",a(y))}function f(y){y.setOption("disableInput",!1),y.off("cursorActivity",Li),je.off(y.getInputField(),"paste",a(y)),y.state.vim=null,sn&&clearTimeout(sn)}function a(y){var S=y.state.vim;return S.onPasteFn||(S.onPasteFn=function(){S.insertMode||(y.setCursor(fe(y.getCursor(),0,1)),Gn.enterInsertMode(y,{},S))}),S.onPasteFn}function s(y,S){return S>=y.firstLine()&&S<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function h(y){return"()[]{}".indexOf(y)!=-1}function o(y){return $a.test(y)}function l(y){return dt.test(y)}function g(y){return/^\s*$/.test(y)}function b(y){return".?!".indexOf(y)!=-1}function x(y,S){for(var k=0;k<S.length;k++)if(S[k]==y)return!0;return!1}function E(y,S,k,P,F){if(S===void 0&&!F)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),jt[y]={type:k,defaultValue:S,callback:F},P)for(var j=0;j<P.length;j++)jt[P[j]]=jt[y];S&&$(y,S)}function $(y,S,k,P){var F=jt[y];P=P||{};var j=P.scope;if(!F)return new Error("Unknown option: "+y);if(F.type=="boolean"){if(S&&S!==!0)return new Error("Invalid argument: "+y+"="+S);S!==!1&&(S=!0)}F.callback?(j!=="local"&&F.callback(S,void 0),j!=="global"&&k&&F.callback(S,k)):(j!=="local"&&(F.value=F.type=="boolean"?!!S:S),j!=="global"&&k&&(k.state.vim.options[y]={value:S}))}function _(y,S,k){var P=jt[y];k=k||{};var F=k.scope;if(!P)return new Error("Unknown option: "+y);if(P.callback){var j=S&&P.callback(void 0,S);return F!=="global"&&j!==void 0?j:F!=="local"?P.callback():void 0}var j=F!=="global"&&S&&S.state.vim.options[y];return(j||F!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=qn()}function L(y){return y.state.vim||(y.state.vim={inputState:new T,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function D(){qe={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Ji(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new J,exCommandHistoryController:new J};for(var y in jt){var S=jt[y];S.value=S.defaultValue}}function I(y){function S(Y){typeof Y=="string"?Dt.value=Y:Dt=null}if(y[0]=="<"){var k=y.toLowerCase().slice(1,-1),P=k.split("-");if(k=P.pop()||"",k=="lt")y="<";else if(k=="space")y=" ";else if(k=="cr")y=`
|
|
1397
|
+
`;else if(vo[k]){var F=Dt.value,j={key:vo[k],target:{value:F,selectionEnd:F.length,selectionStart:F.length}};Dt.onKeyDown&&Dt.onKeyDown(j,Dt.value,S),Dt&&Dt.onKeyUp&&Dt.onKeyUp(j,Dt.value,S);return}}if(y==`
|
|
1398
|
+
`){var q=Dt;Dt=null,q.onClose&&q.onClose(q.value)}else Dt.value=(Dt.value||"")+y}function M(y,S,k){var P=Zi;if(k){if(Ur.indexOf(k)!=-1)return;Ur.push(k),Zi=k.noremap!=0}try{for(var F=L(y),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec(S);){var Y=q[0],X=F.insertMode;if(Dt){I(Y);continue}var oe=Ct.handleKey(y,Y,"mapping");if(!oe&&X&&F.insertMode){if(Y[0]=="<"){var ue=Y.toLowerCase().slice(1,-1),we=ue.split("-");if(ue=we.pop()||"",ue=="lt")Y="<";else if(ue=="space")Y=" ";else if(ue=="cr")Y=`
|
|
1399
|
+
`;else{if(vo.hasOwnProperty(ue)){Y=vo[ue],Ho(y,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Ur.pop(),Zi=Ur.length?P:!1,!Ur.length&&Dt){var Ae=Dt;Dt=null,mr(y,Ae)}}}function W(y,S){var k=y.key;if(!cr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Vr[k]||k;var P="";if(y.ctrlKey&&(P+="C-"),y.altKey&&(P+="A-"),y.metaKey&&(P+="M-"),je.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&y.shiftKey&&(P+="S-"),S&&!S.expectLiteralNext&&k.length==1){if(Bn.keymap&&k in Bn.keymap)(Bn.remapCtrl!=0||!P)&&(k=Bn.keymap[k]);else if(k.charCodeAt(0)>255){var F=y.code&&y.code.slice(-1)||"";y.shiftKey||(F=F.toLowerCase()),F&&(k=F)}}return P+=k,P.length>1&&(P="<"+P+">"),P}}function z(y,S){Bn.string!==y&&(Bn=O(y)),Bn.remapCtrl=S}function O(y){function S(P){return P.split(/\\?(.)/).filter(Boolean)}var k={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var F=P.split(/((?:[^\\;]|\\.)+);/);if(F.length==3){var j=S(F[1]),q=S(F[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)k[j[Y]]=q[Y]}else if(F.length==1){var X=S(P);if(X.length%2!==0)return;for(var Y=0;Y<X.length;Y+=2)k[X[Y]]=X[Y+1]}}}),{keymap:k,string:y}):{keymap:k,string:""}}function T(){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(y,S){y.state.vim.inputState=new T,y.state.vim.expectLiteralNext=!1,je.signal(y,"vim-command-done",S)}function N(){this.removed=[],this.inserted=""}function B(y,S,k){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!S,this.blockwise=!!k}function U(y,S){var k=qe.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");k[y]=S,Bs.push(y)}function G(y){this.registers=y,this.unnamedRegister=y['"']=new B,y["."]=new B,y[":"]=new B,y["/"]=new B,y["+"]=new B}function J(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function Q(y,S){Ln[y]=S}function le(y,S){for(var k=[],P=0;P<S;P++)k.push(y);return k}function re(y,S){us[y]=S}function ce(y,S){Gn[y]=S}function de(y,S,k){var P=y.state.vim,F=P.insertMode||P.visualMode,j=Math.min(Math.max(y.firstLine(),S.line),y.lastLine()),q=y.getLine(j),Y=q.length-1+ +!!F,X=Math.min(Math.max(0,S.ch),Y),oe=q.charCodeAt(X);if(56320<=oe&&oe<=57343){var ue=1;k&&k.line==j&&k.ch>X&&(ue=-1),X+=ue,X>Y&&(X-=2)}return new ze(j,X)}function ie(y){var S={};for(var k in y)y.hasOwnProperty(k)&&(S[k]=y[k]);return S}function fe(y,S,k){return typeof S=="object"&&(k=S.ch,S=S.line),new ze(y.line+S,y.ch+k)}function $e(y,S,k,P){P.operator&&(k="operatorPending");for(var F,j=[],q=[],Y=Zi?S.length-Uo:0,X=Y;X<S.length;X++){var oe=S[X];k=="insert"&&oe.context!="insert"||oe.context&&oe.context!=k||P.operator&&oe.type=="action"||!(F=Re(y,oe.keys))||(F=="partial"&&j.push(oe),F=="full"&&q.push(oe))}return{partial:j.length&&j,full:q.length&&q}}function Re(y,S){var k=S.slice(-11)=="<character>",P=S.slice(-10)=="<register>";if(k||P){var F=S.length-(k?11:10),j=y.slice(0,F),q=S.slice(0,F);return j==q&&y.length>F?"full":q.indexOf(j)==0?"partial":!1}return y==S?"full":S.indexOf(y)==0?"partial":!1}function Ee(y){var S=/^.*(<[^>]+>)$/.exec(y),k=S?S[1]:y.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
|
1400
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function Ue(y,S,k){return function(){for(var P=0;P<k;P++)S(y)}}function He(y){return new ze(y.line,y.ch)}function Ge(y,S){return y.ch==S.ch&&y.line==S.line}function ct(y,S){return y.line<S.line?!0:y.line==S.line&&y.ch<S.ch}function We(y,S){return arguments.length>2&&(S=We.apply(void 0,Array.prototype.slice.call(arguments,1))),ct(y,S)?y:S}function Me(y,S){return arguments.length>2&&(S=Me.apply(void 0,Array.prototype.slice.call(arguments,1))),ct(y,S)?S:y}function $t(y,S,k){var P=ct(y,S),F=ct(S,k);return P&&F}function lt(y,S){return y.getLine(S).length}function Jt(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function hn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Zn(y,S,k){var P=lt(y,S),F=new Array(k-P+1).join(" ");y.setCursor(new ze(S,P)),y.replaceRange(F,y.getCursor())}function Nt(y,S){var k=[],P=y.listSelections(),F=He(y.clipPos(S)),j=!Ge(S,F),q=y.getCursor("head"),Y=gt(P,q),X=Ge(P[Y].head,P[Y].anchor),oe=P.length-1,ue=oe-Y>Y?oe:0,we=P[ue].anchor,Ae=Math.min(we.line,F.line),be=Math.max(we.line,F.line),Ce=we.ch,Pe=F.ch,Ne=P[ue].head.ch-Ce,Ze=Pe-Ce;Ne>0&&Ze<=0?(Ce++,j||Pe--):Ne<0&&Ze>=0?(Ce--,X||Pe++):Ne<0&&Ze==-1&&(Ce--,Pe++);for(var ft=Ae;ft<=be;ft++){var rt={anchor:new ze(ft,Ce),head:new ze(ft,Pe)};k.push(rt)}return y.setSelections(k),S.ch=Pe,we.ch=Ce,we}function An(y,S,k){for(var P=[],F=0;F<k;F++){var j=fe(S,F,0);P.push({anchor:j,head:j})}y.setSelections(P,0)}function gt(y,S,k){for(var P=0;P<y.length;P++){var F=Ge(y[P].anchor,S),j=Ge(y[P].head,S);if(F||j)return P}return-1}function Ye(y,S){var k=S.lastSelection,P=function(){var j=y.listSelections(),q=j[0],Y=j[j.length-1],X=ct(q.anchor,q.head)?q.anchor:q.head,oe=ct(Y.anchor,Y.head)?Y.head:Y.anchor;return[X,oe]},F=function(){var j=y.getCursor(),q=y.getCursor(),Y=k.visualBlock;if(Y){var X=Y.width,oe=Y.height;q=new ze(j.line+oe,j.ch+X);for(var ue=[],we=j.line;we<q.line;we++){var Ae=new ze(we,j.ch),be=new ze(we,q.ch),Ce={anchor:Ae,head:be};ue.push(Ce)}y.setSelections(ue)}else{var Pe=k.anchorMark.find(),Ne=k.headMark.find(),Ze=Ne.line-Pe.line,ft=Ne.ch-Pe.ch;q={line:q.line+Ze,ch:Ze?q.ch:ft+q.ch},k.visualLine&&(j=new ze(j.line,0),q=new ze(q.line,lt(y,q.line))),y.setSelection(j,q)}return[j,q]};return S.visualMode?P():F()}function It(y,S){var k=S.sel.anchor,P=S.sel.head;S.lastPastedText&&(P=y.posFromIndex(y.indexFromPos(k)+S.lastPastedText.length),S.lastPastedText=null),S.lastSelection={anchorMark:y.setBookmark(k),headMark:y.setBookmark(P),anchor:He(k),head:He(P),visualMode:S.visualMode,visualLine:S.visualLine,visualBlock:S.visualBlock}}function kn(y,S,k,P){var F=y.state.vim.sel,j=P?S:F.head,q=P?S:F.anchor,Y;return ct(k,S)&&(Y=k,k=S,S=Y),ct(j,q)?(j=We(S,j),q=Me(q,k)):(q=We(S,q),j=Me(j,k),j=fe(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new ze(j.line-1,lt(y,j.line-1)))),[q,j]}function Pn(y,S,F){var P=y.state.vim;S=S||P.sel;var F=F||P.visualLine?"line":P.visualBlock?"block":"char",j=Hn(y,S,F);y.setSelections(j.ranges,j.primary)}function Hn(y,S,k,P){var F=He(S.head),j=He(S.anchor);if(k=="char"){var q=!P&&!ct(S.head,S.anchor)?1:0,Y=ct(S.head,S.anchor)?1:0;return F=fe(S.head,0,q),j=fe(S.anchor,0,Y),{ranges:[{anchor:j,head:F}],primary:0}}if(k=="line"){if(ct(S.head,S.anchor))F.ch=0,j.ch=lt(y,j.line);else{j.ch=0;var X=y.lastLine();F.line>X&&(F.line=X),F.ch=lt(y,F.line)}return{ranges:[{anchor:j,head:F}],primary:0}}if(k=="block"){var oe=Math.min(j.line,F.line),ue=j.ch,we=Math.max(j.line,F.line),Ae=F.ch;ue<Ae?Ae+=1:ue+=1;for(var be=we-oe+1,Ce=F.line==oe?0:be-1,Pe=[],Ne=0;Ne<be;Ne++)Pe.push({anchor:new ze(oe+Ne,ue),head:new ze(oe+Ne,Ae)});return{ranges:Pe,primary:Ce}}}function zn(y){var S=y.getCursor("head");return y.getSelection().length==1&&(S=We(S,y.getCursor("anchor"))),S}function gn(y,S){var k=y.state.vim;S!==!1&&y.setCursor(de(y,k.sel.head)),It(y,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||je.signal(y,"vim-mode-change",{mode:"normal"})}function Rn(y,S,k){var P=y.getRange(S,k);if(/\n\s*$/.test(P)){var F=P.split(`
|
|
1401
|
+
`);F.pop();for(var j,j=F.pop();F.length>0&&j&&g(j);j=F.pop())k.line--,k.ch=0;j?(k.line--,k.ch=lt(y,k.line)):k.ch=0}}function Xn(y,S,k){S.ch=0,k.ch=0,k.line++}function Qt(y){if(!y)return 0;var S=y.search(/\S/);return S==-1?y.length:S}function Un(y,S,k){var P=S.inclusive,F=S.innerWord,j=S.bigWord,q=S.noSymbol,Y=S.multiline,X=k||zn(y),oe=y.getLine(X.line),ue=oe,we=X.line,Ae=we,be=X.ch,Ce,Pe=q?Vo[0]:Yi[0];if(F&&/\s/.test(oe.charAt(be)))Pe=function(Tn){return/\s/.test(Tn)};else{for(;!Pe(oe.charAt(be));)if(be++,be>=oe.length){if(!Y)return null;be--,Ce=Ti(y,X,!0,j,!0);break}j?Pe=Yi[0]:(Pe=Vo[0],Pe(oe.charAt(be))||(Pe=Vo[1]))}for(var Ne=be,Ze=be;Pe(oe.charAt(Ze))&&Ze>=0;)Ze--;if(Ze++,Ce)Ne=Ce.to,Ae=Ce.line,ue=y.getLine(Ae),!ue&&Ne==0&&Ne++;else for(;Pe(oe.charAt(Ne))&&Ne<oe.length;)Ne++;if(P){var ft=Ne,rt=X.ch<=Ze&&/\s/.test(oe.charAt(X.ch));if(!rt)for(;/\s/.test(ue.charAt(Ne))&&Ne<ue.length;)Ne++;if(ft==Ne||rt){for(var at=Ze;/\s/.test(oe.charAt(Ze-1))&&Ze>0;)Ze--;!Ze&&!rt&&(Ze=at)}}return{start:new ze(we,Ze),end:new ze(Ae,Ne)}}function $i(y,S,k){var P=S;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:P,end:P};var F=je.findMatchingTag(y,S)||je.findEnclosingTag(y,S);return!F||!F.open||!F.close?{start:P,end:P}:k?{start:F.open.from,end:F.close.to}:{start:F.open.to,end:F.close.from}}function ti(y,S,k){Ge(S,k)||qe.jumpList.add(y,S,k)}function sr(y,S){qe.lastCharacterSearch.increment=y,qe.lastCharacterSearch.forward=S.forward,qe.lastCharacterSearch.selectedCharacter=S.selectedCharacter}function Vn(y,S,k,P){var F=He(y.getCursor()),j=k?1:-1,q=k?y.lineCount():-1,Y=F.ch,X=F.line,oe=y.getLine(X),ue={lineText:oe,nextCh:oe.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},we=Ni[P];if(!we)return F;var Ae=Di[we].init,be=Di[we].isComplete;for(Ae&&Ae(ue);X!==q&&S;){if(ue.index+=j,ue.nextCh=ue.lineText.charAt(ue.index),!ue.nextCh){if(X+=j,ue.lineText=y.getLine(X)||"",j>0)ue.index=0;else{var Ce=ue.lineText.length;ue.index=Ce>0?Ce-1:0}ue.nextCh=ue.lineText.charAt(ue.index)}be(ue)&&(F.line=X,F.ch=ue.index,S--)}return ue.nextCh||ue.curMoveThrough?new ze(X,ue.index):F}function Ti(y,S,k,P,F){var j=S.line,q=S.ch,Y=y.getLine(j),X=k?1:-1,oe=P?Yi:Vo;if(F&&Y==""){if(j+=X,Y=y.getLine(j),!s(y,j))return null;q=k?0:Y.length}for(;;){if(F&&Y=="")return{from:0,to:0,line:j};for(var ue=X>0?Y.length:-1,we=ue,Ae=ue;q!=ue;){for(var be=!1,Ce=0;Ce<oe.length&&!be;++Ce)if(oe[Ce](Y.charAt(q))){for(we=q;q!=ue&&oe[Ce](Y.charAt(q));)q+=X;if(Ae=q,be=we!=Ae,we==S.ch&&j==S.line&&Ae==we+X)continue;return{from:Math.min(we,Ae+1),to:Math.max(we,Ae),line:j}}be||(q+=X)}if(j+=X,!s(y,j))return null;Y=y.getLine(j),q=X>0?0:Y.length}}function gr(y,S,k,P,F,j){var q=He(S),Y=[];(P&&!F||!P&&F)&&k++;for(var X=!P||!F,oe=0;oe<k;oe++){var ue=Ti(y,S,P,j,X);if(!ue){var we=lt(y,y.lastLine());Y.push(P?{line:y.lastLine(),from:we,to:we}:{line:0,from:0,to:0});break}Y.push(ue),S=new ze(ue.line,P?ue.to-1:ue.from)}var Ae=Y.length!=k,be=Y[0],Ce=Y.pop();return P&&!F?(!Ae&&(be.from!=q.ch||be.line!=q.line)&&(Ce=Y.pop()),new ze(Ce.line,Ce.from)):P&&F?new ze(Ce.line,Ce.to-1):!P&&F?(!Ae&&(be.to!=q.ch||be.line!=q.line)&&(Ce=Y.pop()),new ze(Ce.line,Ce.to)):new ze(Ce.line,Ce.from)}function Hi(y,S,k,P,F){var j=S,q=new ze(j.line+k.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,F||(P.lastHPos=1/0,P.lastHSPos=y.charCoords(Y,"div").left),q}function Ri(y,S,k,P,F){for(var j=F||y.getCursor(),q=j.ch,Y,X=0;X<S;X++){var oe=y.getLine(j.line);if(Y=So(q,oe,P,k),Y==-1)return null;q=Y}return new ze(y.getCursor().line,Y)}function ls(y,S){var k=y.getCursor().line;return de(y,new ze(k,S-1))}function xr(y,S,k,P){!x(k,Io)&&!rn.test(k)||(S.marks[k]&&S.marks[k].clear(),S.marks[k]=y.setBookmark(P))}function So(y,S,k,P,F){var j;return P?(j=S.indexOf(k,y+1),j!=-1):(j=S.lastIndexOf(k,y-1),j!=-1),j}function Rr(y,S,k,P,F){function j(Ze){return!/\S/.test(y.getLine(Ze))}function q(Ze,ft,rt){return rt?j(Ze)!=j(Ze+ft):!j(Ze)&&j(Ze+ft)}function Y(Ze){P=P>0?1:-1;var ft=y.ace.session.getFoldLine(Ze);ft&&Ze+P>ft.start.row&&Ze+P<ft.end.row&&(P=(P>0?ft.end.row:ft.start.row)-Ze)}var X=S.line,oe=y.firstLine(),ue=y.lastLine(),we,Ae,be=X;if(P){for(;oe<=be&&be<=ue&&k>0;)Y(be),q(be,P)&&k--,be+=P;return new ze(be,0)}var Ce=y.state.vim;if(Ce.visualLine&&q(X,1,!0)){var Pe=Ce.sel.anchor;q(Pe.line,-1,!0)&&(!F||Pe.line!=X)&&(X+=1)}var Ne=j(X);for(be=X;be<=ue&&k;be++)q(be,1,!0)&&(!F||j(be)!=Ne)&&k--;for(Ae=new ze(be,0),be>ue&&!Ne?Ne=!0:F=!1,be=X;be>oe&&!((!F||j(be)==Ne||be==X)&&q(be,-1,!0));be--);return we=new ze(be,0),{start:we,end:Ae}}function hi(y,S,k,P,F){function j(oe){oe.pos+oe.dir<0||oe.pos+oe.dir>=oe.line.length?oe.line=null:oe.pos+=oe.dir}function q(oe,ue,we,Ae){var be=oe.getLine(ue),Ce={line:be,ln:ue,pos:we,dir:Ae};if(Ce.line==="")return{ln:Ce.ln,pos:Ce.pos};var Pe=Ce.pos;for(j(Ce);Ce.line!==null;){if(Pe=Ce.pos,b(Ce.line[Ce.pos])){if(!F)return{ln:Ce.ln,pos:Ce.pos+1};for(j(Ce);Ce.line!==null&&g(Ce.line[Ce.pos]);)Pe=Ce.pos,j(Ce);return{ln:Ce.ln,pos:Pe+1}}j(Ce)}return{ln:Ce.ln,pos:Pe+1}}function Y(oe,ue,we,Ae){var be=oe.getLine(ue),Ce={line:be,ln:ue,pos:we,dir:Ae};if(Ce.line==="")return{ln:Ce.ln,pos:Ce.pos};var Pe=Ce.pos;for(j(Ce);Ce.line!==null;){if(!g(Ce.line[Ce.pos])&&!b(Ce.line[Ce.pos]))Pe=Ce.pos;else if(b(Ce.line[Ce.pos]))return F?g(Ce.line[Ce.pos+1])?{ln:Ce.ln,pos:Ce.pos+1}:{ln:Ce.ln,pos:Pe}:{ln:Ce.ln,pos:Pe};j(Ce)}return Ce.line=be,F&&g(Ce.line[Ce.pos])?{ln:Ce.ln,pos:Ce.pos}:{ln:Ce.ln,pos:Pe}}for(var X={ln:S.line,pos:S.ch};k>0;)P<0?X=Y(y,X.ln,X.pos,P):X=q(y,X.ln,X.pos,P),k--;return new ze(X.ln,X.pos)}function ni(y,S,k,P){function F(X,oe){if(oe.pos+oe.dir<0||oe.pos+oe.dir>=oe.line.length){if(oe.ln+=oe.dir,!s(X,oe.ln)){oe.line=null,oe.ln=null,oe.pos=null;return}oe.line=X.getLine(oe.ln),oe.pos=oe.dir>0?0:oe.line.length-1}else oe.pos+=oe.dir}function j(X,oe,ue,we){var Ne=X.getLine(oe),Ae=Ne==="",be={line:Ne,ln:oe,pos:ue,dir:we},Ce={ln:be.ln,pos:be.pos},Pe=be.line==="";for(F(X,be);be.line!==null;){if(Ce.ln=be.ln,Ce.pos=be.pos,be.line===""&&!Pe)return{ln:be.ln,pos:be.pos};if(Ae&&be.line!==""&&!g(be.line[be.pos]))return{ln:be.ln,pos:be.pos};b(be.line[be.pos])&&!Ae&&(be.pos===be.line.length-1||g(be.line[be.pos+1]))&&(Ae=!0),F(X,be)}var Ne=X.getLine(Ce.ln);Ce.pos=0;for(var Ze=Ne.length-1;Ze>=0;--Ze)if(!g(Ne[Ze])){Ce.pos=Ze;break}return Ce}function q(X,oe,ue,we){var Pe=X.getLine(oe),Ae={line:Pe,ln:oe,pos:ue,dir:we},be={ln:Ae.ln,pos:null},Ce=Ae.line==="";for(F(X,Ae);Ae.line!==null;){if(Ae.line===""&&!Ce)return be.pos!==null?be:{ln:Ae.ln,pos:Ae.pos};if(!(!b(Ae.line[Ae.pos])||be.pos===null||Ae.ln===be.ln&&Ae.pos+1===be.pos))return be;Ae.line!==""&&!g(Ae.line[Ae.pos])&&(Ce=!1,be={ln:Ae.ln,pos:Ae.pos}),F(X,Ae)}var Pe=X.getLine(be.ln);be.pos=0;for(var Ne=0;Ne<Pe.length;++Ne)if(!g(Pe[Ne])){be.pos=Ne;break}return be}for(var Y={ln:S.line,pos:S.ch};k>0;)P<0?Y=q(y,Y.ln,Y.pos,P):Y=j(y,Y.ln,Y.pos,P),k--;return new ze(Y.ln,Y.pos)}function Sn(y,S,k,P){var F=S,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],X={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],oe=y.getLine(F.line).charAt(F.ch),ue=oe===X?1:0;if(j=y.scanForBracket(new ze(F.line,F.ch+ue),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new ze(F.line,F.ch+ue),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var we=j;j=q,q=we}return P?q.ch+=1:j.ch+=1,{start:j,end:q}}function Wr(y,S,k,P){var F=He(S),j=y.getLine(F.line),q=j.split(""),Y,X,oe,ue,we=q.indexOf(k);if(F.ch<we)F.ch=we;else if(we<F.ch&&q[F.ch]==k){var Ae=/string/.test(y.getTokenTypeAt(fe(S,0,1))),be=/string/.test(y.getTokenTypeAt(S)),Ce=Ae&&!be;Ce||(X=F.ch,--F.ch)}if(q[F.ch]==k&&!X)Y=F.ch+1;else for(oe=F.ch;oe>-1&&!Y;oe--)q[oe]==k&&(Y=oe+1);if(Y&&!X)for(oe=Y,ue=q.length;oe<ue&&!X;oe++)q[oe]==k&&(X=oe);return!Y||!X?{start:F,end:F}:(P&&(--Y,++X),{start:new ze(F.line,Y),end:new ze(F.line,X)})}function jr(){}function $n(y){var S=y.state.vim;return S.searchState_||(S.searchState_=new jr)}function Qn(y){return Ei(y,"/")}function di(y){return Mi(y,"/")}function Ei(y,S){var k=Mi(y,S)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var F=0;F<k.length;F++)typeof k[F]=="number"&&P.push(y.substring(k[F]+1,k[F+1]));return P}}function Mi(y,S){S||(S="/");for(var k=!1,P=[],F=0;F<y.length;F++){var j=y.charAt(F);!k&&j==S&&P.push(F),k=!k&&j=="\\"}return P}function cs(y){for(var S="|(){",k="}",P=!1,F=[],j=-1;j<y.length;j++){var q=y.charAt(j)||"",Y=y.charAt(j+1)||"",X=Y&&S.indexOf(Y)!=-1;P?((q!=="\\"||!X)&&F.push(q),P=!1):q==="\\"?(P=!0,Y&&k.indexOf(Y)!=-1&&(X=!0),(!X||Y==="\\")&&F.push(q)):(F.push(q),X&&Y!=="\\"&&F.push("\\"))}return F.join("")}function zs(y){for(var S=!1,k=[],P=-1;P<y.length;P++){var F=y.charAt(P)||"",j=y.charAt(P+1)||"";Xi[F+j]?(k.push(Xi[F+j]),P++):S?(k.push(F),S=!1):F==="\\"?(S=!0,o(j)||j==="$"?k.push("$"):j!=="/"&&j!=="\\"&&k.push("\\")):(F==="$"&&k.push("$"),k.push(F),j==="/"&&k.push("\\"))}return k.join("")}function dn(y){for(var S=new je.StringStream(y),k=[];!S.eol();){for(;S.peek()&&S.peek()!="\\";)k.push(S.next());var P=!1;for(var F in Ws)if(S.match(F,!0)){P=!0,k.push(Ws[F]);break}P||k.push(S.next())}return k.join("")}function Cr(y,S,k){var P=qe.registerController.getRegister("/");if(P.setText(y),y instanceof RegExp)return y;var F=di(y),j,q;if(!F.length)j=y;else{j=y.substring(0,F[0]);var Y=y.substring(F[0]);q=Y.indexOf("i")!=-1}if(!j)return null;_("pcre")||(j=cs(j)),k&&(S=/^[^A-Z]*$/.test(j));var X=new RegExp(j,S||q?"im":"m");return X}function fi(y){typeof y=="string"&&(y=document.createElement(y));for(var S,k=1;k<arguments.length;k++)if(S=arguments[k])if(typeof S!="object"&&(S=document.createTextNode(S)),S.nodeType)y.appendChild(S);else for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(P[0]==="$"?y.style[P.slice(1)]=S[P]:y.setAttribute(P,S[P]));return y}function Lt(y,S){var k=fi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},S);y.openNotification?y.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function $o(y,S){return fi("div",{$display:"flex"},fi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,fi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),S&&fi("span",{$color:"#888"},S))}function mr(y,S){if(Ur.length){S.value||(S.value=""),Dt=S;return}var k=$o(S.prefix,S.desc);if(y.openDialog)y.openDialog(k,S.onClose,{onKeyDown:S.onKeyDown,onKeyUp:S.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:S.value});else{var P="";typeof S.prefix!="string"&&S.prefix&&(P+=S.prefix.textContent),S.desc&&(P+=" "+S.desc),S.onClose(prompt(P,""))}}function En(y,S){if(y instanceof RegExp&&S instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var F=k[P];if(y[F]!==S[F])return!1}return!0}return!1}function mn(y,S,k,P){if(S){var F=$n(y),j=Cr(S,!!k,!!P);if(j)return ho(y,j),En(j,F.getQuery())||F.setQuery(j),j}}function Mn(y){if(y.source.charAt(0)=="^")var S=!0;return{token:function(k){if(S&&!k.sol()){k.skipToEnd();return}var P=k.match(y,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!y.exec(k.next()+P[0]))?(k.next(),null):(k.match(y),"searching");for(;!k.eol()&&(k.next(),!k.match(y,!1)););},query:y}}function ho(y,S){clearTimeout(sn);var k=$n(y);k.highlightTimeout=sn,sn=setTimeout(function(){if(y.state.vim){var P=$n(y);P.highlightTimeout=null;var F=P.getOverlay();(!F||S!=F.query)&&(F&&y.removeOverlay(F),F=Mn(S),y.addOverlay(F),y.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(y.showMatchesOnScrollbar(S))),P.setOverlay(F))}},50)}function er(y,S,k,P){return P===void 0&&(P=1),y.operation(function(){for(var F=y.getCursor(),j=y.getSearchCursor(k,F),q=0;q<P;q++){var Y=j.find(S);if(q==0&&Y&&Ge(j.from(),F)){var X=S?j.from():j.to();Y=j.find(S),Y&&!Y[0]&&Ge(j.from(),X)&&y.getLine(X.line).length==X.ch&&(Y=j.find(S))}if(!Y&&(j=y.getSearchCursor(k,S?new ze(y.lastLine()):new ze(y.firstLine(),0)),!j.find(S)))return}return j.from()})}function Er(y,S,k,P,F){return P===void 0&&(P=1),y.operation(function(){var j=y.getCursor(),q=y.getSearchCursor(k,j),Y=q.find(!S);!F.visualMode&&Y&&Ge(q.from(),j)&&q.find(!S);for(var X=0;X<P;X++)if(Y=q.find(S),!Y&&(q=y.getSearchCursor(k,S?new ze(y.lastLine()):new ze(y.firstLine(),0)),!q.find(S)))return;return[q.from(),q.to()]})}function pi(y){var S=$n(y);S.highlightTimeout&&(clearTimeout(S.highlightTimeout),S.highlightTimeout=null),y.removeOverlay($n(y).getOverlay()),S.setOverlay(null),S.getScrollbarAnnotate()&&(S.getScrollbarAnnotate().clear(),S.setScrollbarAnnotate(null))}function ri(y,S,k){return typeof y!="number"&&(y=y.line),S instanceof Array?x(y,S):typeof k=="number"?y>=S&&y<=k:y==S}function Ui(y){var S=y.ace.renderer;return{top:S.getFirstFullyVisibleRow(),bottom:S.getLastFullyVisibleRow()}}function ii(y,S,k){if(k=="'"||k=="`")return qe.jumpList.find(y,-1)||new ze(0,0);if(k==".")return Vi(y);var P=S.marks[k];return P&&P.find()}function Vi(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var S=y.doc.history.done,k=S.length;k--;)if(S[k].changes)return He(S[k].changes[0].to)}function fo(y,S,k,P,F,j,q,Y,X){function oe(){y.operation(function(){for(;!Pe;)ue(),Ae();be()})}function ue(){var rt=y.getRange(j.from(),j.to()),at=rt.replace(q,Y),Tn=j.to().line;j.replace(at),Ze=j.to().line,F+=Ze-Tn,ft=Ze<Tn}function we(){var rt=Ne&&He(j.to()),at=j.findNext();return at&&!at[0]&&rt&&Ge(j.from(),rt)&&(at=j.findNext()),at}function Ae(){for(;we()&&ri(j.from(),P,F);)if(!(!k&&j.from().line==Ze&&!ft)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Ne=j.from(),Pe=!1;return}Pe=!0}function be(rt){if(rt&&rt(),y.focus(),Ne){y.setCursor(Ne);var at=y.state.vim;at.exMode=!1,at.lastHPos=at.lastHSPos=Ne.ch}X&&X()}function Ce(rt,at,Tn){je.e_stop(rt);var At=W(rt);switch(At){case"y":ue(),Ae();break;case"n":Ae();break;case"a":var Yt=X;X=void 0,y.operation(oe),X=Yt;break;case"l":ue();case"q":case"<Esc>":case"<C-c>":case"<C-[>":be(Tn)}return Pe&&be(Tn),!0}y.state.vim.exMode=!0;var Pe=!1,Ne,Ze,ft;if(Ae(),Pe){Lt(y,"No matches for "+q.source);return}if(!S){oe(),X&&X();return}mr(y,{prefix:fi("span","replace with ",fi("strong",Y)," (y/n/a/q/l)"),onKeyDown:Ce})}function ar(y,S){var k=y.state.vim,P=qe.macroModeState,F=qe.registerController.getRegister("."),j=P.isPlaying,q=P.lastInsertModeChanges;j||(y.off("change",To),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,je.off(y.getInputField(),"keydown",Ki)),!j&&k.insertModeRepeat>1&&(jo(y,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,S||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),F.setText(q.changes.join("")),je.signal(y,"vim-mode-change",{mode:"normal"}),P.isRecording&&fn(P)}function qi(y){Fn.unshift(y)}function Gi(y,S,k,P,F){var j={keys:y,type:S};j[S]=k,j[S+"Args"]=P;for(var q in F)j[q]=F[q];qi(j)}function gi(y,S,k,P){var F=qe.registerController.getRegister(P);if(P==":"){F.keyBuffer[0]&&qr.processCommand(y,F.keyBuffer[0]),k.isPlaying=!1;return}var j=F.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=F.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var X=j[Y],oe,ue;X;)if(oe=/<\w+-.+?>|<\w+>|./.exec(X),ue=oe[0],X=X.substring(oe.index+ue.length),Ct.handleKey(y,ue,"macro"),S.insertMode){var we=F.insertModeChanges[q++].changes;qe.macroModeState.lastInsertModeChanges.changes=we,po(y,we,1),ar(y)}k.isPlaying=!1}function Ii(y,S){if(!y.isPlaying){var k=y.latestRegister,P=qe.registerController.getRegister(k);P&&P.pushText(S)}}function fn(y){if(!y.isPlaying){var S=y.latestRegister,k=qe.registerController.getRegister(S);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(y.lastInsertModeChanges)}}function Wo(y,S){if(!y.isPlaying){var k=y.latestRegister,P=qe.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery(S)}}function To(y,S){var k=qe.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var F=y.state.vim;S;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(S.origin=="+input"||S.origin=="paste"||S.origin===void 0){var j=y.listSelections().length;j>1&&(P.ignoreCount=j);var q=S.text.join(`
|
|
1402
|
+
`);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var Y=F&&F.insertEnd&&F.insertEnd.find(),X=y.getCursor();if(Y&&Y.line==X.line){var oe=Y.ch-X.ch;oe>0&&oe<q.length&&(P.changes.push([q,oe]),q="")}}q&&P.changes.push(q)}}S=S.next}}function Li(y){var S=y.state.vim;if(S.insertMode){var k=qe.macroModeState;if(k.isPlaying)return;var P=k.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,S.insertEnd&&S.insertEnd.clear(),S.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||Ro(y,S)}function Ro(y,S,k){var P=y.getCursor("anchor"),F=y.getCursor("head");if(S.visualMode&&!y.somethingSelected()?gn(y,!1):!S.visualMode&&!S.insertMode&&y.somethingSelected()&&(S.visualMode=!0,S.visualLine=!1,je.signal(y,"vim-mode-change",{mode:"visual"})),S.visualMode){var j=ct(F,P)?0:-1,q=ct(F,P)?-1:0;F=fe(F,0,j),P=fe(P,0,q),S.sel={anchor:P,head:F},xr(y,S,"<",We(F,P)),xr(y,S,">",Me(F,P))}else!S.insertMode&&!k&&(S.lastHPos=y.getCursor().ch)}function Eo(y,S){this.keyName=y,this.key=S.key,this.ctrlKey=S.ctrlKey,this.altKey=S.altKey,this.metaKey=S.metaKey,this.shiftKey=S.shiftKey}function Ki(y){var S=qe.macroModeState,k=S.lastInsertModeChanges,P=je.keyName?je.keyName(y):y.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Eo(P,y)))}function jo(y,S,k,P){function F(){Y?Oi.processAction(y,S,S.lastEditActionCommand):Oi.evalInput(y,S)}function j(ue){if(q.lastInsertModeChanges.changes.length>0){ue=S.lastEditActionCommand?ue:1;var we=q.lastInsertModeChanges;po(y,we.changes,ue)}}var q=qe.macroModeState;q.isPlaying=!0;var Y=!!S.lastEditActionCommand,X=S.inputState;if(S.inputState=S.lastEditInputState,Y&&S.lastEditActionCommand.interlaceInsertRepeat)for(var oe=0;oe<k;oe++)F(),j(1);else P||F(),j(k);S.inputState=X,S.insertMode&&!P&&ar(y),q.isPlaying=!1}function Ho(y,S){je.lookupKey(S,"vim-insert",function(k){return typeof k=="string"?je.commands[k](y):k(y),!0})}function po(y,S,k){var P=y.getCursor("head"),F=qe.macroModeState.lastInsertModeChanges.visualBlock;F&&(An(y,P,F+1),k=y.listSelections().length,y.setCursor(P));for(var j=0;j<k;j++){F&&y.setCursor(fe(P,j,0));for(var q=0;q<S.length;q++){var Y=S[q];if(Y instanceof Eo)Ho(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var X=y.getCursor(),oe=fe(X,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],X,Y[1]?X:oe),y.setCursor(oe)}}}F&&y.setCursor(fe(P,0,1))}function go(y,S,k,P){S.length>1&&S[0]=="n"&&(S=S.replace("numpad","")),S=Lo[S]||S;var F="";if(k.ctrlKey&&(F+="C-"),k.altKey&&(F+="A-"),(F||S.length>1)&&k.shiftKey&&(F+="S-"),P&&!P.expectLiteralNext&&S.length==1){if(Bn.keymap&&S in Bn.keymap)(Bn.remapCtrl!==!1||!F)&&(S=Bn.keymap[S]);else if(S.charCodeAt(0)>255){var j=k.code&&k.code.slice(-1)||"";k.shiftKey||(j=j.toLowerCase()),j&&(S=j)}}return F+=S,F.length>1&&(F="<"+F+">"),F}function mi(y){var S=new y.constructor;return Object.keys(y).forEach(function(k){if(k!="insertEnd"){var P=y[k];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=mi(P)),S[k]=P}}),y.sel&&(S.sel={head:y.sel.head&&He(y.sel.head),anchor:y.sel.anchor&&He(y.sel.anchor)}),S}function ne(y,S,k){var P=!1,F=Ct.maybeInitVimState_(y),j=F.visualBlock||F.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(F.wasInVisualBlock&&!q?F.wasInVisualBlock=!1:q&&F.visualBlock&&(F.wasInVisualBlock=!0),S=="<Esc>"&&!F.insertMode&&!F.visualMode&&q)y.ace.exitMultiSelectMode();else if(j||!q||y.ace.inVirtualSelectionMode)P=Ct.handleKey(y,S,k);else{var Y=mi(F),X=F.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var oe=0;y.ace.forEachSelection(function(){var ue=y.ace.selection;y.state.vim.lastHPos=ue.$desiredColumn==null?ue.lead.column:ue.$desiredColumn,y.state.vim.inputState.changeQueue=X[oe];var we=y.getCursor("head"),Ae=y.getCursor("anchor"),be=ct(we,Ae)?0:-1,Ce=ct(we,Ae)?-1:0;we=fe(we,0,be),Ae=fe(Ae,0,Ce),y.state.vim.sel.head=we,y.state.vim.sel.anchor=Ae,P=Ir(y,S,k),ue.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(X[oe]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=mi(Y)),oe++}),y.curOp.cursorActivity&&!P&&(y.curOp.cursorActivity=!1),F.status=y.state.vim.status,y.state.vim=F,F.inputState.changeQueueList=X,F.inputState.changeQueue=null},!0)}return P&&!F.visualMode&&!F.insert&&F.visualMode!=y.somethingSelected()&&Ro(y,F,!0),P}function Se(y,S){S.off("beforeEndOperation",Se);var k=S.state.cm.vimCmd;k&&S.execCommand(k.exec?k:k.name,k.args),S.curOp=S.prevOp}var Le=e("../range").Range,et=e("../lib/event_emitter").EventEmitter,mt=e("../lib/dom"),Ut=e("../lib/oop"),Kt=e("../lib/keys"),Hr=e("../lib/event"),lr=e("../search").Search,In=e("../lib/useragent"),Mr=e("../search_highlight").SearchHighlight,wn=e("../commands/multi_select_commands"),Sa=e("../mode/text").Mode.prototype.tokenRe,Mo=e("../ext/hardwrap").hardWrap;e("../multi_select");var je=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};je.Pos=function(y,S){if(!(this instanceof ze))return new ze(y,S);this.line=y,this.ch=S},je.defineOption=function(y,S,k){},je.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
|
|
1403
|
+
`)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=Hr.stopEvent,je.keyName=function(y){var S=Kt[y.keyCode]||y.key||"";return S.length==1&&(S=S.toUpperCase()),S=Hr.getModifierString(y).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+S,S},je.keyMap.default=function(y){return function(S){var k=S.ace.commands.commandKeyBinding[y.toLowerCase()];return k&&S.ace.execCommand(k)!==!1}},je.lookupKey=function y(S,k,P){k||(k="default"),typeof k=="string"&&(k=je.keyMap[k]||je.keyMap.default);var F=typeof k=="function"?k(S):k[S];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&P(F))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return y(S,k.fallthrough,P);for(var j=0;j<k.fallthrough.length;j++){var q=y(S,k.fallthrough[j],P);if(q)return q}}},je.findMatchingTag=function(y,S){return y.findMatchingTag(S)},je.findEnclosingTag=function(y,S){},je.signal=function(y,S,k){return y._signal(S,k)},je.on=Hr.addListener,je.off=Hr.removeListener,je.isWordChar=function(y){return y<""?/^\w$/.test(y):(Sa.lastIndex=0,Sa.test(y))},(function(){Ut.implement(je.prototype,et),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var P={text:k.action[0]=="i"?k.lines:[]},F=this.curOp=this.curOp||{};F.changeHandlers||(F.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),F.lastChange?F.lastChange.next=F.lastChange=P:F.lastChange=F.change=P,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(wn.keyboardHandler)},this.operation=function(k,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return k();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var F=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=P;var q=k();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&F&&(this.ace.prevOp=F)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,P,F){var j=F?F[k+"Handlers"]:(this._eventRegistry||{})[k];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(k,P){typeof k=="object"&&(P=k.ch,k=k.line);var F=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:P}),this.ace.selection.moveTo(k,P),F&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var P=this.ace.selection,F=k=="anchor"?P.isEmpty()?P.lead:P.anchor:k=="head"||!k?P.lead:P.getRange()[k];return p(F)},this.listSelections=function(k){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(F){return{anchor:this.clipPos(p(F.cursor==F.end?F.start:F.end)),head:this.clipPos(p(F.cursor))}},this)},this.setSelections=function(k,P){var F=this.ace.multiSelect,j=k.map(function(oe){var ue=d(oe.anchor),we=d(oe.head),Ae=Le.comparePoints(ue,we)<0?new Le.fromPoints(ue,we):new Le.fromPoints(we,ue);return Ae.cursor=Le.comparePoints(Ae.start,we)?Ae.end:Ae.start,Ae});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}P?j[P]&&j.push(j.splice(P,1)[0]):j=j.reverse(),F.toSingleRange(j[0].clone());for(var q=this.ace.session,Y=0;Y<j.length;Y++){var X=q.$clipRangeToDocument(j[Y]);F.addRange(X)}},this.setSelection=function(k,P,F){var j=this.ace.selection;j.moveTo(k.line,k.ch),j.selectTo(P.line,P.ch),F&&F.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var P=this.ace.session.$clipPositionToDocument(k.line,k.ch);return p(P)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var P=k.action=="insert",F=k.start,j=k.end,q=(j.row-F.row)*(P?1:-1),Y=(j.column-F.column)*(P?1:-1);P&&(j=F);for(var X in this.marks){var oe=this.marks[X],ue=Le.comparePoints(oe,F);if(!(ue<0)){if(ue===0&&P)if(!oe.$insertRight)ue=1;else{if(oe.bias!=1){oe.bias=-1;continue}ue=1}var we=P?ue:Le.comparePoints(oe,j);if(we>0){oe.row+=q,oe.column+=oe.row==j.row?Y:0;continue}!P&&we<=0&&(oe.row=F.row,oe.column=F.column,we===0&&(oe.bias=1))}}};var y=function(k,P,F,j){this.cm=k,this.id=P,this.row=F,this.column=j,k.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return p(this)},this.setBookmark=function(k,P){var F=new y(this,this.$uid++,k.line,k.ch);return(!P||!P.insertLeft)&&(F.$insertRight=!0),this.marks[F.id]=F,F},this.moveH=function(k,P){if(P=="char"){var F=this.ace.selection;F.clearSelection(),F.moveCursorBy(0,k)}},this.findPosV=function(k,P,F,j){if(F=="page"){var q=this.ace.renderer,Y=q.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),F="line"}if(F=="line"){var X=this.ace.session.documentToScreenPosition(k.line,k.ch);j!=null&&(X.column=j),X.row+=P,X.row=Math.min(Math.max(0,X.row),this.ace.session.getScreenLength()-1);var oe=this.ace.session.screenToDocumentPosition(X.row,X.column);return p(oe)}debugger},this.charCoords=function(k,P){if(P=="div"||!P){var F=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:F.column,top:F.row}}if(P=="local"){var j=this.ace.renderer,F=this.ace.session.documentToScreenPosition(k.line,k.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,X=q*F.row;return{left:F.column*Y,top:X,bottom:X+q}}},this.coordsChar=function(k,P){var F=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(k.top/F.lineHeight)),q=Math.max(0,Math.floor(k.left/F.characterWidth)),Y=F.session.screenToDocumentPosition(j,q);return p(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(k,P,F){var j=!1,q=!1;k instanceof RegExp&&!k.global&&(j=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
|
|
1404
|
+
`,q=!1);var Y=new lr;P.ch==null&&(P.ch=Number.MAX_VALUE);var X={row:P.line,column:P.ch},oe=this,ue=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(we){Y.setOptions({needle:k,caseSensitive:j,wrap:!1,backwards:we,regExp:q,start:ue||X});var Ae=Y.find(oe.ace.session);return ue=Ae,ue&&[!ue.isEmpty()]},from:function(){return ue&&p(ue.start)},to:function(){return ue&&p(ue.end)},replace:function(we){ue&&(ue.end=oe.ace.session.doc.replace(ue,we))}}},this.scrollTo=function(k,P){var F=this.ace.renderer,j=F.layerConfig,q=j.maxHeight;q-=(F.$size.scrollerHeight-F.lineHeight)*F.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,P){if(k){var F=this.ace.renderer,j={top:0,bottom:P};F.scrollCursorIntoView(d(k),F.lineHeight*2/F.$size.scrollerHeight,j)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,P){return this.ace.session.getTextRange(new Le(k.line,k.ch,P.line,P.ch))},this.replaceRange=function(k,P,F){F||(F=P);var j=new Le(P.line,P.ch,F.line,F.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,k)},this.replaceSelection=this.replaceSelections=function(k){var P=Array.isArray(k)&&k,F=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(F.getRange(),P?k[0]||"":k);return}F.inVirtualSelectionMode=!0;var j=F.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],P?k[q]||"":k);F.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var S={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,P){switch(this.state[k]=P,k){case"indentWithTabs":k=S[k],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:k=S[k]}k&&this.ace.setOption(k,P)},this.getOption=function(k){var P,F=S[k];switch(F&&(P=this.ace.getOption(F)),k){case"indentWithTabs":return k=S[k],!P;case"keyMap":return this.state.$keyMap||"vim"}return F?P:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new Mr(null,"ace_highlight-marker","text"),F=this.ace.session.addDynamicMarker(P);P.id=F.id,P.session=this.ace.session,P.destroy=function(q){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,P=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var P=this.ace.session.getTokenAt(k.line,k.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(k){var P=this.ace.session.findMatchingBracket(d(k));return{to:P&&p(P)}},this.findMatchingTag=function(k){var P=this.ace.session.getMatchingTags(d(k));if(P)return{open:{from:p(P.openTag.start),to:p(P.openTag.end)},close:{from:p(P.closeTag.start),to:p(P.closeTag.end)}}},this.indentLine=function(k,P){P===!0?this.ace.session.indentRows(k,k," "):P===!1&&this.ace.session.outdentRows(new Le(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(d(k))},this.posFromIndex=function(k){return p(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,P,F,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var X=this.ace.session.$findClosingBracket(q.slice(1,2),d(k),Y);else{var X=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!X&&j.bracketRegex&&j.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(X={row:k.line,column:k.ch-1})}return X&&{pos:p(X)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(je.commands.hasOwnProperty(k))return je.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var P=this.$lineHandleChanges;if(!P)return null;for(var F=k.row,j=0;j<P.length;j++){var q=P[j];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<F&&(F+=q.end.row-q.start.row);else if(q.start.row<F){if(F<q.end.row||F==q.end.row&&q.start.column>0)return null;F-=q.end.row-q.start.row}}}return F},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 p(k.$lastDelta.end)}}).call(je.prototype);var Fs=je.StringStream=function(y,S){this.pos=this.start=0,this.string=y,this.tabSize=S||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Fs.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(y){var S=this.string.charAt(this.pos);if(typeof y=="string")var k=S==y;else var k=S&&(y.test?y.test(S):y(S));if(k)return++this.pos,S},eatWhile:function(y){for(var S=this.pos;this.eat(y););return this.pos>S},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var S=this.string.indexOf(y,this.pos);if(S>-1)return this.pos=S,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,S,k){if(typeof y!="string"){var P=this.string.slice(this.pos).match(y);return P&&P.index>0?null:(P&&S!==!1&&(this.pos+=P[0].length),P)}var F=function(q){return k?q.toLowerCase():q},j=this.string.substr(this.pos,y.length);if(F(j)==F(y))return S!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,S){this.lineStart+=y;try{return S()}finally{this.lineStart-=y}}},je.defineExtension=function(y,S){je.prototype[y]=S},mt.importCssString(`.normal-mode .ace_cursor{
|
|
1405
|
+
border: none;
|
|
1406
|
+
background-color: rgba(255,0,0,0.5);
|
|
1407
|
+
}
|
|
1408
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
|
1409
|
+
background-color: transparent;
|
|
1410
|
+
border: 1px solid red;
|
|
1411
|
+
opacity: 0.7
|
|
1412
|
+
}
|
|
1413
|
+
.ace_dialog {
|
|
1414
|
+
position: absolute;
|
|
1415
|
+
left: 0; right: 0;
|
|
1416
|
+
background: inherit;
|
|
1417
|
+
z-index: 15;
|
|
1418
|
+
padding: .1em .8em;
|
|
1419
|
+
overflow: hidden;
|
|
1420
|
+
color: inherit;
|
|
1421
|
+
}
|
|
1422
|
+
.ace_dialog-top {
|
|
1423
|
+
border-bottom: 1px solid #444;
|
|
1424
|
+
top: 0;
|
|
1425
|
+
}
|
|
1426
|
+
.ace_dialog-bottom {
|
|
1427
|
+
border-top: 1px solid #444;
|
|
1428
|
+
bottom: 0;
|
|
1429
|
+
}
|
|
1430
|
+
.ace_dialog input {
|
|
1431
|
+
border: none;
|
|
1432
|
+
outline: none;
|
|
1433
|
+
background: transparent;
|
|
1434
|
+
width: 20em;
|
|
1435
|
+
color: inherit;
|
|
1436
|
+
font-family: monospace;
|
|
1437
|
+
}`,"vimMode",!1),(function(){function y(k,P,F){var j=k.ace.container,q;return q=j.appendChild(document.createElement("div")),F?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof P=="string"?q.innerHTML=P:q.appendChild(P),q}function S(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}je.defineExtension("openDialog",function(k,P,F){function j(we){if(typeof we=="string")oe.value=we;else{if(Y||we&&we.type=="blur"&&document.activeElement===oe)return;X.state.dialog==q&&(X.state.dialog=null,X.focus()),Y=!0,q.remove(),F.onClose&&F.onClose(q);var Ae=X;Ae.state.vim&&(Ae.state.vim.status=null,Ae.ace._signal("changeStatus"),Ae.ace.renderer.$loop.schedule(Ae.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){F||(F={}),S(this,null);var q=y(this,k,F.bottom),Y=!1,X=this;this.state.dialog=q;var oe=q.getElementsByTagName("input")[0],ue;return oe?(F.value&&(oe.value=F.value,F.selectValueOnOpen!==!1&&oe.select()),F.onInput&&je.on(oe,"input",function(we){F.onInput(we,oe.value,j)}),F.onKeyUp&&je.on(oe,"keyup",function(we){F.onKeyUp(we,oe.value,j)}),je.on(oe,"keydown",function(we){F&&F.onKeyDown&&F.onKeyDown(we,oe.value,j)||(we.keyCode==13&&P(oe.value),(we.keyCode==27||F.closeOnEnter!==!1&&we.keyCode==13)&&(je.e_stop(we),j()))}),F.closeOnBlur!==!1&&je.on(oe,"blur",j),oe.focus()):(ue=q.getElementsByTagName("button")[0])&&(je.on(ue,"click",function(){j(),X.focus()}),F.closeOnBlur!==!1&&je.on(ue,"blur",j),ue.focus()),j}}),je.defineExtension("openNotification",function(k,P){function F(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){S(this,F);var j=y(this,k,P&&P.bottom),q=!1,Y,X=P&&typeof P.duration<"u"?P.duration:5e3;return je.on(j,"click",function(oe){je.e_preventDefault(oe),F()}),X&&(Y=setTimeout(F,X)),F}})})();var ze=je.Pos,Fn=[{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"}],Uo=Fn.length,mo=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Bn=O(""),$a=/[\d]/,Vo=[je.isWordChar,function(y){return y&&!je.isWordChar(y)&&!/\s/.test(y)}],Yi=[function(y){return/\S/.test(y)}],Io=["<",">"],Bs=["-",'"',".",":","_","/","+"],rn=/^\w$/,dt;try{dt=new RegExp("^[\\p{Lu}]$","u")}catch{dt=/^[A-Z]$/}var jt={};E("filetype",void 0,"string",["ft"],function(y,S){if(S!==void 0){if(y===void 0){var k=S.getOption("mode");return k=="null"?"":k}var k=y==""?"null":y;S.setOption("mode",k)}}),E("textwidth",80,"number",["tw"],function(y,S){if(S!==void 0){if(y===void 0){var k=S.getOption("textwidth");return k}var P=Math.round(y);P>1&&S.setOption("textwidth",P)}});var Ji=function(){function y(X,oe,ue){function we(Pe){var Ne=++F%P,Ze=Y[Ne];Ze&&Ze.clear(),Y[Ne]=X.setBookmark(Pe)}var Ae=F%P,be=Y[Ae];if(be){var Ce=be.find();Ce&&!Ge(Ce,oe)&&we(oe)}else we(oe);we(ue),j=F,q=F-P+1,q<0&&(q=0)}function S(X,oe){F+=oe,F>j?F=j:F<q&&(F=q);var ue=Y[(P+F)%P];if(ue&&!ue.find()){var we=oe>0?1:-1,Ae,be=X.getCursor();do if(F+=we,ue=Y[(P+F)%P],ue&&(Ae=ue.find())&&!Ge(be,Ae))break;while(F<j&&F>q)}return ue}function k(X,oe){var ue=F,we=S(X,oe);return F=ue,we&&we.find()}var P=100,F=-1,j=0,q=0,Y=new Array(P);return{cachedCursor:void 0,add:y,find:k,move:S}},qn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=qe.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,S){var k=qe.registerController.getRegister(S);if(k){if(k.clear(),this.latestRegister=S,y.openDialog){var P=fi("span",{class:"cm-vim-message"},"recording @"+S);this.onRecordingDone=y.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var qe,xn,Ct={enterVimMode:u,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return qe.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return qe},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:Eo,map:function(y,S,k){qr.map(y,S,k)},unmap:function(y,S){return qr.unmap(y,S)},noremap:function(y,S,k){qr.map(y,S,k,!0)},mapclear:function(y){var S=Fn.length,k=Uo,P=Fn.slice(0,S-k);if(Fn=Fn.slice(S-k),y)for(var F=P.length-1;F>=0;F--){var j=P[F];if(y!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var X={};for(var oe in j)X[oe]=j[oe];X.context=q[Y],this._mapCommand(X)}}}},langmap:z,vimKeyFromEvent:W,setOption:$,getOption:_,defineOption:E,defineEx:function(y,S,k){if(!S)S=y;else if(y.indexOf(S)!==0)throw new Error('(Vim.defineEx) "'+S+'" is not a prefix of "'+y+'", command not registered');vr[y]=k,qr.commandMap_[S]={name:y,shortName:S,type:"api"}},handleKey:function(y,S,k){var P=this.findKey(y,S,k);if(typeof P=="function")return P()},multiSelectHandleKey:ne,findKey:function(y,S,k){function P(){var oe=qe.macroModeState;if(oe.isRecording){if(S=="q")return oe.exitMacroRecordMode(),A(y),!0;k!="mapping"&&Ii(oe,S)}}function F(){if(S=="<Esc>"){if(Y.visualMode)gn(y);else{if(!Y.insertMode)return;ar(y)}return A(y),!0}}function j(){if(F())return!0;Y.inputState.keyBuffer.push(S);var oe=Y.inputState.keyBuffer.join(""),ue=S.length==1,we=Oi.matchCommand(oe,Fn,Y.inputState,"insert"),Ae=Y.inputState.changeQueue;if(we.type=="none")return A(y),!1;if(we.type=="partial"){if(we.expectLiteralNext&&(Y.expectLiteralNext=!0),xn&&window.clearTimeout(xn),xn=ue&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(y)},_("insertModeEscKeysTimeout")),ue){var be=y.listSelections();(!Ae||Ae.removed.length!=be.length)&&(Ae=Y.inputState.changeQueue=new N),Ae.inserted+=S;for(var Ce=0;Ce<be.length;Ce++){var Pe=We(be[Ce].anchor,be[Ce].head),Ne=Me(be[Ce].anchor,be[Ce].head),Ze=y.getRange(Pe,y.state.overwrite?fe(Ne,0,1):Ne);Ae.removed[Ce]=(Ae.removed[Ce]||"")+Ze}}return!ue}if(Y.expectLiteralNext=!1,xn&&window.clearTimeout(xn),we.command&&Ae){for(var be=y.listSelections(),Ce=0;Ce<be.length;Ce++){var ft=be[Ce].head;y.replaceRange(Ae.removed[Ce]||"",fe(ft,0,-Ae.inserted.length),ft,"+input")}qe.macroModeState.lastInsertModeChanges.changes.pop()}return we.command||A(y),we.command}function q(){if(P()||F())return!0;Y.inputState.keyBuffer.push(S);var oe=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(oe))return!0;var ue=/^(\d*)(.*)$/.exec(oe);if(!ue)return A(y),!1;var we=Y.visualMode?"visual":"normal",Ae=ue[2]||ue[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ae&&(Ae=Y.inputState.operatorShortcut);var be=Oi.matchCommand(Ae,Fn,Y.inputState,we);return be.type=="none"?(A(y),!1):be.type=="partial"?(be.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):be.type=="clear"?(A(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ue=/^(\d*)(.*)$/.exec(oe),ue[1]&&ue[1]!="0"&&Y.inputState.pushRepeatDigit(ue[1]),be.command)}var Y=L(y),X;return Y.insertMode?X=j():X=q(),X===!1?!Y.insertMode&&S.length===1?function(){return!0}:void 0:X===!0?function(){return!0}:function(){if(!((X.operator||X.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{X.type=="keyToKey"?M(y,X.toKeys,X):Oi.processCommand(y,Y,X)}catch(oe){throw y.state.vim=void 0,L(y),Ct.suppressErrorLogging||console.log(oe),oe}return!0})}},handleEx:function(y,S){qr.processCommand(y,S)},defineMotion:Q,defineAction:ce,defineOperator:re,mapCommand:Gi,_mapCommand:qi,defineRegister:U,exitVisualMode:gn,exitInsertMode:ar},Ur=[],Zi=!1,Dt,Vr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},cr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},vo={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Vr)).forEach(function(y){vo[(Vr[y]||"").toLowerCase()]=vo[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,S){if(y===void 0)return Bn.string;z(y)}),T.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},T.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},B.prototype={setText:function(y,S,k){this.keyBuffer=[y||""],this.linewise=!!S,this.blockwise=!!k},pushText:function(y,S){S&&(this.linewise||this.keyBuffer.push(`
|
|
1438
|
+
`),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(qn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(y,S,k,P,F){if(y!=="_"){P&&k.charAt(k.length-1)!==`
|
|
1439
|
+
`&&(k+=`
|
|
1440
|
+
`);var j=this.isValidRegister(y)?this.getRegister(y):null;if(!j){switch(S){case"yank":this.registers[0]=new B(k,P,F);break;case"delete":case"change":k.indexOf(`
|
|
1441
|
+
`)==-1?this.registers["-"]=new B(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,P))}this.unnamedRegister.setText(k,P,F);return}var q=l(y);q?j.pushText(k,P):j.setText(k,P,F),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(j.toString(),P)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new B),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,Bs)||rn.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},J.prototype={nextMatch:function(y,S){var k=this.historyBuffer,P=S?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var F=this.iterator+P;S?F>=0:F<k.length;F+=P)for(var j=k[F],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=F,j;if(F>=k.length)return this.iterator=k.length,this.initialPrefix;if(F<0)return y},pushInput:function(y){var S=this.historyBuffer.indexOf(y);S>-1&&this.historyBuffer.splice(S,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Oi={matchCommand:function(y,S,k,P){var F=$e(y,S,P,k);if(!F.full&&!F.partial)return{type:"none"};if(!F.full&&F.partial)return{type:"partial",expectLiteralNext:F.partial.length==1&&F.partial[0].keys.slice(-11)=="<character>"};for(var j,q=0;q<F.full.length;q++){var Y=F.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var X=Ee(y);if(!X||X.length>1)return{type:"clear"};k.selectedCharacter=X}return{type:"full",command:j}},processCommand:function(y,S,k){switch(S.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(y,S,k);break;case"operator":this.processOperator(y,S,k);break;case"operatorMotion":this.processOperatorMotion(y,S,k);break;case"action":this.processAction(y,S,k);break;case"search":this.processSearch(y,S,k);break;case"ex":case"keyToEx":this.processEx(y,S,k);break}},processMotion:function(y,S,k){S.inputState.motion=k.motion,S.inputState.motionArgs=ie(k.motionArgs),this.evalInput(y,S)},processOperator:function(y,S,k){var P=S.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(y,S);return}A(y)}P.operator=k.operator,P.operatorArgs=ie(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&(S.visualBlock=!1,Pn(y)),S.visualMode&&this.evalInput(y,S)},processOperatorMotion:function(y,S,k){var P=S.visualMode,F=ie(k.operatorMotionArgs);F&&P&&F.visualLine&&(S.visualLine=!0),this.processOperator(y,S,k),P||this.processMotion(y,S,k)},processAction:function(y,S,k){var P=S.inputState,F=P.getRepeat(),j=!!F,q=ie(k.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(y,S,k),k.motion&&this.processMotion(y,S,k),(k.motion||k.operator)&&this.evalInput(y,S),q.repeat=F||1,q.repeatIsExplicit=j,q.registerName=P.registerName,A(y),S.lastMotion=null,k.isEdit&&this.recordLastEdit(S,P,k),Gn[k.action](y,q,S)},processSearch:function(y,S,k){function P(Ne,Ze,ft){qe.searchHistoryController.pushInput(Ne),qe.searchHistoryController.reset();try{mn(y,Ne,Ze,ft)}catch{Lt(y,"Invalid regex: "+Ne),A(y);return}Oi.processMotion(y,S,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function F(Ne){P(Ne,!0,!0);var Ze=qe.macroModeState;Ze.isRecording&&Wo(Ze,Ne)}function j(Ne,Ze,ft){var rt=W(Ne),at,Tn;rt=="<Up>"||rt=="<Down>"?(at=rt=="<Up>",Tn=Ne.target?Ne.target.selectionEnd:0,Ze=qe.searchHistoryController.nextMatch(Ze,at)||"",ft(Ze),Tn&&Ne.target&&(Ne.target.selectionEnd=Ne.target.selectionStart=Math.min(Tn,Ne.target.value.length))):rt&&rt!="<Left>"&&rt!="<Right>"&&qe.searchHistoryController.reset();var At;try{At=mn(y,Ze,!0,!0)}catch{}At?y.scrollIntoView(er(y,!Y,At),30):(pi(y),y.scrollTo(we.left,we.top))}function q(Ne,Ze,ft){var rt=W(Ne);rt=="<Esc>"||rt=="<C-c>"||rt=="<C-[>"||rt=="<BS>"&&Ze==""?(qe.searchHistoryController.pushInput(Ze),qe.searchHistoryController.reset(),mn(y,ue),pi(y),y.scrollTo(we.left,we.top),je.e_stop(Ne),A(y),ft(),y.focus()):rt=="<Up>"||rt=="<Down>"?je.e_stop(Ne):rt=="<C-u>"&&(je.e_stop(Ne),ft(""))}if(y.getSearchCursor){var Y=k.searchArgs.forward,X=k.searchArgs.wholeWordOnly;$n(y).setReversed(!Y);var oe=Y?"/":"?",ue=$n(y).getQuery(),we=y.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ae=qe.macroModeState;if(Ae.isPlaying){var Pe=Ae.replaySearchQueries.shift();P(Pe,!0,!1)}else mr(y,{onClose:F,prefix:oe,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var be=Un(y,{noSymbol:!0}),Ce=!0;if(be||(be=Un(y,{noSymbol:!1}),Ce=!1),!be){Lt(y,"No word under cursor"),A(y);return}var Pe=y.getLine(be.start.line).substring(be.start.ch,be.end.ch);Ce&&X?Pe="\\b"+Pe+"\\b":Pe=hn(Pe),qe.jumpList.cachedCursor=y.getCursor(),y.setCursor(be.start),P(Pe,!0,!1)}}},processEx:function(y,S,k){function P(j){qe.exCommandHistoryController.pushInput(j),qe.exCommandHistoryController.reset(),qr.processCommand(y,j),y.state.vim&&A(y)}function F(j,q,Y){var X=W(j),oe,ue;(X=="<Esc>"||X=="<C-c>"||X=="<C-[>"||X=="<BS>"&&q=="")&&(qe.exCommandHistoryController.pushInput(q),qe.exCommandHistoryController.reset(),je.e_stop(j),A(y),Y(),y.focus()),X=="<Up>"||X=="<Down>"?(je.e_stop(j),oe=X=="<Up>",ue=j.target?j.target.selectionEnd:0,q=qe.exCommandHistoryController.nextMatch(q,oe)||"",Y(q),ue&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(ue,j.target.value.length))):X=="<C-u>"?(je.e_stop(j),Y("")):X&&X!="<Left>"&&X!="<Right>"&&qe.exCommandHistoryController.reset()}k.type=="keyToEx"?qr.processCommand(y,k.exArgs.input):S.visualMode?mr(y,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:F,selectValueOnOpen:!1}):mr(y,{onClose:P,prefix:":",onKeyDown:F})},evalInput:function(y,S){var k=S.inputState,P=k.motion,F=k.motionArgs||{},j=k.operator,q=k.operatorArgs||{},Y=k.registerName,X=S.sel,oe=He(S.visualMode?de(y,X.head):y.getCursor("head")),ue=He(S.visualMode?de(y,X.anchor):y.getCursor("anchor")),we=He(oe),Ae=He(ue),be,Ce,Pe;if(j&&this.recordLastEdit(S,k),k.repeatOverride!==void 0?Pe=k.repeatOverride:Pe=k.getRepeat(),Pe>0&&F.explicitRepeat?F.repeatIsExplicit=!0:(F.noRepeat||!F.explicitRepeat&&Pe===0)&&(Pe=1,F.repeatIsExplicit=!1),k.selectedCharacter&&(F.selectedCharacter=q.selectedCharacter=k.selectedCharacter),F.repeat=Pe,A(y),P){var Ne=Ln[P](y,oe,F,S,k);if(S.lastMotion=Ln[P],!Ne)return;if(F.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ze=qe.jumpList,ft=Ze.cachedCursor;ft?(ti(y,ft,Ne),delete Ze.cachedCursor):ti(y,oe,Ne)}Ne instanceof Array?(Ce=Ne[0],be=Ne[1]):be=Ne,be||(be=He(oe)),S.visualMode?((!S.visualBlock||be.ch!==1/0)&&(be=de(y,be,we)),Ce&&(Ce=de(y,Ce)),Ce=Ce||Ae,X.anchor=Ce,X.head=be,Pn(y),xr(y,S,"<",ct(Ce,be)?Ce:be),xr(y,S,">",ct(Ce,be)?be:Ce)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),be=de(y,be,we),y.setCursor(be.line,be.ch))}if(j){if(q.lastSel){Ce=Ae;var rt=q.lastSel,at=Math.abs(rt.head.line-rt.anchor.line),Tn=Math.abs(rt.head.ch-rt.anchor.ch);rt.visualLine?be=new ze(Ae.line+at,Ae.ch):rt.visualBlock?be=new ze(Ae.line+at,Ae.ch+Tn):rt.head.line==rt.anchor.line?be=new ze(Ae.line,Ae.ch+Tn):be=new ze(Ae.line+at,Ae.ch),S.visualMode=!0,S.visualLine=rt.visualLine,S.visualBlock=rt.visualBlock,X=S.sel={anchor:Ce,head:be},Pn(y)}else S.visualMode&&(q.lastSel={anchor:He(X.anchor),head:He(X.head),visualBlock:S.visualBlock,visualLine:S.visualLine});var At,Yt,Et,kt,ur;if(S.visualMode){At=We(X.head,X.anchor),Yt=Me(X.head,X.anchor),Et=S.visualLine||q.linewise,kt=S.visualBlock?"block":Et?"line":"char";var yr=w(y,At,Yt);if(ur=Hn(y,{anchor:yr.start,head:yr.end},kt),Et){var On=ur.ranges;if(kt=="block")for(var V=0;V<On.length;V++)On[V].head.ch=lt(y,On[V].head.line);else kt=="line"&&(On[0].head=new ze(On[0].head.line+1,0))}}else{if(At=He(Ce||Ae),Yt=He(be||we),ct(Yt,At)){var Z=At;At=Yt,Yt=Z}Et=F.linewise||q.linewise,Et?Xn(y,At,Yt):F.forward&&Rn(y,At,Yt),kt="char";var se=!F.inclusive||Et,yr=w(y,At,Yt);ur=Hn(y,{anchor:yr.start,head:yr.end},kt,se)}y.setSelections(ur.ranges,ur.primary),S.lastMotion=null,q.repeat=Pe,q.registerName=Y,q.linewise=Et;var ae=us[j](y,q,ur.ranges,Ae,be);S.visualMode&&gn(y,ae!=null),ae&&y.setCursor(ae)}},recordLastEdit:function(y,S,k){var P=qe.macroModeState;P.isPlaying||(y.lastEditInputState=S,y.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Ln={moveToTopLine:function(y,S,k){var P=Ui(y).top+k.repeat-1;return new ze(P,Qt(y.getLine(P)))},moveToMiddleLine:function(y){var S=Ui(y),k=Math.floor((S.top+S.bottom)*.5);return new ze(k,Qt(y.getLine(k)))},moveToBottomLine:function(y,S,k){var P=Ui(y).bottom-k.repeat+1;return new ze(P,Qt(y.getLine(P)))},expandToLine:function(y,S,k){var P=S;return new ze(P.line+k.repeat-1,1/0)},findNext:function(y,S,k){var P=$n(y),F=P.getQuery();if(F){var j=!k.forward;return j=P.isReversed()?!j:j,ho(y,F),er(y,j,F,k.repeat)}},findAndSelectNextInclusive:function(y,S,k,P,F){var j=$n(y),q=j.getQuery();if(q){var Y=!k.forward;Y=j.isReversed()?!Y:Y;var X=Er(y,Y,q,k.repeat,P);if(X){if(F.operator)return X;var oe=X[0],ue=new ze(X[1].line,X[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var we=P.sel.anchor;if(we)return j.isReversed()?k.forward?[we,oe]:[we,ue]:k.forward?[we,ue]:[we,oe]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ue,oe]:[oe,ue]}}},goToMark:function(y,S,k,P){var F=ii(y,P,k.selectedCharacter);return F?k.linewise?{line:F.line,ch:Qt(y.getLine(F.line))}:F:null},moveToOtherHighlightedEnd:function(y,S,k,P){if(P.visualBlock&&k.sameLine){var F=P.sel;return[de(y,new ze(F.anchor.line,F.head.ch)),de(y,new ze(F.head.line,F.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(y,S,k,P){for(var F=S,j=0;j<k.repeat;j++){var q=F;for(var Y in P.marks)if(c(Y)){var X=P.marks[Y].find(),oe=k.forward?ct(X,q):ct(q,X);if(!oe&&!(k.linewise&&X.line==q.line)){var ue=Ge(q,F),we=k.forward?$t(q,X,F):$t(F,X,q);(ue||we)&&(F=X)}}}return k.linewise&&(F=new ze(F.line,Qt(y.getLine(F.line)))),F},moveByCharacters:function(y,S,k){var P=S,F=k.repeat,j=k.forward?P.ch+F:P.ch-F;return new ze(P.line,j)},moveByLines:function(y,S,k,P){var F=S,j=F.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=P.lastHPos;break;default:P.lastHPos=j}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?F.line+q:F.line-q,X=y.firstLine(),oe=y.lastLine();if(Y<X&&F.line==X)return this.moveToStartOfLine(y,S,k,P);if(Y>oe&&F.line==oe)return Hi(y,S,k,P,!0);var ue=y.ace.session.getFoldLine(Y);return ue&&(k.forward?Y>ue.start.row&&(Y=ue.end.row+1):Y=ue.start.row),k.toFirstChar&&(j=Qt(y.getLine(Y)),P.lastHPos=j),P.lastHSPos=y.charCoords(new ze(Y,j),"div").left,new ze(Y,j)},moveByDisplayLines:function(y,S,k,P){var F=S;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=y.charCoords(F,"div").left}var j=k.repeat,X=y.findPosV(F,k.forward?j:-j,"line",P.lastHSPos);if(X.hitSide)if(k.forward)var q=y.charCoords(X,"div"),Y={top:q.top+8,left:P.lastHSPos},X=y.coordsChar(Y,"div");else{var oe=y.charCoords(new ze(y.firstLine(),0),"div");oe.left=P.lastHSPos,X=y.coordsChar(oe,"div")}return P.lastHPos=X.ch,X},moveByPage:function(y,S,k){var P=S,F=k.repeat;return y.findPosV(P,k.forward?F:-F,"page")},moveByParagraph:function(y,S,k){var P=k.forward?1:-1;return Rr(y,S,k.repeat,P)},moveBySentence:function(y,S,k){var P=k.forward?1:-1;return ni(y,S,k.repeat,P)},moveByScroll:function(y,S,k,P){var F=y.getScrollInfo(),j=null,q=k.repeat;q||(q=F.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(S,"local");if(k.repeat=q,j=Ln.moveByDisplayLines(y,S,k,P),!j)return null;var X=y.charCoords(j,"local");return y.scrollTo(null,F.top+X.top-Y.top),j},moveByWords:function(y,S,k){return gr(y,S,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(y,S,k){var P=k.repeat,F=Ri(y,P,k.forward,k.selectedCharacter,S),j=k.forward?-1:1;return sr(j,k),F?(F.ch+=j,F):null},moveToCharacter:function(y,S,k){var P=k.repeat;return sr(0,k),Ri(y,P,k.forward,k.selectedCharacter,S)||S},moveToSymbol:function(y,S,k){var P=k.repeat;return Vn(y,P,k.forward,k.selectedCharacter)||S},moveToColumn:function(y,S,k,P){var F=k.repeat;return P.lastHPos=F-1,P.lastHSPos=y.charCoords(S,"div").left,ls(y,F)},moveToEol:function(y,S,k,P){return Hi(y,S,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,S){var k=S;return new ze(k.line,Qt(y.getLine(k.line)))},moveToMatchedSymbol:function(y,S){for(var k=S,P=k.line,F=k.ch,j=y.getLine(P),q;F<j.length;F++)if(q=j.charAt(F),q&&h(q)){var Y=y.getTokenTypeAt(new ze(P,F+1));if(Y!=="string"&&Y!=="comment")break}if(F<j.length){var X=/[<>]/.test(j[F])?/[(){}[\]<>]/:/[(){}[\]]/,oe=y.findMatchingBracket(new ze(P,F+1),{bracketRegex:X});return oe.to}return k},moveToStartOfLine:function(y,S){return new ze(S.line,0)},moveToLineOrEdgeOfDocument:function(y,S,k){var P=k.forward?y.lastLine():y.firstLine();return k.repeatIsExplicit&&(P=k.repeat-y.getOption("firstLineNumber")),new ze(P,Qt(y.getLine(P)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var S=y.getCursor();return S.sticky=="before"&&S.ch--,S},textObjectManipulation:function(y,S,k,P){var F={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,X,oe;if(F[q]){if(oe=!0,X=Sn(y,S,q,Y),!X){var ue=y.getSearchCursor(new RegExp("\\"+q,"g"),S);ue.find()&&(X=Sn(y,ue.from(),q,Y))}}else if(j[q])oe=!0,X=Wr(y,S,q,Y);else if(q==="W"||q==="w")for(var we=k.repeat||1;we-- >0;){var Ae=Un(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},X&&X.end);Ae&&(X||(X=Ae),X.end=Ae.end)}else if(q==="p")if(X=Rr(y,S,k.repeat,0,Y),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var be=P.inputState.operatorArgs;be&&(be.linewise=!0),X.end.line--}else if(q==="t")X=$i(y,S,Y);else if(q==="s"){var Ce=y.getLine(S.line);S.ch>0&&b(Ce[S.ch])&&(S.ch-=1);var Pe=hi(y,S,k.repeat,1,Y),Ne=hi(y,S,k.repeat,-1,Y);g(y.getLine(Ne.line)[Ne.ch])&&g(y.getLine(Pe.line)[Pe.ch-1])&&(Ne={line:Ne.line,ch:Ne.ch+1}),X={start:Ne,end:Pe}}return X?y.state.vim.visualMode?kn(y,X.start,X.end,oe):[X.start,X.end]:null},repeatLastCharacterSearch:function(y,S,k){var P=qe.lastCharacterSearch,F=k.repeat,j=k.forward===P.forward,q=(P.increment?1:0)*(j?-1:1);y.moveH(-q,"char"),k.inclusive=!!j;var Y=Ri(y,F,j,P.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),S)}},us={change:function(y,S,k){var P,F,j=y.state.vim,q=k[0].anchor,Y=k[0].head;if(j.visualMode)if(S.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),F=y.getSelection(),y.replaceSelection(""),P=q;else{F=y.getSelection();var X=le("",k.length);y.replaceSelections(X),P=We(k[0].head,k[0].anchor)}else{F=y.getRange(q,Y);var oe=j.lastEditInputState||{};if(oe.motion=="moveByWords"&&!g(F)){var ue=/\s+$/.exec(F);ue&&oe.motionArgs&&oe.motionArgs.forward&&(Y=fe(Y,0,-ue[0].length),F=F.slice(0,-ue[0].length))}S.linewise&&(q=new ze(q.line,Qt(y.getLine(q.line))),Y.line>q.line&&(Y=new ze(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),P=q}qe.registerController.pushText(S.registerName,"change",F,S.linewise,k.length>1),Gn.enterInsertMode(y,{head:P},y.state.vim)},delete:function(y,S,k){var P,F,j=y.state.vim;if(j.visualBlock){F=y.getSelection();var q=le("",k.length);y.replaceSelections(q),P=We(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,X=k[0].head;S.linewise&&X.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==X.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new ze(Y.line-1,lt(y,Y.line-1))),F=y.getRange(Y,X),y.replaceRange("",Y,X),P=Y,S.linewise&&(P=Ln.moveToFirstNonWhiteSpaceCharacter(y,Y))}return qe.registerController.pushText(S.registerName,"delete",F,S.linewise,j.visualBlock),de(y,P)},indent:function(y,S,k){var P=y.state.vim,F=P.visualMode?S.repeat:1;if(P.visualBlock){for(var j=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,X=k.length-1;X>=0;X--)if(Y=We(k[X].anchor,k[X].head),S.indentRight)y.replaceRange(q.repeat(F),Y,Y);else{for(var oe=y.getLine(Y.line),ue=0,we=0;we<F;we++){var Ae=oe[Y.ch+ue];if(Ae==" ")ue++;else{if(Ae!=" ")break;ue++;for(var be=1;be<q.length&&(Ae=oe[Y.ch+ue],Ae===" ");be++)ue++}}y.replaceRange("",Y,fe(Y,0,ue))}return Y}if(y.indentMore)for(var we=0;we<F;we++)S.indentRight?y.indentMore():y.indentLess();else{var Ce=k[0].anchor.line,Pe=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;S.linewise&&Pe--;for(var X=Ce;X<=Pe;X++)for(var we=0;we<F;we++)y.indentLine(X,S.indentRight)}return Ln.moveToFirstNonWhiteSpaceCharacter(y,k[0].anchor)},indentAuto:function(y,S,k){return y.execCommand("indentAuto"),Ln.moveToFirstNonWhiteSpaceCharacter(y,k[0].anchor)},hardWrap:function(y,S,k,P,F){if(y.hardWrap){var j=k[0].anchor.line,q=k[0].head.line;S.linewise&&q--;var Y=y.hardWrap({from:j,to:q});return Y>j&&S.linewise&&Y--,S.keepCursor?P:new ze(Y,0)}},changeCase:function(y,S,k,P,F){for(var j=y.getSelections(),q=[],Y=S.toLower,X=0;X<j.length;X++){var oe=j[X],ue="";if(Y===!0)ue=oe.toLowerCase();else if(Y===!1)ue=oe.toUpperCase();else for(var we=0;we<oe.length;we++){var Ae=oe.charAt(we);ue+=l(Ae)?Ae.toLowerCase():Ae.toUpperCase()}q.push(ue)}return y.replaceSelections(q),S.shouldMoveCursor?F:!y.state.vim.visualMode&&S.linewise&&k[0].anchor.line+1==k[0].head.line?Ln.moveToFirstNonWhiteSpaceCharacter(y,P):S.linewise?P:We(k[0].anchor,k[0].head)},yank:function(y,S,k,P){var F=y.state.vim,j=y.getSelection(),q=F.visualMode?We(F.sel.anchor,F.sel.head,k[0].head,k[0].anchor):P;return qe.registerController.pushText(S.registerName,"yank",j,S.linewise,F.visualBlock),q}},Gn={jumpListWalk:function(y,S,k){if(!k.visualMode){var P=S.repeat,F=S.forward,j=qe.jumpList,q=j.move(y,F?P:-P),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,S,k){if(!k.visualMode){var P=S.repeat||1,F=y.defaultTextHeight(),j=y.getScrollInfo().top,q=F*P,Y=S.forward?j+q:j-q,X=He(y.getCursor()),oe=y.charCoords(X,"local");if(S.forward)Y>oe.top?(X.line+=(Y-oe.top)/F,X.line=Math.ceil(X.line),y.setCursor(X),oe=y.charCoords(X,"local"),y.scrollTo(null,oe.top)):y.scrollTo(null,Y);else{var ue=Y+y.getScrollInfo().clientHeight;ue<oe.bottom?(X.line-=(oe.bottom-ue)/F,X.line=Math.floor(X.line),y.setCursor(X),oe=y.charCoords(X,"local"),y.scrollTo(null,oe.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,S){var k=y.getCursor().line,P=y.charCoords(new ze(k,0),"local"),F=y.getScrollInfo().clientHeight,j=P.top;switch(S.position){case"center":j=P.bottom-F/2;break;case"bottom":var q=new ze(k,y.getLine(k).length-1),Y=y.charCoords(q,"local"),X=Y.bottom-j;j=j-F+X}y.scrollTo(null,j)},replayMacro:function(y,S,k){var P=S.selectedCharacter,F=S.repeat,j=qe.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;F--;)gi(y,k,j,P)},enterMacroRecordMode:function(y,S){var k=qe.macroModeState,P=S.selectedCharacter;qe.registerController.isValidRegister(P)&&k.enterMacroRecordMode(y,P)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,S,k){if(!y.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=S&&S.repeat||1;var P=S?S.insertAt:null,F=k.sel,j=S.head||y.getCursor("head"),q=y.listSelections().length;if(P=="eol")j=new ze(j.line,lt(y,j.line));else if(P=="bol")j=new ze(j.line,0);else if(P=="charAfter"){var Y=w(y,j,fe(j,0,1));j=Y.end}else if(P=="firstNonBlank"){var Y=w(y,j,Ln.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(j=new ze(Math.min(F.head.line,F.anchor.line),Math.min(F.head.ch,F.anchor.ch)),q=Math.abs(F.head.line-F.anchor.line)+1):F.head.line<F.anchor.line?j=F.head:j=new ze(F.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(j=new ze(Math.min(F.head.line,F.anchor.line),Math.max(F.head.ch,F.anchor.ch)+1),q=Math.abs(F.head.line-F.anchor.line)+1):F.head.line>=F.anchor.line?j=fe(F.head,0,1):j=new ze(F.anchor.line,0)}else if(P=="inplace"){if(k.visualMode)return}else P=="lastEdit"&&(j=Vi(y)||j);y.setOption("disableInput",!1),S&&S.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})),qe.macroModeState.isPlaying||(y.on("change",To),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=y.setBookmark(j,{insertLeft:!0}),je.on(y.getInputField(),"keydown",Ki)),k.visualMode&&gn(y),An(y,j,q)}},toggleVisualMode:function(y,S,k){var P=S.repeat,F=y.getCursor(),j;if(k.visualMode)k.visualLine^S.linewise||k.visualBlock^S.blockwise?(k.visualLine=!!S.linewise,k.visualBlock=!!S.blockwise,je.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Pn(y)):gn(y);else{k.visualMode=!0,k.visualLine=!!S.linewise,k.visualBlock=!!S.blockwise,j=de(y,new ze(F.line,F.ch+P-1));var q=w(y,F,j);k.sel={anchor:q.start,head:q.end},je.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Pn(y),xr(y,k,"<",We(F,j)),xr(y,k,">",Me(F,j))}},reselectLastSelection:function(y,S,k){var P=k.lastSelection;if(k.visualMode&&It(y,k),P){var F=P.anchorMark.find(),j=P.headMark.find();if(!F||!j)return;k.sel={anchor:F,head:j},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,Pn(y),xr(y,k,"<",We(F,j)),xr(y,k,">",Me(F,j)),je.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(y,S,k){var P,F;if(k.visualMode){if(P=y.getCursor("anchor"),F=y.getCursor("head"),ct(F,P)){var j=F;F=P,P=j}F.ch=lt(y,F.line)-1}else{var q=Math.max(S.repeat,2);P=y.getCursor(),F=de(y,new ze(P.line+q-1,1/0))}for(var Y=0,X=P.line;X<F.line;X++){Y=lt(y,P.line);var oe="",ue=0;if(!S.keepSpaces){var we=y.getLine(P.line+1);ue=we.search(/\S/),ue==-1?ue=we.length:oe=" "}y.replaceRange(oe,new ze(P.line,Y),new ze(P.line+1,ue))}var Ae=de(y,new ze(P.line,Y));k.visualMode&&gn(y,!1),y.setCursor(Ae)},newLineAndEnterInsertMode:function(y,S,k){k.insertMode=!0;var P=He(y.getCursor());if(P.line===y.firstLine()&&!S.after)y.replaceRange(`
|
|
1442
|
+
`,new ze(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{P.line=S.after?P.line:P.line-1,P.ch=lt(y,P.line),y.setCursor(P);var F=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;F(y)}this.enterInsertMode(y,{repeat:S.repeat},k)},paste:function(y,S,k){var P=this,F=qe.registerController.getRegister(S.registerName),j=function(){var q=F.toString();P.continuePaste(y,S,k,q,F)};S.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(y,S,k,q,F)},function(){j()}):j()},continuePaste:function(y,S,k,P,F){var j=He(y.getCursor());if(P){if(S.matchIndent){var q=y.getOption("tabSize"),Y=function(On){var V=On.split(" ").length-1,Z=On.split(" ").length-1;return V*q+Z*1},X=y.getLine(y.getCursor().line),oe=Y(X.match(/^\s*/)[0]),ue=P.replace(/\n$/,""),we=P!==ue,Ae=Y(P.match(/^\s*/)[0]),P=ue.replace(/^\s*/gm,function(On){var V=oe+(Y(On)-Ae);if(V<0)return"";if(y.getOption("indentWithTabs")){var Z=Math.floor(V/q);return Array(Z+1).join(" ")}return Array(V+1).join(" ")});P+=we?`
|
|
1443
|
+
`:""}if(S.repeat>1)var P=Array(S.repeat+1).join(P);var be=F.linewise,Ce=F.blockwise;if(Ce){P=P.split(`
|
|
1444
|
+
`),be&&P.pop();for(var Pe=0;Pe<P.length;Pe++)P[Pe]=P[Pe]==""?" ":P[Pe];j.ch+=S.after?1:0,j.ch=Math.min(lt(y,j.line),j.ch)}else be?k.visualMode?P=k.visualLine?P.slice(0,-1):`
|
|
1445
|
+
`+P.slice(0,P.length-1)+`
|
|
1446
|
+
`:S.after?(P=`
|
|
1447
|
+
`+P.slice(0,P.length-1),j.ch=lt(y,j.line)):j.ch=0:j.ch+=S.after?1:0;var Ne;if(k.visualMode){k.lastPastedText=P;var Ze,ft=Ye(y,k),rt=ft[0],at=ft[1],Tn=y.getSelection(),At=y.listSelections(),Yt=new Array(At.length).join("1").split("1");k.lastSelection&&(Ze=k.lastSelection.headMark.find()),qe.registerController.unnamedRegister.setText(Tn),Ce?(y.replaceSelections(Yt),at=new ze(rt.line+P.length-1,rt.ch),y.setCursor(rt),Nt(y,at),y.replaceSelections(P),Ne=rt):k.visualBlock?(y.replaceSelections(Yt),y.setCursor(rt),y.replaceRange(P,rt,rt),Ne=rt):(y.replaceRange(P,rt,at),Ne=y.posFromIndex(y.indexFromPos(rt)+P.length-1)),Ze&&(k.lastSelection.headMark=y.setBookmark(Ze)),be&&(Ne.ch=0)}else if(Ce){y.setCursor(j);for(var Pe=0;Pe<P.length;Pe++){var Et=j.line+Pe;Et>y.lastLine()&&y.replaceRange(`
|
|
1448
|
+
`,new ze(Et,0));var kt=lt(y,Et);kt<j.ch&&Zn(y,Et,j.ch)}y.setCursor(j),Nt(y,new ze(j.line+P.length-1,j.ch)),y.replaceSelections(P),Ne=j}else if(y.replaceRange(P,j),be){var Et=S.after?j.line+1:j.line;Ne=new ze(Et,Qt(y.getLine(Et)))}else Ne=He(j),/\n/.test(P)||(Ne.ch+=P.length-(S.after?1:0));k.visualMode&&gn(y,!1),y.setCursor(Ne)}},undo:function(y,S){y.operation(function(){Ue(y,je.commands.undo,S.repeat)(),y.setCursor(de(y,y.getCursor("start")))})},redo:function(y,S){Ue(y,je.commands.redo,S.repeat)()},setRegister:function(y,S,k){k.inputState.registerName=S.selectedCharacter},insertRegister:function(y,S,k){var P=S.selectedCharacter,F=qe.registerController.getRegister(P),j=F&&F.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,S,k){ar(y,!0),k.insertModeReturn=!0,je.on(y,"vim-command-done",function P(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Gn.enterInsertMode(y,{},k)),je.off(y,"vim-command-done",P))})},setMark:function(y,S,k){var P=S.selectedCharacter;xr(y,k,P,y.getCursor())},replace:function(y,S,k){var P=S.selectedCharacter,F=y.getCursor(),j,q,Y=y.listSelections();if(k.visualMode)F=y.getCursor("start"),q=y.getCursor("end");else{var X=y.getLine(F.line);j=F.ch+S.repeat,j>X.length&&(j=X.length),q=new ze(F.line,j)}var oe=w(y,F,q);if(F=oe.start,q=oe.end,P==`
|
|
1449
|
+
`)k.visualMode||y.replaceRange("",F,q),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(y);else{var ue=y.getRange(F,q);if(ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/[^\n]/g,P),k.visualBlock){var we=new Array(y.getOption("tabSize")+1).join(" ");ue=y.getSelection(),ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/\t/g,we).replace(/[^\n]/g,P).split(`
|
|
1450
|
+
`),y.replaceSelections(ue)}else y.replaceRange(ue,F,q);k.visualMode?(F=ct(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(F),gn(y,!1)):y.setCursor(fe(q,0,-1))}},incrementNumberToken:function(y,S){for(var k=y.getCursor(),P=y.getLine(k.line),F=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,X;(j=F.exec(P))!==null&&(q=j.index,Y=q+j[0].length,!(k.ch<Y)););if(!(!S.backtrack&&Y<=k.ch)&&j){var oe=j[2]||j[4],ue=j[3]||j[5],we=S.increase?1:-1,Ae={"0b":2,0:8,"":10,"0x":16}[oe.toLowerCase()],be=parseInt(j[1]+ue,Ae)+we*S.repeat;X=be.toString(Ae);var Ce=oe?new Array(ue.length-X.length+1+j[1].length).join("0"):"";X.charAt(0)==="-"?X="-"+oe+Ce+X.substr(1):X=oe+Ce+X;var Pe=new ze(k.line,q),Ne=new ze(k.line,Y);y.replaceRange(X,Pe,Ne),y.setCursor(new ze(k.line,q+X.length-1))}},repeatLastEdit:function(y,S,k){var P=k.lastEditInputState;if(P){var F=S.repeat;F&&S.repeatIsExplicit?k.lastEditInputState.repeatOverride=F:F=k.lastEditInputState.repeatOverride||F,jo(y,k,F,!1)}},indent:function(y,S){y.indentLine(y.getCursor().line,S.indentRight)},exitInsertMode:ar},Ni={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Di={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var S=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,S}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var S=y.lineText.match(/^#(\w+)/)[1];if(S==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(S==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(S==="else"&&y.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),jr.prototype={getQuery:function(){return qe.query},setQuery:function(y){qe.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return qe.isReversed},setReversed:function(y){qe.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Xi={"\\n":`
|
|
1451
|
+
`,"\\r":"\r","\\t":" "},Ws={"\\/":"/","\\\\":"\\","\\n":`
|
|
1452
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},sn=0,Ta=function(){this.buildCommandMap_()};Ta.prototype={processCommand:function(y,S,k){var P=this;y.operation(function(){y.curOp.isVimOp=!0,P._processCommand(y,S,k)})},_processCommand:function(y,S,k){var P=y.state.vim,F=qe.registerController.getRegister(":"),j=F.toString(),q=new je.StringStream(S);F.setText(S);var Y=k||{};Y.input=S;try{this.parseInput_(y,q,Y)}catch(ue){throw Lt(y,ue.toString()),ue}P.visualMode&&gn(y);var X,oe;if(!Y.commandName)Y.line!==void 0&&(oe="move");else if(X=this.matchCommand_(Y.commandName),X){if(oe=X.name,X.excludeFromCommandHistory&&F.setText(j),this.parseCommandArgs_(q,Y,X),X.type=="exToKey"){M(y,X.toKeys,X);return}if(X.type=="exToEx"){this.processCommand(y,X.toInput);return}}if(!oe){Lt(y,'Not an editor command ":'+S+'"');return}try{vr[oe](y,Y),(!X||!X.possiblyAsync)&&Y.callback&&Y.callback()}catch(ue){throw Lt(y,ue.toString()),ue}},parseInput_:function(y,S,k){if(S.eatWhile(":"),S.eat("%")?(k.line=y.firstLine(),k.lineEnd=y.lastLine()):(k.line=this.parseLineSpec_(y,S),k.line!==void 0&&S.eat(",")&&(k.lineEnd=this.parseLineSpec_(y,S))),k.line==null)if(y.state.vim.visualMode){var P=ii(y,y.state.vim,"<");k.selectionLine=P&&P.line,P=ii(y,y.state.vim,">"),k.selectionLineEnd=P&&P.line}else k.selectionLine=y.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var F=S.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return F?k.commandName=F[1]:k.commandName=S.match(/.*/)[0],k},parseLineSpec_:function(y,S){var k=S.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(S.next()){case".":return this.parseLineSpecOffset_(S,y.getCursor().line);case"$":return this.parseLineSpecOffset_(S,y.lastLine());case"'":var P=S.next(),F=ii(y,y.state.vim,P);if(!F)throw new Error("Mark not set");return this.parseLineSpecOffset_(S,F.line);case"-":case"+":return S.backUp(1),this.parseLineSpecOffset_(S,y.getCursor().line);default:return S.backUp(1),void 0}},parseLineSpecOffset_:function(y,S){var k=y.match(/^([+-])?(\d+)/);if(k){var P=parseInt(k[2],10);k[1]=="-"?S-=P:S+=P}return S},parseCommandArgs_:function(y,S,k){if(!y.eol()){S.argString=y.match(/.*/)[0];var P=k.argDelimiter||/\s+/,F=Jt(S.argString).split(P);F.length&&F[0]&&(S.args=F)}},matchCommand_:function(y){for(var S=y.length;S>0;S--){var k=y.substring(0,S);if(this.commandMap_[k]){var P=this.commandMap_[k];if(P.name.indexOf(y)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<mo.length;y++){var S=mo[y],k=S.shortName||S.name;this.commandMap_[k]=S}},map:function(y,S,k,P){if(y!=":"&&y.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var F=y.substring(1);S!=":"&&S.charAt(0)==":"?this.commandMap_[F]={name:F,type:"exToEx",toInput:S.substring(1),user:!0}:this.commandMap_[F]={name:F,type:"exToKey",toKeys:S,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:S,noremap:!!P};k&&(j.context=k),Fn.unshift(j)}},unmap:function(y,S){if(y!=":"&&y.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var k=y.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var P=y,F=0;F<Fn.length;F++)if(P==Fn[F].keys&&Fn[F].context===S)return Fn.splice(F,1),!0}};var vr={colorscheme:function(y,S){if(!S.args||S.args.length<1){Lt(y,y.getOption("theme"));return}y.setOption("theme",S.args[0])},map:function(y,S,k,P){var F=S.args;if(!F||F.length<2){y&&Lt(y,"Invalid mapping: "+S.input);return}qr.map(F[0],F[1],k,P)},imap:function(y,S){this.map(y,S,"insert")},nmap:function(y,S){this.map(y,S,"normal")},vmap:function(y,S){this.map(y,S,"visual")},omap:function(y,S){this.map(y,S,"operatorPending")},noremap:function(y,S){this.map(y,S,void 0,!0)},inoremap:function(y,S){this.map(y,S,"insert",!0)},nnoremap:function(y,S){this.map(y,S,"normal",!0)},vnoremap:function(y,S){this.map(y,S,"visual",!0)},onoremap:function(y,S){this.map(y,S,"operatorPending",!0)},unmap:function(y,S,k){var P=S.args;(!P||P.length<1||!qr.unmap(P[0],k))&&y&&Lt(y,"No such mapping: "+S.input)},mapclear:function(y,S){Ct.mapclear()},imapclear:function(y,S){Ct.mapclear("insert")},nmapclear:function(y,S){Ct.mapclear("normal")},vmapclear:function(y,S){Ct.mapclear("visual")},omapclear:function(y,S){Ct.mapclear("operatorPending")},move:function(y,S){Oi.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:S.line+1})},set:function(y,S){var k=S.args,P=S.setCfg||{};if(!k||k.length<1){y&&Lt(y,"Invalid mapping: "+S.input);return}var F=k[0].split("="),j=F[0],q=F[1],Y=!1,X=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+S.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),X=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var oe=jt[j]&&jt[j].type=="boolean";if(oe&&(X?q=!_(j,y,P):q==null&&(q=!0)),!oe&&q===void 0||Y){var ue=_(j,y,P);ue instanceof Error?Lt(y,ue.message):ue===!0||ue===!1?Lt(y," "+(ue?"":"no")+j):Lt(y," "+j+"="+ue)}else{var we=$(j,q,y,P);we instanceof Error&&Lt(y,we.message)}},setlocal:function(y,S){S.setCfg={scope:"local"},this.set(y,S)},setglobal:function(y,S){S.setCfg={scope:"global"},this.set(y,S)},registers:function(y,S){var k=S.args,P=qe.registerController.registers,F=`----------Registers----------
|
|
1453
|
+
|
|
1454
|
+
`;if(k){var j;k=k.join("");for(var q=0;q<k.length;q++)if(j=k.charAt(q),!!qe.registerController.isValidRegister(j)){var Y=P[j]||new B;F+='"'+j+" "+Y.toString()+`
|
|
1455
|
+
`}}else for(var j in P){var X=P[j].toString();X.length&&(F+='"'+j+" "+X+`
|
|
1456
|
+
`)}Lt(y,F)},sort:function(y,S){function k(){if(S.argString){var Et=new je.StringStream(S.argString);if(Et.eat("!")&&(j=!0),Et.eol())return;if(!Et.eatSpace())return"Invalid arguments";var kt=Et.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!kt&&!Et.eol())return"Invalid arguments";if(kt[1]){q=kt[1].indexOf("i")!=-1,Y=kt[1].indexOf("u")!=-1;var ur=kt[1].indexOf("d")!=-1||kt[1].indexOf("n")!=-1&&1,yr=kt[1].indexOf("x")!=-1&&1,On=kt[1].indexOf("o")!=-1&&1;if(ur+yr+On>1)return"Invalid arguments";X=ur&&"decimal"||yr&&"hex"||On&&"octal"}kt[2]&&(oe=new RegExp(kt[2].substr(1,kt[2].length-2),q?"i":""))}}function P(Et,kt){if(j){var ur;ur=Et,Et=kt,kt=ur}q&&(Et=Et.toLowerCase(),kt=kt.toLowerCase());var yr=X&&Ne.exec(Et),On=X&&Ne.exec(kt);return yr?(yr=parseInt((yr[1]+yr[2]).toLowerCase(),Ze),On=parseInt((On[1]+On[2]).toLowerCase(),Ze),yr-On):Et<kt?-1:1}function F(Et,kt){if(j){var ur;ur=Et,Et=kt,kt=ur}return q&&(Et[0]=Et[0].toLowerCase(),kt[0]=kt[0].toLowerCase()),Et[0]<kt[0]?-1:1}var j,q,Y,X,oe,ue=k();if(ue){Lt(y,ue+": "+S.argString);return}var we=S.line||y.firstLine(),Ae=S.lineEnd||S.line||y.lastLine();if(we!=Ae){var be=new ze(we,0),Ce=new ze(Ae,lt(y,Ae)),Pe=y.getRange(be,Ce).split(`
|
|
1457
|
+
`),Ne=oe||(X=="decimal"?/(-?)([\d]+)/:X=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:X=="octal"?/([0-7]+)/:null),Ze=X=="decimal"?10:X=="hex"?16:X=="octal"?8:null,ft=[],rt=[];if(X||oe)for(var at=0;at<Pe.length;at++){var Tn=oe?Pe[at].match(oe):null;Tn&&Tn[0]!=""?ft.push(Tn):!oe&&Ne.exec(Pe[at])?ft.push(Pe[at]):rt.push(Pe[at])}else rt=Pe;if(ft.sort(oe?F:P),oe)for(var at=0;at<ft.length;at++)ft[at]=ft[at].input;else X||rt.sort(P);if(Pe=j?ft.concat(rt):rt.concat(ft),Y){var At=Pe,Yt;Pe=[];for(var at=0;at<At.length;at++)At[at]!=Yt&&Pe.push(At[at]),Yt=At[at]}y.replaceRange(Pe.join(`
|
|
1458
|
+
`),be,Ce)}},vglobal:function(y,S){this.global(y,S)},normal:function(y,S){var k=S.argString;if(k&&k[0]=="!"&&(k=k.slice(1),Zi=!0),k=k.trimStart(),!k){Lt(y,"Argument is required.");return}var P=S.line;if(typeof P=="number")for(var F=isNaN(S.lineEnd)?P:S.lineEnd,j=P;j<=F;j++)y.setCursor(j,0),M(y,S.argString.trimStart()),y.state.vim.insertMode&&ar(y,!0);else M(y,S.argString.trimStart()),y.state.vim.insertMode&&ar(y,!0)},global:function(y,S){var k=S.argString;if(!k){Lt(y,"Regular Expression missing from global");return}var P=S.commandName[0]==="v";k[0]==="!"&&S.commandName[0]==="g"&&(P=!0,k=k.slice(1));var F=S.line!==void 0?S.line:y.firstLine(),j=S.lineEnd||S.line||y.lastLine(),q=Qn(k),Y=k,X;if(q.length&&(Y=q[0],X=q.slice(1,q.length).join("/")),Y)try{mn(y,Y,!0,!0)}catch{Lt(y,"Invalid regex: "+Y);return}for(var oe=$n(y).getQuery(),ue=[],we=F;we<=j;we++){var Ae=y.getLine(we),be=oe.test(Ae);be!==P&&ue.push(X?y.getLineHandle(we):Ae)}if(!X){Lt(y,ue.join(`
|
|
1459
|
+
`));return}var Ce=0,Pe=function(){if(Ce<ue.length){var Ne=ue[Ce++],Ze=y.getLineNumber(Ne);if(Ze==null){Pe();return}var ft=Ze+1+X;qr.processCommand(y,ft,{callback:Pe})}else y.releaseLineHandles&&y.releaseLineHandles()};Pe()},substitute:function(y,S){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=S.argString,P=k?Ei(k,k[0]):[],F,j="",q,Y,X,oe=!1,ue=!1;if(P.length)F=P[0],_("pcre")&&F!==""&&(F=new RegExp(F).source),j=P[1],j!==void 0&&(_("pcre")?j=dn(j.replace(/([^\\])&/g,"$1$$&")):j=zs(j),qe.lastSubstituteReplacePart=j),q=P[2]?P[2].split(" "):[];else if(k&&k.length){Lt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],X=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(oe=!0),Y.indexOf("g")!=-1&&(ue=!0),_("pcre")?F=F+"/"+Y:F=F.replace(/\//g,"\\/")+"/"+Y)),F)try{mn(y,F,!0,!0)}catch{Lt(y,"Invalid regex: "+F);return}if(j=j||qe.lastSubstituteReplacePart,j===void 0){Lt(y,"No previous substitute regular expression");return}var we=$n(y),Ae=we.getQuery(),be=S.line!==void 0?S.line:y.getCursor().line,Ce=S.lineEnd||be;be==y.firstLine()&&Ce==y.lastLine()&&(Ce=1/0),X&&(be=Ce,Ce=be+X-1);var Pe=de(y,new ze(be,0)),Ne=y.getSearchCursor(Ae,Pe);fo(y,oe,ue,be,Ce,Ne,Ae,j,S.callback)},startinsert:function(y,S){M(y,S.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(y){je.commands.save?je.commands.save(y):y.save&&y.save()},nohlsearch:function(y){pi(y)},yank:function(y){var S=He(y.getCursor()),k=S.line,P=y.getLine(k);qe.registerController.pushText("0","yank",P,!0,!0)},delete:function(y,S){var k=S.selectionLine,P=isNaN(S.selectionLineEnd)?k:S.selectionLineEnd;us.delete(y,{linewise:!0},[{anchor:new ze(k,0),head:new ze(P+1,0)}])},join:function(y,S){var k=S.selectionLine,P=isNaN(S.selectionLineEnd)?k:S.selectionLineEnd;y.setCursor(new ze(k,0)),Gn.joinLines(y,{repeat:P-k},y.state.vim)},delmarks:function(y,S){if(!S.argString||!Jt(S.argString)){Lt(y,"Argument required");return}for(var k=y.state.vim,P=new je.StringStream(Jt(S.argString));!P.eol();){P.eatSpace();var F=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Lt(y,"Invalid argument: "+S.argString.substring(F));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Lt(y,"Invalid argument: "+S.argString.substring(F));return}var q=j,Y=P.next();if(!(c(q)&&c(Y)||l(q)&&l(Y))){Lt(y,"Invalid argument: "+q+"-");return}var X=q.charCodeAt(0),oe=Y.charCodeAt(0);if(X>=oe){Lt(y,"Invalid argument: "+S.argString.substring(F));return}for(var ue=0;ue<=oe-X;ue++){var we=String.fromCharCode(X+ue);delete k.marks[we]}}else delete k.marks[j]}}},qr=new Ta;E("insertModeEscKeysTimeout",200,"number"),je.Vim=Ct;var Lo={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"},Ir=Ct.handleKey.bind(Ct);Ct.handleKey=function(y,S,k){return y.operation(function(){return Ir(y,S,k)},!0)},D(),r.CodeMirror=je;var vi=Ct.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,S,k,P,F){var j=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,X=S.top,oe=S.left;if(!j.insertMode){var ue=P.cursor?Le.comparePoints(P.cursor,P.start)<=0:F.selection.isBackwards()||F.selection.isEmpty();!ue&&oe>q&&(oe-=q)}!j.insertMode&&j.status&&(Y/=2,X+=Y),mt.translate(y,oe,X),mt.setStyle(y.style,"width",q+"px"),mt.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var S=y.state.cm,k=vi(S);if(!k.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,S,k,P,F){var j=y.editor,q=j.state.cm,Y=vi(q);if(P!=-1){if(Y.insertMode||(S==-1?(k.charCodeAt(0)>255&&y.inputKey&&(k=y.inputKey,k&&y.inputHash==4&&(k=k.toUpperCase())),y.inputChar=k):S==4||S==0?y.inputKey==k&&y.inputHash==S&&y.inputChar?(k=y.inputChar,S=-1):(y.inputChar=null,y.inputKey=k,y.inputHash=S):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&S==0)return{command:"gotoleft"};if(k=="c"&&S==1&&!In.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){gn(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var X=$n(q),oe=X.getOverlay();oe&&q.removeOverlay(oe)}if(S==-1||S&1||S===0&&k.length>1){var ue=Y.insertMode,we=go(S,k,F||{},Y);Y.status==null&&(Y.status="");var Ae=ne(q,we,"user");return Y=vi(q),Ae&&Y.status!=null?Y.status+=we:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ae&&(S!=-1||ue)?void 0:{command:"null",passEvent:!Ae}}}},attach:function(y){function S(){var P=vi(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),y.textInput.setCommandMode(!P),y.renderer.$keepTextAreaAtCursor=P,y.renderer.$blockCursor=!P}y.state||(y.state={});var k=new je(y);y.state.cm=k,y.$vimModeHandler=this,u(k),vi(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(vi(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||(S(),k._signal("changeStatus"))}),S(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(y){var S=y.state.cm;f(S),S.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var S=y.state.cm,k=vi(S);if(k.insertMode)return"INSERT";var P="";return k.visualMode&&(P+="VISUAL",k.visualLine&&(P+=" LINE"),k.visualBlock&&(P+=" BLOCK")),k.status&&(P+=(P?" ":"")+k.status),P}},Ct.defineOption({name:"wrap",set:function(y,S){S&&S.ace.setOption("wrap",y)},type:"boolean"},!1),Ct.defineEx("write","w",function(){console.log(":write is not implemented")}),Fn.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"}}),Fn.push({keys:"gq",type:"operator",operator:"hardWrap"}),Ct.defineOperator("hardWrap",function(y,S,k,P,F){var j=k[0].anchor.line,q=k[0].head.line;return S.linewise&&q--,Mo(y.ace,{startRow:j,endRow:q}),ze(q,0)}),E("textwidth",void 0,"number",["tw"],function(y,S){if(S!==void 0){if(y===void 0){var k=S.ace.getOption("printMarginColumn");return k}var P=Math.round(y);P>1&&S.ace.setOption("printMarginColumn",P)}}),Gn.aceCommand=function(y,S,k){y.vimCmd=S,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Se):Se(null,y.ace)},Gn.fold=function(y,S,k){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(S.all?2:0)+(S.open?1:0)])},Uo=Fn.length,r.handler.defaultKeymap=Fn,r.handler.actions=Gn,r.Vim=Ct}),(function(){ace.require(["ace/keyboard/vim"],function(e){t&&(t.exports=e)})})()})(Og)),Og.exports}nA();var Dg={},Pg;function rA(){return Pg||(Pg=1,(function(t){(function(){var n={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(w){return m(p(w),arguments)}function r(w,u){return e.apply(null,[w].concat(u||[]))}function m(w,u){var f=1,a=w.length,s,c="",h,o,l,g,b,x,E,$;for(h=0;h<a;h++)if(typeof w[h]=="string")c+=w[h];else if(typeof w[h]=="object"){if(l=w[h],l.keys)for(s=u[f],o=0;o<l.keys.length;o++){if(s==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[o],l.keys[o-1]));s=s[l.keys[o]]}else l.param_no?s=u[l.param_no]:s=u[f++];if(n.not_type.test(l.type)&&n.not_primitive.test(l.type)&&s instanceof Function&&(s=s()),n.numeric_arg.test(l.type)&&typeof s!="number"&&isNaN(s))throw new TypeError(e("[sprintf] expecting number but found %T",s));switch(n.number.test(l.type)&&(E=s>=0),l.type){case"b":s=parseInt(s,10).toString(2);break;case"c":s=String.fromCharCode(parseInt(s,10));break;case"d":case"i":s=parseInt(s,10);break;case"j":s=JSON.stringify(s,null,l.width?parseInt(l.width):0);break;case"e":s=l.precision?parseFloat(s).toExponential(l.precision):parseFloat(s).toExponential();break;case"f":s=l.precision?parseFloat(s).toFixed(l.precision):parseFloat(s);break;case"g":s=l.precision?String(Number(s.toPrecision(l.precision))):parseFloat(s);break;case"o":s=(parseInt(s,10)>>>0).toString(8);break;case"s":s=String(s),s=l.precision?s.substring(0,l.precision):s;break;case"t":s=String(!!s),s=l.precision?s.substring(0,l.precision):s;break;case"T":s=Object.prototype.toString.call(s).slice(8,-1).toLowerCase(),s=l.precision?s.substring(0,l.precision):s;break;case"u":s=parseInt(s,10)>>>0;break;case"v":s=s.valueOf(),s=l.precision?s.substring(0,l.precision):s;break;case"x":s=(parseInt(s,10)>>>0).toString(16);break;case"X":s=(parseInt(s,10)>>>0).toString(16).toUpperCase();break}n.json.test(l.type)?c+=s:(n.number.test(l.type)&&(!E||l.sign)?($=E?"+":"-",s=s.toString().replace(n.sign,"")):$="",b=l.pad_char?l.pad_char==="0"?"0":l.pad_char.charAt(1):" ",x=l.width-($+s).length,g=l.width&&x>0?b.repeat(x):"",c+=l.align?$+s+g:b==="0"?$+g+s:g+$+s)}return c}var d=Object.create(null);function p(w){if(d[w])return d[w];for(var u=w,f,a=[],s=0;u;){if((f=n.text.exec(u))!==null)a.push(f[0]);else if((f=n.modulo.exec(u))!==null)a.push("%");else if((f=n.placeholder.exec(u))!==null){if(f[2]){s|=1;var c=[],h=f[2],o=[];if((o=n.key.exec(h))!==null)for(c.push(o[1]);(h=h.substring(o[0].length))!=="";)if((o=n.key_access.exec(h))!==null)c.push(o[1]);else if((o=n.index_access.exec(h))!==null)c.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=c}else s|=2;if(s===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");u=u.substring(f[0].length)}return d[w]=a}t.sprintf=e,t.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(Dg)),Dg}rA();var Yl={exports:{}},iA=Yl.exports,zg;function oA(){return zg||(zg=1,(function(t,n){(function(){var e,r="4.18.1",m=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",w="Invalid `variable` option passed into `_.template`",u="Invalid `imports` option passed into `_.template`",f="__lodash_hash_undefined__",a=500,s="__lodash_placeholder__",c=1,h=2,o=4,l=1,g=2,b=1,x=2,E=4,$=8,_=16,C=32,L=64,D=128,I=256,M=512,W=30,z="...",O=800,T=16,A=1,N=2,B=3,U=1/0,G=9007199254740991,J=17976931348623157e292,Q=NaN,le=4294967295,re=le-1,ce=le>>>1,de=[["ary",D],["bind",b],["bindKey",x],["curry",$],["curryRight",_],["flip",M],["partial",C],["partialRight",L],["rearg",I]],ie="[object Arguments]",fe="[object Array]",$e="[object AsyncFunction]",Re="[object Boolean]",Ee="[object Date]",Ue="[object DOMException]",He="[object Error]",Ge="[object Function]",ct="[object GeneratorFunction]",We="[object Map]",Me="[object Number]",$t="[object Null]",lt="[object Object]",Jt="[object Promise]",hn="[object Proxy]",Zn="[object RegExp]",Nt="[object Set]",An="[object String]",gt="[object Symbol]",Ye="[object Undefined]",It="[object WeakMap]",kn="[object WeakSet]",Pn="[object ArrayBuffer]",Hn="[object DataView]",zn="[object Float32Array]",gn="[object Float64Array]",Rn="[object Int8Array]",Xn="[object Int16Array]",Qt="[object Int32Array]",Un="[object Uint8Array]",$i="[object Uint8ClampedArray]",ti="[object Uint16Array]",sr="[object Uint32Array]",Vn=/\b__p \+= '';/g,Ti=/\b(__p \+=) '' \+/g,gr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hi=/&(?:amp|lt|gt|quot|#39);/g,Ri=/[&<>"']/g,ls=RegExp(Hi.source),xr=RegExp(Ri.source),So=/<%-([\s\S]+?)%>/g,Rr=/<%([\s\S]+?)%>/g,hi=/<%=([\s\S]+?)%>/g,ni=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sn=/^\w*$/,Wr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jr=/[\\^$.*+?()[\]{}|]/g,$n=RegExp(jr.source),Qn=/^\s+/,di=/\s/,Ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mi=/\{\n\/\* \[wrapped with (.+)\] \*/,cs=/,? & /,zs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dn=/[()=,{}\[\]\/\s]/,Cr=/\\(\\)?/g,fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lt=/\w*$/,$o=/^[-+]0x[0-9a-f]+$/i,mr=/^0b[01]+$/i,En=/^\[object .+?Constructor\]$/,mn=/^0o[0-7]+$/i,Mn=/^(?:0|[1-9]\d*)$/,ho=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,er=/($^)/,Er=/['\n\r\u2028\u2029\\]/g,pi="\\ud800-\\udfff",ri="\\u0300-\\u036f",Ui="\\ufe20-\\ufe2f",ii="\\u20d0-\\u20ff",Vi=ri+Ui+ii,fo="\\u2700-\\u27bf",ar="a-z\\xdf-\\xf6\\xf8-\\xff",qi="\\xac\\xb1\\xd7\\xf7",Gi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gi="\\u2000-\\u206f",Ii=" \\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",fn="A-Z\\xc0-\\xd6\\xd8-\\xde",Wo="\\ufe0e\\ufe0f",To=qi+Gi+gi+Ii,Li="['’]",Ro="["+pi+"]",Eo="["+To+"]",Ki="["+Vi+"]",jo="\\d+",Ho="["+fo+"]",po="["+ar+"]",go="[^"+pi+To+jo+fo+ar+fn+"]",mi="\\ud83c[\\udffb-\\udfff]",ne="(?:"+Ki+"|"+mi+")",Se="[^"+pi+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",et="[\\ud800-\\udbff][\\udc00-\\udfff]",mt="["+fn+"]",Ut="\\u200d",Kt="(?:"+po+"|"+go+")",Hr="(?:"+mt+"|"+go+")",lr="(?:"+Li+"(?:d|ll|m|re|s|t|ve))?",In="(?:"+Li+"(?:D|LL|M|RE|S|T|VE))?",Mr=ne+"?",wn="["+Wo+"]?",Sa="(?:"+Ut+"(?:"+[Se,Le,et].join("|")+")"+wn+Mr+")*",Mo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fs=wn+Mr+Sa,ze="(?:"+[Ho,Le,et].join("|")+")"+Fs,Fn="(?:"+[Se+Ki+"?",Ki,Le,et,Ro].join("|")+")",Uo=RegExp(Li,"g"),mo=RegExp(Ki,"g"),Bn=RegExp(mi+"(?="+mi+")|"+Fn+Fs,"g"),$a=RegExp([mt+"?"+po+"+"+lr+"(?="+[Eo,mt,"$"].join("|")+")",Hr+"+"+In+"(?="+[Eo,mt+Kt,"$"].join("|")+")",mt+"?"+Kt+"+"+lr,mt+"+"+In,je,Mo,jo,ze].join("|"),"g"),Vo=RegExp("["+Ut+pi+Vi+Wo+"]"),Yi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Io=["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"],Bs=-1,rn={};rn[zn]=rn[gn]=rn[Rn]=rn[Xn]=rn[Qt]=rn[Un]=rn[$i]=rn[ti]=rn[sr]=!0,rn[ie]=rn[fe]=rn[Pn]=rn[Re]=rn[Hn]=rn[Ee]=rn[He]=rn[Ge]=rn[We]=rn[Me]=rn[lt]=rn[Zn]=rn[Nt]=rn[An]=rn[It]=!1;var dt={};dt[ie]=dt[fe]=dt[Pn]=dt[Hn]=dt[Re]=dt[Ee]=dt[zn]=dt[gn]=dt[Rn]=dt[Xn]=dt[Qt]=dt[We]=dt[Me]=dt[lt]=dt[Zn]=dt[Nt]=dt[An]=dt[gt]=dt[Un]=dt[$i]=dt[ti]=dt[sr]=!0,dt[He]=dt[Ge]=dt[It]=!1;var jt={À:"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"},Ji={"&":"&","<":"<",">":">",'"':""","'":"'"},qn={"&":"&","<":"<",">":">",""":'"',"'":"'"},qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xn=parseFloat,Ct=parseInt,Ur=typeof rs=="object"&&rs&&rs.Object===Object&&rs,Zi=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Ur||Zi||Function("return this")(),Vr=n&&!n.nodeType&&n,cr=Vr&&!0&&t&&!t.nodeType&&t,vo=cr&&cr.exports===Vr,Oi=vo&&Ur.process,Ln=(function(){try{var me=cr&&cr.require&&cr.require("util").types;return me||Oi&&Oi.binding&&Oi.binding("util")}catch{}})(),us=Ln&&Ln.isArrayBuffer,Gn=Ln&&Ln.isDate,Ni=Ln&&Ln.isMap,Di=Ln&&Ln.isRegExp,Xi=Ln&&Ln.isSet,Ws=Ln&&Ln.isTypedArray;function sn(me,Te,ke){switch(ke.length){case 0:return me.call(Te);case 1:return me.call(Te,ke[0]);case 2:return me.call(Te,ke[0],ke[1]);case 3:return me.call(Te,ke[0],ke[1],ke[2])}return me.apply(Te,ke)}function Ta(me,Te,ke,Je){for(var pt=-1,St=me==null?0:me.length;++pt<St;){var en=me[pt];Te(Je,en,ke(en),me)}return Je}function vr(me,Te){for(var ke=-1,Je=me==null?0:me.length;++ke<Je&&Te(me[ke],ke,me)!==!1;);return me}function qr(me,Te){for(var ke=me==null?0:me.length;ke--&&Te(me[ke],ke,me)!==!1;);return me}function Lo(me,Te){for(var ke=-1,Je=me==null?0:me.length;++ke<Je;)if(!Te(me[ke],ke,me))return!1;return!0}function Ir(me,Te){for(var ke=-1,Je=me==null?0:me.length,pt=0,St=[];++ke<Je;){var en=me[ke];Te(en,ke,me)&&(St[pt++]=en)}return St}function vi(me,Te){var ke=me==null?0:me.length;return!!ke&&we(me,Te,0)>-1}function y(me,Te,ke){for(var Je=-1,pt=me==null?0:me.length;++Je<pt;)if(ke(Te,me[Je]))return!0;return!1}function S(me,Te){for(var ke=-1,Je=me==null?0:me.length,pt=Array(Je);++ke<Je;)pt[ke]=Te(me[ke],ke,me);return pt}function k(me,Te){for(var ke=-1,Je=Te.length,pt=me.length;++ke<Je;)me[pt+ke]=Te[ke];return me}function P(me,Te,ke,Je){var pt=-1,St=me==null?0:me.length;for(Je&&St&&(ke=me[++pt]);++pt<St;)ke=Te(ke,me[pt],pt,me);return ke}function F(me,Te,ke,Je){var pt=me==null?0:me.length;for(Je&&pt&&(ke=me[--pt]);pt--;)ke=Te(ke,me[pt],pt,me);return ke}function j(me,Te){for(var ke=-1,Je=me==null?0:me.length;++ke<Je;)if(Te(me[ke],ke,me))return!0;return!1}var q=Pe("length");function Y(me){return me.split("")}function X(me){return me.match(zs)||[]}function oe(me,Te,ke){var Je;return ke(me,function(pt,St,en){if(Te(pt,St,en))return Je=St,!1}),Je}function ue(me,Te,ke,Je){for(var pt=me.length,St=ke+(Je?1:-1);Je?St--:++St<pt;)if(Te(me[St],St,me))return St;return-1}function we(me,Te,ke){return Te===Te?_t(me,Te,ke):ue(me,be,ke)}function Ae(me,Te,ke,Je){for(var pt=ke-1,St=me.length;++pt<St;)if(Je(me[pt],Te))return pt;return-1}function be(me){return me!==me}function Ce(me,Te){var ke=me==null?0:me.length;return ke?rt(me,Te)/ke:Q}function Pe(me){return function(Te){return Te==null?e:Te[me]}}function Ne(me){return function(Te){return me==null?e:me[Te]}}function Ze(me,Te,ke,Je,pt){return pt(me,function(St,en,zt){ke=Je?(Je=!1,St):Te(ke,St,en,zt)}),ke}function ft(me,Te){var ke=me.length;for(me.sort(Te);ke--;)me[ke]=me[ke].value;return me}function rt(me,Te){for(var ke,Je=-1,pt=me.length;++Je<pt;){var St=Te(me[Je]);St!==e&&(ke=ke===e?St:ke+St)}return ke}function at(me,Te){for(var ke=-1,Je=Array(me);++ke<me;)Je[ke]=Te(ke);return Je}function Tn(me,Te){return S(Te,function(ke){return[ke,me[ke]]})}function At(me){return me&&me.slice(0,vt(me)+1).replace(Qn,"")}function Yt(me){return function(Te){return me(Te)}}function Et(me,Te){return S(Te,function(ke){return me[ke]})}function kt(me,Te){return me.has(Te)}function ur(me,Te){for(var ke=-1,Je=me.length;++ke<Je&&we(Te,me[ke],0)>-1;);return ke}function yr(me,Te){for(var ke=me.length;ke--&&we(Te,me[ke],0)>-1;);return ke}function On(me,Te){for(var ke=me.length,Je=0;ke--;)me[ke]===Te&&++Je;return Je}var V=Ne(jt),Z=Ne(Ji);function se(me){return"\\"+qe[me]}function ae(me,Te){return me==null?e:me[Te]}function ge(me){return Vo.test(me)}function _e(me){return Yi.test(me)}function Ie(me){for(var Te,ke=[];!(Te=me.next()).done;)ke.push(Te.value);return ke}function Be(me){var Te=-1,ke=Array(me.size);return me.forEach(function(Je,pt){ke[++Te]=[pt,Je]}),ke}function Ve(me,Te){return function(ke){return me(Te(ke))}}function Ke(me,Te){for(var ke=-1,Je=me.length,pt=0,St=[];++ke<Je;){var en=me[ke];(en===Te||en===s)&&(me[ke]=s,St[pt++]=ke)}return St}function tt(me){var Te=-1,ke=Array(me.size);return me.forEach(function(Je){ke[++Te]=Je}),ke}function st(me){var Te=-1,ke=Array(me.size);return me.forEach(function(Je){ke[++Te]=[Je,Je]}),ke}function _t(me,Te,ke){for(var Je=ke-1,pt=me.length;++Je<pt;)if(me[Je]===Te)return Je;return-1}function Zt(me,Te,ke){for(var Je=ke+1;Je--;)if(me[Je]===Te)return Je;return Je}function Pt(me){return ge(me)?bn(me):q(me)}function xt(me){return ge(me)?Nn(me):Y(me)}function vt(me){for(var Te=me.length;Te--&&di.test(me.charAt(Te)););return Te}var ht=Ne(qn);function bn(me){for(var Te=Bn.lastIndex=0;Bn.test(me);)++Te;return Te}function Nn(me){return me.match(Bn)||[]}function hr(me){return me.match($a)||[]}var an=(function me(Te){Te=Te==null?Dt:pn.defaults(Dt.Object(),Te,pn.pick(Dt,Io));var ke=Te.Array,Je=Te.Date,pt=Te.Error,St=Te.Function,en=Te.Math,zt=Te.Object,yi=Te.RegExp,Lr=Te.String,Cn=Te.TypeError,Qi=ke.prototype,Or=St.prototype,qo=zt.prototype,Mc=Te["__core-js_shared__"],Ic=Or.toString,ln=qo.hasOwnProperty,cM=0,k0=(function(){var i=/[^.]+$/.exec(Mc&&Mc.keys&&Mc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Lc=qo.toString,uM=Ic.call(zt),hM=Dt._,dM=yi("^"+Ic.call(ln).replace(jr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oc=vo?Te.Buffer:e,hs=Te.Symbol,Nc=Te.Uint8Array,S0=Oc?Oc.allocUnsafe:e,Dc=Ve(zt.getPrototypeOf,zt),$0=zt.create,T0=qo.propertyIsEnumerable,Pc=Qi.splice,R0=hs?hs.isConcatSpreadable:e,vl=hs?hs.iterator:e,js=hs?hs.toStringTag:e,zc=(function(){try{var i=Gs(zt,"defineProperty");return i({},"",{}),i}catch{}})(),fM=Te.clearTimeout!==Dt.clearTimeout&&Te.clearTimeout,pM=Je&&Je.now!==Dt.Date.now&&Je.now,gM=Te.setTimeout!==Dt.setTimeout&&Te.setTimeout,Fc=en.ceil,Bc=en.floor,Ed=zt.getOwnPropertySymbols,mM=Oc?Oc.isBuffer:e,E0=Te.isFinite,vM=Qi.join,yM=Ve(zt.keys,zt),br=en.max,Gr=en.min,bM=Je.now,wM=Te.parseInt,M0=en.random,xM=Qi.reverse,Md=Gs(Te,"DataView"),yl=Gs(Te,"Map"),Id=Gs(Te,"Promise"),Ra=Gs(Te,"Set"),bl=Gs(Te,"WeakMap"),wl=Gs(zt,"create"),Wc=bl&&new bl,Ea={},CM=Ks(Md),_M=Ks(yl),AM=Ks(Id),kM=Ks(Ra),SM=Ks(bl),jc=hs?hs.prototype:e,xl=jc?jc.valueOf:e,I0=jc?jc.toString:e;function ee(i){if(Kn(i)&&!Tt(i)&&!(i instanceof Ht)){if(i instanceof eo)return i;if(ln.call(i,"__wrapped__"))return Lb(i)}return new eo(i)}var Ma=(function(){function i(){}return function(v){if(!Wn(v))return{};if($0)return $0(v);i.prototype=v;var R=new i;return i.prototype=e,R}})();function Hc(){}function eo(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}ee.templateSettings={escape:So,evaluate:Rr,interpolate:hi,variable:"",imports:{_:ee}},ee.prototype=Hc.prototype,ee.prototype.constructor=ee,eo.prototype=Ma(Hc.prototype),eo.prototype.constructor=eo;function Ht(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=le,this.__views__=[]}function $M(){var i=new Ht(this.__wrapped__);return i.__actions__=bi(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=bi(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=bi(this.__views__),i}function TM(){if(this.__filtered__){var i=new Ht(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function RM(){var i=this.__wrapped__.value(),v=this.__dir__,R=Tt(i),H=v<0,K=R?i.length:0,te=WI(0,K,this.__views__),he=te.start,pe=te.end,xe=pe-he,Oe=H?pe:he-1,De=this.__iteratees__,Fe=De.length,nt=0,ut=Gr(xe,this.__takeCount__);if(!R||!H&&K==xe&&ut==xe)return nb(i,this.__actions__);var wt=[];e:for(;xe--&&nt<ut;){Oe+=v;for(var Ot=-1,yt=i[Oe];++Ot<Fe;){var Bt=De[Ot],Vt=Bt.iteratee,Fi=Bt.type,ai=Vt(yt);if(Fi==N)yt=ai;else if(!ai){if(Fi==A)continue e;break e}}wt[nt++]=yt}return wt}Ht.prototype=Ma(Hc.prototype),Ht.prototype.constructor=Ht;function Hs(i){var v=-1,R=i==null?0:i.length;for(this.clear();++v<R;){var H=i[v];this.set(H[0],H[1])}}function EM(){this.__data__=wl?wl(null):{},this.size=0}function MM(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function IM(i){var v=this.__data__;if(wl){var R=v[i];return R===f?e:R}return ln.call(v,i)?v[i]:e}function LM(i){var v=this.__data__;return wl?v[i]!==e:ln.call(v,i)}function OM(i,v){var R=this.__data__;return this.size+=this.has(i)?0:1,R[i]=wl&&v===e?f:v,this}Hs.prototype.clear=EM,Hs.prototype.delete=MM,Hs.prototype.get=IM,Hs.prototype.has=LM,Hs.prototype.set=OM;function Go(i){var v=-1,R=i==null?0:i.length;for(this.clear();++v<R;){var H=i[v];this.set(H[0],H[1])}}function NM(){this.__data__=[],this.size=0}function DM(i){var v=this.__data__,R=Uc(v,i);if(R<0)return!1;var H=v.length-1;return R==H?v.pop():Pc.call(v,R,1),--this.size,!0}function PM(i){var v=this.__data__,R=Uc(v,i);return R<0?e:v[R][1]}function zM(i){return Uc(this.__data__,i)>-1}function FM(i,v){var R=this.__data__,H=Uc(R,i);return H<0?(++this.size,R.push([i,v])):R[H][1]=v,this}Go.prototype.clear=NM,Go.prototype.delete=DM,Go.prototype.get=PM,Go.prototype.has=zM,Go.prototype.set=FM;function Ko(i){var v=-1,R=i==null?0:i.length;for(this.clear();++v<R;){var H=i[v];this.set(H[0],H[1])}}function BM(){this.size=0,this.__data__={hash:new Hs,map:new(yl||Go),string:new Hs}}function WM(i){var v=nu(this,i).delete(i);return this.size-=v?1:0,v}function jM(i){return nu(this,i).get(i)}function HM(i){return nu(this,i).has(i)}function UM(i,v){var R=nu(this,i),H=R.size;return R.set(i,v),this.size+=R.size==H?0:1,this}Ko.prototype.clear=BM,Ko.prototype.delete=WM,Ko.prototype.get=jM,Ko.prototype.has=HM,Ko.prototype.set=UM;function Us(i){var v=-1,R=i==null?0:i.length;for(this.__data__=new Ko;++v<R;)this.add(i[v])}function VM(i){return this.__data__.set(i,f),this}function qM(i){return this.__data__.has(i)}Us.prototype.add=Us.prototype.push=VM,Us.prototype.has=qM;function yo(i){var v=this.__data__=new Go(i);this.size=v.size}function GM(){this.__data__=new Go,this.size=0}function KM(i){var v=this.__data__,R=v.delete(i);return this.size=v.size,R}function YM(i){return this.__data__.get(i)}function JM(i){return this.__data__.has(i)}function ZM(i,v){var R=this.__data__;if(R instanceof Go){var H=R.__data__;if(!yl||H.length<m-1)return H.push([i,v]),this.size=++R.size,this;R=this.__data__=new Ko(H)}return R.set(i,v),this.size=R.size,this}yo.prototype.clear=GM,yo.prototype.delete=KM,yo.prototype.get=YM,yo.prototype.has=JM,yo.prototype.set=ZM;function L0(i,v){var R=Tt(i),H=!R&&Ys(i),K=!R&&!H&&ms(i),te=!R&&!H&&!K&&Na(i),he=R||H||K||te,pe=he?at(i.length,Lr):[],xe=pe.length;for(var Oe in i)(v||ln.call(i,Oe))&&!(he&&(Oe=="length"||K&&(Oe=="offset"||Oe=="parent")||te&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||Zo(Oe,xe)))&&pe.push(Oe);return pe}function O0(i){var v=i.length;return v?i[Hd(0,v-1)]:e}function XM(i,v){return ru(bi(i),Vs(v,0,i.length))}function QM(i){return ru(bi(i))}function Ld(i,v,R){(R!==e&&!wo(i[v],R)||R===e&&!(v in i))&&Oo(i,v,R)}function Cl(i,v,R){var H=i[v];(!(ln.call(i,v)&&wo(H,R))||R===e&&!(v in i))&&Oo(i,v,R)}function Uc(i,v){for(var R=i.length;R--;)if(wo(i[R][0],v))return R;return-1}function eI(i,v,R,H){return ds(i,function(K,te,he){v(H,K,R(K),he)}),H}function N0(i,v){return i&&Do(v,_r(v),i)}function tI(i,v){return i&&Do(v,xi(v),i)}function Oo(i,v,R){v=="__proto__"&&zc?zc(i,v,{configurable:!0,enumerable:!0,value:R,writable:!0}):i[v]=R}function Od(i,v){for(var R=-1,H=v.length,K=ke(H),te=i==null;++R<H;)K[R]=te?e:mf(i,v[R]);return K}function Vs(i,v,R){return i===i&&(R!==e&&(i=i<=R?i:R),v!==e&&(i=i>=v?i:v)),i}function to(i,v,R,H,K,te){var he,pe=v&c,xe=v&h,Oe=v&o;if(R&&(he=K?R(i,H,K,te):R(i)),he!==e)return he;if(!Wn(i))return i;var De=Tt(i);if(De){if(he=HI(i),!pe)return bi(i,he)}else{var Fe=Kr(i),nt=Fe==Ge||Fe==ct;if(ms(i))return ob(i,pe);if(Fe==lt||Fe==ie||nt&&!K){if(he=xe||nt?{}:Ab(i),!pe)return xe?II(i,tI(he,i)):MI(i,N0(he,i))}else{if(!dt[Fe])return K?i:{};he=UI(i,Fe,pe)}}te||(te=new yo);var ut=te.get(i);if(ut)return ut;te.set(i,he),Qb(i)?i.forEach(function(yt){he.add(to(yt,v,R,yt,i,te))}):Zb(i)&&i.forEach(function(yt,Bt){he.set(Bt,to(yt,v,R,Bt,i,te))});var wt=Oe?xe?ef:Qd:xe?xi:_r,Ot=De?e:wt(i);return vr(Ot||i,function(yt,Bt){Ot&&(Bt=yt,yt=i[Bt]),Cl(he,Bt,to(yt,v,R,Bt,i,te))}),he}function nI(i){var v=_r(i);return function(R){return D0(R,i,v)}}function D0(i,v,R){var H=R.length;if(i==null)return!H;for(i=zt(i);H--;){var K=R[H],te=v[K],he=i[K];if(he===e&&!(K in i)||!te(he))return!1}return!0}function P0(i,v,R){if(typeof i!="function")throw new Cn(p);return Rl(function(){i.apply(e,R)},v)}function _l(i,v,R,H){var K=-1,te=vi,he=!0,pe=i.length,xe=[],Oe=v.length;if(!pe)return xe;R&&(v=S(v,Yt(R))),H?(te=y,he=!1):v.length>=m&&(te=kt,he=!1,v=new Us(v));e:for(;++K<pe;){var De=i[K],Fe=R==null?De:R(De);if(De=H||De!==0?De:0,he&&Fe===Fe){for(var nt=Oe;nt--;)if(v[nt]===Fe)continue e;xe.push(De)}else te(v,Fe,H)||xe.push(De)}return xe}var ds=ub(No),z0=ub(Dd,!0);function rI(i,v){var R=!0;return ds(i,function(H,K,te){return R=!!v(H,K,te),R}),R}function Vc(i,v,R){for(var H=-1,K=i.length;++H<K;){var te=i[H],he=v(te);if(he!=null&&(pe===e?he===he&&!zi(he):R(he,pe)))var pe=he,xe=te}return xe}function iI(i,v,R,H){var K=i.length;for(R=Mt(R),R<0&&(R=-R>K?0:K+R),H=H===e||H>K?K:Mt(H),H<0&&(H+=K),H=R>H?0:tw(H);R<H;)i[R++]=v;return i}function F0(i,v){var R=[];return ds(i,function(H,K,te){v(H,K,te)&&R.push(H)}),R}function Nr(i,v,R,H,K){var te=-1,he=i.length;for(R||(R=qI),K||(K=[]);++te<he;){var pe=i[te];v>0&&R(pe)?v>1?Nr(pe,v-1,R,H,K):k(K,pe):H||(K[K.length]=pe)}return K}var Nd=hb(),B0=hb(!0);function No(i,v){return i&&Nd(i,v,_r)}function Dd(i,v){return i&&B0(i,v,_r)}function qc(i,v){return Ir(v,function(R){return Xo(i[R])})}function qs(i,v){v=ps(v,i);for(var R=0,H=v.length;i!=null&&R<H;)i=i[bo(v[R++])];return R&&R==H?i:e}function W0(i,v,R){var H=v(i);return Tt(i)?H:k(H,R(i))}function oi(i){return i==null?i===e?Ye:$t:js&&js in zt(i)?BI(i):QI(i)}function Pd(i,v){return i>v}function oI(i,v){return i!=null&&ln.call(i,v)}function sI(i,v){return i!=null&&v in zt(i)}function aI(i,v,R){return i>=Gr(v,R)&&i<br(v,R)}function zd(i,v,R){for(var H=R?y:vi,K=i[0].length,te=i.length,he=te,pe=ke(te),xe=1/0,Oe=[];he--;){var De=i[he];he&&v&&(De=S(De,Yt(v))),xe=Gr(De.length,xe),pe[he]=!R&&(v||K>=120&&De.length>=120)?new Us(he&&De):e}De=i[0];var Fe=-1,nt=pe[0];e:for(;++Fe<K&&Oe.length<xe;){var ut=De[Fe],wt=v?v(ut):ut;if(ut=R||ut!==0?ut:0,!(nt?kt(nt,wt):H(Oe,wt,R))){for(he=te;--he;){var Ot=pe[he];if(!(Ot?kt(Ot,wt):H(i[he],wt,R)))continue e}nt&&nt.push(wt),Oe.push(ut)}}return Oe}function lI(i,v,R,H){return No(i,function(K,te,he){v(H,R(K),te,he)}),H}function Al(i,v,R){v=ps(v,i),i=Tb(i,v);var H=i==null?i:i[bo(ro(v))];return H==null?e:sn(H,i,R)}function j0(i){return Kn(i)&&oi(i)==ie}function cI(i){return Kn(i)&&oi(i)==Pn}function uI(i){return Kn(i)&&oi(i)==Ee}function kl(i,v,R,H,K){return i===v?!0:i==null||v==null||!Kn(i)&&!Kn(v)?i!==i&&v!==v:hI(i,v,R,H,kl,K)}function hI(i,v,R,H,K,te){var he=Tt(i),pe=Tt(v),xe=he?fe:Kr(i),Oe=pe?fe:Kr(v);xe=xe==ie?lt:xe,Oe=Oe==ie?lt:Oe;var De=xe==lt,Fe=Oe==lt,nt=xe==Oe;if(nt&&ms(i)){if(!ms(v))return!1;he=!0,De=!1}if(nt&&!De)return te||(te=new yo),he||Na(i)?xb(i,v,R,H,K,te):zI(i,v,xe,R,H,K,te);if(!(R&l)){var ut=De&&ln.call(i,"__wrapped__"),wt=Fe&&ln.call(v,"__wrapped__");if(ut||wt){var Ot=ut?i.value():i,yt=wt?v.value():v;return te||(te=new yo),K(Ot,yt,R,H,te)}}return nt?(te||(te=new yo),FI(i,v,R,H,K,te)):!1}function dI(i){return Kn(i)&&Kr(i)==We}function Fd(i,v,R,H){var K=R.length,te=K,he=!H;if(i==null)return!te;for(i=zt(i);K--;){var pe=R[K];if(he&&pe[2]?pe[1]!==i[pe[0]]:!(pe[0]in i))return!1}for(;++K<te;){pe=R[K];var xe=pe[0],Oe=i[xe],De=pe[1];if(he&&pe[2]){if(Oe===e&&!(xe in i))return!1}else{var Fe=new yo;if(H)var nt=H(Oe,De,xe,i,v,Fe);if(!(nt===e?kl(De,Oe,l|g,H,Fe):nt))return!1}}return!0}function H0(i){if(!Wn(i)||KI(i))return!1;var v=Xo(i)?dM:En;return v.test(Ks(i))}function fI(i){return Kn(i)&&oi(i)==Zn}function pI(i){return Kn(i)&&Kr(i)==Nt}function gI(i){return Kn(i)&&cu(i.length)&&!!rn[oi(i)]}function U0(i){return typeof i=="function"?i:i==null?Ci:typeof i=="object"?Tt(i)?G0(i[0],i[1]):q0(i):fw(i)}function Bd(i){if(!Tl(i))return yM(i);var v=[];for(var R in zt(i))ln.call(i,R)&&R!="constructor"&&v.push(R);return v}function mI(i){if(!Wn(i))return XI(i);var v=Tl(i),R=[];for(var H in i)H=="constructor"&&(v||!ln.call(i,H))||R.push(H);return R}function Wd(i,v){return i<v}function V0(i,v){var R=-1,H=wi(i)?ke(i.length):[];return ds(i,function(K,te,he){H[++R]=v(K,te,he)}),H}function q0(i){var v=nf(i);return v.length==1&&v[0][2]?Sb(v[0][0],v[0][1]):function(R){return R===i||Fd(R,i,v)}}function G0(i,v){return of(i)&&kb(v)?Sb(bo(i),v):function(R){var H=mf(R,i);return H===e&&H===v?vf(R,i):kl(v,H,l|g)}}function Gc(i,v,R,H,K){i!==v&&Nd(v,function(te,he){if(K||(K=new yo),Wn(te))vI(i,v,he,R,Gc,H,K);else{var pe=H?H(af(i,he),te,he+"",i,v,K):e;pe===e&&(pe=te),Ld(i,he,pe)}},xi)}function vI(i,v,R,H,K,te,he){var pe=af(i,R),xe=af(v,R),Oe=he.get(xe);if(Oe){Ld(i,R,Oe);return}var De=te?te(pe,xe,R+"",i,v,he):e,Fe=De===e;if(Fe){var nt=Tt(xe),ut=!nt&&ms(xe),wt=!nt&&!ut&&Na(xe);De=xe,nt||ut||wt?Tt(pe)?De=pe:tr(pe)?De=bi(pe):ut?(Fe=!1,De=ob(xe,!0)):wt?(Fe=!1,De=sb(xe,!0)):De=[]:El(xe)||Ys(xe)?(De=pe,Ys(pe)?De=nw(pe):(!Wn(pe)||Xo(pe))&&(De=Ab(xe))):Fe=!1}Fe&&(he.set(xe,De),K(De,xe,H,te,he),he.delete(xe)),Ld(i,R,De)}function K0(i,v){var R=i.length;if(R)return v+=v<0?R:0,Zo(v,R)?i[v]:e}function Y0(i,v,R){v.length?v=S(v,function(te){return Tt(te)?function(he){return qs(he,te.length===1?te[0]:te)}:te}):v=[Ci];var H=-1;v=S(v,Yt(bt()));var K=V0(i,function(te,he,pe){var xe=S(v,function(Oe){return Oe(te)});return{criteria:xe,index:++H,value:te}});return ft(K,function(te,he){return EI(te,he,R)})}function yI(i,v){return J0(i,v,function(R,H){return vf(i,H)})}function J0(i,v,R){for(var H=-1,K=v.length,te={};++H<K;){var he=v[H],pe=qs(i,he);R(pe,he)&&Sl(te,ps(he,i),pe)}return te}function bI(i){return function(v){return qs(v,i)}}function jd(i,v,R,H){var K=H?Ae:we,te=-1,he=v.length,pe=i;for(i===v&&(v=bi(v)),R&&(pe=S(i,Yt(R)));++te<he;)for(var xe=0,Oe=v[te],De=R?R(Oe):Oe;(xe=K(pe,De,xe,H))>-1;)pe!==i&&Pc.call(pe,xe,1),Pc.call(i,xe,1);return i}function Z0(i,v){for(var R=i?v.length:0,H=R-1;R--;){var K=v[R];if(R==H||K!==te){var te=K;Zo(K)?Pc.call(i,K,1):qd(i,K)}}return i}function Hd(i,v){return i+Bc(M0()*(v-i+1))}function wI(i,v,R,H){for(var K=-1,te=br(Fc((v-i)/(R||1)),0),he=ke(te);te--;)he[H?te:++K]=i,i+=R;return he}function Ud(i,v){var R="";if(!i||v<1||v>G)return R;do v%2&&(R+=i),v=Bc(v/2),v&&(i+=i);while(v);return R}function Ft(i,v){return lf($b(i,v,Ci),i+"")}function xI(i){return O0(Da(i))}function CI(i,v){var R=Da(i);return ru(R,Vs(v,0,R.length))}function Sl(i,v,R,H){if(!Wn(i))return i;v=ps(v,i);for(var K=-1,te=v.length,he=te-1,pe=i;pe!=null&&++K<te;){var xe=bo(v[K]),Oe=R;if(xe==="__proto__"||xe==="constructor"||xe==="prototype")return i;if(K!=he){var De=pe[xe];Oe=H?H(De,xe,pe):e,Oe===e&&(Oe=Wn(De)?De:Zo(v[K+1])?[]:{})}Cl(pe,xe,Oe),pe=pe[xe]}return i}var X0=Wc?function(i,v){return Wc.set(i,v),i}:Ci,_I=zc?function(i,v){return zc(i,"toString",{configurable:!0,enumerable:!1,value:bf(v),writable:!0})}:Ci;function AI(i){return ru(Da(i))}function no(i,v,R){var H=-1,K=i.length;v<0&&(v=-v>K?0:K+v),R=R>K?K:R,R<0&&(R+=K),K=v>R?0:R-v>>>0,v>>>=0;for(var te=ke(K);++H<K;)te[H]=i[H+v];return te}function kI(i,v){var R;return ds(i,function(H,K,te){return R=v(H,K,te),!R}),!!R}function Kc(i,v,R){var H=0,K=i==null?H:i.length;if(typeof v=="number"&&v===v&&K<=ce){for(;H<K;){var te=H+K>>>1,he=i[te];he!==null&&!zi(he)&&(R?he<=v:he<v)?H=te+1:K=te}return K}return Vd(i,v,Ci,R)}function Vd(i,v,R,H){var K=0,te=i==null?0:i.length;if(te===0)return 0;v=R(v);for(var he=v!==v,pe=v===null,xe=zi(v),Oe=v===e;K<te;){var De=Bc((K+te)/2),Fe=R(i[De]),nt=Fe!==e,ut=Fe===null,wt=Fe===Fe,Ot=zi(Fe);if(he)var yt=H||wt;else Oe?yt=wt&&(H||nt):pe?yt=wt&&nt&&(H||!ut):xe?yt=wt&&nt&&!ut&&(H||!Ot):ut||Ot?yt=!1:yt=H?Fe<=v:Fe<v;yt?K=De+1:te=De}return Gr(te,re)}function Q0(i,v){for(var R=-1,H=i.length,K=0,te=[];++R<H;){var he=i[R],pe=v?v(he):he;if(!R||!wo(pe,xe)){var xe=pe;te[K++]=he===0?0:he}}return te}function eb(i){return typeof i=="number"?i:zi(i)?Q:+i}function Pi(i){if(typeof i=="string")return i;if(Tt(i))return S(i,Pi)+"";if(zi(i))return I0?I0.call(i):"";var v=i+"";return v=="0"&&1/i==-U?"-0":v}function fs(i,v,R){var H=-1,K=vi,te=i.length,he=!0,pe=[],xe=pe;if(R)he=!1,K=y;else if(te>=m){var Oe=v?null:DI(i);if(Oe)return tt(Oe);he=!1,K=kt,xe=new Us}else xe=v?[]:pe;e:for(;++H<te;){var De=i[H],Fe=v?v(De):De;if(De=R||De!==0?De:0,he&&Fe===Fe){for(var nt=xe.length;nt--;)if(xe[nt]===Fe)continue e;v&&xe.push(Fe),pe.push(De)}else K(xe,Fe,R)||(xe!==pe&&xe.push(Fe),pe.push(De))}return pe}function qd(i,v){v=ps(v,i);var R=-1,H=v.length;if(!H)return!0;for(;++R<H;){var K=bo(v[R]);if(K==="__proto__"&&!ln.call(i,"__proto__")||(K==="constructor"||K==="prototype")&&R<H-1)return!1}var te=Tb(i,v);return te==null||delete te[bo(ro(v))]}function tb(i,v,R,H){return Sl(i,v,R(qs(i,v)),H)}function Yc(i,v,R,H){for(var K=i.length,te=H?K:-1;(H?te--:++te<K)&&v(i[te],te,i););return R?no(i,H?0:te,H?te+1:K):no(i,H?te+1:0,H?K:te)}function nb(i,v){var R=i;return R instanceof Ht&&(R=R.value()),P(v,function(H,K){return K.func.apply(K.thisArg,k([H],K.args))},R)}function Gd(i,v,R){var H=i.length;if(H<2)return H?fs(i[0]):[];for(var K=-1,te=ke(H);++K<H;)for(var he=i[K],pe=-1;++pe<H;)pe!=K&&(te[K]=_l(te[K]||he,i[pe],v,R));return fs(Nr(te,1),v,R)}function rb(i,v,R){for(var H=-1,K=i.length,te=v.length,he={};++H<K;){var pe=H<te?v[H]:e;R(he,i[H],pe)}return he}function Kd(i){return tr(i)?i:[]}function Yd(i){return typeof i=="function"?i:Ci}function ps(i,v){return Tt(i)?i:of(i,v)?[i]:Ib(cn(i))}var SI=Ft;function gs(i,v,R){var H=i.length;return R=R===e?H:R,!v&&R>=H?i:no(i,v,R)}var ib=fM||function(i){return Dt.clearTimeout(i)};function ob(i,v){if(v)return i.slice();var R=i.length,H=S0?S0(R):new i.constructor(R);return i.copy(H),H}function Jd(i){var v=new i.constructor(i.byteLength);return new Nc(v).set(new Nc(i)),v}function $I(i,v){var R=v?Jd(i.buffer):i.buffer;return new i.constructor(R,i.byteOffset,i.byteLength)}function TI(i){var v=new i.constructor(i.source,Lt.exec(i));return v.lastIndex=i.lastIndex,v}function RI(i){return xl?zt(xl.call(i)):{}}function sb(i,v){var R=v?Jd(i.buffer):i.buffer;return new i.constructor(R,i.byteOffset,i.length)}function ab(i,v){if(i!==v){var R=i!==e,H=i===null,K=i===i,te=zi(i),he=v!==e,pe=v===null,xe=v===v,Oe=zi(v);if(!pe&&!Oe&&!te&&i>v||te&&he&&xe&&!pe&&!Oe||H&&he&&xe||!R&&xe||!K)return 1;if(!H&&!te&&!Oe&&i<v||Oe&&R&&K&&!H&&!te||pe&&R&&K||!he&&K||!xe)return-1}return 0}function EI(i,v,R){for(var H=-1,K=i.criteria,te=v.criteria,he=K.length,pe=R.length;++H<he;){var xe=ab(K[H],te[H]);if(xe){if(H>=pe)return xe;var Oe=R[H];return xe*(Oe=="desc"?-1:1)}}return i.index-v.index}function lb(i,v,R,H){for(var K=-1,te=i.length,he=R.length,pe=-1,xe=v.length,Oe=br(te-he,0),De=ke(xe+Oe),Fe=!H;++pe<xe;)De[pe]=v[pe];for(;++K<he;)(Fe||K<te)&&(De[R[K]]=i[K]);for(;Oe--;)De[pe++]=i[K++];return De}function cb(i,v,R,H){for(var K=-1,te=i.length,he=-1,pe=R.length,xe=-1,Oe=v.length,De=br(te-pe,0),Fe=ke(De+Oe),nt=!H;++K<De;)Fe[K]=i[K];for(var ut=K;++xe<Oe;)Fe[ut+xe]=v[xe];for(;++he<pe;)(nt||K<te)&&(Fe[ut+R[he]]=i[K++]);return Fe}function bi(i,v){var R=-1,H=i.length;for(v||(v=ke(H));++R<H;)v[R]=i[R];return v}function Do(i,v,R,H){var K=!R;R||(R={});for(var te=-1,he=v.length;++te<he;){var pe=v[te],xe=H?H(R[pe],i[pe],pe,R,i):e;xe===e&&(xe=i[pe]),K?Oo(R,pe,xe):Cl(R,pe,xe)}return R}function MI(i,v){return Do(i,rf(i),v)}function II(i,v){return Do(i,Cb(i),v)}function Jc(i,v){return function(R,H){var K=Tt(R)?Ta:eI,te=v?v():{};return K(R,i,bt(H,2),te)}}function Ia(i){return Ft(function(v,R){var H=-1,K=R.length,te=K>1?R[K-1]:e,he=K>2?R[2]:e;for(te=i.length>3&&typeof te=="function"?(K--,te):e,he&&si(R[0],R[1],he)&&(te=K<3?e:te,K=1),v=zt(v);++H<K;){var pe=R[H];pe&&i(v,pe,H,te)}return v})}function ub(i,v){return function(R,H){if(R==null)return R;if(!wi(R))return i(R,H);for(var K=R.length,te=v?K:-1,he=zt(R);(v?te--:++te<K)&&H(he[te],te,he)!==!1;);return R}}function hb(i){return function(v,R,H){for(var K=-1,te=zt(v),he=H(v),pe=he.length;pe--;){var xe=he[i?pe:++K];if(R(te[xe],xe,te)===!1)break}return v}}function LI(i,v,R){var H=v&b,K=$l(i);function te(){var he=this&&this!==Dt&&this instanceof te?K:i;return he.apply(H?R:this,arguments)}return te}function db(i){return function(v){v=cn(v);var R=ge(v)?xt(v):e,H=R?R[0]:v.charAt(0),K=R?gs(R,1).join(""):v.slice(1);return H[i]()+K}}function La(i){return function(v){return P(hw(uw(v).replace(Uo,"")),i,"")}}function $l(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var R=Ma(i.prototype),H=i.apply(R,v);return Wn(H)?H:R}}function OI(i,v,R){var H=$l(i);function K(){for(var te=arguments.length,he=ke(te),pe=te,xe=Oa(K);pe--;)he[pe]=arguments[pe];var Oe=te<3&&he[0]!==xe&&he[te-1]!==xe?[]:Ke(he,xe);if(te-=Oe.length,te<R)return vb(i,v,Zc,K.placeholder,e,he,Oe,e,e,R-te);var De=this&&this!==Dt&&this instanceof K?H:i;return sn(De,this,he)}return K}function fb(i){return function(v,R,H){var K=zt(v);if(!wi(v)){var te=bt(R,3);v=_r(v),R=function(pe){return te(K[pe],pe,K)}}var he=i(v,R,H);return he>-1?K[te?v[he]:he]:e}}function pb(i){return Jo(function(v){var R=v.length,H=R,K=eo.prototype.thru;for(i&&v.reverse();H--;){var te=v[H];if(typeof te!="function")throw new Cn(p);if(K&&!he&&tu(te)=="wrapper")var he=new eo([],!0)}for(H=he?H:R;++H<R;){te=v[H];var pe=tu(te),xe=pe=="wrapper"?tf(te):e;xe&&sf(xe[0])&&xe[1]==(D|$|C|I)&&!xe[4].length&&xe[9]==1?he=he[tu(xe[0])].apply(he,xe[3]):he=te.length==1&&sf(te)?he[pe]():he.thru(te)}return function(){var Oe=arguments,De=Oe[0];if(he&&Oe.length==1&&Tt(De))return he.plant(De).value();for(var Fe=0,nt=R?v[Fe].apply(this,Oe):De;++Fe<R;)nt=v[Fe].call(this,nt);return nt}})}function Zc(i,v,R,H,K,te,he,pe,xe,Oe){var De=v&D,Fe=v&b,nt=v&x,ut=v&($|_),wt=v&M,Ot=nt?e:$l(i);function yt(){for(var Bt=arguments.length,Vt=ke(Bt),Fi=Bt;Fi--;)Vt[Fi]=arguments[Fi];if(ut)var ai=Oa(yt),Bi=On(Vt,ai);if(H&&(Vt=lb(Vt,H,K,ut)),te&&(Vt=cb(Vt,te,he,ut)),Bt-=Bi,ut&&Bt<Oe){var nr=Ke(Vt,ai);return vb(i,v,Zc,yt.placeholder,R,Vt,nr,pe,xe,Oe-Bt)}var xo=Fe?R:this,es=nt?xo[i]:i;return Bt=Vt.length,pe?Vt=eL(Vt,pe):wt&&Bt>1&&Vt.reverse(),De&&xe<Bt&&(Vt.length=xe),this&&this!==Dt&&this instanceof yt&&(es=Ot||$l(es)),es.apply(xo,Vt)}return yt}function gb(i,v){return function(R,H){return lI(R,i,v(H),{})}}function Xc(i,v){return function(R,H){var K;if(R===e&&H===e)return v;if(R!==e&&(K=R),H!==e){if(K===e)return H;typeof R=="string"||typeof H=="string"?(R=Pi(R),H=Pi(H)):(R=eb(R),H=eb(H)),K=i(R,H)}return K}}function Zd(i){return Jo(function(v){return v=S(v,Yt(bt())),Ft(function(R){var H=this;return i(v,function(K){return sn(K,H,R)})})})}function Qc(i,v){v=v===e?" ":Pi(v);var R=v.length;if(R<2)return R?Ud(v,i):v;var H=Ud(v,Fc(i/Pt(v)));return ge(v)?gs(xt(H),0,i).join(""):H.slice(0,i)}function NI(i,v,R,H){var K=v&b,te=$l(i);function he(){for(var pe=-1,xe=arguments.length,Oe=-1,De=H.length,Fe=ke(De+xe),nt=this&&this!==Dt&&this instanceof he?te:i;++Oe<De;)Fe[Oe]=H[Oe];for(;xe--;)Fe[Oe++]=arguments[++pe];return sn(nt,K?R:this,Fe)}return he}function mb(i){return function(v,R,H){return H&&typeof H!="number"&&si(v,R,H)&&(R=H=e),v=Qo(v),R===e?(R=v,v=0):R=Qo(R),H=H===e?v<R?1:-1:Qo(H),wI(v,R,H,i)}}function eu(i){return function(v,R){return typeof v=="string"&&typeof R=="string"||(v=io(v),R=io(R)),i(v,R)}}function vb(i,v,R,H,K,te,he,pe,xe,Oe){var De=v&$,Fe=De?he:e,nt=De?e:he,ut=De?te:e,wt=De?e:te;v|=De?C:L,v&=~(De?L:C),v&E||(v&=-4);var Ot=[i,v,K,ut,Fe,wt,nt,pe,xe,Oe],yt=R.apply(e,Ot);return sf(i)&&Rb(yt,Ot),yt.placeholder=H,Eb(yt,i,v)}function Xd(i){var v=en[i];return function(R,H){if(R=io(R),H=H==null?0:Gr(Mt(H),292),H&&E0(R)){var K=(cn(R)+"e").split("e"),te=v(K[0]+"e"+(+K[1]+H));return K=(cn(te)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return v(R)}}var DI=Ra&&1/tt(new Ra([,-0]))[1]==U?function(i){return new Ra(i)}:Cf;function yb(i){return function(v){var R=Kr(v);return R==We?Be(v):R==Nt?st(v):Tn(v,i(v))}}function Yo(i,v,R,H,K,te,he,pe){var xe=v&x;if(!xe&&typeof i!="function")throw new Cn(p);var Oe=H?H.length:0;if(Oe||(v&=-97,H=K=e),he=he===e?he:br(Mt(he),0),pe=pe===e?pe:Mt(pe),Oe-=K?K.length:0,v&L){var De=H,Fe=K;H=K=e}var nt=xe?e:tf(i),ut=[i,v,R,H,K,De,Fe,te,he,pe];if(nt&&ZI(ut,nt),i=ut[0],v=ut[1],R=ut[2],H=ut[3],K=ut[4],pe=ut[9]=ut[9]===e?xe?0:i.length:br(ut[9]-Oe,0),!pe&&v&($|_)&&(v&=-25),!v||v==b)var wt=LI(i,v,R);else v==$||v==_?wt=OI(i,v,pe):(v==C||v==(b|C))&&!K.length?wt=NI(i,v,R,H):wt=Zc.apply(e,ut);var Ot=nt?X0:Rb;return Eb(Ot(wt,ut),i,v)}function bb(i,v,R,H){return i===e||wo(i,qo[R])&&!ln.call(H,R)?v:i}function wb(i,v,R,H,K,te){return Wn(i)&&Wn(v)&&(te.set(v,i),Gc(i,v,e,wb,te),te.delete(v)),i}function PI(i){return El(i)?e:i}function xb(i,v,R,H,K,te){var he=R&l,pe=i.length,xe=v.length;if(pe!=xe&&!(he&&xe>pe))return!1;var Oe=te.get(i),De=te.get(v);if(Oe&&De)return Oe==v&&De==i;var Fe=-1,nt=!0,ut=R&g?new Us:e;for(te.set(i,v),te.set(v,i);++Fe<pe;){var wt=i[Fe],Ot=v[Fe];if(H)var yt=he?H(Ot,wt,Fe,v,i,te):H(wt,Ot,Fe,i,v,te);if(yt!==e){if(yt)continue;nt=!1;break}if(ut){if(!j(v,function(Bt,Vt){if(!kt(ut,Vt)&&(wt===Bt||K(wt,Bt,R,H,te)))return ut.push(Vt)})){nt=!1;break}}else if(!(wt===Ot||K(wt,Ot,R,H,te))){nt=!1;break}}return te.delete(i),te.delete(v),nt}function zI(i,v,R,H,K,te,he){switch(R){case Hn:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case Pn:return!(i.byteLength!=v.byteLength||!te(new Nc(i),new Nc(v)));case Re:case Ee:case Me:return wo(+i,+v);case He:return i.name==v.name&&i.message==v.message;case Zn:case An:return i==v+"";case We:var pe=Be;case Nt:var xe=H&l;if(pe||(pe=tt),i.size!=v.size&&!xe)return!1;var Oe=he.get(i);if(Oe)return Oe==v;H|=g,he.set(i,v);var De=xb(pe(i),pe(v),H,K,te,he);return he.delete(i),De;case gt:if(xl)return xl.call(i)==xl.call(v)}return!1}function FI(i,v,R,H,K,te){var he=R&l,pe=Qd(i),xe=pe.length,Oe=Qd(v),De=Oe.length;if(xe!=De&&!he)return!1;for(var Fe=xe;Fe--;){var nt=pe[Fe];if(!(he?nt in v:ln.call(v,nt)))return!1}var ut=te.get(i),wt=te.get(v);if(ut&&wt)return ut==v&&wt==i;var Ot=!0;te.set(i,v),te.set(v,i);for(var yt=he;++Fe<xe;){nt=pe[Fe];var Bt=i[nt],Vt=v[nt];if(H)var Fi=he?H(Vt,Bt,nt,v,i,te):H(Bt,Vt,nt,i,v,te);if(!(Fi===e?Bt===Vt||K(Bt,Vt,R,H,te):Fi)){Ot=!1;break}yt||(yt=nt=="constructor")}if(Ot&&!yt){var ai=i.constructor,Bi=v.constructor;ai!=Bi&&"constructor"in i&&"constructor"in v&&!(typeof ai=="function"&&ai instanceof ai&&typeof Bi=="function"&&Bi instanceof Bi)&&(Ot=!1)}return te.delete(i),te.delete(v),Ot}function Jo(i){return lf($b(i,e,Db),i+"")}function Qd(i){return W0(i,_r,rf)}function ef(i){return W0(i,xi,Cb)}var tf=Wc?function(i){return Wc.get(i)}:Cf;function tu(i){for(var v=i.name+"",R=Ea[v],H=ln.call(Ea,v)?R.length:0;H--;){var K=R[H],te=K.func;if(te==null||te==i)return K.name}return v}function Oa(i){var v=ln.call(ee,"placeholder")?ee:i;return v.placeholder}function bt(){var i=ee.iteratee||wf;return i=i===wf?U0:i,arguments.length?i(arguments[0],arguments[1]):i}function nu(i,v){var R=i.__data__;return GI(v)?R[typeof v=="string"?"string":"hash"]:R.map}function nf(i){for(var v=_r(i),R=v.length;R--;){var H=v[R],K=i[H];v[R]=[H,K,kb(K)]}return v}function Gs(i,v){var R=ae(i,v);return H0(R)?R:e}function BI(i){var v=ln.call(i,js),R=i[js];try{i[js]=e;var H=!0}catch{}var K=Lc.call(i);return H&&(v?i[js]=R:delete i[js]),K}var rf=Ed?function(i){return i==null?[]:(i=zt(i),Ir(Ed(i),function(v){return T0.call(i,v)}))}:_f,Cb=Ed?function(i){for(var v=[];i;)k(v,rf(i)),i=Dc(i);return v}:_f,Kr=oi;(Md&&Kr(new Md(new ArrayBuffer(1)))!=Hn||yl&&Kr(new yl)!=We||Id&&Kr(Id.resolve())!=Jt||Ra&&Kr(new Ra)!=Nt||bl&&Kr(new bl)!=It)&&(Kr=function(i){var v=oi(i),R=v==lt?i.constructor:e,H=R?Ks(R):"";if(H)switch(H){case CM:return Hn;case _M:return We;case AM:return Jt;case kM:return Nt;case SM:return It}return v});function WI(i,v,R){for(var H=-1,K=R.length;++H<K;){var te=R[H],he=te.size;switch(te.type){case"drop":i+=he;break;case"dropRight":v-=he;break;case"take":v=Gr(v,i+he);break;case"takeRight":i=br(i,v-he);break}}return{start:i,end:v}}function jI(i){var v=i.match(Mi);return v?v[1].split(cs):[]}function _b(i,v,R){v=ps(v,i);for(var H=-1,K=v.length,te=!1;++H<K;){var he=bo(v[H]);if(!(te=i!=null&&R(i,he)))break;i=i[he]}return te||++H!=K?te:(K=i==null?0:i.length,!!K&&cu(K)&&Zo(he,K)&&(Tt(i)||Ys(i)))}function HI(i){var v=i.length,R=new i.constructor(v);return v&&typeof i[0]=="string"&&ln.call(i,"index")&&(R.index=i.index,R.input=i.input),R}function Ab(i){return typeof i.constructor=="function"&&!Tl(i)?Ma(Dc(i)):{}}function UI(i,v,R){var H=i.constructor;switch(v){case Pn:return Jd(i);case Re:case Ee:return new H(+i);case Hn:return $I(i,R);case zn:case gn:case Rn:case Xn:case Qt:case Un:case $i:case ti:case sr:return sb(i,R);case We:return new H;case Me:case An:return new H(i);case Zn:return TI(i);case Nt:return new H;case gt:return RI(i)}}function VI(i,v){var R=v.length;if(!R)return i;var H=R-1;return v[H]=(R>1?"& ":"")+v[H],v=v.join(R>2?", ":" "),i.replace(Ei,`{
|
|
1460
|
+
/* [wrapped with `+v+`] */
|
|
1461
|
+
`)}function qI(i){return Tt(i)||Ys(i)||!!(R0&&i&&i[R0])}function Zo(i,v){var R=typeof i;return v=v??G,!!v&&(R=="number"||R!="symbol"&&Mn.test(i))&&i>-1&&i%1==0&&i<v}function si(i,v,R){if(!Wn(R))return!1;var H=typeof v;return(H=="number"?wi(R)&&Zo(v,R.length):H=="string"&&v in R)?wo(R[v],i):!1}function of(i,v){if(Tt(i))return!1;var R=typeof i;return R=="number"||R=="symbol"||R=="boolean"||i==null||zi(i)?!0:Sn.test(i)||!ni.test(i)||v!=null&&i in zt(v)}function GI(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function sf(i){var v=tu(i),R=ee[v];if(typeof R!="function"||!(v in Ht.prototype))return!1;if(i===R)return!0;var H=tf(R);return!!H&&i===H[0]}function KI(i){return!!k0&&k0 in i}var YI=Mc?Xo:Af;function Tl(i){var v=i&&i.constructor,R=typeof v=="function"&&v.prototype||qo;return i===R}function kb(i){return i===i&&!Wn(i)}function Sb(i,v){return function(R){return R==null?!1:R[i]===v&&(v!==e||i in zt(R))}}function JI(i){var v=au(i,function(H){return R.size===a&&R.clear(),H}),R=v.cache;return v}function ZI(i,v){var R=i[1],H=v[1],K=R|H,te=K<(b|x|D),he=H==D&&R==$||H==D&&R==I&&i[7].length<=v[8]||H==(D|I)&&v[7].length<=v[8]&&R==$;if(!(te||he))return i;H&b&&(i[2]=v[2],K|=R&b?0:E);var pe=v[3];if(pe){var xe=i[3];i[3]=xe?lb(xe,pe,v[4]):pe,i[4]=xe?Ke(i[3],s):v[4]}return pe=v[5],pe&&(xe=i[5],i[5]=xe?cb(xe,pe,v[6]):pe,i[6]=xe?Ke(i[5],s):v[6]),pe=v[7],pe&&(i[7]=pe),H&D&&(i[8]=i[8]==null?v[8]:Gr(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=K,i}function XI(i){var v=[];if(i!=null)for(var R in zt(i))v.push(R);return v}function QI(i){return Lc.call(i)}function $b(i,v,R){return v=br(v===e?i.length-1:v,0),function(){for(var H=arguments,K=-1,te=br(H.length-v,0),he=ke(te);++K<te;)he[K]=H[v+K];K=-1;for(var pe=ke(v+1);++K<v;)pe[K]=H[K];return pe[v]=R(he),sn(i,this,pe)}}function Tb(i,v){return v.length<2?i:qs(i,no(v,0,-1))}function eL(i,v){for(var R=i.length,H=Gr(v.length,R),K=bi(i);H--;){var te=v[H];i[H]=Zo(te,R)?K[te]:e}return i}function af(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var Rb=Mb(X0),Rl=gM||function(i,v){return Dt.setTimeout(i,v)},lf=Mb(_I);function Eb(i,v,R){var H=v+"";return lf(i,VI(H,tL(jI(H),R)))}function Mb(i){var v=0,R=0;return function(){var H=bM(),K=T-(H-R);if(R=H,K>0){if(++v>=O)return arguments[0]}else v=0;return i.apply(e,arguments)}}function ru(i,v){var R=-1,H=i.length,K=H-1;for(v=v===e?H:v;++R<v;){var te=Hd(R,K),he=i[te];i[te]=i[R],i[R]=he}return i.length=v,i}var Ib=JI(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Wr,function(R,H,K,te){v.push(K?te.replace(Cr,"$1"):H||R)}),v});function bo(i){if(typeof i=="string"||zi(i))return i;var v=i+"";return v=="0"&&1/i==-U?"-0":v}function Ks(i){if(i!=null){try{return Ic.call(i)}catch{}try{return i+""}catch{}}return""}function tL(i,v){return vr(de,function(R){var H="_."+R[0];v&R[1]&&!vi(i,H)&&i.push(H)}),i.sort()}function Lb(i){if(i instanceof Ht)return i.clone();var v=new eo(i.__wrapped__,i.__chain__);return v.__actions__=bi(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function nL(i,v,R){(R?si(i,v,R):v===e)?v=1:v=br(Mt(v),0);var H=i==null?0:i.length;if(!H||v<1)return[];for(var K=0,te=0,he=ke(Fc(H/v));K<H;)he[te++]=no(i,K,K+=v);return he}function rL(i){for(var v=-1,R=i==null?0:i.length,H=0,K=[];++v<R;){var te=i[v];te&&(K[H++]=te)}return K}function iL(){var i=arguments.length;if(!i)return[];for(var v=ke(i-1),R=arguments[0],H=i;H--;)v[H-1]=arguments[H];return k(Tt(R)?bi(R):[R],Nr(v,1))}var oL=Ft(function(i,v){return tr(i)?_l(i,Nr(v,1,tr,!0)):[]}),sL=Ft(function(i,v){var R=ro(v);return tr(R)&&(R=e),tr(i)?_l(i,Nr(v,1,tr,!0),bt(R,2)):[]}),aL=Ft(function(i,v){var R=ro(v);return tr(R)&&(R=e),tr(i)?_l(i,Nr(v,1,tr,!0),e,R):[]});function lL(i,v,R){var H=i==null?0:i.length;return H?(v=R||v===e?1:Mt(v),no(i,v<0?0:v,H)):[]}function cL(i,v,R){var H=i==null?0:i.length;return H?(v=R||v===e?1:Mt(v),v=H-v,no(i,0,v<0?0:v)):[]}function uL(i,v){return i&&i.length?Yc(i,bt(v,3),!0,!0):[]}function hL(i,v){return i&&i.length?Yc(i,bt(v,3),!0):[]}function dL(i,v,R,H){var K=i==null?0:i.length;return K?(R&&typeof R!="number"&&si(i,v,R)&&(R=0,H=K),iI(i,v,R,H)):[]}function Ob(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=R==null?0:Mt(R);return K<0&&(K=br(H+K,0)),ue(i,bt(v,3),K)}function Nb(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=H-1;return R!==e&&(K=Mt(R),K=R<0?br(H+K,0):Gr(K,H-1)),ue(i,bt(v,3),K,!0)}function Db(i){var v=i==null?0:i.length;return v?Nr(i,1):[]}function fL(i){var v=i==null?0:i.length;return v?Nr(i,U):[]}function pL(i,v){var R=i==null?0:i.length;return R?(v=v===e?1:Mt(v),Nr(i,v)):[]}function gL(i){for(var v=-1,R=i==null?0:i.length,H={};++v<R;){var K=i[v];Oo(H,K[0],K[1])}return H}function Pb(i){return i&&i.length?i[0]:e}function mL(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=R==null?0:Mt(R);return K<0&&(K=br(H+K,0)),we(i,v,K)}function vL(i){var v=i==null?0:i.length;return v?no(i,0,-1):[]}var yL=Ft(function(i){var v=S(i,Kd);return v.length&&v[0]===i[0]?zd(v):[]}),bL=Ft(function(i){var v=ro(i),R=S(i,Kd);return v===ro(R)?v=e:R.pop(),R.length&&R[0]===i[0]?zd(R,bt(v,2)):[]}),wL=Ft(function(i){var v=ro(i),R=S(i,Kd);return v=typeof v=="function"?v:e,v&&R.pop(),R.length&&R[0]===i[0]?zd(R,e,v):[]});function xL(i,v){return i==null?"":vM.call(i,v)}function ro(i){var v=i==null?0:i.length;return v?i[v-1]:e}function CL(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=H;return R!==e&&(K=Mt(R),K=K<0?br(H+K,0):Gr(K,H-1)),v===v?Zt(i,v,K):ue(i,be,K,!0)}function _L(i,v){return i&&i.length?K0(i,Mt(v)):e}var AL=Ft(zb);function zb(i,v){return i&&i.length&&v&&v.length?jd(i,v):i}function kL(i,v,R){return i&&i.length&&v&&v.length?jd(i,v,bt(R,2)):i}function SL(i,v,R){return i&&i.length&&v&&v.length?jd(i,v,e,R):i}var $L=Jo(function(i,v){var R=i==null?0:i.length,H=Od(i,v);return Z0(i,S(v,function(K){return Zo(K,R)?+K:K}).sort(ab)),H});function TL(i,v){var R=[];if(!(i&&i.length))return R;var H=-1,K=[],te=i.length;for(v=bt(v,3);++H<te;){var he=i[H];v(he,H,i)&&(R.push(he),K.push(H))}return Z0(i,K),R}function cf(i){return i==null?i:xM.call(i)}function RL(i,v,R){var H=i==null?0:i.length;return H?(R&&typeof R!="number"&&si(i,v,R)?(v=0,R=H):(v=v==null?0:Mt(v),R=R===e?H:Mt(R)),no(i,v,R)):[]}function EL(i,v){return Kc(i,v)}function ML(i,v,R){return Vd(i,v,bt(R,2))}function IL(i,v){var R=i==null?0:i.length;if(R){var H=Kc(i,v);if(H<R&&wo(i[H],v))return H}return-1}function LL(i,v){return Kc(i,v,!0)}function OL(i,v,R){return Vd(i,v,bt(R,2),!0)}function NL(i,v){var R=i==null?0:i.length;if(R){var H=Kc(i,v,!0)-1;if(wo(i[H],v))return H}return-1}function DL(i){return i&&i.length?Q0(i):[]}function PL(i,v){return i&&i.length?Q0(i,bt(v,2)):[]}function zL(i){var v=i==null?0:i.length;return v?no(i,1,v):[]}function FL(i,v,R){return i&&i.length?(v=R||v===e?1:Mt(v),no(i,0,v<0?0:v)):[]}function BL(i,v,R){var H=i==null?0:i.length;return H?(v=R||v===e?1:Mt(v),v=H-v,no(i,v<0?0:v,H)):[]}function WL(i,v){return i&&i.length?Yc(i,bt(v,3),!1,!0):[]}function jL(i,v){return i&&i.length?Yc(i,bt(v,3)):[]}var HL=Ft(function(i){return fs(Nr(i,1,tr,!0))}),UL=Ft(function(i){var v=ro(i);return tr(v)&&(v=e),fs(Nr(i,1,tr,!0),bt(v,2))}),VL=Ft(function(i){var v=ro(i);return v=typeof v=="function"?v:e,fs(Nr(i,1,tr,!0),e,v)});function qL(i){return i&&i.length?fs(i):[]}function GL(i,v){return i&&i.length?fs(i,bt(v,2)):[]}function KL(i,v){return v=typeof v=="function"?v:e,i&&i.length?fs(i,e,v):[]}function uf(i){if(!(i&&i.length))return[];var v=0;return i=Ir(i,function(R){if(tr(R))return v=br(R.length,v),!0}),at(v,function(R){return S(i,Pe(R))})}function Fb(i,v){if(!(i&&i.length))return[];var R=uf(i);return v==null?R:S(R,function(H){return sn(v,e,H)})}var YL=Ft(function(i,v){return tr(i)?_l(i,v):[]}),JL=Ft(function(i){return Gd(Ir(i,tr))}),ZL=Ft(function(i){var v=ro(i);return tr(v)&&(v=e),Gd(Ir(i,tr),bt(v,2))}),XL=Ft(function(i){var v=ro(i);return v=typeof v=="function"?v:e,Gd(Ir(i,tr),e,v)}),QL=Ft(uf);function eO(i,v){return rb(i||[],v||[],Cl)}function tO(i,v){return rb(i||[],v||[],Sl)}var nO=Ft(function(i){var v=i.length,R=v>1?i[v-1]:e;return R=typeof R=="function"?(i.pop(),R):e,Fb(i,R)});function Bb(i){var v=ee(i);return v.__chain__=!0,v}function rO(i,v){return v(i),i}function iu(i,v){return v(i)}var iO=Jo(function(i){var v=i.length,R=v?i[0]:0,H=this.__wrapped__,K=function(te){return Od(te,i)};return v>1||this.__actions__.length||!(H instanceof Ht)||!Zo(R)?this.thru(K):(H=H.slice(R,+R+(v?1:0)),H.__actions__.push({func:iu,args:[K],thisArg:e}),new eo(H,this.__chain__).thru(function(te){return v&&!te.length&&te.push(e),te}))});function oO(){return Bb(this)}function sO(){return new eo(this.value(),this.__chain__)}function aO(){this.__values__===e&&(this.__values__=ew(this.value()));var i=this.__index__>=this.__values__.length,v=i?e:this.__values__[this.__index__++];return{done:i,value:v}}function lO(){return this}function cO(i){for(var v,R=this;R instanceof Hc;){var H=Lb(R);H.__index__=0,H.__values__=e,v?K.__wrapped__=H:v=H;var K=H;R=R.__wrapped__}return K.__wrapped__=i,v}function uO(){var i=this.__wrapped__;if(i instanceof Ht){var v=i;return this.__actions__.length&&(v=new Ht(this)),v=v.reverse(),v.__actions__.push({func:iu,args:[cf],thisArg:e}),new eo(v,this.__chain__)}return this.thru(cf)}function hO(){return nb(this.__wrapped__,this.__actions__)}var dO=Jc(function(i,v,R){ln.call(i,R)?++i[R]:Oo(i,R,1)});function fO(i,v,R){var H=Tt(i)?Lo:rI;return R&&si(i,v,R)&&(v=e),H(i,bt(v,3))}function pO(i,v){var R=Tt(i)?Ir:F0;return R(i,bt(v,3))}var gO=fb(Ob),mO=fb(Nb);function vO(i,v){return Nr(ou(i,v),1)}function yO(i,v){return Nr(ou(i,v),U)}function bO(i,v,R){return R=R===e?1:Mt(R),Nr(ou(i,v),R)}function Wb(i,v){var R=Tt(i)?vr:ds;return R(i,bt(v,3))}function jb(i,v){var R=Tt(i)?qr:z0;return R(i,bt(v,3))}var wO=Jc(function(i,v,R){ln.call(i,R)?i[R].push(v):Oo(i,R,[v])});function xO(i,v,R,H){i=wi(i)?i:Da(i),R=R&&!H?Mt(R):0;var K=i.length;return R<0&&(R=br(K+R,0)),uu(i)?R<=K&&i.indexOf(v,R)>-1:!!K&&we(i,v,R)>-1}var CO=Ft(function(i,v,R){var H=-1,K=typeof v=="function",te=wi(i)?ke(i.length):[];return ds(i,function(he){te[++H]=K?sn(v,he,R):Al(he,v,R)}),te}),_O=Jc(function(i,v,R){Oo(i,R,v)});function ou(i,v){var R=Tt(i)?S:V0;return R(i,bt(v,3))}function AO(i,v,R,H){return i==null?[]:(Tt(v)||(v=v==null?[]:[v]),R=H?e:R,Tt(R)||(R=R==null?[]:[R]),Y0(i,v,R))}var kO=Jc(function(i,v,R){i[R?0:1].push(v)},function(){return[[],[]]});function SO(i,v,R){var H=Tt(i)?P:Ze,K=arguments.length<3;return H(i,bt(v,4),R,K,ds)}function $O(i,v,R){var H=Tt(i)?F:Ze,K=arguments.length<3;return H(i,bt(v,4),R,K,z0)}function TO(i,v){var R=Tt(i)?Ir:F0;return R(i,lu(bt(v,3)))}function RO(i){var v=Tt(i)?O0:xI;return v(i)}function EO(i,v,R){(R?si(i,v,R):v===e)?v=1:v=Mt(v);var H=Tt(i)?XM:CI;return H(i,v)}function MO(i){var v=Tt(i)?QM:AI;return v(i)}function IO(i){if(i==null)return 0;if(wi(i))return uu(i)?Pt(i):i.length;var v=Kr(i);return v==We||v==Nt?i.size:Bd(i).length}function LO(i,v,R){var H=Tt(i)?j:kI;return R&&si(i,v,R)&&(v=e),H(i,bt(v,3))}var OO=Ft(function(i,v){if(i==null)return[];var R=v.length;return R>1&&si(i,v[0],v[1])?v=[]:R>2&&si(v[0],v[1],v[2])&&(v=[v[0]]),Y0(i,Nr(v,1),[])}),su=pM||function(){return Dt.Date.now()};function NO(i,v){if(typeof v!="function")throw new Cn(p);return i=Mt(i),function(){if(--i<1)return v.apply(this,arguments)}}function Hb(i,v,R){return v=R?e:v,v=i&&v==null?i.length:v,Yo(i,D,e,e,e,e,v)}function Ub(i,v){var R;if(typeof v!="function")throw new Cn(p);return i=Mt(i),function(){return--i>0&&(R=v.apply(this,arguments)),i<=1&&(v=e),R}}var hf=Ft(function(i,v,R){var H=b;if(R.length){var K=Ke(R,Oa(hf));H|=C}return Yo(i,H,v,R,K)}),Vb=Ft(function(i,v,R){var H=b|x;if(R.length){var K=Ke(R,Oa(Vb));H|=C}return Yo(v,H,i,R,K)});function qb(i,v,R){v=R?e:v;var H=Yo(i,$,e,e,e,e,e,v);return H.placeholder=qb.placeholder,H}function Gb(i,v,R){v=R?e:v;var H=Yo(i,_,e,e,e,e,e,v);return H.placeholder=Gb.placeholder,H}function Kb(i,v,R){var H,K,te,he,pe,xe,Oe=0,De=!1,Fe=!1,nt=!0;if(typeof i!="function")throw new Cn(p);v=io(v)||0,Wn(R)&&(De=!!R.leading,Fe="maxWait"in R,te=Fe?br(io(R.maxWait)||0,v):te,nt="trailing"in R?!!R.trailing:nt);function ut(nr){var xo=H,es=K;return H=K=e,Oe=nr,he=i.apply(es,xo),he}function wt(nr){return Oe=nr,pe=Rl(Bt,v),De?ut(nr):he}function Ot(nr){var xo=nr-xe,es=nr-Oe,pw=v-xo;return Fe?Gr(pw,te-es):pw}function yt(nr){var xo=nr-xe,es=nr-Oe;return xe===e||xo>=v||xo<0||Fe&&es>=te}function Bt(){var nr=su();if(yt(nr))return Vt(nr);pe=Rl(Bt,Ot(nr))}function Vt(nr){return pe=e,nt&&H?ut(nr):(H=K=e,he)}function Fi(){pe!==e&&ib(pe),Oe=0,H=xe=K=pe=e}function ai(){return pe===e?he:Vt(su())}function Bi(){var nr=su(),xo=yt(nr);if(H=arguments,K=this,xe=nr,xo){if(pe===e)return wt(xe);if(Fe)return ib(pe),pe=Rl(Bt,v),ut(xe)}return pe===e&&(pe=Rl(Bt,v)),he}return Bi.cancel=Fi,Bi.flush=ai,Bi}var DO=Ft(function(i,v){return P0(i,1,v)}),PO=Ft(function(i,v,R){return P0(i,io(v)||0,R)});function zO(i){return Yo(i,M)}function au(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new Cn(p);var R=function(){var H=arguments,K=v?v.apply(this,H):H[0],te=R.cache;if(te.has(K))return te.get(K);var he=i.apply(this,H);return R.cache=te.set(K,he)||te,he};return R.cache=new(au.Cache||Ko),R}au.Cache=Ko;function lu(i){if(typeof i!="function")throw new Cn(p);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function FO(i){return Ub(2,i)}var BO=SI(function(i,v){v=v.length==1&&Tt(v[0])?S(v[0],Yt(bt())):S(Nr(v,1),Yt(bt()));var R=v.length;return Ft(function(H){for(var K=-1,te=Gr(H.length,R);++K<te;)H[K]=v[K].call(this,H[K]);return sn(i,this,H)})}),df=Ft(function(i,v){var R=Ke(v,Oa(df));return Yo(i,C,e,v,R)}),Yb=Ft(function(i,v){var R=Ke(v,Oa(Yb));return Yo(i,L,e,v,R)}),WO=Jo(function(i,v){return Yo(i,I,e,e,e,v)});function jO(i,v){if(typeof i!="function")throw new Cn(p);return v=v===e?v:Mt(v),Ft(i,v)}function HO(i,v){if(typeof i!="function")throw new Cn(p);return v=v==null?0:br(Mt(v),0),Ft(function(R){var H=R[v],K=gs(R,0,v);return H&&k(K,H),sn(i,this,K)})}function UO(i,v,R){var H=!0,K=!0;if(typeof i!="function")throw new Cn(p);return Wn(R)&&(H="leading"in R?!!R.leading:H,K="trailing"in R?!!R.trailing:K),Kb(i,v,{leading:H,maxWait:v,trailing:K})}function VO(i){return Hb(i,1)}function qO(i,v){return df(Yd(v),i)}function GO(){if(!arguments.length)return[];var i=arguments[0];return Tt(i)?i:[i]}function KO(i){return to(i,o)}function YO(i,v){return v=typeof v=="function"?v:e,to(i,o,v)}function JO(i){return to(i,c|o)}function ZO(i,v){return v=typeof v=="function"?v:e,to(i,c|o,v)}function XO(i,v){return v==null||D0(i,v,_r(v))}function wo(i,v){return i===v||i!==i&&v!==v}var QO=eu(Pd),eN=eu(function(i,v){return i>=v}),Ys=j0((function(){return arguments})())?j0:function(i){return Kn(i)&&ln.call(i,"callee")&&!T0.call(i,"callee")},Tt=ke.isArray,tN=us?Yt(us):cI;function wi(i){return i!=null&&cu(i.length)&&!Xo(i)}function tr(i){return Kn(i)&&wi(i)}function nN(i){return i===!0||i===!1||Kn(i)&&oi(i)==Re}var ms=mM||Af,rN=Gn?Yt(Gn):uI;function iN(i){return Kn(i)&&i.nodeType===1&&!El(i)}function oN(i){if(i==null)return!0;if(wi(i)&&(Tt(i)||typeof i=="string"||typeof i.splice=="function"||ms(i)||Na(i)||Ys(i)))return!i.length;var v=Kr(i);if(v==We||v==Nt)return!i.size;if(Tl(i))return!Bd(i).length;for(var R in i)if(ln.call(i,R))return!1;return!0}function sN(i,v){return kl(i,v)}function aN(i,v,R){R=typeof R=="function"?R:e;var H=R?R(i,v):e;return H===e?kl(i,v,e,R):!!H}function ff(i){if(!Kn(i))return!1;var v=oi(i);return v==He||v==Ue||typeof i.message=="string"&&typeof i.name=="string"&&!El(i)}function lN(i){return typeof i=="number"&&E0(i)}function Xo(i){if(!Wn(i))return!1;var v=oi(i);return v==Ge||v==ct||v==$e||v==hn}function Jb(i){return typeof i=="number"&&i==Mt(i)}function cu(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=G}function Wn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Kn(i){return i!=null&&typeof i=="object"}var Zb=Ni?Yt(Ni):dI;function cN(i,v){return i===v||Fd(i,v,nf(v))}function uN(i,v,R){return R=typeof R=="function"?R:e,Fd(i,v,nf(v),R)}function hN(i){return Xb(i)&&i!=+i}function dN(i){if(YI(i))throw new pt(d);return H0(i)}function fN(i){return i===null}function pN(i){return i==null}function Xb(i){return typeof i=="number"||Kn(i)&&oi(i)==Me}function El(i){if(!Kn(i)||oi(i)!=lt)return!1;var v=Dc(i);if(v===null)return!0;var R=ln.call(v,"constructor")&&v.constructor;return typeof R=="function"&&R instanceof R&&Ic.call(R)==uM}var pf=Di?Yt(Di):fI;function gN(i){return Jb(i)&&i>=-G&&i<=G}var Qb=Xi?Yt(Xi):pI;function uu(i){return typeof i=="string"||!Tt(i)&&Kn(i)&&oi(i)==An}function zi(i){return typeof i=="symbol"||Kn(i)&&oi(i)==gt}var Na=Ws?Yt(Ws):gI;function mN(i){return i===e}function vN(i){return Kn(i)&&Kr(i)==It}function yN(i){return Kn(i)&&oi(i)==kn}var bN=eu(Wd),wN=eu(function(i,v){return i<=v});function ew(i){if(!i)return[];if(wi(i))return uu(i)?xt(i):bi(i);if(vl&&i[vl])return Ie(i[vl]());var v=Kr(i),R=v==We?Be:v==Nt?tt:Da;return R(i)}function Qo(i){if(!i)return i===0?i:0;if(i=io(i),i===U||i===-U){var v=i<0?-1:1;return v*J}return i===i?i:0}function Mt(i){var v=Qo(i),R=v%1;return v===v?R?v-R:v:0}function tw(i){return i?Vs(Mt(i),0,le):0}function io(i){if(typeof i=="number")return i;if(zi(i))return Q;if(Wn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Wn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=At(i);var R=mr.test(i);return R||mn.test(i)?Ct(i.slice(2),R?2:8):$o.test(i)?Q:+i}function nw(i){return Do(i,xi(i))}function xN(i){return i?Vs(Mt(i),-G,G):i===0?i:0}function cn(i){return i==null?"":Pi(i)}var CN=Ia(function(i,v){if(Tl(v)||wi(v)){Do(v,_r(v),i);return}for(var R in v)ln.call(v,R)&&Cl(i,R,v[R])}),rw=Ia(function(i,v){Do(v,xi(v),i)}),iw=Ia(function(i,v,R,H){Do(v,xi(v),i,H)}),gf=Ia(function(i,v,R,H){Do(v,_r(v),i,H)}),_N=Jo(Od);function AN(i,v){var R=Ma(i);return v==null?R:N0(R,v)}var kN=Ft(function(i,v){i=zt(i);var R=-1,H=v.length,K=H>2?v[2]:e;for(K&&si(v[0],v[1],K)&&(H=1);++R<H;)for(var te=v[R],he=xi(te),pe=-1,xe=he.length;++pe<xe;){var Oe=he[pe],De=i[Oe];(De===e||wo(De,qo[Oe])&&!ln.call(i,Oe))&&(i[Oe]=te[Oe])}return i}),SN=Ft(function(i){return i.push(e,wb),sn(ow,e,i)});function $N(i,v){return oe(i,bt(v,3),No)}function TN(i,v){return oe(i,bt(v,3),Dd)}function RN(i,v){return i==null?i:Nd(i,bt(v,3),xi)}function EN(i,v){return i==null?i:B0(i,bt(v,3),xi)}function MN(i,v){return i&&No(i,bt(v,3))}function IN(i,v){return i&&Dd(i,bt(v,3))}function LN(i){return i==null?[]:qc(i,_r(i))}function ON(i){return i==null?[]:qc(i,xi(i))}function mf(i,v,R){var H=i==null?e:qs(i,v);return H===e?R:H}function NN(i,v){return i!=null&&_b(i,v,oI)}function vf(i,v){return i!=null&&_b(i,v,sI)}var DN=gb(function(i,v,R){v!=null&&typeof v.toString!="function"&&(v=Lc.call(v)),i[v]=R},bf(Ci)),PN=gb(function(i,v,R){v!=null&&typeof v.toString!="function"&&(v=Lc.call(v)),ln.call(i,v)?i[v].push(R):i[v]=[R]},bt),zN=Ft(Al);function _r(i){return wi(i)?L0(i):Bd(i)}function xi(i){return wi(i)?L0(i,!0):mI(i)}function FN(i,v){var R={};return v=bt(v,3),No(i,function(H,K,te){Oo(R,v(H,K,te),H)}),R}function BN(i,v){var R={};return v=bt(v,3),No(i,function(H,K,te){Oo(R,K,v(H,K,te))}),R}var WN=Ia(function(i,v,R){Gc(i,v,R)}),ow=Ia(function(i,v,R,H){Gc(i,v,R,H)}),jN=Jo(function(i,v){var R={};if(i==null)return R;var H=!1;v=S(v,function(te){return te=ps(te,i),H||(H=te.length>1),te}),Do(i,ef(i),R),H&&(R=to(R,c|h|o,PI));for(var K=v.length;K--;)qd(R,v[K]);return R});function HN(i,v){return sw(i,lu(bt(v)))}var UN=Jo(function(i,v){return i==null?{}:yI(i,v)});function sw(i,v){if(i==null)return{};var R=S(ef(i),function(H){return[H]});return v=bt(v),J0(i,R,function(H,K){return v(H,K[0])})}function VN(i,v,R){v=ps(v,i);var H=-1,K=v.length;for(K||(K=1,i=e);++H<K;){var te=i==null?e:i[bo(v[H])];te===e&&(H=K,te=R),i=Xo(te)?te.call(i):te}return i}function qN(i,v,R){return i==null?i:Sl(i,v,R)}function GN(i,v,R,H){return H=typeof H=="function"?H:e,i==null?i:Sl(i,v,R,H)}var aw=yb(_r),lw=yb(xi);function KN(i,v,R){var H=Tt(i),K=H||ms(i)||Na(i);if(v=bt(v,4),R==null){var te=i&&i.constructor;K?R=H?new te:[]:Wn(i)?R=Xo(te)?Ma(Dc(i)):{}:R={}}return(K?vr:No)(i,function(he,pe,xe){return v(R,he,pe,xe)}),R}function YN(i,v){return i==null?!0:qd(i,v)}function JN(i,v,R){return i==null?i:tb(i,v,Yd(R))}function ZN(i,v,R,H){return H=typeof H=="function"?H:e,i==null?i:tb(i,v,Yd(R),H)}function Da(i){return i==null?[]:Et(i,_r(i))}function XN(i){return i==null?[]:Et(i,xi(i))}function QN(i,v,R){return R===e&&(R=v,v=e),R!==e&&(R=io(R),R=R===R?R:0),v!==e&&(v=io(v),v=v===v?v:0),Vs(io(i),v,R)}function e2(i,v,R){return v=Qo(v),R===e?(R=v,v=0):R=Qo(R),i=io(i),aI(i,v,R)}function t2(i,v,R){if(R&&typeof R!="boolean"&&si(i,v,R)&&(v=R=e),R===e&&(typeof v=="boolean"?(R=v,v=e):typeof i=="boolean"&&(R=i,i=e)),i===e&&v===e?(i=0,v=1):(i=Qo(i),v===e?(v=i,i=0):v=Qo(v)),i>v){var H=i;i=v,v=H}if(R||i%1||v%1){var K=M0();return Gr(i+K*(v-i+xn("1e-"+((K+"").length-1))),v)}return Hd(i,v)}var n2=La(function(i,v,R){return v=v.toLowerCase(),i+(R?cw(v):v)});function cw(i){return yf(cn(i).toLowerCase())}function uw(i){return i=cn(i),i&&i.replace(ho,V).replace(mo,"")}function r2(i,v,R){i=cn(i),v=Pi(v);var H=i.length;R=R===e?H:Vs(Mt(R),0,H);var K=R;return R-=v.length,R>=0&&i.slice(R,K)==v}function i2(i){return i=cn(i),i&&xr.test(i)?i.replace(Ri,Z):i}function o2(i){return i=cn(i),i&&$n.test(i)?i.replace(jr,"\\$&"):i}var s2=La(function(i,v,R){return i+(R?"-":"")+v.toLowerCase()}),a2=La(function(i,v,R){return i+(R?" ":"")+v.toLowerCase()}),l2=db("toLowerCase");function c2(i,v,R){i=cn(i),v=Mt(v);var H=v?Pt(i):0;if(!v||H>=v)return i;var K=(v-H)/2;return Qc(Bc(K),R)+i+Qc(Fc(K),R)}function u2(i,v,R){i=cn(i),v=Mt(v);var H=v?Pt(i):0;return v&&H<v?i+Qc(v-H,R):i}function h2(i,v,R){i=cn(i),v=Mt(v);var H=v?Pt(i):0;return v&&H<v?Qc(v-H,R)+i:i}function d2(i,v,R){return R||v==null?v=0:v&&(v=+v),wM(cn(i).replace(Qn,""),v||0)}function f2(i,v,R){return(R?si(i,v,R):v===e)?v=1:v=Mt(v),Ud(cn(i),v)}function p2(){var i=arguments,v=cn(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var g2=La(function(i,v,R){return i+(R?"_":"")+v.toLowerCase()});function m2(i,v,R){return R&&typeof R!="number"&&si(i,v,R)&&(v=R=e),R=R===e?le:R>>>0,R?(i=cn(i),i&&(typeof v=="string"||v!=null&&!pf(v))&&(v=Pi(v),!v&&ge(i))?gs(xt(i),0,R):i.split(v,R)):[]}var v2=La(function(i,v,R){return i+(R?" ":"")+yf(v)});function y2(i,v,R){return i=cn(i),R=R==null?0:Vs(Mt(R),0,i.length),v=Pi(v),i.slice(R,R+v.length)==v}function b2(i,v,R){var H=ee.templateSettings;R&&si(i,v,R)&&(v=e),i=cn(i),v=gf({},v,H,bb);var K=gf({},v.imports,H.imports,bb),te=_r(K),he=Et(K,te);vr(te,function(yt){if(dn.test(yt))throw new pt(u)});var pe,xe,Oe=0,De=v.interpolate||er,Fe="__p += '",nt=yi((v.escape||er).source+"|"+De.source+"|"+(De===hi?fi:er).source+"|"+(v.evaluate||er).source+"|$","g"),ut="//# sourceURL="+(ln.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bs+"]")+`
|
|
1462
|
+
`;i.replace(nt,function(yt,Bt,Vt,Fi,ai,Bi){return Vt||(Vt=Fi),Fe+=i.slice(Oe,Bi).replace(Er,se),Bt&&(pe=!0,Fe+=`' +
|
|
1463
|
+
__e(`+Bt+`) +
|
|
1464
|
+
'`),ai&&(xe=!0,Fe+=`';
|
|
1465
|
+
`+ai+`;
|
|
1466
|
+
__p += '`),Vt&&(Fe+=`' +
|
|
1467
|
+
((__t = (`+Vt+`)) == null ? '' : __t) +
|
|
1468
|
+
'`),Oe=Bi+yt.length,yt}),Fe+=`';
|
|
1469
|
+
`;var wt=ln.call(v,"variable")&&v.variable;if(!wt)Fe=`with (obj) {
|
|
1470
|
+
`+Fe+`
|
|
1471
|
+
}
|
|
1472
|
+
`;else if(dn.test(wt))throw new pt(w);Fe=(xe?Fe.replace(Vn,""):Fe).replace(Ti,"$1").replace(gr,"$1;"),Fe="function("+(wt||"obj")+`) {
|
|
1473
|
+
`+(wt?"":`obj || (obj = {});
|
|
1474
|
+
`)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(xe?`, __j = Array.prototype.join;
|
|
1475
|
+
function print() { __p += __j.call(arguments, '') }
|
|
1476
|
+
`:`;
|
|
1477
|
+
`)+Fe+`return __p
|
|
1478
|
+
}`;var Ot=dw(function(){return St(te,ut+"return "+Fe).apply(e,he)});if(Ot.source=Fe,ff(Ot))throw Ot;return Ot}function w2(i){return cn(i).toLowerCase()}function x2(i){return cn(i).toUpperCase()}function C2(i,v,R){if(i=cn(i),i&&(R||v===e))return At(i);if(!i||!(v=Pi(v)))return i;var H=xt(i),K=xt(v),te=ur(H,K),he=yr(H,K)+1;return gs(H,te,he).join("")}function _2(i,v,R){if(i=cn(i),i&&(R||v===e))return i.slice(0,vt(i)+1);if(!i||!(v=Pi(v)))return i;var H=xt(i),K=yr(H,xt(v))+1;return gs(H,0,K).join("")}function A2(i,v,R){if(i=cn(i),i&&(R||v===e))return i.replace(Qn,"");if(!i||!(v=Pi(v)))return i;var H=xt(i),K=ur(H,xt(v));return gs(H,K).join("")}function k2(i,v){var R=W,H=z;if(Wn(v)){var K="separator"in v?v.separator:K;R="length"in v?Mt(v.length):R,H="omission"in v?Pi(v.omission):H}i=cn(i);var te=i.length;if(ge(i)){var he=xt(i);te=he.length}if(R>=te)return i;var pe=R-Pt(H);if(pe<1)return H;var xe=he?gs(he,0,pe).join(""):i.slice(0,pe);if(K===e)return xe+H;if(he&&(pe+=xe.length-pe),pf(K)){if(i.slice(pe).search(K)){var Oe,De=xe;for(K.global||(K=yi(K.source,cn(Lt.exec(K))+"g")),K.lastIndex=0;Oe=K.exec(De);)var Fe=Oe.index;xe=xe.slice(0,Fe===e?pe:Fe)}}else if(i.indexOf(Pi(K),pe)!=pe){var nt=xe.lastIndexOf(K);nt>-1&&(xe=xe.slice(0,nt))}return xe+H}function S2(i){return i=cn(i),i&&ls.test(i)?i.replace(Hi,ht):i}var $2=La(function(i,v,R){return i+(R?" ":"")+v.toUpperCase()}),yf=db("toUpperCase");function hw(i,v,R){return i=cn(i),v=R?e:v,v===e?_e(i)?hr(i):X(i):i.match(v)||[]}var dw=Ft(function(i,v){try{return sn(i,e,v)}catch(R){return ff(R)?R:new pt(R)}}),T2=Jo(function(i,v){return vr(v,function(R){R=bo(R),Oo(i,R,hf(i[R],i))}),i});function R2(i){var v=i==null?0:i.length,R=bt();return i=v?S(i,function(H){if(typeof H[1]!="function")throw new Cn(p);return[R(H[0]),H[1]]}):[],Ft(function(H){for(var K=-1;++K<v;){var te=i[K];if(sn(te[0],this,H))return sn(te[1],this,H)}})}function E2(i){return nI(to(i,c))}function bf(i){return function(){return i}}function M2(i,v){return i==null||i!==i?v:i}var I2=pb(),L2=pb(!0);function Ci(i){return i}function wf(i){return U0(typeof i=="function"?i:to(i,c))}function O2(i){return q0(to(i,c))}function N2(i,v){return G0(i,to(v,c))}var D2=Ft(function(i,v){return function(R){return Al(R,i,v)}}),P2=Ft(function(i,v){return function(R){return Al(i,R,v)}});function xf(i,v,R){var H=_r(v),K=qc(v,H);R==null&&!(Wn(v)&&(K.length||!H.length))&&(R=v,v=i,i=this,K=qc(v,_r(v)));var te=!(Wn(R)&&"chain"in R)||!!R.chain,he=Xo(i);return vr(K,function(pe){var xe=v[pe];i[pe]=xe,he&&(i.prototype[pe]=function(){var Oe=this.__chain__;if(te||Oe){var De=i(this.__wrapped__),Fe=De.__actions__=bi(this.__actions__);return Fe.push({func:xe,args:arguments,thisArg:i}),De.__chain__=Oe,De}return xe.apply(i,k([this.value()],arguments))})}),i}function z2(){return Dt._===this&&(Dt._=hM),this}function Cf(){}function F2(i){return i=Mt(i),Ft(function(v){return K0(v,i)})}var B2=Zd(S),W2=Zd(Lo),j2=Zd(j);function fw(i){return of(i)?Pe(bo(i)):bI(i)}function H2(i){return function(v){return i==null?e:qs(i,v)}}var U2=mb(),V2=mb(!0);function _f(){return[]}function Af(){return!1}function q2(){return{}}function G2(){return""}function K2(){return!0}function Y2(i,v){if(i=Mt(i),i<1||i>G)return[];var R=le,H=Gr(i,le);v=bt(v),i-=le;for(var K=at(H,v);++R<i;)v(R);return K}function J2(i){return Tt(i)?S(i,bo):zi(i)?[i]:bi(Ib(cn(i)))}function Z2(i){var v=++cM;return cn(i)+v}var X2=Xc(function(i,v){return i+v},0),Q2=Xd("ceil"),eD=Xc(function(i,v){return i/v},1),tD=Xd("floor");function nD(i){return i&&i.length?Vc(i,Ci,Pd):e}function rD(i,v){return i&&i.length?Vc(i,bt(v,2),Pd):e}function iD(i){return Ce(i,Ci)}function oD(i,v){return Ce(i,bt(v,2))}function sD(i){return i&&i.length?Vc(i,Ci,Wd):e}function aD(i,v){return i&&i.length?Vc(i,bt(v,2),Wd):e}var lD=Xc(function(i,v){return i*v},1),cD=Xd("round"),uD=Xc(function(i,v){return i-v},0);function hD(i){return i&&i.length?rt(i,Ci):0}function dD(i,v){return i&&i.length?rt(i,bt(v,2)):0}return ee.after=NO,ee.ary=Hb,ee.assign=CN,ee.assignIn=rw,ee.assignInWith=iw,ee.assignWith=gf,ee.at=_N,ee.before=Ub,ee.bind=hf,ee.bindAll=T2,ee.bindKey=Vb,ee.castArray=GO,ee.chain=Bb,ee.chunk=nL,ee.compact=rL,ee.concat=iL,ee.cond=R2,ee.conforms=E2,ee.constant=bf,ee.countBy=dO,ee.create=AN,ee.curry=qb,ee.curryRight=Gb,ee.debounce=Kb,ee.defaults=kN,ee.defaultsDeep=SN,ee.defer=DO,ee.delay=PO,ee.difference=oL,ee.differenceBy=sL,ee.differenceWith=aL,ee.drop=lL,ee.dropRight=cL,ee.dropRightWhile=uL,ee.dropWhile=hL,ee.fill=dL,ee.filter=pO,ee.flatMap=vO,ee.flatMapDeep=yO,ee.flatMapDepth=bO,ee.flatten=Db,ee.flattenDeep=fL,ee.flattenDepth=pL,ee.flip=zO,ee.flow=I2,ee.flowRight=L2,ee.fromPairs=gL,ee.functions=LN,ee.functionsIn=ON,ee.groupBy=wO,ee.initial=vL,ee.intersection=yL,ee.intersectionBy=bL,ee.intersectionWith=wL,ee.invert=DN,ee.invertBy=PN,ee.invokeMap=CO,ee.iteratee=wf,ee.keyBy=_O,ee.keys=_r,ee.keysIn=xi,ee.map=ou,ee.mapKeys=FN,ee.mapValues=BN,ee.matches=O2,ee.matchesProperty=N2,ee.memoize=au,ee.merge=WN,ee.mergeWith=ow,ee.method=D2,ee.methodOf=P2,ee.mixin=xf,ee.negate=lu,ee.nthArg=F2,ee.omit=jN,ee.omitBy=HN,ee.once=FO,ee.orderBy=AO,ee.over=B2,ee.overArgs=BO,ee.overEvery=W2,ee.overSome=j2,ee.partial=df,ee.partialRight=Yb,ee.partition=kO,ee.pick=UN,ee.pickBy=sw,ee.property=fw,ee.propertyOf=H2,ee.pull=AL,ee.pullAll=zb,ee.pullAllBy=kL,ee.pullAllWith=SL,ee.pullAt=$L,ee.range=U2,ee.rangeRight=V2,ee.rearg=WO,ee.reject=TO,ee.remove=TL,ee.rest=jO,ee.reverse=cf,ee.sampleSize=EO,ee.set=qN,ee.setWith=GN,ee.shuffle=MO,ee.slice=RL,ee.sortBy=OO,ee.sortedUniq=DL,ee.sortedUniqBy=PL,ee.split=m2,ee.spread=HO,ee.tail=zL,ee.take=FL,ee.takeRight=BL,ee.takeRightWhile=WL,ee.takeWhile=jL,ee.tap=rO,ee.throttle=UO,ee.thru=iu,ee.toArray=ew,ee.toPairs=aw,ee.toPairsIn=lw,ee.toPath=J2,ee.toPlainObject=nw,ee.transform=KN,ee.unary=VO,ee.union=HL,ee.unionBy=UL,ee.unionWith=VL,ee.uniq=qL,ee.uniqBy=GL,ee.uniqWith=KL,ee.unset=YN,ee.unzip=uf,ee.unzipWith=Fb,ee.update=JN,ee.updateWith=ZN,ee.values=Da,ee.valuesIn=XN,ee.without=YL,ee.words=hw,ee.wrap=qO,ee.xor=JL,ee.xorBy=ZL,ee.xorWith=XL,ee.zip=QL,ee.zipObject=eO,ee.zipObjectDeep=tO,ee.zipWith=nO,ee.entries=aw,ee.entriesIn=lw,ee.extend=rw,ee.extendWith=iw,xf(ee,ee),ee.add=X2,ee.attempt=dw,ee.camelCase=n2,ee.capitalize=cw,ee.ceil=Q2,ee.clamp=QN,ee.clone=KO,ee.cloneDeep=JO,ee.cloneDeepWith=ZO,ee.cloneWith=YO,ee.conformsTo=XO,ee.deburr=uw,ee.defaultTo=M2,ee.divide=eD,ee.endsWith=r2,ee.eq=wo,ee.escape=i2,ee.escapeRegExp=o2,ee.every=fO,ee.find=gO,ee.findIndex=Ob,ee.findKey=$N,ee.findLast=mO,ee.findLastIndex=Nb,ee.findLastKey=TN,ee.floor=tD,ee.forEach=Wb,ee.forEachRight=jb,ee.forIn=RN,ee.forInRight=EN,ee.forOwn=MN,ee.forOwnRight=IN,ee.get=mf,ee.gt=QO,ee.gte=eN,ee.has=NN,ee.hasIn=vf,ee.head=Pb,ee.identity=Ci,ee.includes=xO,ee.indexOf=mL,ee.inRange=e2,ee.invoke=zN,ee.isArguments=Ys,ee.isArray=Tt,ee.isArrayBuffer=tN,ee.isArrayLike=wi,ee.isArrayLikeObject=tr,ee.isBoolean=nN,ee.isBuffer=ms,ee.isDate=rN,ee.isElement=iN,ee.isEmpty=oN,ee.isEqual=sN,ee.isEqualWith=aN,ee.isError=ff,ee.isFinite=lN,ee.isFunction=Xo,ee.isInteger=Jb,ee.isLength=cu,ee.isMap=Zb,ee.isMatch=cN,ee.isMatchWith=uN,ee.isNaN=hN,ee.isNative=dN,ee.isNil=pN,ee.isNull=fN,ee.isNumber=Xb,ee.isObject=Wn,ee.isObjectLike=Kn,ee.isPlainObject=El,ee.isRegExp=pf,ee.isSafeInteger=gN,ee.isSet=Qb,ee.isString=uu,ee.isSymbol=zi,ee.isTypedArray=Na,ee.isUndefined=mN,ee.isWeakMap=vN,ee.isWeakSet=yN,ee.join=xL,ee.kebabCase=s2,ee.last=ro,ee.lastIndexOf=CL,ee.lowerCase=a2,ee.lowerFirst=l2,ee.lt=bN,ee.lte=wN,ee.max=nD,ee.maxBy=rD,ee.mean=iD,ee.meanBy=oD,ee.min=sD,ee.minBy=aD,ee.stubArray=_f,ee.stubFalse=Af,ee.stubObject=q2,ee.stubString=G2,ee.stubTrue=K2,ee.multiply=lD,ee.nth=_L,ee.noConflict=z2,ee.noop=Cf,ee.now=su,ee.pad=c2,ee.padEnd=u2,ee.padStart=h2,ee.parseInt=d2,ee.random=t2,ee.reduce=SO,ee.reduceRight=$O,ee.repeat=f2,ee.replace=p2,ee.result=VN,ee.round=cD,ee.runInContext=me,ee.sample=RO,ee.size=IO,ee.snakeCase=g2,ee.some=LO,ee.sortedIndex=EL,ee.sortedIndexBy=ML,ee.sortedIndexOf=IL,ee.sortedLastIndex=LL,ee.sortedLastIndexBy=OL,ee.sortedLastIndexOf=NL,ee.startCase=v2,ee.startsWith=y2,ee.subtract=uD,ee.sum=hD,ee.sumBy=dD,ee.template=b2,ee.times=Y2,ee.toFinite=Qo,ee.toInteger=Mt,ee.toLength=tw,ee.toLower=w2,ee.toNumber=io,ee.toSafeInteger=xN,ee.toString=cn,ee.toUpper=x2,ee.trim=C2,ee.trimEnd=_2,ee.trimStart=A2,ee.truncate=k2,ee.unescape=S2,ee.uniqueId=Z2,ee.upperCase=$2,ee.upperFirst=yf,ee.each=Wb,ee.eachRight=jb,ee.first=Pb,xf(ee,(function(){var i={};return No(ee,function(v,R){ln.call(ee.prototype,R)||(i[R]=v)}),i})(),{chain:!1}),ee.VERSION=r,vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){ee[i].placeholder=ee}),vr(["drop","take"],function(i,v){Ht.prototype[i]=function(R){R=R===e?1:br(Mt(R),0);var H=this.__filtered__&&!v?new Ht(this):this.clone();return H.__filtered__?H.__takeCount__=Gr(R,H.__takeCount__):H.__views__.push({size:Gr(R,le),type:i+(H.__dir__<0?"Right":"")}),H},Ht.prototype[i+"Right"]=function(R){return this.reverse()[i](R).reverse()}}),vr(["filter","map","takeWhile"],function(i,v){var R=v+1,H=R==A||R==B;Ht.prototype[i]=function(K){var te=this.clone();return te.__iteratees__.push({iteratee:bt(K,3),type:R}),te.__filtered__=te.__filtered__||H,te}}),vr(["head","last"],function(i,v){var R="take"+(v?"Right":"");Ht.prototype[i]=function(){return this[R](1).value()[0]}}),vr(["initial","tail"],function(i,v){var R="drop"+(v?"":"Right");Ht.prototype[i]=function(){return this.__filtered__?new Ht(this):this[R](1)}}),Ht.prototype.compact=function(){return this.filter(Ci)},Ht.prototype.find=function(i){return this.filter(i).head()},Ht.prototype.findLast=function(i){return this.reverse().find(i)},Ht.prototype.invokeMap=Ft(function(i,v){return typeof i=="function"?new Ht(this):this.map(function(R){return Al(R,i,v)})}),Ht.prototype.reject=function(i){return this.filter(lu(bt(i)))},Ht.prototype.slice=function(i,v){i=Mt(i);var R=this;return R.__filtered__&&(i>0||v<0)?new Ht(R):(i<0?R=R.takeRight(-i):i&&(R=R.drop(i)),v!==e&&(v=Mt(v),R=v<0?R.dropRight(-v):R.take(v-i)),R)},Ht.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ht.prototype.toArray=function(){return this.take(le)},No(Ht.prototype,function(i,v){var R=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),K=ee[H?"take"+(v=="last"?"Right":""):v],te=H||/^find/.test(v);K&&(ee.prototype[v]=function(){var he=this.__wrapped__,pe=H?[1]:arguments,xe=he instanceof Ht,Oe=pe[0],De=xe||Tt(he),Fe=function(Bt){var Vt=K.apply(ee,k([Bt],pe));return H&&nt?Vt[0]:Vt};De&&R&&typeof Oe=="function"&&Oe.length!=1&&(xe=De=!1);var nt=this.__chain__,ut=!!this.__actions__.length,wt=te&&!nt,Ot=xe&&!ut;if(!te&&De){he=Ot?he:new Ht(this);var yt=i.apply(he,pe);return yt.__actions__.push({func:iu,args:[Fe],thisArg:e}),new eo(yt,nt)}return wt&&Ot?i.apply(this,pe):(yt=this.thru(Fe),wt?H?yt.value()[0]:yt.value():yt)})}),vr(["pop","push","shift","sort","splice","unshift"],function(i){var v=Qi[i],R=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);ee.prototype[i]=function(){var K=arguments;if(H&&!this.__chain__){var te=this.value();return v.apply(Tt(te)?te:[],K)}return this[R](function(he){return v.apply(Tt(he)?he:[],K)})}}),No(Ht.prototype,function(i,v){var R=ee[v];if(R){var H=R.name+"";ln.call(Ea,H)||(Ea[H]=[]),Ea[H].push({name:v,func:R})}}),Ea[Zc(e,x).name]=[{name:"wrapper",func:e}],Ht.prototype.clone=$M,Ht.prototype.reverse=TM,Ht.prototype.value=RM,ee.prototype.at=iO,ee.prototype.chain=oO,ee.prototype.commit=sO,ee.prototype.next=aO,ee.prototype.plant=cO,ee.prototype.reverse=uO,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=hO,ee.prototype.first=ee.prototype.head,vl&&(ee.prototype[vl]=lO),ee}),pn=an();cr?((cr.exports=pn)._=pn,Vr._=pn):Dt._=pn}).call(iA)})(Yl,Yl.exports)),Yl.exports}var sA=oA();Yn("b",Kl(sA)).debounce(function(){this.rebuildDisplayText()},300);var Fg={exports:{}},Bg;function aA(){return Bg||(Bg=1,(function(t,n){(function(){ace.require(["ace/mode/text"],function(e){t&&(t.exports=e)})})()})(Fg)),Fg.exports}aA();const lA=!0,dr="u-",cA="uplot",uA=dr+"hz",hA=dr+"vt",dA=dr+"title",fA=dr+"wrap",pA=dr+"under",gA=dr+"over",mA=dr+"axis",$s=dr+"off",vA=dr+"select",yA=dr+"cursor-x",bA=dr+"cursor-y",wA=dr+"cursor-pt",xA=dr+"legend",CA=dr+"live",_A=dr+"inline",AA=dr+"series",kA=dr+"marker",Wg=dr+"label",SA=dr+"value",Ja="width",Za="height",Xa="top",jg="bottom",aa="left",ju="right",Hu="#000",Hg=Hu+"0",Uu="mousemove",Ug="mousedown",Vu="mouseup",Vg="mouseenter",qg="mouseleave",Gg="dblclick",$A="resize",TA="scroll",Kg="change",Jl="dppxchange",qu="--",la=typeof window<"u",Gu=la?document:null,ca=la?window:null,RA=la?navigator:null;let nn,Zl;function Ku(){let t=devicePixelRatio;nn!=t&&(nn=t,Zl&&Zu(Kg,Zl,Ku),Zl=matchMedia(`(min-resolution: ${nn-.001}dppx) and (max-resolution: ${nn+.001}dppx)`),Ts(Kg,Zl,Ku),ca.dispatchEvent(new CustomEvent(Jl)))}function Ai(t,n){if(n!=null){let e=t.classList;!e.contains(n)&&e.add(n)}}function Yu(t,n){let e=t.classList;e.contains(n)&&e.remove(n)}function _n(t,n,e){t.style[n]=e+"px"}function ao(t,n,e,r){let m=Gu.createElement(t);return n!=null&&Ai(m,n),e?.insertBefore(m,r),m}function Wi(t,n){return ao("div",t,n)}const Yg=new WeakMap;function _o(t,n,e,r,m){let d="translate("+n+"px,"+e+"px)",p=Yg.get(t);d!=p&&(t.style.transform=d,Yg.set(t,d),n<0||e<0||n>r||e>m?Ai(t,$s):Yu(t,$s))}const Jg=new WeakMap;function Zg(t,n,e){let r=n+e,m=Jg.get(t);r!=m&&(Jg.set(t,r),t.style.background=n,t.style.borderColor=e)}const Xg=new WeakMap;function Qg(t,n,e,r){let m=n+""+e,d=Xg.get(t);m!=d&&(Xg.set(t,m),t.style.height=e+"px",t.style.width=n+"px",t.style.marginLeft=r?-n/2+"px":0,t.style.marginTop=r?-e/2+"px":0)}const Ju={passive:!0},EA={...Ju,capture:!0};function Ts(t,n,e,r){n.addEventListener(t,e,r?EA:Ju)}function Zu(t,n,e,r){n.removeEventListener(t,e,Ju)}la&&Ku();function lo(t,n,e,r){let m;e=e||0,r=r||n.length-1;let d=r<=2147483647;for(;r-e>1;)m=d?e+r>>1:Si((e+r)/2),n[m]<t?e=m:r=m;return t-n[e]<=n[r]-t?e:r}function em(t){return(n,e,r)=>{let m=-1,d=-1;for(let p=e;p<=r;p++)if(t(n[p])){m=p;break}for(let p=r;p>=e;p--)if(t(n[p])){d=p;break}return[m,d]}}const tm=t=>t!=null,nm=t=>t!=null&&t>0,Xl=em(tm),MA=em(nm);function IA(t,n,e,r=0,m=!1){let d=m?MA:Xl,p=m?nm:tm;[n,e]=d(t,n,e);let w=t[n],u=t[n];if(n>-1)if(r==1)w=t[n],u=t[e];else if(r==-1)w=t[e],u=t[n];else for(let f=n;f<=e;f++){let a=t[f];p(a)&&(a<w?w=a:a>u&&(u=a))}return[w??vn,u??-vn]}function Ql(t,n,e,r){let m=om(t),d=om(n);t==n&&(m==-1?(t*=e,n/=e):(t/=e,n*=e));let p=e==10?Fo:sm,w=m==1?Si:ji,u=d==1?ji:Si,f=w(p(fr(t))),a=u(p(fr(n))),s=ua(e,f),c=ua(e,a);return e==10&&(f<0&&(s=yn(s,-f)),a<0&&(c=yn(c,-a))),r||e==2?(t=s*m,n=c*d):(t=fm(t,s),n=nc(n,c)),[t,n]}function Xu(t,n,e,r){let m=Ql(t,n,e,r);return t==0&&(m[0]=0),n==0&&(m[1]=0),m}const Qu=.1,rm={mode:3,pad:Qu},Qa={pad:0,soft:null,mode:0},LA={min:Qa,max:Qa};function ec(t,n,e,r){return rc(e)?im(t,n,e):(Qa.pad=e,Qa.soft=r?0:null,Qa.mode=r?3:0,im(t,n,LA))}function Xt(t,n){return t??n}function OA(t,n,e){for(n=Xt(n,0),e=Xt(e,t.length-1);n<=e;){if(t[n]!=null)return!0;n++}return!1}function im(t,n,e){let r=e.min,m=e.max,d=Xt(r.pad,0),p=Xt(m.pad,0),w=Xt(r.hard,-vn),u=Xt(m.hard,vn),f=Xt(r.soft,vn),a=Xt(m.soft,-vn),s=Xt(r.mode,0),c=Xt(m.mode,0),h=n-t,o=Fo(h),l=Xr(fr(t),fr(n)),g=Fo(l),b=fr(g-o);(h<1e-24||b>10)&&(h=0,(t==0||n==0)&&(h=1e-24,s==2&&f!=vn&&(d=0),c==2&&a!=-vn&&(p=0)));let x=h||l||1e3,E=Fo(x),$=ua(10,Si(E)),_=x*(h==0?t==0?.1:1:d),C=yn(fm(t-_,$/10),24),L=t>=f&&(s==1||s==3&&C<=f||s==2&&C>=f)?f:vn,D=Xr(w,C<L&&t>=L?L:co(L,C)),I=x*(h==0?n==0?.1:1:p),M=yn(nc(n+I,$/10),24),W=n<=a&&(c==1||c==3&&M>=a||c==2&&M<=a)?a:-vn,z=co(u,M>W&&n<=W?W:Xr(W,M));return D==z&&D==0&&(z=100),[D,z]}const NA=new Intl.NumberFormat(la?RA.language:"en-US"),eh=t=>NA.format(t),ki=Math,tc=ki.PI,fr=ki.abs,Si=ki.floor,pr=ki.round,ji=ki.ceil,co=ki.min,Xr=ki.max,ua=ki.pow,om=ki.sign,Fo=ki.log10,sm=ki.log2,DA=(t,n=1)=>ki.sinh(t)*n,th=(t,n=1)=>ki.asinh(t/n),vn=1/0;function am(t){return(Fo((t^t>>31)-(t>>31))|0)+1}function nh(t,n,e){return co(Xr(t,n),e)}function lm(t){return typeof t=="function"}function Wt(t){return lm(t)?t:()=>t}const PA=()=>{},cm=t=>t,um=(t,n)=>n,zA=t=>null,hm=t=>!0,dm=(t,n)=>t==n,FA=/\.\d*?(?=9{6,}|0{6,})/gm,Rs=t=>{if(gm(t)||is.has(t))return t;const n=`${t}`,e=n.match(FA);if(e==null)return t;let r=e[0].length-1;if(n.indexOf("e-")!=-1){let[m,d]=n.split("e");return+`${Rs(m)}e${d}`}return yn(t,r)};function Es(t,n){return Rs(yn(Rs(t/n))*n)}function nc(t,n){return Rs(ji(Rs(t/n))*n)}function fm(t,n){return Rs(Si(Rs(t/n))*n)}function yn(t,n=0){if(gm(t))return t;let e=10**n,r=t*e*(1+Number.EPSILON);return pr(r)/e}const is=new Map;function pm(t){return((""+t).split(".")[1]||"").length}function el(t,n,e,r){let m=[],d=r.map(pm);for(let p=n;p<e;p++){let w=fr(p),u=yn(ua(t,p),w);for(let f=0;f<r.length;f++){let a=t==10?+`${r[f]}e${p}`:r[f]*u,s=(p>=0?0:w)+(p>=d[f]?0:d[f]),c=t==10?a:yn(a,s);m.push(c),is.set(c,s)}}return m}const tl={},rh=[],ha=[null,null],os=Array.isArray,gm=Number.isInteger,BA=t=>t===void 0;function mm(t){return typeof t=="string"}function rc(t){let n=!1;if(t!=null){let e=t.constructor;n=e==null||e==Object}return n}function WA(t){return t!=null&&typeof t=="object"}const jA=Object.getPrototypeOf(Uint8Array),vm="__proto__";function da(t,n=rc){let e;if(os(t)){let r=t.find(m=>m!=null);if(os(r)||n(r)){e=Array(t.length);for(let m=0;m<t.length;m++)e[m]=da(t[m],n)}else e=t.slice()}else if(t instanceof jA)e=t.slice();else if(n(t)){e={};for(let r in t)r!=vm&&(e[r]=da(t[r],n))}else e=t;return e}function rr(t){let n=arguments;for(let e=1;e<n.length;e++){let r=n[e];for(let m in r)m!=vm&&(rc(t[m])?rr(t[m],da(r[m])):t[m]=da(r[m]))}return t}const HA=0,UA=1,VA=2;function qA(t,n,e){for(let r=0,m,d=-1;r<n.length;r++){let p=n[r];if(p>d){for(m=p-1;m>=0&&t[m]==null;)t[m--]=null;for(m=p+1;m<e&&t[m]==null;)t[d=m++]=null}}}function GA(t,n){if(JA(t)){let p=t[0].slice();for(let w=1;w<t.length;w++)p.push(...t[w].slice(1));return ZA(p[0])||(p=YA(p)),p}let e=new Set;for(let p=0;p<t.length;p++){let w=t[p][0],u=w.length;for(let f=0;f<u;f++)e.add(w[f])}let r=[Array.from(e).sort((p,w)=>p-w)],m=r[0].length,d=new Map;for(let p=0;p<m;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let w=t[p],u=w[0];for(let f=1;f<w.length;f++){let a=w[f],s=Array(m).fill(void 0),c=n?n[p][f]:UA,h=[];for(let o=0;o<a.length;o++){let l=a[o],g=d.get(u[o]);l===null?c!=HA&&(s[g]=l,c==VA&&h.push(g)):s[g]=l}qA(s,h,m),r.push(s)}}return r}const KA=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function YA(t){let n=t[0],e=n.length,r=Array(e);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,p)=>n[d]-n[p]);let m=[];for(let d=0;d<t.length;d++){let p=t[d],w=Array(e);for(let u=0;u<e;u++)w[u]=p[r[u]];m.push(w)}return m}function JA(t){let n=t[0][0],e=n.length;for(let r=1;r<t.length;r++){let m=t[r][0];if(m.length!=e)return!1;if(m!=n){for(let d=0;d<e;d++)if(m[d]!=n[d])return!1}}return!0}function ZA(t,n=100){const e=t.length;if(e<=1)return!0;let r=0,m=e-1;for(;r<=m&&t[r]==null;)r++;for(;m>=r&&t[m]==null;)m--;if(m<=r)return!0;const d=Xr(1,Si((m-r+1)/n));for(let p=t[r],w=r+d;w<=m;w+=d){const u=t[w];if(u!=null){if(u<=p)return!1;p=u}}return!0}const ym=["January","February","March","April","May","June","July","August","September","October","November","December"],bm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function wm(t){return t.slice(0,3)}const XA=bm.map(wm),QA=ym.map(wm),ek={MMMM:ym,MMM:QA,WWWW:bm,WWW:XA};function nl(t){return(t<10?"0":"")+t}function tk(t){return(t<10?"00":t<100?"0":"")+t}const nk={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,n)=>n.MMMM[t.getMonth()],MMM:(t,n)=>n.MMM[t.getMonth()],MM:t=>nl(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>nl(t.getDate()),D:t=>t.getDate(),WWWW:(t,n)=>n.WWWW[t.getDay()],WWW:(t,n)=>n.WWW[t.getDay()],HH:t=>nl(t.getHours()),H:t=>t.getHours(),h:t=>{let n=t.getHours();return n==0?12:n>12?n-12:n},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>nl(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>nl(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>tk(t.getMilliseconds())};function ih(t,n){n=n||ek;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(t);)e.push(m[0][0]=="{"?nk[m[1]]:m[0]);return d=>{let p="";for(let w=0;w<e.length;w++)p+=typeof e[w]=="string"?e[w]:e[w](d,n);return p}}const rk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function ik(t,n){let e;return n=="UTC"||n=="Etc/UTC"?e=new Date(+t+t.getTimezoneOffset()*6e4):n==rk?e=t:(e=new Date(t.toLocaleString("en-US",{timeZone:n})),e.setMilliseconds(t.getMilliseconds())),e}const xm=t=>t%1==0,ic=[1,2,2.5,5],ok=el(10,-32,0,ic),Cm=el(10,0,32,ic),sk=Cm.filter(xm),Ms=ok.concat(Cm),oh=`
|
|
1479
|
+
`,_m="{YYYY}",Am=oh+_m,km="{M}/{D}",rl=oh+km,oc=rl+"/{YY}",Sm="{aa}",ak="{h}:{mm}",fa=ak+Sm,$m=oh+fa,Tm=":{ss}",on=null;function Rm(t){let n=t*1e3,e=n*60,r=e*60,m=r*24,d=m*30,p=m*365,w=(t==1?el(10,0,3,ic).filter(xm):el(10,-3,0,ic)).concat([n,n*5,n*10,n*15,n*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,m,m*2,m*3,m*4,m*5,m*6,m*7,m*8,m*9,m*10,m*15,d,d*2,d*3,d*4,d*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const u=[[p,_m,on,on,on,on,on,on,1],[m*28,"{MMM}",Am,on,on,on,on,on,1],[m,km,Am,on,on,on,on,on,1],[r,"{h}"+Sm,oc,on,rl,on,on,on,1],[e,fa,oc,on,rl,on,on,on,1],[n,Tm,oc+" "+fa,on,rl+" "+fa,on,$m,on,1],[t,Tm+".{fff}",oc+" "+fa,on,rl+" "+fa,on,$m,on,1]];function f(a){return(s,c,h,o,l,g)=>{let b=[],x=l>=p,E=l>=d&&l<p,$=a(h),_=yn($*t,3),C=sh($.getFullYear(),x?0:$.getMonth(),E||x?1:$.getDate()),L=yn(C*t,3);if(E||x){let D=E?l/d:0,I=x?l/p:0,M=_==L?_:yn(sh(C.getFullYear()+I,C.getMonth()+D,1)*t,3),W=new Date(pr(M/t)),z=W.getFullYear(),O=W.getMonth();for(let T=0;M<=o;T++){let A=sh(z+I*T,O+D*T,1),N=A-a(yn(A*t,3));M=yn((+A+N)*t,3),M<=o&&b.push(M)}}else{let D=l>=m?m:l,I=Si(h)-Si(_),M=L+I+nc(_-L,D);b.push(M);let W=a(M),z=W.getHours()+W.getMinutes()/e+W.getSeconds()/r,O=l/r,T=s.axes[c]._space,A=g/T;for(;M=yn(M+l,t==1?0:3),!(M>o);)if(O>1){let N=Si(yn(z+O,6))%24,B=a(M).getHours()-N;B>1&&(B=-1),M-=B*r,z=(z+O)%24;let U=b[b.length-1];yn((M-U)/l,3)*A>=.7&&b.push(M)}else b.push(M)}return b}}return[w,u,f]}const[lk,ck,uk]=Rm(1),[hk,dk,fk]=Rm(.001);el(2,-53,53,[1]);function Em(t,n){return t.map(e=>e.map((r,m)=>m==0||m==8||r==null?r:n(m==1||e[8]==0?r:e[1]+r)))}function Mm(t,n){return(e,r,m,d,p)=>{let w=n.find(o=>p>=o[0])||n[n.length-1],u,f,a,s,c,h;return r.map(o=>{let l=t(o),g=l.getFullYear(),b=l.getMonth(),x=l.getDate(),E=l.getHours(),$=l.getMinutes(),_=l.getSeconds(),C=g!=u&&w[2]||b!=f&&w[3]||x!=a&&w[4]||E!=s&&w[5]||$!=c&&w[6]||_!=h&&w[7]||w[1];return u=g,f=b,a=x,s=E,c=$,h=_,C(l)})}}function pk(t,n){let e=ih(n);return(r,m,d,p,w)=>m.map(u=>e(t(u)))}function sh(t,n,e){return new Date(t,n,e)}function Im(t,n){return n(t)}const gk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Lm(t,n){return(e,r,m,d)=>d==null?qu:n(t(r))}function mk(t,n){let e=t.series[n];return e.width?e.stroke(t,n):e.points.width?e.points.stroke(t,n):null}function vk(t,n){return t.series[n].fill(t,n)}const yk={show:!0,live:!0,isolate:!1,mount:PA,markers:{show:!0,width:2,stroke:mk,fill:vk,dash:"solid"},idx:null,idxs:null,values:[]};function bk(t,n){let e=t.cursor.points,r=Wi(),m=e.size(t,n);_n(r,Ja,m),_n(r,Za,m);let d=m/-2;_n(r,"marginLeft",d),_n(r,"marginTop",d);let p=e.width(t,n,m);return p&&_n(r,"borderWidth",p),r}function wk(t,n){let e=t.series[n].points;return e._fill||e._stroke}function xk(t,n){let e=t.series[n].points;return e._stroke||e._fill}function Ck(t,n){return t.series[n].points.size}const ah=[0,0];function _k(t,n,e){return ah[0]=n,ah[1]=e,ah}function sc(t,n,e,r=!0){return m=>{m.button==0&&(!r||m.target==n)&&e(m)}}function lh(t,n,e,r=!0){return m=>{(!r||m.target==n)&&e(m)}}const Ak={show:!0,x:!0,y:!0,lock:!1,move:_k,points:{one:!1,show:bk,size:Ck,width:0,stroke:xk,fill:wk},bind:{mousedown:sc,mouseup:sc,click:sc,dblclick:sc,mousemove:lh,mouseleave:lh,mouseenter:lh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,n,e,r,m)=>r-m,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Om={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},ch=rr({},Om,{filter:um}),Nm=rr({},ch,{size:10}),Dm=rr({},Om,{show:!1}),uh='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"',Pm="bold "+uh,zm=1.5,Fm={show:!0,scale:"x",stroke:Hu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Pm,side:2,grid:ch,ticks:Nm,border:Dm,font:uh,lineGap:zm,rotate:0},kk="Value",Sk="Time",Bm={show:!0,scale:"x",auto:!1,sorted:1,min:vn,max:-vn,idxs:[]};function $k(t,n,e,r,m){return n.map(d=>d==null?"":eh(d))}function Tk(t,n,e,r,m,d,p){let w=[],u=is.get(m)||0;e=p?e:yn(nc(e,m),u);for(let f=e;f<=r;f=yn(f+m,u))w.push(Object.is(f,-0)?0:f);return w}function hh(t,n,e,r,m,d,p){const w=[],u=t.scales[t.axes[n].scale].log,f=u==10?Fo:sm,a=Si(f(e));m=ua(u,a),u==10&&(m=Ms[lo(m,Ms)]);let s=e,c=m*u;u==10&&(c=Ms[lo(c,Ms)]);do w.push(s),s=s+m,u==10&&!is.has(s)&&(s=yn(s,is.get(m))),s>=c&&(m=s,c=m*u,u==10&&(c=Ms[lo(c,Ms)]));while(s<=r);return w}function Rk(t,n,e,r,m,d,p){let w=t.scales[t.axes[n].scale].asinh,u=r>w?hh(t,n,Xr(w,e),r,m):[w],f=r>=0&&e<=0?[0]:[];return(e<-w?hh(t,n,Xr(w,-r),-e,m):[w]).reverse().map(a=>-a).concat(f,u)}const Wm=/./,Ek=/[12357]/,Mk=/[125]/,jm=/1/,dh=(t,n,e,r)=>t.map((m,d)=>n==4&&m==0||d%r==0&&e.test(m.toExponential()[m<0?1:0])?m:null);function Ik(t,n,e,r,m){let d=t.axes[e],p=d.scale,w=t.scales[p],u=t.valToPos,f=d._space,a=u(10,p),s=u(9,p)-a>=f?Wm:u(7,p)-a>=f?Ek:u(5,p)-a>=f?Mk:jm;if(s==jm){let c=fr(u(1,p)-a);if(c<f)return dh(n.slice().reverse(),w.distr,s,ji(f/c)).reverse()}return dh(n,w.distr,s,1)}function Lk(t,n,e,r,m){let d=t.axes[e],p=d.scale,w=d._space,u=t.valToPos,f=fr(u(1,p)-u(2,p));return f<w?dh(n.slice().reverse(),3,Wm,ji(w/f)).reverse():n}function Ok(t,n,e,r){return r==null?qu:n==null?"":eh(n)}const Hm={show:!0,scale:"y",stroke:Hu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Pm,side:3,grid:ch,ticks:Nm,border:Dm,font:uh,lineGap:zm,rotate:0};function Nk(t,n){let e=3+(t||1)*2;return yn(e*n,3)}function Dk(t,n){let{scale:e,idxs:r}=t.series[0],m=t._data[0],d=t.valToPos(m[r[0]],e,!0),p=t.valToPos(m[r[1]],e,!0),w=fr(p-d),u=t.series[n],f=w/(u.points.space*nn);return r[1]-r[0]<=f}const Um={scale:null,auto:!0,sorted:0,min:vn,max:-vn},Vm=(t,n,e,r,m)=>m,qm={show:!0,auto:!0,sorted:0,gaps:Vm,alpha:1,facets:[rr({},Um,{scale:"x"}),rr({},Um,{scale:"y"})]},Gm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Vm,alpha:1,points:{show:Dk,filter:null},values:null,min:vn,max:-vn,idxs:[],path:null,clip:null};function Pk(t,n,e,r,m){return e/10}const Km={time:lA,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},zk=rr({},Km,{time:!1,ori:1}),Ym={};function Jm(t,n){let e=Ym[t];return e||(e={key:t,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(m=>m!=r)},pub(r,m,d,p,w,u,f){for(let a=0;a<e.plots.length;a++)e.plots[a]!=m&&e.plots[a].pub(r,m,d,p,w,u,f)}},t!=null&&(Ym[t]=e)),e}const pa=1,fh=2;function Is(t,n,e){const r=t.mode,m=t.series[n],d=r==2?t._data[n]:t._data,p=t.scales,w=t.bbox;let u=d[0],f=r==2?d[1]:d[n],a=r==2?p[m.facets[0].scale]:p[t.series[0].scale],s=r==2?p[m.facets[1].scale]:p[m.scale],c=w.left,h=w.top,o=w.width,l=w.height,g=t.valToPosH,b=t.valToPosV;return a.ori==0?e(m,u,f,a,s,g,b,c,h,o,l,lc,ga,uc,Qm,tv):e(m,u,f,a,s,b,g,h,c,l,o,cc,ma,mh,ev,nv)}function ph(t,n){let e=0,r=0,m=Xt(t.bands,rh);for(let d=0;d<m.length;d++){let p=m[d];p.series[0]==n?e=p.dir:p.series[1]==n&&(p.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function Fk(t,n,e,r,m){let d=t.mode,p=t.series[n],w=d==2?p.facets[1].scale:p.scale,u=t.scales[w];return m==-1?u.min:m==1?u.max:u.distr==3?u.dir==1?u.min:u.max:0}function Bo(t,n,e,r,m,d){return Is(t,n,(p,w,u,f,a,s,c,h,o,l,g)=>{let b=p.pxRound;const x=f.dir*(f.ori==0?1:-1),E=f.ori==0?ga:ma;let $,_;x==1?($=e,_=r):($=r,_=e);let C=b(s(w[$],f,l,h)),L=b(c(u[$],a,g,o)),D=b(s(w[_],f,l,h)),I=b(c(d==1?a.max:a.min,a,g,o)),M=new Path2D(m);return E(M,D,I),E(M,C,I),E(M,C,L),M})}function ac(t,n,e,r,m,d){let p=null;if(t.length>0){p=new Path2D;const w=n==0?uc:mh;let u=e;for(let s=0;s<t.length;s++){let c=t[s];if(c[1]>c[0]){let h=c[0]-u;h>0&&w(p,u,r,h,r+d),u=c[1]}}let f=e+m-u,a=10;f>0&&w(p,u,r-a/2,f,r+d+a)}return p}function Bk(t,n,e){let r=t[t.length-1];r&&r[0]==n?r[1]=e:t.push([n,e])}function gh(t,n,e,r,m,d,p){let w=[],u=t.length;for(let f=m==1?e:r;f>=e&&f<=r;f+=m)if(n[f]===null){let a=f,s=f;if(m==1)for(;++f<=r&&n[f]===null;)s=f;else for(;--f>=e&&n[f]===null;)s=f;let c=d(t[a]),h=s==a?c:d(t[s]),o=a-m;c=p<=0&&o>=0&&o<u?d(t[o]):c;let l=s+m;h=p>=0&&l>=0&&l<u?d(t[l]):h,h>=c&&w.push([c,h])}return w}function Zm(t){return t==0?cm:t==1?pr:n=>Es(n,t)}function Xm(t){let n=t==0?lc:cc,e=t==0?(m,d,p,w,u,f)=>{m.arcTo(d,p,w,u,f)}:(m,d,p,w,u,f)=>{m.arcTo(p,d,u,w,f)},r=t==0?(m,d,p,w,u)=>{m.rect(d,p,w,u)}:(m,d,p,w,u)=>{m.rect(p,d,u,w)};return(m,d,p,w,u,f=0,a=0)=>{f==0&&a==0?r(m,d,p,w,u):(f=co(f,w/2,u/2),a=co(a,w/2,u/2),n(m,d+f,p),e(m,d+w,p,d+w,p+u,f),e(m,d+w,p+u,d,p+u,a),e(m,d,p+u,d,p,a),e(m,d,p,d+w,p,f),m.closePath())}}const lc=(t,n,e)=>{t.moveTo(n,e)},cc=(t,n,e)=>{t.moveTo(e,n)},ga=(t,n,e)=>{t.lineTo(n,e)},ma=(t,n,e)=>{t.lineTo(e,n)},uc=Xm(0),mh=Xm(1),Qm=(t,n,e,r,m,d)=>{t.arc(n,e,r,m,d)},ev=(t,n,e,r,m,d)=>{t.arc(e,n,r,m,d)},tv=(t,n,e,r,m,d,p)=>{t.bezierCurveTo(n,e,r,m,d,p)},nv=(t,n,e,r,m,d,p)=>{t.bezierCurveTo(e,n,m,r,p,d)};function rv(t){return(n,e,r,m,d)=>Is(n,e,(p,w,u,f,a,s,c,h,o,l,g)=>{let{pxRound:b,points:x}=p,E,$;f.ori==0?(E=lc,$=Qm):(E=cc,$=ev);const _=yn(x.width*nn,3);let C=(x.size-x.width)/2*nn,L=yn(C*2,3),D=new Path2D,I=new Path2D,{left:M,top:W,width:z,height:O}=n.bbox;uc(I,M-L,W-L,z+L*2,O+L*2);const T=A=>{if(u[A]!=null){let N=b(s(w[A],f,l,h)),B=b(c(u[A],a,g,o));E(D,N+C,B),$(D,N,B,C,0,tc*2)}};if(d)d.forEach(T);else for(let A=r;A<=m;A++)T(A);return{stroke:_>0?D:null,fill:D,clip:I,flags:pa|fh}})}function iv(t){return(n,e,r,m,d,p)=>{r!=m&&(d!=r&&p!=r&&t(n,e,r),d!=m&&p!=m&&t(n,e,m),t(n,e,p))}}const Wk=iv(ga),jk=iv(ma);function ov(t){const n=Xt(t?.alignGaps,0);return(e,r,m,d)=>Is(e,r,(p,w,u,f,a,s,c,h,o,l,g)=>{[m,d]=Xl(u,m,d);let b=p.pxRound,x=z=>b(s(z,f,l,h)),E=z=>b(c(z,a,g,o)),$,_;f.ori==0?($=ga,_=Wk):($=ma,_=jk);const C=f.dir*(f.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pa},D=L.stroke;let I=!1;if(d-m>=l*4){let z=le=>e.posToVal(le,f.key,!0),O=null,T=null,A,N,B,U=x(w[C==1?m:d]),G=x(w[m]),J=x(w[d]),Q=z(C==1?G+1:J-1);for(let le=C==1?m:d;le>=m&&le<=d;le+=C){let re=w[le],ce=(C==1?re<Q:re>Q)?U:x(re),de=u[le];ce==U?de!=null?(N=de,O==null?($(D,ce,E(N)),A=O=T=N):N<O?O=N:N>T&&(T=N)):de===null&&(I=!0):(O!=null&&_(D,U,E(O),E(T),E(A),E(N)),de!=null?(N=de,$(D,ce,E(N)),O=T=A=N):(O=T=null,de===null&&(I=!0)),U=ce,Q=z(U+C))}O!=null&&O!=T&&B!=U&&_(D,U,E(O),E(T),E(A),E(N))}else for(let z=C==1?m:d;z>=m&&z<=d;z+=C){let O=u[z];O===null?I=!0:O!=null&&$(D,x(w[z]),E(O))}let[M,W]=ph(e,r);if(p.fill!=null||M!=0){let z=L.fill=new Path2D(D),O=p.fillTo(e,r,p.min,p.max,M),T=E(O),A=x(w[m]),N=x(w[d]);C==-1&&([N,A]=[A,N]),$(z,N,T),$(z,A,T)}if(!p.spanGaps){let z=[];I&&z.push(...gh(w,u,m,d,C,x,n)),L.gaps=z=p.gaps(e,r,m,d,z),L.clip=ac(z,f.ori,h,o,l,g)}return W!=0&&(L.band=W==2?[Bo(e,r,m,d,D,-1),Bo(e,r,m,d,D,1)]:Bo(e,r,m,d,D,W)),L})}function Hk(t){const n=Xt(t.align,1),e=Xt(t.ascDesc,!1),r=Xt(t.alignGaps,0),m=Xt(t.extend,!1);return(d,p,w,u)=>Is(d,p,(f,a,s,c,h,o,l,g,b,x,E)=>{[w,u]=Xl(s,w,u);let $=f.pxRound,{left:_,width:C}=d.bbox,L=J=>$(o(J,c,x,g)),D=J=>$(l(J,h,E,b)),I=c.ori==0?ga:ma;const M={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pa},W=M.stroke,z=c.dir*(c.ori==0?1:-1);let O=D(s[z==1?w:u]),T=L(a[z==1?w:u]),A=T,N=T;m&&n==-1&&(N=_,I(W,N,O)),I(W,T,O);for(let J=z==1?w:u;J>=w&&J<=u;J+=z){let Q=s[J];if(Q==null)continue;let le=L(a[J]),re=D(Q);n==1?I(W,le,O):I(W,A,re),I(W,le,re),O=re,A=le}let B=A;m&&n==1&&(B=_+C,I(W,B,O));let[U,G]=ph(d,p);if(f.fill!=null||U!=0){let J=M.fill=new Path2D(W),Q=f.fillTo(d,p,f.min,f.max,U),le=D(Q);I(J,B,le),I(J,N,le)}if(!f.spanGaps){let J=[];J.push(...gh(a,s,w,u,z,L,r));let Q=f.width*nn/2,le=e||n==1?Q:-Q,re=e||n==-1?-Q:Q;J.forEach(ce=>{ce[0]+=le,ce[1]+=re}),M.gaps=J=f.gaps(d,p,w,u,J),M.clip=ac(J,c.ori,g,b,x,E)}return G!=0&&(M.band=G==2?[Bo(d,p,w,u,W,-1),Bo(d,p,w,u,W,1)]:Bo(d,p,w,u,W,G)),M})}function sv(t,n,e,r,m,d,p=vn){if(t.length>1){let w=null;for(let u=0,f=1/0;u<t.length;u++)if(n[u]!==void 0){if(w!=null){let a=fr(t[u]-t[w]);a<f&&(f=a,p=fr(e(t[u],r,m,d)-e(t[w],r,m,d)))}w=u}}return p}function Uk(t){t=t||tl;const n=Xt(t.size,[.6,vn,1]),e=t.align||0,r=t.gap||0;let m=t.radius;m=m==null?[0,0]:typeof m=="number"?[m,0]:m;const d=Wt(m),p=1-n[0],w=Xt(n[1],vn),u=Xt(n[2],1),f=Xt(t.disp,tl),a=Xt(t.each,h=>{}),{fill:s,stroke:c}=f;return(h,o,l,g)=>Is(h,o,(b,x,E,$,_,C,L,D,I,M,W)=>{let z=b.pxRound,O=e,T=r*nn,A=w*nn,N=u*nn,B,U;$.ori==0?[B,U]=d(h,o):[U,B]=d(h,o);const G=$.dir*($.ori==0?1:-1);let J=$.ori==0?uc:mh,Q=$.ori==0?a:(Ye,It,kn,Pn,Hn,zn,gn)=>{a(Ye,It,kn,Hn,Pn,gn,zn)},le=Xt(h.bands,rh).find(Ye=>Ye.series[0]==o),re=le!=null?le.dir:0,ce=b.fillTo(h,o,b.min,b.max,re),de=z(L(ce,_,W,I)),ie,fe,$e,Re=M,Ee=z(b.width*nn),Ue=!1,He=null,Ge=null,ct=null,We=null;s!=null&&(Ee==0||c!=null)&&(Ue=!0,He=s.values(h,o,l,g),Ge=new Map,new Set(He).forEach(Ye=>{Ye!=null&&Ge.set(Ye,new Path2D)}),Ee>0&&(ct=c.values(h,o,l,g),We=new Map,new Set(ct).forEach(Ye=>{Ye!=null&&We.set(Ye,new Path2D)})));let{x0:Me,size:$t}=f;if(Me!=null&&$t!=null){O=1,x=Me.values(h,o,l,g),Me.unit==2&&(x=x.map(It=>h.posToVal(D+It*M,$.key,!0)));let Ye=$t.values(h,o,l,g);$t.unit==2?fe=Ye[0]*M:fe=C(Ye[0],$,M,D)-C(0,$,M,D),Re=sv(x,E,C,$,M,D,Re),$e=Re-fe+T}else Re=sv(x,E,C,$,M,D,Re),$e=Re*p+T,fe=Re-$e;$e<1&&($e=0),Ee>=fe/2&&(Ee=0),$e<5&&(z=cm);let lt=$e>0,Jt=Re-$e-(lt?Ee:0);fe=z(nh(Jt,N,A)),ie=(O==0?fe/2:O==G?0:fe)-O*G*((O==0?T/2:0)+(lt?Ee/2:0));const hn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Zn=Ue?null:new Path2D;let Nt=null;if(le!=null)Nt=h.data[le.series[1]];else{let{y0:Ye,y1:It}=f;Ye!=null&&It!=null&&(E=It.values(h,o,l,g),Nt=Ye.values(h,o,l,g))}let An=B*fe,gt=U*fe;for(let Ye=G==1?l:g;Ye>=l&&Ye<=g;Ye+=G){let It=E[Ye];if(It==null)continue;if(Nt!=null){let Qt=Nt[Ye]??0;if(It-Qt==0)continue;de=L(Qt,_,W,I)}let kn=$.distr!=2||f!=null?x[Ye]:Ye,Pn=C(kn,$,M,D),Hn=L(Xt(It,ce),_,W,I),zn=z(Pn-ie),gn=z(Xr(Hn,de)),Rn=z(co(Hn,de)),Xn=gn-Rn;if(It!=null){let Qt=It<0?gt:An,Un=It<0?An:gt;Ue?(Ee>0&&ct[Ye]!=null&&J(We.get(ct[Ye]),zn,Rn+Si(Ee/2),fe,Xr(0,Xn-Ee),Qt,Un),He[Ye]!=null&&J(Ge.get(He[Ye]),zn,Rn+Si(Ee/2),fe,Xr(0,Xn-Ee),Qt,Un)):J(Zn,zn,Rn+Si(Ee/2),fe,Xr(0,Xn-Ee),Qt,Un),Q(h,o,Ye,zn-Ee/2,Rn,fe+Ee,Xn)}}return Ee>0?hn.stroke=Ue?We:Zn:Ue||(hn._fill=b.width==0?b._fill:b._stroke??b._fill,hn.width=0),hn.fill=Ue?Ge:Zn,hn})}function Vk(t,n){const e=Xt(n?.alignGaps,0);return(r,m,d,p)=>Is(r,m,(w,u,f,a,s,c,h,o,l,g,b)=>{[d,p]=Xl(f,d,p);let x=w.pxRound,E=B=>x(c(B,a,g,o)),$=B=>x(h(B,s,b,l)),_,C,L;a.ori==0?(_=lc,L=ga,C=tv):(_=cc,L=ma,C=nv);const D=a.dir*(a.ori==0?1:-1);let I=E(u[D==1?d:p]),M=I,W=[],z=[];for(let B=D==1?d:p;B>=d&&B<=p;B+=D)if(f[B]!=null){let U=u[B],G=E(U);W.push(M=G),z.push($(f[B]))}const O={stroke:t(W,z,_,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:pa},T=O.stroke;let[A,N]=ph(r,m);if(w.fill!=null||A!=0){let B=O.fill=new Path2D(T),U=w.fillTo(r,m,w.min,w.max,A),G=$(U);L(B,M,G),L(B,I,G)}if(!w.spanGaps){let B=[];B.push(...gh(u,f,d,p,D,E,e)),O.gaps=B=w.gaps(r,m,d,p,B),O.clip=ac(B,a.ori,o,l,g,b)}return N!=0&&(O.band=N==2?[Bo(r,m,d,p,T,-1),Bo(r,m,d,p,T,1)]:Bo(r,m,d,p,T,N)),O})}function qk(t){return Vk(Gk,t)}function Gk(t,n,e,r,m,d){const p=t.length;if(p<2)return null;const w=new Path2D;if(e(w,t[0],n[0]),p==2)r(w,t[1],n[1]);else{let u=Array(p),f=Array(p-1),a=Array(p-1),s=Array(p-1);for(let c=0;c<p-1;c++)a[c]=n[c+1]-n[c],s[c]=t[c+1]-t[c],f[c]=a[c]/s[c];u[0]=f[0];for(let c=1;c<p-1;c++)f[c]===0||f[c-1]===0||f[c-1]>0!=f[c]>0?u[c]=0:(u[c]=3*(s[c-1]+s[c])/((2*s[c]+s[c-1])/f[c-1]+(s[c]+2*s[c-1])/f[c]),isFinite(u[c])||(u[c]=0));u[p-1]=f[p-2];for(let c=0;c<p-1;c++)m(w,t[c]+s[c]/3,n[c]+u[c]*s[c]/3,t[c+1]-s[c]/3,n[c+1]-u[c+1]*s[c]/3,t[c+1],n[c+1])}return w}const vh=new Set;function av(){for(let t of vh)t.syncRect(!0)}la&&(Ts($A,ca,av),Ts(TA,ca,av,!0),Ts(Jl,ca,()=>{zr.pxRatio=nn}));const Kk=ov(),Yk=rv();function lv(t,n,e,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((m,d)=>yh(m,d,n,e))}function Jk(t,n){return t.map((e,r)=>r==0?{}:rr({},n,e))}function yh(t,n,e,r){return rr({},n==0?e:r,t)}function cv(t,n,e){return n==null?ha:[n,e]}const Zk=cv;function Xk(t,n,e){return n==null?ha:ec(n,e,Qu,!0)}function uv(t,n,e,r){return n==null?ha:Ql(n,e,t.scales[r].log,!1)}const Qk=uv;function hv(t,n,e,r){return n==null?ha:Xu(n,e,t.scales[r].log,!1)}const eS=hv;function tS(t,n,e,r,m){let d=Xr(am(t),am(n)),p=n-t,w=lo(m/r*p,e);do{let u=e[w],f=r*u/p;if(f>=m&&d+(u<5?is.get(u):0)<=17)return[u,f]}while(++w<e.length);return[0,0]}function dv(t){let n,e;return t=t.replace(/(\d+)px/,(r,m)=>(n=pr((e=+m)*nn))+"px"),[t,n,e]}function nS(t){t.show&&[t.font,t.labelFont].forEach(n=>{let e=yn(n[2]*nn,1);n[0]=n[0].replace(/[0-9.]+px/,e+"px"),n[1]=e})}function zr(t,n,e){const r={mode:Xt(t.mode,1)},m=r.mode;function d(V,Z,se,ae){let ge=Z.valToPct(V);return ae+se*(Z.dir==-1?1-ge:ge)}function p(V,Z,se,ae){let ge=Z.valToPct(V);return ae+se*(Z.dir==-1?ge:1-ge)}function w(V,Z,se,ae){return Z.ori==0?d(V,Z,se,ae):p(V,Z,se,ae)}r.valToPosH=d,r.valToPosV=p;let u=!1;r.status=0;const f=r.root=Wi(cA);if(t.id!=null&&(f.id=t.id),Ai(f,t.class),t.title){let V=Wi(dA,f);V.textContent=t.title}const a=ao("canvas"),s=r.ctx=a.getContext("2d"),c=Wi(fA,f);Ts("click",c,V=>{V.target===o&&(dt!=Yi||jt!=Io)&&qn.click(r,V)},!0);const h=r.under=Wi(pA,c);c.appendChild(a);const o=r.over=Wi(gA,c);t=da(t);const l=+Xt(t.pxAlign,1),g=Zm(l);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const b=t.ms||.001,x=r.series=m==1?lv(t.series||[],Bm,Gm,!1):Jk(t.series||[null],qm),E=r.axes=lv(t.axes||[],Fm,Hm,!0),$=r.scales={},_=r.bands=t.bands||[];_.forEach(V=>{V.fill=Wt(V.fill||null),V.dir=Xt(V.dir,-1)});const C=m==2?x[1].facets[0].scale:x[0].scale,L={axes:Hr,series:jo},D=(t.drawOrder||["axes","series"]).map(V=>L[V]);function I(V){const Z=V.distr==3?se=>Fo(se>0?se:V.clamp(r,se,V.min,V.max,V.key)):V.distr==4?se=>th(se,V.asinh):V.distr==100?se=>V.fwd(se):se=>se;return se=>{let ae=Z(se),{_min:ge,_max:_e}=V,Ie=_e-ge;return(ae-ge)/Ie}}function M(V){let Z=$[V];if(Z==null){let se=(t.scales||tl)[V]||tl;if(se.from!=null){M(se.from);let ae=rr({},$[se.from],se,{key:V});ae.valToPct=I(ae),$[V]=ae}else{Z=$[V]=rr({},V==C?Km:zk,se),Z.key=V;let ae=Z.time,ge=Z.range,_e=os(ge);if((V!=C||m==2&&!ae)&&(_e&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?rm:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?rm:{mode:1,hard:ge[1],soft:ge[1]}},_e=!1),!_e&&rc(ge))){let Ie=ge;ge=(Be,Ve,Ke)=>Ve==null?ha:ec(Ve,Ke,Ie)}Z.range=Wt(ge||(ae?Zk:V==C?Z.distr==3?Qk:Z.distr==4?eS:cv:Z.distr==3?uv:Z.distr==4?hv:Xk)),Z.auto=Wt(_e?!1:Z.auto),Z.clamp=Wt(Z.clamp||Pk),Z._min=Z._max=null,Z.valToPct=I(Z)}}}M("x"),M("y"),m==1&&x.forEach(V=>{M(V.scale)}),E.forEach(V=>{M(V.scale)});for(let V in t.scales)M(V);const W=$[C],z=W.distr;let O,T;W.ori==0?(Ai(f,uA),O=d,T=p):(Ai(f,hA),O=p,T=d);const A={};for(let V in $){let Z=$[V];(Z.min!=null||Z.max!=null)&&(A[V]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const N=t.tzDate||(V=>new Date(pr(V/b))),B=t.fmtDate||ih,U=b==1?uk(N):fk(N),G=Mm(N,Em(b==1?ck:dk,B)),J=Lm(N,Im(gk,B)),Q=[],le=r.legend=rr({},yk,t.legend),re=r.cursor=rr({},Ak,{drag:{y:m==2}},t.cursor),ce=le.show,de=re.show,ie=le.markers;le.idxs=Q,ie.width=Wt(ie.width),ie.dash=Wt(ie.dash),ie.stroke=Wt(ie.stroke),ie.fill=Wt(ie.fill);let fe,$e,Re,Ee=[],Ue=[],He,Ge=!1,ct={};if(le.live){const V=x[1]?x[1].values:null;Ge=V!=null,He=Ge?V(r,1,0):{_:0};for(let Z in He)ct[Z]=qu}if(ce)if(fe=ao("table",xA,f),Re=ao("tbody",null,fe),le.mount(r,fe),Ge){$e=ao("thead",null,fe,Re);let V=ao("tr",null,$e);ao("th",null,V);for(var We in He)ao("th",Wg,V).textContent=We}else Ai(fe,_A),le.live&&Ai(fe,CA);const Me={show:!0},$t={show:!1};function lt(V,Z){if(Z==0&&(Ge||!le.live||m==2))return ha;let se=[],ae=ao("tr",AA,Re,Re.childNodes[Z]);Ai(ae,V.class),V.show||Ai(ae,$s);let ge=ao("th",null,ae);if(ie.show){let Be=Wi(kA,ge);if(Z>0){let Ve=ie.width(r,Z);Ve&&(Be.style.border=Ve+"px "+ie.dash(r,Z)+" "+ie.stroke(r,Z)),Be.style.background=ie.fill(r,Z)}}let _e=Wi(Wg,ge);V.label instanceof HTMLElement?_e.appendChild(V.label):_e.textContent=V.label,Z>0&&(ie.show||(_e.style.color=V.width>0?ie.stroke(r,Z):ie.fill(r,Z)),hn("click",ge,Be=>{if(re._lock)return;ni(Be);let Ve=x.indexOf(V);if((Be.ctrlKey||Be.metaKey)!=le.isolate){let Ke=x.some((tt,st)=>st>0&&st!=Ve&&tt.show);x.forEach((tt,st)=>{st>0&&cr(st,Ke?st==Ve?Me:$t:Me,!0,At.setSeries)})}else cr(Ve,{show:!V.show},!0,At.setSeries)},!1),jr&&hn(Vg,ge,Be=>{re._lock||(ni(Be),cr(x.indexOf(V),Xi,!0,At.setSeries))},!1));for(var Ie in He){let Be=ao("td",SA,ae);Be.textContent="--",se.push(Be)}return[ae,se]}const Jt=new Map;function hn(V,Z,se,ae=!0){const ge=Jt.get(Z)||{},_e=re.bind[V](r,Z,se,ae);_e&&(Ts(V,Z,ge[V]=_e),Jt.set(Z,ge))}function Zn(V,Z,se){const ae=Jt.get(Z)||{};for(let ge in ae)(V==null||ge==V)&&(Zu(ge,Z,ae[ge]),delete ae[ge]);V==null&&Jt.delete(Z)}let Nt=0,An=0,gt=0,Ye=0,It=0,kn=0,Pn=It,Hn=kn,zn=gt,gn=Ye,Rn=0,Xn=0,Qt=0,Un=0;r.bbox={};let $i=!1,ti=!1,sr=!1,Vn=!1,Ti=!1,gr=!1;function Hi(V,Z,se){(se||V!=r.width||Z!=r.height)&&Ri(V,Z),lr(!1),sr=!0,ti=!0,Mo()}function Ri(V,Z){r.width=Nt=gt=V,r.height=An=Ye=Z,It=kn=0,Rr(),hi();let se=r.bbox;Rn=se.left=Es(It*nn,.5),Xn=se.top=Es(kn*nn,.5),Qt=se.width=Es(gt*nn,.5),Un=se.height=Es(Ye*nn,.5)}const ls=3;function xr(){let V=!1,Z=0;for(;!V;){Z++;let se=Ut(Z),ae=Kt(Z);V=Z==ls||se&&ae,V||(Ri(r.width,r.height),ti=!0)}}function So({width:V,height:Z}){Hi(V,Z)}r.setSize=So;function Rr(){let V=!1,Z=!1,se=!1,ae=!1;E.forEach((ge,_e)=>{if(ge.show&&ge._show){let{side:Ie,_size:Be}=ge,Ve=Ie%2,Ke=ge.label!=null?ge.labelSize:0,tt=Be+Ke;tt>0&&(Ve?(gt-=tt,Ie==3?(It+=tt,ae=!0):se=!0):(Ye-=tt,Ie==0?(kn+=tt,V=!0):Z=!0))}}),Cr[0]=V,Cr[1]=se,Cr[2]=Z,Cr[3]=ae,gt-=mr[1]+mr[3],It+=mr[3],Ye-=mr[2]+mr[0],kn+=mr[0]}function hi(){let V=It+gt,Z=kn+Ye,se=It,ae=kn;function ge(_e,Ie){switch(_e){case 1:return V+=Ie,V-Ie;case 2:return Z+=Ie,Z-Ie;case 3:return se-=Ie,se+Ie;case 0:return ae-=Ie,ae+Ie}}E.forEach((_e,Ie)=>{if(_e.show&&_e._show){let Be=_e.side;_e._pos=ge(Be,_e._size),_e.label!=null&&(_e._lpos=ge(Be,_e.labelSize))}})}if(re.dataIdx==null){let V=re.hover,Z=V.skip=new Set(V.skip??[]);Z.add(void 0);let se=V.prox=Wt(V.prox),ae=V.bias??=0;re.dataIdx=(ge,_e,Ie,Be)=>{if(_e==0)return Ie;let Ve=Ie,Ke=se(ge,_e,Ie,Be)??vn,tt=Ke>=0&&Ke<vn,st=W.ori==0?gt:Ye,_t=re.left,Zt=n[0],Pt=n[_e];if(Z.has(Pt[Ie])){Ve=null;let xt=null,vt=null,ht;if(ae==0||ae==-1)for(ht=Ie;xt==null&&ht-- >0;)Z.has(Pt[ht])||(xt=ht);if(ae==0||ae==1)for(ht=Ie;vt==null&&ht++<Pt.length;)Z.has(Pt[ht])||(vt=ht);if(xt!=null||vt!=null)if(tt){let bn=xt==null?-1/0:O(Zt[xt],W,st,0),Nn=vt==null?1/0:O(Zt[vt],W,st,0),hr=_t-bn,an=Nn-_t;hr<=an?hr<=Ke&&(Ve=xt):an<=Ke&&(Ve=vt)}else Ve=vt==null?xt:xt==null?vt:Ie-xt<=vt-Ie?xt:vt}else tt&&fr(_t-O(Zt[Ie],W,st,0))>Ke&&(Ve=null);return Ve}}const ni=V=>{re.event=V};re.idxs=Q,re._lock=!1;let Sn=re.points;Sn.show=Wt(Sn.show),Sn.size=Wt(Sn.size),Sn.stroke=Wt(Sn.stroke),Sn.width=Wt(Sn.width),Sn.fill=Wt(Sn.fill);const Wr=r.focus=rr({},t.focus||{alpha:.3},re.focus),jr=Wr.prox>=0,$n=jr&&Sn.one;let Qn=[],di=[],Ei=[];function Mi(V,Z){let se=Sn.show(r,Z);if(se instanceof HTMLElement)return Ai(se,wA),Ai(se,V.class),_o(se,-10,-10,gt,Ye),o.insertBefore(se,Qn[Z]),se}function cs(V,Z){if(m==1||Z>0){let se=m==1&&$[V.scale].time,ae=V.value;V.value=se?mm(ae)?Lm(N,Im(ae,B)):ae||J:ae||Ok,V.label=V.label||(se?Sk:kk)}if($n||Z>0){V.width=V.width==null?1:V.width,V.paths=V.paths||Kk||zA,V.fillTo=Wt(V.fillTo||Fk),V.pxAlign=+Xt(V.pxAlign,l),V.pxRound=Zm(V.pxAlign),V.stroke=Wt(V.stroke||null),V.fill=Wt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let se=Nk(Xr(1,V.width),1),ae=V.points=rr({},{size:se,width:Xr(1,se*.2),stroke:V.stroke,space:se*2,paths:Yk,_stroke:null,_fill:null},V.points);ae.show=Wt(ae.show),ae.filter=Wt(ae.filter),ae.fill=Wt(ae.fill),ae.stroke=Wt(ae.stroke),ae.paths=Wt(ae.paths),ae.pxAlign=V.pxAlign}if(ce){let se=lt(V,Z);Ee.splice(Z,0,se[0]),Ue.splice(Z,0,se[1]),le.values.push(null)}if(de){Q.splice(Z,0,null);let se=null;$n?Z==0&&(se=Mi(V,Z)):Z>0&&(se=Mi(V,Z)),Qn.splice(Z,0,se),di.splice(Z,0,0),Ei.splice(Z,0,0)}at("addSeries",Z)}function zs(V,Z){Z=Z??x.length,V=m==1?yh(V,Z,Bm,Gm):yh(V,Z,{},qm),x.splice(Z,0,V),cs(x[Z],Z)}r.addSeries=zs;function dn(V){if(x.splice(V,1),ce){le.values.splice(V,1),Ue.splice(V,1);let Z=Ee.splice(V,1)[0];Zn(null,Z.firstChild),Z.remove()}de&&(Q.splice(V,1),Qn.splice(V,1)[0].remove(),di.splice(V,1),Ei.splice(V,1)),at("delSeries",V)}r.delSeries=dn;const Cr=[!1,!1,!1,!1];function fi(V,Z){if(V._show=V.show,V.show){let se=V.side%2,ae=$[V.scale];ae==null&&(V.scale=se?x[1].scale:C,ae=$[V.scale]);let ge=ae.time;V.size=Wt(V.size),V.space=Wt(V.space),V.rotate=Wt(V.rotate),os(V.incrs)&&V.incrs.forEach(Ie=>{!is.has(Ie)&&is.set(Ie,pm(Ie))}),V.incrs=Wt(V.incrs||(ae.distr==2?sk:ge?b==1?lk:hk:Ms)),V.splits=Wt(V.splits||(ge&&ae.distr==1?U:ae.distr==3?hh:ae.distr==4?Rk:Tk)),V.stroke=Wt(V.stroke),V.grid.stroke=Wt(V.grid.stroke),V.ticks.stroke=Wt(V.ticks.stroke),V.border.stroke=Wt(V.border.stroke);let _e=V.values;V.values=os(_e)&&!os(_e[0])?Wt(_e):ge?os(_e)?Mm(N,Em(_e,B)):mm(_e)?pk(N,_e):_e||G:_e||$k,V.filter=Wt(V.filter||(ae.distr>=3&&ae.log==10?Ik:ae.distr==3&&ae.log==2?Lk:um)),V.font=dv(V.font),V.labelFont=dv(V.labelFont),V._size=V.size(r,null,Z,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Cr[Z]=!0,V._el=Wi(mA,c))}}function Lt(V,Z,se,ae){let[ge,_e,Ie,Be]=se,Ve=Z%2,Ke=0;return Ve==0&&(Be||_e)&&(Ke=Z==0&&!ge||Z==2&&!Ie?pr(Fm.size/3):0),Ve==1&&(ge||Ie)&&(Ke=Z==1&&!_e||Z==3&&!Be?pr(Hm.size/2):0),Ke}const $o=r.padding=(t.padding||[Lt,Lt,Lt,Lt]).map(V=>Wt(Xt(V,Lt))),mr=r._padding=$o.map((V,Z)=>V(r,Z,Cr,0));let En,mn=null,Mn=null;const ho=m==1?x[0].idxs:null;let er=null,Er=!1;function pi(V,Z){if(n=V??[],r.data=r._data=n,m==2){En=0;for(let se=1;se<x.length;se++)En+=n[se][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),er=n[0],En=er.length;let se=n;if(z==2){se=n.slice();let ae=se[0]=Array(En);for(let ge=0;ge<En;ge++)ae[ge]=ge}r._data=n=se}if(lr(!0),at("setData"),z==2&&(sr=!0),Z!==!1){let se=W;se.auto(r,Er)?ri():Vr(C,se.min,se.max),Vn=Vn||re.left>=0,gr=!0,Mo()}}r.setData=pi;function ri(){Er=!0;let V,Z;m==1&&(En>0?(mn=ho[0]=0,Mn=ho[1]=En-1,V=n[0][mn],Z=n[0][Mn],z==2?(V=mn,Z=Mn):V==Z&&(z==3?[V,Z]=Ql(V,V,W.log,!1):z==4?[V,Z]=Xu(V,V,W.log,!1):W.time?Z=V+pr(86400/b):[V,Z]=ec(V,Z,Qu,!0))):(mn=ho[0]=V=null,Mn=ho[1]=Z=null)),Vr(C,V,Z)}let Ui,ii,Vi,fo,ar,qi,Gi,gi,Ii,fn;function Wo(V,Z,se,ae,ge,_e){V??=Hg,se??=rh,ae??="butt",ge??=Hg,_e??="round",V!=Ui&&(s.strokeStyle=Ui=V),ge!=ii&&(s.fillStyle=ii=ge),Z!=Vi&&(s.lineWidth=Vi=Z),_e!=ar&&(s.lineJoin=ar=_e),ae!=qi&&(s.lineCap=qi=ae),se!=fo&&s.setLineDash(fo=se)}function To(V,Z,se,ae){Z!=ii&&(s.fillStyle=ii=Z),V!=Gi&&(s.font=Gi=V),se!=gi&&(s.textAlign=gi=se),ae!=Ii&&(s.textBaseline=Ii=ae)}function Li(V,Z,se,ae,ge=0){if(ae.length>0&&V.auto(r,Er)&&(Z==null||Z.min==null)){let _e=Xt(mn,0),Ie=Xt(Mn,ae.length-1),Be=se.min==null?IA(ae,_e,Ie,ge,V.distr==3):[se.min,se.max];V.min=co(V.min,se.min=Be[0]),V.max=Xr(V.max,se.max=Be[1])}}const Ro={min:null,max:null};function Eo(){for(let ae in $){let ge=$[ae];A[ae]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,Er))&&(A[ae]=Ro)}for(let ae in $){let ge=$[ae];A[ae]==null&&ge.from!=null&&A[ge.from]!=null&&(A[ae]=Ro)}A[C]!=null&&lr(!0);let V={};for(let ae in A){let ge=A[ae];if(ge!=null){let _e=V[ae]=da($[ae],WA);if(ge.min!=null)rr(_e,ge);else if(ae!=C||m==2)if(En==0&&_e.from==null){let Ie=_e.range(r,null,null,ae);_e.min=Ie[0],_e.max=Ie[1]}else _e.min=vn,_e.max=-vn}}if(En>0){x.forEach((ae,ge)=>{if(m==1){let _e=ae.scale,Ie=A[_e];if(Ie==null)return;let Be=V[_e];if(ge==0){let Ve=Be.range(r,Be.min,Be.max,_e);Be.min=Ve[0],Be.max=Ve[1],mn=lo(Be.min,n[0]),Mn=lo(Be.max,n[0]),Mn-mn>1&&(n[0][mn]<Be.min&&mn++,n[0][Mn]>Be.max&&Mn--),ae.min=er[mn],ae.max=er[Mn]}else ae.show&&ae.auto&&Li(Be,Ie,ae,n[ge],ae.sorted);ae.idxs[0]=mn,ae.idxs[1]=Mn}else if(ge>0&&ae.show&&ae.auto){let[_e,Ie]=ae.facets,Be=_e.scale,Ve=Ie.scale,[Ke,tt]=n[ge],st=V[Be],_t=V[Ve];st!=null&&Li(st,A[Be],_e,Ke,_e.sorted),_t!=null&&Li(_t,A[Ve],Ie,tt,Ie.sorted),ae.min=Ie.min,ae.max=Ie.max}});for(let ae in V){let ge=V[ae],_e=A[ae];if(ge.from==null&&(_e==null||_e.min==null)){let Ie=ge.range(r,ge.min==vn?null:ge.min,ge.max==-vn?null:ge.max,ae);ge.min=Ie[0],ge.max=Ie[1]}}}for(let ae in V){let ge=V[ae];if(ge.from!=null){let _e=V[ge.from];if(_e.min==null)ge.min=ge.max=null;else{let Ie=ge.range(r,_e.min,_e.max,ae);ge.min=Ie[0],ge.max=Ie[1]}}}let Z={},se=!1;for(let ae in V){let ge=V[ae],_e=$[ae];if(_e.min!=ge.min||_e.max!=ge.max){_e.min=ge.min,_e.max=ge.max;let Ie=_e.distr;_e._min=Ie==3?Fo(_e.min):Ie==4?th(_e.min,_e.asinh):Ie==100?_e.fwd(_e.min):_e.min,_e._max=Ie==3?Fo(_e.max):Ie==4?th(_e.max,_e.asinh):Ie==100?_e.fwd(_e.max):_e.max,Z[ae]=se=!0}}if(se){x.forEach((ae,ge)=>{m==2?ge>0&&Z.y&&(ae._paths=null):Z[ae.scale]&&(ae._paths=null)});for(let ae in Z)sr=!0,at("setScale",ae);de&&re.left>=0&&(Vn=gr=!0)}for(let ae in A)A[ae]=null}function Ki(V){let Z=nh(mn-1,0,En-1),se=nh(Mn+1,0,En-1);for(;V[Z]==null&&Z>0;)Z--;for(;V[se]==null&&se<En-1;)se++;return[Z,se]}function jo(){if(En>0){let V=x.some(Z=>Z._focus)&&fn!=Wr.alpha;V&&(s.globalAlpha=fn=Wr.alpha),x.forEach((Z,se)=>{if(se>0&&Z.show&&(Ho(se,!1),Ho(se,!0),Z._paths==null)){let ae=fn;fn!=Z.alpha&&(s.globalAlpha=fn=Z.alpha);let ge=m==2?[0,n[se][0].length-1]:Ki(n[se]);Z._paths=Z.paths(r,se,ge[0],ge[1]),fn!=ae&&(s.globalAlpha=fn=ae)}}),x.forEach((Z,se)=>{if(se>0&&Z.show){let ae=fn;fn!=Z.alpha&&(s.globalAlpha=fn=Z.alpha),Z._paths!=null&&po(se,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,_e=Z.points.show(r,se,mn,Mn,ge),Ie=Z.points.filter(r,se,_e,ge);(_e||Ie)&&(Z.points._paths=Z.points.paths(r,se,mn,Mn,Ie),po(se,!0))}fn!=ae&&(s.globalAlpha=fn=ae),at("drawSeries",se)}}),V&&(s.globalAlpha=fn=1)}}function Ho(V,Z){let se=Z?x[V].points:x[V];se._stroke=se.stroke(r,V),se._fill=se.fill(r,V)}function po(V,Z){let se=Z?x[V].points:x[V],{stroke:ae,fill:ge,clip:_e,flags:Ie,_stroke:Be=se._stroke,_fill:Ve=se._fill,_width:Ke=se.width}=se._paths;Ke=yn(Ke*nn,3);let tt=null,st=Ke%2/2;Z&&Ve==null&&(Ve=Ke>0?"#fff":Be);let _t=se.pxAlign==1&&st>0;if(_t&&s.translate(st,st),!Z){let Zt=Rn-Ke/2,Pt=Xn-Ke/2,xt=Qt+Ke,vt=Un+Ke;tt=new Path2D,tt.rect(Zt,Pt,xt,vt)}Z?ne(Be,Ke,se.dash,se.cap,Ve,ae,ge,Ie,_e):go(V,Be,Ke,se.dash,se.cap,Ve,ae,ge,Ie,tt,_e),_t&&s.translate(-st,-st)}function go(V,Z,se,ae,ge,_e,Ie,Be,Ve,Ke,tt){let st=!1;Ve!=0&&_.forEach((_t,Zt)=>{if(_t.series[0]==V){let Pt=x[_t.series[1]],xt=n[_t.series[1]],vt=(Pt._paths||tl).band;os(vt)&&(vt=_t.dir==1?vt[0]:vt[1]);let ht,bn=null;Pt.show&&vt&&OA(xt,mn,Mn)?(bn=_t.fill(r,Zt)||_e,ht=Pt._paths.clip):vt=null,ne(Z,se,ae,ge,bn,Ie,Be,Ve,Ke,tt,ht,vt),st=!0}}),st||ne(Z,se,ae,ge,_e,Ie,Be,Ve,Ke,tt)}const mi=pa|fh;function ne(V,Z,se,ae,ge,_e,Ie,Be,Ve,Ke,tt,st){Wo(V,Z,se,ae,ge),(Ve||Ke||st)&&(s.save(),Ve&&s.clip(Ve),Ke&&s.clip(Ke)),st?(Be&mi)==mi?(s.clip(st),tt&&s.clip(tt),Le(ge,Ie),Se(V,_e,Z)):Be&fh?(Le(ge,Ie),s.clip(st),Se(V,_e,Z)):Be&pa&&(s.save(),s.clip(st),tt&&s.clip(tt),Le(ge,Ie),s.restore(),Se(V,_e,Z)):(Le(ge,Ie),Se(V,_e,Z)),(Ve||Ke||st)&&s.restore()}function Se(V,Z,se){se>0&&(Z instanceof Map?Z.forEach((ae,ge)=>{s.strokeStyle=Ui=ge,s.stroke(ae)}):Z!=null&&V&&s.stroke(Z))}function Le(V,Z){Z instanceof Map?Z.forEach((se,ae)=>{s.fillStyle=ii=ae,s.fill(se)}):Z!=null&&V&&s.fill(Z)}function et(V,Z,se,ae){let ge=E[V],_e;if(ae<=0)_e=[0,0];else{let Ie=ge._space=ge.space(r,V,Z,se,ae),Be=ge._incrs=ge.incrs(r,V,Z,se,ae,Ie);_e=tS(Z,se,Be,ae,Ie)}return ge._found=_e}function mt(V,Z,se,ae,ge,_e,Ie,Be,Ve,Ke){let tt=Ie%2/2;l==1&&s.translate(tt,tt),Wo(Be,Ie,Ve,Ke,Be),s.beginPath();let st,_t,Zt,Pt,xt=ge+(ae==0||ae==3?-_e:_e);se==0?(_t=ge,Pt=xt):(st=ge,Zt=xt);for(let vt=0;vt<V.length;vt++)Z[vt]!=null&&(se==0?st=Zt=V[vt]:_t=Pt=V[vt],s.moveTo(st,_t),s.lineTo(Zt,Pt));s.stroke(),l==1&&s.translate(-tt,-tt)}function Ut(V){let Z=!0;return E.forEach((se,ae)=>{if(!se.show)return;let ge=$[se.scale];if(ge.min==null){se._show&&(Z=!1,se._show=!1,lr(!1));return}else se._show||(Z=!1,se._show=!0,lr(!1));let _e=se.side,Ie=_e%2,{min:Be,max:Ve}=ge,[Ke,tt]=et(ae,Be,Ve,Ie==0?gt:Ye);if(tt==0)return;let st=ge.distr==2,_t=se._splits=se.splits(r,ae,Be,Ve,Ke,tt,st),Zt=ge.distr==2?_t.map(ht=>er[ht]):_t,Pt=ge.distr==2?er[_t[1]]-er[_t[0]]:Ke,xt=se._values=se.values(r,se.filter(r,Zt,ae,tt,Pt),ae,tt,Pt);se._rotate=_e==2?se.rotate(r,xt,ae,tt):0;let vt=se._size;se._size=ji(se.size(r,xt,ae,V)),vt!=null&&se._size!=vt&&(Z=!1)}),Z}function Kt(V){let Z=!0;return $o.forEach((se,ae)=>{let ge=se(r,ae,Cr,V);ge!=mr[ae]&&(Z=!1),mr[ae]=ge}),Z}function Hr(){for(let V=0;V<E.length;V++){let Z=E[V];if(!Z.show||!Z._show)continue;let se=Z.side,ae=se%2,ge,_e,Ie=Z.stroke(r,V),Be=se==0||se==3?-1:1,[Ve,Ke]=Z._found;if(Z.label!=null){let Lr=Z.labelGap*Be,Cn=pr((Z._lpos+Lr)*nn);To(Z.labelFont[0],Ie,"center",se==2?Xa:jg),s.save(),ae==1?(ge=_e=0,s.translate(Cn,pr(Xn+Un/2)),s.rotate((se==3?-tc:tc)/2)):(ge=pr(Rn+Qt/2),_e=Cn);let Qi=lm(Z.label)?Z.label(r,V,Ve,Ke):Z.label;s.fillText(Qi,ge,_e),s.restore()}if(Ke==0)continue;let tt=$[Z.scale],st=ae==0?Qt:Un,_t=ae==0?Rn:Xn,Zt=Z._splits,Pt=tt.distr==2?Zt.map(Lr=>er[Lr]):Zt,xt=tt.distr==2?er[Zt[1]]-er[Zt[0]]:Ve,vt=Z.ticks,ht=Z.border,bn=vt.show?vt.size:0,Nn=pr(bn*nn),hr=pr((Z.alignTo==2?Z._size-bn-Z.gap:Z.gap)*nn),an=Z._rotate*-tc/180,pn=g(Z._pos*nn),me=(Nn+hr)*Be,Te=pn+me;_e=ae==0?Te:0,ge=ae==1?Te:0;let ke=Z.font[0],Je=Z.align==1?aa:Z.align==2?ju:an>0?aa:an<0?ju:ae==0?"center":se==3?ju:aa,pt=an||ae==1?"middle":se==2?Xa:jg;To(ke,Ie,Je,pt);let St=Z.font[1]*Z.lineGap,en=Zt.map(Lr=>g(w(Lr,tt,st,_t))),zt=Z._values;for(let Lr=0;Lr<zt.length;Lr++){let Cn=zt[Lr];if(Cn!=null){ae==0?ge=en[Lr]:_e=en[Lr],Cn=""+Cn;let Qi=Cn.indexOf(`
|
|
1480
|
+
`)==-1?[Cn]:Cn.split(/\n/gm);for(let Or=0;Or<Qi.length;Or++){let qo=Qi[Or];an?(s.save(),s.translate(ge,_e+Or*St),s.rotate(an),s.fillText(qo,0,0),s.restore()):s.fillText(qo,ge,_e+Or*St)}}}vt.show&&mt(en,vt.filter(r,Pt,V,Ke,xt),ae,se,pn,Nn,yn(vt.width*nn,3),vt.stroke(r,V),vt.dash,vt.cap);let yi=Z.grid;yi.show&&mt(en,yi.filter(r,Pt,V,Ke,xt),ae,ae==0?2:1,ae==0?Xn:Rn,ae==0?Un:Qt,yn(yi.width*nn,3),yi.stroke(r,V),yi.dash,yi.cap),ht.show&&mt([pn],[1],ae==0?1:0,ae==0?1:2,ae==1?Xn:Rn,ae==1?Un:Qt,yn(ht.width*nn,3),ht.stroke(r,V),ht.dash,ht.cap)}at("drawAxes")}function lr(V){x.forEach((Z,se)=>{se>0&&(Z._paths=null,V&&(m==1?(Z.min=null,Z.max=null):Z.facets.forEach(ae=>{ae.min=null,ae.max=null})))})}let In=!1,Mr=!1,wn=[];function Sa(){Mr=!1;for(let V=0;V<wn.length;V++)at(...wn[V]);wn.length=0}function Mo(){In||(KA(Fs),In=!0)}function je(V,Z=!1){In=!0,Mr=Z,V(r),Fs(),Z&&wn.length>0&&queueMicrotask(Sa)}r.batch=je;function Fs(){if($i&&(Eo(),$i=!1),sr&&(xr(),sr=!1),ti){if(_n(h,aa,It),_n(h,Xa,kn),_n(h,Ja,gt),_n(h,Za,Ye),_n(o,aa,It),_n(o,Xa,kn),_n(o,Ja,gt),_n(o,Za,Ye),_n(c,Ja,Nt),_n(c,Za,An),a.width=pr(Nt*nn),a.height=pr(An*nn),E.forEach(({_el:V,_show:Z,_size:se,_pos:ae,side:ge})=>{if(V!=null)if(Z){let _e=ge===3||ge===0?se:0,Ie=ge%2==1;_n(V,Ie?"left":"top",ae-_e),_n(V,Ie?"width":"height",se),_n(V,Ie?"top":"left",Ie?kn:It),_n(V,Ie?"height":"width",Ie?Ye:gt),Yu(V,$s)}else Ai(V,$s)}),Ui=ii=Vi=ar=qi=Gi=gi=Ii=fo=null,fn=1,F(!0),It!=Pn||kn!=Hn||gt!=zn||Ye!=gn){lr(!1);let V=gt/zn,Z=Ye/gn;if(de&&!Vn&&re.left>=0){re.left*=V,re.top*=Z,mo&&_o(mo,pr(re.left),0,gt,Ye),Bn&&_o(Bn,0,pr(re.top),gt,Ye);for(let se=0;se<Qn.length;se++){let ae=Qn[se];ae!=null&&(di[se]*=V,Ei[se]*=Z,_o(ae,ji(di[se]),ji(Ei[se]),gt,Ye))}}if(Ct.show&&!Ti&&Ct.left>=0&&Ct.width>0){Ct.left*=V,Ct.width*=V,Ct.top*=Z,Ct.height*=Z;for(let se in Y)_n(Ur,se,Ct[se])}Pn=It,Hn=kn,zn=gt,gn=Ye}at("setSize"),ti=!1}Nt>0&&An>0&&(s.clearRect(0,0,a.width,a.height),at("drawClear"),D.forEach(V=>V()),at("draw")),Ct.show&&Ti&&(Zi(Ct),Ti=!1),de&&Vn&&(k(null,!0,!1),Vn=!1),le.show&&le.live&&gr&&(y(),gr=!1),u||(u=!0,r.status=1,at("ready")),Er=!1,In=!1}r.redraw=(V,Z)=>{sr=Z||!1,V!==!1?Vr(C,W.min,W.max):Mo()};function ze(V,Z){let se=$[V];if(se.from==null){if(En==0){let ae=se.range(r,Z.min,Z.max,V);Z.min=ae[0],Z.max=ae[1]}if(Z.min>Z.max){let ae=Z.min;Z.min=Z.max,Z.max=ae}if(En>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;V==C&&se.distr==2&&En>0&&(Z.min=lo(Z.min,n[0]),Z.max=lo(Z.max,n[0]),Z.min==Z.max&&Z.max++),A[V]=Z,$i=!0,Mo()}}r.setScale=ze;let Fn,Uo,mo,Bn,$a,Vo,Yi,Io,Bs,rn,dt,jt,Ji=!1;const qn=re.drag;let qe=qn.x,xn=qn.y;de&&(re.x&&(Fn=Wi(yA,o)),re.y&&(Uo=Wi(bA,o)),W.ori==0?(mo=Fn,Bn=Uo):(mo=Uo,Bn=Fn),dt=re.left,jt=re.top);const Ct=r.select=rr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Ur=Ct.show?Wi(vA,Ct.over?o:h):null;function Zi(V,Z){if(Ct.show){for(let se in V)Ct[se]=V[se],se in Y&&_n(Ur,se,V[se]);Z!==!1&&at("setSelect")}}r.setSelect=Zi;function Dt(V){if(x[V].show)ce&&Yu(Ee[V],$s);else if(ce&&Ai(Ee[V],$s),de){let Z=$n?Qn[0]:Qn[V];Z!=null&&_o(Z,-10,-10,gt,Ye)}}function Vr(V,Z,se){ze(V,{min:Z,max:se})}function cr(V,Z,se,ae){Z.focus!=null&&Ws(V),Z.show!=null&&x.forEach((ge,_e)=>{_e>0&&(V==_e||V==null)&&(ge.show=Z.show,Dt(_e),m==2?(Vr(ge.facets[0].scale,null,null),Vr(ge.facets[1].scale,null,null)):Vr(ge.scale,null,null),Mo())}),se!==!1&&at("setSeries",V,Z),ae&&kt("setSeries",r,V,Z)}r.setSeries=cr;function vo(V,Z){rr(_[V],Z)}function Oi(V,Z){V.fill=Wt(V.fill||null),V.dir=Xt(V.dir,-1),Z=Z??_.length,_.splice(Z,0,V)}function Ln(V){V==null?_.length=0:_.splice(V,1)}r.addBand=Oi,r.setBand=vo,r.delBand=Ln;function us(V,Z){x[V].alpha=Z,de&&Qn[V]!=null&&(Qn[V].style.opacity=Z),ce&&Ee[V]&&(Ee[V].style.opacity=Z)}let Gn,Ni,Di;const Xi={focus:!0};function Ws(V){if(V!=Di){let Z=V==null,se=Wr.alpha!=1;x.forEach((ae,ge)=>{if(m==1||ge>0){let _e=Z||ge==0||ge==V;ae._focus=Z?null:_e,se&&us(ge,_e?1:Wr.alpha)}}),Di=V,se&&Mo()}}ce&&jr&&hn(qg,fe,V=>{re._lock||(ni(V),Di!=null&&cr(null,Xi,!0,At.setSeries))});function sn(V,Z,se){let ae=$[Z];se&&(V=V/nn-(ae.ori==1?kn:It));let ge=gt;ae.ori==1&&(ge=Ye,V=ge-V),ae.dir==-1&&(V=ge-V);let _e=ae._min,Ie=ae._max,Be=V/ge,Ve=_e+(Ie-_e)*Be,Ke=ae.distr;return Ke==3?ua(10,Ve):Ke==4?DA(Ve,ae.asinh):Ke==100?ae.bwd(Ve):Ve}function Ta(V,Z){let se=sn(V,C,Z);return lo(se,n[0],mn,Mn)}r.valToIdx=V=>lo(V,n[0]),r.posToIdx=Ta,r.posToVal=sn,r.valToPos=(V,Z,se)=>$[Z].ori==0?d(V,$[Z],se?Qt:gt,se?Rn:0):p(V,$[Z],se?Un:Ye,se?Xn:0),r.setCursor=(V,Z,se)=>{dt=V.left,jt=V.top,k(null,Z,se)};function vr(V,Z){_n(Ur,aa,Ct.left=V),_n(Ur,Ja,Ct.width=Z)}function qr(V,Z){_n(Ur,Xa,Ct.top=V),_n(Ur,Za,Ct.height=Z)}let Lo=W.ori==0?vr:qr,Ir=W.ori==1?vr:qr;function vi(){if(ce&&le.live)for(let V=m==2?1:0;V<x.length;V++){if(V==0&&Ge)continue;let Z=le.values[V],se=0;for(let ae in Z)Ue[V][se++].firstChild.nodeValue=Z[ae]}}function y(V,Z){if(V!=null&&(V.idxs?V.idxs.forEach((se,ae)=>{Q[ae]=se}):BA(V.idx)||Q.fill(V.idx),le.idx=Q[0]),ce&&le.live){for(let se=0;se<x.length;se++)(se>0||m==1&&!Ge)&&S(se,Q[se]);vi()}gr=!1,Z!==!1&&at("setLegend")}r.setLegend=y;function S(V,Z){let se=x[V],ae=V==0&&z==2?er:n[V],ge;Ge?ge=se.values(r,V,Z)??ct:(ge=se.value(r,Z==null?null:ae[Z],V,Z),ge=ge==null?ct:{_:ge}),le.values[V]=ge}function k(V,Z,se){Bs=dt,rn=jt,[dt,jt]=re.move(r,dt,jt),re.left=dt,re.top=jt,de&&(mo&&_o(mo,pr(dt),0,gt,Ye),Bn&&_o(Bn,0,pr(jt),gt,Ye));let ae,ge=mn>Mn;Gn=vn,Ni=null;let _e=W.ori==0?gt:Ye,Ie=W.ori==1?gt:Ye;if(dt<0||En==0||ge){ae=re.idx=null;for(let Be=0;Be<x.length;Be++){let Ve=Qn[Be];Ve!=null&&_o(Ve,-10,-10,gt,Ye)}jr&&cr(null,Xi,!0,V==null&&At.setSeries),le.live&&(Q.fill(ae),gr=!0)}else{let Be,Ve,Ke;m==1&&(Be=W.ori==0?dt:jt,Ve=sn(Be,C),ae=re.idx=lo(Ve,n[0],mn,Mn),Ke=O(n[0][ae],W,_e,0));let tt=-10,st=-10,_t=0,Zt=0,Pt=!0,xt="",vt="";for(let ht=m==2?1:0;ht<x.length;ht++){let bn=x[ht],Nn=Q[ht],hr=Nn==null?null:m==1?n[ht][Nn]:n[ht][1][Nn],an=re.dataIdx(r,ht,ae,Ve),pn=an==null?null:m==1?n[ht][an]:n[ht][1][an];if(gr=gr||pn!=hr||an!=Nn,Q[ht]=an,ht>0&&bn.show){let me=an==null?-10:an==ae?Ke:O(m==1?n[0][an]:n[ht][0][an],W,_e,0),Te=pn==null?-10:T(pn,m==1?$[bn.scale]:$[bn.facets[1].scale],Ie,0);if(jr&&pn!=null){let ke=W.ori==1?dt:jt,Je=fr(Wr.dist(r,ht,an,Te,ke));if(Je<Gn){let pt=Wr.bias;if(pt!=0){let St=sn(ke,bn.scale),en=pn>=0?1:-1,zt=St>=0?1:-1;zt==en&&(zt==1?pt==1?pn>=St:pn<=St:pt==1?pn<=St:pn>=St)&&(Gn=Je,Ni=ht)}else Gn=Je,Ni=ht}}if(gr||$n){let ke,Je;W.ori==0?(ke=me,Je=Te):(ke=Te,Je=me);let pt,St,en,zt,yi,Lr,Cn=!0,Qi=Sn.bbox;if(Qi!=null){Cn=!1;let Or=Qi(r,ht);en=Or.left,zt=Or.top,pt=Or.width,St=Or.height}else en=ke,zt=Je,pt=St=Sn.size(r,ht);if(Lr=Sn.fill(r,ht),yi=Sn.stroke(r,ht),$n)ht==Ni&&Gn<=Wr.prox&&(tt=en,st=zt,_t=pt,Zt=St,Pt=Cn,xt=Lr,vt=yi);else{let Or=Qn[ht];Or!=null&&(di[ht]=en,Ei[ht]=zt,Qg(Or,pt,St,Cn),Zg(Or,Lr,yi),_o(Or,ji(en),ji(zt),gt,Ye))}}}}if($n){let ht=Wr.prox,bn=Di==null?Gn<=ht:Gn>ht||Ni!=Di;if(gr||bn){let Nn=Qn[0];Nn!=null&&(di[0]=tt,Ei[0]=st,Qg(Nn,_t,Zt,Pt),Zg(Nn,xt,vt),_o(Nn,ji(tt),ji(st),gt,Ye))}}}if(Ct.show&&Ji)if(V!=null){let[Be,Ve]=At.scales,[Ke,tt]=At.match,[st,_t]=V.cursor.sync.scales,Zt=V.cursor.drag;if(qe=Zt._x,xn=Zt._y,qe||xn){let{left:Pt,top:xt,width:vt,height:ht}=V.select,bn=V.scales[st].ori,Nn=V.posToVal,hr,an,pn,me,Te,ke=Be!=null&&Ke(Be,st),Je=Ve!=null&&tt(Ve,_t);ke&&qe?(bn==0?(hr=Pt,an=vt):(hr=xt,an=ht),pn=$[Be],me=O(Nn(hr,st),pn,_e,0),Te=O(Nn(hr+an,st),pn,_e,0),Lo(co(me,Te),fr(Te-me))):Lo(0,_e),Je&&xn?(bn==1?(hr=Pt,an=vt):(hr=xt,an=ht),pn=$[Ve],me=T(Nn(hr,_t),pn,Ie,0),Te=T(Nn(hr+an,_t),pn,Ie,0),Ir(co(me,Te),fr(Te-me))):Ir(0,Ie)}else X()}else{let Be=fr(Bs-$a),Ve=fr(rn-Vo);if(W.ori==1){let _t=Be;Be=Ve,Ve=_t}qe=qn.x&&Be>=qn.dist,xn=qn.y&&Ve>=qn.dist;let Ke=qn.uni;Ke!=null?qe&&xn&&(qe=Be>=Ke,xn=Ve>=Ke,!qe&&!xn&&(Ve>Be?xn=!0:qe=!0)):qn.x&&qn.y&&(qe||xn)&&(qe=xn=!0);let tt,st;qe&&(W.ori==0?(tt=Yi,st=dt):(tt=Io,st=jt),Lo(co(tt,st),fr(st-tt)),xn||Ir(0,Ie)),xn&&(W.ori==1?(tt=Yi,st=dt):(tt=Io,st=jt),Ir(co(tt,st),fr(st-tt)),qe||Lo(0,_e)),!qe&&!xn&&(Lo(0,0),Ir(0,0))}if(qn._x=qe,qn._y=xn,V==null){if(se){if(Yt!=null){let[Be,Ve]=At.scales;At.values[0]=Be!=null?sn(W.ori==0?dt:jt,Be):null,At.values[1]=Ve!=null?sn(W.ori==1?dt:jt,Ve):null}kt(Uu,r,dt,jt,gt,Ye,ae)}if(jr){let Be=se&&At.setSeries,Ve=Wr.prox;Di==null?Gn<=Ve&&cr(Ni,Xi,!0,Be):Gn>Ve?cr(null,Xi,!0,Be):Ni!=Di&&cr(Ni,Xi,!0,Be)}}gr&&(le.idx=ae,y()),Z!==!1&&at("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&F(!1),P}});function F(V=!1){V?P=null:(P=o.getBoundingClientRect(),at("syncRect",P))}function j(V,Z,se,ae,ge,_e,Ie){re._lock||Ji&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,Z,se,ae,ge,_e,Ie,!1,V!=null),V!=null?k(null,!0,!0):k(Z,!0,!1))}function q(V,Z,se,ae,ge,_e,Ie,Be,Ve){if(P==null&&F(!1),ni(V),V!=null)se=V.clientX-P.left,ae=V.clientY-P.top;else{if(se<0||ae<0){dt=-10,jt=-10;return}let[Ke,tt]=At.scales,st=Z.cursor.sync,[_t,Zt]=st.values,[Pt,xt]=st.scales,[vt,ht]=At.match,bn=Z.axes[0].side%2==1,Nn=W.ori==0?gt:Ye,hr=W.ori==1?gt:Ye,an=bn?_e:ge,pn=bn?ge:_e,me=bn?ae:se,Te=bn?se:ae;if(Pt!=null?se=vt(Ke,Pt)?w(_t,$[Ke],Nn,0):-10:se=Nn*(me/an),xt!=null?ae=ht(tt,xt)?w(Zt,$[tt],hr,0):-10:ae=hr*(Te/pn),W.ori==1){let ke=se;se=ae,ae=ke}}Ve&&(Z==null||Z.cursor.event.type==Uu)&&((se<=1||se>=gt-1)&&(se=Es(se,gt)),(ae<=1||ae>=Ye-1)&&(ae=Es(ae,Ye))),Be?($a=se,Vo=ae,[Yi,Io]=re.move(r,se,ae)):(dt=se,jt=ae)}const Y={width:0,height:0,left:0,top:0};function X(){Zi(Y,!1)}let oe,ue,we,Ae;function be(V,Z,se,ae,ge,_e,Ie){Ji=!0,qe=xn=qn._x=qn._y=!1,q(V,Z,se,ae,ge,_e,Ie,!0,!1),V!=null&&(hn(Vu,Gu,Ce,!1),kt(Ug,r,Yi,Io,gt,Ye,null));let{left:Be,top:Ve,width:Ke,height:tt}=Ct;oe=Be,ue=Ve,we=Ke,Ae=tt}function Ce(V,Z,se,ae,ge,_e,Ie){Ji=qn._x=qn._y=!1,q(V,Z,se,ae,ge,_e,Ie,!1,!0);let{left:Be,top:Ve,width:Ke,height:tt}=Ct,st=Ke>0||tt>0,_t=oe!=Be||ue!=Ve||we!=Ke||Ae!=tt;if(st&&_t&&Zi(Ct),qn.setScale&&st&&_t){let Zt=Be,Pt=Ke,xt=Ve,vt=tt;if(W.ori==1&&(Zt=Ve,Pt=tt,xt=Be,vt=Ke),qe&&Vr(C,sn(Zt,C),sn(Zt+Pt,C)),xn)for(let ht in $){let bn=$[ht];ht!=C&&bn.from==null&&bn.min!=vn&&Vr(ht,sn(xt+vt,ht),sn(xt,ht))}X()}else re.lock&&(re._lock=!re._lock,k(Z,!0,V!=null));V!=null&&(Zn(Vu,Gu),kt(Vu,r,dt,jt,gt,Ye,null))}function Pe(V,Z,se,ae,ge,_e,Ie){if(re._lock)return;ni(V);let Be=Ji;if(Ji){let Ve=!0,Ke=!0,tt=10,st,_t;W.ori==0?(st=qe,_t=xn):(st=xn,_t=qe),st&&_t&&(Ve=dt<=tt||dt>=gt-tt,Ke=jt<=tt||jt>=Ye-tt),st&&Ve&&(dt=dt<Yi?0:gt),_t&&Ke&&(jt=jt<Io?0:Ye),k(null,!0,!0),Ji=!1}dt=-10,jt=-10,Q.fill(null),k(null,!0,!0),Be&&(Ji=Be)}function Ne(V,Z,se,ae,ge,_e,Ie){re._lock||(ni(V),ri(),X(),V!=null&&kt(Gg,r,dt,jt,gt,Ye,null))}function Ze(){E.forEach(nS),Hi(r.width,r.height,!0)}Ts(Jl,ca,Ze);const ft={};ft.mousedown=be,ft.mousemove=j,ft.mouseup=Ce,ft.dblclick=Ne,ft.setSeries=(V,Z,se,ae)=>{let ge=At.match[2];se=ge(r,Z,se),se!=-1&&cr(se,ae,!0,!1)},de&&(hn(Ug,o,be),hn(Uu,o,j),hn(Vg,o,V=>{ni(V),F(!1)}),hn(qg,o,Pe),hn(Gg,o,Ne),vh.add(r),r.syncRect=F);const rt=r.hooks=t.hooks||{};function at(V,Z,se){Mr?wn.push([V,Z,se]):V in rt&&rt[V].forEach(ae=>{ae.call(null,r,Z,se)})}(t.plugins||[]).forEach(V=>{for(let Z in V.hooks)rt[Z]=(rt[Z]||[]).concat(V.hooks[Z])});const Tn=(V,Z,se)=>se,At=rr({key:null,setSeries:!1,filters:{pub:hm,sub:hm},scales:[C,x[1]?x[1].scale:null],match:[dm,dm,Tn],values:[null,null]},re.sync);At.match.length==2&&At.match.push(Tn),re.sync=At;const Yt=At.key,Et=Jm(Yt);function kt(V,Z,se,ae,ge,_e,Ie){At.filters.pub(V,Z,se,ae,ge,_e,Ie)&&Et.pub(V,Z,se,ae,ge,_e,Ie)}Et.sub(r);function ur(V,Z,se,ae,ge,_e,Ie){At.filters.sub(V,Z,se,ae,ge,_e,Ie)&&ft[V](null,Z,se,ae,ge,_e,Ie)}r.pub=ur;function yr(){Et.unsub(r),vh.delete(r),Jt.clear(),Zu(Jl,ca,Ze),f.remove(),fe?.remove(),at("destroy")}r.destroy=yr;function On(){at("init",t,n),pi(n||t.data,!1),A[C]?ze(C,A[C]):ri(),Ti=Ct.show&&(Ct.width>0||Ct.height>0),Vn=gr=!0,Hi(t.width,t.height)}return x.forEach(cs),E.forEach(fi),e?e instanceof HTMLElement?(e.appendChild(f),On()):e(r,On):On(),r}zr.assign=rr,zr.fmtNum=eh,zr.rangeNum=ec,zr.rangeLog=Ql,zr.rangeAsinh=Xu,zr.orient=Is,zr.pxRatio=nn,zr.join=GA,zr.fmtDate=ih,zr.tzDate=ik,zr.sync=Jm;{zr.addGap=Bk,zr.clipGaps=ac;let t=zr.paths={points:rv};t.linear=ov,t.stepped=Hk,t.bars=Uk,t.spline=qk}var fv,pv;function rS(){return pv||(pv=1,fv=function(t,n,e,r,m){var d,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(m===void 0)m=t.length-1;else if(m=m|0,m<r||m>=t.length)throw new RangeError("invalid upper bound");for(;r<=m;)if(d=r+(m-r>>>1),p=+e(t[d],n,d,t),p<0)r=d+1;else if(p>0)m=d-1;else return d;return~r}),fv}var iS=rS();const PD=Yn("y",Kl(iS));var bh,gv;function oS(){if(gv)return bh;gv=1;function t(n,e,r){var m=-1,d=n.length;e<0&&(e=-e>d?0:d+e),r=r>d?d:r,r<0&&(r+=d),d=e>r?0:r-e>>>0,e>>>=0;for(var p=Array(d);++m<d;)p[m]=n[m+e];return p}return bh=t,bh}var wh,mv;function sS(){if(mv)return wh;mv=1;var t=oS();function n(e,r,m){var d=e.length;return m=m===void 0?d:m,!r&&m>=d?e:t(e,r,m)}return wh=n,wh}var xh,vv;function yv(){if(vv)return xh;vv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,d="\\ufe0e\\ufe0f",p="\\u200d",w=RegExp("["+p+t+m+d+"]");function u(f){return w.test(f)}return xh=u,xh}var Ch,bv;function aS(){if(bv)return Ch;bv=1;function t(n){return n.split("")}return Ch=t,Ch}var _h,wv;function lS(){if(wv)return _h;wv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,d="\\ufe0e\\ufe0f",p="["+t+"]",w="["+m+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+w+"|"+u+")",a="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",o=f+"?",l="["+d+"]?",g="(?:"+h+"(?:"+[a,s,c].join("|")+")"+l+o+")*",b=l+o+g,x="(?:"+[a+w+"?",w,s,c,p].join("|")+")",E=RegExp(u+"(?="+u+")|"+x+b,"g");function $(_){return _.match(E)||[]}return _h=$,_h}var Ah,xv;function cS(){if(xv)return Ah;xv=1;var t=aS(),n=yv(),e=lS();function r(m){return n(m)?e(m):t(m)}return Ah=r,Ah}var kh,Cv;function uS(){if(Cv)return kh;Cv=1;var t=typeof rs=="object"&&rs&&rs.Object===Object&&rs;return kh=t,kh}var Sh,_v;function hS(){if(_v)return Sh;_v=1;var t=uS(),n=typeof self=="object"&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return Sh=e,Sh}var $h,Av;function Th(){if(Av)return $h;Av=1;var t=hS(),n=t.Symbol;return $h=n,$h}var Rh,kv;function dS(){if(kv)return Rh;kv=1;function t(n,e){for(var r=-1,m=n==null?0:n.length,d=Array(m);++r<m;)d[r]=e(n[r],r,n);return d}return Rh=t,Rh}var Eh,Sv;function fS(){if(Sv)return Eh;Sv=1;var t=Array.isArray;return Eh=t,Eh}var Mh,$v;function pS(){if($v)return Mh;$v=1;var t=Th(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,m=t?t.toStringTag:void 0;function d(p){var w=e.call(p,m),u=p[m];try{p[m]=void 0;var f=!0}catch{}var a=r.call(p);return f&&(w?p[m]=u:delete p[m]),a}return Mh=d,Mh}var Ih,Tv;function gS(){if(Tv)return Ih;Tv=1;var t=Object.prototype,n=t.toString;function e(r){return n.call(r)}return Ih=e,Ih}var Lh,Rv;function mS(){if(Rv)return Lh;Rv=1;var t=Th(),n=pS(),e=gS(),r="[object Null]",m="[object Undefined]",d=t?t.toStringTag:void 0;function p(w){return w==null?w===void 0?m:r:d&&d in Object(w)?n(w):e(w)}return Lh=p,Lh}var Oh,Ev;function vS(){if(Ev)return Oh;Ev=1;function t(n){return n!=null&&typeof n=="object"}return Oh=t,Oh}var Nh,Mv;function yS(){if(Mv)return Nh;Mv=1;var t=mS(),n=vS(),e="[object Symbol]";function r(m){return typeof m=="symbol"||n(m)&&t(m)==e}return Nh=r,Nh}var Dh,Iv;function bS(){if(Iv)return Dh;Iv=1;var t=Th(),n=dS(),e=fS(),r=yS(),m=t?t.prototype:void 0,d=m?m.toString:void 0;function p(w){if(typeof w=="string")return w;if(e(w))return n(w,p)+"";if(r(w))return d?d.call(w):"";var u=w+"";return u=="0"&&1/w==-1/0?"-0":u}return Dh=p,Dh}var Ph,Lv;function hc(){if(Lv)return Ph;Lv=1;var t=bS();function n(e){return e==null?"":t(e)}return Ph=n,Ph}var zh,Ov;function wS(){if(Ov)return zh;Ov=1;var t=sS(),n=yv(),e=cS(),r=hc();function m(d){return function(p){p=r(p);var w=n(p)?e(p):void 0,u=w?w[0]:p.charAt(0),f=w?t(w,1).join(""):p.slice(1);return u[d]()+f}}return zh=m,zh}var Fh,Nv;function Dv(){if(Nv)return Fh;Nv=1;var t=wS(),n=t("toUpperCase");return Fh=n,Fh}var xS=Dv();const CS=Kl(xS);var Bh,Pv;function _S(){if(Pv)return Bh;Pv=1;var t=hc(),n=Dv();function e(r){return n(t(r).toLowerCase())}return Bh=e,Bh}var Wh,zv;function AS(){if(zv)return Wh;zv=1;function t(n,e,r,m){var d=-1,p=n==null?0:n.length;for(m&&p&&(r=n[++d]);++d<p;)r=e(r,n[d],d,n);return r}return Wh=t,Wh}var jh,Fv;function kS(){if(Fv)return jh;Fv=1;function t(n){return function(e){return n?.[e]}}return jh=t,jh}var Hh,Bv;function SS(){if(Bv)return Hh;Bv=1;var t=kS(),n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=t(n);return Hh=e,Hh}var Uh,Wv;function $S(){if(Wv)return Uh;Wv=1;var t=SS(),n=hc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",m="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+m+d,w="["+p+"]",u=RegExp(w,"g");function f(a){return a=n(a),a&&a.replace(e,t).replace(u,"")}return Uh=f,Uh}var Vh,jv;function TS(){if(jv)return Vh;jv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(e){return e.match(t)||[]}return Vh=n,Vh}var qh,Hv;function RS(){if(Hv)return qh;Hv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(e){return t.test(e)}return qh=n,qh}var Gh,Uv;function ES(){if(Uv)return Gh;Uv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,d="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",a=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",s="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",h=w+u+f+a,o="['’]",l="["+h+"]",g="["+m+"]",b="\\d+",x="["+d+"]",E="["+p+"]",$="[^"+t+h+b+d+p+s+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+g+"|"+_+")",L="[^"+t+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",M="["+s+"]",W="\\u200d",z="(?:"+E+"|"+$+")",O="(?:"+M+"|"+$+")",T="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+c+"]?",U="(?:"+W+"(?:"+[L,D,I].join("|")+")"+B+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",J="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Q=B+N+U,le="(?:"+[x,D,I].join("|")+")"+Q,re=RegExp([M+"?"+E+"+"+T+"(?="+[l,M,"$"].join("|")+")",O+"+"+A+"(?="+[l,M+z,"$"].join("|")+")",M+"?"+z+"+"+T,M+"+"+A,J,G,b,le].join("|"),"g");function ce(de){return de.match(re)||[]}return Gh=ce,Gh}var Kh,Vv;function MS(){if(Vv)return Kh;Vv=1;var t=TS(),n=RS(),e=hc(),r=ES();function m(d,p,w){return d=e(d),p=w?void 0:p,p===void 0?n(d)?r(d):t(d):d.match(p)||[]}return Kh=m,Kh}var Yh,qv;function IS(){if(qv)return Yh;qv=1;var t=AS(),n=$S(),e=MS(),r="['’]",m=RegExp(r,"g");function d(p){return function(w){return t(e(n(w).replace(m,"")),p,"")}}return Yh=d,Yh}var Jh,Gv;function LS(){if(Gv)return Jh;Gv=1;var t=_S(),n=IS(),e=n(function(r,m,d){return m=m.toLowerCase(),r+(d?t(m):m)});return Jh=e,Jh}var OS=LS();const NS=Kl(OS),DS=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-DMSm_P6c-694a5d20f37aee56e971.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-fdXLhGAl-ee49423a88f0830f3d10.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-Do3W6tZh-0465ab5ccbba95c9cd95.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-DukCQt0F-73553c5eb8665f5a122c.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-BRdVWln5-ecfd6c23ebdef1641cbe.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget-DV8PeDWz-9ea509837174f807accc.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-Czbq1GuF-f6237d2815bb4fb67627.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-DKt5JgEt-4d4748409b4390fd9317.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-DW2I1ra1-21be90e9689988d7cc0b.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-BhzvZVfD-98ba8f4d0b737ae50149.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-DsjY37tp-333343a7e55e7ced336a.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-ihI97G8T-a999105fab2c48e7d5a3.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-B778Z-Zo-929c0f581f4e6fc8bb9b.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-CuuvOL9K-580e3a816c2a39c9dc31.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-COvQTAeo-8e7e5760cca1eca77fb7.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-BuSbQVhf-d28b4dd265895ced834e.js"),void 0),"./FilechecksumWidget.vue":()=>ot(()=>it.import("./FilechecksumWidget-DRnOt_UE-e8bcb330e9f8161abcb5.js"),void 0),"./FiledisplayWidget.vue":()=>ot(()=>it.import("./FiledisplayWidget-26R46EjS-50600e2205e679c6e7a3.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget-BxyscMJc-deb6fbbd21db3f9b9533.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-fWLFj7Kg-87dfe4a783ca9d8718a3.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-DEaXhKEz-3cc78a62e93fced5cc2d.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-Bvu1QP3S-1c0a38d8daf4285046b0.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-B143k4lo-211336261edc12558ba4.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-CLrvr6dw-dbefc7bb490747b4d32b.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-CA1bTX2B-2c9d603681176335c5dd.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-BDhvr03J-fe41df86dd3cc7e1d625.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-g7A5CE8S-17fe760704ac3e7697ad.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-B27xXxWg-960e3827bda04825c04a.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-DFn8o6LC-382c91895aa50abef201.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-BQpaxFaB-abcd49094e4d21057a3d.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-C-z96q8z-1f5e8f4cf393ac65098f.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-D2TMEv9O-11b6844f84b58504c3aa.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-D99dZCjz-2c72dd417308f8cf3b83.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget-D2uxHxe3-22c8c1f89536f753f5e6.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-Cqhh7LKU-7f40da6484ccbe5da287.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-haGB4RbY-ddf6b0791eb1be4ac6c5.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-B1GdmlR_-86b9a2cc5c084b705674.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-COSOQ0uM-a5300046319a8e9bc2ac.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-coHlLETG-e799eaa675cfbf970ed5.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-D_yFssIZ-2510755cf05a8167431f.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-DL0jVTcb-101358296cb6f3e5ac75.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-2-td69IA-98144436c4729f2db047.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-i2mlnxys-3ecd19c88b6a2f13fc7a.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-BEJ2Icg1-416b8d9160f2a81fd538.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-BU1cRpL8-d99f9e1c5467abc7ed03.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-hiTkeem9-9efe6cdd22515ebf8555.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-CBmzzS_X-e8f51b2251bb08fed6b0.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-CizRh6QR-92a3ebcc84a5687d3b93.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-CvL3Ozmx-19c91b22633cf0927a1e.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-BtEwXzDO-52792ac2b6593c85c776.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget-BDbb57HP-7306fcc70fc27079b1d3.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-DzD8U8l8-db805689f0b8dbaab9f7.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-CL53vf14-c0987297e98b6c858650.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-CAkuc_w_-0721aa9556f274d056ba.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-Y8sO05E1-f729f6e347b2f5825407.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-iOjB_fCj-ae174dd346919467bac7.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-DsCoeAm6-7804711bfe999dad21a6.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-C6O0dhRU-a30bbb27eaa68c233c89.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-B-CoqRJG-ba12b0177fbcd7fb76e1.js"),void 0)}),PS=Object.entries(DS).reduce((t,[n,e])=>{n=n.split("/").pop();const r=CS(NS(n.replace(/\.\w+$/,"")));return{...t,[r]:Sf(e)}},{}),zD=Yn("w",{components:PS});function Kv(t,n){return function(){return t.apply(n,arguments)}}const{toString:zS}=Object.prototype,{getPrototypeOf:va}=Object,{iterator:il,toStringTag:Yv}=Symbol,dc=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),ol=(t,n)=>{let e=t;const r=[];for(;e!=null&&e!==Object.prototype;){if(r.indexOf(e)!==-1)return!1;if(r.push(e),dc(e,n))return!0;e=va(e)}return!1},FS=(t,n)=>t!=null&&ol(t,n)?t[n]:void 0,Zh=(t=>n=>{const e=zS.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),uo=t=>(t=t.toLowerCase(),n=>Zh(n)===t),fc=t=>n=>typeof n===t,{isArray:Ls}=Array,ya=fc("undefined");function ba(t){return t!==null&&!ya(t)&&t.constructor!==null&&!ya(t.constructor)&&ui(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Jv=uo("ArrayBuffer");function BS(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Jv(t.buffer),n}const WS=fc("string"),ui=fc("function"),Zv=fc("number"),wa=t=>t!==null&&typeof t=="object",jS=t=>t===!0||t===!1,pc=t=>{if(!wa(t))return!1;const n=va(t);return(n===null||n===Object.prototype||va(n)===null)&&!ol(t,Yv)&&!ol(t,il)},HS=t=>{if(!wa(t)||ba(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},US=uo("Date"),VS=uo("File"),qS=t=>!!(t&&typeof t.uri<"u"),GS=t=>t&&typeof t.getParts<"u",KS=uo("Blob"),YS=uo("FileList"),JS=t=>wa(t)&&ui(t.pipe);function ZS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Xv=ZS(),Qv=typeof Xv.FormData<"u"?Xv.FormData:void 0,XS=t=>{if(!t)return!1;if(Qv&&t instanceof Qv)return!0;const n=va(t);if(!n||n===Object.prototype||!ui(t.append))return!1;const e=Zh(t);return e==="formdata"||e==="object"&&ui(t.toString)&&t.toString()==="[object FormData]"},QS=uo("URLSearchParams"),[e$,t$,n$,r$]=["ReadableStream","Request","Response","Headers"].map(uo),i$=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sl(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),Ls(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(ba(t))return;const d=e?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let w;for(r=0;r<p;r++)w=d[r],n.call(null,t[w],w,t)}}function ey(t,n){if(ba(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const Os=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ty=t=>!ya(t)&&t!==Os;function Xh(...t){const{caseless:n,skipUndefined:e}=ty(this)&&this||{},r={},m=(d,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const w=n&&typeof p=="string"&&ey(r,p)||p,u=dc(r,w)?r[w]:void 0;pc(u)&&pc(d)?r[w]=Xh(u,d):pc(d)?r[w]=Xh({},d):Ls(d)?r[w]=d.slice():(!e||!ya(d))&&(r[w]=d)};for(let d=0,p=t.length;d<p;d++){const w=t[d];if(!w||ba(w)||(sl(w,m),typeof w!="object"||Ls(w)))continue;const u=Object.getOwnPropertySymbols(w);for(let f=0;f<u.length;f++){const a=u[f];m$.call(w,a)&&m(w[a],a)}}return r}const o$=(t,n,e,{allOwnKeys:r}={})=>(sl(n,(m,d)=>{e&&ui(m)?Object.defineProperty(t,d,{__proto__:null,value:Kv(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,d,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),s$=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),a$=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),e&&Object.assign(t.prototype,e)},l$=(t,n,e,r)=>{let m,d,p;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),d=m.length;d-- >0;)p=m[d],(!r||r(p,t,n))&&!w[p]&&(n[p]=t[p],w[p]=!0);t=e!==!1&&va(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},c$=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},u$=t=>{if(!t)return null;if(Ls(t))return t;let n=t.length;if(!Zv(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},h$=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&va(Uint8Array)),d$=(t,n)=>{const e=(t&&t[il]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},f$=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},p$=uo("HTMLFormElement"),g$=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),{propertyIsEnumerable:m$}=Object.prototype,v$=uo("RegExp"),ny=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};sl(e,(m,d)=>{let p;(p=n(m,d,t))!==!1&&(r[d]=p||m)}),Object.defineProperties(t,r)},y$=t=>{ny(t,(n,e)=>{if(ui(t)&&["arguments","caller","callee"].includes(e))return!1;const r=t[e];if(ui(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},b$=(t,n)=>{const e={},r=m=>{m.forEach(d=>{e[d]=!0})};return Ls(t)?r(t):r(String(t).split(n)),e},w$=()=>{},x$=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function C$(t){return!!(t&&ui(t.append)&&t[Yv]==="FormData"&&t[il])}const _$=t=>{const n=new WeakSet,e=r=>{if(wa(r)){if(n.has(r))return;if(ba(r))return r;if(!("toJSON"in r)){n.add(r);const m=Ls(r)?[]:{};return sl(r,(d,p)=>{const w=e(d);!ya(w)&&(m[p]=w)}),n.delete(r),m}}return r};return e(t)},A$=uo("AsyncFunction"),k$=t=>t&&(wa(t)||ui(t))&&ui(t.then)&&ui(t.catch),ry=((t,n)=>t?setImmediate:n?((e,r)=>(Os.addEventListener("message",({source:m,data:d})=>{m===Os&&d===e&&r.length&&r.shift()()},!1),m=>{r.push(m),Os.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ui(Os.postMessage)),S$=typeof queueMicrotask<"u"?queueMicrotask.bind(Os):typeof process<"u"&&process.nextTick||ry,iy=t=>t!=null&&ui(t[il]),$$=t=>t!=null&&ol(t,il)&&iy(t),ye={isArray:Ls,isArrayBuffer:Jv,isBuffer:ba,isFormData:XS,isArrayBufferView:BS,isString:WS,isNumber:Zv,isBoolean:jS,isObject:wa,isPlainObject:pc,isEmptyObject:HS,isReadableStream:e$,isRequest:t$,isResponse:n$,isHeaders:r$,isUndefined:ya,isDate:US,isFile:VS,isReactNativeBlob:qS,isReactNative:GS,isBlob:KS,isRegExp:v$,isFunction:ui,isStream:JS,isURLSearchParams:QS,isTypedArray:h$,isFileList:YS,forEach:sl,merge:Xh,extend:o$,trim:i$,stripBOM:s$,inherits:a$,toFlatObject:l$,kindOf:Zh,kindOfTest:uo,endsWith:c$,toArray:u$,forEachEntry:d$,matchAll:f$,isHTMLForm:p$,hasOwnProperty:dc,hasOwnProp:dc,hasOwnInPrototypeChain:ol,getSafeProp:FS,reduceDescriptors:ny,freezeMethods:y$,toObjectSet:b$,toCamelCase:g$,noop:w$,toFiniteNumber:x$,findKey:ey,global:Os,isContextDefined:ty,isSpecCompliantForm:C$,toJSONObject:_$,isAsyncFn:A$,isThenable:k$,setImmediate:ry,asap:S$,isIterable:iy,isSafeIterable:$$},T$=ye.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"]),R$=t=>{const n={};let e,r,m;return t&&t.split(`
|
|
1481
|
+
`).forEach(function(d){m=d.indexOf(":"),e=d.substring(0,m).trim().toLowerCase(),r=d.substring(m+1).trim(),!(!e||n[e]&&T$[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n};function E$(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}const M$=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),I$=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Qh(t,n){return ye.isArray(t)?t.map(e=>Qh(e,n)):E$(String(t).replace(n,""))}const L$=t=>Qh(t,M$),O$=t=>Qh(t,I$);function oy(t){const n=Object.create(null);return ye.forEach(t.toJSON(),(e,r)=>{n[r]=O$(e)}),n}const sy=Symbol("internals");function al(t){return t&&String(t).trim().toLowerCase()}function gc(t){return t===!1||t==null?t:ye.isArray(t)?t.map(gc):L$(String(t))}function N$(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const D$=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ed(t,n,e,r,m){if(ye.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!ye.isString(n)){if(ye.isString(r))return n.indexOf(r)!==-1;if(ye.isRegExp(r))return r.test(n)}}function P$(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function z$(t,n){const e=ye.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{__proto__:null,value:function(m,d,p){return this[r].call(this,n,m,d,p)},configurable:!0})})}let Fr=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function d(w,u,f){const a=al(u);if(!a)return;const s=ye.findKey(m,a);(!s||m[s]===void 0||f===!0||f===void 0&&m[s]!==!1)&&(m[s||u]=gc(w))}const p=(w,u)=>ye.forEach(w,(f,a)=>d(f,a,u));if(ye.isPlainObject(n)||n instanceof this.constructor)p(n,e);else if(ye.isString(n)&&(n=n.trim())&&!D$(n))p(R$(n),e);else if(ye.isObject(n)&&ye.isSafeIterable(n)){let w=Object.create(null),u,f;for(const a of n){if(!ye.isArray(a))throw new TypeError("Object iterator must return a key-value pair");f=a[0],ye.hasOwnProp(w,f)?(u=w[f],w[f]=ye.isArray(u)?[...u,a[1]]:[u,a[1]]):w[f]=a[1]}p(w,e)}else n!=null&&d(e,n,r);return this}get(n,e){if(n=al(n),n){const r=ye.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return N$(m);if(ye.isFunction(e))return e.call(this,m,r);if(ye.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=al(n),n){const r=ye.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||ed(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function d(p){if(p=al(p),p){const w=ye.findKey(r,p);w&&(!e||ed(r,r[w],w,e))&&(delete r[w],m=!0)}}return ye.isArray(n)?n.forEach(d):d(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const d=e[r];(!n||ed(this,this[d],d,n,!0))&&(delete this[d],m=!0)}return m}normalize(n){const e=this,r={};return ye.forEach(this,(m,d)=>{const p=ye.findKey(r,d);if(p){e[p]=gc(m),delete e[d];return}const w=n?P$(d):String(d).trim();w!==d&&delete e[d],e[w]=gc(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return ye.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&ye.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
|
|
1482
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[sy]=this[sy]={accessors:{}}).accessors,r=this.prototype;function m(d){const p=al(d);e[p]||(z$(r,d),e[p]=!0)}return ye.isArray(n)?n.forEach(m):m(n),this}};Fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Fr.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),ye.freezeMethods(Fr);const F$="[REDACTED ****]";function B$(t){if(ye.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(ye.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function W$(t,n){const e=new Set(n.map(d=>String(d).toLowerCase())),r=[],m=d=>{if(d===null||typeof d!="object"||ye.isBuffer(d))return d;if(r.indexOf(d)!==-1)return;d instanceof Fr&&(d=d.toJSON()),r.push(d);let p;if(ye.isArray(d))p=[],d.forEach((w,u)=>{const f=m(w);ye.isUndefined(f)||(p[u]=f)});else{if(!ye.isPlainObject(d)&&B$(d))return r.pop(),d;p=Object.create(null);for(const[w,u]of Object.entries(d)){const f=e.has(w.toLowerCase())?F$:m(u);ye.isUndefined(f)||(p[w]=f)}}return r.pop(),p};return m(t)}let Qe=class vw extends Error{static from(n,e,r,m,d,p){const w=new vw(n.message,e||n.code,r,m,d);return Object.defineProperty(w,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),p&&Object.assign(w,p),w}constructor(n,e,r,m,d){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),d&&(this.response=d,this.status=d.status)}toJSON(){const n=this.config,e=n&&ye.hasOwnProp(n,"redact")?n.redact:void 0,r=ye.isArray(e)&&e.length>0?W$(n,e):ye.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Qe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Qe.ERR_BAD_OPTION="ERR_BAD_OPTION",Qe.ECONNABORTED="ECONNABORTED",Qe.ETIMEDOUT="ETIMEDOUT",Qe.ECONNREFUSED="ECONNREFUSED",Qe.ERR_NETWORK="ERR_NETWORK",Qe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Qe.ERR_DEPRECATED="ERR_DEPRECATED",Qe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Qe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Qe.ERR_CANCELED="ERR_CANCELED",Qe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Qe.ERR_INVALID_URL="ERR_INVALID_URL",Qe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const j$=null,ay=100;function td(t){return ye.isPlainObject(t)||ye.isArray(t)}function ly(t){return ye.endsWith(t,"[]")?t.slice(0,-2):t}function nd(t,n,e){return t?t.concat(n).map(function(r,m){return r=ly(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function H$(t){return ye.isArray(t)&&!t.some(td)}const U$=ye.toFlatObject(ye,{},null,function(t){return/^is[A-Z]/.test(t)});function mc(t,n,e){if(!ye.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=ye.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!ye.isUndefined(x[b])});const r=e.metaTokens,m=e.visitor||o,d=e.dots,p=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,u=e.maxDepth===void 0?ay:e.maxDepth,f=w&&ye.isSpecCompliantForm(n),a=[];if(!ye.isFunction(m))throw new TypeError("visitor must be a function");function s(b){if(b===null)return"";if(ye.isDate(b))return b.toISOString();if(ye.isBoolean(b))return b.toString();if(!f&&ye.isBlob(b))throw new Qe("Blob is not supported. Use a Buffer instead.");if(ye.isArrayBuffer(b)||ye.isTypedArray(b)){if(f&&typeof w=="function")return new w([b]);if(typeof Buffer<"u")return Buffer.from(b);throw new Qe("Blob is not supported. Use a Buffer instead.",Qe.ERR_NOT_SUPPORT)}return b}function c(b){if(b>u)throw new Qe("Object is too deeply nested ("+b+" levels). Max depth: "+u,Qe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(b,x){if(u===1/0)return JSON.stringify(b);const E=[];return JSON.stringify(b,function($,_){if(!ye.isObject(_))return _;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(_),c(x+E.length-1),_})}function o(b,x,E){let $=b;if(ye.isReactNative(n)&&ye.isReactNativeBlob(b))return n.append(nd(E,x,d),s(b)),!1;if(b&&!E&&typeof b=="object"){if(ye.endsWith(x,"{}"))x=r?x:x.slice(0,-2),b=h(b,1);else if(ye.isArray(b)&&H$(b)||(ye.isFileList(b)||ye.endsWith(x,"[]"))&&($=ye.toArray(b)))return x=ly(x),$.forEach(function(_,C){!(ye.isUndefined(_)||_===null)&&n.append(p===!0?nd([x],C,d):p===null?x:x+"[]",s(_))}),!1}return td(b)?!0:(n.append(nd(E,x,d),s(b)),!1)}const l=Object.assign(U$,{defaultVisitor:o,convertValue:s,isVisitable:td});function g(b,x,E=0){if(!ye.isUndefined(b)){if(c(E),a.indexOf(b)!==-1)throw new Error("Circular reference detected in "+x.join("."));a.push(b),ye.forEach(b,function($,_){(!(ye.isUndefined($)||$===null)&&m.call(n,$,ye.isString(_)?_.trim():_,x,l))===!0&&g($,x?x.concat(_):[_],E+1)}),a.pop()}}if(!ye.isObject(t))throw new TypeError("data must be an object");return g(t),n}function cy(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function rd(t,n){this._pairs=[],t&&mc(t,this,n)}const uy=rd.prototype;uy.append=function(t,n){this._pairs.push([t,n])},uy.toString=function(t){const n=t?e=>t.call(this,e,cy):cy;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function V$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hy(t,n,e){if(!n)return t;t=t||"";const r=ye.isFunction(e)?{serialize:e}:e,m=ye.getSafeProp(r,"encode")||V$,d=ye.getSafeProp(r,"serialize");let p;if(d?p=d(n,r):p=ye.isURLSearchParams(n)?n.toString():new rd(n,r).toString(m),p){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+p}return t}let dy=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){ye.forEach(this.handlers,function(e){e!==null&&n(e)})}};const id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},q$=typeof URLSearchParams<"u"?URLSearchParams:rd,G$=typeof FormData<"u"?FormData:null,K$=typeof Blob<"u"?Blob:null,Y$={isBrowser:!0,classes:{URLSearchParams:q$,FormData:G$,Blob:K$},protocols:["http","https","file","blob","url","data"]},od=typeof window<"u"&&typeof document<"u",sd=typeof navigator=="object"&&navigator||void 0,J$=od&&(!sd||["ReactNative","NativeScript","NS"].indexOf(sd.product)<0),Z$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",X$=od&&window.location.href||"http://localhost",Q$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:od,hasStandardBrowserEnv:J$,hasStandardBrowserWebWorkerEnv:Z$,navigator:sd,origin:X$},Symbol.toStringTag,{value:"Module"})),kr={...Q$,...Y$};function eT(t,n){return mc(t,new kr.classes.URLSearchParams,{visitor:function(e,r,m,d){return kr.isNode&&ye.isBuffer(e)?(this.append(r,e.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...n})}const fy=ay;function py(t){if(t>fy)throw new Qe("FormData field is too deeply nested ("+t+" levels). Max depth: "+fy,Qe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function tT(t){const n=[],e=/\w+|\[(\w*)]/g;let r;for(;(r=e.exec(t))!==null;)py(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function nT(t){const n={},e=Object.keys(t);let r;const m=e.length;let d;for(r=0;r<m;r++)d=e[r],n[d]=t[d];return n}function gy(t){function n(e,r,m,d){py(d);let p=e[d++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),u=d>=e.length;return p=!p&&ye.isArray(m)?m.length:p,u?(ye.hasOwnProp(m,p)?m[p]=ye.isArray(m[p])?m[p].concat(r):[m[p],r]:m[p]=r,!w):((!ye.hasOwnProp(m,p)||!ye.isObject(m[p]))&&(m[p]=[]),n(e,r,m[p],d)&&ye.isArray(m[p])&&(m[p]=nT(m[p])),!w)}if(ye.isFormData(t)&&ye.isFunction(t.entries)){const e={};return ye.forEachEntry(t,(r,m)=>{n(tT(r),m,e,0)}),e}return null}const xa=(t,n)=>t!=null&&ye.hasOwnProp(t,n)?t[n]:void 0;function rT(t,n,e){if(ye.isString(t))try{return(n||JSON.parse)(t),ye.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const ll={transitional:id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=ye.isObject(t);if(m&&ye.isHTMLForm(t)&&(t=new FormData(t)),ye.isFormData(t))return r?JSON.stringify(gy(t)):t;if(ye.isArrayBuffer(t)||ye.isBuffer(t)||ye.isStream(t)||ye.isFile(t)||ye.isBlob(t)||ye.isReadableStream(t))return t;if(ye.isArrayBufferView(t))return t.buffer;if(ye.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(m){const p=xa(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return eT(t,p).toString();if((d=ye.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=xa(this,"env"),u=w&&w.FormData;return mc(d?{"files[]":t}:t,u&&new u,p)}}return m||r?(n.setContentType("application/json",!1),rT(t)):t}],transformResponse:[function(t){const n=xa(this,"transitional")||ll.transitional,e=n&&n.forcedJSONParsing,r=xa(this,"responseType"),m=r==="json";if(ye.isResponse(t)||ye.isReadableStream(t))return t;if(t&&ye.isString(t)&&(e&&!r||m)){const d=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,xa(this,"parseReviver"))}catch(p){if(d)throw p.name==="SyntaxError"?Qe.from(p,Qe.ERR_BAD_RESPONSE,this,null,xa(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kr.classes.FormData,Blob:kr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch","query"],t=>{ll.headers[t]={}});function ad(t,n){const e=this||ll,r=n||e,m=Fr.from(r.headers);let d=r.data;return ye.forEach(t,function(p){d=p.call(e,d,m.normalize(),n?n.status:void 0)}),m.normalize(),d}function my(t){return!!(t&&t.__CANCEL__)}let cl=class extends Qe{constructor(n,e,r){super(n??"canceled",Qe.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function vy(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new Qe("Request failed with status code "+e.status,e.status>=400&&e.status<500?Qe.ERR_BAD_REQUEST:Qe.ERR_BAD_RESPONSE,e.config,e.request,e))}function iT(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function oT(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,d=0,p;return n=n!==void 0?n:1e3,function(w){const u=Date.now(),f=r[d];p||(p=u),e[m]=w,r[m]=u;let a=d,s=0;for(;a!==m;)s+=e[a++],a=a%t;if(m=(m+1)%t,m===d&&(d=(d+1)%t),u-p<n)return;const c=f&&u-f;return c?Math.round(s*1e3/c):void 0}}function sT(t,n){let e=0,r=1e3/n,m,d;const p=(w,u=Date.now())=>{e=u,m=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const u=Date.now(),f=u-e;f>=r?p(w,u):(m=w,d||(d=setTimeout(()=>{d=null,p(m)},r-f)))},()=>m&&p(m)]}const vc=(t,n,e=3)=>{let r=0;const m=oT(50,250);return sT(d=>{if(!d||typeof d.loaded!="number")return;const p=d.loaded,w=d.lengthComputable?d.total:void 0,u=w!=null?Math.min(p,w):p,f=Math.max(0,u-r),a=m(f);r=Math.max(r,u);const s={loaded:u,total:w,progress:w?u/w:void 0,bytes:f,rate:a||void 0,estimated:a&&w?(w-u)/a:void 0,event:d,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(s)},e)},yy=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},by=t=>(...n)=>ye.asap(()=>t(...n)),aT=kr.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,kr.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(kr.origin),kr.navigator&&/(msie|trident)/i.test(kr.navigator.userAgent)):()=>!0,lT=kr.hasStandardBrowserEnv?{write(t,n,e,r,m,d,p){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];ye.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),ye.isString(r)&&w.push(`path=${r}`),ye.isString(m)&&w.push(`domain=${m}`),d===!0&&w.push("secure"),ye.isString(p)&&w.push(`SameSite=${p}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let e=0;e<n.length;e++){const r=n[e].replace(/^\s+/,""),m=r.indexOf("=");if(m!==-1&&r.slice(0,m)===t)try{return decodeURIComponent(r.slice(m+1))}catch{return r.slice(m+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function cT(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function uT(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}const hT=/^https?:(?!\/\/)/i,dT=/[\t\n\r]/g;function fT(t){let n=0;for(;n<t.length&&t.charCodeAt(n)<=32;)n++;return t.slice(n)}function pT(t){return fT(t).replace(dT,"")}function wy(t,n){if(typeof t=="string"&&hT.test(pT(t)))throw new Qe('Invalid URL: missing "//" after protocol',Qe.ERR_INVALID_URL,n)}function xy(t,n,e,r){wy(n,r);let m=!cT(n);return t&&(m||e===!1)?(wy(t,r),uT(t,n)):n}const Cy=t=>t instanceof Fr?{...t}:t;function Ns(t,n){t=t||{},n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,s,c,h){return ye.isPlainObject(a)&&ye.isPlainObject(s)?ye.merge.call({caseless:h},a,s):ye.isPlainObject(s)?ye.merge({},s):ye.isArray(s)?s.slice():s}function m(a,s,c,h){if(ye.isUndefined(s)){if(!ye.isUndefined(a))return r(void 0,a,c,h)}else return r(a,s,c,h)}function d(a,s){if(!ye.isUndefined(s))return r(void 0,s)}function p(a,s){if(ye.isUndefined(s)){if(!ye.isUndefined(a))return r(void 0,a)}else return r(void 0,s)}function w(a){const s=ye.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ye.isUndefined(s))if(ye.isPlainObject(s)){if(ye.hasOwnProp(s,a))return s[a]}else return;const c=ye.hasOwnProp(t,"transitional")?t.transitional:void 0;if(ye.isPlainObject(c)&&ye.hasOwnProp(c,a))return c[a]}function u(a,s,c){if(ye.hasOwnProp(n,c))return r(a,s);if(ye.hasOwnProp(t,c))return r(void 0,a)}const f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,allowedSocketPaths:p,responseEncoding:p,validateStatus:u,headers:(a,s,c)=>m(Cy(a),Cy(s),c,!0)};return ye.forEach(Object.keys({...t,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=ye.hasOwnProp(f,a)?f[a]:m,c=ye.hasOwnProp(t,a)?t[a]:void 0,h=ye.hasOwnProp(n,a)?n[a]:void 0,o=s(c,h,a);ye.isUndefined(o)&&s!==u||(e[a]=o)}),ye.hasOwnProp(n,"validateStatus")&&ye.isUndefined(n.validateStatus)&&w("validateStatusUndefinedResolves")===!1&&(ye.hasOwnProp(t,"validateStatus")?e.validateStatus=r(void 0,t.validateStatus):delete e.validateStatus),e}const gT=["content-type","content-length"];function mT(t,n,e){if(e!=="content-only"){t.set(n);return}Object.entries(n||{}).forEach(([r,m])=>{gT.includes(r.toLowerCase())&&t.set(r,m)})}const vT=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16)));function _y(t){const n=Ns({},t),e=c=>ye.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const d=e("xsrfHeaderName"),p=e("xsrfCookieName");let w=e("headers");const u=e("auth"),f=e("baseURL"),a=e("allowAbsoluteUrls"),s=e("url");if(n.headers=w=Fr.from(w),n.url=hy(xy(f,s,a,n),e("params"),e("paramsSerializer")),u){const c=ye.getSafeProp(u,"username")||"",h=ye.getSafeProp(u,"password")||"";try{w.set("Authorization","Basic "+btoa(c+":"+(h?vT(h):"")))}catch(o){throw Qe.from(o,Qe.ERR_BAD_OPTION_VALUE,t)}}if(ye.isFormData(r)&&(kr.hasStandardBrowserEnv||kr.hasStandardBrowserWebWorkerEnv||ye.isReactNative(r)?w.setContentType(void 0):ye.isFunction(r.getHeaders)&&mT(w,r.getHeaders(),e("formDataHeaderPolicy"))),kr.hasStandardBrowserEnv&&(ye.isFunction(m)&&(m=m(n)),m===!0||m==null&&aT(n.url))){const c=d&&p&&lT.read(p);c&&w.set(d,c)}return n}const yT=typeof XMLHttpRequest<"u",bT=yT&&function(t){return new Promise(function(n,e){const r=_y(t);let m=r.data;const d=Fr.from(r.headers).normalize();let{responseType:p,onUploadProgress:w,onDownloadProgress:u}=r,f,a,s,c,h;function o(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function g(){if(!l)return;const x=Fr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:t,request:l};vy(function($){n($),o()},function($){e($),o()},E),l=null}"onloadend"in l?l.onloadend=g:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.startsWith("file:"))||setTimeout(g)},l.onabort=function(){l&&(e(new Qe("Request aborted",Qe.ECONNABORTED,t,l)),o(),l=null)},l.onerror=function(x){const E=x&&x.message?x.message:"Network Error",$=new Qe(E,Qe.ERR_NETWORK,t,l);$.event=x||null,e($),o(),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||id;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new Qe(x,E.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,t,l)),o(),l=null},m===void 0&&d.setContentType(null),"setRequestHeader"in l&&ye.forEach(oy(d),function(x,E){l.setRequestHeader(E,x)}),ye.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),u&&([s,h]=vc(u,!0),l.addEventListener("progress",s)),w&&l.upload&&([a,c]=vc(w),l.upload.addEventListener("progress",a),l.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(f=x=>{l&&(e(!x||x.type?new cl(null,t,l):x),l.abort(),o(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const b=iT(r.url);if(b&&!kr.protocols.includes(b)){e(new Qe("Unsupported protocol "+b+":",Qe.ERR_BAD_REQUEST,t)),o();return}l.send(m||null)})},wT=(t,n)=>{if(t=t?t.filter(Boolean):[],!n&&!t.length)return;const e=new AbortController;let r=!1;const m=function(u){if(!r){r=!0,p();const f=u instanceof Error?u:this.reason;e.abort(f instanceof Qe?f:new cl(f instanceof Error?f.message:f))}};let d=n&&setTimeout(()=>{d=null,m(new Qe(`timeout of ${n}ms exceeded`,Qe.ETIMEDOUT))},n);const p=()=>{t&&(d&&clearTimeout(d),d=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(m):u.removeEventListener("abort",m)}),t=null)};t.forEach(u=>u.addEventListener("abort",m,{once:!0}));const{signal:w}=e;return w.unsubscribe=()=>ye.asap(p),w},xT=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},CT=async function*(t,n){for await(const e of _T(t))yield*xT(e,n)},_T=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},Ay=(t,n,e,r)=>{const m=CT(t,n);let d=0,p,w=u=>{p||(p=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:a}=await m.next();if(f){w(),u.close();return}let s=a.byteLength;if(e){let c=d+=s;e(c)}u.enqueue(new Uint8Array(a))}catch(f){throw w(f),f}},cancel(u){return w(u),m.return()}},{highWaterMark:2})},yc=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,AT=(t,n,e)=>n+2<e&&yc(t.charCodeAt(n+1))&&yc(t.charCodeAt(n+2));function kT(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const e=t.slice(5,n),r=t.slice(n+1);if(/;base64/i.test(e)){let d=r.length;const p=r.length;for(let s=0;s<p;s++)if(r.charCodeAt(s)===37&&s+2<p){const c=r.charCodeAt(s+1),h=r.charCodeAt(s+2);yc(c)&&yc(h)&&(d-=2,s+=2)}let w=0,u=p-1;const f=s=>s>=2&&r.charCodeAt(s-2)===37&&r.charCodeAt(s-1)===51&&(r.charCodeAt(s)===68||r.charCodeAt(s)===100);u>=0&&(r.charCodeAt(u)===61?(w++,u--):f(u)&&(w++,u-=3)),w===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&w++;const a=Math.floor(d/4)*3-(w||0);return a>0?a:0}let m=0;for(let d=0,p=r.length;d<p;d++){const w=r.charCodeAt(d);if(w===37&&AT(r,d,p))m+=1,d+=2;else if(w<128)m+=1;else if(w<2048)m+=2;else if(w>=55296&&w<=56319&&d+1<p){const u=r.charCodeAt(d+1);u>=56320&&u<=57343?(m+=4,d++):m+=3}else m+=3}return m}const ld="1.18.1",ky=64*1024,{isFunction:bc}=ye,ST=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16))),Sy=t=>{if(!ye.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},$y=(t,...n)=>{try{return!!t(...n)}catch{return!1}},$T=t=>{const n=t.indexOf("://");let e=t;return n!==-1&&(e=e.slice(n+3)),e.includes("@")||e.includes(":")},TT=t=>{const n=ye.global!==void 0&&ye.global!==null?ye.global:globalThis,{ReadableStream:e,TextEncoder:r}=n;t=ye.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:m,Request:d,Response:p}=t,w=m?bc(m):typeof fetch=="function",u=bc(d),f=bc(p);if(!w)return!1;const a=w&&bc(e),s=w&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new d(b).arrayBuffer())),c=u&&a&&$y(()=>{let b=!1;const x=new d(kr.origin,{body:new e,method:"POST",get duplex(){return b=!0,"half"}}),E=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!E}),h=f&&a&&$y(()=>ye.isReadableStream(new p("").body)),o={stream:h&&(b=>b.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!o[b]&&(o[b]=(x,E)=>{let $=x&&x[b];if($)return $.call(x);throw new Qe(`Response type '${b}' is not supported`,Qe.ERR_NOT_SUPPORT,E)})});const l=async b=>{if(b==null)return 0;if(ye.isBlob(b))return b.size;if(ye.isSpecCompliantForm(b))return(await new d(kr.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(ye.isArrayBufferView(b)||ye.isArrayBuffer(b))return b.byteLength;if(ye.isURLSearchParams(b)&&(b=b+""),ye.isString(b))return(await s(b)).byteLength},g=async(b,x)=>ye.toFiniteNumber(b.getContentLength())??l(x);return async b=>{let{url:x,method:E,data:$,signal:_,cancelToken:C,timeout:L,onDownloadProgress:D,onUploadProgress:I,responseType:M,headers:W,withCredentials:z="same-origin",fetchOptions:O,maxContentLength:T,maxBodyLength:A}=_y(b);const N=ye.isNumber(T)&&T>-1,B=ye.isNumber(A)&&A>-1,U=ie=>ye.hasOwnProp(b,ie)?b[ie]:void 0;let G=m||fetch;M=M?(M+"").toLowerCase():"text";let J=wT([_,C&&C.toAbortSignal()],L),Q=null;const le=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let re,ce=null;const de=()=>new Qe("Request body larger than maxBodyLength limit",Qe.ERR_BAD_REQUEST,b,Q);try{let ie;const fe=U("auth");if(fe){const Me=ye.getSafeProp(fe,"username")||"",$t=ye.getSafeProp(fe,"password")||"";ie={username:Me,password:$t}}if($T(x)){const Me=new URL(x,kr.origin);if(!ie&&(Me.username||Me.password)){const $t=Sy(Me.username),lt=Sy(Me.password);ie={username:$t,password:lt}}(Me.username||Me.password)&&(Me.username="",Me.password="",x=Me.href)}if(ie&&(W.delete("authorization"),W.set("Authorization","Basic "+btoa(ST((ie.username||"")+":"+(ie.password||""))))),N&&typeof x=="string"&&x.startsWith("data:")&&kT(x)>T)throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,b,Q);if(B&&E!=="get"&&E!=="head"){const Me=await l($);if(typeof Me=="number"&&isFinite(Me)&&(re=Me,Me>A))throw de()}const $e=B&&(ye.isReadableStream($)||ye.isStream($)),Re=(Me,$t,lt)=>Ay(Me,ky,Jt=>{if(B&&Jt>A)throw ce=de();$t&&$t(Jt)},lt);if(c&&E!=="get"&&E!=="head"&&(I||$e)){if(re=re??await g(W,$),re!==0||$e){let Me=new d(x,{method:"POST",body:$,duplex:"half"}),$t;if(ye.isFormData($)&&($t=Me.headers.get("content-type"))&&W.setContentType($t),Me.body){const[lt,Jt]=I&&yy(re,vc(by(I)))||[];$=Re(Me.body,lt,Jt)}}}else if($e&&!u&&a&&E!=="get"&&E!=="head")$=Re($);else if($e&&u&&!c&&E!=="get"&&E!=="head")throw new Qe("Stream request bodies are not supported by the current fetch implementation",Qe.ERR_NOT_SUPPORT,b,Q);ye.isString(z)||(z=z?"include":"omit");const Ee=u&&"credentials"in d.prototype;if(ye.isFormData($)){const Me=W.getContentType();Me&&/^multipart\/form-data/i.test(Me)&&!/boundary=/i.test(Me)&&W.delete("content-type")}W.set("User-Agent","axios/"+ld,!1);const Ue={...O,signal:J,method:E.toUpperCase(),headers:oy(W.normalize()),body:$,duplex:"half",credentials:Ee?z:void 0};Q=u&&new d(x,Ue);let He=await(u?G(Q,O):G(x,Ue));const Ge=Fr.from(He.headers);if(N){const Me=ye.toFiniteNumber(Ge.getContentLength());if(Me!=null&&Me>T)throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,b,Q)}const ct=h&&(M==="stream"||M==="response");if(h&&He.body&&(D||N||ct&&le)){const Me={};["status","statusText","headers"].forEach(Nt=>{Me[Nt]=He[Nt]});const $t=ye.toFiniteNumber(Ge.getContentLength()),[lt,Jt]=D&&yy($t,vc(by(D),!0))||[];let hn=0;const Zn=Nt=>{if(N&&(hn=Nt,hn>T))throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,b,Q);lt&<(Nt)};He=new p(Ay(He.body,ky,Zn,()=>{Jt&&Jt(),le&&le()}),Me)}M=M||"text";let We=await o[ye.findKey(o,M)||"text"](He,b);if(N&&!h&&!ct){let Me;if(We!=null&&(typeof We.byteLength=="number"?Me=We.byteLength:typeof We.size=="number"?Me=We.size:typeof We=="string"&&(Me=typeof r=="function"?new r().encode(We).byteLength:We.length)),typeof Me=="number"&&Me>T)throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,b,Q)}return!ct&&le&&le(),await new Promise((Me,$t)=>{vy(Me,$t,{data:We,headers:Fr.from(He.headers),status:He.status,statusText:He.statusText,config:b,request:Q})})}catch(ie){if(le&&le(),J&&J.aborted&&J.reason instanceof Qe){const fe=J.reason;throw fe.config=b,Q&&(fe.request=Q),ie!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:ie,writable:!0,enumerable:!1,configurable:!0}),fe}if(ce)throw Q&&!ce.request&&(ce.request=Q),ce;if(ie instanceof Qe)throw Q&&!ie.request&&(ie.request=Q),ie;if(ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)){const fe=new Qe("Network Error",Qe.ERR_NETWORK,b,Q,ie&&ie.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:ie.cause||ie,writable:!0,enumerable:!1,configurable:!0}),fe}throw Qe.from(ie,ie&&ie.code,b,Q,ie&&ie.response)}}},RT=new Map,Ty=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,d=[r,m,e];let p=d.length,w=p,u,f,a=RT;for(;w--;)u=d[w],f=a.get(u),f===void 0&&a.set(u,f=w?new Map:TT(n)),a=f;return f};Ty();const cd={http:j$,xhr:bT,fetch:{get:Ty}};ye.forEach(cd,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const Ry=t=>`- ${t}`,ET=t=>ye.isFunction(t)||t===null||t===!1;function MT(t,n){t=ye.isArray(t)?t:[t];const{length:e}=t;let r,m;const d={};for(let p=0;p<e;p++){r=t[p];let w;if(m=r,!ET(r)&&(m=cd[(w=String(r)).toLowerCase()],m===void 0))throw new Qe(`Unknown adapter '${w}'`);if(m&&(ye.isFunction(m)||(m=m.get(n))))break;d[w||"#"+p]=m}if(!m){const p=Object.entries(d).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let w=e?p.length>1?`since :
|
|
1483
|
+
`+p.map(Ry).join(`
|
|
1484
|
+
`):" "+Ry(p[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+w,Qe.ERR_NOT_SUPPORT)}return m}const Ey={getAdapter:MT,adapters:cd};function ud(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new cl(null,t)}function My(t){return ud(t),t.headers=Fr.from(t.headers),t.data=ad.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ey.getAdapter(t.adapter||ll.adapter,t)(t).then(function(n){ud(t),t.response=n;try{n.data=ad.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=Fr.from(n.headers),n},function(n){if(!my(n)&&(ud(t),n&&n.response)){t.response=n.response;try{n.response.data=ad.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=Fr.from(n.response.headers)}return Promise.reject(n)})}const wc={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{wc[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const Iy={};wc.transitional=function(t,n,e){function r(m,d){return"[Axios v"+ld+"] Transitional option '"+m+"'"+d+(e?". "+e:"")}return(m,d,p)=>{if(t===!1)throw new Qe(r(d," has been removed"+(n?" in "+n:"")),Qe.ERR_DEPRECATED);return n&&!Iy[d]&&(Iy[d]=!0,console.warn(r(d," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,d,p):!0}},wc.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function IT(t,n,e){if(typeof t!="object"||t===null)throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const d=r[m],p=Object.prototype.hasOwnProperty.call(n,d)?n[d]:void 0;if(p){const w=t[d],u=w===void 0||p(w,d,t);if(u!==!0)throw new Qe("option "+d+" must be "+u,Qe.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Qe("Unknown option "+d,Qe.ERR_BAD_OPTION)}}const xc={assertOptions:IT,validators:wc},Br=xc.validators;let Ds=class{constructor(n){this.defaults=n||{},this.interceptors={request:new dy,response:new dy}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const d=(()=>{if(!m.stack)return"";const p=m.stack.indexOf(`
|
|
1485
|
+
`);return p===-1?"":m.stack.slice(p+1)})();try{if(!r.stack)r.stack=d;else if(d){const p=d.indexOf(`
|
|
1486
|
+
`),w=p===-1?-1:d.indexOf(`
|
|
1487
|
+
`,p+1),u=w===-1?"":d.slice(w+1);String(r.stack).endsWith(u)||(r.stack+=`
|
|
1488
|
+
`+d)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=Ns(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:d}=e;r!==void 0&&xc.assertOptions(r,{silentJSONParsing:Br.transitional(Br.boolean),forcedJSONParsing:Br.transitional(Br.boolean),clarifyTimeoutError:Br.transitional(Br.boolean),legacyInterceptorReqResOrdering:Br.transitional(Br.boolean),advertiseZstdAcceptEncoding:Br.transitional(Br.boolean),validateStatusUndefinedResolves:Br.transitional(Br.boolean)},!1),m!=null&&(ye.isFunction(m)?e.paramsSerializer={serialize:m}:xc.assertOptions(m,{encode:Br.function,serialize:Br.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),xc.assertOptions(e,{baseUrl:Br.spelling("baseURL"),withXsrfToken:Br.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=d&&ye.merge(d.common,d[e.method]);d&&ye.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete d[o]}),e.headers=Fr.concat(p,d);const w=[];let u=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;u=u&&o.synchronous;const l=e.transitional||id;l&&l.legacyInterceptorReqResOrdering?w.unshift(o.fulfilled,o.rejected):w.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let a,s=0,c;if(!u){const o=[My.bind(this),void 0];for(o.unshift(...w),o.push(...f),c=o.length,a=Promise.resolve(e);s<c;)a=a.then(o[s++],o[s++]);return a}c=w.length;let h=e;for(;s<c;){const o=w[s++],l=w[s++];try{h=o(h)}catch(g){l.call(this,g);break}}try{a=My.call(this,h)}catch(o){return Promise.reject(o)}for(s=0,c=f.length;s<c;)a=a.then(f[s++],f[s++]);return a}getUri(n){n=Ns(this.defaults,n);const e=xy(n.baseURL,n.url,n.allowAbsoluteUrls,n);return hy(e,n.params,n.paramsSerializer)}};ye.forEach(["delete","get","head","options"],function(t){Ds.prototype[t]=function(n,e){return this.request(Ns(e||{},{method:t,url:n,data:e&&ye.hasOwnProp(e,"data")?e.data:void 0}))}}),ye.forEach(["post","put","patch","query"],function(t){function n(e){return function(r,m,d){return this.request(Ns(d||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}Ds.prototype[t]=n(),t!=="query"&&(Ds.prototype[t+"Form"]=n(!0))});let LT=class yw{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](m);r._listeners=null}),this.promise.then=m=>{let d;const p=new Promise(w=>{r.subscribe(w),d=w}).then(m);return p.cancel=function(){r.unsubscribe(d)},p},n(function(m,d,p){r.reason||(r.reason=new cl(m,d,p),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new yw(function(e){n=e}),cancel:n}}};function OT(t){return function(n){return t.apply(null,n)}}function NT(t){return ye.isObject(t)&&t.isAxiosError===!0}const hd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hd).forEach(([t,n])=>{hd[n]=t});function Ly(t){const n=new Ds(t),e=Kv(Ds.prototype.request,n);return ye.extend(e,Ds.prototype,n,{allOwnKeys:!0}),ye.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return Ly(Ns(t,r))},e}const ir=Yn("T",Ly(ll));ir.Axios=Ds,ir.CanceledError=cl,ir.CancelToken=LT,ir.isCancel=my,ir.VERSION=ld,ir.toFormData=mc,ir.AxiosError=Qe,ir.Cancel=ir.CanceledError,ir.all=function(t){return Promise.all(t)},ir.spread=OT,ir.isAxiosError=NT,ir.mergeConfig=Ns,ir.AxiosHeaders=Fr,ir.formToJSON=t=>gy(ye.isHTMLForm(t)?new FormData(t):t),ir.getAdapter=Ey.getAdapter,ir.HttpStatusCode=hd,ir.default=ir;const{Axios:FD,AxiosError:BD,CanceledError:WD,isCancel:jD,CancelToken:HD,VERSION:UD,all:VD,Cancel:qD,isAxiosError:GD,spread:KD,toFormData:YD,AxiosHeaders:JD,HttpStatusCode:ZD,formToJSON:XD,getAdapter:QD,mergeConfig:eP,create:tP}=ir;function Oy(){return Object.assign({},ia())}function DT(t,n,e){const r=Zr(t,e?.in);return r.setTime(r.getTime()+n*Gl),r}function PT(t,n){const e=()=>Co(n?.in,NaN),r=WT(t);let m;if(r.date){const u=jT(r.date,2);m=HT(u.restDateString,u.year)}if(!m||isNaN(+m))return e();const d=+m;let p=0,w;if(r.time&&(p=UT(r.time),isNaN(p)))return e();if(r.timezone){if(w=VT(r.timezone),isNaN(w))return e()}else{const u=new Date(d+p),f=Zr(0,n?.in);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return Zr(d+p+w,n?.in)}const Cc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},zT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,FT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,BT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function WT(t){const n={},e=t.split(Cc.dateTimeDelimiter);let r;if(e.length>2)return n;if(/:/.test(e[0])?r=e[0]:(n.date=e[0],r=e[1],Cc.timeZoneDelimiter.test(n.date)&&(n.date=t.split(Cc.timeZoneDelimiter)[0],r=t.substr(n.date.length,t.length))),r){const m=Cc.timezone.exec(r);m?(n.time=r.replace(m[1],""),n.timezone=m[1]):n.time=r}return n}function jT(t,n){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=t.match(e);if(!r)return{year:NaN,restDateString:""};const m=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?m:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function HT(t,n){if(n===null)return new Date(NaN);const e=t.match(zT);if(!e)return new Date(NaN);const r=!!e[4],m=ul(e[1]),d=ul(e[2])-1,p=ul(e[3]),w=ul(e[4]),u=ul(e[5])-1;if(r)return JT(n,w,u)?qT(n,w,u):new Date(NaN);{const f=new Date(0);return!KT(n,d,p)||!YT(n,m)?new Date(NaN):(f.setUTCFullYear(n,d,Math.max(m,p)),f)}}function ul(t){return t?parseInt(t):1}function UT(t){const n=t.match(FT);if(!n)return NaN;const e=dd(n[1]),r=dd(n[2]),m=dd(n[3]);return ZT(e,r,m)?e*zu+r*Gl+m*1e3:NaN}function dd(t){return t&&parseFloat(t.replace(",","."))||0}function VT(t){if(t==="Z")return 0;const n=t.match(BT);if(!n)return 0;const e=n[1]==="+"?-1:1,r=parseInt(n[2]),m=n[3]&&parseInt(n[3])||0;return XT(r,m)?e*(r*zu+m*Gl):NaN}function qT(t,n,e){const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,d=(n-1)*7+e+1-m;return r.setUTCDate(r.getUTCDate()+d),r}const GT=[31,null,31,30,31,30,31,31,30,31,30,31];function Ny(t){return t%400===0||t%4===0&&t%100!==0}function KT(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(GT[n]||(Ny(t)?29:28))}function YT(t,n){return n>=1&&n<=(Ny(t)?366:365)}function JT(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}function ZT(t,n,e){return t===24?n===0&&e===0:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}function XT(t,n){return n>=0&&n<=59}function QT(t,n,e){return DT(t,-n,e)}function Dy(t,n,e){const r=Oy(),m=nR(t,e.timeZone,e.locale??r.locale);return"formatToParts"in m?eR(m,n):tR(m,n)}function eR(t,n){const e=t.formatToParts(n);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function tR(t,n){const e=t.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function nR(t,n,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:n,timeZoneName:t})}function rR(t,n){const e=lR(n);return"formatToParts"in e?oR(e,t):sR(e,t)}const iR={year:0,month:1,day:2,hour:3,minute:4,second:5};function oR(t,n){try{const e=t.formatToParts(n),r=[];for(let m=0;m<e.length;m++){const d=iR[e[m].type];d!==void 0&&(r[d]=parseInt(e[m].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function sR(t,n){const e=t.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const fd={},Py=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")),aR=Py==="06/25/2014, 00:00:00"||Py==="06/25/2014 00:00:00";function lR(t){return fd[t]||(fd[t]=aR?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),fd[t]}function zy(t,n,e,r,m,d,p){const w=new Date(0);return w.setUTCFullYear(t,n,e),w.setUTCHours(r,m,d,p),w}const Fy=36e5,cR=6e4,pd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function gd(t,n,e){if(!t)return 0;let r=pd.timezoneZ.exec(t);if(r)return 0;let m,d;if(r=pd.timezoneHH.exec(t),r)return m=parseInt(r[1],10),By(m)?-(m*Fy):NaN;if(r=pd.timezoneHHMM.exec(t),r){m=parseInt(r[2],10);const p=parseInt(r[3],10);return By(m,p)?(d=Math.abs(m)*Fy+p*cR,r[1]==="+"?-d:d):NaN}if(dR(t)){n=new Date(n||Date.now());const p=e?n:uR(n),w=md(p,t);return-(e?w:hR(n,w,t))}return NaN}function uR(t){return zy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function md(t,n){const e=rR(t,n),r=zy(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let m=t.getTime();const d=m%1e3;return m-=d>=0?d:1e3+d,r-m}function hR(t,n,e){let r=t.getTime()-n;const m=md(new Date(r),e);if(n===m)return n;r-=m-n;const d=md(new Date(r),e);return m===d?m:Math.max(m,d)}function By(t,n){return-23<=t&&t<=23&&(n==null||0<=n&&n<=59)}const Wy={};function dR(t){if(Wy[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Wy[t]=!0,!0}catch{return!1}}const fR=60*1e3,pR={X:function(t,n,e){const r=vd(e.timeZone,t);if(r===0)return"Z";switch(n){case"X":return jy(r);case"XXXX":case"XX":return Ca(r);default:return Ca(r,":")}},x:function(t,n,e){const r=vd(e.timeZone,t);switch(n){case"x":return jy(r);case"xxxx":case"xx":return Ca(r);default:return Ca(r,":")}},O:function(t,n,e){const r=vd(e.timeZone,t);switch(n){case"O":case"OO":case"OOO":return"GMT"+gR(r,":");default:return"GMT"+Ca(r,":")}},z:function(t,n,e){switch(n){case"z":case"zz":case"zzz":return Dy("short",t,e);default:return Dy("long",t,e)}}};function vd(t,n){const e=t?gd(t,n,!0)/fR:n?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+t);return e}function _c(t,n){const e=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<n;)r="0"+r;return e+r}function Ca(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=_c(Math.floor(r/60),2),d=_c(Math.floor(r%60),2);return e+m+n+d}function jy(t,n){return t%60===0?(t>0?"-":"+")+_c(Math.abs(t)/60,2):Ca(t,n)}function gR(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.floor(r/60),d=r%60;return d===0?e+String(m):e+String(m)+n+_c(d,2)}function Hy(t){const n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+t-+n}const mR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,yd=36e5,Uy=6e4,vR=2,Qr={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:mR};function Vy(t,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const e=n.additionalDigits==null?vR:Number(n.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=yR(t),{year:m,restDateString:d}=bR(r.date,e),p=wR(d,m);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const w=p.getTime();let u=0,f;if(r.time&&(u=xR(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=gd(r.timeZone||n.timeZone,new Date(w+u)),isNaN(f))return new Date(NaN)}else f=Hy(new Date(w+u)),f=Hy(new Date(w+u+f));return new Date(w+u+f)}else return new Date(NaN)}function yR(t){const n={};let e=Qr.dateTimePattern.exec(t),r;if(e?(n.date=e[1],r=e[3]):(e=Qr.datePattern.exec(t),e?(n.date=e[1],r=e[2]):(n.date=null,r=t)),r){const m=Qr.timeZone.exec(r);m?(n.time=r.replace(m[1],""),n.timeZone=m[1].trim()):n.time=r}return n}function bR(t,n){if(t){const e=Qr.YYY[n],r=Qr.YYYYY[n];let m=Qr.YYYY.exec(t)||r.exec(t);if(m){const d=m[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(m=Qr.YY.exec(t)||e.exec(t),m){const d=m[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function wR(t,n){if(n===null)return null;let e,r,m;if(!t||!t.length)return e=new Date(0),e.setUTCFullYear(n),e;let d=Qr.MM.exec(t);if(d)return e=new Date(0),r=parseInt(d[1],10)-1,Ky(n,r)?(e.setUTCFullYear(n,r),e):new Date(NaN);if(d=Qr.DDD.exec(t),d){e=new Date(0);const p=parseInt(d[1],10);return AR(n,p)?(e.setUTCFullYear(n,0,p),e):new Date(NaN)}if(d=Qr.MMDD.exec(t),d){e=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return Ky(n,r,p)?(e.setUTCFullYear(n,r,p),e):new Date(NaN)}if(d=Qr.Www.exec(t),d)return m=parseInt(d[1],10)-1,Yy(m)?qy(n,m):new Date(NaN);if(d=Qr.WwwD.exec(t),d){m=parseInt(d[1],10)-1;const p=parseInt(d[2],10)-1;return Yy(m,p)?qy(n,m,p):new Date(NaN)}return null}function xR(t){let n,e,r=Qr.HH.exec(t);if(r)return n=parseFloat(r[1].replace(",",".")),bd(n)?n%24*yd:NaN;if(r=Qr.HHMM.exec(t),r)return n=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),bd(n,e)?n%24*yd+e*Uy:NaN;if(r=Qr.HHMMSS.exec(t),r){n=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return bd(n,e,m)?n%24*yd+e*Uy+m*1e3:NaN}return null}function qy(t,n,e){n=n||0,e=e||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,d=n*7+e+1-m;return r.setUTCDate(r.getUTCDate()+d),r}const CR=[31,28,31,30,31,30,31,31,30,31,30,31],_R=[31,29,31,30,31,30,31,31,30,31,30,31];function Gy(t){return t%400===0||t%4===0&&t%100!==0}function Ky(t,n,e){if(n<0||n>11)return!1;if(e!=null){if(e<1)return!1;const r=Gy(t);if(r&&e>_R[n]||!r&&e>CR[n])return!1}return!0}function AR(t,n){if(n<1)return!1;const e=Gy(t);return!(e&&n>366||!e&&n>365)}function Yy(t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function bd(t,n,e){return!(t<0||t>=25||n!=null&&(n<0||n>=60)||e!=null&&(e<0||e>=60))}const kR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function SR(t,n,e={}){n=String(n);const r=n.match(kR);if(r){const m=Vy(e.originalDate||t,e);n=r.reduce(function(d,p){if(p[0]==="'")return d;const w=d.indexOf(p),u=d[w-1]==="'",f=d.replace(p,"'"+pR[p[0]](m,p,e)+"'");return u?f.substring(0,w-1)+f.substring(w+1):f},n)}return ns(t,n,e)}function $R(t,n,e){t=Vy(t,e);const r=gd(n,t,!0),m=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),d.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),d}function Ac(t,n,e,r){return r={...r,timeZone:n,originalDate:t},SR($R(t,n,{timeZone:r.timeZone}),e,r)}const kc="yyyy-MM-dd",Jy="HH:mm:ss.SSS",Zy="HH:mm:ss",Sc=`${kc} ${Jy}`,Xy=`${kc} ${Zy}`,TR=Yn("a",{methods:{parseDateTime(t,n){return t.includes(" ")&&(t=t.replace(" ","T")),n&&n==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,n){return ns(!n||n==="local"?QT(t,t.getTimezoneOffset()):t,Sc)},formatDateTime(t,n){return!n||n==="local"?ns(t,Sc):Ac(t,n,Sc)},formatDateTimeHMS(t,n){return!n||n==="local"?ns(t,Xy):Ac(t,n,Xy)},formatDate:function(t,n){return!n||n==="local"?ns(t,kc):Ac(t,this.timeZone,kc)},formatTime:function(t,n,e=Jy){return!n||n==="local"?ns(t,e):Ac(t,this.timeZone,e)},formatTimeHMS:function(t,n){return this.formatTime(t,n,Zy)},formatTimestamp(t,n){return this.formatDateTime(PT(t),n)},formatSeconds(t,n){return this.formatDateTime(new Date(t*1e3),n)},formatNanoseconds(t,n){return this.formatDateTime(new Date(parseInt(t)/1e6),n)}}}),Qy=100,e0=Yn("g",jf("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:t=>n=>t.namedWidgets[n]},actions:{notifyAddHistory(t){this.notifyHistory.length>=Qy&&(this.notifyHistory.length=Qy-1),this.notifyHistory.unshift(t)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(t){Object.assign(this.namedWidgets,t)},clearNamedWidget(t){delete this.namedWidgets[t]},updatePlayback(t){Object.assign(this.playback,t)}}})),_a=Hf();_a.use(({store:t})=>{t.commit=(n,e)=>{typeof t[n]=="function"&&t[n](e)},t.dispatch=(n,e)=>{if(typeof t[n]=="function")return t[n](e)}});const RR=_a.install.bind(_a);_a.install=t=>{RR(t);const n=e0(_a);t.config.globalProperties.$store={state:new Proxy({},{get(e,r){return n.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,m]=r.split("/");return n[m]}return n[r]}}),commit(e,r){if(e.includes("/")){const[,m]=e.split("/");n[m]?.(r)}else n[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,m]=e.split("/");return n[m]?.(r)}else return n[e]?.(r)}}};const ER="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=",MR={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return ER},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=zR.indexOf($c[this.status]),n=1-(t-1)*.05,e=224*this.scaleFactor*n,r=32*this.scaleFactor*n,m=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${t*m}px;`,`background-size: ${e}px ${r}px;`,`height: ${m}px;`,`width: ${m}px;`,`padding-top: ${t-1}px;`].join("")}}};function IR(t,n,e,r,m,d){return jn(),li("div",{style:Zs(d.iconStyle)},null,4)}const LR=bs(MR,[["render",IR]]),OR={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function NR(t,n,e,r,m,d){const p=tn("rux-icon");return jn(),Po(p,{size:e.size,icon:e.icon,style:Zs(d.colorStyle)},null,8,["size","icon","style"])}const DR=bs(OR,[["render",NR],["__scopeId","data-v-bb4cd487"]]),$c={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"},hl={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},PR=function(t){const n="#000000",e="#ffffff",r=hl[$c[t]];if(r){const m=+`0x${r.slice(1,3)}`,d=+`0x${r.slice(3,5)}`,p=+`0x${r.slice(5,7)}`;if((m*299+d*587+p*114)/1e3>128)return n}return e},zR=Object.keys(hl),FR={astro:{component:t=>Js(DR,{...t})},"astro-status":{component:t=>Js(LR,{...t,status:t.icon})}},BR={extras:{component:t=>Js(Nw,{...t})}},WR={mixins:[TR],props:{historyCount:{type:Number,default:200},timeZone:{type:String,default:"local"}},data(){return{AstroStatusColors:hl,data:[],shownData:[],logLevels:["DEBUG","INFO","WARN","ERROR","FATAL"],logLevel:"INFO",search:"",headers:[{title:"Time",value:"timestamp",nowrap:!0},{title:"Level",value:"level"},{title:"Source",value:"microservice_name"},{title:"Message",value:"message"}],cable:new Kp,subscription:null,paused:!1}},computed:{buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},watch:{logLevel:function(t,n){this.createSubscription()}},created(){this.createSubscription()},unmounted(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{pause:function(){this.paused=!this.paused},createSubscription(){this.subscription&&(this.subscription.unsubscribe(),this.data=[],this.shownData=this.data),this.cable.createSubscription("MessagesChannel",window.openc3Scope,{received:t=>{this.cable.recordPing(),t.length>this.historyCount&&t.splice(0,t.length-this.historyCount),t=t.filter(n=>{switch(this.logLevel){case"DEBUG":return!0;case"INFO":if(n.level!=="DEBUG")return!0;break;case"WARN":if(n.level!=="DEBUG"&&n.level!=="INFO")return!0;break;case"ERROR":if(n.level!=="DEBUG"&&n.level!=="INFO"&&n.level!=="WARN")return!0;break;case"FATAL":if(n.level!=="DEBUG"&&n.level!=="INFO"&&n.level!=="WARN"&&n.level!=="ERROR")return!0;break}return!1}),t.map(n=>{if(n.timestamp=this.formatTimestamp(n["@timestamp"],this.timeZone),n.message.raw&&n.message.json_class==="String"){let e="0x";for(let r=0;r<n.message.raw.length;r++)e+=n.message.raw[r].toString(16).padStart(2,"0").toUpperCase();n.message=e}else n.message=n.message.replaceAll("\\n",`
|
|
1489
|
+
`)}),this.data=t.reverse().concat(this.data),this.data.length>this.historyCount&&(this.data.length=this.historyCount),this.paused||(this.shownData=this.data)}},{history_count:this.historyCount,types:["log","notification","alert"]}).then(t=>{this.subscription=t})},getColor(t){return hl[$c[t]]},getStatus(t){return $c[t]},downloadLog(){const t=this.shownData.sort((r,m)=>r.time-m.time).map(r=>`${r.timestamp} | ${r.level} | ${r.microservice_name} | ${r.message}`).join(`
|
|
1490
|
+
`),n=new Blob([t],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(n),e.setAttribute("download",ns(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_message_log.txt"),e.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(t=>{this.data=[],this.shownData=[]}).catch(function(t){})}}},jR={class:"d-flex align-baseline"},HR=["title","datetime"],UR={style:{"white-space":"pre-wrap"}};function VR(t,n,e,r,m,d){const p=tn("v-btn"),w=tn("v-spacer"),u=tn("v-select"),f=tn("v-text-field"),a=tn("v-card-title"),s=tn("rux-status"),c=tn("v-data-table"),h=tn("v-card");return jn(),Po(h,null,{default:Dn(()=>[qt(a,{class:"d-flex align-center justify-content-space-between"},{default:Dn(()=>[Yr("div",jR,[qt(p,{icon:"mdi-download",variant:"text",size:"small",class:"mr-2","data-test":"download-log",onClick:d.downloadLog},null,8,["onClick"]),n[2]||(n[2]=Yr("span",null," Log Messages ",-1)),qt(p,{icon:d.buttonIcon,variant:"text","data-test":"pause",onClick:d.pause},null,8,["icon","onClick"])]),qt(w),qt(u,{modelValue:m.logLevel,"onUpdate:modelValue":n[0]||(n[0]=o=>m.logLevel=o),label:"Filter by log level","hide-details":"",variant:"outlined",density:"compact",items:m.logLevels,class:"mr-2",style:{"max-width":"150px"},"data-test":"log-messages-level"},null,8,["modelValue","items"]),qt(w),qt(f,{modelValue:m.search,"onUpdate:modelValue":n[1]||(n[1]=o=>m.search=o),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"},class:"search","data-test":"search-log-messages"},null,8,["modelValue"]),qt(p,{icon:"mdi-delete-sweep",variant:"text",class:"ml-2","data-test":"clear-log",onClick:d.clearLog},null,8,["onClick"])]),_:1}),qt(c,{headers:m.headers,items:m.shownData,search:m.search,"items-per-page":-1,"hide-default-footer":"","sort-by":[{key:"time",order:"desc"}],density:"compact","fixed-header":"",hover:"","data-test":"log-messages"},{"item.timestamp":Dn(({item:o})=>[Yr("time",{title:o.timestamp,datetime:o.timestamp},Jr(o.timestamp),9,HR)]),"item.level":Dn(({item:o})=>[Yr("span",{style:Zs("display: inline-flex; color:"+d.getColor(o.level))},[qt(s,{class:"mr-1",status:d.getStatus(o.level)},null,8,["status"]),_i(" "+Jr(o.level),1)],4)]),"item.message":Dn(({item:o})=>[Yr("div",UR,Jr(o.message),1)]),_:1},8,["headers","items","search"])]),_:1})}const nP=Yn("R",bs(WR,[["render",VR],["__scopeId","data-v-c836b935"]])),qR=50,GR=2e3,t0="single-spa:app-change",KR={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(t0,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},GR)},unmounted(){window.removeEventListener(t0,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=fu().length>0,fu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},qR)}}},YR={class:"mx-1"},JR={key:1,class:"d-flex justify-center align-center"};function ZR(t,n,e,r,m,d){const p=tn("v-card-title"),w=tn("v-card-text"),u=tn("v-card"),f=tn("v-progress-circular");return jn(),li(Ml,null,[m.show?(jn(),Po(u,{key:0},{default:Dn(()=>[qt(p,null,{default:Dn(()=>[...n[0]||(n[0]=[_i(" 404 Not Found ",-1)])]),_:1}),qt(w,{class:"d-flex align-center mt-3"},{default:Dn(()=>[n[1]||(n[1]=_i(" The requested URL ",-1)),Yr("code",YR,Jr(t.$route.fullPath),1),n[2]||(n[2]=_i(" was not routable. ",-1)),n[3]||(n[3]=Yr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):zo("",!0),d.showSpinner?(jn(),li("div",JR,[qt(f,{indeterminate:""})])):zo("",!0)],64)}const n0=[{path:"",component:()=>ot(()=>it.import("./CmdTlmServer-dbb3257de023db2ad7db.js"),void 0),children:[{component:()=>ot(()=>it.import("./InterfacesTab-c3d2cc4844087b3f946d.js"),void 0),path:""},{component:()=>ot(()=>it.import("./InterfacesTab-c3d2cc4844087b3f946d.js"),void 0),name:"InterfacesTab",path:"interfaces"},{component:()=>ot(()=>it.import("./TargetsTab-326711a03f6c9686634d.js"),void 0),name:"TargetsTab",path:"targets"},{component:()=>ot(()=>it.import("./CmdPacketsTab-ab63982334bccb674566.js"),void 0),name:"CmdPacketsTab",path:"cmd-packets"},{component:()=>ot(()=>it.import("./TlmPacketsTab-91250bba537c7eb02f7c.js"),void 0),name:"TlmPacketsTab",path:"tlm-packets"},{component:()=>ot(()=>it.import("./RoutersTab-7710ec67843901567d25.js"),void 0),name:"RoutersTab",path:"routers"},{component:()=>ot(()=>it.import("./DataFlowsTab-651405c9f3cd11ec53ae.js"),void 0),name:"DataFlowsTab",path:"data-flows"},{component:()=>ot(()=>it.import("./StatusTab-efcdd278c79f71b06e9b.js"),void 0),name:"StatusTab",props:{refreshInterval:5e3},path:"status"}]},{path:"/:pathMatch(.*)*",name:"NotFound",component:bs(KR,[["render",ZR]])}];n0.forEach(t=>qf(t));const XR=Bf({history:Wf(),routes:n0});function r0(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function QR(t){if(Array.isArray(t))return t}function eE(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var r,m,d,p,w=[],u=!0,f=!1;try{if(d=(e=e.call(t)).next,n!==0)for(;!(u=(r=d.call(e)).done)&&(w.push(r.value),w.length!==n);u=!0);}catch(a){f=!0,m=a}finally{try{if(!u&&e.return!=null&&(p=e.return(),Object(p)!==p))return}finally{if(f)throw m}}return w}}function tE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1491
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nE(t,n){return QR(t)||eE(t,n)||rE(t,n)||tE()}function rE(t,n){if(t){if(typeof t=="string")return r0(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r0(t,n):void 0}}const i0=Object.entries,o0=Object.setPrototypeOf,iE=Object.isFrozen,oE=Object.getPrototypeOf,sE=Object.getOwnPropertyDescriptor;let Sr=Object.freeze,$r=Object.seal,Aa=Object.create,s0=typeof Reflect<"u"&&Reflect,wd=s0.apply,xd=s0.construct;Sr||(Sr=function(t){return t}),$r||($r=function(t){return t}),wd||(wd=function(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),m=2;m<e;m++)r[m-2]=arguments[m];return t.apply(n,r)}),xd||(xd=function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return new t(...e)});const dl=or(Array.prototype.forEach),aE=or(Array.prototype.lastIndexOf),a0=or(Array.prototype.pop),ka=or(Array.prototype.push),lE=or(Array.prototype.splice),ss=Array.isArray,fl=or(String.prototype.toLowerCase),Cd=or(String.prototype.toString),l0=or(String.prototype.match),pl=or(String.prototype.replace),c0=or(String.prototype.indexOf),cE=or(String.prototype.trim),uE=or(Number.prototype.toString),hE=or(Boolean.prototype.toString),u0=typeof BigInt>"u"?null:or(BigInt.prototype.toString),h0=typeof Symbol>"u"?null:or(Symbol.prototype.toString),wr=or(Object.prototype.hasOwnProperty),gl=or(Object.prototype.toString),Tr=or(RegExp.prototype.test),Ps=dE(TypeError);function or(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),m=1;m<e;m++)r[m-1]=arguments[m];return wd(t,n,r)}}function dE(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return xd(t,e)}}function Gt(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fl;if(o0&&o0(t,null),!ss(n))return t;let r=n.length;for(;r--;){let m=n[r];if(typeof m=="string"){const d=e(m);d!==m&&(iE(n)||(n[r]=d),m=d)}t[m]=!0}return t}function fE(t){for(let n=0;n<t.length;n++)wr(t,n)||(t[n]=null);return t}function ei(t){const n=Aa(null);for(const r of i0(t)){var e=nE(r,2);const m=e[0],d=e[1];wr(t,m)&&(ss(d)?n[m]=fE(d):d&&typeof d=="object"&&d.constructor===Object?n[m]=ei(d):n[m]=d)}return n}function pE(t){switch(typeof t){case"string":return t;case"number":return uE(t);case"boolean":return hE(t);case"bigint":return u0?u0(t):"0";case"symbol":return h0?h0(t):"Symbol()";case"undefined":return gl(t);case"function":case"object":{if(t===null)return gl(t);const n=t,e=Ao(n,"toString");if(typeof e=="function"){const r=e(n);return typeof r=="string"?r:gl(r)}return gl(t)}default:return gl(t)}}function Ao(t,n){for(;t!==null;){const r=sE(t,n);if(r){if(r.get)return or(r.get);if(typeof r.value=="function")return or(r.value)}t=oE(t)}function e(){return null}return e}function gE(t){try{return Tr(t,""),!0}catch{return!1}}const d0=Sr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),_d=Sr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ad=Sr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mE=Sr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),kd=Sr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vE=Sr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),f0=Sr(["#text"]),p0=Sr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Sd=Sr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),g0=Sr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tc=Sr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yE=$r(/{{[\w\W]*|^[\w\W]*}}/g),bE=$r(/<%[\w\W]*|^[\w\W]*%>/g),wE=$r(/\${[\w\W]*/g),xE=$r(/^data-[\-\w.\u00B7-\uFFFF]+$/),CE=$r(/^aria-[\-\w]+$/),m0=$r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_E=$r(/^(?:\w+script|data):/i),AE=$r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kE=$r(/^html$/i),SE=$r(/^[a-z][.\w]*(-[.\w]+)+$/i),v0=$r(/<[/\w!]/g),$E=$r(/<[/\w]/g),TE=$r(/<\/no(script|embed|frames)/i),RE=$r(/\/>/i),ko={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},EE=function(){return typeof window>"u"?null:window},ME=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(e=n.getAttribute(r));const m="dompurify"+(e?"#"+e:"");try{return t.createPolicy(m,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},y0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},as=function(t,n,e,r){return wr(t,n)&&ss(t[n])?Gt(r.base?ei(r.base):{},t[n],r.transform):e};function b0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EE();const n=ne=>b0(ne);if(n.version="3.4.11",n.removed=[],!t||!t.document||t.document.nodeType!==ko.document||!t.Element)return n.isSupported=!1,n;let e=t.document;const r=e,m=r.currentScript;t.DocumentFragment;const d=t.HTMLTemplateElement,p=t.Node,w=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const a=t.DOMParser,s=t.trustedTypes,c=w.prototype,h=Ao(c,"cloneNode"),o=Ao(c,"remove"),l=Ao(c,"nextSibling"),g=Ao(c,"childNodes"),b=Ao(c,"parentNode"),x=Ao(c,"shadowRoot"),E=Ao(c,"attributes"),$=p&&p.prototype?Ao(p.prototype,"nodeType"):null,_=p&&p.prototype?Ao(p.prototype,"nodeName"):null;if(typeof d=="function"){const ne=e.createElement("template");ne.content&&ne.content.ownerDocument&&(e=ne.content.ownerDocument)}let C,L="",D,I=!1,M=0;const W=function(){if(M>0)throw Ps('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(ne){W(),M++;try{return C.createHTML(ne)}finally{M--}},O=function(ne){W(),M++;try{return C.createScriptURL(ne)}finally{M--}},T=function(){return I||(D=ME(s,m),I=!0),D},A=e,N=A.implementation,B=A.createNodeIterator,U=A.createDocumentFragment,G=A.getElementsByTagName,J=r.importNode;let Q=y0();n.isSupported=typeof i0=="function"&&typeof b=="function"&&N&&N.createHTMLDocument!==void 0;const le=yE,re=bE,ce=wE,de=xE,ie=CE,fe=_E,$e=AE,Re=SE;let Ee=m0,Ue=null;const He=Gt({},[...d0,..._d,...Ad,...kd,...f0]);let Ge=null;const ct=Gt({},[...p0,...Sd,...g0,...Tc]);let We=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,$t=null;const lt=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Jt=!0,hn=!0,Zn=!1,Nt=!0,An=!1,gt=!0,Ye=!1,It=!1,kn=null,Pn=null,Hn=!1,zn=!1,gn=!1,Rn=!1,Xn=!0,Qt=!1;const Un="user-content-";let $i=!0,ti=!1,sr={},Vn=null;const Ti=Gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let gr=null;const Hi=Gt({},["audio","video","img","source","image","track"]);let Ri=null;const ls=Gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xr="http://www.w3.org/1998/Math/MathML",So="http://www.w3.org/2000/svg",Rr="http://www.w3.org/1999/xhtml";let hi=Rr,ni=!1,Sn=null;const Wr=Gt({},[xr,So,Rr],Cd),jr=Sr(["mi","mo","mn","ms","mtext"]);let $n=Gt({},jr);const Qn=Sr(["annotation-xml"]);let di=Gt({},Qn);const Ei=Gt({},["title","style","font","a","script"]);let Mi=null;const cs=["application/xhtml+xml","text/html"],zs="text/html";let dn=null,Cr=null;const fi=e.createElement("form"),Lt=function(ne){return ne instanceof RegExp||ne instanceof Function},$o=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Cr&&Cr===ne)return;(!ne||typeof ne!="object")&&(ne={}),ne=ei(ne),Mi=cs.indexOf(ne.PARSER_MEDIA_TYPE)===-1?zs:ne.PARSER_MEDIA_TYPE,dn=Mi==="application/xhtml+xml"?Cd:fl,Ue=as(ne,"ALLOWED_TAGS",He,{transform:dn}),Ge=as(ne,"ALLOWED_ATTR",ct,{transform:dn}),Sn=as(ne,"ALLOWED_NAMESPACES",Wr,{transform:Cd}),Ri=as(ne,"ADD_URI_SAFE_ATTR",ls,{transform:dn,base:ls}),gr=as(ne,"ADD_DATA_URI_TAGS",Hi,{transform:dn,base:Hi}),Vn=as(ne,"FORBID_CONTENTS",Ti,{transform:dn}),Me=as(ne,"FORBID_TAGS",ei({}),{transform:dn}),$t=as(ne,"FORBID_ATTR",ei({}),{transform:dn}),sr=wr(ne,"USE_PROFILES")?ne.USE_PROFILES&&typeof ne.USE_PROFILES=="object"?ei(ne.USE_PROFILES):ne.USE_PROFILES:!1,Jt=ne.ALLOW_ARIA_ATTR!==!1,hn=ne.ALLOW_DATA_ATTR!==!1,Zn=ne.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=ne.ALLOW_SELF_CLOSE_IN_ATTR!==!1,An=ne.SAFE_FOR_TEMPLATES||!1,gt=ne.SAFE_FOR_XML!==!1,Ye=ne.WHOLE_DOCUMENT||!1,zn=ne.RETURN_DOM||!1,gn=ne.RETURN_DOM_FRAGMENT||!1,Rn=ne.RETURN_TRUSTED_TYPE||!1,Hn=ne.FORCE_BODY||!1,Xn=ne.SANITIZE_DOM!==!1,Qt=ne.SANITIZE_NAMED_PROPS||!1,$i=ne.KEEP_CONTENT!==!1,ti=ne.IN_PLACE||!1,Ee=gE(ne.ALLOWED_URI_REGEXP)?ne.ALLOWED_URI_REGEXP:m0,hi=typeof ne.NAMESPACE=="string"?ne.NAMESPACE:Rr,$n=wr(ne,"MATHML_TEXT_INTEGRATION_POINTS")&&ne.MATHML_TEXT_INTEGRATION_POINTS&&typeof ne.MATHML_TEXT_INTEGRATION_POINTS=="object"?ei(ne.MATHML_TEXT_INTEGRATION_POINTS):Gt({},jr),di=wr(ne,"HTML_INTEGRATION_POINTS")&&ne.HTML_INTEGRATION_POINTS&&typeof ne.HTML_INTEGRATION_POINTS=="object"?ei(ne.HTML_INTEGRATION_POINTS):Gt({},Qn);const Se=wr(ne,"CUSTOM_ELEMENT_HANDLING")&&ne.CUSTOM_ELEMENT_HANDLING&&typeof ne.CUSTOM_ELEMENT_HANDLING=="object"?ei(ne.CUSTOM_ELEMENT_HANDLING):Aa(null);if(We=Aa(null),wr(Se,"tagNameCheck")&&Lt(Se.tagNameCheck)&&(We.tagNameCheck=Se.tagNameCheck),wr(Se,"attributeNameCheck")&&Lt(Se.attributeNameCheck)&&(We.attributeNameCheck=Se.attributeNameCheck),wr(Se,"allowCustomizedBuiltInElements")&&typeof Se.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=Se.allowCustomizedBuiltInElements),$r(We),An&&(hn=!1),gn&&(zn=!0),sr&&(Ue=Gt({},f0),Ge=Aa(null),sr.html===!0&&(Gt(Ue,d0),Gt(Ge,p0)),sr.svg===!0&&(Gt(Ue,_d),Gt(Ge,Sd),Gt(Ge,Tc)),sr.svgFilters===!0&&(Gt(Ue,Ad),Gt(Ge,Sd),Gt(Ge,Tc)),sr.mathMl===!0&&(Gt(Ue,kd),Gt(Ge,g0),Gt(Ge,Tc))),lt.tagCheck=null,lt.attributeCheck=null,wr(ne,"ADD_TAGS")&&(typeof ne.ADD_TAGS=="function"?lt.tagCheck=ne.ADD_TAGS:ss(ne.ADD_TAGS)&&(Ue===He&&(Ue=ei(Ue)),Gt(Ue,ne.ADD_TAGS,dn))),wr(ne,"ADD_ATTR")&&(typeof ne.ADD_ATTR=="function"?lt.attributeCheck=ne.ADD_ATTR:ss(ne.ADD_ATTR)&&(Ge===ct&&(Ge=ei(Ge)),Gt(Ge,ne.ADD_ATTR,dn))),wr(ne,"ADD_URI_SAFE_ATTR")&&ss(ne.ADD_URI_SAFE_ATTR)&&Gt(Ri,ne.ADD_URI_SAFE_ATTR,dn),wr(ne,"FORBID_CONTENTS")&&ss(ne.FORBID_CONTENTS)&&(Vn===Ti&&(Vn=ei(Vn)),Gt(Vn,ne.FORBID_CONTENTS,dn)),wr(ne,"ADD_FORBID_CONTENTS")&&ss(ne.ADD_FORBID_CONTENTS)&&(Vn===Ti&&(Vn=ei(Vn)),Gt(Vn,ne.ADD_FORBID_CONTENTS,dn)),$i&&(Ue["#text"]=!0),Ye&&Gt(Ue,["html","head","body"]),Ue.table&&(Gt(Ue,["tbody"]),delete Me.tbody),ne.TRUSTED_TYPES_POLICY){if(typeof ne.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ps('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ne.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ps('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Le=C;C=ne.TRUSTED_TYPES_POLICY;try{L=z("")}catch(et){throw C=Le,et}}else ne.TRUSTED_TYPES_POLICY===null?(C=void 0,L=""):(C===void 0&&(C=T()),C&&typeof L=="string"&&(L=z("")));Sr&&Sr(ne),Cr=ne},mr=Gt({},[..._d,...Ad,...mE]),En=Gt({},[...kd,...vE]),mn=function(ne,Se,Le){return Se.namespaceURI===Rr?ne==="svg":Se.namespaceURI===xr?ne==="svg"&&(Le==="annotation-xml"||$n[Le]):!!mr[ne]},Mn=function(ne,Se,Le){return Se.namespaceURI===Rr?ne==="math":Se.namespaceURI===So?ne==="math"&&di[Le]:!!En[ne]},ho=function(ne,Se,Le){return Se.namespaceURI===So&&!di[Le]||Se.namespaceURI===xr&&!$n[Le]?!1:!En[ne]&&(Ei[ne]||!mr[ne])},er=function(ne){let Se=b(ne);(!Se||!Se.tagName)&&(Se={namespaceURI:hi,tagName:"template"});const Le=fl(ne.tagName),et=fl(Se.tagName);return Sn[ne.namespaceURI]?ne.namespaceURI===So?mn(Le,Se,et):ne.namespaceURI===xr?Mn(Le,Se,et):ne.namespaceURI===Rr?ho(Le,Se,et):!!(Mi==="application/xhtml+xml"&&Sn[ne.namespaceURI]):!1},Er=function(ne){ka(n.removed,{element:ne});try{b(ne).removeChild(ne)}catch{if(o(ne),!b(ne))throw Ps("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pi=function(ne){const Se=g(ne);if(Se){const et=[];dl(Se,mt=>{ka(et,mt)}),dl(et,mt=>{try{o(mt)}catch{}})}const Le=E(ne);if(Le)for(let et=Le.length-1;et>=0;--et){const mt=Le[et],Ut=mt&&mt.name;if(typeof Ut=="string")try{ne.removeAttribute(Ut)}catch{}}},ri=function(ne,Se){try{ka(n.removed,{attribute:Se.getAttributeNode(ne),from:Se})}catch{ka(n.removed,{attribute:null,from:Se})}if(Se.removeAttribute(ne),ne==="is")if(zn||gn)try{Er(Se)}catch{}else try{Se.setAttribute(ne,"")}catch{}},Ui=function(ne){const Se=E(ne);if(Se)for(let Le=Se.length-1;Le>=0;--Le){const et=Se[Le],mt=et&&et.name;if(!(typeof mt!="string"||Ge[dn(mt)]))try{ne.removeAttribute(mt)}catch{}}},ii=function(ne){const Se=[ne];for(;Se.length>0;){const Le=Se.pop();($?$(Le):Le.nodeType)===ko.element&&Ui(Le);const et=g(Le);if(et)for(let mt=et.length-1;mt>=0;--mt)Se.push(et[mt])}},Vi=function(ne){let Se=null,Le=null;if(Hn)ne="<remove></remove>"+ne;else{const Ut=l0(ne,/^[\r\n\t ]+/);Le=Ut&&Ut[0]}Mi==="application/xhtml+xml"&&hi===Rr&&(ne='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ne+"</body></html>");const et=C?z(ne):ne;if(hi===Rr)try{Se=new a().parseFromString(et,Mi)}catch{}if(!Se||!Se.documentElement){Se=N.createDocument(hi,"template",null);try{Se.documentElement.innerHTML=ni?L:et}catch{}}const mt=Se.body||Se.documentElement;return ne&&Le&&mt.insertBefore(e.createTextNode(Le),mt.childNodes[0]||null),hi===Rr?G.call(Se,Ye?"html":"body")[0]:Ye?Se.documentElement:mt},fo=function(ne){return B.call(ne.ownerDocument||ne,ne,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ar=function(ne){return ne=pl(ne,le," "),ne=pl(ne,re," "),ne=pl(ne,ce," "),ne},qi=function(ne){var Se;ne.normalize();const Le=B.call(ne.ownerDocument||ne,ne,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let et=Le.nextNode();for(;et;)et.data=ar(et.data),et=Le.nextNode();const mt=(Se=ne.querySelectorAll)===null||Se===void 0?void 0:Se.call(ne,"template");mt&&dl(mt,Ut=>{gi(Ut.content)&&qi(Ut.content)})},Gi=function(ne){const Se=_?_(ne):null;return typeof Se!="string"||dn(Se)!=="form"?!1:typeof ne.nodeName!="string"||typeof ne.textContent!="string"||typeof ne.removeChild!="function"||ne.attributes!==E(ne)||typeof ne.removeAttribute!="function"||typeof ne.setAttribute!="function"||typeof ne.namespaceURI!="string"||typeof ne.insertBefore!="function"||typeof ne.hasChildNodes!="function"||ne.nodeType!==$(ne)||ne.childNodes!==g(ne)},gi=function(ne){if(!$||typeof ne!="object"||ne===null)return!1;try{return $(ne)===ko.documentFragment}catch{return!1}},Ii=function(ne){if(!$||typeof ne!="object"||ne===null)return!1;try{return typeof $(ne)=="number"}catch{return!1}};function fn(ne,Se,Le){ne.length!==0&&dl(ne,et=>{et.call(n,Se,Le,Cr)})}const Wo=function(ne,Se){return!!(gt&&ne.hasChildNodes()&&!Ii(ne.firstElementChild)&&Tr(v0,ne.textContent)&&Tr(v0,ne.innerHTML)||gt&&ne.namespaceURI===Rr&&Se==="style"&&Ii(ne.firstElementChild)||ne.nodeType===ko.processingInstruction||gt&&ne.nodeType===ko.comment&&Tr($E,ne.data))},To=function(ne,Se){if(!Me[Se]&&Ki(Se)&&(We.tagNameCheck instanceof RegExp&&Tr(We.tagNameCheck,Se)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Se)))return!1;if($i&&!Vn[Se]){const Le=b(ne),et=g(ne);if(et&&Le){const mt=et.length;for(let Ut=mt-1;Ut>=0;--Ut){const Kt=ti?et[Ut]:h(et[Ut],!0);Le.insertBefore(Kt,l(ne))}}}return Er(ne),!0},Li=function(ne){if(fn(Q.beforeSanitizeElements,ne,null),Gi(ne))return Er(ne),!0;const Se=dn(_?_(ne):ne.nodeName);if(fn(Q.uponSanitizeElement,ne,{tagName:Se,allowedTags:Ue}),Wo(ne,Se))return Er(ne),!0;if(Me[Se]||!(lt.tagCheck instanceof Function&<.tagCheck(Se))&&!Ue[Se])return To(ne,Se);if(($?$(ne):ne.nodeType)===ko.element&&!er(ne)||(Se==="noscript"||Se==="noembed"||Se==="noframes")&&Tr(TE,ne.innerHTML))return Er(ne),!0;if(An&&ne.nodeType===ko.text){const Le=ar(ne.textContent);ne.textContent!==Le&&(ka(n.removed,{element:ne.cloneNode()}),ne.textContent=Le)}return fn(Q.afterSanitizeElements,ne,null),!1},Ro=function(ne,Se,Le){if($t[Se]||Xn&&(Se==="id"||Se==="name")&&(Le in e||Le in fi))return!1;const et=Ge[Se]||lt.attributeCheck instanceof Function&<.attributeCheck(Se,ne);if(!(hn&&Tr(de,Se))&&!(Jt&&Tr(ie,Se))){if(et){if(!Ri[Se]&&!Tr(Ee,pl(Le,$e,""))&&!((Se==="src"||Se==="xlink:href"||Se==="href")&&ne!=="script"&&c0(Le,"data:")===0&&gr[ne])&&!(Zn&&!Tr(fe,pl(Le,$e,"")))&&Le)return!1}else if(!(Ki(ne)&&(We.tagNameCheck instanceof RegExp&&Tr(We.tagNameCheck,ne)||We.tagNameCheck instanceof Function&&We.tagNameCheck(ne))&&(We.attributeNameCheck instanceof RegExp&&Tr(We.attributeNameCheck,Se)||We.attributeNameCheck instanceof Function&&We.attributeNameCheck(Se,ne))||Se==="is"&&We.allowCustomizedBuiltInElements&&(We.tagNameCheck instanceof RegExp&&Tr(We.tagNameCheck,Le)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Le))))return!1}return!0},Eo=Gt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ki=function(ne){return!Eo[fl(ne)]&&Tr(Re,ne)},jo=function(ne,Se,Le,et){if(C&&typeof s=="object"&&typeof s.getAttributeType=="function"&&!Le)switch(s.getAttributeType(ne,Se)){case"TrustedHTML":return z(et);case"TrustedScriptURL":return O(et)}return et},Ho=function(ne,Se,Le,et){try{Le?ne.setAttributeNS(Le,Se,et):ne.setAttribute(Se,et),Gi(ne)?Er(ne):a0(n.removed)}catch{ri(Se,ne)}},po=function(ne){fn(Q.beforeSanitizeAttributes,ne,null);const Se=ne.attributes;if(!Se||Gi(ne))return;const Le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ge,forceKeepAttr:void 0};let et=Se.length;const mt=dn(ne.nodeName);for(;et--;){const Ut=Se[et],Kt=Ut.name,Hr=Ut.namespaceURI,lr=Ut.value,In=dn(Kt),Mr=lr;let wn=Kt==="value"?Mr:cE(Mr);if(Le.attrName=In,Le.attrValue=wn,Le.keepAttr=!0,Le.forceKeepAttr=void 0,fn(Q.uponSanitizeAttribute,ne,Le),wn=Le.attrValue,Qt&&(In==="id"||In==="name")&&c0(wn,Un)!==0&&(ri(Kt,ne),wn=Un+wn),gt&&Tr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,wn)){ri(Kt,ne);continue}if(In==="attributename"&&l0(wn,"href")){ri(Kt,ne);continue}if(!Le.forceKeepAttr){if(!Le.keepAttr){ri(Kt,ne);continue}if(!Nt&&Tr(RE,wn)){ri(Kt,ne);continue}if(An&&(wn=ar(wn)),!Ro(mt,In,wn)){ri(Kt,ne);continue}wn=jo(mt,In,Hr,wn),wn!==Mr&&Ho(ne,Kt,Hr,wn)}}fn(Q.afterSanitizeAttributes,ne,null)},go=function(ne){let Se=null;const Le=fo(ne);for(fn(Q.beforeSanitizeShadowDOM,ne,null);Se=Le.nextNode();)if(fn(Q.uponSanitizeShadowNode,Se,null),Li(Se),po(Se),gi(Se.content)&&go(Se.content),($?$(Se):Se.nodeType)===ko.element){const et=x(Se);gi(et)&&(mi(et),go(et))}fn(Q.afterSanitizeShadowDOM,ne,null)},mi=function(ne){const Se=[{node:ne,shadow:null}];for(;Se.length>0;){const Le=Se.pop();if(Le.shadow){go(Le.shadow);continue}const et=Le.node,mt=($?$(et):et.nodeType)===ko.element,Ut=g(et);if(Ut)for(let Kt=Ut.length-1;Kt>=0;--Kt)Se.push({node:Ut[Kt],shadow:null});if(mt){const Kt=_?_(et):null;if(typeof Kt=="string"&&dn(Kt)==="template"){const Hr=et.content;gi(Hr)&&Se.push({node:Hr,shadow:null})}}if(mt){const Kt=x(et);gi(Kt)&&Se.push({node:null,shadow:Kt},{node:Kt,shadow:null})}}};return n.sanitize=function(ne){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=null,et=null,mt=null,Ut=null;if(ni=!ne,ni&&(ne="<!-->"),typeof ne!="string"&&!Ii(ne)&&(ne=pE(ne),typeof ne!="string"))throw Ps("dirty is not a string, aborting");if(!n.isSupported)return ne;It?(Ue=kn,Ge=Pn):$o(Se),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(Ue=ei(Ue)),Q.uponSanitizeAttribute.length>0&&(Ge=ei(Ge)),n.removed=[];const Kt=ti&&typeof ne!="string"&&Ii(ne);if(Kt){const In=_?_(ne):ne.nodeName;if(typeof In=="string"){const Mr=dn(In);if(!Ue[Mr]||Me[Mr])throw Ps("root node is forbidden and cannot be sanitized in-place")}if(Gi(ne))throw Ps("root node is clobbered and cannot be sanitized in-place");try{mi(ne)}catch(Mr){throw pi(ne),Mr}}else if(Ii(ne))Le=Vi("<!---->"),et=Le.ownerDocument.importNode(ne,!0),et.nodeType===ko.element&&et.nodeName==="BODY"||et.nodeName==="HTML"?Le=et:Le.appendChild(et),mi(et);else{if(!zn&&!An&&!Ye&&ne.indexOf("<")===-1)return C&&Rn?z(ne):ne;if(Le=Vi(ne),!Le)return zn?null:Rn?L:""}Le&&Hn&&Er(Le.firstChild);const Hr=fo(Kt?ne:Le);try{for(;mt=Hr.nextNode();)Li(mt),po(mt),gi(mt.content)&&go(mt.content)}catch(In){throw Kt&&pi(ne),In}if(Kt)return dl(n.removed,In=>{In.element&&ii(In.element)}),An&&qi(ne),ne;if(zn){if(An&&qi(Le),gn)for(Ut=U.call(Le.ownerDocument);Le.firstChild;)Ut.appendChild(Le.firstChild);else Ut=Le;return(Ge.shadowroot||Ge.shadowrootmode)&&(Ut=J.call(r,Ut,!0)),Ut}let lr=Ye?Le.outerHTML:Le.innerHTML;return Ye&&Ue["!doctype"]&&Le.ownerDocument&&Le.ownerDocument.doctype&&Le.ownerDocument.doctype.name&&Tr(kE,Le.ownerDocument.doctype.name)&&(lr="<!DOCTYPE "+Le.ownerDocument.doctype.name+`>
|
|
1492
|
+
`+lr),An&&(lr=ar(lr)),C&&Rn?z(lr):lr},n.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$o(ne),It=!0,kn=Ue,Pn=Ge},n.clearConfig=function(){Cr=null,It=!1,kn=null,Pn=null,C=D,L=""},n.isValidAttribute=function(ne,Se,Le){Cr||$o({});const et=dn(ne),mt=dn(Se);return Ro(et,mt,Le)},n.addHook=function(ne,Se){typeof Se=="function"&&wr(Q,ne)&&ka(Q[ne],Se)},n.removeHook=function(ne,Se){if(wr(Q,ne)){if(Se!==void 0){const Le=aE(Q[ne],Se);return Le===-1?void 0:lE(Q[ne],Le,1)[0]}return a0(Q[ne])}},n.removeHooks=function(ne){wr(Q,ne)&&(Q[ne]=[])},n.removeAllHooks=function(){Q=y0()},n}var IE=b0();const LE={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"}},OE={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return IE.sanitize(this.params.text)}},methods:{dialog:function(t,n,e){this.params=t,this.show=!0,this.resolve=n,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},NE=["innerHTML"],DE={key:2},PE={key:3,class:"validate mt-4"};function zE(t,n,e,r,m,d){const p=tn("v-spacer"),w=tn("v-toolbar"),u=tn("v-icon"),f=tn("v-text-field"),a=tn("v-card-text"),s=tn("v-btn"),c=tn("v-card-actions"),h=tn("v-card"),o=tn("v-dialog"),l=tn("v-app");return jn(),Po(l,null,{default:Dn(()=>[qt(o,{modelValue:t.show,"onUpdate:modelValue":n[1]||(n[1]=g=>t.show=g),persistent:"",width:"600",onKeydown:Nf(d.cancel,["esc"])},{default:Dn(()=>[qt(h,null,{default:Dn(()=>[qt(w,{height:"24"},{default:Dn(()=>[qt(p),Yr("span",null,Jr(t.params.title),1),qt(p)]),_:1}),qt(a,{class:"mt-4 pa-3"},{default:Dn(()=>[t.params.validateText?(jn(),Po(u,{key:0,class:"mr-2"},{default:Dn(()=>[...n[2]||(n[2]=[_i(" mdi-alert ",-1)])]),_:1})):zo("",!0),t.params.html?(jn(),li("span",{key:1,innerHTML:d.sanitizedText},null,8,NE)):(jn(),li("span",DE,Jr(d.sanitizedText),1)),t.params.validateText?(jn(),li("div",PE,[_i(" Enter "+Jr(t.params.validateText)+" to confirm! ",1),qt(f,{modelValue:t.validationText,"onUpdate:modelValue":n[0]||(n[0]=g=>t.validationText=g),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):zo("",!0)]),_:1}),qt(c,{class:"px-2"},{default:Dn(()=>[qt(p),t.params.cancelText?(jn(),Po(s,{key:0,variant:"outlined","data-test":d.dataTestCancel,onClick:d.cancel},{default:Dn(()=>[_i(Jr(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):zo("",!0),qt(s,{variant:"flat",color:t.params.okClass,"data-test":d.dataTestOk,onClick:d.ok},{default:Dn(()=>[_i(Jr(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const FE=bs(OE,[["render",zE],["__scopeId","data-v-53691296"]]);class BE{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(FE);n.use(Td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({title:n,text:e,okText:r,okClass:m,validateText:d,cancelText:p,html:w}){return this.mount(),new Promise((u,f)=>{this.$root.dialog({title:n,text:e,okText:r,okClass:m,validateText:d,cancelText:p,html:w},u,f)})}confirm(n,{okText:e="Ok",cancelText:r="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:m,validateText:null,cancelText:r,html:!1})}alert(n,{okText:e="Ok",html:r=!1,okClass:m="primary"}){return this.open({title:"Alert",text:n,okText:e,okClass:m,validateText:null,cancelText:null,html:r})}validate(n,{okText:e="Ok",validateText:r="CONFIRM",cancelText:m="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:d,validateText:r,cancelText:m,html:!1})}}const WE={install(t,n){const e=new BE;t.provide("dialog",e),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=e)}},jE={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){return this.toastNotification.type==="notification"?"mdi-bell":"mdi-alert-box"},toastStyle:function(){return`
|
|
1493
|
+
--toast-bg-color:${hl[this.toastNotification.level]};
|
|
1494
|
+
--toast-fg-color:${PR(this.toastNotification.level)};
|
|
1495
|
+
`},contentStyle:function(){return`
|
|
1496
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
|
1497
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
|
1498
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
|
1499
|
+
`}},methods:{toast:function(t,n){this.noToastPaths.includes(window.location.pathname)||(n===void 0&&(n=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),n&&(this.timeout=setTimeout(()=>{this.hide()},n)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},HE={key:0,class:"text-subtitle-1 mr-1 notification-text"},UE={key:1,class:"text-body-2 notification-text"},VE={key:2,class:"text-body-2 notification-text"};function qE(t,n,e,r,m,d){const p=tn("v-icon"),w=tn("v-spacer"),u=tn("v-btn"),f=tn("v-sheet"),a=tn("v-slide-y-transition");return jn(),Po(a,null,{default:Dn(()=>[Df(qt(f,{style:Zs(d.toastStyle),class:"toast-notification",onClick:d.expand},{default:Dn(()=>[qt(p,{class:"mr-1 notification-text"},{default:Dn(()=>[_i(Jr(d.toastNotificationIcon),1)]),_:1}),Yr("div",{class:"toast-content",style:Zs(d.contentStyle)},[t.toastNotification.title?(jn(),li("span",HE,[t.toastNotification.body||t.toastNotification.message?(jn(),li(Ml,{key:0},[_i(Jr(t.toastNotification.title)+": ",1)],64)):(jn(),li(Ml,{key:1},[_i(Jr(t.toastNotification.title),1)],64))])):zo("",!0),t.toastNotification.body?(jn(),li("span",UE,Jr(t.toastNotification.body),1)):zo("",!0),t.toastNotification.message?(jn(),li("span",VE,Jr(t.toastNotification.message),1)):zo("",!0)],4),qt(w),qt(u,{variant:"text",class:"notification-text",onClick:Pf(d.hide,["stop"])},{default:Dn(()=>[...n[0]||(n[0]=[_i(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[zf,t.showToast]])]),_:1})}const GE=bs(jE,[["render",qE],["__scopeId","data-v-ef96840d"]]);class KE{constructor(n={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=e0()),this.store}mount(){if(this.mounted)return;const n=du(GE);n.use(Td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({method:n,title:e,body:r,message:m,level:d,duration:p,type:w="alert",logToConsole:u=!1,saveToHistory:f=!0}){this.mount(),u&&console.log(m?`${d.toUpperCase()} - ${m}`:`${d.toUpperCase()} - ${e}: ${r}`),f&&this.getStore().notifyAddHistory({title:e,body:r,message:m,level:d}),this[n]({title:e,body:r,message:m,level:d,duration:p,type:w})}toast({title:n,body:e,message:r,level:m,duration:d,type:p}){this.$root.toast({title:n,body:e,message:r,level:m,type:p},d)}critical({title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w}){this.open({method:"toast",level:"critical",title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious({title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w}){this.open({method:"toast",level:"serious",title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w})}caution({title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w}){this.open({method:"toast",level:"caution",title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w})}WARN(n){this.caution(n)}normal({title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w}){this.open({method:"toast",level:"normal",title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby({title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w}){this.open({method:"toast",level:"standby",title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w})}off({title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w}){this.open({method:"toast",level:"off",title:n,body:e,message:r,type:m,duration:d,logToConsole:p,saveToHistory:w})}}const YE={install(t,n){const e=new KE(n);t.provide("notify",e),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=e)}};function JE(t){Tf(`Vuetify: ${t}`)}function w0(t){let n;return t!==null&&typeof t=="object"&&((n=Object.getPrototypeOf(t))===Object.prototype||n===null)}function ZE(t,n){const e={};for(const r of n)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function x0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const m in t)r[m]=t[m];for(const m in n){const d=t[m],p=n[m];if(w0(d)&&w0(p)){r[m]=x0(d,p,e);continue}if(e&&Array.isArray(d)&&Array.isArray(p)){r[m]=e(d,p);continue}r[m]=p}return r}function ml(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(ml.cache.has(t))return ml.cache.get(t);const n=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return ml.cache.set(t,n),n}ml.cache=new Map;function C0(t,n){return e=>Object.keys(t).reduce((r,m)=>{const d=typeof t[m]=="object"&&t[m]!=null&&!Array.isArray(t[m])?t[m]:{type:t[m]};return e&&m in e?r[m]={...d,default:e[m]}:r[m]=d,n&&!r[m].source&&(r[m].source=n),r},{})}function _0(t,n){const e=Lf();if(!e)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return e}function XE(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_0("injectSelf");const{provides:e}=n;if(e&&t in e)return e[t]}const $d=Symbol.for("vuetify:defaults");function A0(){const t=Rf($d);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function QE(t,n){return t.props&&(typeof t.props[n]<"u"||typeof t.props[ml(n)]<"u")}function eM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A0();const r=_0("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const m=hu(()=>e.value?.[t._as??n]),d=new Proxy(t,{get(u,f){const a=Reflect.get(u,f);if(f==="class"||f==="style")return[m.value?.[f],a].filter(h=>h!=null);if(QE(r.vnode,f))return a;const s=m.value?.[f];if(s!==void 0)return s;const c=e.value?.global?.[f];return c!==void 0?c:a}}),p=Ef();Mf(()=>{if(m.value){const u=Object.entries(m.value).filter(f=>{let[a]=f;return a.startsWith(a[0].toUpperCase())});p.value=u.length?Object.fromEntries(u):void 0}else p.value=void 0});function w(){const u=XE($d,r);Of($d,hu(()=>p.value?x0(u?.value??{},p.value):u?.value))}return{props:d,provideSubDefaults:w}}function Rc(t){if(t._setup=t._setup??t.setup,!t.name)return JE("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=C0(t.props??{},t.name)();const n=Object.keys(t.props).filter(e=>e!=="class"&&e!=="style");t.filterProps=function(e){return ZE(e,n)},t.props._as=String,t.setup=function(e,r){const m=A0();if(!m.value)return t._setup(e,r);const{props:d,provideSubDefaults:p}=eM(e,e._as??t.name,m),w=t._setup(d,r);return p(),w}}return t}function tM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(t?Rc:$f)(n)}const nM=[String,Function,Object,Array],Ec=C0({icon:{type:nM},tag:{type:[String,Object,Function],required:!0}},"icon");tM()({name:"VComponentIcon",props:Ec(),setup(t,n){let{slots:e}=n;return()=>{const r=t.icon;return qt(t.tag,null,{default:()=>[t.icon?qt(r,null,null):e.default?.()]})}}}),Rc({name:"VSvgIcon",inheritAttrs:!1,props:Ec(),setup(t,n){let{attrs:e}=n;return()=>qt(t.tag,Ff(e,{style:null}),{default:()=>[Yr("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?Yr("path",{d:r[0],"fill-opacity":r[1]},null):Yr("path",{d:r},null)):Yr("path",{d:t.icon},null)])]})}}),Rc({name:"VLigatureIcon",props:Ec(),setup(t){return()=>qt(t.tag,null,{default:()=>[t.icon]})}});const rM=Rc({name:"VClassIcon",props:Ec(),setup(t){return()=>qt(t.tag,{class:If(t.icon)},null)}}),iM={component:t=>Js(rM,{...t,class:"mdi"})},oM={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},sM={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},aM={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},lM={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},Td=Uf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:LE,cosmosDarkCobalt:oM,cosmosDarkIndigo:sM,cosmosDarkSlate:aM,cosmosDarkEmerald:lM}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:iM,...FR,...BR}}}),Rd=xw({createApp:du,appOptions:{render(){return Js(Rw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(XR),t.use(_a),t.use(Td),t.use(WE),t.use(YE)}}),iP=Yn("f",Rd.bootstrap),oP=Yn("k",Rd.mount),sP=Yn("r",Rd.unmount)})}}));
|