openc3-cosmos-tool-admin 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/admin/ArrayWidget-D1PArcGr-3885b67514afe732ba36.js +2 -0
- data/tools/admin/{ArrayplotWidget-DGJEXAY0-5973f039c77b3ba446cb.js → ArrayplotWidget-DPUPy0qM-b6a1c019189be84e4589.js} +1 -1
- data/tools/admin/{BarColumn-DwZmAe8g-6d02376174a6e02ab869.js → BarColumn-BpdscDQf-e551f56c95340d26cda4.js} +1 -1
- data/tools/admin/{BlockWidget-BHtugveV-1cab136df7dbe1306618.js → BlockWidget-_VUsK5T9-59058beda215f65a7b09.js} +2 -2
- data/tools/admin/ButtonWidget-DE41o-cg-d0d862704f2cedf509f5.js +2 -0
- data/tools/admin/CanvasWidget-BEi8h3Mq-e74743c293400ba5a929.js +1 -0
- data/tools/admin/CanvasdotWidget-eZuMgkhL-069ce51cfaf9b6705d69.js +1 -0
- data/tools/admin/{CanvasimageWidget-BpM05v_m-3e2ced79b65869951a35.js → CanvasimageWidget-COv_Qnc8-0a502afa265efe2f25ad.js} +1 -1
- data/tools/admin/{CanvasimagevalueWidget-E6G93iGc-a1517cc5078a6195d110.js → CanvasimagevalueWidget-BhuUqLOo-53322c8fb2f548104d57.js} +1 -1
- data/tools/admin/CanvaslabelWidget-DtvbgeYH-0bb6f6c1d49c8d123129.js +1 -0
- data/tools/admin/{CanvaslabelvalueWidget-B0nJeS4X-998aa3aefcc9a53fdb57.js → CanvaslabelvalueWidget-C_FRIeNb-3b5c9903ad9d379fc52a.js} +1 -1
- data/tools/admin/CanvaslineWidget-D1K_6mAY-986d4445d6db8f24c1b0.js +1 -0
- data/tools/admin/{CanvaslinevalueWidget-BwfFyCwH-78ca2cef2a5352724add.js → CanvaslinevalueWidget-D4eaxWhR-443b0d3f93af5d0faf5a.js} +1 -1
- data/tools/admin/CheckbuttonWidget-ByxMDkiS-6939f416d1a7977f37fb.js +1 -0
- data/tools/admin/ComboboxWidget-CAGxGv2r-28b0f6b63d807a2f3217.js +1 -0
- data/tools/admin/{DateWidget-CAiG2FIl-e83f3c8fa86a4cb63c08.js → DateWidget-DkNWx28s-bb439088467e3b1af3aa.js} +1 -1
- data/tools/admin/{DetailsDialog-q5SDzw3R-b82562d2d6d57a3000a4.js → DetailsDialog-F4KgYM6m-8435a552f5c10d2191bc.js} +1 -1
- data/tools/admin/{DynamicWidget-BuSbQVhf-3a901a22b32b0908e511.js → DynamicWidget-BuSbQVhf-6a5228328dcebb177ef8.js} +1 -1
- data/tools/admin/{FilechecksumWidget-DeW9wy5d-ad4a15110a5eb00418bc.js → FilechecksumWidget-DSfNEnDJ-531bbb7d456d380a62d9.js} +1 -1
- data/tools/admin/{FiledisplayWidget-C_zPFu2E-58a35735cd3b6d9bb251.js → FiledisplayWidget-D2cxMmrP-812eb21e2f71f0bd32d6.js} +1 -1
- data/tools/admin/{FormatvalueWidget-BrvPWwfN-40beb2cd8bc9081eb881.js → FormatvalueWidget-6-bj_PJO-4c9daa001cba89fb9103.js} +1 -1
- data/tools/admin/Graph-Cz0Ns1FD-9251aa7b63944e24104e.js +1 -0
- data/tools/admin/{GraphWidget-QS-VJoes-467c19e767fd433b801a.js → GraphWidget-COXK3Dab-18ccb71d08b630c3446f.js} +1 -1
- data/tools/admin/HorizontalWidget-C9UFBPsk-91bd1e11d87736b8c758.js +1 -0
- data/tools/admin/HorizontalboxWidget-CWLfmRtr-13d452adc9e1100f23c4.js +1 -0
- data/tools/admin/HorizontallineWidget-DeFkOaYO-816f7a06f03f7222e67e.js +1 -0
- data/tools/admin/{IframeWidget-CITX8Es1-d2843bef19564e161e74.js → IframeWidget-Bn9eGzrq-d71752e23ce712e81e26.js} +1 -1
- data/tools/admin/{ImageLoader-DQV_11Vd-5875217783363452070c.js → ImageLoader-_gAudhVo-23300d0d0133307fb169.js} +1 -1
- data/tools/admin/{ImageviewerWidget-BIsSA7KD-fb7deb592ddaf77428d9.js → ImageviewerWidget-BUWhF32Z-0799a243569a53e640e9.js} +1 -1
- data/tools/admin/InterfacesTab-CZsnR6xB-abec32626a92ea91aa87.js +1 -0
- data/tools/admin/{LabelWidget-FQI-cH_A-8f8bc1c1f7df473ba1c7.js → LabelWidget-BhzkN06D-2d7a7f95582b783e18d0.js} +1 -1
- data/tools/admin/{LabelledWidget-KGXtQ4Zb-ac56cd3791054c971526.js → LabelledWidget-vx8NvW1b-0d3f99aa750f0631fdc2.js} +1 -1
- data/tools/admin/LabelprogressbarWidget-t5PvKuS4-18438f7d1f021d5247e5.js +1 -0
- data/tools/admin/LabelsparklineWidget-CebbEH-j-9c683841d069f9e5b25c.js +1 -0
- data/tools/admin/LabelvalueWidget-Cbs1DBK2-8bc763b903941db678a2.js +1 -0
- data/tools/admin/{LabelvaluedescWidget-BppM5vGp-60d49f07e899e6190fc8.js → LabelvaluedescWidget-B7OIOGc0-21ac0d9663cf49396a58.js} +1 -1
- data/tools/admin/LabelvaluelimitsbarWidget-C57kf-oQ-8929b2b56023fd39369a.js +1 -0
- data/tools/admin/LabelvaluelimitscolumnWidget-BRlNDEqp-d0a4f3d8ee015080c0a8.js +1 -0
- data/tools/admin/{LabelvaluerangebarWidget-BT0BcOoK-c8faf743155ec6a952be.js → LabelvaluerangebarWidget-Pt_evm3v-2f296e2b660ae23cd7e2.js} +1 -1
- data/tools/admin/{Layout-d-vb0okO-b4be0ec1ccd5aba1a394.js → Layout-CKmC50QZ-a4e41facce8302b08009.js} +1 -1
- data/tools/admin/{LedWidget-Cmr6eVG2-0629e1460c7ccffb594b.js → LedWidget-D1lmNXpi-c70ab085a7e75d99db2a.js} +1 -1
- data/tools/admin/{LimitsBar-qMynDHYT-7d05a8affa8547333479.js → LimitsBar-D5IZu7eX-eed22332c6603ee4301a.js} +1 -1
- data/tools/admin/{LimitsbarWidget-CMvcwa-m-0713ea3e20a6e70ea995.js → LimitsbarWidget-VpxQXE-e-48cfee552a9c695bf8f1.js} +1 -1
- data/tools/admin/{LimitscolorWidget-CZ9wMtcI-b6559956fcf07908552b.js → LimitscolorWidget-79P41CX7-f2eea333aec5c48967e0.js} +1 -1
- data/tools/admin/{LimitscolumnWidget-r84KJGU--ad41610e4bf266f348a5.js → LimitscolumnWidget-BFDXhJeZ-4eba19b9d6c713c13db1.js} +1 -1
- data/tools/admin/LinegraphWidget-VqkpOlws-f72604545ff9d950311b.js +1 -0
- data/tools/admin/{MatrixbycolumnsWidget-Dx2iz0YF-6f5b9d26b3678f3200c4.js → MatrixbycolumnsWidget--ihvirDP-0c6d1476cb4af73ce4ec.js} +1 -1
- data/tools/admin/{MicroservicesTab-Bhsf1soi-1ae5a6c0aa51b620f298.js → MicroservicesTab-CQPpb7j1-7daf01af280d2c44c370.js} +2 -2
- data/tools/admin/OpenC3TimePicker-B0lAIU91-6e7843b535d6cb333926.js +1 -0
- data/tools/admin/{OutputDialog-D0ifesTw-d1fc2b4d8d09af22765e.js → OutputDialog-DtrpwjGL-73ebd3c55e7ffbc15652.js} +1 -1
- data/tools/admin/PackagesTab-DQ5s3nfh-dfdd8bd24af88c946d9d.js +1 -0
- data/tools/admin/{PluginsTab-nWngR5kY-fb723f730cae605368ca.js → PluginsTab-1tlTx4k1-496335d424694bd25d9a.js} +2 -2
- data/tools/admin/{ProgressbarWidget-DPbAVjdC-fe70c4f878b34c21a297.js → ProgressbarWidget-BIB3r9SL-2b2e5705da4fe267fc08.js} +1 -1
- data/tools/admin/RadiobuttonWidget-C5rxLM7K-9bdffd0ee597d4386ad7.js +1 -0
- data/tools/admin/RadiogroupWidget-CciTCv1U-f9b9584110d84fad120b.js +1 -0
- data/tools/admin/{RangebarWidget-DJXGUHAc-22969b9af0d9fc81fb0a.js → RangebarWidget-MPQYi2Km-b85a235f8e43da24f3ae.js} +1 -1
- data/tools/admin/{RedisTab-BZtfqEcP-26828a24578c54ad2bd1.js → RedisTab-DAeGow_e-aad9acabdf7d1943559b.js} +1 -1
- data/tools/admin/{RollupWidget-BbWLSsTT-3ff00735fdd5975e73d6.js → RollupWidget-CfjGAhzg-f9d66fe1e702f376333e.js} +1 -1
- data/tools/admin/{RoutersTab-CLKIJ5cm-192f71834ece51ffdb96.js → RoutersTab-G4WKtUOo-8f69fb20843fdf62fa85.js} +1 -1
- data/tools/admin/ScrollwindowWidget-CupaygNN-a397b20ae8a40b64a487.js +1 -0
- data/tools/admin/{SecretsTab-BoBmTh63-0b1ebb50cbbbcd22ea0e.js → SecretsTab-C9xAxuwO-89d69d126612c7b64f6d.js} +1 -1
- data/tools/admin/SettingsTab-BUdeAh4o-f1b85c2ee59d2f206af1.js +5 -0
- data/tools/admin/{SignalWidget-65q0tiuo-449ea3f3201cd3be57fc.js → SignalWidget-C-qecoTO-c71ca67fb48f421af75e.js} +1 -1
- data/tools/admin/{SimpleTextDialog-ChmFtdVw-e4bf5579c3f6df974472.js → SimpleTextDialog-C-0ZC2bs-48d950cb04fe0c899bab.js} +1 -1
- data/tools/admin/{SpacerWidget-DFzbojmX-b949b9bd454547dd5c32.js → SpacerWidget-VVkOCb6N-356dcf21185ada59e84f.js} +1 -1
- data/tools/admin/SparklineWidget-Dsmn38z_-2bd86ac75cf900848cd0.js +1 -0
- data/tools/admin/{TabbookWidget-CELMWyx7-389bde713eda9ce6ec21.js → TabbookWidget-CXklff-l-46b8ed5b3d3fc3f6ff22.js} +1 -1
- data/tools/admin/{TargetsTab-BJZEtKY4-eb3c520d9f8896dc52e2.js → TargetsTab-Ci4cOsIa-d2957154b9bf46fa9617.js} +1 -1
- data/tools/admin/TextboxWidget-CHs2VYIv-55be6bce7cab19177b56.js +1 -0
- data/tools/admin/TextfieldWidget-CdANAW-6-82179a958f191dffd85c.js +1 -0
- data/tools/admin/TimeWidget-D0xT1wXR-52493dd27717545a87bd.js +1 -0
- data/tools/admin/TitleWidget-68NWCcXB-218c5743097602c7a5d8.js +1 -0
- data/tools/admin/{ToolsTab-VSCWDywf-8a291cbe6cc534d27ddf.js → ToolsTab-BCvmMDIZ-4b33c7b7aab46b7d4119.js} +1 -1
- data/tools/admin/{TsdbTab-Cv8GjpoJ-4fc1c6979b74d5408ab1.js → TsdbTab-BytqwnkN-ddc61c1fffc41912b8cb.js} +2 -2
- data/tools/admin/{VWidget-BDy0211S-dcdd3ef3630006403c5a.js → VWidget-oMbywhLA-ae9ee9bde0636cb9c9e1.js} +1 -1
- data/tools/admin/ValueWidget-B1aGUBP7-320f2f1feb3886640deb.js +1 -0
- data/tools/admin/ValuelimitsbarWidget-B7KcRjLS-70f46b11dcb2a83a3562.js +1 -0
- data/tools/admin/{ValuelimitscolumnWidget-7DXCsVW_-54ad4c81e5c324d8a098.js → ValuelimitscolumnWidget-BVt6nLXq-08cf4c90f589d1d23b70.js} +1 -1
- data/tools/admin/ValuerangebarWidget-uVZEI32U-ded0715685adaffdaca5.js +1 -0
- data/tools/admin/VerticalWidget-DlftYBjH-ae7352937173846f56d9.js +1 -0
- data/tools/admin/VerticalboxWidget-C7RrkfY0-a5135be854d46c8d2871.js +1 -0
- data/tools/admin/{Widget-BDsgRxuV-a44a345d561e48ac8b60.js → Widget-D_HaosJK-c49796f3af3288426d03.js} +1 -1
- data/tools/admin/main-320f7a52ead0c027f3e7.js +1502 -0
- data/tools/admin/main.js +1 -1
- data/tools/admin/{settings-Dvmurty6-94679bb52b0b8e46bc5c.js → settings-DZ910lLo-06b2e35cd3b4b6b6686c.js} +1 -1
- metadata +85 -85
- data/tools/admin/ArrayWidget-CcQFJGCA-c1e313dd26dacdcca369.js +0 -2
- data/tools/admin/ButtonWidget-Cc9cYsg8-76799976508952c2794c.js +0 -2
- data/tools/admin/CanvasWidget-Bn70gBcc-1f45b874237dce369747.js +0 -1
- data/tools/admin/CanvasdotWidget-CMROfW3O-0d78913e6b2e8de60b20.js +0 -1
- data/tools/admin/CanvaslabelWidget-C074R2Fy-ba9bf286d8c1c178d2e9.js +0 -1
- data/tools/admin/CanvaslineWidget-CxnNAqOX-b28d8c979cff5863f6f9.js +0 -1
- data/tools/admin/CheckbuttonWidget-yAm10oX0-3b8cd481bd50c23db7ea.js +0 -1
- data/tools/admin/ComboboxWidget-BnWksnnp-e0acb306b760add01fd9.js +0 -1
- data/tools/admin/Graph-BCvaO4yI-41ca366ad5307cf72d8e.js +0 -1
- data/tools/admin/HorizontalWidget-cFSsdChw-9e8be5a4c341c9e2a48d.js +0 -1
- data/tools/admin/HorizontalboxWidget-CKA7rLGd-3f41a44400ea46dcf39e.js +0 -1
- data/tools/admin/HorizontallineWidget-BqbLK0zc-5f28e518ef775ecc7983.js +0 -1
- data/tools/admin/InterfacesTab-twne_Qp4-7a5803ca2d2e183ea27f.js +0 -1
- data/tools/admin/LabelprogressbarWidget-72WyzD_Q-d713e91f3bc4d5e9bb86.js +0 -1
- data/tools/admin/LabelsparklineWidget-DtWNf4mK-e571c4c30dd5e6600e2d.js +0 -1
- data/tools/admin/LabelvalueWidget-D_JLdY7r-d8b0113b840e1d424218.js +0 -1
- data/tools/admin/LabelvaluelimitsbarWidget-B69ogLif-1b72fbb67e4bbf4e944c.js +0 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-DPYwFdgq-39778adddee40bf5323b.js +0 -1
- data/tools/admin/LinegraphWidget-COGBGOjF-cc12f6b529350d7e1e43.js +0 -1
- data/tools/admin/OpenC3TimePicker-C3vCnk72-c5a6f456100da4e3fb0e.js +0 -1
- data/tools/admin/PackagesTab-Bb221-aM-f1e26eed5c8756e90bf0.js +0 -1
- data/tools/admin/RadiobuttonWidget-iXI9yCDk-b46058fb3a6703e141c3.js +0 -1
- data/tools/admin/RadiogroupWidget-CMM_p1eA-ab34167d8d07579889eb.js +0 -1
- data/tools/admin/ScrollwindowWidget-Dxhp7yKn-212c665370260983c033.js +0 -1
- data/tools/admin/SettingsTab-BL7gkaO9-1451155a58c685c1b589.js +0 -2
- data/tools/admin/SparklineWidget-Bu4I8zY0-bd2a64c423f945d2b719.js +0 -1
- data/tools/admin/TextboxWidget-DYsqXntS-b8ed82dfb3407b1b3ded.js +0 -1
- data/tools/admin/TextfieldWidget-BIUgV9Q4-c9b84219519a6b225ba9.js +0 -1
- data/tools/admin/TimeWidget-BPXcY1Wy-ba8743a763af51255bd9.js +0 -1
- data/tools/admin/TitleWidget-DJ9mHRLE-7e3251bb102d37f0fc2d.js +0 -1
- data/tools/admin/ValueWidget-DzOSy7lp-e35ee45ffa2bd853bbcb.js +0 -1
- data/tools/admin/ValuelimitsbarWidget-D5dSlW6D-8d8036cefd6d2b014d73.js +0 -1
- data/tools/admin/ValuerangebarWidget-BWjnpmyy-2e43d6b213fdd9d6500d.js +0 -1
- data/tools/admin/VerticalWidget-BOtXAhxt-f42425fb37f426b0e3b7.js +0 -1
- data/tools/admin/VerticalboxWidget-RAsXfGdI-99f7d03eb06c4352f752.js +0 -1
- data/tools/admin/main-e92ddf337a561fec8f7b.js +0 -1501
|
@@ -1,1501 +0,0 @@
|
|
|
1
|
-
System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Tn,Qe){"use strict";var Ue,nt,Pt,ze,We,nn,qn,Up,Vp,Gp,gn,ii,ho,qp,Lt,Wa,Tu,ls,Hr,Js,Fl,ja,Yp,Kp,Xp,Jp,Mu,Zp,Qp,eg,tg,ng,Iu,rg,ig,og,sg,ag,lg,Lu,cg;return{setters:[Ct=>{Ue=Ct.resolveComponent,nt=Ct.openBlock,Pt=Ct.createBlock,ze=Ct.withCtx,We=Ct.createVNode,nn=Ct.createElementBlock,qn=Ct.createElementVNode,Up=Ct.useCssVars,Vp=Ct.defineAsyncComponent,Gp=Ct.Teleport,gn=Ct.toDisplayString,ii=Ct.Fragment,ho=Ct.renderList,qp=Ct.ref,Lt=Ct.createTextVNode,Wa=Ct.mergeProps,Tu=Ct.createSlots,ls=Ct.normalizeStyle,Hr=Ct.createCommentVNode,Js=Ct.h,Fl=Ct.withKeys,ja=Ct.withModifiers,Yp=Ct.toRaw,Kp=Ct.defineComponent,Xp=Ct.warn,Jp=Ct.inject,Mu=Ct.computed,Zp=Ct.shallowRef,Qp=Ct.watchEffect,eg=Ct.normalizeClass,tg=Ct.getCurrentInstance,ng=Ct.provide,Iu=Ct.createApp,rg=Ct.withDirectives,ig=Ct.vShow},Ct=>{og=Ct.createRouter,sg=Ct.createWebHistory},Ct=>{ag=Ct.defineStore,lg=Ct.createPinia},Ct=>{Lu=Ct.getMountedApps},Ct=>{cg=Ct.createVuetify}],execute:(function(){Tn({$:Ur,C:Qa,T:Cm,U:rh,_:Tm,e:Mm,f:Im,h:fo,i:ra,j:oh,k:_m,n:Y0,o:Lr,p:km,q:na});var Ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ug(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(h){return Object.getOwnPropertyDescriptor(n,h).enumerable}))),e.push.apply(e,r)}return e}function cs(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ug(Object(e),!0).forEach((function(r){qx(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ug(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function qx(n,t,e){return(t=(function(r){var h=(function(f,g){if(us(f)!=="object"||f===null)return f;var y=f[Symbol.toPrimitive];if(y!==void 0){var c=y.call(f,g);if(us(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(f)})(r,"string");return us(h)==="symbol"?h:String(h)})(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function us(n){return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,h=String(e),f=h.length,g=-1,y="",c=h.charCodeAt(0);++g<f;)(r=h.charCodeAt(g))!=0?y+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&c==45?"\\"+r.toString(16)+" ":g==0&&f==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+h.charAt(g):h.charAt(g):y+="�";return y};n.CSS||(n.CSS={}),n.CSS.escape=t})(Ct);var Yx={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function Kx(n){if(us(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=cs(cs({},Yx),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(us(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:Xx.bind(null,t,e),mount:Jx.bind(null,t,e),unmount:Qx.bind(null,t,e),update:Zx.bind(null,t,e)}}function Xx(n){return n.loadRootComponent?n.loadRootComponent().then((function(t){return n.rootComponent=t})):Promise.resolve()}function Jx(n,t,e){var r={};return Promise.resolve().then((function(){return(function(h,f){return typeof h.appOptions=="function"?h.appOptions(f):Promise.resolve(cs({},h.appOptions))})(n,e).then((function(h){var f;if(e.domElement&&!h.el&&(h.el=e.domElement),h.el)if(typeof h.el=="string"){if(!(f=document.querySelector(h.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(h.el))}else(f=h.el).id||(f.id="single-spa-application:".concat(e.name)),h.el="#".concat(CSS.escape(f.id));else{var g="single-spa-application:".concat(e.name);h.el="#".concat(CSS.escape(g)),(f=document.getElementById(g))||((f=document.createElement("div")).id=g,document.body.appendChild(f))}if(!n.replaceMode&&(h.el=h.el+" .single-spa-container",!f.querySelector(".single-spa-container"))){var y=document.createElement("div");y.className="single-spa-container",f.appendChild(y)}r.domEl=f,h.render||h.template||!n.rootComponent||(h.render=function(d){return d(n.rootComponent)}),h.data||(h.data={});var c=h.data;if(h.data=function(){return cs(cs({},typeof c=="function"?c.call(this,this):c),e)},n.createApp){if(r.vueInstance=n.createApp(h),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(h.el),t[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(h.el)}else if(r.vueInstance=new n.Vue(h),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return t[e.name]=r,r.vueInstance}));return t[e.name]=r,r.vueInstance}))}))}function Zx(n,t,e){return Promise.resolve().then((function(){var r=t[e.name],h=cs(cs({},n.appOptions.data||{}),e),f=r.root||r.vueInstance;for(var g in h)f[g]=h[g]}))}function Qx(n,t,e){return Promise.resolve().then((function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const eC=(n,t)=>{const e=n.__vccOpts||n;for(const[r,h]of t)e[r]=h;return e},tC={};function nC(n,t){const e=Ue("router-view"),r=Ue("v-app");return nt(),Pt(r,{id:"innerapp"},{default:ze(()=>[We(e)]),_:1})}const rC=eC(tC,[["render",nC]]),hg=function(n){!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),n.children?.forEach(hg)},mz="modulepreload",vz=function(n){return"/"+n},yz={},et=function(t,e,r){let h=Promise.resolve();function f(g){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=g,window.dispatchEvent(y),!y.defaultPrevented)throw g}return h.then(g=>{for(const y of g||[])y.status==="rejected"&&f(y.reason);return t().catch(f)})},qi=Tn("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,h]of t)e[r]=h;return e}),iC="/icons/customIcons.svg",Ou={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return iC+"#"+this.icon}}},dg=()=>{Up(n=>({v4ccb3d08:n.color}))},fg=Ou.setup;Ou.setup=fg?(n,t)=>(dg(),fg(n,t)):dg;const oC={class:"cosmos-custom-icon"},sC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},aC=["href"];function lC(n,t,e,r,h,f){return nt(),nn("span",oC,[(nt(),nn("svg",sC,[qn("use",{href:f.iconSrc},null,8,aC)]))])}const cC=qi(Ou,[["render",lC],["__scopeId","data-v-54b83b01"]]);function pg(n,t){return function(){return n.apply(t,arguments)}}const{toString:uC}=Object.prototype,{getPrototypeOf:zl}=Object,{iterator:Bl,toStringTag:gg}=Symbol,Wl=(n=>t=>{const e=uC.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Yi=n=>(n=n.toLowerCase(),t=>Wl(t)===n),jl=n=>t=>typeof t===n,{isArray:Zs}=Array,Qs=jl("undefined");function Ha(n){return n!==null&&!Qs(n)&&n.constructor!==null&&!Qs(n.constructor)&&oi(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const mg=Yi("ArrayBuffer");function hC(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&mg(n.buffer),t}const dC=jl("string"),oi=jl("function"),vg=jl("number"),Ua=n=>n!==null&&typeof n=="object",fC=n=>n===!0||n===!1,Hl=n=>{if(Wl(n)!=="object")return!1;const t=zl(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(gg in n)&&!(Bl in n)},pC=n=>{if(!Ua(n)||Ha(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},gC=Yi("Date"),mC=Yi("File"),vC=n=>!!(n&&typeof n.uri<"u"),yC=n=>n&&typeof n.getParts<"u",bC=Yi("Blob"),wC=Yi("FileList"),xC=n=>Ua(n)&&oi(n.pipe);function CC(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const yg=CC(),bg=typeof yg.FormData<"u"?yg.FormData:void 0,_C=n=>{if(!n)return!1;if(bg&&n instanceof bg)return!0;const t=zl(n);if(!t||t===Object.prototype||!oi(n.append))return!1;const e=Wl(n);return e==="formdata"||e==="object"&&oi(n.toString)&&n.toString()==="[object FormData]"},kC=Yi("URLSearchParams"),[AC,SC,$C,EC]=["ReadableStream","Request","Response","Headers"].map(Yi),RC=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Va(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,h;if(typeof n!="object"&&(n=[n]),Zs(n))for(r=0,h=n.length;r<h;r++)t.call(null,n[r],r,n);else{if(Ha(n))return;const f=e?Object.getOwnPropertyNames(n):Object.keys(n),g=f.length;let y;for(r=0;r<g;r++)y=f[r],t.call(null,n[y],y,n)}}function wg(n,t){if(Ha(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,h;for(;r-- >0;)if(h=e[r],t===h.toLowerCase())return h;return null}const hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xg=n=>!Qs(n)&&n!==hs;function Nu(){const{caseless:n,skipUndefined:t}=xg(this)&&this||{},e={},r=(h,f)=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const g=n&&wg(e,f)||f;Hl(e[g])&&Hl(h)?e[g]=Nu(e[g],h):Hl(h)?e[g]=Nu({},h):Zs(h)?e[g]=h.slice():(!t||!Qs(h))&&(e[g]=h)};for(let h=0,f=arguments.length;h<f;h++)arguments[h]&&Va(arguments[h],r);return e}const TC=(n,t,e,{allOwnKeys:r}={})=>(Va(t,(h,f)=>{e&&oi(h)?Object.defineProperty(n,f,{value:pg(h,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,f,{value:h,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),MC=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),IC=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},LC=(n,t,e,r)=>{let h,f,g;const y={};if(t=t||{},n==null)return t;do{for(h=Object.getOwnPropertyNames(n),f=h.length;f-- >0;)g=h[f],(!r||r(g,n,t))&&!y[g]&&(t[g]=n[g],y[g]=!0);n=e!==!1&&zl(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},OC=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},NC=n=>{if(!n)return null;if(Zs(n))return n;let t=n.length;if(!vg(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},DC=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&zl(Uint8Array)),PC=(n,t)=>{const e=(n&&n[Bl]).call(n);let r;for(;(r=e.next())&&!r.done;){const h=r.value;t.call(n,h[0],h[1])}},FC=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},zC=Yi("HTMLFormElement"),BC=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Cg=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),WC=Yi("RegExp"),_g=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Va(e,(h,f)=>{let g;(g=t(h,f,n))!==!1&&(r[f]=g||h)}),Object.defineProperties(n,r)},jC=n=>{_g(n,(t,e)=>{if(oi(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(oi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},HC=(n,t)=>{const e={},r=h=>{h.forEach(f=>{e[f]=!0})};return Zs(n)?r(n):r(String(n).split(t)),e},UC=()=>{},VC=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function GC(n){return!!(n&&oi(n.append)&&n[gg]==="FormData"&&n[Bl])}const qC=n=>{const t=new Array(10),e=(r,h)=>{if(Ua(r)){if(t.indexOf(r)>=0)return;if(Ha(r))return r;if(!("toJSON"in r)){t[h]=r;const f=Zs(r)?[]:{};return Va(r,(g,y)=>{const c=e(g,h+1);!Qs(c)&&(f[y]=c)}),t[h]=void 0,f}}return r};return e(n,0)},YC=Yi("AsyncFunction"),KC=n=>n&&(Ua(n)||oi(n))&&oi(n.then)&&oi(n.catch),kg=((n,t)=>n?setImmediate:t?((e,r)=>(hs.addEventListener("message",({source:h,data:f})=>{h===hs&&f===e&&r.length&&r.shift()()},!1),h=>{r.push(h),hs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",oi(hs.postMessage)),XC=typeof queueMicrotask<"u"?queueMicrotask.bind(hs):typeof process<"u"&&process.nextTick||kg,JC=n=>n!=null&&oi(n[Bl]),ke={isArray:Zs,isArrayBuffer:mg,isBuffer:Ha,isFormData:_C,isArrayBufferView:hC,isString:dC,isNumber:vg,isBoolean:fC,isObject:Ua,isPlainObject:Hl,isEmptyObject:pC,isReadableStream:AC,isRequest:SC,isResponse:$C,isHeaders:EC,isUndefined:Qs,isDate:gC,isFile:mC,isReactNativeBlob:vC,isReactNative:yC,isBlob:bC,isRegExp:WC,isFunction:oi,isStream:xC,isURLSearchParams:kC,isTypedArray:DC,isFileList:wC,forEach:Va,merge:Nu,extend:TC,trim:RC,stripBOM:MC,inherits:IC,toFlatObject:LC,kindOf:Wl,kindOfTest:Yi,endsWith:OC,toArray:NC,forEachEntry:PC,matchAll:FC,isHTMLForm:zC,hasOwnProperty:Cg,hasOwnProp:Cg,reduceDescriptors:_g,freezeMethods:jC,toObjectSet:HC,toCamelCase:BC,noop:UC,toFiniteNumber:VC,findKey:wg,global:hs,isContextDefined:xg,isSpecCompliantForm:GC,toJSONObject:qC,isAsyncFn:YC,isThenable:KC,setImmediate:kg,asap:XC,isIterable:JC};let vt=class Hx extends Error{static from(t,e,r,h,f,g){const y=new Hx(t.message,e||t.code,r,h,f);return y.cause=t,y.name=t.name,t.status!=null&&y.status==null&&(y.status=t.status),g&&Object.assign(y,g),y}constructor(t,e,r,h,f){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),h&&(this.request=h),f&&(this.response=f,this.status=f.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ke.toJSONObject(this.config),code:this.code,status:this.status}}};vt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",vt.ERR_BAD_OPTION="ERR_BAD_OPTION",vt.ECONNABORTED="ECONNABORTED",vt.ETIMEDOUT="ETIMEDOUT",vt.ERR_NETWORK="ERR_NETWORK",vt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",vt.ERR_DEPRECATED="ERR_DEPRECATED",vt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",vt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",vt.ERR_CANCELED="ERR_CANCELED",vt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",vt.ERR_INVALID_URL="ERR_INVALID_URL",vt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const ZC=null;function Du(n){return ke.isPlainObject(n)||ke.isArray(n)}function Ag(n){return ke.endsWith(n,"[]")?n.slice(0,-2):n}function Pu(n,t,e){return n?n.concat(t).map(function(r,h){return r=Ag(r),!e&&h?"["+r+"]":r}).join(e?".":""):t}function QC(n){return ke.isArray(n)&&!n.some(Du)}const e_=ke.toFlatObject(ke,{},null,function(n){return/^is[A-Z]/.test(n)});function Ul(n,t,e){if(!ke.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=ke.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(s,m){return!ke.isUndefined(m[s])});const r=e.metaTokens,h=e.visitor||l,f=e.dots,g=e.indexes,y=e.Blob||typeof Blob<"u"&&Blob,c=e.maxDepth===void 0?100:e.maxDepth,d=y&&ke.isSpecCompliantForm(t);if(!ke.isFunction(h))throw new TypeError("visitor must be a function");function i(s){if(s===null)return"";if(ke.isDate(s))return s.toISOString();if(ke.isBoolean(s))return s.toString();if(!d&&ke.isBlob(s))throw new vt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(s)||ke.isTypedArray(s)?d&&typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function l(s,m,w){let x=s;if(ke.isReactNative(t)&&ke.isReactNativeBlob(s))return t.append(Pu(w,m,f),i(s)),!1;if(s&&!w&&typeof s=="object"){if(ke.endsWith(m,"{}"))m=r?m:m.slice(0,-2),s=JSON.stringify(s);else if(ke.isArray(s)&&QC(s)||(ke.isFileList(s)||ke.endsWith(m,"[]"))&&(x=ke.toArray(s)))return m=Ag(m),x.forEach(function(R,$){!(ke.isUndefined(R)||R===null)&&t.append(g===!0?Pu([m],$,f):g===null?m:m+"[]",i(R))}),!1}return Du(s)?!0:(t.append(Pu(w,m,f),i(s)),!1)}const u=[],p=Object.assign(e_,{defaultVisitor:l,convertValue:i,isVisitable:Du});function o(s,m,w=0){if(!ke.isUndefined(s)){if(w>c)throw new vt("Object is too deeply nested ("+w+" levels). Max depth: "+c,vt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(u.indexOf(s)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(s),ke.forEach(s,function(x,R){(!(ke.isUndefined(x)||x===null)&&h.call(t,x,ke.isString(R)?R.trim():R,m,p))===!0&&o(x,m?m.concat(R):[R],w+1)}),u.pop()}}if(!ke.isObject(n))throw new TypeError("data must be an object");return o(n),t}function Sg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Fu(n,t){this._pairs=[],n&&Ul(n,this,t)}const $g=Fu.prototype;$g.append=function(n,t){this._pairs.push([n,t])},$g.toString=function(n){const t=n?function(e){return n.call(this,e,Sg)}:Sg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function t_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Eg(n,t,e){if(!t)return n;const r=e&&e.encode||t_,h=ke.isFunction(e)?{serialize:e}:e,f=h&&h.serialize;let g;if(f?g=f(t,h):g=ke.isURLSearchParams(t)?t.toString():new Fu(t,h).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}let Rg=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ke.forEach(this.handlers,function(e){e!==null&&t(e)})}};const zu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},n_=typeof URLSearchParams<"u"?URLSearchParams:Fu,r_=typeof FormData<"u"?FormData:null,i_=typeof Blob<"u"?Blob:null,o_={isBrowser:!0,classes:{URLSearchParams:n_,FormData:r_,Blob:i_},protocols:["http","https","file","blob","url","data"]},Bu=typeof window<"u"&&typeof document<"u",Wu=typeof navigator=="object"&&navigator||void 0,s_=Bu&&(!Wu||["ReactNative","NativeScript","NS"].indexOf(Wu.product)<0),a_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",l_=Bu&&window.location.href||"http://localhost",c_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bu,hasStandardBrowserEnv:s_,hasStandardBrowserWebWorkerEnv:a_,navigator:Wu,origin:l_},Symbol.toStringTag,{value:"Module"})),Ir={...c_,...o_};function u_(n,t){return Ul(n,new Ir.classes.URLSearchParams,{visitor:function(e,r,h,f){return Ir.isNode&&ke.isBuffer(e)?(this.append(r,e.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...t})}function h_(n){return ke.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function d_(n){const t={},e=Object.keys(n);let r;const h=e.length;let f;for(r=0;r<h;r++)f=e[r],t[f]=n[f];return t}function Tg(n){function t(e,r,h,f){let g=e[f++];if(g==="__proto__")return!0;const y=Number.isFinite(+g),c=f>=e.length;return g=!g&&ke.isArray(h)?h.length:g,c?(ke.hasOwnProp(h,g)?h[g]=ke.isArray(h[g])?h[g].concat(r):[h[g],r]:h[g]=r,!y):((!h[g]||!ke.isObject(h[g]))&&(h[g]=[]),t(e,r,h[g],f)&&ke.isArray(h[g])&&(h[g]=d_(h[g])),!y)}if(ke.isFormData(n)&&ke.isFunction(n.entries)){const e={};return ke.forEachEntry(n,(r,h)=>{t(h_(r),h,e,0)}),e}return null}const ea=(n,t)=>n!=null&&ke.hasOwnProp(n,t)?n[t]:void 0;function f_(n,t,e){if(ke.isString(n))try{return(t||JSON.parse)(n),ke.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Ga={transitional:zu,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,h=ke.isObject(n);if(h&&ke.isHTMLForm(n)&&(n=new FormData(n)),ke.isFormData(n))return r?JSON.stringify(Tg(n)):n;if(ke.isArrayBuffer(n)||ke.isBuffer(n)||ke.isStream(n)||ke.isFile(n)||ke.isBlob(n)||ke.isReadableStream(n))return n;if(ke.isArrayBufferView(n))return n.buffer;if(ke.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let f;if(h){const g=ea(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return u_(n,g).toString();if((f=ke.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=ea(this,"env"),c=y&&y.FormData;return Ul(f?{"files[]":n}:n,c&&new c,g)}}return h||r?(t.setContentType("application/json",!1),f_(n)):n}],transformResponse:[function(n){const t=ea(this,"transitional")||Ga.transitional,e=t&&t.forcedJSONParsing,r=ea(this,"responseType"),h=r==="json";if(ke.isResponse(n)||ke.isReadableStream(n))return n;if(n&&ke.isString(n)&&(e&&!r||h)){const f=!(t&&t.silentJSONParsing)&&h;try{return JSON.parse(n,ea(this,"parseReviver"))}catch(g){if(f)throw g.name==="SyntaxError"?vt.from(g,vt.ERR_BAD_RESPONSE,this,null,ea(this,"response")):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ir.classes.FormData,Blob:Ir.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],n=>{Ga.headers[n]={}});const p_=ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g_=n=>{const t={};let e,r,h;return n&&n.split(`
|
|
2
|
-
`).forEach(function(f){h=f.indexOf(":"),e=f.substring(0,h).trim().toLowerCase(),r=f.substring(h+1).trim(),!(!e||t[e]&&p_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Mg=Symbol("internals"),m_=/[^\x09\x20-\x7E\x80-\xFF]/g;function v_(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}function qa(n){return n&&String(n).trim().toLowerCase()}function y_(n){return v_(n.replace(m_,""))}function Vl(n){return n===!1||n==null?n:ke.isArray(n)?n.map(Vl):y_(String(n))}function b_(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const w_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ju(n,t,e,r,h){if(ke.isFunction(r))return r.call(this,t,e);if(h&&(t=e),!!ke.isString(t)){if(ke.isString(r))return t.indexOf(r)!==-1;if(ke.isRegExp(r))return r.test(t)}}function x_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function C_(n,t){const e=ke.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(h,f,g){return this[r].call(this,t,h,f,g)},configurable:!0})})}let si=class{constructor(t){t&&this.set(t)}set(t,e,r){const h=this;function f(y,c,d){const i=qa(c);if(!i)throw new Error("header name must be a non-empty string");const l=ke.findKey(h,i);(!l||h[l]===void 0||d===!0||d===void 0&&h[l]!==!1)&&(h[l||c]=Vl(y))}const g=(y,c)=>ke.forEach(y,(d,i)=>f(d,i,c));if(ke.isPlainObject(t)||t instanceof this.constructor)g(t,e);else if(ke.isString(t)&&(t=t.trim())&&!w_(t))g(g_(t),e);else if(ke.isObject(t)&&ke.isIterable(t)){let y={},c,d;for(const i of t){if(!ke.isArray(i))throw TypeError("Object iterator must return a key-value pair");y[d=i[0]]=(c=y[d])?ke.isArray(c)?[...c,i[1]]:[c,i[1]]:i[1]}g(y,e)}else t!=null&&f(e,t,r);return this}get(t,e){if(t=qa(t),t){const r=ke.findKey(this,t);if(r){const h=this[r];if(!e)return h;if(e===!0)return b_(h);if(ke.isFunction(e))return e.call(this,h,r);if(ke.isRegExp(e))return e.exec(h);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=qa(t),t){const r=ke.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||ju(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let h=!1;function f(g){if(g=qa(g),g){const y=ke.findKey(r,g);y&&(!e||ju(r,r[y],y,e))&&(delete r[y],h=!0)}}return ke.isArray(t)?t.forEach(f):f(t),h}clear(t){const e=Object.keys(this);let r=e.length,h=!1;for(;r--;){const f=e[r];(!t||ju(this,this[f],f,t,!0))&&(delete this[f],h=!0)}return h}normalize(t){const e=this,r={};return ke.forEach(this,(h,f)=>{const g=ke.findKey(r,f);if(g){e[g]=Vl(h),delete e[f];return}const y=t?x_(f):String(f).trim();y!==f&&delete e[f],e[y]=Vl(h),r[y]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ke.forEach(this,(r,h)=>{r!=null&&r!==!1&&(e[h]=t&&ke.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(h=>r.set(h)),r}static accessor(t){const e=(this[Mg]=this[Mg]={accessors:{}}).accessors,r=this.prototype;function h(f){const g=qa(f);e[g]||(C_(r,f),e[g]=!0)}return ke.isArray(t)?t.forEach(h):h(t),this}};si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ke.reduceDescriptors(si.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ke.freezeMethods(si);function Hu(n,t){const e=this||Ga,r=t||e,h=si.from(r.headers);let f=r.data;return ke.forEach(n,function(g){f=g.call(e,f,h.normalize(),t?t.status:void 0)}),h.normalize(),f}function Ig(n){return!!(n&&n.__CANCEL__)}let Ya=class extends vt{constructor(t,e,r){super(t??"canceled",vt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Lg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new vt("Request failed with status code "+e.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function __(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function k_(n,t){n=n||10;const e=new Array(n),r=new Array(n);let h=0,f=0,g;return t=t!==void 0?t:1e3,function(y){const c=Date.now(),d=r[f];g||(g=c),e[h]=y,r[h]=c;let i=f,l=0;for(;i!==h;)l+=e[i++],i=i%n;if(h=(h+1)%n,h===f&&(f=(f+1)%n),c-g<t)return;const u=d&&c-d;return u?Math.round(l*1e3/u):void 0}}function A_(n,t){let e=0,r=1e3/t,h,f;const g=(y,c=Date.now())=>{e=c,h=null,f&&(clearTimeout(f),f=null),n(...y)};return[(...y)=>{const c=Date.now(),d=c-e;d>=r?g(y,c):(h=y,f||(f=setTimeout(()=>{f=null,g(h)},r-d)))},()=>h&&g(h)]}const Gl=(n,t,e=3)=>{let r=0;const h=k_(50,250);return A_(f=>{const g=f.loaded,y=f.lengthComputable?f.total:void 0,c=y!=null?Math.min(g,y):g,d=Math.max(0,c-r),i=h(d);r=Math.max(r,c);const l={loaded:c,total:y,progress:y?c/y:void 0,bytes:d,rate:i||void 0,estimated:i&&y?(y-c)/i:void 0,event:f,lengthComputable:y!=null,[t?"download":"upload"]:!0};n(l)},e)},Og=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Ng=n=>(...t)=>ke.asap(()=>n(...t)),S_=Ir.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Ir.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Ir.origin),Ir.navigator&&/(msie|trident)/i.test(Ir.navigator.userAgent)):()=>!0,$_=Ir.hasStandardBrowserEnv?{write(n,t,e,r,h,f,g){if(typeof document>"u")return;const y=[`${n}=${encodeURIComponent(t)}`];ke.isNumber(e)&&y.push(`expires=${new Date(e).toUTCString()}`),ke.isString(r)&&y.push(`path=${r}`),ke.isString(h)&&y.push(`domain=${h}`),f===!0&&y.push("secure"),ke.isString(g)&&y.push(`SameSite=${g}`),document.cookie=y.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function E_(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function R_(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Dg(n,t,e){let r=!E_(t);return n&&(r||e===!1)?R_(n,t):t}const Pg=n=>n instanceof si?{...n}:n;function ds(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,i,l,u){return ke.isPlainObject(d)&&ke.isPlainObject(i)?ke.merge.call({caseless:u},d,i):ke.isPlainObject(i)?ke.merge({},i):ke.isArray(i)?i.slice():i}function h(d,i,l,u){if(ke.isUndefined(i)){if(!ke.isUndefined(d))return r(void 0,d,l,u)}else return r(d,i,l,u)}function f(d,i){if(!ke.isUndefined(i))return r(void 0,i)}function g(d,i){if(ke.isUndefined(i)){if(!ke.isUndefined(d))return r(void 0,d)}else return r(void 0,i)}function y(d,i,l){if(ke.hasOwnProp(t,l))return r(d,i);if(ke.hasOwnProp(n,l))return r(void 0,d)}const c={url:f,method:f,data:f,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:y,headers:(d,i,l)=>h(Pg(d),Pg(i),l,!0)};return ke.forEach(Object.keys({...n,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const i=ke.hasOwnProp(c,d)?c[d]:h,l=ke.hasOwnProp(n,d)?n[d]:void 0,u=ke.hasOwnProp(t,d)?t[d]:void 0,p=i(l,u,d);ke.isUndefined(p)&&i!==y||(e[d]=p)}),e}const Fg=n=>{const t=ds({},n),e=u=>ke.hasOwnProp(t,u)?t[u]:void 0,r=e("data");let h=e("withXSRFToken");const f=e("xsrfHeaderName"),g=e("xsrfCookieName");let y=e("headers");const c=e("auth"),d=e("baseURL"),i=e("allowAbsoluteUrls"),l=e("url");if(t.headers=y=si.from(y),t.url=Eg(Dg(d,l,i),n.params,n.paramsSerializer),c&&y.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ke.isFormData(r)){if(Ir.hasStandardBrowserEnv||Ir.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if(ke.isFunction(r.getHeaders)){const u=r.getHeaders(),p=["content-type","content-length"];Object.entries(u).forEach(([o,s])=>{p.includes(o.toLowerCase())&&y.set(o,s)})}}if(Ir.hasStandardBrowserEnv&&(ke.isFunction(h)&&(h=h(t)),h===!0||h==null&&S_(t.url))){const u=f&&g&&$_.read(g);u&&y.set(f,u)}return t},T_=typeof XMLHttpRequest<"u",M_=T_&&function(n){return new Promise(function(t,e){const r=Fg(n);let h=r.data;const f=si.from(r.headers).normalize();let{responseType:g,onUploadProgress:y,onDownloadProgress:c}=r,d,i,l,u,p;function o(){u&&u(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function m(){if(!s)return;const x=si.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),R={data:!g||g==="text"||g==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:n,request:s};Lg(function($){t($),o()},function($){e($),o()},R),s=null}"onloadend"in s?s.onloadend=m:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(m)},s.onabort=function(){s&&(e(new vt("Request aborted",vt.ECONNABORTED,n,s)),s=null)},s.onerror=function(x){const R=x&&x.message?x.message:"Network Error",$=new vt(R,vt.ERR_NETWORK,n,s);$.event=x||null,e($),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||zu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new vt(x,R.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,n,s)),s=null},h===void 0&&f.setContentType(null),"setRequestHeader"in s&&ke.forEach(f.toJSON(),function(x,R){s.setRequestHeader(R,x)}),ke.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),g&&g!=="json"&&(s.responseType=r.responseType),c&&([l,p]=Gl(c,!0),s.addEventListener("progress",l)),y&&s.upload&&([i,u]=Gl(y),s.upload.addEventListener("progress",i),s.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new Ya(null,n,s):x),s.abort(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=__(r.url);if(w&&Ir.protocols.indexOf(w)===-1){e(new vt("Unsupported protocol "+w+":",vt.ERR_BAD_REQUEST,n));return}s.send(h||null)})},I_=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,h;const f=function(d){if(!h){h=!0,y();const i=d instanceof Error?d:this.reason;r.abort(i instanceof vt?i:new Ya(i instanceof Error?i.message:i))}};let g=t&&setTimeout(()=>{g=null,f(new vt(`timeout of ${t}ms exceeded`,vt.ETIMEDOUT))},t);const y=()=>{n&&(g&&clearTimeout(g),g=null,n.forEach(d=>{d.unsubscribe?d.unsubscribe(f):d.removeEventListener("abort",f)}),n=null)};n.forEach(d=>d.addEventListener("abort",f));const{signal:c}=r;return c.unsubscribe=()=>ke.asap(y),c}},L_=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,h;for(;r<e;)h=r+t,yield n.slice(r,h),r=h},O_=async function*(n,t){for await(const e of N_(n))yield*L_(e,t)},N_=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},zg=(n,t,e,r)=>{const h=O_(n,t);let f=0,g,y=c=>{g||(g=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:i}=await h.next();if(d){y(),c.close();return}let l=i.byteLength;if(e){let u=f+=l;e(u)}c.enqueue(new Uint8Array(i))}catch(d){throw y(d),d}},cancel(c){return y(c),h.return()}},{highWaterMark:2})},Bg=64*1024,{isFunction:ql}=ke,D_=(({Request:n,Response:t})=>({Request:n,Response:t}))(ke.global),{ReadableStream:Wg,TextEncoder:jg}=ke.global,Hg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},P_=n=>{n=ke.merge.call({skipUndefined:!0},D_,n);const{fetch:t,Request:e,Response:r}=n,h=t?ql(t):typeof fetch=="function",f=ql(e),g=ql(r);if(!h)return!1;const y=h&&ql(Wg),c=h&&(typeof jg=="function"?(o=>s=>o.encode(s))(new jg):async o=>new Uint8Array(await new e(o).arrayBuffer())),d=f&&y&&Hg(()=>{let o=!1;const s=new e(Ir.origin,{body:new Wg,method:"POST",get duplex(){return o=!0,"half"}}),m=s.headers.has("Content-Type");return s.body!=null&&s.body.cancel(),o&&!m}),i=g&&y&&Hg(()=>ke.isReadableStream(new r("").body)),l={stream:i&&(o=>o.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!l[o]&&(l[o]=(s,m)=>{let w=s&&s[o];if(w)return w.call(s);throw new vt(`Response type '${o}' is not supported`,vt.ERR_NOT_SUPPORT,m)})});const u=async o=>{if(o==null)return 0;if(ke.isBlob(o))return o.size;if(ke.isSpecCompliantForm(o))return(await new e(Ir.origin,{method:"POST",body:o}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(o)||ke.isArrayBuffer(o))return o.byteLength;if(ke.isURLSearchParams(o)&&(o=o+""),ke.isString(o))return(await c(o)).byteLength},p=async(o,s)=>ke.toFiniteNumber(o.getContentLength())??u(s);return async o=>{let{url:s,method:m,data:w,signal:x,cancelToken:R,timeout:$,onDownloadProgress:k,onUploadProgress:C,responseType:O,headers:N,withCredentials:L="same-origin",fetchOptions:I}=Fg(o),W=t||fetch;O=O?(O+"").toLowerCase():"text";let F=I_([x,R&&R.toAbortSignal()],$),D=null;const A=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let _;try{if(C&&d&&m!=="get"&&m!=="head"&&(_=await p(N,w))!==0){let J=new e(s,{method:"POST",body:w,duplex:"half"}),oe;if(ke.isFormData(w)&&(oe=J.headers.get("content-type"))&&N.setContentType(oe),J.body){const[ee,se]=Og(_,Gl(Ng(C)));w=zg(J.body,Bg,ee,se)}}ke.isString(L)||(L=L?"include":"omit");const M=f&&"credentials"in e.prototype;if(ke.isFormData(w)){const J=N.getContentType();J&&/^multipart\/form-data/i.test(J)&&!/boundary=/i.test(J)&&N.delete("content-type")}const B={...I,signal:F,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:M?L:void 0};D=f&&new e(s,B);let j=await(f?W(D,I):W(s,B));const V=i&&(O==="stream"||O==="response");if(i&&(k||V&&A)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=j[ce]});const oe=ke.toFiniteNumber(j.headers.get("content-length")),[ee,se]=k&&Og(oe,Gl(Ng(k),!0))||[];j=new r(zg(j.body,Bg,ee,()=>{se&&se(),A&&A()}),J)}O=O||"text";let K=await l[ke.findKey(l,O)||"text"](j,o);return!V&&A&&A(),await new Promise((J,oe)=>{Lg(J,oe,{data:K,headers:si.from(j.headers),status:j.status,statusText:j.statusText,config:o,request:D})})}catch(M){throw A&&A(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new vt("Network Error",vt.ERR_NETWORK,o,D,M&&M.response),{cause:M.cause||M}):vt.from(M,M&&M.code,o,D,M&&M.response)}}},F_=new Map,Ug=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:h}=t,f=[r,h,e];let g=f.length,y=g,c,d,i=F_;for(;y--;)c=f[y],d=i.get(c),d===void 0&&i.set(c,d=y?new Map:P_(t)),i=d;return d};Ug();const Uu={http:ZC,xhr:M_,fetch:{get:Ug}};ke.forEach(Uu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Vg=n=>`- ${n}`,z_=n=>ke.isFunction(n)||n===null||n===!1;function B_(n,t){n=ke.isArray(n)?n:[n];const{length:e}=n;let r,h;const f={};for(let g=0;g<e;g++){r=n[g];let y;if(h=r,!z_(r)&&(h=Uu[(y=String(r)).toLowerCase()],h===void 0))throw new vt(`Unknown adapter '${y}'`);if(h&&(ke.isFunction(h)||(h=h.get(t))))break;f[y||"#"+g]=h}if(!h){const g=Object.entries(f).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let y=e?g.length>1?`since :
|
|
4
|
-
`+g.map(Vg).join(`
|
|
5
|
-
`):" "+Vg(g[0]):"as no adapter specified";throw new vt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return h}const Gg={getAdapter:B_,adapters:Uu};function Vu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ya(null,n)}function qg(n){return Vu(n),n.headers=si.from(n.headers),n.data=Hu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Gg.getAdapter(n.adapter||Ga.adapter,n)(n).then(function(t){return Vu(n),t.data=Hu.call(n,n.transformResponse,t),t.headers=si.from(t.headers),t},function(t){return Ig(t)||(Vu(n),t&&t.response&&(t.response.data=Hu.call(n,n.transformResponse,t.response),t.response.headers=si.from(t.response.headers))),Promise.reject(t)})}const Yg="1.15.2",Yl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Yl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Kg={};Yl.transitional=function(n,t,e){function r(h,f){return"[Axios v"+Yg+"] Transitional option '"+h+"'"+f+(e?". "+e:"")}return(h,f,g)=>{if(n===!1)throw new vt(r(f," has been removed"+(t?" in "+t:"")),vt.ERR_DEPRECATED);return t&&!Kg[f]&&(Kg[f]=!0,console.warn(r(f," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(h,f,g):!0}},Yl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function W_(n,t,e){if(typeof n!="object")throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let h=r.length;for(;h-- >0;){const f=r[h],g=Object.prototype.hasOwnProperty.call(t,f)?t[f]:void 0;if(g){const y=n[f],c=y===void 0||g(y,f,n);if(c!==!0)throw new vt("option "+f+" must be "+c,vt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new vt("Unknown option "+f,vt.ERR_BAD_OPTION)}}const Kl={assertOptions:W_,validators:Yl},Ii=Kl.validators;let fs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Rg,response:new Rg}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let h={};Error.captureStackTrace?Error.captureStackTrace(h):h=new Error;const f=(()=>{if(!h.stack)return"";const g=h.stack.indexOf(`
|
|
6
|
-
`);return g===-1?"":h.stack.slice(g+1)})();try{if(!r.stack)r.stack=f;else if(f){const g=f.indexOf(`
|
|
7
|
-
`),y=g===-1?-1:f.indexOf(`
|
|
8
|
-
`,g+1),c=y===-1?"":f.slice(y+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
9
|
-
`+f)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ds(this.defaults,e);const{transitional:r,paramsSerializer:h,headers:f}=e;r!==void 0&&Kl.assertOptions(r,{silentJSONParsing:Ii.transitional(Ii.boolean),forcedJSONParsing:Ii.transitional(Ii.boolean),clarifyTimeoutError:Ii.transitional(Ii.boolean),legacyInterceptorReqResOrdering:Ii.transitional(Ii.boolean)},!1),h!=null&&(ke.isFunction(h)?e.paramsSerializer={serialize:h}:Kl.assertOptions(h,{encode:Ii.function,serialize:Ii.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Kl.assertOptions(e,{baseUrl:Ii.spelling("baseURL"),withXsrfToken:Ii.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=f&&ke.merge(f.common,f[e.method]);f&&ke.forEach(["delete","get","head","post","put","patch","common"],o=>{delete f[o]}),e.headers=si.concat(g,f);const y=[];let c=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;c=c&&o.synchronous;const s=e.transitional||zu;s&&s.legacyInterceptorReqResOrdering?y.unshift(o.fulfilled,o.rejected):y.push(o.fulfilled,o.rejected)});const d=[];this.interceptors.response.forEach(function(o){d.push(o.fulfilled,o.rejected)});let i,l=0,u;if(!c){const o=[qg.bind(this),void 0];for(o.unshift(...y),o.push(...d),u=o.length,i=Promise.resolve(e);l<u;)i=i.then(o[l++],o[l++]);return i}u=y.length;let p=e;for(;l<u;){const o=y[l++],s=y[l++];try{p=o(p)}catch(m){s.call(this,m);break}}try{i=qg.call(this,p)}catch(o){return Promise.reject(o)}for(l=0,u=d.length;l<u;)i=i.then(d[l++],d[l++]);return i}getUri(t){t=ds(this.defaults,t);const e=Dg(t.baseURL,t.url,t.allowAbsoluteUrls);return Eg(e,t.params,t.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(n){fs.prototype[n]=function(t,e){return this.request(ds(e||{},{method:n,url:t,data:(e||{}).data}))}}),ke.forEach(["post","put","patch"],function(n){function t(e){return function(r,h,f){return this.request(ds(f||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}fs.prototype[n]=t(),fs.prototype[n+"Form"]=t(!0)});let j_=class Ux{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(h){e=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](h);r._listeners=null}),this.promise.then=h=>{let f;const g=new Promise(y=>{r.subscribe(y),f=y}).then(h);return g.cancel=function(){r.unsubscribe(f)},g},t(function(h,f,g){r.reason||(r.reason=new Ya(h,f,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Ux(function(e){t=e}),cancel:t}}};function H_(n){return function(t){return n.apply(null,t)}}function U_(n){return ke.isObject(n)&&n.isAxiosError===!0}const Gu={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(Gu).forEach(([n,t])=>{Gu[t]=n});function Xg(n){const t=new fs(n),e=pg(fs.prototype.request,t);return ke.extend(e,fs.prototype,t,{allOwnKeys:!0}),ke.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Xg(ds(n,r))},e}const Yn=Xg(Ga);Yn.Axios=fs,Yn.CanceledError=Ya,Yn.CancelToken=j_,Yn.isCancel=Ig,Yn.VERSION=Yg,Yn.toFormData=Ul,Yn.AxiosError=vt,Yn.Cancel=Yn.CanceledError,Yn.all=function(n){return Promise.all(n)},Yn.spread=H_,Yn.isAxiosError=U_,Yn.mergeConfig=ds,Yn.AxiosHeaders=si,Yn.formToJSON=n=>Tg(ke.isHTMLForm(n)?new FormData(n):n),Yn.getAdapter=Gg.getAdapter,Yn.HttpStatusCode=Gu,Yn.default=Yn;const{Axios:bz,AxiosError:wz,CanceledError:xz,isCancel:Cz,CancelToken:_z,VERSION:kz,all:Az,Cancel:Sz,isAxiosError:$z,spread:Ez,toFormData:Rz,AxiosHeaders:Tz,HttpStatusCode:Mz,formToJSON:Iz,getAdapter:Lz,mergeConfig:Oz}=Yn,qu=Yn.create({baseURL:location.origin,timeout:6e4,params:{}});qu.interceptors.response.use(n=>n,n=>{if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let t=`HTTP ${n.response.status} - `;n.response?.statusText&&(t+=`${n.response.statusText} `),n.response?.config?.data&&(t+=`${n.response.config.data} `),n.response?.data?.message?t+=`${n.response.data.message}`:n.response?.data?.exception?t+=`${n.response.data.exception}`:n.response?.data?.error?.message?(n.response.data.error.class&&(t+=`${n.response.data.error.class} `),t+=`${n.response.data.error.message}`):t+=`${n.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:t}),n}else throw n});const Xl=async function(n,t,{data:e,params:r={},headers:h,noAuth:f=!1,noScope:g=!1,onUploadProgress:y=!1}={}){if(!f){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}h.Authorization=localStorage.openc3Token}return h.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),qu({method:n,url:t,data:e,params:r,headers:h,onUploadProgress:y})},Yu={Accept:"application/json"},Jg={...Yu,"Content-Type":"application/json"},Ku=Tn("l",{get:function(n,{params:t,headers:e=Yu,noScope:r,noAuth:h,onUploadProgress:f}={}){return Xl("get",n,{params:t,headers:e,noScope:r,noAuth:h,onUploadProgress:f})},put:function(n,{data:t,params:e,headers:r=Jg,noScope:h,noAuth:f,onUploadProgress:g}={}){return Xl("put",n,{data:t,params:e,headers:r,noScope:h,noAuth:f,onUploadProgress:g})},post:function(n,{data:t,params:e,headers:r=Jg,noScope:h,noAuth:f,onUploadProgress:g}={}){return Xl("post",n,{data:t,params:e,headers:r,noScope:h,noAuth:f,onUploadProgress:g})},delete:function(n,{params:t,headers:e=Yu,noScope:r,noAuth:h,onUploadProgress:f}={}){return Xl("delete",n,{params:t,headers:e,noScope:r,noAuth:h,onUploadProgress:f})}});let Jl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,h=e.length;r<h;r++)e[r](...t)},events:{},on(n,t){return(this.events[n]||=[]).push(t),()=>{this.events[n]=this.events[n]?.filter(e=>t!==e)}}}),Ka=class extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}},Xu=class extends Ka{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}};class V_ extends Ka{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ki extends Ka{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class G_ extends Ki{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Zg(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}class q_{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:String(t),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:h})=>(e[r]=h,e),{})}}const ps=Symbol("state");let Qg=class{constructor(t={}){this.emitter=Jl(),this.params=Object.freeze(t),this.presence=new q_(this),this.initialConnect=!0,this[ps]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Zg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ps]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[ps]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ps]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[ps]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[ps]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[ps]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...h)=>{r(),e(...h)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(h=>h()),t()})),r.push(this.on("close",h=>{r.forEach(f=>f()),e(h||new Ka("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class Y_{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(f=>{e=f}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},h=this._pendingTop;return this._pendings.push(r),h&&await h.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class K_{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class X_{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new K_),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let h=this._subscriptions[t]=new Y_(t);return h.remoteId=this._localToRemote[t],h.subscriber=e,h.unsubscriber=r,h.gvl=this.glv,h}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class J_{constructor(t={}){this.subscriptions=new X_(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let h=this._remoteToLocal[t];if(!h){this._pendingMessages.push([t,e,r]);return}let f=this.subscriptions.get(h);f&&f.channels.forEach(g=>{g.receive(e,r)})}notify(t,e,r){let h=this._remoteToLocal[t];if(!h)return;let f=this.subscriptions.get(h);f&&f.channels.forEach(g=>g.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const em={debug:0,info:1,warn:2,error:3};let tm=class{constructor(t){this.level=t||"warn"}log(t,e,r){em[t]<em[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}},Xa=class extends tm{writeLogEntry(){}};class Z_{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let Q_=0,nm=class{constructor(t={}){let{logger:e}=t;this.logger=e||new Xa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let h=Zg(r);if(this.pendingUnsubscriptions[h]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,h),new Promise(y=>{setTimeout(()=>{y(this.subscribe(t,e))},g)})}if(this.pendingSubscriptions[h])return this.logger.warn("subscription is already pending, skipping",h),Promise.reject(Error("Already subscribing"));let f=this.subscribeRetryInterval;return new Promise((g,y)=>{let c=++Q_;this.pendingSubscriptions[h]={resolve:g,reject:y,id:c},this.cable.send(this.buildSubscribeRequest(h)),this.maybeRetrySubscribe(c,h,f)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let h=this.pendingSubscriptions[e];h&&h.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let h=this.pendingSubscriptions[e];h&&h.id===t&&(delete this.pendingSubscriptions[e],h.reject(new V_(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:h,reason:f,reconnect:g}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let y=t.sid;return y&&this.cable.setSessionId(y),this.cable.connected()}if(e==="disconnect"){let y=new Ki(f);this.reset(y),g===!1?this.cable.closed(y):this.cable.disconnected(y);return}if(e==="confirm_subscription"){let y=this.pendingSubscriptions[r];if(!y){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],y.resolve(r)}if(e==="reject_subscription"){let y=this.pendingSubscriptions[r];return y?(delete this.pendingSubscriptions[r],y.reject(new Xu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(h)return{identifier:r,message:h};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const rm=()=>Date.now()/1e3|0;let ek=class extends nm{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=rm()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:h}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=rm()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let f=t.restored_ids||Object.keys(this.subscriptionStreams);for(let g of f)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(f)}return this.cable.connected(this.sessionId)}if(e==="presence"){let f=h.type;if(f==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(h))}else if(f==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:h}}if(h){let f=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:h,meta:f}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let h=this.presenceInfo[t];return h&&(e.presence=h),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let h of this.subscriptionStreams[t]){let f=this.streamsPositions[h];f&&(r=!0,e[h]=f)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,h){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:h},{stream:e,epoch:r,offset:h}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,h)=>{this.pendingPresence[t]={resolve:r,reject:h},this.cable.send({command:"presence",identifier:t,data:e})})}};class tk extends Ka{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}let im=class extends Qg{static identifier="__ghost__";constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}};const nk="$pubsub";let om=class extends Qg{static identifier=nk;async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}};const gs=Symbol("state");let rk=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:h,hubOptions:f,performFailures:g,transportConfigurator:y}){this.emitter=Jl(),this.transport=n,this.encoder=e,this.logger=r||new Xa,this.protocol=t,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new J_(f||{}),this[gs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=y,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,h===!1&&this.connect().catch(()=>{})}get state(){return this[gs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[gs]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[gs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Ki("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[gs]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Ki("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Ki(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[gs]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Ki?n:new Ki(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[gs]="closed";let e=t||new Ki("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:h,message:f,meta:g}=e;r?this.hub.notify(h,r,f):this.hub.transmit(h,f,g)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new om({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new om({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=im),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let h=await n.acquire("subscribed");if(h.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),h.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),h.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),h.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),h.release();return}let f={identifier:t,params:e};this.logger.debug("subscribing",f);try{let g=await this.protocol.subscribe(t,e);this.hub.subscribe(r,g),this.logger.debug("subscribed",{...f,remoteId:g}),n.notify("connected")}catch(g){if(g){if(g instanceof Xu&&this.logger.warn("rejected",f),g instanceof Ki){this.logger.debug("disconnected during subscription; will retry on connect",f),h.release();return}this.logger.error("failed to subscribe",{error:g,...f})}n.close(g),this.hub.unsubscribe(r)}h.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(h){h&&(h instanceof Ki?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:h}):this.logger.error("unsubscribe failed",{id:t,error:h}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new tk;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let h=r.remoteId,f={id:h,action:t,payload:e};this.logger.debug("perform",f);try{let g=await this.protocol.perform(h,t,e);return g&&this.logger.debug("perform result",{message:g,request:f}),g}catch(g){throw this.logger.error("perform failed",{error:g,request:f}),g}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(h=>h()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(h=>h()),t(r)}))}),this._pendingConnect)}};const ik={maxMissingPings:2,maxReconnectAttempts:1/0},ta=()=>Date.now(),sm=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:h}=t;return e=e||2,r===void 0&&(r=.5),f=>{let g=n*e**f,y=g*e,c=g+(y-g)*Math.random(),d=2*(Math.random()-.5)*r;return c=c*(1+d),h&&h<c&&(c=h),c}};let am=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},ik,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 Xa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ta()}watch(t){this.target=t,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(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ta(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ta(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ta(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ta()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=ta()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new G_))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class ok{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Jl(),this.unbind=[],this.logger=e.logger||new Xa}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...h)=>{r(),e(...h)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}}let sk=class{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Jl();let{format:h,subprotocol:f,authStrategy:g}=e;this.format=h||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=f}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let h=[];h.push(this.once("open",()=>{h.forEach(f=>f()),e()})),h.push(this.once("close",()=>{h.forEach(f=>f()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let h=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(h)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(h=>h.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...h)=>{r(),e(...h)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}};class ak{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}whisper(t){return this.channel.whisper(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class lk extends im{constructor(t,e,r){super(t,e),this.subscription=new ak(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:h})=>this.subscription.notify("connected",{reconnected:h})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",h=>this.subscription.notify("received",h)),this.on("close",h=>{h&&h instanceof Xu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}let ck=class{constructor(t){this.cable=t}create(t,e){let r,h;typeof t=="object"?(r=t.channel,delete t.channel,h=t):(r=t,h={});let f=new lk(r,h,e);return f.subscription.notify("initialized"),this.cable.subscribe(f),f.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}},uk=class{constructor(t){this.cable=t,this.subscriptions=new ck(t)}send(t){return this.cable.send(t)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}};const lm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function hk(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},lm,t);let{protocol:e,websocketImplementation:r,websocketFormat:h,websocketOptions:f,websocketAuthStrategy:g,fallbacks:y,logLevel:c,logger:d,transport:i,encoder:l,lazy:u,monitor:p,pingInterval:o,reconnectStrategy:s,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:R,historyTimestamp:$,protocolOptions:k,concurrentSubscribes:C,performFailures:O,transportConfigurator:N,auth:L}=t;if(d=d||new Xa(c),typeof e=="string"){x=x||e;let F=e.substring(0,e.lastIndexOf("-")),D=e.substring(e.lastIndexOf("-")+1);if(k=k||{},F==="actioncable-v1")e=new nm({logger:d,...k});else if(F==="actioncable-v1-ext")e=new ek({logger:d,historyTimestamp:$,...k});else throw Error(`Protocol is not supported yet: ${e}`);if(D==="json")l=l||new Z_,h=h||"text";else if(D==="msgpack"){if(h="binary",!l)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(h=h||"binary",!l)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");i=i||new sk(n,{websocketImplementation:r,websocketOptions:f,subprotocol:x,authStrategy:g,format:h}),y&&(i=new ok([i,...y],{logger:d})),L&&L.token&&i.setToken(L.token,L.param||"jid"),s=s||sm(o),p!==!1&&(p=p||new am({pingInterval:o,reconnectStrategy:s,maxMissingPings:m,maxReconnectAttempts:w,logger:d}));let I={concurrentSubscribes:C},W=new rk({protocol:e,transport:i,encoder:l,logger:d,lazy:u,hubOptions:I,performFailures:O,transportConfigurator:N});return p&&(p.watch(W),W.monitor=p),R&&dk(W,async()=>{try{await R(i)}catch(F){return d.error("Failed to refresh authentication token: "+F),!1}return W.connect().catch(()=>{}),!0}),W}function dk(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class fk extends tm{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class pk extends am{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=h=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:h})},r=()=>this.disconnect(new Ki("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const gk=["cable","action-cable"],mk="/cable",Zl=(n,t)=>{for(let e of gk){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},cm=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,vk=()=>{if(typeof document<"u"&&document.head){let n=Zl(document,"url");if(n)return cm(n)}return cm(mk)},yk=()=>{if(typeof document<"u"&&document.head){let n=Zl(document,"history-timestamp");if(n)return n|0}},bk=()=>{if(typeof document<"u"&&document.head)return Zl(document,"token")},wk=()=>{if(typeof document<"u"&&document.head)return Zl(document,"token-param")};function xk(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||vk(),t=t||{},t.historyTimestamp||=yk();let e=bk();if(e){let d=wk();t.auth=Object.assign({token:e,param:d},t.auth||{})}t=Object.assign({},lm,t);let{logLevel:r,logger:h,pingInterval:f,reconnectStrategy:g,maxMissingPings:y,maxReconnectAttempts:c}=t;return h=t.logger=t.logger||new fk(r),g=t.reconnectStrategy=t.reconnectStrategy||sm(f),t.monitor!==!1&&(t.monitor=t.monitor||new pk({pingInterval:f,reconnectStrategy:g,maxMissingPings:y,maxReconnectAttempts:c,logger:h})),hk(n,t)}function Ck(n,t){let e=xk(n,t);return new uk(e)}class _k{constructor(t="/openc3-api/cable",e="/openc3-api/auth/otp"){this._cable=null,this._url=t,this._otpUrl=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},h={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(f=>(f&&OpenC3Auth.setTokens(),Ku.get(this._otpUrl,{params:{scope:e}}))).then(({data:f})=>{if(this._cable==null){const g=new URL(this._url,document.baseURI);g.searchParams.set("scope",e),g.searchParams.set("authorization",f),this._cable=Ck(g.href)}return this._cable.subscriptions.create({channel:t,...h},r)})}recordPing(){}}Tn("z",_k),Tn("N",class{constructor(t,e,r="",h=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=h}});function Ja(n){return kk.test(n)}const kk=/^-?[0-9]+$/;function um(n){return Ak.test(n)}const Ak=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function hm(n,t){if(Ja(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const h=dm(n),f=dm(r);return!!(h===f||t?.approx===!0&&!Ja(n)&&f.length>=14&&h.startsWith(f.substring(0,14)))}let Za=(function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n})({});function Sk(n){if(hm(n,{approx:!1}))return;if(Ja(n))return Za.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?Za.underflow:Za.truncate_float:Za.overflow}function dm(n){const{start:t,end:e}=$k(n),r=n.substring(t,e),h=r.indexOf(".");return h===-1?r:r.substring(0,h)+r.substring(h+1)}function $k(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}class Ek{isLosslessNumber=!0;constructor(t){if(!um(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=Sk(this.value);if(t===void 0||t===Za.truncate_float)return Number.parseFloat(this.value);if(Ja(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Rk(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function Tk(n){return new Ek(n)}function Mk(n,t){return Ju({"":n},"",n,t)}function Ju(n,t,e,r){return Array.isArray(e)?r.call(n,t,Lk(e,r)):e&&typeof e=="object"&&!Rk(e)?r.call(n,t,Ik(e,r)):r.call(n,t,e)}function Ik(n,t){for(const e of Object.keys(n)){const r=Ju(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function Lk(n,t){for(let e=0;e<n.length;e++)n[e]=Ju(n,String(e),n[e],t);return n}function Ok(n,t,e){const r=typeof e=="function"?{parseNumber:e}:e,h=r?.parseNumber??Tk,f=r?.onDuplicateKey??O;let g=0;const y=i();return w(y),R(),t?Mk(y,t):y;function c(){if(n.charCodeAt(g)===Bk){g++,u();const B={};let j=!0;for(;g<n.length&&n.charCodeAt(g)!==pm;){j?j=!1:(s(),u());const V=g,K=p();if(K===void 0){C();return}u(),m();const J=i();if(J===void 0){F();return}if(Object.prototype.hasOwnProperty.call(B,K)&&!Zu(J,B[K])){const oe=f({key:K,position:V+1,oldValue:B[K],newValue:J});oe!==void 0&&(B[K]=oe)}else B[K]=J}return n.charCodeAt(g)!==pm&&N(),g++,B}}function d(){if(n.charCodeAt(g)===Wk){g++,u();const B=[];let j=!0;for(;g<n.length&&n.charCodeAt(g)!==gm;){j?j=!1:s();const V=i();x(V),B.push(V)}return n.charCodeAt(g)!==gm&&L(),g++,B}}function i(){u();const B=p()??o()??c()??d()??l("true",!0)??l("false",!1)??l("null",null);return u(),B}function l(B,j){if(n.slice(g,g+B.length)===B)return g+=B.length,j}function u(){for(;Nk(n.charCodeAt(g));)g++}function p(){if(n.charCodeAt(g)===Qu){g++;let B="";for(;g<n.length&&n.charCodeAt(g)!==Qu;){if(n.charCodeAt(g)===zk){const j=n[g+1],V=Fk[j];V!==void 0?(B+=V,g++):j==="u"?Ql(n.charCodeAt(g+2))&&Ql(n.charCodeAt(g+3))&&Ql(n.charCodeAt(g+4))&&Ql(n.charCodeAt(g+5))?(B+=String.fromCharCode(Number.parseInt(n.slice(g+2,g+6),16)),g+=5):D(g):W(g)}else Pk(n.charCodeAt(g))?B+=n[g]:I(n[g]);g++}return k(),g++,B}}function o(){const B=g;if(n.charCodeAt(g)===mm&&(g++,$(B)),n.charCodeAt(g)===eh)g++;else if(Dk(n.charCodeAt(g)))for(g++;ec(n.charCodeAt(g));)g++;if(n.charCodeAt(g)===Kk)for(g++,$(B);ec(n.charCodeAt(g));)g++;if(n.charCodeAt(g)===eA||n.charCodeAt(g)===Qk)for(g++,(n.charCodeAt(g)===mm||n.charCodeAt(g)===Gk)&&g++,$(B);ec(n.charCodeAt(g));)g++;if(g>B)return h(n.slice(B,g))}function s(){if(n.charCodeAt(g)!==Yk)throw new SyntaxError(`Comma ',' expected after value ${M()}`);g++}function m(){if(n.charCodeAt(g)!==Xk)throw new SyntaxError(`Colon ':' expected after property name ${M()}`);g++}function w(B){if(B===void 0)throw new SyntaxError(`JSON value expected ${M()}`)}function x(B){if(B===void 0)throw new SyntaxError(`Array item expected ${M()}`)}function R(){if(g<n.length)throw new SyntaxError(`Expected end of input ${M()}`)}function $(B){if(!ec(n.charCodeAt(g))){const j=n.slice(B,g);throw new SyntaxError(`Invalid number '${j}', expecting a digit ${M()}`)}}function k(){if(n.charCodeAt(g)!==Qu)throw new SyntaxError(`End of string '"' expected ${M()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${M()}`)}function O(B){let{key:j,position:V}=B;throw new SyntaxError(`Duplicate key '${j}' encountered at position ${V}`)}function N(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${M()}`)}function L(){throw new SyntaxError(`Array item or end of array ']' expected ${M()}`)}function I(B){throw new SyntaxError(`Invalid character '${B}' ${A()}`)}function W(B){const j=n.slice(B,B+2);throw new SyntaxError(`Invalid escape character '${j}' ${A()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function D(B){const j=n.slice(B,B+6);throw new SyntaxError(`Invalid unicode character '${j}' ${A()}`)}function A(){return`at position ${g}`}function _(){return g<n.length?`but got '${n[g]}'`:"but reached end of input"}function M(){return`${_()} ${A()}`}}function Nk(n){return n===jk||n===Hk||n===Uk||n===Vk}function Ql(n){return n>=eh&&n<=th||n>=Jk&&n<=tA||n>=Zk&&n<=nA}function ec(n){return n>=eh&&n<=th}function Dk(n){return n>=qk&&n<=th}function Pk(n){return n>=32&&n<=1114111}function Zu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>Zu(e,t[r])):fm(n)&&fm(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>Zu(n[e],t[e])):!1}function fm(n){return typeof n=="object"&&n!==null}const Fk={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
10
|
-
`,r:"\r",t:" "},zk=92,Bk=123,pm=125,Wk=91,gm=93,jk=32,Hk=10,Uk=9,Vk=13,Qu=34,Gk=43,mm=45,eh=48,qk=49,th=57,Yk=44,Kk=46,Xk=58,Jk=65,Zk=97,Qk=69,eA=101,tA=70,nA=102;function vm(n,t,e,r){return h(n);function h(c,d){if(Array.isArray(r)){const i=r.find(l=>l.test(c));if(i){const l=i.stringify(c);if(typeof l!="string"||!um(l))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${l})`);return l}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c?.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return f(c);if(c&&typeof c=="object")return g(c)}function f(c,d){if(c.length===0)return"[]";let i="[";for(let l=0;l<c.length;l++){const u=c[l];typeof u<"u"&&typeof u!="function"?i+=h(u):i+="null",l<c.length-1&&(i+=",")}return i+="]",i}function g(c,d){if(typeof c.toJSON=="function")return vm(c.toJSON(),t,e,void 0);const i=Array.isArray(t)?t.map(String):Object.keys(c);if(i.length===0)return"{}";let l=!0,u="{";for(const p of i){const o=c[p];if(y(p,o)){l?l=!1:u+=",";const s=JSON.stringify(p);u+=`${s}:`,u+=h(o)}}return u+="}",u}function y(c,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function rA(n){return Ja(n)&&!hm(n)?BigInt(n):parseFloat(n)}Tn("J",class{id=1;constructor(){}async exec(t,e,r={},h={},f=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,h.manual=!0,(await qu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...h},timeout:f,transformRequest:[(g,y)=>vm(g)],transformResponse:[g=>{try{return Ok(g,void 0,rA)}catch{const y=typeof g=="string"?g.substring(0,200):String(g),c=new Error(`Server returned non-JSON response: ${y}`);throw c.name="ServerError",c}}]})).data.result}catch(g){let y=new Error;throw g.response?(y.name=g.response.data.error.data.class,y.message=g.response.data.error.data.message,y.object=g.response.data.error):g.request?(y.name="Request error",y.message="Request error, no response received"):y=g,y}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e,r,h,f){return this.exec("map_target_to_interface",[t,e],{cmd_only:r,tlm_only:h,unmap_old:f})}unmap_target_from_interface(t,e,r,h){return this.exec("unmap_target_from_interface",[t,e],{cmd_only:r,tlm_only:h})}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}interface_target_enable(t,e,r=!1,h=!1){return this.exec("interface_target_enable",[t,e],{cmd_only:r,tlm_only:h})}interface_target_disable(t,e,r=!1,h=!1){return this.exec("interface_target_disable",[t,e],{cmd_only:r,tlm_only:h})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,e,r,h,f){return this.exec("map_target_to_router",[t,e],{cmd_only:r,tlm_only:h,unmap_old:f})}unmap_target_from_router(t,e,r,h){return this.exec("unmap_target_from_router",[t,e],{cmd_only:r,tlm_only:h})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,e,r=!1,h=!1){return this.exec("router_target_enable",[t,e],{cmd_only:r,tlm_only:h})}router_target_disable(t,e,r=!1,h=!1){return this.exec("router_target_disable",[t,e],{cmd_only:r,tlm_only:h})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,h=30){const f=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:h});if(f!=null){let g=f.length,y=null;for(let c=0;c<g;c++)y=this.decode_openc3_type(f[c][1]),y!==null&&(f[c][1]=y)}return f}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,h=null,f=null){let g={stale_time:e};r!==null&&(g.cache_timeout=r),h!==null&&(g.start_time=h.toISOString()),f!==null&&(g.end_time=f.toISOString());const y=await this.exec("get_tlm_values",[t],g,{},1e4);if(y&&y.length>0){let c=y.length,d=null;for(let i=0;i<c;i++)d=this.decode_openc3_type(y[i][0]),d!==null&&(y[i][0]=d)}return y}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,h="CONVERTED"){let f=null;if(e===void 0)f=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))f=await this.exec("tlm",[t],{type:e});else{let y=new Error;throw y.name="TypeError",y.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,y}else f=await this.exec("tlm",[t,e,r],{type:h});let g=this.decode_openc3_type(f);return g!==null&&(f=g),f}async inject_tlm(t,e,r=null,h="CONVERTED",f=!1){await this.exec("inject_tlm",[t,e,r],{type:h,stored:f})}set_tlm(t,e,r,h){return this.exec("set_tlm",[t,e,r],{type:h})}override_tlm(t,e,r,h){return this.exec("override_tlm",[t,e,r],{type:h})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,h){return this.exec("normalize_tlm",[t,e,r],{type:h})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,h="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,h])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,h,f,g={}){let y=null;for(let c in h)Object.prototype.hasOwnProperty.call(h,c)&&(y=this.encode_openc3_type(h[c]),y!==null&&(h[c]=y));return this.exec(t,[e,r,h],g,f)}get_cmd_hazardous(t,e,r,h={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},h):this._cmd("get_cmd_hazardous",t,e,r,h)}cmd(t,e,r,h={},f={}){return e===void 0?this.exec("cmd",t,f,h):this._cmd("cmd",t,e,r,h,f)}cmd_no_range_check(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_no_range_check",t,f,h):this._cmd("cmd_no_range_check",t,e,r,h,f)}cmd_raw(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_raw",t,f,h):this._cmd("cmd_raw",t,e,r,h,f)}cmd_raw_no_range_check(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,f,h):this._cmd("cmd_raw_no_range_check",t,e,r,h,f)}cmd_no_hazardous_check(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,f,h):this._cmd("cmd_no_hazardous_check",t,e,r,h,f)}cmd_no_checks(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_no_checks",t,f,h):this._cmd("cmd_no_checks",t,e,r,h,f)}cmd_raw_no_hazardous_check(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,f,h):this._cmd("cmd_raw_no_hazardous_check",t,e,r,h,f)}cmd_raw_no_checks(t,e,r,h={},f={}){return e===void 0?this.exec("cmd_raw_no_checks",t,f,h):this._cmd("cmd_raw_no_checks",t,e,r,h,f)}build_cmd(t,e,r,h={},f={}){return e===void 0?this.exec("build_cmd",t,f,h):this._cmd("build_cmd",t,e,r,h,f)}build_command(t,e,r,h={},f={}){return e===void 0?this.exec("build_cmd",t,f,h):this._cmd("build_cmd",t,e,r,h,f)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(t){window.open(t,"_blank")}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),h=new Uint8Array(r);return Array.from(h).map(f=>f.toString(16).padStart(2,"0")).join("")}}});const ym=6048e5,iA=864e5,tc=6e4,nh=36e5,oA=1e3,bm=Symbol.for("constructDateFrom");Tn({X:tc,Q:nh,G:oA});function fo(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&bm in n?n[bm](t):n instanceof Date?new n.constructor(t):new Date(t)}function Ur(n,t){return fo(t||n,n)}let sA={};function na(){return sA}function ra(n,t){const e=na(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,h=Ur(n,t?.in),f=h.getDay(),g=(f<r?7:0)+f-r;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function Qa(n,t){return ra(n,{...t,weekStartsOn:1})}function wm(n,t){const e=Ur(n,t?.in),r=e.getFullYear(),h=fo(e,0);h.setFullYear(r+1,0,4),h.setHours(0,0,0,0);const f=Qa(h),g=fo(e,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const y=Qa(g);return e.getTime()>=f.getTime()?r+1:e.getTime()>=y.getTime()?r:r-1}function rh(n){const t=Ur(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function aA(n,...t){const e=fo.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function xm(n,t){const e=Ur(n,t?.in);return e.setHours(0,0,0,0),e}function lA(n,t,e){const[r,h]=aA(e?.in,n,t),f=xm(r),g=xm(h),y=+f-rh(f),c=+g-rh(g);return Math.round((y-c)/iA)}function cA(n,t){const e=wm(n,t),r=fo(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Qa(r)}function uA(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Cm(n){return!(!uA(n)&&typeof n!="number"||isNaN(+Ur(n)))}function hA(n,t){const e=Ur(n,t?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const dA={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"}},fA=(n,t,e)=>{let r;const h=dA[n];return typeof h=="string"?r=h:t===1?r=h.one:r=h.other.replace("{{count}}",t.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function ih(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const pA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vA={date:ih({formats:pA,defaultWidth:"full"}),time:ih({formats:gA,defaultWidth:"full"}),dateTime:ih({formats:mA,defaultWidth:"full"})},yA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bA=(n,t,e,r)=>yA[n];function el(n){return(t,e)=>{const r=e?.context?String(e.context):"standalone";let h;if(r==="formatting"&&n.formattingValues){const g=n.defaultFormattingWidth||n.defaultWidth,y=e?.width?String(e.width):g;h=n.formattingValues[y]||n.formattingValues[g]}else{const g=n.defaultWidth,y=e?.width?String(e.width):n.defaultWidth;h=n.values[y]||n.values[g]}const f=n.argumentCallback?n.argumentCallback(t):t;return h[f]}}const wA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CA={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_A={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},kA={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"}},AA={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"}},SA=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},$A={ordinalNumber:SA,era:el({values:wA,defaultWidth:"wide"}),quarter:el({values:xA,defaultWidth:"wide",argumentCallback:n=>n-1}),month:el({values:CA,defaultWidth:"wide"}),day:el({values:_A,defaultWidth:"wide"}),dayPeriod:el({values:kA,defaultWidth:"wide",formattingValues:AA,defaultFormattingWidth:"wide"})};function tl(n){return(t,e={})=>{const r=e.width,h=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],f=t.match(h);if(!f)return null;const g=f[0],y=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(y)?RA(y,l=>l.test(g)):EA(y,l=>l.test(g));let d;d=n.valueCallback?n.valueCallback(c):c,d=e.valueCallback?e.valueCallback(d):d;const i=t.slice(g.length);return{value:d,rest:i}}}function EA(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function RA(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function TA(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const h=r[0],f=t.match(n.parsePattern);if(!f)return null;let g=n.valueCallback?n.valueCallback(f[0]):f[0];g=e.valueCallback?e.valueCallback(g):g;const y=t.slice(h.length);return{value:g,rest:y}}}const MA=/^(\d+)(th|st|nd|rd)?/i,IA=/\d+/i,LA={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},OA={any:[/^b/i,/^(a|c)/i]},NA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},DA={any:[/1/i,/2/i,/3/i,/4/i]},PA={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},FA={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]},zA={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},BA={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]},WA={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},jA={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}},HA={ordinalNumber:TA({matchPattern:MA,parsePattern:IA,valueCallback:n=>parseInt(n,10)}),era:tl({matchPatterns:LA,defaultMatchWidth:"wide",parsePatterns:OA,defaultParseWidth:"any"}),quarter:tl({matchPatterns:NA,defaultMatchWidth:"wide",parsePatterns:DA,defaultParseWidth:"any",valueCallback:n=>n+1}),month:tl({matchPatterns:PA,defaultMatchWidth:"wide",parsePatterns:FA,defaultParseWidth:"any"}),day:tl({matchPatterns:zA,defaultMatchWidth:"wide",parsePatterns:BA,defaultParseWidth:"any"}),dayPeriod:tl({matchPatterns:WA,defaultMatchWidth:"any",parsePatterns:jA,defaultParseWidth:"any"})},UA=Tn("u",{code:"en-US",formatDistance:fA,formatLong:vA,formatRelative:bA,localize:$A,match:HA,options:{weekStartsOn:0,firstWeekContainsDate:1}});function VA(n,t){const e=Ur(n,t?.in);return lA(e,hA(e))+1}function _m(n,t){const e=Ur(n,t?.in),r=+Qa(e)-+cA(e);return Math.round(r/ym)+1}function oh(n,t){const e=Ur(n,t?.in),r=e.getFullYear(),h=na(),f=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??h.firstWeekContainsDate??h.locale?.options?.firstWeekContainsDate??1,g=fo(t?.in||n,0);g.setFullYear(r+1,0,f),g.setHours(0,0,0,0);const y=ra(g,t),c=fo(t?.in||n,0);c.setFullYear(r,0,f),c.setHours(0,0,0,0);const d=ra(c,t);return+e>=+y?r+1:+e>=+d?r:r-1}function GA(n,t){const e=na(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,h=oh(n,t),f=fo(t?.in||n,0);return f.setFullYear(h,0,r),f.setHours(0,0,0,0),ra(f,t)}function km(n,t){const e=Ur(n,t?.in),r=+ra(e,t)-+GA(e,t);return Math.round(r/ym)+1}function dn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Vo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return dn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):dn(e+1,2)},d(n,t){return dn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(n,t){return dn(n.getHours()%12||12,t.length)},H(n,t){return dn(n.getHours(),t.length)},m(n,t){return dn(n.getMinutes(),t.length)},s(n,t){return dn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),h=Math.trunc(r*Math.pow(10,e-3));return dn(h,t.length)}},ia={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Am={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),h=r>0?r:1-r;return e.ordinalNumber(h,{unit:"year"})}return Vo.y(n,t)},Y:function(n,t,e,r){const h=oh(n,r),f=h>0?h:1-h;if(t==="YY"){const g=f%100;return dn(g,2)}return t==="Yo"?e.ordinalNumber(f,{unit:"year"}):dn(f,t.length)},R:function(n,t){const e=wm(n);return dn(e,t.length)},u:function(n,t){const e=n.getFullYear();return dn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dn(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(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dn(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(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Vo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return dn(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(n,t,e,r){const h=km(n,r);return t==="wo"?e.ordinalNumber(h,{unit:"week"}):dn(h,t.length)},I:function(n,t,e){const r=_m(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):dn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Vo.d(n,t)},D:function(n,t,e){const r=VA(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):dn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const h=n.getDay(),f=(h-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(f);case"ee":return dn(f,2);case"eo":return e.ordinalNumber(f,{unit:"day"});case"eee":return e.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(h,{width:"short",context:"formatting"});default:return e.day(h,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const h=n.getDay(),f=(h-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(f);case"cc":return dn(f,t.length);case"co":return e.ordinalNumber(f,{unit:"day"});case"ccc":return e.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(h,{width:"narrow",context:"standalone"});case"cccccc":return e.day(h,{width:"short",context:"standalone"});default:return e.day(h,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),h=r===0?7:r;switch(t){case"i":return String(h);case"ii":return dn(h,t.length);case"io":return e.ordinalNumber(h,{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(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let h;switch(r===12?h=ia.noon:r===0?h=ia.midnight:h=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(h,{width:"narrow",context:"formatting"});default:return e.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let h;switch(r>=17?h=ia.evening:r>=12?h=ia.afternoon:r>=4?h=ia.morning:h=ia.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(h,{width:"narrow",context:"formatting"});default:return e.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Vo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Vo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):dn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):dn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Vo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Vo.s(n,t)},S:function(n,t){return Vo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $m(r);case"XXXX":case"XX":return ms(r);default:return ms(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return $m(r);case"xxxx":case"xx":return ms(r);default:return ms(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sm(r,":");default:return"GMT"+ms(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sm(r,":");default:return"GMT"+ms(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return dn(r,t.length)},T:function(n,t,e){return dn(+n,t.length)}};function Sm(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),h=Math.trunc(r/60),f=r%60;return f===0?e+String(h):e+String(h)+t+dn(f,2)}function $m(n,t){return n%60===0?(n>0?"-":"+")+dn(Math.abs(n)/60,2):ms(n,t)}function ms(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),h=dn(Math.trunc(r/60),2),f=dn(r%60,2);return e+h+t+f}const Em=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Rm=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},qA=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],h=e[2];if(!h)return Em(n,t);let f;switch(r){case"P":f=t.dateTime({width:"short"});break;case"PP":f=t.dateTime({width:"medium"});break;case"PPP":f=t.dateTime({width:"long"});break;default:f=t.dateTime({width:"full"});break}return f.replace("{{date}}",Em(r,t)).replace("{{time}}",Rm(h,t))},YA=Tn("b",{p:Rm,P:qA}),KA=/^D+$/,XA=/^Y+$/,JA=["D","DD","YY","YYYY"];function Tm(n){return KA.test(n)}function Mm(n){return XA.test(n)}function Im(n,t,e){const r=ZA(n,t,e);if(console.warn(r),JA.includes(n))throw new RangeError(r)}function ZA(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const QA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tS=/^'([^]*?)'?$/,nS=/''/g,rS=/[a-zA-Z]/;function vs(n,t,e){const r=na(),h=e?.locale??r.locale??UA,f=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,y=Ur(n,e?.in);if(!Cm(y))throw new RangeError("Invalid time value");let c=t.match(eS).map(i=>{const l=i[0];if(l==="p"||l==="P"){const u=YA[l];return u(i,h.formatLong)}return i}).join("").match(QA).map(i=>{if(i==="''")return{isToken:!1,value:"'"};const l=i[0];if(l==="'")return{isToken:!1,value:iS(i)};if(Am[l])return{isToken:!0,value:i};if(l.match(rS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:i}});h.localize.preprocessor&&(c=h.localize.preprocessor(y,c));const d={firstWeekContainsDate:f,weekStartsOn:g,locale:h};return c.map(i=>{if(!i.isToken)return i.value;const l=i.value;(!e?.useAdditionalWeekYearTokens&&Mm(l)||!e?.useAdditionalDayOfYearTokens&&Tm(l))&&Im(l,t,String(n));const u=Am[l[0]];return u(y,l,h.localize,d)}).join("")}function iS(n){const t=n.match(tS);return t?t[1].replace(nS,"'"):n}var Go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lm={exports:{}},Om;function oS(){return Om||(Om=1,(function(n,t){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var h=function(i,l,u){if(typeof i!="string"){h.original?h.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=l),h.modules[i]||(h.payloads[i]=u,h.modules[i]=null)};h.modules={},h.payloads={};var f=function(i,l,u){if(typeof l=="string"){var p=c(i,l);if(p!=null)return u&&u(),p}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var o=[],s=0,m=l.length;s<m;++s){var w=c(i,l[s]);if(w==null&&g.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},g=function(i,l){var u=f("",i,l);return u==null&&g.original?g.original.apply(this,arguments):u},y=function(i,l){if(l.indexOf("!")!==-1){var u=l.split("!");return y(i,u[0])+"!"+y(i,u[1])}if(l.charAt(0)=="."){var p=i.split("/").slice(0,-1).join("/");for(l=p+"/"+l;l.indexOf(".")!==-1&&o!=l;){var o=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},c=function(i,l){l=y(i,l);var u=h.modules[l];if(!u){if(u=h.payloads[l],typeof u=="function"){var p={},o={id:l,uri:"",exports:p,packaged:!0},s=function(w,x){return f(l,w,x)},m=u(s,p,o);p=m||o.exports,h.modules[l]=p,delete h.payloads[l]}u=h.modules[l]=p||u}return u};function d(i){var l=r;r[i]||(r[i]={}),l=r[i],(!l.define||!l.define.packaged)&&(h.original=l.define,l.define=h,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(g.original=l.require,l.require=g,l.require.packaged=!0)}d(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,h){function f(g,y,c){Object.defineProperty(g,y,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||f(String.prototype,"startsWith",function(g,y){return y=y||0,this.lastIndexOf(g,y)===y}),String.prototype.endsWith||f(String.prototype,"endsWith",function(g,y){var c=this;(y===void 0||y>c.length)&&(y=c.length),y-=g.length;var d=c.indexOf(g,y);return d!==-1&&d===y}),String.prototype.repeat||f(String.prototype,"repeat",function(g){for(var y="",c=this;g>0;)g&1&&(y+=c),(g>>=1)&&(c+=c);return y}),String.prototype.includes||f(String.prototype,"includes",function(g,y){return this.indexOf(g,y)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(g),c=1;c<arguments.length;c++){var d=arguments[c];d!=null&&Object.keys(d).forEach(function(i){y[i]=d[i]})}return y}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(y){return g[y]})}),Array.prototype.find||f(Array.prototype,"find",function(g){for(var y=this.length,c=arguments[1],d=0;d<y;d++){var i=this[d];if(g.call(c,i,d,this))return i}}),Array.prototype.findIndex||f(Array.prototype,"findIndex",function(g){for(var y=this.length,c=arguments[1],d=0;d<y;d++){var i=this[d];if(g.call(c,i,d,this))return d}}),Array.prototype.includes||f(Array.prototype,"includes",function(g,y){return this.indexOf(g,y)!=-1}),Array.prototype.fill||f(Array.prototype,"fill",function(g){for(var y=this,c=y.length>>>0,d=arguments[1],i=d>>0,l=i<0?Math.max(c+i,0):Math.min(i,c),u=arguments[2],p=u===void 0?c:u>>0,o=p<0?Math.max(c+p,0):Math.min(p,c);l<o;)y[l]=g,l++;return y}),Array.of||f(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,h){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,h){r.deepCopy=function f(g){if(typeof g!="object"||!g)return g;var y;if(Array.isArray(g)){y=[];for(var c=0;c<g.length;c++)y[c]=f(g[c]);return y}if(Object.prototype.toString.call(g)!=="[object Object]")return g;y={};for(var c in g)y[c]=f(g[c]);return y}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,h){r.last=function(y){return y[y.length-1]},r.stringReverse=function(y){return y.split("").reverse().join("")},r.stringRepeat=function(y,c){for(var d="";c>0;)c&1&&(d+=y),(c>>=1)&&(y+=y);return d};var f=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(y){return y.replace(f,"")},r.stringTrimRight=function(y){return y.replace(g,"")},r.copyObject=function(y){var c={};for(var d in y)c[d]=y[d];return c},r.copyArray=function(y){for(var c=[],d=0,i=y.length;d<i;d++)y[d]&&typeof y[d]=="object"?c[d]=this.copyObject(y[d]):c[d]=y[d];return c},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(y){for(var c={},d=0;d<y.length;d++)c[y[d]]=1;return c},r.createMap=function(y){var c=Object.create(null);for(var d in y)c[d]=y[d];return c},r.arrayRemove=function(y,c){for(var d=0;d<=y.length;d++)c===y[d]&&y.splice(d,1)},r.escapeRegExp=function(y){return y.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(y){return(""+y).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(y,c){var d=[];return y.replace(c,function(i){d.push({offset:arguments[arguments.length-2],length:i.length})}),d},r.deferredCall=function(y){var c=null,d=function(){c=null,y()},i=function(l){return i.cancel(),c=setTimeout(d,l||0),i};return i.schedule=i,i.call=function(){return this.cancel(),y(),i},i.cancel=function(){return clearTimeout(c),c=null,i},i.isPending=function(){return c},i},r.delayedCall=function(y,c){var d=null,i=function(){d=null,y()},l=function(u){d==null&&(d=setTimeout(i,u||c))};return l.delay=function(u){d&&clearTimeout(d),d=setTimeout(i,u||c)},l.schedule=l,l.call=function(){this.cancel(),y()},l.cancel=function(){d&&clearTimeout(d),d=null},l.isPending=function(){return d},l},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(y,c,d){return d&&y.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,h){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var f=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(f.platform)||["other"])[0].toLowerCase(),y=f.userAgent||"",c=f.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((y.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((y.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=y.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(y.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(y.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(y.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(y.split(" Edge/")[1])||void 0,r.isAIR=y.indexOf("AdobeAIR")>=0,r.isAndroid=y.indexOf("Android")>=0,r.isChromeOS=y.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(y)&&!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,h){var f=e("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function u(p,o,s){if(typeof p=="string"&&p){var m=document.createTextNode(p);return o&&o.appendChild(m),m}if(!Array.isArray(p))return p&&p.appendChild&&o&&o.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var w=[],x=0;x<p.length;x++){var R=u(p[x],o,s);R&&w.push(R)}return w}var $=document.createElement(p[0]),k=p[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<p.length;x++)u(p[x],$,s);return C==2&&Object.keys(k).forEach(function(O){var N=k[O];O==="class"?$.className=Array.isArray(N)?N.join(" "):N:typeof N=="function"||O=="value"||O[0]=="$"?$[O]=N:O==="ref"?s&&(s[N]=$):O==="style"?typeof N=="string"&&($.style.cssText=N):N!=null&&$.setAttribute(O,N)}),o&&o.appendChild($),$},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,p){return document.createElementNS?document.createElementNS(p||g,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,p){var o=p?p.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var p=u?u.ownerDocument:document;return p.createDocumentFragment()},r.hasCssClass=function(u,p){var o=(u.className+"").split(/\s+/g);return o.indexOf(p)!==-1},r.addCssClass=function(u,p){r.hasCssClass(u,p)||(u.className+=" "+p)},r.removeCssClass=function(u,p){for(var o=u.className.split(/\s+/g);;){var s=o.indexOf(p);if(s==-1)break;o.splice(s,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,p){for(var o=u.className.split(/\s+/g),s=!0;;){var m=o.indexOf(p);if(m==-1)break;s=!1,o.splice(m,1)}return s&&o.push(p),u.className=o.join(" "),s},r.setCssClass=function(u,p,o){o?r.addCssClass(u,p):r.removeCssClass(u,p)},r.hasCssString=function(u,p){var o=0,s;if(p=p||document,s=p.querySelectorAll("style")){for(;o<s.length;)if(s[o++].id===u)return!0}},r.removeElementById=function(u,p){p=p||document,p.getElementById(u)&&p.getElementById(u).remove()};var y,c=[];r.useStrictCSP=function(u){y=u,u==!1?d():c||(c=[])};function d(){var u=c;c=null,u&&u.forEach(function(p){i(p[0],p[1])})}function i(u,p,o){if(!(typeof document>"u")){if(c){if(o)d();else if(o===!1)return c.push([u,p])}if(!y){var s=o;!o||!o.getRootNode?s=document:(s=o.getRootNode(),(!s||s==o)&&(s=document));var m=s.ownerDocument||s;if(p&&r.hasCssString(p,s))return null;p&&(u+=`
|
|
11
|
-
/*# sourceURL=ace/css/`+p+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(u)),p&&(w.id=p),s==m&&(s=r.getDocumentHead(m)),s.insertBefore(w,s.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(u,p){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(p))},r.$fixPositionBug=function(u){var p=u.getBoundingClientRect();if(u.style.left){var o=parseFloat(u.style.left),s=+p.left;Math.abs(o-s)>1&&(u.style.left=2*o-s+"px")}if(u.style.right){var o=parseFloat(u.style.right),s=window.innerWidth-p.right;Math.abs(o-s)>1&&(u.style.right=2*o-s+"px")}if(u.style.top){var o=parseFloat(u.style.top),s=+p.top;Math.abs(o-s)>1&&(u.style.top=2*o-s+"px")}if(u.style.bottom){var o=parseFloat(u.style.bottom),s=window.innerHeight-p.bottom;Math.abs(o-s)>1&&(u.style.bottom=2*o-s+"px")}},r.scrollbarWidth=function(u){var p=r.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var o=r.createElement("ace_outer"),s=o.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",o.appendChild(p);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=p.offsetWidth;s.overflow="scroll";var x=p.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(u,p){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,p,o){u[p]!==o&&(u[p]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=f.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,f.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!f.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,p,o){u.style.transform="translate("+Math.round(p)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,p,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,h){var f=e("./dom");r.get=function(g,y){var c=new XMLHttpRequest;c.open("GET",g,!0),c.onreadystatechange=function(){c.readyState===4&&y(c.responseText)},c.send(null)},r.loadScript=function(g,y){var c=f.getDocumentHead(),d=document.createElement("script");d.src=g,c.appendChild(d),d.onload=d.onreadystatechange=function(i,l){(l||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,l||y())}},r.qualifyURL=function(g){var y=document.createElement("a");return y.href=g,y.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,h){r.inherits=function(f,g){f.super_=g,f.prototype=Object.create(g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(f,g){for(var y in g)f[y]=g[y];return f},r.implement=function(f,g){r.mixin(f,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,h){var f={},g=function(){this.propagationStopped=!0},y=function(){this.defaultPrevented=!0};f._emit=f._dispatchEvent=function(c,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[c]||[],l=this._defaultHandlers[c];if(!(!i.length&&!l)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=c),d.stopPropagation||(d.stopPropagation=g),d.preventDefault||(d.preventDefault=y),i=i.slice();for(var u=0;u<i.length&&(i[u](d,this),!d.propagationStopped);u++);if(l&&!d.defaultPrevented)return l(d,this)}},f._signal=function(c,d){var i=(this._eventRegistry||{})[c];if(i){i=i.slice();for(var l=0;l<i.length;l++)i[l](d,this)}},f.once=function(c,d){var i=this;if(this.on(c,function l(){i.off(c,l),d.apply(null,arguments)}),!d)return new Promise(function(l){d=l})},f.setDefaultHandler=function(c,d){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[c]){var l=i[c],u=i._disabled_[c];u||(i._disabled_[c]=u=[]),u.push(l);var p=u.indexOf(d);p!=-1&&u.splice(p,1)}i[c]=d},f.removeDefaultHandler=function(c,d){var i=this._defaultHandlers;if(i){var l=i._disabled_[c];if(i[c]==d)l&&this.setDefaultHandler(c,l.pop());else if(l){var u=l.indexOf(d);u!=-1&&l.splice(u,1)}}},f.on=f.addEventListener=function(c,d,i){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[c];return l||(l=this._eventRegistry[c]=[]),l.indexOf(d)==-1&&l[i?"unshift":"push"](d),d},f.off=f.removeListener=f.removeEventListener=function(c,d){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[c];if(i){var l=i.indexOf(d);l!==-1&&i.splice(l,1)}},f.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},r.EventEmitter=f}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,h){r.reportError=function(f,g){var y=new Error(f);y.data=g,typeof console=="object"&&console.error&&console.error(y),setTimeout(function(){throw y})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,h){var f={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=f}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,r,h){"no use strict";var f=e("./oop"),g=e("./event_emitter").EventEmitter,y=e("./report_error").reportError,c=e("./default_english_messages").defaultEnglishMessages,d={setOptions:function(o){Object.keys(o).forEach(function(s){this.setOption(s,o[s])},this)},getOptions:function(o){var s={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){s[w]=this.getOption(w)},this),s},setOption:function(o,s){if(this["$"+o]!==s){var m=this.$options[o];if(!m)return i('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,s);m.handlesSet||(this["$"+o]=s),m&&m.set&&m.set.call(this,s)}},getOption:function(o){var s=this.$options[o];return s?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].getOption(o):s&&s.get?s.get.call(this):this["$"+o]:i('misspelled option "'+o+'"')}};function i(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,u,p=(function(){function o(){this.$defaultOptions={},l=c,u="dollarSigns"}return o.prototype.defineOptions=function(s,m,w){return s.$options||(this.$defaultOptions[m]=s.$options={}),Object.keys(w).forEach(function(x){var R=w[x];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=x),s.$options[R.name]=R,"initialValue"in R&&(s["$"+R.name]=R.initialValue)}),f.implement(s,d),this},o.prototype.resetOptions=function(s){Object.keys(s.$options).forEach(function(m){var w=s.$options[m];"value"in w&&s.setOption(m,w.value)})},o.prototype.setDefaultValue=function(s,m,w){if(!s){for(s in this.$defaultOptions)if(this.$defaultOptions[s][m])break;if(!this.$defaultOptions[s][m])return!1}var x=this.$defaultOptions[s]||(this.$defaultOptions[s]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},o.prototype.setDefaultValues=function(s,m){Object.keys(m).forEach(function(w){this.setDefaultValue(s,w,m[w])},this)},o.prototype.setMessages=function(s,m){l=s,m&&m.placeholders&&(u=m.placeholders)},o.prototype.nls=function(s,m,w){l[s]||(i("No message found for the key '"+s+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+m+"'."),l[m]||i("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=l[s]||l[m]||m;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(R,$){return $=="$"?"$":w[$]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(R,$){return w[$]}))),x},o})();p.prototype.warn=i,p.prototype.reportError=y,f.implement(p.prototype,g),r.AppConfig=p}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,h){h.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,h){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var f=e("../lib/dom");f.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,r,h){"no use strict";var f=e("./lib/lang"),g=e("./lib/net"),y=e("./lib/dom"),c=e("./lib/app_config").AppConfig;h.exports=r=new c;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(p){if(!d.hasOwnProperty(p))throw new Error("Unknown config key: "+p);return d[p]},r.set=function(p,o){if(d.hasOwnProperty(p))d[p]=o;else if(this.setDefaultValue("",p,o)==!1)throw new Error("Unknown config key: "+p);p=="useStrictCSP"&&y.useStrictCSP(o)},r.all=function(){return f.copyObject(d)},r.$modes={},r.moduleUrl=function(p,o){if(d.$moduleUrls[p])return d.$moduleUrls[p];var s=p.split("/");o=o||s[s.length-2]||"";var m=o=="snippets"?"/":"-",w=s[s.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&s.length>1&&(w=s[s.length-2]);var R=d[o+"Path"];return R==null?R=d.basePath:m=="/"&&(o=m=""),R&&R.slice(-1)!="/"&&(R+="/"),R+o+m+w+this.get("suffix")},r.setModuleUrl=function(p,o){return d.$moduleUrls[p]=o};var i=function(p,o){if(p==="ace/theme/textmate"||p==="./theme/textmate")return o(null,e("./theme/textmate"));if(l)return l(p,o);console.error("loader is not configured")},l;r.setLoader=function(p){l=p},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(p,o){var s;if(Array.isArray(p))var m=p[0],w=p[1];else if(typeof p=="string")var w=p;var x=function(R){if(R&&!r.$loading[w])return o&&o(R);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var $=function(){i(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var O=r.$loading[w];r.$loading[w]=null,O.forEach(function(N){N&&N(C)})})};if(!r.get("packaged"))return $();g.loadScript(r.moduleUrl(w,m),$),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(R){R.default?x(R.default):x(R)});else{try{s=this.$require(w)}catch{}x(s||r.$loaded[w])}},r.$require=function(p){if(typeof h.require=="function"){var o="require";return h[o](p)}},r.setModuleLoader=function(p,o){r.dynamicModules[p]=o};var u=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.43.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,h){e("./lib/fixoldbrowsers");var f=e("./config");f.setLoader(function(d,i){e([d],function(l){i(null,l)})});var g=(function(){return this||typeof window<"u"&&window})();h.exports=function(d){f.init=y,f.$require=e,d.require=e},y(!0);function y(d){if(!(!g||!g.document)){f.set("packaged",d||e.packaged||h.packaged||g.define&&(void 0).packaged);var i={},l="",u=document.currentScript||document._currentScript,p=u&&u.ownerDocument||document;u&&u.src&&(l=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=p.getElementsByTagName("script"),s=0;s<o.length;s++){var m=o[s],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,R=0,$=x.length;R<$;R++){var k=x[R];k.name.indexOf("data-ace-")===0&&(i[c(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(l=C[1])}}l&&(i.base=i.base||l,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var O in i)typeof i[O]<"u"&&f.set(O,i[O])}}function c(d){return d.replace(/-(.)/g,function(i,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,h){var f=(function(){function g(y,c,d,i){this.start={row:y,column:c},this.end={row:d,column:i}}return g.prototype.isEqual=function(y){return this.start.row===y.start.row&&this.end.row===y.end.row&&this.start.column===y.start.column&&this.end.column===y.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(y,c){return this.compare(y,c)==0},g.prototype.compareRange=function(y){var c,d=y.end,i=y.start;return c=this.compare(d.row,d.column),c==1?(c=this.compare(i.row,i.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(i.row,i.column),c==-1?-1:c==1?42:0)},g.prototype.comparePoint=function(y){return this.compare(y.row,y.column)},g.prototype.containsRange=function(y){return this.comparePoint(y.start)==0&&this.comparePoint(y.end)==0},g.prototype.intersects=function(y){var c=this.compareRange(y);return c==-1||c==0||c==1},g.prototype.isEnd=function(y,c){return this.end.row==y&&this.end.column==c},g.prototype.isStart=function(y,c){return this.start.row==y&&this.start.column==c},g.prototype.setStart=function(y,c){typeof y=="object"?(this.start.column=y.column,this.start.row=y.row):(this.start.row=y,this.start.column=c)},g.prototype.setEnd=function(y,c){typeof y=="object"?(this.end.column=y.column,this.end.row=y.row):(this.end.row=y,this.end.column=c)},g.prototype.inside=function(y,c){return this.compare(y,c)==0?!(this.isEnd(y,c)||this.isStart(y,c)):!1},g.prototype.insideStart=function(y,c){return this.compare(y,c)==0?!this.isEnd(y,c):!1},g.prototype.insideEnd=function(y,c){return this.compare(y,c)==0?!this.isStart(y,c):!1},g.prototype.compare=function(y,c){return!this.isMultiLine()&&y===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:y<this.start.row?-1:y>this.end.row?1:this.start.row===y?c>=this.start.column?0:-1:this.end.row===y?c<=this.end.column?0:1:0},g.prototype.compareStart=function(y,c){return this.start.row==y&&this.start.column==c?-1:this.compare(y,c)},g.prototype.compareEnd=function(y,c){return this.end.row==y&&this.end.column==c?1:this.compare(y,c)},g.prototype.compareInside=function(y,c){return this.end.row==y&&this.end.column==c?1:this.start.row==y&&this.start.column==c?-1:this.compare(y,c)},g.prototype.clipRows=function(y,c){if(this.end.row>c)var d={row:c+1,column:0};else if(this.end.row<y)var d={row:y,column:0};if(this.start.row>c)var i={row:c+1,column:0};else if(this.start.row<y)var i={row:y,column:0};return g.fromPoints(i||this.start,d||this.end)},g.prototype.extend=function(y,c){var d=this.compare(y,c);if(d==0)return this;if(d==-1)var i={row:y,column:c};else var l={row:y,column:c};return g.fromPoints(i||this.start,l||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(y){var c=y.documentToScreenPosition(this.start),d=y.documentToScreenPosition(this.end);return new g(c.row,c.column,d.row,d.column)},g.prototype.moveBy=function(y,c){this.start.row+=y,this.start.column+=c,this.end.row+=y,this.end.column+=c},g})();f.fromPoints=function(g,y){return new f(g.row,g.column,y.row,y.column)},f.comparePoints=function(g,y){return g.row-y.row||g.column-y.column},r.Range=f}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,h){for(var f=e("./oop"),g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},y={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},c=0;c<10;c++)y["Digit"+c]=48+c,y["Numpad"+c]=96+c,g.PRINTABLE_KEYS[48+c]=""+c,g.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var d=String.fromCharCode(c+32);y["Key"+d.toUpperCase()]=c,g.PRINTABLE_KEYS[c]=d}for(var c=1;c<13;c++)y["F"+c]=111+c,g.FUNCTION_KEYS[111+c]="F"+c;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var l in i)y[l]=y[l+"Left"]=y[l+"Right"]=i[l];r.$codeToKeyCode=y,g.PRINTABLE_KEYS[173]="-";for(var u in g.FUNCTION_KEYS){var p=g.FUNCTION_KEYS[u].toLowerCase();g[p]=parseInt(u,10)}for(var u in g.PRINTABLE_KEYS){var p=g.PRINTABLE_KEYS[u].toLowerCase();g[p]=parseInt(u,10)}f.mixin(g,g.MODIFIER_KEYS),f.mixin(g,g.PRINTABLE_KEYS),f.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],s=Math.pow(2,o.length);s--;)g.KEY_MODS[s]=o.filter(function(m){return s&g.KEY_MODS[m]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",f.mixin(r,g),r.default=r,r.keyCodeToString=function(o){var s=g[o];return typeof s!="string"&&(s=String.fromCharCode(o)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,h){var f=e("./keys"),g=e("./useragent"),y=null,c=0,d;function i(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function l(){return d==null&&i(),d}function u(R,$,k){this.elem=R,this.type=$,this.callback=k}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=r.addListener=function(R,$,k,C){R.addEventListener($,k,l()),C&&C.$toDestroy.push(new u(R,$,k))},o=r.removeListener=function(R,$,k){R.removeEventListener($,k,l())};r.stopEvent=function(R){return r.stopPropagation(R),r.preventDefault(R),!1},r.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},r.preventDefault=function(R){R.preventDefault&&R.preventDefault()},r.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||g.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,$,k){var C=R&&R.ownerDocument||document;function O(N){$&&$(N),k&&k(N),o(C,"mousemove",$),o(C,"mouseup",O),o(C,"dragstart",O)}return p(C,"mousemove",$),p(C,"mouseup",O),p(C,"dragstart",O),O},r.addMouseWheelListener=function(R,$,k){p(R,"wheel",function(C){var O=.15,N=C.deltaX||0,L=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=N*O,C.wheelY=L*O;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=N*I,C.wheelY=L*I;break;case C.DOM_DELTA_PAGE:var W=150;C.wheelX=N*W,C.wheelY=L*W;break}$(C)},k)},r.addMultiMouseDownListener=function(R,$,k,C,O){var N=0,L,I,W,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function D(A){if(r.getButton(A)!==0?N=0:A.detail>1?(N++,N>4&&(N=1)):N=1,g.isIE){var _=Math.abs(A.clientX-L)>5||Math.abs(A.clientY-I)>5;(!W||_)&&(N=1),W&&clearTimeout(W),W=setTimeout(function(){W=null},$[N-1]||600),N==1&&(L=A.clientX,I=A.clientY)}if(A._clicks=N,k[C]("mousedown",A),N>4)N=0;else if(N>1)return k[C](F[N],A)}Array.isArray(R)||(R=[R]),R.forEach(function(A){p(A,"mousedown",D,O)})};function s(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return f.KEY_MODS[s(R)]};function m(R,$,k){var C=s($);if(!k&&$.code&&(k=f.$codeToKeyCode[$.code]||k),!g.isMac&&y){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),y.altGr)if((3&C)!=3)y.altGr=0;else return;if(k===18||k===17){var O=$.location;if(k===17&&O===1)y[k]==1&&(c=$.timeStamp);else if(k===18&&C===3&&O===2){var N=$.timeStamp-c;N<50&&(y.altGr=!0)}}}if(k in f.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&$.location===3&&(R($,C,-k),$.defaultPrevented))){if(g.isChromeOS&&C&8){if(R($,C,k),$.defaultPrevented)return;C&=-9}return!C&&!(k in f.FUNCTION_KEYS)&&!(k in f.PRINTABLE_KEYS)?!1:R($,C,k)}}r.addCommandKeyListener=function(R,$,k){var C=null;p(R,"keydown",function(O){y[O.keyCode]=(y[O.keyCode]||0)+1;var N=m($,O,O.keyCode);return C=O.defaultPrevented,N},k),p(R,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(r.stopEvent(O),C=null)},k),p(R,"keyup",function(O){y[O.keyCode]=null},k),y||(w(),p(window,"focus",w))};function w(){y=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(R,$){$=$||window;var k="zero-timeout-message-"+x++,C=function(O){O.data==k&&(r.stopPropagation(O),o($,"message",C),R())};p($,"message",C),$.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,$){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):R()},$)},r.$idleBlockId=null,r.blockIdle=function(R){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},R||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(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,h){var f;h.exports={lineMode:!1,pasteCancelled:function(){return f&&f>Date.now()-50?!0:f=!1},cancel:function(){f=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,h){var f=e("../lib/event"),g=e("../config").nls,y=e("../lib/useragent"),c=e("../lib/dom"),d=e("../lib/lang"),i=e("../clipboard"),l=y.isChrome<18,u=y.isIE,p=y.isChrome>63,o=400,s=e("../lib/keys"),m=s.KEY_MODS,w=y.isIOS,x=w?/\s/:/\n/,R=y.isMobile,$=(function(){function k(C,O){var N=this;this.host=O,this.text=c.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="",R||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),f.addListener(this.text,"blur",function(L){N.ignoreFocusEvents||(O.onBlur(L),N.$isFocused=!1)},O),f.addListener(this.text,"focus",function(L){if(!N.ignoreFocusEvents){if(N.$isFocused=!0,y.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(L),y.isEdge?setTimeout(N.resetSelection.bind(N)):N.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var L=O.curOp,I=L&&L.command&&L.command.name;if(I!="insertstring"){var W=I&&(L.docChanged||L.selectionChanged);N.inComposition&&W&&(N.lastValue=N.text.value="",N.onCompositionEnd()),N.resetSelection()}}),O.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&O.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,f.addCommandKeyListener(this.text,function(L,I,W){if(!N.inComposition)return O.onCommandKey(L,I,W)},O),f.addListener(this.text,"select",this.onSelect.bind(this),O),f.addListener(this.text,"input",this.onInput.bind(this),O),f.addListener(this.text,"cut",this.onCut.bind(this),O),f.addListener(this.text,"copy",this.onCopy.bind(this),O),f.addListener(this.text,"paste",this.onPaste.bind(this),O),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&f.addListener(C,"keydown",function(L){if(!(y.isMac&&!L.metaKey||!L.ctrlKey))switch(L.keyCode){case 67:N.onCopy(L);break;case 86:N.onPaste(L);break;case 88:N.onCut(L);break}},O),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),f.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),O),f.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),O),f.addListener(this.text,"keyup",this.onKeyup.bind(this),O),f.addListener(this.text,"keydown",this.syncComposition.bind(this),O),f.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),O),this.closeTimeout,f.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),O),f.addListener(this.text,"mousedown",function(L){L.preventDefault(),N.onContextMenuClose()},O),f.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),f.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),w&&this.addIosSelectionHandler(C,O,this.text)}return k.prototype.addIosSelectionHandler=function(C,O,N){var L=this,I=null,W=!1;N.addEventListener("keydown",function(D){I&&clearTimeout(I),W=!0},!0),N.addEventListener("keyup",function(D){I=setTimeout(function(){W=!1},100)},!0);var F=function(D){if(document.activeElement===N&&!(W||L.inComposition||O.$mouseHandler.isMousePressed)&&!L.copied){var A=N.selectionStart,_=N.selectionEnd,M=null,B=0;if(A==0?M=s.up:A==1?M=s.home:_>L.lastSelectionEnd&&L.lastValue[_]==`
|
|
170
|
-
`?M=s.end:A<L.lastSelectionStart&&L.lastValue[A-1]==" "?(M=s.left,B=m.option):A<L.lastSelectionStart||A==L.lastSelectionStart&&L.lastSelectionEnd!=L.lastSelectionStart&&A==_?M=s.left:_>L.lastSelectionEnd&&L.lastValue.slice(0,_).split(`
|
|
171
|
-
`).length>2?M=s.down:_>L.lastSelectionEnd&&L.lastValue[_-1]==" "?(M=s.right,B=m.option):(_>L.lastSelectionEnd||_==L.lastSelectionEnd&&L.lastSelectionEnd!=L.lastSelectionStart&&A==_)&&(M=s.right),A!==_&&(B|=m.shift),M){var j=O.onCommandKey({},B,M);if(!j&&O.commands){M=s.keyCodeToString(M);var V=O.commands.findKeyCommand(B,M);V&&O.execCommand(V)}L.lastSelectionStart=A,L.lastSelectionEnd=_,L.resetSelection("")}}};document.addEventListener("selectionchange",F),O.on("destroy",function(){document.removeEventListener("selectionchange",F)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var O=this.host.getSelectionRange();O.end.row=O.start.row,O.end.column=O.start.column,this.inComposition.markerRange=O,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var O=this.handleClipboardData(C);i.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),y.isIE&&setTimeout(this.resetSelection),f.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,O){var N=this,L=this.host.getCopyText();if(!L)return f.preventDefault(C);this.handleClipboardData(C,L)?(w&&(this.resetSelection(L),this.copied=L,setTimeout(function(){N.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),f.preventDefault(C)):(this.copied=!0,this.text.value=L,this.text.select(),setTimeout(function(){N.copied=!1,N.resetSelection(),O?N.host.onCut():N.host.onCopy()}))},k.prototype.handleClipboardData=function(C,O,N){var L=C.clipboardData||window.clipboardData;if(!(!L||l)){var I=u||N?"Text":"text/plain";try{return O?L.setData(I,O)!==!1:L.getData(I)}catch(W){if(!N)return this.handleClipboardData(W,O,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var O=this.text.value,N=this.sendText(O,!0);(O.length>o+100||x.test(N)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(C,O){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var N=this.text.selectionStart,L=this.text.selectionEnd,I=this.lastSelectionStart,W=this.lastValue.length-this.lastSelectionEnd,F=C,D=C.length-N,A=C.length-L,_=0;I>0&&this.lastValue[_]==C[_];)_++,I--;for(F=F.slice(_),_=1;W>0&&this.lastValue.length-_>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-_]==C[C.length-_];)_++,W--;D-=_-1,A-=_-1;var M=F.length-_+1;if(M<0&&(I=-M,M=0),F=F.slice(0,M),!O&&!F&&!D&&!I&&!W&&!A)return"";this.sendingText=!0;var B=!1;return y.isAndroid&&F==". "&&(F=" ",B=!0),F&&!I&&!W&&!D&&!A||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:I,extendRight:W,restoreStart:D,restoreEnd:A}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=N,this.lastSelectionEnd=L,this.lastRestoreEnd=A,B?`
|
|
172
|
-
`:F},k.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var N=function(L){return L.selectionStart===0&&L.selectionEnd>=O.lastValue.length&&L.value===O.lastValue&&O.lastValue&&L.selectionEnd!==O.lastSelectionEnd};this.copied?this.copied=!1:N(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var O=`
|
|
173
|
-
ab`+C+`cde fg
|
|
174
|
-
`;O!=this.text.value&&(this.text.value=this.lastValue=O);var N=4,L=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=N||this.lastSelectionEnd!=L)&&this.text.setSelectionRange(N,L),this.lastSelectionStart=N,this.lastSelectionEnd=L}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,N=0,L="",I=function(V,K){for(var J=K,oe=1;oe<=V-C.rowStart&&oe<2*C.numberOfExtraLines+1;oe++)J+=C.host.session.getLine(V-oe).length+1;return J};if(this.host.session){var W=this.host.selection,F=W.getRange(),D=W.cursor.row;D===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):D===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(D<this.rowStart-1||D>this.rowEnd+1)&&(this.rowStart=D>this.numberOfExtraLines?D-this.numberOfExtraLines:0,this.rowEnd=D>this.numberOfExtraLines?D+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var A=[],_=this.rowStart;_<=this.rowEnd;_++)A.push(this.host.session.getLine(_));if(L=A.join(`
|
|
175
|
-
`),O=I(F.start.row,F.start.column),N=I(F.end.row,F.end.column),F.start.row<this.rowStart){var M=this.host.session.getLine(this.rowStart-1);O=F.start.row<this.rowStart-1?0:O,N+=M.length+1,L=M+`
|
|
176
|
-
`+L}else if(F.end.row>this.rowEnd){var B=this.host.session.getLine(this.rowEnd+1);N=F.end.row>this.rowEnd+1?B.length:F.end.column,N+=L.length+1,L=L+`
|
|
177
|
-
`+B}else R&&D>0&&(L=`
|
|
178
|
-
`+L,N+=1,O+=1);L.length>o&&(O<o&&N<o?L=L.slice(0,o):(L=`
|
|
179
|
-
`,O==N?O=N=0:(O=0,N=1)));var j=L+`
|
|
180
|
-
|
|
181
|
-
`;j!=this.lastValue&&(this.text.value=this.lastValue=j,this.lastSelectionStart=this.lastSelectionEnd=j.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=N||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,N),this.lastSelectionStart=O,this.lastSelectionEnd=N}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var O=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[O+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||p||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var O=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var N=this.text.getBoundingClientRect().top!=0}catch{return}var L=[];if(N)for(var I=this.text.parentElement;I&&I.nodeType==1;)L.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),N&&L.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,O){var N=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(y.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var L=this.host.container.getBoundingClientRect(),I=c.computedStyle(this.host.container),W=L.top+(parseInt(I.borderTopWidth)||0),F=L.left+(parseInt(I.borderLeftWidth)||0),D=L.bottom-W-this.text.clientHeight-2,A=function(_){c.translate(N.text,_.clientX-F-2,Math.min(_.clientY-W-2,D))};A(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),y.isWin&&f.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();r.TextInput=$,r.$setUserAgentForTests=function(k,C){R=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,h){var f=e("../lib/useragent"),g=0,y=550,c=(function(){function l(u){u.$clickSelection=null;var p=u.editor;p.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),p.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),p.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),p.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),p.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(s){u[s]=this[s]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return l.prototype.onMouseDown=function(u){var p=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var s=this.editor,m=u.getButton();if(m!==0){var w=s.getSelectionRange(),x=w.isEmpty();(x||m==1)&&s.selection.moveToPosition(o),m==2&&(s.textInput.onContextMenu(u.domEvent),f.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),p&&!s.isFocused()&&(s.focus(),this.$focusTimeout&&!this.$clickSelection&&!s.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},l.prototype.startSelect=function(u,p){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):p||o.selection.moveToPosition(u),p||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var u,p=this.editor,o=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o);if(s==-1)u=this.$clickSelection.end;else if(s==1)u=this.$clickSelection.start;else{var m=i(this.$clickSelection,o,p.session);o=m.cursor,u=m.anchor}p.selection.setSelectionAnchor(u.row,u.column)}p.selection.selectToPosition(o),p.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(u){var p,o=this.editor,s=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[u](s.row,s.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)p=this.$clickSelection.end,(m.end.row!=s.row||m.end.column!=s.column)&&(s=m.start);else if(x==1&&w>=0)p=this.$clickSelection.start,(m.start.row!=s.row||m.start.column!=s.column)&&(s=m.end);else if(w==-1&&x==1)s=m.end,p=m.start;else{var R=i(this.$clickSelection,s,o.session);s=R.cursor,p=R.anchor}o.selection.setSelectionAnchor(p.row,p.column)}o.selection.selectToPosition(s),o.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var u=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(u>g||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(u){var p=u.getDocumentPosition(),o=this.editor,s=o.session,m=s.getBracketRange(p);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},l.prototype.onTripleClick=function(u){var p=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var s=o.getSelectionRange();s.isMultiLine()&&s.contains(p.row,p.column)?(this.$clickSelection=o.selection.getLineRange(s.start.row),this.$clickSelection.end=o.selection.getLineRange(s.end.row).end):this.$clickSelection=o.selection.getLineRange(p.row),this.select()},l.prototype.onQuadClick=function(u){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,s=u.domEvent.timeStamp,m=s-o.t,w=m?u.wheelX/m:o.vx,x=m?u.wheelY/m:o.vy;m<y&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var R=Math.abs(w/x),$=!1;if(R>=1&&p.renderer.isScrollableBy(u.wheelX*u.speed,0)&&($=!0),R<=1&&p.renderer.isScrollableBy(0,u.wheelY*u.speed)&&($=!0),$)o.allowed=s;else if(s-o.allowed<y){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);k?($=!0,o.allowed=s):o.allowed=0}if(o.t=s,o.vx=w,o.vy=x,$)return p.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},l})();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,r.DefaultHandlers=c;function d(l,u,p,o){return Math.sqrt(Math.pow(p-l,2)+Math.pow(o-u,2))}function i(l,u,p){if(l.start.row==l.end.row)var o=2*u.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var o=3*u.column-2*p.getLine(l.start.row).length;else var o=2*u.row-l.start.row-l.end.row;return o<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,h){var f=e("../lib/event"),g=e("../lib/useragent"),y=(function(){function c(d,i){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=i,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){f.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){f.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(d,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-l},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,i=d.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=i.contains(l.row,l.column)}return this.$inSelection},c.prototype.getButton=function(){return f.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c})();r.MouseEvent=y}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,h){r.preventParentScroll=function(f){f.stopPropagation();var g=f.currentTarget,y=g.scrollHeight>g.clientHeight;y||f.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,h){var f=this&&this.__extends||(function(){var s=function(m,w){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var $ in R)Object.prototype.hasOwnProperty.call(R,$)&&(x[$]=R[$])},s(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");s(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),g=this&&this.__values||function(s){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&s[m],x=0;if(w)return w.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&x>=s.length&&(s=void 0),{value:s&&s[x++],done:!s}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},y=e("./lib/dom");e("./lib/event");var c=e("./range").Range,d=e("./lib/scroll").preventParentScroll,i="ace_tooltip",l=(function(){function s(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return s.prototype.$init=function(){return this.$element=y.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(m){this.getElement().textContent=m},s.prototype.setHtml=function(m){this.getElement().innerHTML=m},s.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},s.prototype.setClassName=function(m){y.addCssClass(this.getElement(),m)},s.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&y.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&y.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&y.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&y.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},s.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s})(),u=(function(){function s(){this.popups=[]}return s.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},s.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},s.prototype.updatePopups=function(){var m,w,x,R;this.popups.sort(function(F,D){return D.priority-F.priority});var $=[];try{for(var k=g(this.popups),C=k.next();!C.done;C=k.next()){var O=C.value,N=!0;try{for(var L=(x=void 0,g($)),I=L.next();!I.done;I=L.next()){var W=I.value;if(this.doPopupsOverlap(W,O)){N=!1;break}}}catch(F){x={error:F}}finally{try{I&&!I.done&&(R=L.return)&&R.call(L)}finally{if(x)throw x.error}}N?$.push(O):O.hide()}}catch(F){m={error:F}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},s.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),R=w.getElement().getBoundingClientRect();return x.left<R.right&&x.right>R.left&&x.top<R.bottom&&x.bottom>R.top},s})(),p=new u;r.popupManager=p,r.Tooltip=l;var o=(function(s){f(m,s);function m(w){w===void 0&&(w=document.body);var x=s.call(this,w)||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 R=x.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",x.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(x)),R.addEventListener("wheel",d),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var R=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,R=w.getDocumentPosition(),$=x.session.getLine(R.row);if(R.column==$.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(R.row,R.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,R,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=w.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=c.fromPoints(x.start,x.end);var C=k.textToScreenCoordinates(x.start.row,x.start.column),O=k.scroller.getBoundingClientRect();C.pageX<O.left&&(C.pageX=O.left);var N=this.getElement();N.innerHTML="",N.appendChild(R),N.style.maxHeight="",N.style.display="block",this.$setPosition(w,C,!0,x),y.$fixPositionBug(N)}},m.prototype.$setPosition=function(w,x,R,$){var k=10;R&&this.addMarker($,w.session);var C=w.renderer,O=this.getElement(),N=O.offsetHeight,L=O.offsetWidth,I=x.pageY,W=x.pageX,F=window.innerHeight-I-C.lineHeight,D=this.$shouldPlaceAbove(N,I,F-k);O.style.maxHeight=(D?I:F)-k+"px",O.style.top=D?"":I+C.lineHeight+"px",O.style.bottom=D?window.innerHeight-I+"px":"",O.style.left=Math.min(W,window.innerWidth-L-k)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,R){return!(x-w<0&&x<R)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,p.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m})(l);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,h){var f=this&&this.__extends||(function(){var o=function(s,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(s,m)};return function(s,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(s,m);function w(){this.constructor=s}s.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),g=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,m=s&&o[s],w=0;if(m)return m.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&w>=o.length&&(o=void 0),{value:o&&o[w++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},y=e("../lib/dom"),c=e("./mouse_event").MouseEvent,d=e("../tooltip").HoverTooltip,i=e("../config").nls,l=e("../range").Range;function u(o){var s=o.editor,m=s.renderer.$gutterLayer;o.$tooltip=new p(s),o.$tooltip.addToEditor(s),o.$tooltip.setDataProvider(function(w,x){var R=w.getDocumentPosition().row;o.$tooltip.showTooltip(R)}),o.editor.setDefaultHandler("guttermousedown",function(w){if(!(!s.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var R=w.getDocumentPosition().row,$=s.session.selection;if(w.getShiftKey())$.selectTo(R,0);else{if(w.domEvent.detail==2)return s.selectAll(),w.preventDefault();o.$clickSelection=s.selection.getLineRange(R)}return o.setState("selectByLines"),o.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=u;var p=(function(o){f(s,o);function s(m){var w=o.call(this,m.container)||this;w.id="gt"+ ++s.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return s.prototype.onDomMouseMove=function(m){var w=new c(m,this.editor);this.onMouseMove(w,this.editor)},s.prototype.onDomMouseOut=function(m){var w=new c(m,this.editor);this.onMouseOut(w)},s.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,m)},s.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,m)},s.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,R=x.$annotations[m],$;R?$={displayText:Array.from(R.displayText),type:Array.from(R.type)}:$={displayText:[],type:[]};var k=x.session.getFoldLine(m);if(k&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},N,L=m+1;L<=k.end.row;L++)if(x.$annotations[L])for(var I=0;I<x.$annotations[L].text.length;I++){var W=x.$annotations[L].type[I];C[W].push(x.$annotations[L].text[I]),(!N||O[W]<O[N])&&(N=W)}if(["error","security","warning"].includes(N)){var F="".concat(s.annotationsToSummaryString(C)," in folded code.");$.displayText.push(F),$.type.push(N+"_fold")}}if($.displayText.length===0)return this.hide();for(var D={error:[],security:[],warning:[],info:[],hint:[]},A=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<$.displayText.length;L++){var _=y.createElement("span"),M=y.createElement("span");(w=M.classList).add.apply(w,["ace_".concat($.type[L]),A]),M.setAttribute("aria-label","".concat(s.annotationLabels[$.type[L].replace("_fold","")].singular)),M.setAttribute("role","img"),M.appendChild(y.createTextNode(" ")),_.appendChild(M),_.appendChild(y.createTextNode($.displayText[L])),_.appendChild(y.createElement("br")),D[$.type[L].replace("_fold","")].push(_)}var B=y.createElement("span");D.error.forEach(function(K){return B.appendChild(K)}),D.security.forEach(function(K){return B.appendChild(K)}),D.warning.forEach(function(K){return B.appendChild(K)}),D.info.forEach(function(K){return B.appendChild(K)}),D.hint.forEach(function(K){return B.appendChild(K)}),B.setAttribute("aria-live","polite");var j=this.$findLinkedAnnotationNode(m);j&&j.setAttribute("aria-describedby",this.id);var V=l.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,V,B),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},s.prototype.$setPosition=function(m,w,x,R){var $=this.$findCellByRow(R.start.row);if($){var k=$&&$.element,C=k&&k.querySelector(".ace_gutter_annotation");if(C){var O=C.getBoundingClientRect();if(O){var N={pageX:O.right,pageY:O.top};return o.prototype.$setPosition.call(this,m,N,!1,R)}}}},s.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},s.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},s.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},s.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,m)}},s.annotationsToSummaryString=function(m){var w,x,R=[],$=["error","security","warning","info","hint"];try{for(var k=g($),C=k.next();!C.done;C=k.next()){var O=C.value;if(m[O].length){var N=m[O].length===1?s.annotationLabels[O].singular:s.annotationLabels[O].plural;R.push("".concat(m[O].length," ").concat(N))}}}catch(L){w={error:L}}finally{try{C&&!C.done&&(x=k.return)&&x.call(k)}finally{if(w)throw w.error}}return R.join(", ")},s.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},s})(d);p.$uid=0,r.GutterTooltip=p}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,h){var f=e("../lib/dom"),g=e("../lib/event"),y=e("../lib/useragent"),c=200,d=200,i=5;function l(p){var o=p.editor,s=f.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ee){p[ee]=this[ee]},this),o.on("mousedown",this.onMouseDown.bind(p));var w=o.container,x,R,$,k,C,O,N=0,L,I,W,F,D;this.onDragStart=function(ee){if(this.cancelDrag||!w.draggable){var se=this;return setTimeout(function(){se.startSelect(),se.captureMouse(ee)},0),ee.preventDefault()}C=o.getSelectionRange();var ce=ee.dataTransfer;ce.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(s),ce.setDragImage&&ce.setDragImage(s,0,0),setTimeout(function(){o.container.removeChild(s)}),ce.clearData(),ce.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ee){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var se=ee.dataTransfer.dropEffect;!L&&se=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ee){if(!(o.getReadOnly()||!J(ee.dataTransfer)))return R=ee.clientX,$=ee.clientY,x||B(),N++,ee.dataTransfer.dropEffect=L=oe(ee),g.preventDefault(ee)},this.onDragOver=function(ee){if(!(o.getReadOnly()||!J(ee.dataTransfer)))return R=ee.clientX,$=ee.clientY,x||(B(),N++),V!==null&&(V=null),ee.dataTransfer.dropEffect=L=oe(ee),g.preventDefault(ee)},this.onDragLeave=function(ee){if(N--,N<=0&&x)return j(),L=null,g.preventDefault(ee)},this.onDrop=function(ee){if(O){var se=ee.dataTransfer;if(I)switch(L){case"move":C.contains(O.row,O.column)?C={start:O,end:O}:C=o.moveText(C,O);break;case"copy":C=o.moveText(C,O,!0);break}else{var ce=se.getData("Text");C={start:O,end:o.session.insert(O,ce)},o.focus(),L=null}return j(),g.preventDefault(ee)}},g.addListener(w,"dragstart",this.onDragStart.bind(p),o),g.addListener(w,"dragend",this.onDragEnd.bind(p),o),g.addListener(w,"dragenter",this.onDragEnter.bind(p),o),g.addListener(w,"dragover",this.onDragOver.bind(p),o),g.addListener(w,"dragleave",this.onDragLeave.bind(p),o),g.addListener(w,"drop",this.onDrop.bind(p),o);function A(ee,se){var ce=Date.now(),he=!se||ee.row!=se.row,me=!se||ee.column!=se.column;if(!F||he||me)o.moveCursorToPosition(ee),F=ce,D={x:R,y:$};else{var $e=u(D.x,D.y,R,$);$e>i?F=null:ce-F>=d&&(o.renderer.scrollCursorIntoView(),F=null)}}function _(ee,se){var ce=Date.now(),he=o.renderer.layerConfig.lineHeight,me=o.renderer.layerConfig.characterWidth,$e=o.renderer.scroller.getBoundingClientRect(),Ee={x:{left:R-$e.left,right:$e.right-R},y:{top:$-$e.top,bottom:$e.bottom-$}},Re=Math.min(Ee.x.left,Ee.x.right),rt=Math.min(Ee.y.top,Ee.y.bottom),Xe={row:ee.row,column:ee.column};Re/me<=2&&(Xe.column+=Ee.x.left<Ee.x.right?-3:2),rt/he<=1&&(Xe.row+=Ee.y.top<Ee.y.bottom?-1:1);var at=ee.row!=Xe.row,ut=ee.column!=Xe.column,st=!se||ee.row!=se.row;at||ut&&!st?W?ce-W>=c&&o.renderer.scrollCursorIntoView(Xe):W=ce:W=null}function M(){var ee=O;O=o.renderer.screenToTextCoordinates(R,$),A(O,ee),_(O,ee)}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(k),M(),k=setInterval(M,20),N=0,g.addListener(document,"mousemove",K)}function j(){clearInterval(k),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,O=null,N=0,W=null,F=null,g.removeListener(document,"mousemove",K)}var V=null;function K(){V==null&&(V=setTimeout(function(){V!=null&&x&&j()},20))}function J(ee){var se=ee.types;return!se||Array.prototype.some.call(se,function(ce){return ce=="text/plain"||ce=="Text"})}function oe(ee){var se=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],he=y.isMac?ee.altKey:ee.ctrlKey,me="uninitialized";try{me=ee.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return he&&se.indexOf(me)>=0?$e="copy":ce.indexOf(me)>=0?$e="move":se.indexOf(me)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,o=p.container;o.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var s=y.isWin?"default":"move";p.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(p){var o=this.editor.container;if(y.isIE&&this.state=="dragReady"){var s=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&o.dragDrop()}if(this.state==="dragWait"){var s=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var o=this.editor,s=p.inSelection(),m=p.getButton(),w=p.domEvent.detail||1;if(w===1&&m===0&&s){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(y.isWebKit){this.cancelDrag=!0;var R=o.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(l.prototype);function u(p,o,s,m){return Math.sqrt(Math.pow(s-p,2)+Math.pow(m-o,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,h){var f=e("./mouse_event").MouseEvent,g=e("../lib/event"),y=e("../lib/dom");r.addTouchListeners=function(c,d){var i="scroll",l,u,p,o,s,m,w=0,x,R=0,$=0,k=0,C,O;function N(){var A=window.navigator&&window.navigator.clipboard,_=!1,M=function(){var V=d.getCopyText(),K=d.session.getUndoManager().hasUndo();O.replaceChild(y.buildDom(_?["span",!V&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],V&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],V&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],K&&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"]),O.firstChild)},B=function(V){return d.commands.canExecute(V,d)},j=function(V){var K=V.target.getAttribute("action");if(K=="more"||!_)return _=!_,M();K=="paste"?A.readText().then(function(J){d.execCommand(K,J)}):K&&((K=="cut"||K=="copy")&&(A?A.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(K)),O.firstChild.style.display="none",_=!1,K!="openCommandPalette"&&d.focus()};O=y.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(V){i="menu",V.stopPropagation(),V.preventDefault(),d.textInput.focus()},ontouchend:function(V){V.stopPropagation(),V.preventDefault(),j(V)},onclick:j},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container)}function L(){if(!d.getOption("enableMobileMenu")){O&&I();return}O||N();var A=d.selection.cursor,_=d.renderer.textToScreenCoordinates(A.row,A.column),M=d.renderer.textToScreenCoordinates(0,0).pageX,B=d.renderer.scrollLeft,j=d.container.getBoundingClientRect();O.style.top=_.pageY-j.top-3+"px",_.pageX-j.left<j.width-70?(O.style.left="",O.style.right="10px"):(O.style.right="",O.style.left=M+B-j.left+"px"),O.style.display="",O.firstChild.style.display="none",d.on("input",I)}function I(A){O&&(O.style.display="none"),d.off("input",I)}function W(){s=null,clearTimeout(s);var A=d.selection.getRange(),_=A.contains(x.row,x.column);(A.isEmpty()||!_)&&(d.selection.moveToPosition(x),d.selection.selectWord()),i="wait",L()}function F(){s=null,clearTimeout(s),d.selection.moveToPosition(x);var A=R>=2?d.selection.getLineRange(x.row):d.session.getBracketRange(x);A&&!A.isEmpty()?d.selection.setRange(A):d.selection.selectWord(),i="wait"}g.addListener(c,"contextmenu",function(A){if(C){var _=d.textInput.getElement();_.focus()}},d),g.addListener(c,"touchstart",function(A){var _=A.touches;if(s||_.length>1){clearTimeout(s),s=null,p=-1,i="zoom";return}C=d.$mouseHandler.isMousePressed=!0;var M=d.renderer.layerConfig.lineHeight,B=d.renderer.layerConfig.lineHeight,j=A.timeStamp;o=j;var V=_[0],K=V.clientX,J=V.clientY;Math.abs(l-K)+Math.abs(u-J)>M&&(p=-1),l=A.clientX=K,u=A.clientY=J,$=k=0;var oe=new f(A,d);if(x=oe.getDocumentPosition(),j-p<500&&_.length==1&&!w)R++,A.preventDefault(),A.button=0,F();else{R=0;var ee=d.selection.cursor,se=d.selection.isEmpty()?ee:d.selection.anchor,ce=d.renderer.$cursorLayer.getPixelPosition(ee,!0),he=d.renderer.$cursorLayer.getPixelPosition(se,!0),me=d.renderer.scroller.getBoundingClientRect(),$e=d.renderer.layerConfig.offset,Ee=d.renderer.scrollLeft,Re=function(at,ut){return at=at/B,ut=ut/M-.75,at*at+ut*ut};if(A.clientX<me.left){i="zoom";return}var rt=Re(A.clientX-me.left-ce.left+Ee,A.clientY-me.top-ce.top+$e),Xe=Re(A.clientX-me.left-he.left+Ee,A.clientY-me.top-he.top+$e);rt<3.5&&Xe<3.5&&(i=rt>Xe?"cursor":"anchor"),Xe<3.5?i="anchor":rt<3.5?i="cursor":i="scroll",s=setTimeout(W,450)}p=j},d),g.addListener(c,"touchend",function(A){C=d.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",w=0):s?(d.selection.moveToPosition(x),w=0,L()):i=="scroll"?(D(),I()):L(),clearTimeout(s),s=null},d),g.addListener(c,"touchmove",function(A){s&&(clearTimeout(s),s=null);var _=A.touches;if(!(_.length>1||i=="zoom")){var M=_[0],B=l-M.clientX,j=u-M.clientY;if(i=="wait")if(B*B+j*j>4)i="cursor";else return A.preventDefault();l=M.clientX,u=M.clientY,A.clientX=M.clientX,A.clientY=M.clientY;var V=A.timeStamp,K=V-o;if(o=V,i=="scroll"){var J=new f(A,d);J.speed=1,J.wheelX=B,J.wheelY=j,10*Math.abs(B)<Math.abs(j)&&(B=0),10*Math.abs(j)<Math.abs(B)&&(j=0),K!=0&&($=B/K,k=j/K),d._emit("mousewheel",J),J.propagationStopped||($=k=0)}else{var oe=new f(A,d),ee=oe.getDocumentPosition();i=="cursor"?d.selection.moveCursorToPosition(ee):i=="anchor"&&d.selection.setSelectionAnchor(ee.row,ee.column),d.renderer.scrollCursorIntoView(ee),A.preventDefault()}}},d);function D(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(k)<.01&&(k=0),w<20&&($=.9*$),w<20&&(k=.9*k);var A=d.session.getScrollTop();d.renderer.scrollBy(10*$,10*k),A==d.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,h){var f=e("../lib/event"),g=e("../lib/useragent"),y=e("./default_handlers").DefaultHandlers,c=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,i=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,u=e("../config"),p=(function(){function o(s){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=s,new y(this),new c(this),new i(this);var w=function($){var k=!document.hasFocus||!document.hasFocus()||!s.isFocused()&&document.activeElement==(s.textInput&&s.textInput.getElement());k&&window.focus(),s.focus(),setTimeout(function(){s.isFocused()||s.focus()})},x=s.renderer.getMouseEventTarget();f.addListener(x,"click",this.onMouseEvent.bind(this,"click"),s),f.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),s),f.addMultiMouseDownListener([x,s.renderer.scrollBarV&&s.renderer.scrollBarV.inner,s.renderer.scrollBarH&&s.renderer.scrollBarH.inner,s.textInput&&s.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",s),f.addMouseWheelListener(s.container,this.onMouseWheel.bind(this,"mousewheel"),s),l(s.container,s);var R=s.renderer.$gutter;f.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),s),f.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),s),f.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),s),f.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),s),f.addListener(x,"mousedown",w,s),f.addListener(R,"mousedown",w,s),g.isIE&&s.renderer.scrollBarV&&(f.addListener(s.renderer.scrollBarV.element,"mousedown",w,s),f.addListener(s.renderer.scrollBarH.element,"mousedown",w,s)),s.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=s.renderer.screenToTextCoordinates($.x,$.y),C=s.session.selection.getRange(),O=s.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},s)}return o.prototype.onMouseEvent=function(s,m){this.editor.session&&this.editor._emit(s,new d(m,this.editor))},o.prototype.onMouseMove=function(s,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(s,new d(m,this.editor))},o.prototype.onMouseWheel=function(s,m){var w=new d(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(s,w)},o.prototype.setState=function(s){this.state=s},o.prototype.captureMouse=function(s,m){this.x=s.x,this.y=s.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var R=this,$=!0,k=function(I){if(I){if(g.isWebKit&&!I.which&&R.releaseMouse)return R.releaseMouse();R.x=I.clientX,R.y=I.clientY,m&&m(I),R.mouseEvent=new d(I,R.editor),R.$mouseMoved=!0}},C=function(I){w.off("beforeEndOperation",L),$=!1,w.session&&O(),R[R.state+"End"]&&R[R.state+"End"](I),R.state="",R.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,I&&R.onMouseEvent("mouseup",I),w.endOperation()},O=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},N=function(){$&&(O(),f.nextFrame(N))};if(g.isOldIE&&s.domEvent.type=="dblclick")return setTimeout(function(){C(s)});var L=function(I){R.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=k,R.releaseMouse=f.capture(this.editor.container,k,C),N()},o.prototype.cancelContextMenu=function(){var s=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",s),m&&m.domEvent&&f.stopEvent(m.domEvent))}).bind(this);setTimeout(s,10),this.editor.on("nativecontextmenu",s)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();p.prototype.releaseMouse=null,u.defineOptions(p.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=p}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,h){var f=e("../lib/dom"),g=(function(){function y(c){c.on("click",function(d){var i=d.getDocumentPosition(),l=c.session,u=l.getFoldAt(i.row,i.column,1);u&&(d.getAccelKey()?l.removeFold(u):l.expandFold(u),d.stop());var p=d.domEvent&&d.domEvent.target;p&&f.hasCssClass(p,"ace_inline_button")&&f.hasCssClass(p,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(d){var i=c.renderer.$gutterLayer.getRegion(d);if(i=="foldWidgets"){var l=d.getDocumentPosition().row,u=c.session;u.foldWidgets&&u.foldWidgets[l]&&c.session.onFoldWidgetClick(l,d),c.isFocused()||c.focus(),d.stop()}}),c.on("gutterdblclick",function(d){var i=c.renderer.$gutterLayer.getRegion(d);if(i=="foldWidgets"){var l=d.getDocumentPosition().row,u=c.session,p=u.getParentFoldRangeData(l,!0),o=p.range||p.firstRange;if(o){l=o.start.row;var s=u.getFoldAt(l,u.getLine(l).length,1);s?u.removeFold(s):(u.addFold("...",o),c.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}d.stop()}})}return y})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,h){var f=e("../lib/keys"),g=e("../lib/event"),y=(function(){function c(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return c.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},c.prototype.setKeyboardHandler=function(d){var i=this.$handlers;if(i[i.length-1]!=d){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(d,1)}},c.prototype.addKeyboardHandler=function(d,i){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var l=this.$handlers.indexOf(d);l!=-1&&this.$handlers.splice(l,1),i==null?this.$handlers.push(d):this.$handlers.splice(i,0,d),l==-1&&d.attach&&d.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(d){var i=this.$handlers.indexOf(d);return i==-1?!1:(this.$handlers.splice(i,1),d.detach&&d.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var d=this.$data,i=d.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(i,d)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(d,i,l,u){for(var p,o=!1,s=this.$editor.commands,m=this.$handlers.length;m--&&(p=this.$handlers[m].handleKeyboard(this.$data,d,i,l,u),!(!(!p||!p.command)&&(p.command=="null"?o=!0:o=s.exec(p.command,this.$editor,p.args,u),o&&u&&d!=-1&&p.passEvent!=!0&&p.command.passEvent!=!0&&g.stopEvent(u),o))););return!o&&d==-1&&(p={command:"insertstring"},o=s.exec("insertstring",this.$editor,i)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",p),o},c.prototype.onCommandKey=function(d,i,l){var u=f.keyCodeToString(l);return this.$callKeyboardHandlers(i,u,l,d)},c.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},c})();r.KeyBinding=y}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,h){var f=0,g=0,y=!1,c=!1,d=!1,i=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,p=1,o=0,s=1,m=2,w=3,x=4,R=5,$=6,k=7,C=8,O=9,N=10,L=11,I=12,W=13,F=14,D=15,A=16,_=17,M=18,B=[M,M,M,M,M,M,M,M,M,$,R,$,C,R,M,M,M,M,M,M,M,M,M,M,M,M,M,M,R,R,R,$,C,x,x,L,L,L,x,x,x,x,x,N,O,N,O,O,m,m,m,m,m,m,m,m,m,m,O,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,M,M,M,M,M,M,R,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,O,x,L,L,L,L,x,x,x,x,o,x,x,M,x,x,L,L,m,m,x,o,x,x,x,m,o,x,x,x,x,x],j=[C,C,C,C,C,C,C,C,C,C,C,M,M,M,o,s,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,R,W,F,D,A,_,O,L,L,L,L,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,O,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function V(ee,se,ce,he){var me=f?l:i,$e=null,Ee=null,Re=null,rt=0,Xe=null,at=null,ut=-1,st=null,Ht=null,_r=[];if(!he)for(st=0,he=[];st<ce;st++)he[st]=oe(ee[st]);for(g=f,y=!1,c=!1,d=!1,Ht=0;Ht<ce;Ht++){if($e=rt,_r[Ht]=Ee=J(ee,he,_r,Ht),rt=me[$e][Ee],Xe=rt&240,rt&=15,se[Ht]=Re=me[rt][5],Xe>0)if(Xe==16){for(st=ut;st<Ht;st++)se[st]=1;ut=-1}else ut=-1;if(at=me[rt][6],at)ut==-1&&(ut=Ht);else if(ut>-1){for(st=ut;st<Ht;st++)se[st]=Re;ut=-1}he[Ht]==R&&(se[Ht]=0),g|=Re}if(d){for(st=0;st<ce;st++)if(he[st]==$){se[st]=f;for(var Rt=st-1;Rt>=0&&he[Rt]==C;Rt--)se[Rt]=f}}}function K(ee,se,ce){if(!(g<ee)){if(ee==1&&f==p&&!c){ce.reverse();return}for(var he=ce.length,me=0,$e,Ee,Re,rt;me<he;){if(se[me]>=ee){for($e=me+1;$e<he&&se[$e]>=ee;)$e++;for(Ee=me,Re=$e-1;Ee<Re;Ee++,Re--)rt=ce[Ee],ce[Ee]=ce[Re],ce[Re]=rt;me=$e}me++}}}function J(ee,se,ce,he){var me=se[he],$e,Ee,Re,rt;switch(me){case o:case s:y=!1;case x:case w:return me;case m:return y?w:m;case k:return y=!0,s;case C:return x;case O:return he<1||he+1>=se.length||($e=ce[he-1])!=m&&$e!=w||(Ee=se[he+1])!=m&&Ee!=w?x:(y&&(Ee=w),Ee==$e?Ee:x);case N:return $e=he>0?ce[he-1]:R,$e==m&&he+1<se.length&&se[he+1]==m?m:x;case L:if(he>0&&ce[he-1]==m)return m;if(y)return x;for(rt=he+1,Re=se.length;rt<Re&&se[rt]==L;)rt++;return rt<Re&&se[rt]==m?m:x;case I:for(Re=se.length,rt=he+1;rt<Re&&se[rt]==I;)rt++;if(rt<Re){var Xe=ee[he],at=Xe>=1425&&Xe<=2303||Xe==64286;if($e=se[rt],at&&($e==s||$e==k))return s}return he<1||($e=se[he-1])==R?x:ce[he-1];case R:return y=!1,c=!0,f;case $:return d=!0,x;case W:case F:case A:case _:case D:y=!1;case M:return x}}function oe(ee){var se=ee.charCodeAt(0),ce=se>>8;return ce==0?se>191?o:B[se]:ce==5?/[\u0591-\u05f4]/.test(ee)?s:o:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ee)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ee)?w:se==1642?L:/[\u06f0-\u06f9]/.test(ee)?m:k:ce==32&&se<=8287?j[se&255]:ce==254&&se>=65136?k:x}r.L=o,r.R=s,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ee,se,ce){if(ee.length<2)return{};var he=ee.split(""),me=new Array(he.length),$e=new Array(he.length),Ee=[];f=ce?p:u,V(he,Ee,he.length,se);for(var Re=0;Re<me.length;me[Re]=Re,Re++);K(2,Ee,me),K(1,Ee,me);for(var Re=0;Re<me.length-1;Re++)se[Re]===w?Ee[Re]=r.AN:Ee[Re]===s&&(se[Re]>k&&se[Re]<W||se[Re]===x||se[Re]===M)?Ee[Re]=r.ON_R:Re>0&&he[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(he[Re])&&(Ee[Re-1]=Ee[Re]=r.R_H,Re++);he[he.length-1]===r.DOT&&(Ee[he.length-1]=r.B),he[0]===""&&(Ee[0]=r.RLE);for(var Re=0;Re<me.length;Re++)$e[Re]=Ee[me[Re]];return{logicalFromVisual:me,bidiLevels:$e}},r.hasBidiCharacters=function(ee,se){for(var ce=!1,he=0;he<ee.length;he++)se[he]=oe(ee.charAt(he)),!ce&&(se[he]==s||se[he]==k||se[he]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ee,se){for(var ce=0;ce<se.logicalFromVisual.length;ce++)if(se.logicalFromVisual[ce]==ee)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,h){var f=e("./lib/bidiutil"),g=e("./lib/lang"),y=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=(function(){function d(i){this.session=i,this.bidiMap={},this.currentRow=null,this.bidiUtil=f,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=y.test(i.getValue())}return d.prototype.isBidiRow=function(i,l,u){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(l,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&y.test(i.lines.join(`
|
|
182
|
-
`))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var i=0,l=this.session.$screenRowCache;if(l.length){var u=this.session.$getRowCacheIndex(l,this.currentRow);u>=0&&(i=this.session.$docRowCache[u])}return i},d.prototype.getSplitIndex=function(){var i=0,l=this.session.$screenRowCache;if(l.length)for(var u,p=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-i>0&&(u=this.session.$getRowCacheIndex(l,this.currentRow-i-1),u===p);)p=u,i++;else i=this.currentRow;return i},d.prototype.updateRowLine=function(i,l){i===void 0&&(i=this.getDocumentRow());var u=i===this.session.getLength()-1,p=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[i];o&&(l===void 0&&(l=this.getSplitIndex()),l>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[f.L],this.line=l<o.length?this.line.substring(o[l-1],o[l]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[l]),l==o.length&&(this.line+=this.showInvisibles?p:f.DOT))}else this.line+=this.showInvisibles?p:f.DOT;var s=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,R){return x===" "||s.isFullWidth(x.charCodeAt(0))?(w=x===" "?s.getScreenTabSize(R+m):2,m+=w-1,g.stringRepeat(f.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==f.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var i=[];f.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=f.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var l=this.characterWidth=i.$characterSize.width,u=i.$measureCharWidth("ה");this.charWidths[f.L]=this.charWidths[f.EN]=this.charWidths[f.ON_R]=l,this.charWidths[f.R]=this.charWidths[f.AN]=u,this.charWidths[f.R_H]=u*.45,this.charWidths[f.B]=this.charWidths[f.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},d.prototype.setEolChar=function(i){this.EOL=i},d.prototype.setContentWidth=function(i){this.contentWidth=i},d.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(i,l){for(var u=i.getCursorPosition(),p=i.selection.getSelectionAnchor().row;p<=u.row;p++)!l&&i.session.getLine(p).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(p,0,1):l&&i.session.getLine(p).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:p},i.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(i){i-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,u=i>l?this.session.getOverwrite()?i:i-1:l,p=f.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&i<=l&&o[p]%2!==0&&p++;for(var m=0;m<p;m++)s+=this.charWidths[o[m]];return!this.session.getOverwrite()&&i>l&&o[p]%2===0&&(s+=this.charWidths[o[p]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},d.prototype.getSelections=function(i,l){var u=this.bidiMap,p=u.bidiLevels,o,s=[],m=0,w=Math.min(i,l)-this.wrapIndent,x=Math.max(i,l)-this.wrapIndent,R=!1,$=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<p.length;O++)C=u.logicalFromVisual[O],o=p[O],R=C>=w&&C<x,R&&!$?k=m:!R&&$&&s.push({left:k,width:m-k}),m+=this.charWidths[o],$=R;if(R&&O===p.length&&s.push({left:k,width:m-k}),this.isRtlDir)for(var N=0;N<s.length;N++)s[N].left+=this.rtlLineOffset;return s},d.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var l=0,u=Math.max(u,0),p=0,o=0,s=this.bidiMap.bidiLevels,m=this.charWidths[s[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>p+m/2;){if(p+=m,o===s.length-1){m=0;break}m=this.charWidths[s[++o]]}return o>0&&s[o-1]%2!==0&&s[o]%2===0?(u<p&&o--,l=this.bidiMap.logicalFromVisual[o]):o>0&&s[o-1]%2===0&&s[o]%2!==0?l=1+(u>p?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===s.length-1&&m===0&&s[o-1]%2===0||!this.isRtlDir&&o===0&&s[o]%2!==0?l=1+this.bidiMap.logicalFromVisual[o]:(o>0&&s[o-1]%2!==0&&m!==0&&o--,l=this.bidiMap.logicalFromVisual[o]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},d})();r.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,h){var f=e("./lib/oop"),g=e("./lib/lang"),y=e("./lib/event_emitter").EventEmitter,c=e("./range").Range,d=(function(){function i(l){this.session=l,this.doc=l.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(p){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(l,u){this.$isEmpty=!1,this.anchor.setPosition(l,u)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var l=this.anchor,u=this.lead;return l.row>u.row||l.row==u.row&&l.column>u.column},i.prototype.getRange=function(){var l=this.anchor,u=this.lead;return this.$isEmpty?c.fromPoints(u,u):this.isBackwards()?c.fromPoints(u,l):c.fromPoints(l,u)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(l,u){var p=u?l.end:l.start,o=u?l.start:l.end;this.$setSelection(p.row,p.column,o.row,o.column)},i.prototype.$setSelection=function(l,u,p,o){if(!this.$silent){var s=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,u),this.cursor.setPosition(p,o),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||m)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(l){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),l.call(this)},i.prototype.selectTo=function(l,u){this.$moveSelection(function(){this.moveCursorTo(l,u)})},i.prototype.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},i.prototype.moveTo=function(l,u){this.clearSelection(),this.moveCursorTo(l,u)},i.prototype.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(l,u){if(typeof u>"u"){var p=l||this.lead;l=p.row,u=p.column}return this.session.getWordRange(l,u)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var l=this.getCursor(),u=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(u)},i.prototype.getLineRange=function(l,u){var p=typeof l=="number"?l:this.lead.row,o,s=this.session.getFoldLine(p);return s?(p=s.start.row,o=s.end.row):o=p,u===!0?new c(p,0,o,this.session.getLine(o).length):new c(p,0,o+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(l,u,p){var o=l.column,s=l.column+u;return p<0&&(o=l.column-u,s=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(o,s).split(" ").length-1==u},i.prototype.moveCursorLeft=function(){var l=this.lead.getPosition(),u;if(u=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var l=this.lead.getPosition(),u;if(u=this.session.getFoldAt(l.row,l.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var p=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,p,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,p):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var l=this.lead.row,u=this.lead.column,p=this.session.documentToScreenRow(l,u),o=this.session.screenToDocumentPosition(p,0),s=this.session.getDisplayLine(l,null,o.row,o.column),m=s.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},i.prototype.moveCursorLineEnd=function(){var l=this.lead,u=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==u.column){var p=this.session.getLine(u.row);if(u.column==p.length){var o=p.search(/\s+$/);o>0&&(u.column=o)}}this.moveCursorTo(u.row,u.column)},i.prototype.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,u=this.doc.getLine(l).length;this.moveCursorTo(l,u)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var l=this.lead.row,u=this.lead.column,p=this.doc.getLine(l),o=p.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(l,u,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=p.substring(u)),u>=p.length){this.moveCursorTo(l,p.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},i.prototype.moveCursorLongWordLeft=function(){var l=this.lead.row,u=this.lead.column,p;if(p=this.session.getFoldAt(l,u,-1)){this.moveCursorTo(p.start.row,p.start.column);return}var o=this.session.getFoldStringAt(l,u,-1);o==null&&(o=this.doc.getLine(l).substring(0,u));var s=g.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(u-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},i.prototype.$shortWordEndIndex=function(l){var u=0,p,o=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(l))u=this.session.tokenRe.lastIndex;else{for(;(p=l[u])&&o.test(p);)u++;if(u<1){for(s.lastIndex=0;(p=l[u])&&!s.test(p);)if(s.lastIndex=0,u++,o.test(p))if(u>2){u--;break}else{for(;(p=l[u])&&o.test(p);)u++;if(u>2)break}}}return s.lastIndex=0,u},i.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,u=this.lead.column,p=this.doc.getLine(l),o=p.substring(u),s=this.session.getFoldAt(l,u,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(u==p.length){var m=this.doc.getLength();do l++,o=this.doc.getLine(l);while(l<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(l,u+w)},i.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,u=this.lead.column,p;if(p=this.session.getFoldAt(l,u,-1))return this.moveCursorTo(p.start.row,p.start.column);var o=this.session.getLine(l).substring(0,u);if(u===0){do l--,o=this.doc.getLine(l);while(l>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var s=g.stringReverse(o),m=this.$shortWordEndIndex(s);return this.moveCursorTo(l,u-m)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(l,u){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(l!==0&&(this.session.$bidiHandler.isBidiRow(p.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(p.column),p.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=p.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];l<0?l-=s.rowsAbove||0:l>0&&(l+=s.rowCount-(s.rowsAbove||0))}var m=this.session.screenToDocumentPosition(p.row+l,p.column,o);l!==0&&u===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+u,u===0)},i.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},i.prototype.moveCursorTo=function(l,u,p){var o=this.session.getFoldAt(l,u,1);o&&(l=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(s.charAt(u))&&s.charAt(u-1)&&(this.lead.row==l&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(l,u),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(l,u,p){var o=this.session.screenToDocumentPosition(l,u);this.moveCursorTo(o.row,o.column,p)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(l){var u=this.getRange();return l?(l.start.column=u.start.column,l.start.row=u.start.row,l.end.column=u.end.column,l.end.row=u.end.row):l=u,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},i.prototype.getRangeOfMovements=function(l){var u=this.getCursor();try{l(this);var p=this.getCursor();return c.fromPoints(u,p)}catch{return c.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},i.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(u){var p=u.clone();return p.isBackwards=u.cursor==u.start,p});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},i.prototype.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var u=l.length;u--;){var p=c.fromPoints(l[u].start,l[u].end);l[u].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},i.prototype.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(l[u]))return!1;return!0},i})();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,f.implement(d.prototype,y),r.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,h){var f=e("./lib/report_error").reportError,g=2e3,y=(function(){function c(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var i in this.states){for(var l=this.states[i],u=[],p=0,o=this.matchMappings[i]={defaultToken:"text"},s="g",m=[],w=0;w<l.length;w++){var x=l[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&s.indexOf("i")===-1&&(s+="i"),x.unicode&&s.indexOf("u")===-1&&(s+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var R=x.regex,$=new RegExp("(?:("+R+")|(.))").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)?R=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+p+1)}):($=1,R=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[p]=w,p+=$,u.push(R),x.onMatch||(x.onMatch=null)}}u.length||(o[0]=0,u.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,s)},this),this.regExps[i]=new RegExp("("+u.join(")|(")+")|($)",s)}}return c.prototype.$setMaxTokenCount=function(d){g=d|0},c.prototype.$applyToken=function(d){var i=this.splitRegex.exec(d).slice(1),l=this.token.apply(this,i);if(typeof l=="string")return[{type:l,value:d}];for(var u=[],p=0,o=l.length;p<o;p++)i[p]&&(u[u.length]={type:l[p],value:i[p]});return u},c.prototype.$arrayTokens=function(d){if(!d)return[];var i=this.splitRegex.exec(d);if(!i)return"text";for(var l=[],u=this.tokenArray,p=0,o=u.length;p<o;p++)i[p+1]&&(l[l.length]={type:u[p],value:i[p+1]});return l},c.prototype.removeCapturingGroups=function(d){var i=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,u){return u?"(?:":l});return i},c.prototype.createSplitterRegexp=function(d,i){if(d.indexOf("(?=")!=-1){var l=0,u=!1,p={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,s,m,w,x,R){return u?u=x!="]":x?u=!0:w?(l==p.stack&&(p.end=R+1,p.stack=-1),l--):m&&(l++,m.length!=1&&(p.stack=l,p.start=R)),o}),p.end!=null&&/^\)*$/.test(d.substr(p.end))&&(d=d.substring(0,p.start)+d.substr(p.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(i||"").replace("g",""))},c.prototype.getLineTokens=function(d,i){if(i&&typeof i!="string"){var l=i.slice(0);i=l[0],i==="#tmp"&&(l.shift(),i=l.shift())}else var l=[];var u=i||"start",p=this.states[u];p||(u="start",p=this.states[u]);var o=this.matchMappings[u],s=this.regExps[u];s.lastIndex=0;for(var m,w=[],x=0,R=0,$={type:null,value:""};m=s.exec(d);){var k=o.defaultToken,C=null,O=m[0],N=s.lastIndex;if(N-O.length>x){var L=d.substring(x,N-O.length);$.type==k?$.value+=L:($.type&&w.push($),$={type:k,value:L})}for(var I=0;I<m.length-2;I++)if(m[I+1]!==void 0){C=p[o[I]],C.onMatch?k=C.onMatch(O,u,l,d):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,l),p=this.states[u],p||(this.reportError("state doesn't exist",u),u="start",p=this.states[u]),o=this.matchMappings[u],x=N,s=this.regExps[u],s.lastIndex=N),C.consumeLineEnd&&(x=N);break}if(O){if(typeof k=="string")(!C||C.merge!==!1)&&$.type===k?$.value+=O:($.type&&w.push($),$={type:k,value:O});else if(k){$.type&&w.push($),$={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(x==d.length)break;if(x=N,R++>g){for(R>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:d});x<d.length;)$.type&&w.push($),$={value:d.substring(x,x+=500),type:"overflow"};u="start",l=[];break}}return $.type&&w.push($),l.length>1&&l[0]!==u&&l.unshift("#tmp",u),{tokens:w,state:l.length?l:u}},c})();y.prototype.reportError=f,r.Tokenizer=y}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,h){var f=e("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,i){if(!i){for(var l in d)this.$rules[l]=d[l];return}for(var l in d){for(var u=d[l],p=0;p<u.length;p++){var o=u[p];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(i)!==0&&(o.next=i+o.next),o.nextState&&o.nextState.indexOf(i)!==0&&(o.nextState=i+o.nextState))}this.$rules[i+l]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(d,i,l,u,p){var o=typeof d=="function"?new d().getRules():d;if(u)for(var s=0;s<u.length;s++)u[s]=i+u[s];else{u=[];for(var m in o)u.push(i+m)}if(this.addRules(o,i),l)for(var w=Array.prototype[p?"push":"unshift"],s=0;s<u.length;s++)w.apply(this.$rules[u[s]],f(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var y=function(d,i){return(d!="start"||i.length)&&i.unshift(this.nextState,d),this.nextState},c=function(d,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var d=0,i=this.$rules;function l(u){var p=i[u];p.processed=!0;for(var o=0;o<p.length;o++){var s=p[o],m=null;Array.isArray(s)&&(m=s,s={}),!s.regex&&s.start&&(s.regex=s.start,s.next||(s.next=[]),s.next.push({defaultToken:s.token},{token:s.token+".end",regex:s.end||s.start,next:"pop"}),s.token=s.token+".start",s.push=!0);var w=s.next||s.push;if(w&&Array.isArray(w)){var x=s.stateName;x||(x=s.token,typeof x!="string"&&(x=x[0]||""),i[x]&&(x+=d++)),i[x]=w,s.next=x,l(x)}else w=="pop"&&(s.next=c);if(s.push&&(s.nextState=s.next||s.push,s.next=y,delete s.push),s.rules)for(var R in s.rules)i[R]?i[R].push&&i[R].push.apply(i[R],s.rules[R]):i[R]=s.rules[R];var $=typeof s=="string"?s:s.include;if($&&($==="$self"&&($="start"),Array.isArray($)?m=$.map(function(C){return i[C]}):m=i[$]),m){var k=[o,1].concat(m);s.noEscape&&(k=k.filter(function(C){return!C.next})),p.splice.apply(p,k),o--}s.keywordMap&&(s.token=this.createKeywordMapper(s.keywordMap,s.defaultToken||"text",s.caseInsensitive),delete s.defaultToken)}}Object.keys(i).forEach(l,this)},this.createKeywordMapper=function(d,i,l,u){var p=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(o){for(var s=d[o],m=s.split(u||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),l&&(x=x.toLowerCase()),p[x]=o}},this),d=null,l?function(o){return p[o.toLowerCase()]||i}:function(o){return p[o]||i}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,h){var f;f=function(){this.$behaviours={}},(function(){this.add=function(g,y,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][y]=c},this.addBehaviours=function(g){for(var y in g)for(var c in g[y])this.add(y,c,g[y][c])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,y){if(typeof g=="function")var c=new g().getBehaviours(y);else var c=g.getBehaviours(y);this.addBehaviours(c)},this.getBehaviours=function(g){if(g){for(var y={},c=0;c<g.length;c++)this.$behaviours[g[c]]&&(y[g[c]]=this.$behaviours[g[c]]);return y}else return this.$behaviours}}).call(f.prototype),r.Behaviour=f}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,h){var f=e("./range").Range,g=(function(){function y(c,d,i){this.$session=c,this.$row=d,this.$rowTokens=c.getTokens(d);var l=c.getTokenAt(d,i);this.$tokenIndex=l?l.index:-1}return y.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]},y.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},y.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},y.prototype.getCurrentTokenRow=function(){return this.$row},y.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,d=this.$tokenIndex,i=c[d].start;if(i!==void 0)return i;for(i=0;d>0;)d-=1,i+=c[d].value.length;return i},y.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},y.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new f(this.$row,d,this.$row,d+c.value.length)},y})();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,h){var f=e("../../lib/oop"),g=e("../behaviour").Behaviour,y=e("../../token_iterator").TokenIterator,c=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,u={},p={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[x])return l=u[x];l=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},s=function(w,x,R,$){var k=w.end.row-w.start.row;return{text:R+x+$,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,R,$,k,C){var O=$.getCursorPosition(),N=k.doc.getLine(O.row);if(C=="{"){o($);var L=$.getSelectionRange(),I=k.doc.getTextRange(L),W=k.getTokenAt(O.row,O.column);if(I!==""&&I!=="{"&&$.getWrapBehavioursEnabled())return s(L,I,"{","}");if(W&&/(?:string)\.quasi|\.xml/.test(W.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(V){return V.test(W.type)})||/(string)\.quasi/.test(W.type)&&W.value[O.column-W.start-1]!=="$"?void 0:(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion($,k))return/[\]\}\)]/.test(N[O.column])||$.inMultiSelectMode||w.braces?(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert($,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o($);var D=N.substring(O.column,O.column+1);if(D=="}"){var A=k.$findOpeningBracket("}",{column:O.column+1,row:O.row});if(A!==null&&m.isAutoInsertedClosing(O,N,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
|
183
|
-
`||C==`\r
|
|
184
|
-
`){o($);var _="";m.isMaybeInsertedClosing(O,N)&&(_=c.stringRepeat("}",l.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var D=N.substring(O.column,O.column+1);if(D==="}"){var M=k.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!M)return null;var B=this.$getIndent(k.getLine(M.row))}else if(_)var B=this.$getIndent(N);else{m.clearMaybeInsertedClosing();return}var j=B+k.getTabString();return{text:`
|
|
185
|
-
`+j+`
|
|
186
|
-
`+B+_,selection:[1,j.length,1,j.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,R,$,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){o($);var N=k.doc.getLine(C.start.row),L=N.substring(C.end.column,C.end.column+1);if(L=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,R,$,k,C){if(C=="("){o($);var O=$.getSelectionRange(),N=k.doc.getTextRange(O);if(N!==""&&$.getWrapBehavioursEnabled())return s(O,N,"(",")");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){o($);var L=$.getCursorPosition(),I=k.doc.getLine(L.row),W=I.substring(L.column,L.column+1);if(W==")"){var F=k.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(F!==null&&m.isAutoInsertedClosing(L,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,R,$,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){o($);var N=k.doc.getLine(C.start.row),L=N.substring(C.start.column+1,C.start.column+2);if(L==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,R,$,k,C){if(C=="["){o($);var O=$.getSelectionRange(),N=k.doc.getTextRange(O);if(N!==""&&$.getWrapBehavioursEnabled())return s(O,N,"[","]");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o($);var L=$.getCursorPosition(),I=k.doc.getLine(L.row),W=I.substring(L.column,L.column+1);if(W=="]"){var F=k.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(F!==null&&m.isAutoInsertedClosing(L,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,R,$,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){o($);var N=k.doc.getLine(C.start.row),L=N.substring(C.start.column+1,C.start.column+2);if(L=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,R,$,k,C){var O=k.$mode.$quotes||p;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o($);var N=C,L=$.getSelectionRange(),I=k.doc.getTextRange(L);if(I!==""&&(I.length!=1||!O[I])&&$.getWrapBehavioursEnabled())return s(L,I,N,N);if(!I){var W=$.getCursorPosition(),F=k.doc.getLine(W.row),D=F.substring(W.column-1,W.column),A=F.substring(W.column,W.column+1),_=k.getTokenAt(W.row,W.column),M=k.getTokenAt(W.row,W.column+1);if(D=="\\"&&_&&/escape/.test(_.type))return null;var B=_&&/string|escape/.test(_.type),j=!M||/string|escape/.test(M.type),V;if(A==N)V=B!==j,V&&/string\.end/.test(M.type)&&(V=!1);else{if(B&&!j||B&&j)return null;var K=k.$mode.tokenRe;K.lastIndex=0;var J=K.test(D);K.lastIndex=0;var oe=K.test(A),ee=k.$mode.$pairQuotesAfter,se=ee&&ee[N]&&ee[N].test(D);if(!se&&J||oe||A&&!/[\s;,.})\]\\]/.test(A))return null;var ce=F[W.column-2];if(D==N&&(ce==N||K.test(ce)))return null;V=!0}return{text:V?N+N:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,R,$,k,C){var O=k.$mode.$quotes||p,N=k.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(N)){o($);var L=k.doc.getLine(C.start.row),I=L.substring(C.start.column+1,C.start.column+2);if(I==N)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,R,$,k,C){if(x==="doc-start"&&(C===`
|
|
187
|
-
`||C===`\r
|
|
188
|
-
`)&&$.selection.isEmpty()){var O=$.getCursorPosition();if(O.column===0)return;for(var N=k.doc.getLine(O.row),L=k.doc.getLine(O.row+1),I=k.getTokens(O.row),W=0,F=0;F<I.length;F++){W+=I[F].value.length;var D=I[F];if(W>=O.column){if(W===O.column){if(!/\.doc/.test(D.type))return;if(/\*\//.test(D.value)){var A=I[F+1];if(!A||!/\.doc/.test(A.type))return}}var _=O.column-(W-D.value.length),M=D.value.indexOf("*/"),B=D.value.indexOf("/**",M>-1?M+2:0);if(B!==-1&&_>B&&_<B+3||M!==-1&&B!==-1&&_>=M&&_<=B||!/\.doc/.test(D.type))return;break}}var j=this.$getIndent(N);if(/\s*\*/.test(L))return/^\s*\*/.test(N)?{text:C+j+"* ",selection:[1,2+j.length,1,2+j.length]}:{text:C+j+" * ",selection:[1,3+j.length,1,3+j.length]};if(/\/\*\*/.test(N.substring(0,O.column)))return{text:C+j+" * "+C+" "+j+"*/",selection:[1,4+j.length,1,4+j.length]}}})},m.isSaneInsertion=function(w,x){var R=w.getCursorPosition(),$=new y(x,R.row,R.column);if(!this.$matchTokenType($.getCurrentToken()||"text",d)){if(/[)}\]]/.test(w.session.getLine(R.row)[R.column]))return!0;var k=new y(x,R.row,R.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",d))return!1}return $.stepForward(),$.getCurrentTokenRow()!==R.row||this.$matchTokenType($.getCurrentToken()||"text",i)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,R){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isAutoInsertedClosing($,k,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=$.row,l.autoInsertedLineEnd=R+k.substr($.column),l.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,R){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isMaybeInsertedClosing($,k)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=$.row,l.maybeInsertedLineStart=k.substr(0,$.column)+R,l.maybeInsertedLineEnd=k.substr($.column),l.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,R){return l.autoInsertedBrackets>0&&w.row===l.autoInsertedRow&&R===l.autoInsertedLineEnd[0]&&x.substr(w.column)===l.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(w,x){return l.maybeInsertedBrackets>0&&w.row===l.maybeInsertedRow&&x.substr(w.column)===l.maybeInsertedLineEnd&&x.substr(0,w.column)==l.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},f.inherits(m,g),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,r,h){for(var f=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],g=0,y=[],c=0;c<f.length;c+=2)y.push(g+=f[c]),f[c+1]&&y.push(45,g+=f[c+1]);r.wordChars=String.fromCharCode.apply(null,y)}),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,h){var f=e("../config"),g=e("../tokenizer").Tokenizer,y=e("./text_highlight_rules").TextHighlightRules,c=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),i=e("../lib/lang"),l=e("../token_iterator").TokenIterator,u=e("../range").Range,p;p=function(){this.HighlightRules=y},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,s,m,w){var x=s.doc,R=!0,$=!0,k=1/0,C=s.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var N=this.lineCommentStart.map(i.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var N=i.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;N=new RegExp("^(\\s*)(?:"+N+") ?"),O=s.getUseSoftTabs();var I=function(V,K){var J=V.match(N);if(J){var oe=J[1].length,ee=J[0].length;!A(V,oe,ee)&&J[0][ee-1]==" "&&ee--,x.removeInLine(K,oe,ee)}},W=L+" ",F=function(V,K){(!R||/\S/.test(V))&&(A(V,k,k)?x.insertInLine({row:K,column:k},W):x.insertInLine({row:K,column:k},L))},D=function(V,K){return N.test(V)},A=function(V,K,J){for(var oe=0;K--&&V.charAt(K)==" ";)oe++;if(oe%C!=0)return!1;for(var oe=0;V.charAt(J++)==" ";)oe++;return C>2?oe%C!=C-1:oe%C==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,_=this.blockComment.end,N=new RegExp("^(\\s*)(?:"+i.escapeRegExp(L)+")"),M=new RegExp("(?:"+i.escapeRegExp(_)+")\\s*$"),F=function(se,ce){D(se,ce)||(!R||/\S/.test(se))&&(x.insertInLine({row:ce,column:se.length},_),x.insertInLine({row:ce,column:k},L))},I=function(se,ce){var he;(he=se.match(M))&&x.removeInLine(ce,se.length-he[0].length,se.length),(he=se.match(N))&&x.removeInLine(ce,he[1].length,he[0].length)},D=function(se,ce){if(N.test(se))return!0;for(var he=s.getTokens(ce),me=0;me<he.length;me++)if(he[me].type==="comment")return!0}}function B(V){for(var K=m;K<=w;K++)V(x.getLine(K),K)}var j=1/0;B(function(V,K){var J=V.search(/\S/);J!==-1?(J<k&&(k=J),$&&!D(V,K)&&($=!1)):j>V.length&&(j=V.length)}),k==1/0&&(k=j,R=!1,$=!1),O&&k%C!=0&&(k=Math.floor(k/C)*C),B($?I:F)},this.toggleBlockComment=function(o,s,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var R=new l(s,w.row,w.column),$=R.getCurrentToken();s.selection;var k=s.selection.toOrientedRange(),C,O;if($&&/comment/.test($.type)){for(var N,L;$&&/comment/.test($.type);){var I=$.value.indexOf(x.start);if(I!=-1){var W=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+I;N=new u(W,F,W,F+x.start.length);break}$=R.stepBackward()}for(var R=new l(s,w.row,w.column),$=R.getCurrentToken();$&&/comment/.test($.type);){var I=$.value.indexOf(x.end);if(I!=-1){var W=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+I;L=new u(W,F,W,F+x.end.length);break}$=R.stepForward()}L&&s.remove(L),N&&(s.remove(N),C=N.start.row,O=-x.start.length)}else O=x.start.length,C=m.start.row,s.insert(m.end,x.end),s.insert(m.start,x.start);k.start.row==C&&(k.start.column+=O),k.end.row==C&&(k.end.column+=O),s.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(o,s,m){return this.$getIndent(s)},this.checkOutdent=function(o,s,m){return!1},this.autoOutdent=function(o,s,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var s in o)if(o[s]){var m=o[s],w=m.prototype.$id,x=f.$modes[w];x||(f.$modes[w]=x=new m),f.$modes[s]||(f.$modes[s]=x),this.$embeds.push(s),this.$modes[s]=x}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(O){(function(N){var L=R[O],I=N[L];N[R[O]]=function(){return this.$delegator(L,arguments,I)}})(k)},k=this,s=0;s<R.length;s++)$(s)},this.$delegator=function(o,s,m){var w=s[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],R=this.$modes[x];if(R)return R[o].apply(R,[w[1]].concat([].slice.call(s,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var k=w.split(this.$embeds[$]);if(!k[0]&&k[1]){s[0]=k[1];var R=this.$modes[this.$embeds[$]];return R[o].apply(R,s)}}var C=m.apply(this,s);return m?C:void 0},this.transformAction=function(o,s,m,w,x){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var $ in R)if(R[$][s]){var k=R[$][s].apply(this,arguments);if(k)return k}}},this.getKeywords=function(o){if(!this.completionKeywords){var s=this.$tokenizer.rules,m=[];for(var w in s)for(var x=s[w],R=0,$=x.length;R<$;R++)if(typeof x[R].token=="string")/keyword|support|storage/.test(x[R].token)&&m.push(x[R].regex);else if(typeof x[R].token=="object"){for(var k=0,C=x[R].token.length;k<C;k++)if(/keyword|support|storage/.test(x[R].token[k])){var w=x[R].regex.match(/\(.+?\)/g)[k];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,s,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(p.prototype),r.Mode=p}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,h){var f=e("./lib/dom"),g=(function(){function y(c){this.session=c,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 y.prototype.getRowLength=function(c){var d;return this.lineWidgets?d=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[c]?1+d:this.$wrapData[c].length+1+d},y.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(c+=d.rowCount)}),c},y.prototype.$onChangeEditor=function(c){this.attach(c.editor)},y.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},y.prototype.detach=function(c){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},y.prototype.updateOnFold=function(c,d){var i=d.lineWidgets;if(!(!i||!c.action)){for(var l=c.data,u=l.start.row,p=l.end.row,o=c.action=="add",s=u+1;s<p;s++)i[s]&&(i[s].hidden=o);i[p]&&(o?i[u]?i[p].hidden=o:i[u]=i[p]:(i[u]==i[p]&&(i[u]=void 0),i[p].hidden=o))}},y.prototype.updateOnChange=function(c){var d=this.session.lineWidgets;if(d){var i=c.start.row,l=c.end.row-i;if(l!==0)if(c.action=="remove"){var u=d.splice(i+1,l);!d[i]&&u[u.length-1]&&(d[i]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var p=new Array(l);d[i]&&d[i].column!=null&&c.start.column>d[i].column&&i++,p.unshift(i,0),d.splice.apply(d,p),this.$updateRows()}}},y.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var d=!0;c.forEach(function(i,l){if(i)for(d=!1,i.row=l;i.$oldWidget;)i.$oldWidget.row=l,i=i.$oldWidget}),d&&(this.session.lineWidgets=null)}},y.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[c.row];return d&&(c.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},y.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var d=this.editor.renderer;c.html&&!c.el&&(c.el=f.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=f.createElement("div"),c.el.textContent=c.text),c.el&&(f.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&f.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",d.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/d.layerConfig.lineHeight);var i=this.session.getFoldAt(c.row,0);if(c.$fold=i,i){var l=this.session.lineWidgets;c.row==i.end.row&&!l[i.start.row]?l[i.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(c),c},y.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var d=this.session.lineWidgets[c.row];if(d==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;d;){if(d.$oldWidget==c){d.$oldWidget=c.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},y.prototype.getWidgetsAtRow=function(c){for(var d=this.session.lineWidgets,i=d&&d[c],l=[];i;)l.push(i),i=i.$oldWidget;return l},y.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},y.prototype.measureWidgets=function(c,d){var i=this.session._changedWidgets,l=d.layerConfig;if(!(!i||!i.length)){for(var u=1/0,p=0;p<i.length;p++){var o=i[p];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,d.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/l.characterWidth));var s=o.h/l.lineHeight;o.coverLine&&(s-=this.session.getRowLineCount(o.row),s<0&&(s=0)),o.rowCount!=s&&(o.rowCount=s,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},y.prototype.renderWidgets=function(c,d){var i=d.layerConfig,l=this.session.lineWidgets;if(l){for(var u=Math.min(this.firstRow,i.firstRow),p=Math.max(this.lastRow,i.lastRow,l.length);u>0&&!l[u];)u--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,d.$cursorLayer.config=i;for(var o=u;o<=p;o++){var s=l[o];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+"px";continue}s._inDocument||(s._inDocument=!0,d.container.appendChild(s.el));var m=d.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;s.coverLine||(m+=i.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=m-i.offset+"px";var w=s.coverGutter?0:d.gutterWidth;s.fixedWidth||(w-=d.scrollLeft),s.el.style.left=w+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=i.width+2*i.padding+"px"),s.fixedWidth?s.el.style.right=d.scrollBar.getWidth()+"px":s.el.style.right=""}}}},y})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,h){r.applyDelta=function(f,g,y){var c=g.start.row,d=g.start.column,i=f[c]||"";switch(g.action){case"insert":var l=g.lines;if(l.length===1)f[c]=i.substring(0,d)+g.lines[0]+i.substring(d);else{var u=[c,1].concat(g.lines);f.splice.apply(f,u),f[c]=i.substring(0,d)+f[c],f[c+g.lines.length-1]+=i.substring(d)}break;case"remove":var p=g.end.column,o=g.end.row;c===o?f[c]=i.substring(0,d)+i.substring(p):f.splice(c,o-c+1,i.substring(0,d)+f[o].substring(p));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,h){var f=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,y=(function(){function i(l,u,p){this.$onChange=this.onChange.bind(this),this.attach(l),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,p)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var u=d(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},i.prototype.setPosition=function(l,u,p){var o;if(p?o={row:l,column:u}:o=this.$clipPositionToDocument(l,u),!(this.row==o.row&&this.column==o.column)){var s={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:s,value:o})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(l,u){var p={};return l>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):l<0?(p.row=0,p.column=0):(p.row=l,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,u))),u<0&&(p.column=0),p},i})();y.prototype.$insertRight=!1,f.implement(y.prototype,g);function c(i,l,u){var p=u?i.column<=l.column:i.column<l.column;return i.row<l.row||i.row==l.row&&p}function d(i,l,u){var p=i.action=="insert",o=(p?1:-1)*(i.end.row-i.start.row),s=(p?1:-1)*(i.end.column-i.start.column),m=i.start,w=p?m:i.end;return c(l,m,u)?{row:l.row,column:l.column}:c(w,l,!u)?{row:l.row+o,column:l.column+(l.row==w.row?s:0)}:{row:m.row,column:m.column}}r.Anchor=y}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,h){var f=e("./lib/oop"),g=e("./apply_delta").applyDelta,y=e("./lib/event_emitter").EventEmitter,c=e("./range").Range,d=e("./anchor").Anchor,i=(function(){function l(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return l.prototype.setValue=function(u){var p=this.getLength()-1;this.remove(new c(0,0,p,this.getLine(p).length)),this.insert({row:0,column:0},u||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(u,p){return new d(this,u,p)},l.prototype.$detectNewLine=function(u){var p=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=p?p[1]:`
|
|
189
|
-
`,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
190
|
-
`;case"unix":return`
|
|
191
|
-
`;default:return this.$autoNewLine||`
|
|
192
|
-
`}},l.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(u){return u==`\r
|
|
193
|
-
`||u=="\r"||u==`
|
|
194
|
-
`},l.prototype.getLine=function(u){return this.$lines[u]||""},l.prototype.getLines=function(u,p){return this.$lines.slice(u,p+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(u){var p;if(u.start.row===u.end.row)p=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{p=this.getLines(u.start.row,u.end.row),p[0]=(p[0]||"").substring(u.start.column);var o=p.length-1;u.end.row-u.start.row==o&&(p[o]=p[o].substring(0,u.end.column))}return p},l.prototype.insertLines=function(u,p){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,p)},l.prototype.removeLines=function(u,p){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,p)},l.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},l.prototype.insert=function(u,p){return this.getLength()<=1&&this.$detectNewLine(p),this.insertMergedLines(u,this.$split(p))},l.prototype.insertInLine=function(u,p){var o=this.clippedPos(u.row,u.column),s=this.pos(u.row,u.column+p.length);return this.applyDelta({start:o,end:s,action:"insert",lines:[p]},!0),this.clonePos(s)},l.prototype.clippedPos=function(u,p){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,p=void 0);var s=this.getLine(u);return p==null&&(p=s.length),p=Math.min(Math.max(p,0),s.length),{row:u,column:p}},l.prototype.clonePos=function(u){return{row:u.row,column:u.column}},l.prototype.pos=function(u,p){return{row:u,column:p}},l.prototype.$clipPosition=function(u){var p=this.getLength();return u.row>=p?(u.row=Math.max(0,p-1),u.column=this.getLine(p-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},l.prototype.insertFullLines=function(u,p){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(p=p.concat([""]),o=0):(p=[""].concat(p),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},p)},l.prototype.insertMergedLines=function(u,p){var o=this.clippedPos(u.row,u.column),s={row:o.row+p.length-1,column:(p.length==1?o.column:0)+p[p.length-1].length};return this.applyDelta({start:o,end:s,action:"insert",lines:p}),this.clonePos(s)},l.prototype.remove=function(u){var p=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:p,end:o,action:"remove",lines:this.getLinesForRange({start:p,end:o})}),this.clonePos(p)},l.prototype.removeInLine=function(u,p,o){var s=this.clippedPos(u,p),m=this.clippedPos(u,o);return this.applyDelta({start:s,end:m,action:"remove",lines:this.getLinesForRange({start:s,end:m})},!0),this.clonePos(s)},l.prototype.removeFullLines=function(u,p){u=Math.min(Math.max(0,u),this.getLength()-1),p=Math.min(Math.max(0,p),this.getLength()-1);var o=p==this.getLength()-1&&u>0,s=p<this.getLength()-1,m=o?u-1:u,w=o?this.getLine(m).length:0,x=s?p+1:p,R=s?0:this.getLine(x).length,$=new c(m,w,x,R),k=this.$lines.slice(u,p+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),k},l.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(u,p){if(u instanceof c||(u=c.fromPoints(u.start,u.end)),p.length===0&&u.isEmpty())return u.start;if(p==this.getTextRange(u))return u.end;this.remove(u);var o;return p?o=this.insert(u.start,p):o=u.start,o},l.prototype.applyDeltas=function(u){for(var p=0;p<u.length;p++)this.applyDelta(u[p])},l.prototype.revertDeltas=function(u){for(var p=u.length-1;p>=0;p--)this.revertDelta(u[p])},l.prototype.applyDelta=function(u,p){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!c.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(g(this.$lines,u,p),this._signal("change",u)))},l.prototype.$safeApplyDelta=function(u){var p=this.$lines.length;(u.action=="remove"&&u.start.row<p&&u.end.row<p||u.action=="insert"&&u.start.row<=p)&&this.applyDelta(u)},l.prototype.$splitAndapplyLargeDelta=function(u,p){for(var o=u.lines,s=o.length-p+1,m=u.start.row,w=u.start.column,x=0,R=0;x<s;x=R){R+=p-1;var $=o.slice(x,R);$.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+R,w=0),action:u.action,lines:$},!0)}u.lines=o.slice(x),u.start.row=m+x,u.start.column=w,this.applyDelta(u,!0)},l.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},l.prototype.indexToPosition=function(u,p){for(var o=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,m=p||0,w=o.length;m<w;m++)if(u-=o[m].length+s,u<0)return{row:m,column:u+o[m].length+s};return{row:w-1,column:u+o[w-1].length+s}},l.prototype.positionToIndex=function(u,p){for(var o=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,m=0,w=Math.min(u.row,o.length),x=p||0;x<w;++x)m+=o[x].length+s;return m+u.column},l.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},l})();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",f.implement(i.prototype,y),r.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,h){var f=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,y=(function(){function c(d,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var l=this;this.$worker=function(){if(l.running){for(var u=new Date,p=l.currentLine,o=-1,s=l.doc,m=p;l.lines[p];)p++;var w=s.getLength(),x=0;for(l.running=!1;p<w;){l.$tokenizeRow(p),o=p;do p++;while(l.lines[p]);if(x++,x%5===0&&new Date-u>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=p,o==-1&&(o=p),m<=o&&l.fireUpdateEvent(m,o)}}}return c.prototype.setTokenizer=function(d){this.tokenizer=d,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(d){this.doc=d,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(d,i){var l={first:d,last:i};this._signal("update",{data:l})},c.prototype.start=function(d){this.currentLine=Math.min(d||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(d){var i=d.start.row,l=d.end.row-i;if(l===0)this.lines[i]=null;else if(d.action=="remove")this.lines.splice(i,l+1,null),this.states.splice(i,l+1,null);else{var u=Array(l+1);u.unshift(i,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(d){return this.lines[d]||this.$tokenizeRow(d)},c.prototype.getState=function(d){return this.currentLine==d&&this.$tokenizeRow(d),this.states[d]||"start"},c.prototype.$tokenizeRow=function(d){var i=this.doc.getLine(d),l=this.states[d-1],u=this.tokenizer.getLineTokens(i,l,d);return this.states[d]+""!=u.state+""?(this.states[d]=u.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=u.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c})();f.implement(y.prototype,g),r.BackgroundTokenizer=y}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,h){var f=e("./lib/lang"),g=e("./range").Range,y=(function(){function c(d,i,l){l===void 0&&(l="text"),this.setRegexp(d),this.clazz=i,this.type=l,this.docLen=0}return c.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},c.prototype.update=function(d,i,l,u){if(this.regExp){for(var p=u.firstRow,o=u.lastRow,s={},m=l.$editor&&l.$editor.$search,w=m&&m.$isMultilineSearch(l.$editor.getLastSearchOptions()),x=p;x<=o;x++){var R=this.cache[x];if(R==null||l.getValue().length!=this.docLen){if(w){R=[];var $=m.$multiLineForward(l,this.regExp,x,o);if($){var k=$.endRow<=o?$.endRow-1:o;k>x&&(x=k),R.push(new g($.startRow,$.startCol,$.endRow,$.endCol))}R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES))}else R=f.getMatchOffsets(l.getLine(x),this.regExp),R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES)),R=R.map(function(L){return new g(x,L.offset,x,L.offset+L.length)});this.cache[x]=R.length?R:""}if(R.length!==0)for(var C=R.length;C--;){var O=R[C].toScreenRange(l),N=O.toString();s[N]||(s[N]=!0,i.drawSingleLineMarker(d,O,this.clazz,u))}}this.docLen=l.getValue().length}},c})();y.prototype.MAX_RANGES=500,r.SearchHighlight=y}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,h){var f=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,O,N){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),O===!1||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var N=this.$undoStack,L=N.length;L--;){var I=N[L][0];if(I.id<=C)break;I.id<O&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,O){for(var N=this.selections,L=N.length;L--;){var I=N[L];if(I.rev<C)return O&&(I=N[L+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var N=this.$undoStack,L=null,I=0,W=N.length;W--;){var F=N[W][0];if(F.id<O&&!L&&(L=W+1),F.id<=C){I=W+1;break}}return N.slice(I,L)},k.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},k.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},k.prototype.undo=function(C,O){this.lastDeltas=null;var N=this.$undoStack;if(g(N,N.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var L=N.pop(),I=null;return L&&(I=C.undoChanges(L,O),this.$redoStack.push(L),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var N=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,N),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(W){W[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),I=null;return L&&(I=C.redoChanges(L,O),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],N=O&&O[0].id||0;this.$redoStackBaseRev=N,this.$rev=N},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
|
|
195
|
-
---
|
|
196
|
-
`+l(this.$redoStack)},k})();f.prototype.hasUndo=f.prototype.canUndo,f.prototype.hasRedo=f.prototype.canRedo,f.prototype.isClean=f.prototype.isAtBookmark,f.prototype.markClean=f.prototype.bookmark;function g(k,C){for(var O=C;O--;){var N=k[O];if(N&&!N[0].ignore){for(;O<C-1;){var L=o(k[O],k[O+1]);k[O]=L[0],k[O+1]=L[1],O++}return!0}}}var y=e("./range").Range,c=y.comparePoints;y.comparePoints;function d(k){return{row:k.row,column:k.column}}function i(k){return{start:d(k.start),end:d(k.end),action:k.action,lines:k.lines.slice()}}function l(k){if(k=k||this,Array.isArray(k))return k.map(l).join(`
|
|
197
|
-
`);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(u).join(`
|
|
198
|
-
`):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function p(k,C){var O=k.action=="insert",N=C.action=="insert";if(O&&N)if(c(C.start,k.end)>=0)m(C,k,-1);else if(c(C.start,k.start)<=0)m(k,C,1);else return null;else if(O&&!N)if(c(C.start,k.end)>=0)m(C,k,-1);else if(c(C.end,k.start)<=0)m(k,C,-1);else return null;else if(!O&&N)if(c(C.start,k.start)>=0)m(C,k,1);else if(c(C.start,k.start)<=0)m(k,C,1);else return null;else if(!O&&!N)if(c(C.start,k.start)>=0)m(C,k,1);else if(c(C.end,k.start)<=0)m(k,C,-1);else return null;return[C,k]}function o(k,C){for(var O=k.length;O--;)for(var N=0;N<C.length;N++)if(!p(k[O],C[N])){for(;O<k.length;){for(;N--;)p(C[N],k[O]);N=C.length,O++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function s(k,C){var O=k.action=="insert",N=C.action=="insert";if(O&&N)c(k.start,C.start)<0?m(C,k,1):m(k,C,1);else if(O&&!N)c(k.start,C.end)>=0?m(k,C,-1):(c(k.start,C.start)<=0||m(k,y.fromPoints(C.start,k.start),-1),m(C,k,1));else if(!O&&N)c(C.start,k.end)>=0?m(C,k,-1):(c(C.start,k.start)<=0||m(C,y.fromPoints(k.start,C.start),-1),m(k,C,1));else if(!O&&!N)if(c(C.start,k.end)>=0)m(C,k,-1);else if(c(C.end,k.start)<=0)m(k,C,-1);else{var L,I;return c(k.start,C.start)<0&&(L=k,k=x(k,C.start)),c(k.end,C.end)>0&&(I=x(k,C.end)),w(C.end,k.start,k.end,-1),I&&!L&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,L,I].filter(Boolean)}return[C,k]}function m(k,C,O){w(k.start,C.start,C.end,O),w(k.end,C.start,C.end,O)}function w(k,C,O,N){k.row==(N==1?C:O).row&&(k.column+=N*(O.column-C.column)),k.row+=N*(O.row-C.row)}function x(k,C){var O=k.lines,N=k.end;k.end=d(C);var L=k.end.row-k.start.row,I=O.splice(L,O.length),W=L?C.column:C.column-k.start.column;O.push(I[0].substring(0,W)),I[0]=I[0].substr(W);var F={start:d(C),end:N,lines:I,action:k.action};return F}function R(k,C){C=i(C);for(var O=k.length;O--;){for(var N=k[O],L=0;L<N.length;L++){var I=N[L],W=s(I,C);C=W[0],W.length!=2&&(W[2]?(N.splice(L+1,1,W[1],W[2]),L++):W[1]||(N.splice(L,1),L--))}N.length||k.splice(O,1)}return k}function $(k,C){for(var O=0;O<C.length;O++)for(var N=C[O],L=0;L<N.length;L++)R(k,N[L])}r.UndoManager=f}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,h){var f=e("../range").Range,g=(function(){function y(c,d){this.foldData=c,Array.isArray(d)?this.folds=d:d=this.folds=[d];var i=d[d.length-1];this.range=new f(d[0].start.row,d[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return y.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(d){d.start.row+=c,d.end.row+=c})},y.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(d,i){return-d.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},y.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},y.prototype.walk=function(c,d,i){var l=0,u=this.folds,p,o,s,m=!0;d==null&&(d=this.end.row,i=this.end.column);for(var w=0;w<u.length;w++){if(p=u[w],o=p.range.compareStart(d,i),o==-1){c(null,d,i,l,m);return}if(s=c(null,p.start.row,p.start.column,l,m),s=!s&&c(p.placeholder,p.start.row,p.start.column,l),s||o===0)return;m=!p.sameRow,l=p.end.column}c(null,d,i,l,m)},y.prototype.getNextFoldTo=function(c,d){for(var i,l,u=0;u<this.folds.length;u++){if(i=this.folds[u],l=i.range.compareEnd(c,d),l==-1)return{fold:i,kind:"after"};if(l===0)return{fold:i,kind:"inside"}}return null},y.prototype.addRemoveChars=function(c,d,i){var l=this.getNextFoldTo(c,d),u,p;if(l){if(u=l.fold,l.kind=="inside"&&u.start.column!=d&&u.start.row!=c)window.console&&window.console.log(c,d,u);else if(u.start.row==c){p=this.folds;var o=p.indexOf(u);for(o===0&&(this.start.column+=i),o;o<p.length;o++){if(u=p[o],u.start.column+=i,!u.sameRow)return;u.end.column+=i}this.end.column+=i}}},y.prototype.split=function(c,d){var i=this.getNextFoldTo(c,d);if(!i||i.kind=="inside")return null;var l=i.fold,u=this.folds,p=this.foldData,o=u.indexOf(l),s=u[o-1];this.end.row=s.end.row,this.end.column=s.end.column,u=u.splice(o,u.length-o);var m=new y(p,u);return p.splice(p.indexOf(this)+1,0,m),m},y.prototype.merge=function(c){for(var d=c.folds,i=0;i<d.length;i++)this.addFold(d[i]);var l=this.foldData;l.splice(l.indexOf(c),1)},y.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(d){c.push(" "+d.toString())}),c.push("]"),c.join(`
|
|
199
|
-
`)},y.prototype.idxToPosition=function(c){for(var d=0,i=0;i<this.folds.length;i++){var l=this.folds[i];if(c-=l.start.column-d,c<0)return{row:l.start.row,column:l.start.column+c};if(c-=l.placeholder.length,c<0)return l.start;d=l.end.column}return{row:this.end.row,column:this.end.column+c}},y})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,h){var f=e("./range").Range,g=f.comparePoints,y=(function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(d,i,l){for(var u=this.ranges,p=l||0;p<u.length;p++){var o=u[p],s=g(d,o.end);if(!(s>0)){var m=g(d,o.start);return s===0?i&&m!==0?-p-2:p:m>0||m===0&&!i?p:-p-1}}return-p-1},c.prototype.add=function(d){var i=!d.isEmpty(),l=this.pointIndex(d.start,i);l<0&&(l=-l-1);var u=this.pointIndex(d.end,i,l);return u<0?u=-u-1:u++,this.ranges.splice(l,u-l,d)},c.prototype.addList=function(d){for(var i=[],l=d.length;l--;)i.push.apply(i,this.add(d[l]));return i},c.prototype.substractPoint=function(d){var i=this.pointIndex(d);if(i>=0)return this.ranges.splice(i,1)},c.prototype.merge=function(){var d=[],i=this.ranges;i=i.sort(function(s,m){return g(s.start,m.start)});for(var l=i[0],u,p=1;p<i.length;p++){u=l,l=i[p];var o=g(u.end,l.start);o<0||o==0&&!u.isEmpty()&&!l.isEmpty()||(g(u.end,l.end)<0&&(u.end.row=l.end.row,u.end.column=l.end.column),i.splice(p,1),d.push(l),l=u,p--)}return this.ranges=i,d},c.prototype.contains=function(d,i){return this.pointIndex({row:d,column:i})>=0},c.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},c.prototype.rangeAtPoint=function(d){var i=this.pointIndex(d);if(i>=0)return this.ranges[i]},c.prototype.clipRows=function(d,i){var l=this.ranges;if(l[0].start.row>i||l[l.length-1].start.row<d)return[];var u=this.pointIndex({row:d,column:0});u<0&&(u=-u-1);var p=this.pointIndex({row:i,column:0},u);p<0&&(p=-p-1);for(var o=[],s=u;s<p;s++)o.push(l[s]);return o},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(d){this.session&&this.detach(),this.session=d,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(d){for(var i=d.start,l=d.end,u=i.row,p=l.row,o=this.ranges,s=0,m=o.length;s<m;s++){var w=o[s];if(w.end.row>=u)break}if(d.action=="insert")for(var x=p-u,R=-i.column+l.column;s<m;s++){var w=o[s];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=i.column&&(w.start.column==i.column&&this.$bias<=0||(w.start.column+=R,w.start.row+=x)),w.end.row==u&&w.end.column>=i.column){if(w.end.column==i.column&&this.$bias<0)continue;w.end.column==i.column&&R>0&&s<m-1&&w.end.column>w.start.column&&w.end.column==o[s+1].start.column&&(w.end.column-=R),w.end.column+=R,w.end.row+=x}}else for(var x=u-p,R=i.column-l.column;s<m;s++){var w=o[s];if(w.start.row>p)break;w.end.row<p&&(u<w.end.row||u==w.end.row&&i.column<w.end.column)?(w.end.row=u,w.end.column=i.column):w.end.row==p?w.end.column<=l.column?(x||w.end.column>i.column)&&(w.end.column=i.column,w.end.row=i.row):(w.end.column+=R,w.end.row+=x):w.end.row>p&&(w.end.row+=x),w.start.row<p&&(u<w.start.row||u==w.start.row&&i.column<w.start.column)?(w.start.row=u,w.start.column=i.column):w.start.row==p?w.start.column<=l.column?(x||w.start.column>i.column)&&(w.start.column=i.column,w.start.row=i.row):(w.start.column+=R,w.start.row+=x):w.start.row>p&&(w.start.row+=x)}if(x!=0&&s<m)for(;s<m;s++){var w=o[s];w.start.row+=x,w.end.row+=x}},c})();y.prototype.comparePoints=g,r.RangeList=y}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,h){var f=this&&this.__extends||(function(){var u=function(p,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,m){s.__proto__=m}||function(s,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(s[w]=m[w])},u(p,o)};return function(p,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(p,o);function s(){this.constructor=p}p.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}})(),g=e("../range_list").RangeList,y=(function(u){f(p,u);function p(o,s){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=s,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return p.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},p.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(s){s.setFoldLine(o)})},p.prototype.clone=function(){var o=this.range.clone(),s=new p(o,this.placeholder);return this.subFolds.forEach(function(m){s.subFolds.push(m.clone())}),s.collapseChildren=this.collapseChildren,s},p.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){d(o,this.start);for(var s=o.start.row,m=o.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(s,m),x==1);w++);var R=this.subFolds[w],$=0;if(x==0){if(R.range.containsRange(o))return R.addSubFold(o);$=1}for(var s=o.range.end.row,m=o.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(s,m),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,o),O=x==0?C.length-1:C.length,N=$;N<O;N++)o.addSubFold(C[N]);return o.setFoldLine(this.foldLine),o}},p.prototype.restoreRange=function(o){return l(o,this.start)},p})(g);function c(u,p){u.row-=p.row,u.row==0&&(u.column-=p.column)}function d(u,p){c(u.start,p),c(u.end,p)}function i(u,p){u.row==0&&(u.column+=p.column),u.row+=p.row}function l(u,p){i(u.start,p),i(u.end,p)}r.Fold=y}),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,h){var f=e("../range").Range,g=e("./fold_line").FoldLine,y=e("./fold").Fold,c=e("../token_iterator").TokenIterator,d=e("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(l,u,p){var o=this.getFoldLine(l);if(!o)return null;for(var s=o.folds,m=0;m<s.length;m++){var w=s[m].range;if(w.contains(l,u)){if(p==1&&w.isEnd(l,u)&&!w.isEmpty()||p==-1&&w.isStart(l,u)&&!w.isEmpty())continue;return s[m]}}},this.getFoldsInRange=function(l){var u=l.start,p=l.end,o=this.$foldData,s=[];u.column+=1,p.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(l);if(w!=2){if(w==-2)break;for(var x=o[m].folds,R=0;R<x.length;R++){var $=x[R];if(w=$.range.compareRange(l),w==-2)break;if(w!=2){if(w==42)break;s.push($)}}}}return u.column-=1,p.column+=1,s},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var u=[];l.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(l);return u},this.getAllFolds=function(){for(var l=[],u=this.$foldData,p=0;p<u.length;p++)for(var o=0;o<u[p].folds.length;o++)l.push(u[p].folds[o]);return l},this.getFoldStringAt=function(l,u,p,o){if(o=o||this.getFoldLine(l),!o)return null;for(var s={end:{column:0}},m,w,x=0;x<o.folds.length;x++){w=o.folds[x];var R=w.range.compareEnd(l,u);if(R==-1){m=this.getLine(w.start.row).substring(s.end.column,w.start.column);break}else if(R===0)return null;s=w}return m||(m=this.getLine(w.start.row).substring(s.end.column)),p==-1?m.substring(0,u-s.end.column):p==1?m.substring(u-s.end.column):m},this.getFoldLine=function(l,u){var p=this.$foldData,o=0;for(u&&(o=p.indexOf(u)),o==-1&&(o=0),o;o<p.length;o++){var s=p[o];if(s.start.row<=l&&s.end.row>=l)return s;if(s.end.row>l)return null}return null},this.getNextFoldLine=function(l,u){var p=this.$foldData,o=0;for(u&&(o=p.indexOf(u)),o==-1&&(o=0),o;o<p.length;o++){var s=p[o];if(s.end.row>=l)return s}return null},this.getFoldedRowCount=function(l,u){for(var p=this.$foldData,o=u-l+1,s=0;s<p.length;s++){var m=p[s],w=m.end.row,x=m.start.row;if(w>=u){x<u&&(x>=l?o-=u-x:o=0);break}else w>=l&&(x>=l?o-=w-x:o-=w-l+1)}return o},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(u,p){return u.start.row-p.start.row}),l},this.addFold=function(l,u){var p=this.$foldData,o=!1,s;l instanceof y?s=l:(s=new y(u,l),s.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(s.range);var m=s.start.row,w=s.start.column,x=s.end.row,R=s.end.column,$=this.getFoldAt(m,w,1),k=this.getFoldAt(x,R,-1);if($&&k==$)return $.addSubFold(s);$&&!$.range.isStart(m,w)&&this.removeFold($),k&&!k.range.isEnd(x,R)&&this.removeFold(k);var C=this.getFoldsInRange(s.range);C.length>0&&(this.removeFolds(C),s.collapseChildren||C.forEach(function(I){s.addSubFold(I)}));for(var O=0;O<p.length;O++){var N=p[O];if(x==N.start.row){N.addFold(s),o=!0;break}else if(m==N.end.row){if(N.addFold(s),o=!0,!s.sameRow){var L=p[O+1];if(L&&L.start.row==x){N.merge(L);break}}break}else if(x<=N.start.row)break}return o||(N=this.$addFoldLine(new g(this.$foldData,s))),this.$useWrapMode?this.$updateWrapData(N.start.row,N.start.row):this.$updateRowLengthCache(N.start.row,N.start.row),this.$modified=!0,this._signal("changeFold",{data:s,action:"add"}),s},this.addFolds=function(l){l.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(l){var u=l.foldLine,p=u.start.row,o=u.end.row,s=this.$foldData,m=u.folds;if(m.length==1)s.splice(s.indexOf(u),1);else if(u.range.isEnd(l.end.row,l.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(l.start.row,l.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(l.sameRow)m.splice(m.indexOf(l),1);else{var w=u.split(l.start.row,l.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(p,o):this.$updateRowLengthCache(p,o)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var u=[],p=0;p<l.length;p++)u.push(l[p]);u.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(u){l.restoreRange(u),this.addFold(u)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(l,u){var p,o;if(l==null)p=new f(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof l=="number")p=new f(l,0,l,this.getLine(l).length);else if("row"in l)p=f.fromPoints(l,l);else{if(Array.isArray(l))return o=[],l.forEach(function(m){o=o.concat(this.unfold(m))},this),o;p=l}o=this.getFoldsInRangeList(p);for(var s=o;o.length==1&&f.comparePoints(o[0].start,p.start)<0&&f.comparePoints(o[0].end,p.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(p);if(u!=!1?this.removeFolds(o):this.expandFolds(o),s.length)return s},this.isRowFolded=function(l,u){return!!this.getFoldLine(l,u)},this.getRowFoldEnd=function(l,u){var p=this.getFoldLine(l,u);return p?p.end.row:l},this.getRowFoldStart=function(l,u){var p=this.getFoldLine(l,u);return p?p.start.row:l},this.getFoldDisplayLine=function(l,u,p,o,s){o==null&&(o=l.start.row),s==null&&(s=0),u==null&&(u=l.end.row),p==null&&(p=this.getLine(u).length);var m=this.doc,w="";return l.walk(function(x,R,$,k){if(!(R<o)){if(R==o){if($<s)return;k=Math.max(s,k)}x!=null?w+=x:w+=m.getLine(R).substring(k,$)}},u,p),w},this.getDisplayLine=function(l,u,p,o){var s=this.getFoldLine(l);if(s)return this.getFoldDisplayLine(s,l,u,p,o);var m;return m=this.doc.getLine(l),m.substring(o||0,u||m.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(u){var p=u.folds.map(function(o){return o.clone()});return new g(l,p)}),l},this.toggleFold=function(l){var u=this.selection,p=u.getRange(),o,s;if(p.isEmpty()){var m=p.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(l){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(s=this.findMatchingBracket(m))?p.comparePoint(s)==1?p.end=s:(p.start=s,p.start.column++,p.end.column--):(s=this.findMatchingBracket({row:m.row,column:m.column+1}))?(p.comparePoint(s)==1?p.end=s:p.start=s,p.start.column++):p=this.getCommentFoldRange(m.row,m.column)||p}else{var x=this.getFoldsInRange(p);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(p.start.row,p.start.column)),o&&o.range.toString()==p.toString()){this.expandFold(o);return}var R="...";if(!p.isMultiLine()){if(R=this.getTextRange(p),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,p)},this.getCommentFoldRange=function(l,u,p){var o=new c(this,l,u),s=o.getCurrentToken(),m=s&&s.type;if(s&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new f;if(p!=1){do s=o.stepBackward();while(s&&w.test(s.type));s=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+s.value.length,o=new c(this,l,u);var R=this.getState(o.$row);if(p!=-1){var $=-1;do if(s=o.stepForward(),$==-1){var k=this.getState(o.$row);R.toString()!==k.toString()&&($=o.$row)}else if(o.$row>$)break;while(s&&w.test(s.type));s=o.stepBackward()}else s=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(l,u,p,o){p==null&&(p=1e5);var s=this.foldWidgets;if(s){u=u||this.getLength(),l=l||0;for(var m=l;m<u;m++)if(s[m]==null&&(s[m]=this.getFoldWidget(m)),s[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=l&&(m=w.end.row,w.collapseChildren=p,this.addFold("...",w))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(u){for(var p=l.getTokens(u),o=0;o<p.length;o++){var s=p[o];if(!(s.type=="text"&&/^\s+$/.test(s.value)))return!!/comment/.test(s.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(l,u){var p=this.foldWidgets;if(!p||u&&p[l])return{};for(var o=l-1,s;o>=0;){var m=p[o];if(m==null&&(m=p[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(s||(s=w),w&&w.end.row>=l)break}o--}return{range:o!==-1&&w,firstRange:s}},this.onFoldWidgetClick=function(l,u){u instanceof d&&(u=u.domEvent);var p={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(l,p);if(!o){var s=u.target||u.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,u){if(this.getFoldWidget){var p=this.getFoldWidget(l),o=this.getLine(l),s=p==="end"?-1:1,m=this.getFoldAt(l,s===-1?0:o.length,s);if(m)return u.children||u.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(l,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(u.siblings){var x=this.getParentFoldRangeData(l);if(x.range)var R=x.range.start.row+1,$=x.range.end.row;this.foldAll(R,$,u.all?1e4:0)}else u.children?($=w?w.end.row:this.getLength(),this.foldAll(l+1,$,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(l){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var p=this.$toggleFoldWidget(u,{});if(!p){var o=this.getParentFoldRangeData(u,!0);if(p=o.range||o.firstRange,p){u=p.start.row;var s=this.getFoldAt(u,this.getLine(u).length,1);s?this.removeFold(s):this.addFold("...",p)}}},this.updateFoldWidgets=function(l){var u=l.start.row,p=l.end.row-u;if(p===0)this.foldWidgets[u]=null;else if(l.action=="remove")this.foldWidgets.splice(u,p+1,null);else{var o=Array(p+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(l){var u=l.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,h){var f=e("../token_iterator").TokenIterator,g=e("../range").Range;function y(){this.findMatchingBracket=function(c,d){if(c.column==0)return null;var i=d||this.getLine(c.row).charAt(c.column-1);if(i=="")return null;var l=i.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],c):this.$findOpeningBracket(l[2],c):null},this.getBracketRange=function(c){var d=this.getLine(c.row),i=!0,l,u=d.charAt(c.column-1),p=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(p||(u=d.charAt(c.column),c={row:c.row,column:c.column+1},p=u&&u.match(/([\(\[\{])|([\)\]\}])/),i=!1),!p)return null;if(p[1]){var o=this.$findClosingBracket(p[1],c);if(!o)return null;l=g.fromPoints(c,o),i||(l.end.column++,l.start.column--),l.cursor=l.end}else{var o=this.$findOpeningBracket(p[2],c);if(!o)return null;l=g.fromPoints(o,c),i||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(c,d){var i=this.getLine(c.row),l=/([\(\[\{])|([\)\]\}])/,u=!d&&i.charAt(c.column-1),p=u&&u.match(l);if(p||(u=(d===void 0||d)&&i.charAt(c.column),c={row:c.row,column:c.column+1},p=u&&u.match(l)),!p)return null;var o=new g(c.row,c.column-1,c.row,c.column),s=p[1]?this.$findClosingBracket(p[1],c):this.$findOpeningBracket(p[2],c);if(!s)return[o];var m=new g(s.row,s.column,s.row,s.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,d,i){var l=this.$brackets[c],u=1,p=new f(this,d.row,d.column),o=p.getCurrentToken();if(o||(o=p.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var s=d.column-p.getCurrentTokenColumn()-2,m=o.value;;){for(;s>=0;){var w=m.charAt(s);if(w==l){if(u-=1,u==0)return{row:p.getCurrentTokenRow(),column:s+p.getCurrentTokenColumn()}}else w==c&&(u+=1);s-=1}do o=p.stepBackward();while(o&&!i.test(o.type));if(o==null)break;m=o.value,s=m.length-1}return null}},this.$findClosingBracket=function(c,d,i){var l=this.$brackets[c],u=1,p=new f(this,d.row,d.column),o=p.getCurrentToken();if(o||(o=p.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var s=d.column-p.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;s<w;){var x=m.charAt(s);if(x==l){if(u-=1,u==0)return{row:p.getCurrentTokenRow(),column:s+p.getCurrentTokenColumn()}}else x==c&&(u+=1);s+=1}do o=p.stepForward();while(o&&!i.test(o.type));if(o==null)break;s=0}return null}},this.getMatchingTags=function(c){var d=new f(this,c.row,c.column),i=this.$findTagName(d);if(i){var l=d.stepBackward();return l.value==="<"?this.$findClosingTag(d,i):this.$findOpeningTag(d,i)}},this.$findTagName=function(c){var d=c.getCurrentToken(),i=!1,l=!1;if(d&&d.type.indexOf("tag-name")===-1)do l?d=c.stepBackward():d=c.stepForward(),d&&(d.value==="/>"?l=!0:d.type.indexOf("tag-name")!==-1&&(i=!0));while(d&&!i);return d},this.$findClosingTag=function(c,d){var i,l=d.value,u=d.value,p=0,o=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);d=c.stepForward();var s=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+d.value.length),m=!1;do{if(i=d,i.type.indexOf("tag-close")!==-1&&!m){var w=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);m=!0}if(d=c.stepForward(),d){if(d.value===">"&&!m){var w=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);m=!0}if(d.type.indexOf("tag-name")!==-1){if(l=d.value,u===l){if(i.value==="<")p++;else if(i.value==="</"&&(p--,p<0)){c.stepBackward();var x=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);d=c.stepForward();var R=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=c.stepForward()),d&&d.value===">")var $=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(u===l&&d.value==="/>"&&(p--,p<0))var x=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),R=x,$=R,w=new g(s.end.row,s.end.column,s.end.row,s.end.column+1)}}while(d&&p>=0);if(o&&w&&x&&$&&s&&R)return{openTag:new g(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new g(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:s,closeTagName:R}},this.$findOpeningTag=function(c,d){var i=c.getCurrentToken(),l=d.value,u=0,p=c.getCurrentTokenRow(),o=c.getCurrentTokenColumn(),s=o+2,m=new g(p,o,p,s);c.stepForward();var w=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=c.stepForward()),!(!d||d.value!==">")){var x=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(d=i,p=c.getCurrentTokenRow(),o=c.getCurrentTokenColumn(),s=o+d.value.length,i=c.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(l===d.value)if(i.value==="<"){if(u++,u>0){var R=new g(p,o,p,s),$=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do d=c.stepForward();while(d&&d.value!==">");var k=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else i.value==="</"&&u--}else if(d.value==="/>"){for(var C=0,O=i;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===l){u--;break}else if(O.value==="<")break;O=c.stepBackward(),C++}for(var N=0;N<C;N++)c.stepForward()}}while(i&&u<=0);if($&&k&&m&&x&&R&&w)return{openTag:new g($.start.row,$.start.column,k.end.row,k.end.column),closeTag:new g(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:R,closeTagName:w}}}}r.BracketMatch=y}),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,h){var f=e("./lib/oop"),g=e("./lib/lang"),y=e("./bidihandler").BidiHandler,c=e("./config"),d=e("./lib/event_emitter").EventEmitter,i=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,p=e("./line_widgets").LineWidgets,o=e("./document").Document,s=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,x=(function(){function F(D,A){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
|
|
200
|
-
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new s(new l().getTokenizer(),this);var _=this;this.bgTokenizer.on("update",function(M){_._signal("tokenizerUpdate",M)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof D!="object"||!D.getLine)&&(D=new o(D)),this.setDocument(D),this.selection=new i(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new y(this),c.resetOptions(this),this.setMode(A),c._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var D=this;this.curOp=null,this.on("change",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.docChanged=!0},!0),this.on("changeSelection",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(D){if(this.curOp){if(!D||this.curOp.command)return;this.prevOp=this.curOp}D||(D={}),this.$operationResetTimer.schedule(),this.curOp={command:D.command||{},args:D.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",D)},F.prototype.endOperation=function(D){if(this.curOp){if(D&&D.returnValue===!1){this.curOp=null,this._signal("endOperation",D);return}if(D==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",D)}},F.prototype.setDocument=function(D){this.doc&&this.doc.off("change",this.$onChange),this.doc=D,D.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var D=new p(this);return this.widgetManager=D,this.$editor&&D.attach(this.$editor),D},set:function(D){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:D})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(D){if(!D){this.$docRowCache=[],this.$screenRowCache=[];return}var A=this.$docRowCache.length,_=this.$getRowCacheIndex(this.$docRowCache,D)+1;A>_&&(this.$docRowCache.splice(_,A),this.$screenRowCache.splice(_,A))},F.prototype.$getRowCacheIndex=function(D,A){for(var _=0,M=D.length-1;_<=M;){var B=_+M>>1,j=D[B];if(A>j)_=B+1;else if(A<j)M=B-1;else return B}return _-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(D){var A=D.data;this.$resetRowCache(A.start.row)},F.prototype.onChange=function(D){this.$modified=!0,this.$bidiHandler.onChange(D),this.$resetRowCache(D.start.row);var A=this.$updateInternalDataOnChange(D);!this.$fromUndo&&this.$undoManager&&(A&&A.length&&(this.$undoManager.add({action:"removeFolds",folds:A},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(D,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(D),this._signal("change",D)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(D){this.doc.setValue(D),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(D){typeof D=="string"&&(D=JSON.parse(D));var A=new w;A.$undoStack=D.history.undo,A.$redoStack=D.history.redo,A.mark=D.history.mark,A.$rev=D.history.rev;var _=new F(D.value);return D.folds.forEach(function(M){_.addFold("...",u.fromPoints(M.start,M.end))}),_.setAnnotations(D.annotations),_.setBreakpoints(D.breakpoints),_.setMode(D.mode),_.setScrollLeft(D.scrollLeft),_.setScrollTop(D.scrollTop),_.setUndoManager(A),_.selection.fromJSON(D.selection),_},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(D){return D.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(D){return this.bgTokenizer.getState(D)},F.prototype.getTokens=function(D){return this.bgTokenizer.getTokens(D)},F.prototype.getTokenAt=function(D,A){var _=this.bgTokenizer.getTokens(D),M,B=0;if(A==null){var j=_.length-1;B=this.getLine(D).length}else for(var j=0;j<_.length&&(B+=_[j].value.length,!(B>=A));j++);return M=_[j],M?(M.index=j,M.start=B-M.value.length,M):null},F.prototype.setUndoManager=function(D){if(this.$undoManager=D,this.$informUndoManager&&this.$informUndoManager.cancel(),D){var A=this;D.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(D){this.setOption("useSoftTabs",D)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(D){this.setOption("tabSize",D)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(D){return this.$useSoftTabs&&D.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(D){this.setOption("navigateWithinSoftTabs",D)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(D){this.setOption("overwrite",D)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(D,A){this.$decorations[D]||(this.$decorations[D]=""),this.$decorations[D]+=" "+A,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(D){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(D)},F.prototype.addGutterCustomWidget=function(D,A){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(D,A)},F.prototype.removeGutterDecoration=function(D,A){this.$decorations[D]=(this.$decorations[D]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(D){this.$breakpoints=[];for(var A=0;A<D.length;A++)this.$breakpoints[D[A]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(D,A){A===void 0&&(A="ace_breakpoint"),A?this.$breakpoints[D]=A:delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(D){delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(D,A,_,M){var B=this.$markerId++,j={range:D,type:_||"line",renderer:typeof _=="function"?_:null,clazz:A,inFront:!!M,id:B};return M?(this.$frontMarkers[B]=j,this._signal("changeFrontMarker")):(this.$backMarkers[B]=j,this._signal("changeBackMarker")),B},F.prototype.addDynamicMarker=function(D,A){if(D.update){var _=this.$markerId++;return D.id=_,D.inFront=!!A,A?(this.$frontMarkers[_]=D,this._signal("changeFrontMarker")):(this.$backMarkers[_]=D,this._signal("changeBackMarker")),D}},F.prototype.removeMarker=function(D){var A=this.$frontMarkers[D]||this.$backMarkers[D];if(A){var _=A.inFront?this.$frontMarkers:this.$backMarkers;delete _[D],this._signal(A.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(D){return D?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(D){if(!this.$searchHighlight){var A=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(A)}this.$searchHighlight.setRegexp(D)},F.prototype.highlightLines=function(D,A,_,M){typeof A!="number"&&(_=A,A=D),_||(_="ace_step");var B=new u(D,0,A,1/0);return B.id=this.addMarker(B,_,"fullLine",M),B},F.prototype.setAnnotations=function(D){this.$annotations=D,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(D){var A=D.match(/^.*?(\r?\n)/m);A?this.$autoNewLine=A[1]:this.$autoNewLine=`
|
|
201
|
-
`},F.prototype.getWordRange=function(D,A){var _=this.getLine(D),M=!1;if(A>0&&(M=!!_.charAt(A-1).match(this.tokenRe)),M||(M=!!_.charAt(A).match(this.tokenRe)),M)var B=this.tokenRe;else if(/^\s+$/.test(_.slice(A-1,A+1)))var B=/\s/;else var B=this.nonTokenRe;var j=A;if(j>0){do j--;while(j>=0&&_.charAt(j).match(B));j++}for(var V=A;V<_.length&&_.charAt(V).match(B);)V++;return new u(D,j,D,V)},F.prototype.getAWordRange=function(D,A){for(var _=this.getWordRange(D,A),M=this.getLine(_.end.row);M.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},F.prototype.setNewLineMode=function(D){this.doc.setNewLineMode(D)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(D){this.setOption("useWorker",D)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(D){var A=D.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",D)},F.prototype.setMode=function(D,A){if(D&&typeof D=="object"){if(D.getTokenizer)return this.$onChangeMode(D);var _=D,M=_.path}else M=D||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[M]&&!_){this.$onChangeMode(this.$modes[M]),A&&A();return}this.$modeId=M,c.loadModule(["mode",M],(function(B){if(!this.destroyed){if(this.$modeId!==M)return A&&A();this.$modes[M]&&!_?this.$onChangeMode(this.$modes[M]):B&&B.Mode&&(B=new B.Mode(_),_||(this.$modes[M]=B,B.$id=M),this.$onChangeMode(B)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(D,A){if(A||(this.$modeId=D.$id),this.$mode!==D){var _=this.$mode;this.$mode=D,this.$stopWorker(),this.$useWorker&&this.$startWorker();var M=D.getTokenizer();if(M.on!==void 0){var B=this.onReloadTokenizer.bind(this);M.on("update",B)}this.bgTokenizer.setTokenizer(M),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=D.tokenRe,this.nonTokenRe=D.nonTokenRe,A||(D.attachToSession&&D.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(D.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:D}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(D){c.warn("Could not load worker",D),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(D){this.$scrollTop===D||isNaN(D)||(this.$scrollTop=D,this._signal("changeScrollTop",D))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(D){this.$scrollLeft===D||isNaN(D)||(this.$scrollLeft=D,this._signal("changeScrollLeft",D))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var D=0;return this.lineWidgets.forEach(function(A){A&&A.screenWidth>D&&(D=A.screenWidth)}),this.lineWidgetWidth=D},F.prototype.$computeWidth=function(D){if(this.$modified||D){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),_=this.$rowLengthCache,M=0,B=0,j=this.$foldData[B],V=j?j.start.row:1/0,K=A.length,J=0;J<K;J++){if(J>V){if(J=j.end.row+1,J>=K)break;j=this.$foldData[B++],V=j?j.start.row:1/0}_[J]==null&&(_[J]=this.$getStringScreenWidth(A[J])[0]),_[J]>M&&(M=_[J])}this.screenWidth=M}},F.prototype.getLine=function(D){return this.doc.getLine(D)},F.prototype.getLines=function(D,A){return this.doc.getLines(D,A)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(D){return this.doc.getTextRange(D||this.selection.getRange())},F.prototype.insert=function(D,A){return this.doc.insert(D,A)},F.prototype.remove=function(D){return this.doc.remove(D)},F.prototype.removeFullLines=function(D,A){return this.doc.removeFullLines(D,A)},F.prototype.undoChanges=function(D,A){if(D.length){this.$fromUndo=!0;for(var _=D.length-1;_!=-1;_--){var M=D[_];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!A&&this.$undoSelect&&(D.selectionBefore?this.selection.fromJSON(D.selectionBefore):this.selection.setRange(this.$getUndoSelection(D,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(D,A){if(D.length){this.$fromUndo=!0;for(var _=0;_<D.length;_++){var M=D[_];(M.action=="insert"||M.action=="remove")&&this.doc.$safeApplyDelta(M)}!A&&this.$undoSelect&&(D.selectionAfter?this.selection.fromJSON(D.selectionAfter):this.selection.setRange(this.$getUndoSelection(D,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(D){this.$undoSelect=D},F.prototype.$getUndoSelection=function(D,A){function _(K){return A?K.action!=="insert":K.action==="insert"}for(var M,B,j=0;j<D.length;j++){var V=D[j];if(V.start){if(!M){_(V)?M=u.fromPoints(V.start,V.end):M=u.fromPoints(V.start,V.start);continue}_(V)?(B=V.start,M.compare(B.row,B.column)==-1&&M.setStart(B),B=V.end,M.compare(B.row,B.column)==1&&M.setEnd(B)):(B=V.start,M.compare(B.row,B.column)==-1&&(M=u.fromPoints(V.start,V.start)))}}return M},F.prototype.replace=function(D,A){return this.doc.replace(D,A)},F.prototype.moveText=function(D,A,_){var M=this.getTextRange(D),B=this.getFoldsInRange(D),j=u.fromPoints(A,A);if(!_){this.remove(D);var V=D.start.row-D.end.row,K=V?-D.end.column:D.start.column-D.end.column;K&&(j.start.row==D.end.row&&j.start.column>D.end.column&&(j.start.column+=K),j.end.row==D.end.row&&j.end.column>D.end.column&&(j.end.column+=K)),V&&j.start.row>=D.end.row&&(j.start.row+=V,j.end.row+=V)}if(j.end=this.insert(j.start,M),B.length){var J=D.start,oe=j.start,V=oe.row-J.row,K=oe.column-J.column;this.addFolds(B.map(function(ce){return ce=ce.clone(),ce.start.row==J.row&&(ce.start.column+=K),ce.end.row==J.row&&(ce.end.column+=K),ce.start.row+=V,ce.end.row+=V,ce}))}return j},F.prototype.indentRows=function(D,A,_){_=_.replace(/\t/g,this.getTabString());for(var M=D;M<=A;M++)this.doc.insertInLine({row:M,column:0},_)},F.prototype.outdentRows=function(D){for(var A=D.collapseRows(),_=new u(0,0,0,0),M=this.getTabSize(),B=A.start.row;B<=A.end.row;++B){var j=this.getLine(B);_.start.row=B,_.end.row=B;for(var V=0;V<M&&j.charAt(V)==" ";++V);V<M&&j.charAt(V)==" "?(_.start.column=V,_.end.column=V+1):(_.start.column=0,_.end.column=V),this.remove(_)}},F.prototype.$moveLines=function(D,A,_){if(D=this.getRowFoldStart(D),A=this.getRowFoldEnd(A),_<0){var M=this.getRowFoldStart(D+_);if(M<0)return 0;var B=M-D}else if(_>0){var M=this.getRowFoldEnd(A+_);if(M>this.doc.getLength()-1)return 0;var B=M-A}else{D=this.$clipRowToDocument(D),A=this.$clipRowToDocument(A);var B=A-D+1}var j=new u(D,0,A,Number.MAX_VALUE),V=this.getFoldsInRange(j).map(function(J){return J=J.clone(),J.start.row+=B,J.end.row+=B,J}),K=_==0?this.doc.getLines(D,A):this.doc.removeFullLines(D,A);return this.doc.insertFullLines(D+B,K),V.length&&this.addFolds(V),B},F.prototype.moveLinesUp=function(D,A){return this.$moveLines(D,A,-1)},F.prototype.moveLinesDown=function(D,A){return this.$moveLines(D,A,1)},F.prototype.duplicateLines=function(D,A){return this.$moveLines(D,A,0)},F.prototype.$clipRowToDocument=function(D){return Math.max(0,Math.min(D,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(D,A){return A<0?0:Math.min(this.doc.getLine(D).length,A)},F.prototype.$clipPositionToDocument=function(D,A){if(A=Math.max(0,A),D<0)D=0,A=0;else{var _=this.doc.getLength();D>=_?(D=_-1,A=this.doc.getLine(_-1).length):A=Math.min(this.doc.getLine(D).length,A)}return{row:D,column:A}},F.prototype.$clipRangeToDocument=function(D){D.start.row<0?(D.start.row=0,D.start.column=0):D.start.column=this.$clipColumnToRow(D.start.row,D.start.column);var A=this.doc.getLength()-1;return D.end.row>A?(D.end.row=A,D.end.column=this.doc.getLine(A).length):D.end.column=this.$clipColumnToRow(D.end.row,D.end.column),D},F.prototype.setUseWrapMode=function(D){if(D!=this.$useWrapMode){if(this.$useWrapMode=D,this.$modified=!0,this.$resetRowCache(0),D){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(D,A){(this.$wrapLimitRange.min!==D||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:D,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(D,A){var _=this.$wrapLimitRange;_.max<0&&(_={min:A,max:A});var M=this.$constrainWrapLimit(D,_.min,_.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(D,A,_){return A&&(D=Math.max(A,D)),_&&(D=Math.min(_,D)),D},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(D){this.setWrapLimitRange(D,D)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(D){var A=this.$useWrapMode,_=D.action,M=D.start,B=D.end,j=M.row,V=B.row,K=V-j,J=null;if(this.$updating=!0,K!=0)if(_==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(j,K);var oe=this.$foldData;J=this.getFoldsInRange(D),this.removeFolds(J);var ee=this.getFoldLine(B.row),se=0;if(ee){ee.addRemoveChars(B.row,B.column,M.column-B.column),ee.shiftRow(-K);var ce=this.getFoldLine(j);ce&&ce!==ee&&(ce.merge(ee),ee=ce),se=oe.indexOf(ee)+1}for(se;se<oe.length;se++){var ee=oe[se];ee.start.row>=B.row&&ee.shiftRow(-K)}V=j}else{var he=Array(K);he.unshift(j,0);var me=A?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,he);var oe=this.$foldData,ee=this.getFoldLine(j),se=0;if(ee){var $e=ee.range.compareInside(M.row,M.column);$e==0?(ee=ee.split(M.row,M.column),ee&&(ee.shiftRow(K),ee.addRemoveChars(V,0,B.column-M.column))):$e==-1&&(ee.addRemoveChars(j,0,B.column-M.column),ee.shiftRow(K)),se=oe.indexOf(ee)+1}for(se;se<oe.length;se++){var ee=oe[se];ee.start.row>=j&&ee.shiftRow(K)}}else{K=Math.abs(D.start.column-D.end.column),_==="remove"&&(J=this.getFoldsInRange(D),this.removeFolds(J),K=-K);var ee=this.getFoldLine(j);ee&&ee.addRemoveChars(j,M.column,K)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(j,V):this.$updateRowLengthCache(j,V),J},F.prototype.$updateRowLengthCache=function(D,A){this.$rowLengthCache[D]=null,this.$rowLengthCache[A]=null},F.prototype.$updateWrapData=function(D,A){var _=this.doc.getAllLines(),M=this.getTabSize(),B=this.$wrapData,j=this.$wrapLimit,V,K,J=D;for(A=Math.min(A,_.length-1);J<=A;)K=this.getFoldLine(J,K),K?(V=[],K.walk((function(oe,ee,se,ce){var he;if(oe!=null){he=this.$getDisplayTokens(oe,V.length),he[0]=k;for(var me=1;me<he.length;me++)he[me]=C}else he=this.$getDisplayTokens(_[ee].substring(ce,se),V.length);V=V.concat(he)}).bind(this),K.end.row,_[K.end.row].length+1),B[K.start.row]=this.$computeWrapSplits(V,j,M),J=K.end.row+1):(V=this.$getDisplayTokens(_[J]),B[J]=this.$computeWrapSplits(V,j,M),J++)},F.prototype.$computeWrapSplits=function(D,A,_){if(D.length==0)return[];var M=[],B=D.length,j=0,V=0,K=this.$wrapAsCode,J=this.$indentedSoftWrap,oe=A<=Math.max(2*_,8)||J===!1?0:Math.floor(A/2);function ee(){var $e=0;if(oe===0)return $e;if(J)for(var Ee=0;Ee<D.length;Ee++){var Re=D[Ee];if(Re==N)$e+=1;else if(Re==L)$e+=_;else{if(Re==I)continue;break}}return K&&J!==!1&&($e+=_),Math.min($e,oe)}function se($e){for(var Ee=$e-j,Re=j;Re<$e;Re++){var rt=D[Re];(rt===12||rt===2)&&(Ee-=1)}M.length||(ce=ee(),M.indent=ce),V+=Ee,M.push(V),j=$e}for(var ce=0;B-j>A-ce;){var he=j+A-ce;if(D[he-1]>=N&&D[he]>=N){se(he);continue}if(D[he]==k||D[he]==C){for(he;he!=j-1&&D[he]!=k;he--);if(he>j){se(he);continue}for(he=j+A,he;he<D.length&&D[he]==C;he++);if(he==D.length)break;se(he);continue}for(var me=Math.max(he-(A-(A>>2)),j-1);he>me&&D[he]<k;)he--;if(K){for(;he>me&&D[he]<k;)he--;for(;he>me&&D[he]==O;)he--}else for(;he>me&&D[he]<N;)he--;if(he>me){se(++he);continue}he=j+A,D[he]==$&&he--,se(he-ce)}return M},F.prototype.$getDisplayTokens=function(D,A){var _=[],M;A=A||0;for(var B=0;B<D.length;B++){var j=D.charCodeAt(B);if(j==9){M=this.getScreenTabSize(_.length+A),_.push(L);for(var V=1;V<M;V++)_.push(I)}else j==32?_.push(N):j>39&&j<48||j>57&&j<64?_.push(O):j>=4352&&W(j)?_.push(R,$):_.push(R)}return _},F.prototype.$getStringScreenWidth=function(D,A,_){if(A==0)return[0,0];A==null&&(A=1/0),_=_||0;var M,B;for(B=0;B<D.length&&(M=D.charCodeAt(B),M==9?_+=this.getScreenTabSize(_):M>=4352&&W(M)?_+=2:_+=1,!(_>A));B++);return[_,B]},F.prototype.getRowLength=function(D){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[D]&&this.lineWidgets[D].rowCount||0),!this.$useWrapMode||!this.$wrapData[D]?A:this.$wrapData[D].length+A},F.prototype.getRowLineCount=function(D){return!this.$useWrapMode||!this.$wrapData[D]?1:this.$wrapData[D].length+1},F.prototype.getRowWrapIndent=function(D){if(this.$useWrapMode){var A=this.screenToDocumentPosition(D,Number.MAX_VALUE),_=this.$wrapData[A.row];return _.length&&_[0]<A.column?_.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(D){var A=this.screenToDocumentPosition(D,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},F.prototype.getDocumentLastRowColumn=function(D,A){var _=this.documentToScreenRow(D,A);return this.getScreenLastRowColumn(_)},F.prototype.getDocumentLastRowColumnPosition=function(D,A){var _=this.documentToScreenRow(D,A);return this.screenToDocumentPosition(_,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(D){if(this.$useWrapMode)return this.$wrapData[D]},F.prototype.getScreenTabSize=function(D){return this.$tabSize-(D%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(D,A){return this.screenToDocumentPosition(D,A).row},F.prototype.screenToDocumentColumn=function(D,A){return this.screenToDocumentPosition(D,A).column},F.prototype.screenToDocumentPosition=function(D,A,_){if(D<0)return{row:0,column:0};var M,se=0,B=0,j,ee=0,V=0,K=this.$screenRowCache,J=this.$getRowCacheIndex(K,D),oe=K.length;if(oe&&J>=0)var ee=K[J],se=this.$docRowCache[J],ce=D>K[oe-1];else var ce=!oe;for(var he=this.getLength()-1,me=this.getNextFoldLine(se),$e=me?me.start.row:1/0;ee<=D&&(V=this.getRowLength(se),!(ee+V>D||se>=he));)ee+=V,se++,se>$e&&(se=me.end.row+1,me=this.getNextFoldLine(se,me),$e=me?me.start.row:1/0),ce&&(this.$docRowCache.push(se),this.$screenRowCache.push(ee));if(me&&me.start.row<=se)M=this.getFoldDisplayLine(me),se=me.start.row;else{if(ee+V<=D||se>he)return{row:he,column:this.getLine(he).length};M=this.getLine(se),me=null}var Ee=0,Re=Math.floor(D-ee);if(this.$useWrapMode){var rt=this.$wrapData[se];rt&&(j=rt[Re],Re>0&&rt.length&&(Ee=rt.indent,B=rt[Re-1]||rt[rt.length-1],M=M.substring(B)))}return _!==void 0&&this.$bidiHandler.isBidiRow(ee+Re,se,Re)&&(A=this.$bidiHandler.offsetToCol(_)),B+=this.$getStringScreenWidth(M,A-Ee)[1],this.$useWrapMode&&B>=j&&(B=j-1),me?me.idxToPosition(B):{row:se,column:B}},F.prototype.documentToScreenPosition=function(D,A){if(typeof A>"u")var _=this.$clipPositionToDocument(D.row,D.column);else _=this.$clipPositionToDocument(D,A);D=_.row,A=_.column;var ee=0,M=null,B=null;B=this.getFoldAt(D,A,1),B&&(D=B.start.row,A=B.start.column);var j,oe=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,D),J=V.length;if(J&&K>=0)var oe=V[K],ee=this.$screenRowCache[K],se=D>V[J-1];else var se=!J;for(var ce=this.getNextFoldLine(oe),he=ce?ce.start.row:1/0;oe<D;){if(oe>=he){if(j=ce.end.row+1,j>D)break;ce=this.getNextFoldLine(j,ce),he=ce?ce.start.row:1/0}else j=oe+1;ee+=this.getRowLength(oe),oe=j,se&&(this.$docRowCache.push(oe),this.$screenRowCache.push(ee))}var me="";ce&&oe>=he?(me=this.getFoldDisplayLine(ce,D,A),M=ce.start.row):(me=this.getLine(D).substring(0,A),M=D);var $e=0;if(this.$useWrapMode){var Ee=this.$wrapData[M];if(Ee){for(var Re=0;me.length>=Ee[Re];)ee++,Re++;me=me.substring(Ee[Re-1]||0,me.length),$e=Re>0?Ee.indent:0}}return this.lineWidgets&&this.lineWidgets[oe]&&this.lineWidgets[oe].rowsAbove&&(ee+=this.lineWidgets[oe].rowsAbove),{row:ee,column:$e+this.$getStringScreenWidth(me)[0]}},F.prototype.documentToScreenColumn=function(D,A){return this.documentToScreenPosition(D,A).column},F.prototype.documentToScreenRow=function(D,A){return this.documentToScreenPosition(D,A).row},F.prototype.getScreenLength=function(){var D=0,A=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,M=0,B=0,A=this.$foldData[B++],j=A?A.start.row:1/0;M<_;){var V=this.$wrapData[M];D+=V?V.length+1:1,M++,M>j&&(M=A.end.row+1,A=this.$foldData[B++],j=A?A.start.row:1/0)}else{D=this.getLength();for(var K=this.$foldData,B=0;B<K.length;B++)A=K[B],D-=A.end.row-A.start.row}return this.lineWidgets&&(D+=this.$getWidgetScreenLength()),D},F.prototype.$setFontMetrics=function(D){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,_,M){if(_===0)return[0,0];_||(_=1/0),M=M||0;var B,j;for(j=0;j<A.length&&(B=A.charAt(j),B===" "?M+=this.getScreenTabSize(M):M+=D.getCharacterWidth(B),!(M>_));j++);return[M,j]})},F.prototype.getPrecedingCharacter=function(){var D=this.selection.getCursor();if(D.column===0)return D.row===0?"":this.doc.getNewLineCharacter();var A=this.getLine(D.row);return A[D.column-1]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},F})();x.$uid=0,x.prototype.$modes=c.$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,f.implement(x.prototype,d);var R=1,$=2,k=3,C=4,O=9,N=10,L=11,I=12;function W(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),c.defineOptions(x.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var D=typeof F=="number"?F:null;this.setWrapLimitRange(D,D),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,h){var f=e("./lib/lang"),g=e("./lib/oop"),y=e("./range").Range,c=(function(){function u(){this.$options={}}return u.prototype.set=function(p){return g.mixin(this.$options,p),this},u.prototype.getOptions=function(){return f.copyObject(this.$options)},u.prototype.setOptions=function(p){this.$options=p},u.prototype.find=function(p){var o=this.$options,s=this.$matchIterator(p,o);if(!s)return!1;var m=null;return s.forEach(function(w,x,R,$){return m=new y(w,x,R,$),x==$&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(p){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var s=o.range,m=s?p.getLines(s.start.row,s.end.row):p.doc.getAllLines(),w=[],x=o.re;if(o.$isMultiLine){var R=x.length,$=m.length-R,k;e:for(var C=x.offset||0;C<=$;C++){for(var O=0;O<R;O++)if(m[C+O].search(x[O])==-1)continue e;var N=m[C],L=m[C+R-1],I=N.length-N.match(x[0])[0].length,W=L.match(x[R-1])[0].length;k&&k.end.row===C&&k.end.column>I||(w.push(k=new y(C,I,C+R-1,W)),R>2&&(C=C+R-2))}}else for(var F,D=0;D<m.length;D++)if(this.$isMultilineSearch(o)){var A=m.length-1;if(F=this.$multiLineForward(p,x,D,A),F){var _=F.endRow<=A?F.endRow-1:A;_>D&&(D=_),w.push(new y(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=f.getMatchOffsets(m[D],x);for(var O=0;O<F.length;O++){var M=F[O];w.push(new y(D,M.offset,D,M.offset+M.length))}}if(s){for(var B=s.start.column,j=s.end.column,D=0,O=w.length-1;D<O&&w[D].start.column<B&&w[D].start.row==0;)D++;for(var V=s.end.row-s.start.row;D<O&&w[O].end.column>j&&w[O].end.row==V;)O--;for(w=w.slice(D,O+1),D=0,O=w.length;D<O;D++)w[D].start.row+=s.start.row,w[D].end.row+=s.start.row}return w},u.prototype.parseReplaceString=function(p){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},s="",m=0,w=p.length;m<w;m++){var x=p.charCodeAt(m);if(x===o.Backslash){if(m++,m>=w){s+="\\";break}var R=p.charCodeAt(m);switch(R){case o.Backslash:s+="\\";break;case o.n:s+=`
|
|
202
|
-
`;break;case o.t:s+=" ";break}continue}if(x===o.DollarSign){if(m++,m>=w){s+="$";break}var $=p.charCodeAt(m);if($===o.DollarSign){s+="$$";continue}if($===o.Digit0||$===o.Ampersand){s+="$&";continue}if(o.Digit1<=$&&$<=o.Digit9){s+="$"+p[m];continue}}s+=p[m]}return s||p},u.prototype.replace=function(p,o){var s=this.$options,m=this.$assembleRegExp(s);if(s.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(s);w&&(p=p.replace(/\r\n|\r|\n/g,`
|
|
203
|
-
`));var x=m.exec(p);if(!x||!w&&x[0].length!=p.length)return null;if(o=s.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=p.replace(m,o),s.preserveCase){o=o.split("");for(var R=Math.min(p.length,p.length);R--;){var $=p[R];$&&$.toLowerCase()!=$?o[R]=o[R].toUpperCase():o[R]=o[R].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(p,o){if(p.needle instanceof RegExp)return p.re=p.needle;var s=p.needle;if(!p.needle)return p.re=!1;p.regExp||(s=f.escapeRegExp(s));var m=p.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),p.$supportsUnicodeFlag=!0,m+="u"}catch{p.$supportsUnicodeFlag=!1}if(p.wholeWord&&(s=d(s,p)),p.$isMultiLine=!o&&/[\n\r]/.test(s),p.$isMultiLine)return p.re=this.$assembleMultilineRegExp(s,m);try{var w=new RegExp(s,m)}catch{w=!1}return p.re=w},u.prototype.$assembleMultilineRegExp=function(p,o){for(var s=p.replace(/\r\n|\r|\n/g,`$
|
|
204
|
-
^`).split(`
|
|
205
|
-
`),m=[],w=0;w<s.length;w++)try{m.push(new RegExp(s[w],o))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(p){return p.re&&/\\r\\n|\\r|\\n/.test(p.re.source)&&p.regExp&&!p.$isMultiLine},u.prototype.$multiLineForward=function(p,o,s,m){for(var w,x=l(p,s),R=s;R<=m;){for(var $=0;$<x&&!(R>m);$++){var k=p.getLine(R++);w=w==null?k:w+`
|
|
206
|
-
`+k}var C=o.exec(w);if(o.lastIndex=0,C){var O=w.slice(0,C.index).split(`
|
|
207
|
-
`),N=C[0].split(`
|
|
208
|
-
`),L=s+O.length-1,I=O[O.length-1].length,W=L+N.length-1,F=N.length==1?I+N[0].length:N[N.length-1].length;return{startRow:L,startCol:I,endRow:W,endCol:F}}}return null},u.prototype.$multiLineBackward=function(p,o,s,m,w){for(var x,R=l(p,m),$=p.getLine(m).length-s,k=m;k>=w;){for(var C=0;C<R&&k>=w;C++){var O=p.getLine(k--);x=x==null?O:O+`
|
|
209
|
-
`+x}var N=i(x,o,$);if(N){var L=x.slice(0,N.index).split(`
|
|
210
|
-
`),I=N[0].split(`
|
|
211
|
-
`),W=k+L.length,F=L[L.length-1].length,D=W+I.length-1,A=I.length==1?F+I[0].length:I[I.length-1].length;return{startRow:W,startCol:F,endRow:D,endCol:A}}}return null},u.prototype.$matchIterator=function(p,o){var s=this.$assembleRegExp(o);if(!s)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,x=this.$multiLineBackward,R=o.backwards==!0,$=o.skipCurrent!=!1,k=s.unicode,C=o.range,O=o.start;O||(O=C?C[R?"end":"start"]:p.selection.getRange()),O.start&&(O=O[$!=R?"end":"start"]);var N=C?C.start.row:0,L=C?C.end.row:p.getLength()-1;if(R)var I=function(D){var A=O.row;if(!F(A,O.column,D)){for(A--;A>=N;A--)if(F(A,Number.MAX_VALUE,D))return;if(o.wrap!=!1){for(A=L,N=O.row;A>=N;A--)if(F(A,Number.MAX_VALUE,D))return}}};else var I=function(D){var A=O.row;if(!F(A,O.column,D)){for(A=A+1;A<=L;A++)if(F(A,0,D))return;if(o.wrap!=!1){for(A=N,L=O.row;A<=L;A++)if(F(A,0,D))return}}};if(o.$isMultiLine)var W=s.length,F=function(D,A,_){var M=R?D-W+1:D;if(!(M<0||M+W>p.getLength())){var B=p.getLine(M),j=B.search(s[0]);if(!(!R&&j<A||j===-1)){for(var V=1;V<W;V++)if(B=p.getLine(M+V),B.search(s[V])==-1)return;var K=B.match(s[W-1])[0].length;if(!(R&&K>A)&&_(M,j,M+W-1,K))return!0}}};else if(R)var F=function(D,A,_){if(m){var M=x(p,s,A,D,N);if(!M)return!1;if(_(M.startRow,M.startCol,M.endRow,M.endCol))return!0}else{var B=p.getLine(D),j=[],V,K=0;for(s.lastIndex=0;V=s.exec(B);){var J=V[0].length;if(K=V.index,!J){if(K>=B.length)break;s.lastIndex=K+=f.skipEmptyMatch(B,K,k)}if(V.index+J>A)break;j.push(V.index,J)}for(var oe=j.length-1;oe>=0;oe-=2){var ee=j[oe-1],J=j[oe];if(_(D,ee,D,ee+J))return!0}}};else var F=function(D,A,_){if(s.lastIndex=A,m){var M=w(p,s,D,L);if(M){var B=M.endRow<=L?M.endRow-1:L;B>D&&(D=B)}if(!M)return!1;if(_(M.startRow,M.startCol,M.endRow,M.endCol))return!0}else for(var j=p.getLine(D),V,K;K=s.exec(j);){var J=K[0].length;if(V=K.index,_(D,V,D,V+J))return!0;if(!J&&(s.lastIndex=V+=f.skipEmptyMatch(j,V,k),V>=j.length))return!1}};return{forEach:I}},u})();function d(u,p){var o=f.supportsLookbehind();function s(R,$){$===void 0&&($=!0);var k=o&&p.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(R)||p.regExp?o&&p.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),w=m[0],x=m[m.length-1];return s(w)+u+s(x,!1)}function i(u,p,o){for(var s=null,m=0;m<=u.length;){p.lastIndex=m;var w=p.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-o)break;(!s||x>s.index+s[0].length)&&(s=w),m=w.index+1}return s}function l(u,p){var o=5e3,s={row:p,column:0},m=u.doc.positionToIndex(s),w=m+o,x=u.doc.indexToPosition(w),R=x.row;return R+1}r.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,h){var f=this&&this.__extends||(function(){var u=function(p,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,m){s.__proto__=m}||function(s,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(s[w]=m[w])},u(p,o)};return function(p,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(p,o);function s(){this.constructor=p}p.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}})(),g=e("../lib/keys"),y=e("../lib/useragent"),c=g.KEY_MODS,d=(function(){function u(p,o){this.$init(p,o,!1)}return u.prototype.$init=function(p,o,s){this.platform=o||(y.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=s},u.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},u.prototype.removeCommand=function(p,o){var s=p&&(typeof p=="string"?p:p.name);p=this.commands[s],o||delete this.commands[s];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==p)delete m[w];else if(Array.isArray(x)){var R=x.indexOf(p);R!=-1&&(x.splice(R,1),x.length==1&&(m[w]=x[0]))}}},u.prototype.bindKey=function(p,o,s){if(typeof p=="object"&&p&&(s==null&&(s=p.position),p=p[this.platform]),!!p){if(typeof o=="function")return this.addCommand({exec:o,bindKey:p,name:o.name||p});p.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(k){var C=this.parseKeys(k),O=c[C.hashId]+C.key;w+=(w?" ":"")+O,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var R=this.parseKeys(m),$=c[R.hashId]+R.key;this._addCommandToBinding(w+$,o,s)},this)}},u.prototype._addCommandToBinding=function(p,o,s){var m=this.commandKeyBinding,w;if(!o)delete m[p];else if(!m[p]||this.$singleCommand)m[p]=o;else{Array.isArray(m[p])?(w=m[p].indexOf(o))!=-1&&m[p].splice(w,1):m[p]=[m[p]],typeof s!="number"&&(s=i(o));var x=m[p];for(w=0;w<x.length;w++){var R=x[w],$=i(R);if($>s)break}x.splice(w,0,o)}},u.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(o){var s=p[o];if(s){if(typeof s=="string")return this.bindKey(s,o);typeof s=="function"&&(s={exec:s}),typeof s=="object"&&(s.name||(s.name=o),this.addCommand(s))}},this)},u.prototype.removeCommands=function(p){Object.keys(p).forEach(function(o){this.removeCommand(p[o])},this)},u.prototype.bindKeys=function(p){Object.keys(p).forEach(function(o){this.bindKey(o,p[o])},this)},u.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},u.prototype.parseKeys=function(p){var o=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),s=o.pop(),m=g[s];if(g.FUNCTION_KEYS[m])s=g.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:s.toUpperCase(),hashId:-1}}else return{key:s,hashId:-1};for(var w=0,x=o.length;x--;){var R=g.KEY_MODS[o[x]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+p),!1;w|=R}return{key:s,hashId:w}},u.prototype.findKeyCommand=function(p,o){var s=c[p]+o;return this.commandKeyBinding[s]},u.prototype.handleKeyboard=function(p,o,s,m){if(!(m<0)){var w=c[o]+s,x=this.commandKeyBinding[w];return p.$keyChain&&(p.$keyChain+=" "+w,x=this.commandKeyBinding[p.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||w,{command:"null"}):(p.$keyChain&&((!o||o==4)&&s.length==1?p.$keyChain=p.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(p.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(p,o){return o.$keyChain||""},u})();function i(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var l=(function(u){f(p,u);function p(o,s){var m=u.call(this,o,s)||this;return m.$singleCommand=!0,m}return p})(d);l.call=function(u,p,o){d.prototype.$init.call(u,p,o,!0)},d.call=function(u,p,o){d.prototype.$init.call(u,p,o,!1)},r.HashHandler=l,r.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,h){var f=this&&this.__extends||(function(){var i=function(l,u){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(p[s]=o[s])},i(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");i(l,u);function p(){this.constructor=l}l.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)}})(),g=e("../lib/oop"),y=e("../keyboard/hash_handler").MultiHashHandler,c=e("../lib/event_emitter").EventEmitter,d=(function(i){f(l,i);function l(u,p){var o=i.call(this,p,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),o}return l.prototype.exec=function(u,p,o){if(Array.isArray(u)){for(var s=u.length;s--;)if(this.exec(u[s],p,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:p,command:u,args:o};return this.canExecute(u,p)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},l.prototype.canExecute=function(u,p){return typeof u=="string"&&(u=this.commands[u]),!(!u||p&&p.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(p))},l.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(p){this.macro.push([p.command,p.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,u):this.exec(p[0],u,p[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(u){return u.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},l})(y);g.implement(d.prototype,c),r.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,h){var f=e("../lib/lang"),g=e("../config"),y=e("../range").Range;function c(i,l){return{win:i,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(i){g.loadModule("ace/ext/settings_menu",function(l){l.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(i){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(i){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(i,l){typeof l=="number"&&!isNaN(l)&&i.gotoLine(l),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(i){g.loadModule("ace/ext/searchbox",function(l){l.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(i,l){i.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(i,l){i.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(i,l){i.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(i,l){i.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var l=i.$copyWithEmptySelection&&i.selection.isEmpty(),u=l?i.selection.getLineRange():i.selection.getRange();i._emit("cut",u),u.isEmpty()||i.session.remove(u),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,l){i.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(i){g.loadModule("ace/ext/searchbox",function(l){l.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(i){var l=i.selection.getRange();l.start.column=0,i.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(i){var l=i.selection.getRange();l.end.column=Number.MAX_VALUE,i.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,l){i.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,l){i.insert(f.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var l=i.selection.getRange();l.start.column=l.end.column=0,l.end.row++,i.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(i){for(var l=i.selection.isBackwards(),u=l?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),p=l?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),o=i.session.doc.getLine(u.row).length,s=i.session.doc.getTextRange(i.selection.getRange()),m=s.replace(/\n\s*/," ").length,w=i.session.doc.getLine(u.row),x=u.row+1;x<=p.row+1;x++){var R=f.stringTrimLeft(f.stringTrimRight(i.session.doc.getLine(x)));R.length!==0&&(R=" "+R),w+=R}p.row+1<i.session.doc.getLength()-1&&(w+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new y(u.row,0,p.row+2,0),w),m>0?(i.selection.moveCursorTo(u.row,u.column),i.selection.selectTo(u.row,u.column+m)):(o=i.session.doc.getLine(u.row).length>o?o+1:o,i.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(i){var l=i.session.doc.getLength()-1,u=i.session.doc.getLine(l).length,p=i.selection.rangeList.ranges,o=[];p.length<1&&(p=[i.selection.getRange()]);for(var s=0;s<p.length;s++)s==p.length-1&&(p[s].end.row===l&&p[s].end.column===u||o.push(new y(p[s].end.row,p[s].end.column,l,u))),s===0?p[s].start.row===0&&p[s].start.column===0||o.push(new y(0,0,p[s].start.row,p[s].start.column)):o.push(new y(p[s-1].end.row,p[s-1].end.column,p[s].start.row,p[s].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var s=0;s<o.length;s++)i.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
|
|
212
|
-
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var l=i.getCursorPosition();i.selection.moveTo(l.row-1,Number.MAX_VALUE),i.insert(`
|
|
213
|
-
`),l.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)r.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,h){var f=e("../lib/keys"),g=(function(){function c(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return c.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))},c.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))},c.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===f.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=f.enter)return;d.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(l),p=this.$findNearestAnnotation(l);if(!(u===null&&p===null)){var o=this.$findClosestNumber(u,p,l);if(o===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new y(d,this))}).bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===f.tab){d.preventDefault();return}if(d.keyCode===f.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===f.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===f.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===f.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===f.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===f.enter||d.keyCode===f.space){switch(d.preventDefault(),this.activeLane){case"fold":var i=this.$rowIndexToRow(this.activeRowIndex),l=this.editor.session.$gutterCustomWidgets[i];if(l)l.callbacks&&l.callbacks.onClick&&l.callbacks.onClick(d,i);else if(this.gutterLayer.session.foldWidgets[i]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),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}},c.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()},c.prototype.$isFoldWidgetVisible=function(d){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getFoldWidget(d).style.display!=="none";return i&&l},c.prototype.$isCustomWidgetVisible=function(d){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=!!this.$getCustomWidget(d);return i&&l},c.prototype.$isAnnotationVisible=function(d){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getAnnotation(d).style.display!=="none";return i&&l},c.prototype.$getFoldWidget=function(d){var i=this.lines.get(d),l=i.element;return l.childNodes[1]},c.prototype.$getCustomWidget=function(d){var i=this.lines.get(d),l=i.element;return l.childNodes[3]},c.prototype.$getAnnotation=function(d){var i=this.lines.get(d),l=i.element;return l.childNodes[2]},c.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var i=0;d-i>0||d+i<this.lines.getLength()-1;){if(i++,d-i>=0&&this.$isCustomWidgetVisible(d-i))return d-i;if(d+i<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+i))return d+i;if(d-i>=0&&this.$isFoldWidgetVisible(d-i))return d-i;if(d+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+i))return d+i}return null},c.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var i=0;d-i>0||d+i<this.lines.getLength()-1;){if(i++,d-i>=0&&this.$isAnnotationVisible(d-i))return d-i;if(d+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+i))return d+i}return null},c.prototype.$focusFoldWidget=function(d){if(d!=null){var i=this.$getFoldWidget(d);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$focusCustomWidget=function(d){if(d!=null){var i=this.$getCustomWidget(d);i&&(i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus())}},c.prototype.$focusAnnotation=function(d){if(d!=null){var i=this.$getAnnotation(d);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$blurFoldWidget=function(d){var i=this.$getFoldWidget(d);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$blurCustomWidget=function(d){var i=this.$getCustomWidget(d);i&&(i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur())},c.prototype.$blurAnnotation=function(d){var i=this.$getAnnotation(d);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$findClosestNumber=function(d,i,l){return d===null?i:i===null||Math.abs(l-d)<=Math.abs(l-i)?d:i},c.prototype.$switchLane=function(d){switch(d){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(l===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$isCustomWidgetVisible(l)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},c.prototype.$rowIndexToRow=function(d){var i=this.lines.get(d);return i?i.row:null},c.prototype.$rowToRowIndex=function(d){for(var i=0;i<this.lines.getLength();i++){var l=this.lines.get(i);if(l.row==d)return i}return null},c})();r.GutterKeyboardHandler=g;var y=(function(){function c(d,i){this.gutterKeyboardHandler=i,this.domEvent=d}return c.prototype.getKey=function(){return f.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c})();r.GutterKeyboardEvent=y}),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,h){var f=this&&this.__values||function(A){var _=typeof Symbol=="function"&&Symbol.iterator,M=_&&A[_],B=0;if(M)return M.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&B>=A.length&&(A=void 0),{value:A&&A[B++],done:!A}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},g=e("./lib/oop"),y=e("./lib/dom"),c=e("./lib/lang"),d=e("./lib/useragent"),i=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,p=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,s=e("./search").Search,m=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,$=e("./config"),k=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,O=e("./config").nls,N=e("./clipboard"),L=e("./lib/keys"),I=e("./lib/event"),W=e("./tooltip").HoverTooltip,F=(function(){function A(_,M,B){this.id="editor"+ ++A.$uid,this.session,this.$toDestroy=[];var j=_.getContainerElement();this.container=j,this.renderer=_,this.commands=new x(d.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new i(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new u(this)),this.keyBinding=new p(this),this.$search=new s().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(V,K){K._$emitInputEvent.schedule(31)}),this.setSession(M||B&&B.session||new o("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(_){this.session.startOperation(_)},A.prototype.endOperation=function(_){this.session.endOperation(_)},A.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},A.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var M=this.curOp.command,B=M&&M.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 j=this.selection.getRange(),V=this.renderer.layerConfig;(j.start.row>=V.lastRow||j.end.row<=V.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}},A.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var M=this.prevOp,B=this.$mergeableCommands,j=M.command&&_.command.name==M.command.name;if(_.command.name=="insertstring"){var V=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),j=j&&this.mergeNextCommand&&(!/\s/.test(V)||/\s/.test(M.args)),this.mergeNextCommand=!0}else j=j&&B.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(j=!1),j?this.session.mergeUndoDeltas=!0:B.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(_,M){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var B=this;$.loadModule(["keybinding",_],function(j){B.$keybindingId==_&&B.keyBinding.setKeyboardHandler(j&&j.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),M&&M()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){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=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=_.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(_)),this._signal("changeSession",{session:_,oldSession:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),M&&(M.$editor=null),_&&_._signal("changeEditor",{editor:this}),_&&(_.$editor=this),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(_,M){return this.session.doc.setValue(_),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),_},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(_){this.renderer.onResize(_)},A.prototype.setTheme=function(_,M){this.renderer.setTheme(_,M)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(_,M){this.renderer.setStyle(_,M)},A.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||y.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(_){this.setOption("fontSize",_)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var M=_.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(ce){M.removeMarker(ce)}),M.$bracketHighlight=null);var B=_.getCursorPosition(),j=_.getKeyboardHandler(),V=j&&j.$getDirectionForHighlight&&j.$getDirectionForHighlight(_),K=M.getMatchingBracketRanges(B,V);if(!K){var J=new k(M,B.row,B.column),oe=J.getCurrentToken();if(oe&&/\b(?:tag-open|tag-name)/.test(oe.type)){var ee=M.getMatchingTags(B);ee&&(K=[ee.openTagName.isEmpty()?ee.openTag:ee.openTagName,ee.closeTagName.isEmpty()?ee.closeTag:ee.closeTagName])}}if(!K&&M.$mode.getMatching&&(K=M.$mode.getMatching(_.session)),!K){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var se="ace_bracket";Array.isArray(K)?K.length==1&&(se="ace_error_bracket"):K=[K],K.length==2&&(m.comparePoints(K[0].end,K[1].start)==0?K=[m.fromPoints(K[0].start,K[1].end)]:m.comparePoints(K[0].start,K[1].end)==0&&(K=[m.fromPoints(K[1].start,K[0].end)])),M.$bracketHighlight={ranges:K,markerIds:K.map(function(ce){return M.addMarker(ce,se,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},A.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(_){var M=this.session.$useWrapMode,B=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,B,M),this._signal("change",_),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(_){var M=_.data;this.renderer.updateLines(M.first,M.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),_.$highlightLineMarker&&!M)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&M){var B=new m(M.row,M.column,M.row,1/0);B.id=_.addMarker(B,"ace_active-line","screenLine"),_.$highlightLineMarker=B}else M&&(_.$highlightLineMarker.start.row=M.row,_.$highlightLineMarker.end.row=M.row,_.$highlightLineMarker.start.column=M.column,_._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(_){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),j=this.getSelectionStyle();M.$selectionMarker=M.addMarker(B,"ace_selection",j)}var V=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(V),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var B=M.start.column,j=M.end.column,V=_.getLine(M.start.row),K=V.substring(B,j);if(!(K.length>5e3||!/[\w\d]/.test(K))){var J=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:K}),oe=V.substring(B-1,j+1);if(J.test(oe))return J}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var _=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),B=!1;if(!_&&this.$copyWithEmptySelection){B=!0;for(var j=this.selection.getAllRanges(),V=0;V<j.length;V++){var K=j[V];V&&j[V-1].start.row==K.start.row||(_+=this.session.getLine(K.start.row)+M)}}var J={text:_};return this._signal("copy",J),N.lineMode=B?J.text:!1,J.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(_,M){var B={text:_,event:M};this.commands.exec("paste",this,B)},A.prototype.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var M=_.text,B=M===N.lineMode,j=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?j.insert({row:this.selection.lead.row,column:0},M):this.insert(M);else if(B)this.selection.rangeList.ranges.forEach(function(se){j.insert({row:se.start.row,column:0},M)});else{var V=M.split(/\r\n|\r|\n/),K=this.selection.rangeList.ranges,J=V.length==2&&(!V[0]||!V[1]);if(V.length!=K.length||J)return this.commands.exec("insertstring",this,M);for(var oe=K.length;oe--;){var ee=K[oe];ee.isEmpty()||j.remove(ee),j.insert(ee.start,V[oe])}}},A.prototype.execCommand=function(_,M){return this.commands.exec(_,this,M)},A.prototype.insert=function(_,M){var B=this.session,j=B.getMode(),V=this.getCursorPosition();if(this.getBehavioursEnabled()&&!M){var K=j.transformAction(B.getState(V.row),"insertion",this,B,_);K&&(_!==K.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),_=K.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
|
|
214
|
-
`)==-1){var J=m.fromPoints(V,V);J.end.column+=_.length,this.session.remove(J)}}else{var J=this.getSelectionRange();V=this.session.remove(J),this.clearSelection()}if(_==`
|
|
215
|
-
`||_==`\r
|
|
216
|
-
`){var ce=B.getLine(V.row);if(V.column>ce.search(/\S|$/)){var oe=ce.substr(V.column).search(/\S|$/);B.doc.removeInLine(V.row,V.column,V.column+oe)}}this.clearSelection();var ee=V.column,se=B.getState(V.row),ce=B.getLine(V.row),he=j.checkOutdent(se,ce,_);if(B.insert(V,_),K&&K.selection&&(K.selection.length==2?this.selection.setSelectionRange(new m(V.row,ee+K.selection[0],V.row,ee+K.selection[1])):this.selection.setSelectionRange(new m(V.row+K.selection[0],K.selection[1],V.row+K.selection[2],K.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(_)){var me=j.getNextLineIndent(se,ce.slice(0,V.column),B.getTabString());B.insert({row:V.row+1,column:0},me)}he&&j.autoOutdent(se,B,V.row)}},A.prototype.autoIndent=function(){for(var _=this.session,M=_.getMode(),B=this.selection.isEmpty()?[new m(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),j="",V="",K="",J=_.getTabString(),oe=0;oe<B.length;oe++)for(var ee=B[oe].start.row,se=B[oe].end.row,ce=ee;ce<=se;ce++){ce>0&&(j=_.getState(ce-1),V=_.getLine(ce-1),K=M.getNextLineIndent(j,V,J));var he=_.getLine(ce),me=M.$getIndent(he);if(K!==me){if(me.length>0){var $e=new m(ce,0,ce,me.length);_.remove($e)}K.length>0&&_.insert({row:ce,column:0},K)}M.autoOutdent(j,_,ce)}},A.prototype.onTextInput=function(_,M){if(!M)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,_,M);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},A.prototype.applyComposition=function(_,M){if(M.extendLeft||M.extendRight){var B=this.selection.getRange();B.start.column-=M.extendLeft,B.end.column+=M.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!_&&!B.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),M.restoreStart||M.restoreEnd){var B=this.selection.getRange();B.start.column-=M.restoreStart,B.end.column-=M.restoreEnd,this.selection.setRange(B)}},A.prototype.onCommandKey=function(_,M,B){return this.keyBinding.onCommandKey(_,M,B)},A.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,j=B.getState(M.start.row),V=B.getMode().transformAction(j,"deletion",this,B,M);if(M.end.column===0){var K=B.getTextRange(M);if(K[K.length-1]==`
|
|
217
|
-
`){var J=B.getLine(M.end.row);/^\s+$/.test(J)&&(M.end.column=J.length)}}V&&(M=V)}this.session.remove(M),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
|
|
218
|
-
`),this.moveCursorToPosition(_)},A.prototype.setGhostText=function(_,M){this.renderer.setGhostText(_,M)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),M=_.column;if(M!==0){var B=this.session.getLine(_.row),j,V;M<B.length?(j=B.charAt(M)+B.charAt(M-1),V=new m(_.row,M-1,_.row,M+1)):(j=B.charAt(M-1)+B.charAt(M-2),V=new m(_.row,M-2,_.row,M)),this.session.replace(V,j),this.session.selection.moveToPosition(V.end)}}},A.prototype.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var M=this.getSelectionRange(),B=this.session.getTextRange(M);this.session.replace(M,B.toLowerCase()),this.selection.setSelectionRange(_)},A.prototype.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var M=this.getSelectionRange(),B=this.session.getTextRange(M);this.session.replace(M,B.toUpperCase()),this.selection.setSelectionRange(_)},A.prototype.indent=function(){var _=this.session,M=this.getSelectionRange();if(M.start.row<M.end.row){var B=this.$getSelectedRows();_.indentRows(B.first,B.last," ");return}else if(M.start.column<M.end.column){var j=_.getTextRange(M);if(!/^\s+$/.test(j)){var B=this.$getSelectedRows();_.indentRows(B.first,B.last," ");return}}var V=_.getLine(M.start.row),K=M.start,J=_.getTabSize(),oe=_.documentToScreenColumn(K.row,K.column);if(this.session.getUseSoftTabs())var ee=J-oe%J,se=c.stringRepeat(" ",ee);else{for(var ee=oe%J;V[M.start.column-1]==" "&ⅇ)M.start.column--,ee--;this.selection.setSelectionRange(M),se=" "}return this.insert(se)},A.prototype.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},A.prototype.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},A.prototype.sortLines=function(){for(var _=this.$getSelectedRows(),M=this.session,B=[],j=_.first;j<=_.last;j++)B.push(M.getLine(j));B.sort(function(J,oe){return J.toLowerCase()<oe.toLowerCase()?-1:J.toLowerCase()>oe.toLowerCase()?1:0});for(var V=new m(0,0,0,0),j=_.first;j<=_.last;j++){var K=M.getLine(j);V.start.row=j,V.end.row=j,V.end.column=K.length,M.replace(V,B[j-_.first])}},A.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,M.first,M.last)},A.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),M=this.session.getState(_.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,B,_)},A.prototype.getNumberAt=function(_,M){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var j=this.session.getLine(_);B.lastIndex<M;){var V=B.exec(j);if(V.index<=M&&V.index+V[0].length>=M){var K={value:V[0],start:V.index,end:V.index+V[0].length};return K}}return null},A.prototype.modifyNumber=function(_){var M=this.selection.getCursor().row,B=this.selection.getCursor().column,j=new m(M,B-1,M,B),V=this.session.getTextRange(j);if(!isNaN(parseFloat(V))&&isFinite(V)){var K=this.getNumberAt(M,B);if(K){var J=K.value.indexOf(".")>=0?K.start+K.value.indexOf(".")+1:K.end,oe=K.start+K.value.length-J,ee=parseFloat(K.value);ee*=Math.pow(10,oe),J!==K.end&&B<J?_*=Math.pow(10,K.end-B-1):_*=Math.pow(10,K.end-B),ee+=_,ee/=Math.pow(10,oe);var se=ee.toFixed(oe),ce=new m(M,K.start,M,K.end);this.session.replace(ce,se),this.moveCursorTo(M,Math.max(K.start+1,B+se.length-K.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var _=this.selection.getCursor().row,M=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),j=this.selection.getWordRange().start.column,V=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),K=M-j-1;K<0&&(K=0);var J=0,oe=0,ee=this;B.match(/[A-Za-z0-9_]+/)&&V.forEach(function(Xe,at){oe=J+Xe.length,K>=J&&K<=oe&&(B=Xe,ee.selection.clearSelection(),ee.moveCursorTo(_,J+j),ee.selection.selectTo(_,oe+j)),J=oe});for(var se=this.$toggleWordPairs,ce,he=0;he<se.length;he++)for(var me=se[he],$e=0;$e<=1;$e++){var Ee=+!$e,Re=B.match(new RegExp("^\\s?_?("+c.escapeRegExp(me[$e])+")\\s?$","i"));if(Re){var rt=B.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(Re[1])+")($|\\s)","g"));rt&&(ce=B.replace(new RegExp(c.escapeRegExp(me[$e]),"i"),function(Xe){var at=me[Ee];return Xe.toUpperCase()==Xe?at=at.toUpperCase():Xe.charAt(0).toUpperCase()==Xe.charAt(0)&&(at=at.substr(0,0)+me[Ee].charAt(0).toUpperCase()+at.substr(1)),at}),this.insert(ce),ce="")}}},A.prototype.findLinkAt=function(_,M){var B,j,V=this.session.getLine(_),K=V.split(/((?:https?|ftp):\/\/[\S]+)/),J=M;J<0&&(J=0);var oe=0,ee=0,se;try{for(var ce=f(K),he=ce.next();!he.done;he=ce.next()){var me=he.value;if(ee=oe+me.length,J>=oe&&J<=ee&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){se=me.replace(/[\s:.,'";}\]]+$/,"");break}oe=ee}}catch($e){B={error:$e}}finally{try{he&&!he.done&&(j=ce.return)&&j.call(ce)}finally{if(B)throw B.error}}return se},A.prototype.openLink=function(){var _=this.selection.getCursor(),M=this.findLinkAt(_.row,_.column);return M&&window.open(M,"_blank"),M!=null},A.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var _=this.selection,M=this.session,B=_.getRange(),j=_.isBackwards();if(B.isEmpty()){var V=B.start.row;M.duplicateLines(V,V)}else{var K=j?B.start:B.end,J=M.insert(K,M.getTextRange(B));B.start=K,B.end=J,_.setSelectionRange(B,j)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(_,M,B){return this.session.moveText(_,M,B)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(_,M){var B,j,V=this.selection;if(!V.inMultiSelectMode||this.inVirtualSelectionMode){var K=V.toOrientedRange();B=this.$getSelectedRows(K),j=this.session.$moveLines(B.first,B.last,M?0:_),M&&_==-1&&(j=0),K.moveBy(j,0),V.fromOrientedRange(K)}else{var J=V.rangeList.ranges;V.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var oe=0,ee=0,se=J.length,ce=0;ce<se;ce++){var he=ce;J[ce].moveBy(oe,0),B=this.$getSelectedRows(J[ce]);for(var me=B.first,$e=B.last;++ce<se;){ee&&J[ce].moveBy(ee,0);var Ee=this.$getSelectedRows(J[ce]);if(M&&Ee.first!=$e||!M&&Ee.first>$e+1)break;$e=Ee.last}for(ce--,oe=this.session.$moveLines(me,$e,M?0:_),M&&_==-1&&(he=ce+1);he<=ce;)J[he].moveBy(oe,0),he++;M||(oe=0),ee+=oe}V.fromOrientedRange(V.ranges[0]),V.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},A.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},A.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(_,M){var B=this.renderer,j=this.renderer.layerConfig,V=_*Math.floor(j.height/j.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(V,0)}):M===!1&&(this.selection.moveCursorBy(V,0),this.selection.clearSelection());var K=B.scrollTop;B.scrollBy(0,V*j.lineHeight),M!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(K)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},A.prototype.scrollToLine=function(_,M,B,j){this.renderer.scrollToLine(_,M,B,j)},A.prototype.centerSelection=function(){var _=this.getSelectionRange(),M={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(M,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(_,M){this.selection.moveCursorTo(_,M)},A.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},A.prototype.jumpToMatching=function(_,M){var B=this.getCursorPosition(),j=new k(this.session,B.row,B.column),V=j.getCurrentToken(),K=0;V&&V.type.indexOf("tag-name")!==-1&&(V=j.stepBackward());var J=V||j.stepForward();if(J){var oe,ee=!1,se={},ce=B.column-J.start,he,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(J.value.match(/[{}()\[\]]/g)){for(;ce<J.value.length&&!ee;ce++)if(me[J.value[ce]])switch(he=me[J.value[ce]]+"."+J.type.replace("rparen","lparen"),isNaN(se[he])&&(se[he]=0),J.value[ce]){case"(":case"[":case"{":se[he]++;break;case")":case"]":case"}":se[he]--,se[he]===-1&&(oe="bracket",ee=!0);break}}else J.type.indexOf("tag-name")!==-1&&(isNaN(se[J.value])&&(se[J.value]=0),V.value==="<"&&K>1?se[J.value]++:V.value==="</"&&se[J.value]--,se[J.value]===-1&&(oe="tag",ee=!0));ee||(V=J,K++,J=j.stepForward(),ce=0)}while(J&&!ee);if(oe){var $e,Ee;if(oe==="bracket")$e=this.session.getBracketRange(B),$e||($e=new m(j.getCurrentTokenRow(),j.getCurrentTokenColumn()+ce-1,j.getCurrentTokenRow(),j.getCurrentTokenColumn()+ce-1),Ee=$e.start,(M||Ee.row===B.row&&Math.abs(Ee.column-B.column)<2)&&($e=this.session.getBracketRange(Ee)));else if(oe==="tag"){if(!J||J.type.indexOf("tag-name")===-1)return;if($e=new m(j.getCurrentTokenRow(),j.getCurrentTokenColumn()-2,j.getCurrentTokenRow(),j.getCurrentTokenColumn()-2),$e.compare(B.row,B.column)===0){var Re=this.session.getMatchingTags(B);Re&&(Re.openTag.contains(B.row,B.column)?($e=Re.closeTag,Ee=$e.start):($e=Re.openTag,Re.closeTag.start.row===B.row&&Re.closeTag.start.column===B.column?Ee=$e.end:Ee=$e.start))}Ee=Ee||$e.start}Ee=$e&&$e.cursor||Ee,Ee&&(_?$e&&M?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Ee.row,Ee.column):this.selection.moveTo(Ee.row,Ee.column))}}},A.prototype.gotoLine=function(_,M,B){this.selection.clearSelection(),this.session.unfold({row:_-1,column:M||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,M||0),this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,B)},A.prototype.navigateTo=function(_,M){this.selection.moveTo(_,M)},A.prototype.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var M=this.selection.anchor.getPosition();return this.moveCursorToPosition(M)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},A.prototype.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var M=this.selection.anchor.getPosition();return this.moveCursorToPosition(M)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},A.prototype.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var M=this.getSelectionRange().start;this.moveCursorToPosition(M)}this.clearSelection()},A.prototype.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var M=this.getSelectionRange().end;this.moveCursorToPosition(M)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(_,M){M&&this.$search.set(M);var B=this.$search.find(this.session),j=0;return B&&(this.$tryReplace(B,_)&&(j=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),j},A.prototype.replaceAll=function(_,M){M&&this.$search.set(M);var B=this.$search.findAll(this.session),j=0;if(!B.length)return j;var V=this.getSelectionRange();this.selection.moveTo(0,0);for(var K=B.length-1;K>=0;--K)this.$tryReplace(B[K],_)&&j++;return this.selection.setSelectionRange(V),j},A.prototype.$tryReplace=function(_,M){var B=this.session.getTextRange(_);return M=this.$search.replace(B,M),M!==null?(_.end=this.session.replace(_,M),_):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(_,M,B){M||(M={}),typeof _=="string"||_ instanceof RegExp?M.needle=_:typeof _=="object"&&g.mixin(M,_);var j=this.selection.getRange();M.needle==null&&(_=this.session.getTextRange(j)||this.$search.$options.needle,_||(j=this.session.getWordRange(j.start.row,j.start.column),_=this.session.getTextRange(j)),this.$search.set({needle:_})),this.$search.set(M),M.start||this.$search.set({start:j});var V=this.$search.find(this.session);if(M.preventScroll)return V;if(V)return this.revealRange(V,B),V;M.backwards?j.start=j.end:j.end=j.start,this.selection.setRange(j)},A.prototype.findNext=function(_,M){this.find({skipCurrent:!0,backwards:!1},_,M)},A.prototype.findPrevious=function(_,M){this.find(_,{skipCurrent:!0,backwards:!0},M)},A.prototype.revealRange=function(_,M){this.session.unfold(_),this.selection.setSelectionRange(_);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),M!==!1&&this.renderer.animateScrolling(B)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(_){if(_){var M,B=this,j=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var V=this.$scrollAnchor;V.style.cssText="position:absolute",this.container.insertBefore(V,this.container.firstChild);var K=this.on("changeSelection",function(){j=!0}),J=this.renderer.on("beforeRender",function(){j&&(M=B.renderer.container.getBoundingClientRect())}),oe=this.renderer.on("afterRender",function(){if(j&&M&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ee=B.renderer,se=ee.$cursorLayer.$pixelPos,ce=ee.layerConfig,he=se.top-ce.offset;se.top>=0&&he+M.top<0?j=!0:se.top<ce.height&&se.top+M.top+ce.lineHeight>window.innerHeight?j=!1:j=null,j!=null&&(V.style.top=he+"px",V.style.left=se.left+"px",V.style.height=ce.lineHeight+"px",V.scrollIntoView(j)),j=M=null}});this.setAutoScrollEditorIntoView=function(ee){ee||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",K),this.renderer.off("afterRender",oe),this.renderer.off("beforeRender",J))}}},A.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(_)),M.isBlinking=!this.$readOnly&&_!="wide",y.setCssClass(M.element,"ace_slim-cursors",/slim/.test(_)))},A.prototype.prompt=function(_,M,B){var j=this;$.loadModule("ace/ext/prompt",function(V){V.prompt(j,_,M,B)})},Object.defineProperty(A.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new W(this.container))},set:function(_){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=_},enumerable:!1,configurable:!0}),A})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],g.implement(F.prototype,w),$.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var _=this;if(this.textInput.setReadOnly(A),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var j=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),j=B.key.length==1),!j)return}else B&&B.type!=="exec"&&(j=!0);if(j){var V=y.createElement("div");V.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),_.hoverTooltip.isOpen||_.hoverTooltip.showForRange(_,_.getSelectionRange(),V)}else _.hoverTooltip&&_.hoverTooltip.isOpen&&_.hoverTooltip.hide()});var M=this.textInput.getElement();A?(I.addListener(M,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(M,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){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(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?D.attach(this):D.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var _=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(_&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),y.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),y.addCssClass(this.container,"ace_hasPlaceholder");var M=y.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var _={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(j){j.blur(),j.renderer.scroller.focus()},readOnly:!0},M=function(j){if(j.target==this.renderer.scroller&&j.keyCode===L.enter){j.preventDefault();var V=this.getCursorPosition().row;this.isRowVisible(V)||this.scrollToLine(V,!0,!0),this.focus()}},B;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",O("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.bind(this)),this.commands.addCommand(_),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",O("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",O("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),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",M.bind(this)),this.commands.removeCommand(_),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},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 D={getText:function(A,_){return(Math.abs(A.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function(A,_,M){return Math.max(_.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(A,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,h){var f=e("../lib/dom"),g=(function(){function y(c,d){this.element=c,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return y.prototype.moveContainer=function(c){f.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},y.prototype.pageChanged=function(c,d){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},y.prototype.computeLineTop=function(c,d,i){var l=d.firstRowScreen*d.lineHeight,u=Math.floor(l/this.canvasHeight),p=i.documentToScreenRow(c,0)*d.lineHeight;return p-u*this.canvasHeight},y.prototype.computeLineHeight=function(c,d,i){return d.lineHeight*i.getRowLineCount(c)},y.prototype.getLength=function(){return this.cells.length},y.prototype.get=function(c){return this.cells[c]},y.prototype.shift=function(){this.$cacheCell(this.cells.shift())},y.prototype.pop=function(){this.$cacheCell(this.cells.pop())},y.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var d=f.createFragment(this.element),i=0;i<c.length;i++)d.appendChild(c[i].element);this.element.appendChild(d)}else this.cells.push(c),this.element.appendChild(c.element)},y.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var d=f.createFragment(this.element),i=0;i<c.length;i++)d.appendChild(c[i].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},y.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},y.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},y.prototype.createCell=function(c,d,i,l){var u=this.cellCache.pop();if(!u){var p=f.createElement("div");l&&l(p),this.element.appendChild(p),u={element:p,text:"",row:c}}return u.row=c,u},y})();r.Lines=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,r,h){var f=e("../lib/dom"),g=e("../lib/oop"),y=e("../lib/lang"),c=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,i=e("../config").nls,l=(function(){function p(o){this.$showCursorMarker=null,this.element=f.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new d(this.element),this.$lines.$offsetCoefficient=1}return p.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},p.prototype.addGutterDecoration=function(o,s){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,s)},p.prototype.removeGutterDecoration=function(o,s){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,s)},p.prototype.setAnnotations=function(o){this.$annotations=[];for(var s=0;s<o.length;s++){var m=o[s],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var R=m.text,$=m.text,k=m.type;R=R?y.escapeHTML(R):m.html||"",$=$||m.html||"",x.text.indexOf(R)===-1&&(x.text.push(R),x.type.push(k),x.displayText.push($));var C=m.className;C?x.className=C:k==="error"?x.className=" ace_error":k==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":k==="info"&&!x.className?x.className=" ace_info":k==="hint"&&!x.className&&(x.className=" ace_hint")}},p.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var s=o.start.row,m=o.end.row-s;if(m!==0)if(o.action=="remove")this.$annotations.splice(s,m+1,null);else{var w=new Array(m+1);w.unshift(s,1),this.$annotations.splice.apply(this.$annotations,w)}}},p.prototype.update=function(o){this.config=o;var s=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,s.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=s.getNextFoldLine(m),R=x?x.start.row:1/0,$=null,k=-1,C=m;;){if(C>R&&(C=x.end.row+1,x=s.getNextFoldLine(C,x),R=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}$=this.$lines.get(++k),$?$.row=C:($=this.$lines.createCell(C,o,this.session,u),this.$lines.push($)),this.$renderCell($,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},p.prototype.$updateGutterWidth=function(o){var s=this.session,m=s.gutterRenderer||this.$renderer,w=s.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||s.$useWrapMode)&&(x=s.getLength()+w-1);var R=m?m.getWidth(s,x,o):x.toString().length*o.characterWidth,$=this.$padding||this.$computePadding();R+=$.left+$.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},p.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var s=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<s.length;m++){var w=s[m];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==s[m-1].row)w=s[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},p.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=f.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var s=o.selection.cursor,m=this.config,w=this.$lines,x=m.firstRowScreen*m.lineHeight,R=Math.floor(x/w.canvasHeight),$=o.documentToScreenRow(s)*m.lineHeight,k=$-R*w.canvasHeight;f.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),f.setStyle(this.$highlightElement.style,"top",k+"px")}},p.prototype.scrollLines=function(o){var s=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(s,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!s||w<o.firstRow)return this.update(o);if(m<s.firstRow)return this.update(o);if(s.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();o.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,s.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},p.prototype.$renderLines=function(o,s,m){for(var w=[],x=s,R=this.session.getNextFoldLine(x),$=R?R.start.row:1/0;x>$&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),$=R?R.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,o,this.session,u);this.$renderCell(k,o,R,x),w.push(k),x++}return w},p.prototype.$renderCell=function(o,s,m,w){var x=o.element,R=this.session,$=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],N=C.firstChild,L=R.$firstLineNumber,I=R.$breakpoints,W=R.$decorations,F=R.gutterRenderer||this.$renderer,D=this.$showFoldWidgets&&R.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,_=s.lineHeight+"px",M=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",j=(F?F.getText(R,w):w+L).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=A&&this.$cursorRow<=m.end.row)&&(M+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),I[w]&&(M+=I[w]),W[w]&&(M+=W[w]),this.$annotations[w]&&w!==A&&(M+=this.$annotations[w].className),D){var V=D[w];V==null&&(V=D[w]=R.getFoldWidget(w))}if(V){var K="ace_fold-widget ace_"+V,J=V=="start"&&w==A&&w<m.end.row;if(J){K+=" ace_closed";for(var oe="",ee=!1,se=w+1;se<=m.end.row;se++)if(this.$annotations[se]){if(this.$annotations[se].className===" ace_error"){ee=!0,oe=" ace_error_fold";break}this.$annotations[se].className===" ace_security"?(ee=!0,oe=" ace_security_fold"):this.$annotations[se].className===" ace_warning"&&oe!==" ace_security_fold"&&(ee=!0,oe=" ace_warning_fold")}M+=oe}else K+=" ace_open";k.className!=K&&(k.className=K),f.setStyle(k.style,"height",_),f.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ce=R.getFoldWidgetRange(w);ce?k.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ce.start.row+1,ce.end.row+1])):m?k.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):k.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),J?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else k&&(f.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var he=this.session.$gutterCustomWidgets[w];if(he?this.$addCustomWidget(w,he,o):O&&this.$removeCustomWidget(w,o),ee&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",N.className=B,N.className+=oe,f.setStyle(N.style,"height",_),f.setStyle(C.style,"display","block"),f.setStyle(C.style,"height",_);var me;switch(oe){case" ace_error_fold":me=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[j]);break;case" ace_security_fold":me=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[j]);break;case" ace_warning_fold":me=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[j]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",N.className=B,this.$useSvgGutterIcons?N.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),f.setStyle(N.style,"height",_),f.setStyle(C.style,"display","block"),f.setStyle(C.style,"height",_);var me;switch(this.$annotations[w].className){case" ace_error":me=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[j]);break;case" ace_security":me=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[j]);break;case" ace_warning":me=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[j]);break;case" ace_info":me=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[j]);break;case" ace_hint":me=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[j]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else f.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return j!==$.data&&($.data=j),x.className!=M&&(x.className=M),f.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,s,R)+"px"),f.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,s,R)+"px"),o.text=j,C.style.display==="none"&&k.style.display==="none"&&!he?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},p.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},p.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},p.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},p.prototype.setShowFoldWidgets=function(o){o?f.addCssClass(this.element,"ace_folding-enabled"):f.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},p.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},p.prototype.$hideFoldWidget=function(o,s){var m=s||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&f.setStyle(w.style,"display","none")}},p.prototype.$showFoldWidget=function(o,s){var m=s||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&f.setStyle(w.style,"display","inline-block")}},p.prototype.$getGutterCell=function(o){var s=this.$lines.cells,m=0,w=s.length-1;if(!(o<s[0].row||o>s[w].row)){for(;m<=w;){var x=Math.floor((m+w)/2),R=s[x];if(R.row>o)w=x-1;else if(R.row<o)m=x+1;else return R}return R}},p.prototype.$addCustomWidget=function(o,s,m){var w=s.className,x=s.label,R=s.title,$=s.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:x,title:R,callbacks:$},this.$hideFoldWidget(o,m);var k=m||this.$getGutterCell(o);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=f.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",R),f.setStyle(C.style,"display","inline-block"),f.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(O){$.onClick(O,o),O.stopPropagation()}),k.element.appendChild(C)}},p.prototype.$removeCustomWidget=function(o,s){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,s);var m=s||this.$getGutterCell(o);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},p.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=f.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},p.prototype.getRegion=function(o){var s=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<s.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-s.right)return"foldWidgets"},p})();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,g.implement(l.prototype,c);function u(p){var o=document.createTextNode("");p.appendChild(o);var s=f.createElement("span");p.appendChild(s);var m=f.createElement("span");p.appendChild(m);var w=f.createElement("span");return m.appendChild(w),p}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,h){var f=e("../range").Range,g=e("../lib/dom"),y=(function(){function d(i){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return d.prototype.setPadding=function(i){this.$padding=i},d.prototype.setSession=function(i){this.session=i},d.prototype.setMarkers=function(i){this.markers=i},d.prototype.elt=function(i,l){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=l,u.className=i},d.prototype.update=function(i){if(i){this.config=i,this.i=0;var l;for(var u in this.markers){var p=this.markers[u];if(!p.range){p.update(l,this,this.session,i);continue}var o=p.range.clipRows(i.firstRow,i.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),p.renderer){var s=this.$getTop(o.start.row,i),m=this.$padding+o.start.column*i.characterWidth;p.renderer(l,o,m,s,i)}else p.type=="fullLine"?this.drawFullLineMarker(l,o,p.clazz,i):p.type=="screenLine"?this.drawScreenLineMarker(l,o,p.clazz,i):o.isMultiLine()?p.type=="text"?this.drawTextMarker(l,o,p.clazz,i):this.drawMultiLineMarker(l,o,p.clazz,i):this.drawSingleLineMarker(l,o,p.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(i,l){return(i-l.firstRowScreen)*l.lineHeight},d.prototype.drawTextMarker=function(i,l,u,p,o){for(var s=this.session,m=l.start.row,w=l.end.row,x=m,R=0,$=0,k=s.getScreenLastRowColumn(x),C=new f(x,l.start.column,x,$);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?l.start.column:s.getRowWrapIndent(x),C.end.column=k,R=$,$=k,k=x+1<w?s.getScreenLastRowColumn(x+1):x==w?0:l.end.column,this.drawSingleLineMarker(i,C,u+(x==m?" ace_start":"")+" ace_br"+c(x==m||x==m+1&&l.start.column,R<$,$>k,x==w),p,x==w?0:1,o)},d.prototype.drawMultiLineMarker=function(i,l,u,p,o){var s=this.$padding,m=p.lineHeight,w=this.$getTop(l.start.row,p),x=s+l.start.column*p.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var R=l.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(i,R,u+" ace_br1 ace_start",p,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+s+"px;top:"+w+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var R=l.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(i,R,u+" ace_br12",p,null,o)}else{w=this.$getTop(l.end.row,p);var $=l.end.column*p.characterWidth;this.elt(u+" ace_br12","height:"+m+"px;width:"+$+"px;top:"+w+"px;left:"+s+"px;"+(o||""))}if(m=(l.end.row-l.start.row-1)*p.lineHeight,!(m<=0)){w=this.$getTop(l.start.row+1,p);var k=(l.start.column?1:0)|(l.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+m+"px;right:"+s+"px;top:"+w+"px;left:"+s+"px;"+(o||""))}},d.prototype.drawSingleLineMarker=function(i,l,u,p,o,s){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(i,l,u,p,o,s);var m=p.lineHeight,w=(l.end.column+(o||0)-l.start.column)*p.characterWidth,x=this.$getTop(l.start.row,p),R=this.$padding+l.start.column*p.characterWidth;this.elt(u,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+R+"px;"+(s||""))},d.prototype.drawBidiSingleLineMarker=function(i,l,u,p,o,s){var m=p.lineHeight,w=this.$getTop(l.start.row,p),x=this.$padding,R=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);R.forEach(function($){this.elt(u,"height:"+m+"px;width:"+($.width+(o||0))+"px;top:"+w+"px;left:"+(x+$.left)+"px;"+(s||""))},this)},d.prototype.drawFullLineMarker=function(i,l,u,p,o){var s=this.$getTop(l.start.row,p),m=p.lineHeight;l.start.row!=l.end.row&&(m+=this.$getTop(l.end.row,p)-s),this.elt(u,"height:"+m+"px;top:"+s+"px;left:0;right:0;"+(o||""))},d.prototype.drawScreenLineMarker=function(i,l,u,p,o){var s=this.$getTop(l.start.row,p),m=p.lineHeight;this.elt(u,"height:"+m+"px;top:"+s+"px;left:0;right:0;"+(o||""))},d})();y.prototype.$padding=0;function c(d,i,l,u){return(d?1:0)|(i?2:0)|(l?4:0)|(u?8:0)}r.Marker=y}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,h){var f=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return f.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,h){var f=e("../lib/oop"),g=e("../lib/dom"),y=e("../lib/lang"),c=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,i=e("../config").nls,l=e("./text_util").isTextToken,u=(function(){function p(o){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return p.prototype.$updateEolChar=function(){var o=this.session.doc,s=o.getNewLineCharacter()==`
|
|
219
|
-
`&&o.getNewLineMode()!="windows",m=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},p.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(s){this._signal("changeCharacterSize",s)}).bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},p.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)},p.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},p.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var s=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=y.stringRepeat(this.TAB_CHAR,m),s.push(w)}else s.push(this.dom.createTextNode(y.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?y.stringRepeat(this.SPACE_CHAR,this.tabSize):y.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?y.stringRepeat(this.TAB_CHAR,this.tabSize):$,w=this.dom.createElement("span");w.className=x+R,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+k,w.textContent=C,this.$tabStrings[" "]=w}},p.prototype.updateLines=function(o,s,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(s,o.firstRow),x=Math.min(m,o.lastRow),R=this.element.childNodes,$=0,k=o.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;$++}for(var O=!1,k=w,C=this.session.getNextFoldLine(k),N=C?C.start.row:1/0;k>N&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),N=C?C.start.row:1/0),!(k>x);){var L=R[$++];if(L){this.dom.removeChildren(L),this.$renderLine(L,k,k==N?C:!1),O&&(L.style.top=this.$lines.computeLineTop(k,o,this.session)+"px");var I=o.lineHeight*this.session.getRowLength(k)+"px";L.style.height!=I&&(O=!0,L.style.height=I)}k++}if(O)for(;$<this.$lines.cells.length;){var W=this.$lines.cells[$++];W.element.style.top=this.$lines.computeLineTop(W.row,o,this.session)+"px"}},p.prototype.scrollLines=function(o){var s=this.config;if(this.config=o,this.$lines.pageChanged(s,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=s?s.lastRow:-1;if(!s||w<o.firstRow)return this.update(o);if(m<s.firstRow)return this.update(o);if(!s||s.lastRow<o.firstRow)return this.update(o);if(o.lastRow<s.firstRow)return this.update(o);if(s.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(s.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,s.lastRow);x>0;x--)this.$lines.pop();o.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,s.firstRow-1)),o.lastRow>s.lastRow&&this.$lines.push(this.$renderLinesFragment(o,s.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(o,s,m){for(var w=[],x=s,R=this.session.getNextFoldLine(x),$=R?R.start.row:1/0;x>$&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),$=R?R.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,o,this.session),C=k.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==$?R:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),x++}return w},p.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var s=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,s,m))},p.prototype.$renderToken=function(o,s,m,w){for(var x=this,R=/(\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),k,C=0;k=R.exec(w);){var O=k[1],N=k[2],L=k[3],I=k[4],W=k[5];if(!(!x.showSpaces&&N)){var F=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,F&&$.appendChild(this.dom.createTextNode(F,this.element)),O){var D=x.session.getScreenTabSize(s+k.index),A=x.$tabStrings[D].cloneNode(!0);A.charCount=1,$.appendChild(A),s+=D-1}else if(N)if(x.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=y.stringRepeat(x.SPACE_CHAR,N.length),$.appendChild(_)}else $.appendChild(this.dom.createTextNode(N,this.element));else if(L){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=y.stringRepeat(x.SPACE_CHAR,L.length),$.appendChild(_)}else if(I){s+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",_.textContent=x.showSpaces?x.SPACE_CHAR:I,$.appendChild(_)}else if(W){s+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=W,$.appendChild(_)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),l(m.type))o.appendChild($);else{var M="ace_"+m.type.replace(/\./g," ace_"),_=this.dom.createElement("span");m.type=="fold"&&(_.style.width=m.value.length*this.config.characterWidth+"px",_.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),_.className=M,_.appendChild($),o.appendChild(_)}return s+w.length},p.prototype.renderIndentGuide=function(o,s,m){var w=s.search(this.$indentGuideRe);if(w<=0||w>=m)return s;if(s[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,R=0;R<x;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(w)}else if(s[0]==" "){for(var R=0;R<w;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(w)}return this.$highlightIndentGuide(),s},p.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var s=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(s.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:s.row};var x=this.session.$bracketHighlight;if(x){for(var R=this.session.$bracketHighlight.ranges,$=0;$<R.length;$++)if(s.row!==R[$].start.row){this.$highlightIndentGuideMarker.end=R[$].start.row+1,s.row>R[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[s.row]!==""&&s.column===o[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=s.row+1;$<o.length;$++){var k=o[$],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=$,C<=m))break}}this.$renderHighlightIndentGuide()}}},p.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),s=0;s<o.length;s++)o[s].classList.remove("ace_indent-guide-active")},p.prototype.$setIndentGuideActive=function(o,s){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var x=w.childNodes;if(x){var R=x[s-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},p.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var s=this.$highlightIndentGuideMarker.indentLevel;if(s!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,s)}}else for(var m=o.length-1;m>=0;m--){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,s)}}}},p.prototype.$createLineElement=function(o){var s=this.dom.createElement("div");return s.className="ace_line",s.style.height=this.config.lineHeight+"px",s},p.prototype.$renderWrappedLine=function(o,s,m){var w=0,x=0,R=m[0],$=0,k=this.$createLineElement();o.appendChild(k);for(var C=0;C<s.length;C++){var O=s[C],N=O.value;if(C==0&&this.displayIndentGuides){if(w=N.length,N=this.renderIndentGuide(k,N,R),!N)continue;w-=N.length}if(w+N.length<R)$=this.$renderToken(k,$,O,N),w+=N.length;else{for(;w+N.length>=R;){$=this.$renderToken(k,$,O,N.substring(0,R-w)),N=N.substring(R-w),w=R,k=this.$createLineElement(),o.appendChild(k);var L=this.dom.createTextNode(y.stringRepeat(" ",m.indent),this.element);L.charCount=0,k.appendChild(L),x++,$=0,R=m[x]||Number.MAX_VALUE}N.length!=0&&(w+=N.length,$=this.$renderToken(k,$,O,N))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,$,null,"",!0)},p.prototype.$renderSimpleLine=function(o,s){for(var m=0,w=0;w<s.length;w++){var x=s[w],R=x.value;if(!(w==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(o,R),!R))){if(m+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,x,R);m=this.$renderToken(o,m,x,R)}}},p.prototype.$renderOverflowMessage=function(o,s,m,w,x){m&&this.$renderToken(o,s,m,w.slice(0,this.MAX_LINE_LENGTH-s));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=x?"<hide>":"<click to see more...>",o.appendChild(R)},p.prototype.$renderLine=function(o,s,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(s)),m)var w=this.$getFoldLineTokens(s,m);else var w=this.session.getTokens(s);var x=o;if(w.length){var R=this.session.getRowSplitData(s);if(R&&R.length){this.$renderWrappedLine(o,w,R);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){m&&(s=m.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},p.prototype.$getFoldLineTokens=function(o,s){var m=this.session,w=[];function x($,k,C){for(var O=0,N=0;N+$[O].value.length<k;)if(N+=$[O].value.length,O++,O==$.length)return;if(N!=k){var L=$[O].value.substring(k-N);L.length>C-k&&(L=L.substring(0,C-k)),w.push({type:$[O].type,value:L}),N=k+L.length,O+=1}for(;N<C&&O<$.length;){var L=$[O].value;L.length+N>C?w.push({type:$[O].type,value:L.substring(0,C-N)}):w.push($[O]),N+=L.length,O+=1}}var R=m.getTokens(o);return s.walk(function($,k,C,O,N){$!=null?w.push({type:"fold",value:$}):(N&&(R=m.getTokens(k)),R.length&&x(R,O,C))},s.end.row,this.session.getLine(s.end.row).length),w},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,f.implement(u.prototype,d),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,h){var f=e("../lib/dom"),g=(function(){function y(c){this.element=f.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),f.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return y.prototype.$updateOpacity=function(c){for(var d=this.cursors,i=d.length;i--;)f.setStyle(d[i].style,"opacity",c?"":"0")},y.prototype.$startCssAnimation=function(){for(var c=this.cursors,d=c.length;d--;)c[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&f.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},y.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,f.removeCssClass(this.element,"ace_animate-blinking")},y.prototype.setPadding=function(c){this.$padding=c},y.prototype.setSession=function(c){this.session=c},y.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},y.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},y.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,f.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},y.prototype.addCursor=function(){var c=f.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},y.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},y.prototype.hideCursor=function(){this.isVisible=!1,f.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},y.prototype.showCursor=function(){this.isVisible=!0,f.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},y.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,f.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&f.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),f.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),d()},this.blinkInterval),d()}},y.prototype.getPixelPosition=function(c,d){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(c),l=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,c.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),u=(i.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:u}},y.prototype.isCursorInView=function(c,d){return c.top>=0&&c.top<d.maxHeight},y.prototype.update=function(c){this.config=c;var d=this.session.$selectionMarkers,i=0,l=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var i=0,u=d.length;i<u;i++){var p=this.getPixelPosition(d[i].cursor,!0);if(!((p.top>c.height+c.offset||p.top<0)&&i>1)){var o=this.cursors[l++]||this.addCursor(),s=o.style;this.drawCursor?this.drawCursor(o,p,c,d[i],this.session):this.isCursorInView(p,c)?(f.setStyle(s,"display","block"),f.translate(o,p.left,p.top),f.setStyle(s,"width",Math.round(c.characterWidth)+"px"),f.setStyle(s,"height",c.lineHeight+"px")):f.setStyle(s,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=p,this.restartTimer()},y.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?f.addCssClass(this.element,"ace_overwrite-cursors"):f.removeCssClass(this.element,"ace_overwrite-cursors"))},y.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},y})();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,h){var f=this&&this.__extends||(function(){var o=function(s,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(s,m)};return function(s,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(s,m);function w(){this.constructor=s}s.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),g=e("./lib/oop"),y=e("./lib/dom"),c=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter,i=32768,l=(function(){function o(s,m){this.element=y.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=y.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return o.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},o})();g.implement(l.prototype,d);var u=(function(o){f(s,o);function s(m,w){var x=o.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=y.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return s.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(m){this.element.style.height=m+"px"},s.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>i?(this.coeff=i/m,m=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},s.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},s})(l);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var p=(function(o){f(s,o);function s(m,w){var x=o.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return s.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.setWidth=function(m){this.element.style.width=m+"px"},s.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},s.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},s.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},s})(l);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=p,r.VScrollBar=u,r.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,h){var f=this&&this.__extends||(function(){var p=function(o,s){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(m[x]=w[x])},p(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");p(o,s);function m(){this.constructor=o}o.prototype=s===null?Object.create(s):(m.prototype=s.prototype,new m)}})(),g=e("./lib/oop"),y=e("./lib/dom"),c=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter;y.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 i=(function(){function p(o,s){this.element=y.createElement("div"),this.element.className="ace_sb"+s,this.inner=y.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,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},p})();g.implement(i.prototype,d);var l=(function(p){f(o,p);function o(s,m){var w=p.call(this,s,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=s,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(s,m){if(s==="mousedown"&&!(c.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,R=function(I){x=I.clientY},$=function(){clearInterval(N)},k=m.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var I=w.scrollTopFromThumbTop(C+x-k);I!==w.scrollTop&&w._emit("scroll",{data:I})}};c.capture(this.inner,R,$);var N=setInterval(O,20);return c.preventDefault(m)}var L=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),c.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(s){var m=s*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(s){this.height=Math.max(0,s),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(s,m){this.pageHeight===s&&!m||(this.pageHeight=s,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(s){this.scrollTop=s,s<0&&(s=0),this.thumbTop=s*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(i);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var u=(function(p){f(o,p);function o(s,m){var w=p.call(this,s,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return o.prototype.onMouseDown=function(s,m){if(s==="mousedown"&&!(c.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,R=function(I){x=I.clientX},$=function(){clearInterval(N)},k=m.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var I=w.scrollLeftFromThumbLeft(C+x-k);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};c.capture(this.inner,R,$);var N=setInterval(O,20);return c.preventDefault(m)}var L=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),c.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(s){var m=s*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},o.prototype.setWidth=function(s){this.width=Math.max(0,s),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(s,m){this.pageWidth===s&&!m||(this.pageWidth=s,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(s){this.scrollLeft=s,s<0&&(s=0),this.thumbLeft=s*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(i);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=u,r.VScrollBar=l,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,h){var f=e("./lib/event"),g=(function(){function y(c,d){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var i=this;this._flush=function(l){i.pending=!1;var u=i.changes;if(u&&(f.blockIdle(100),i.changes=0,i.onRender(u)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return y.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(f.nextFrame(this._flush),this.pending=!0)},y.prototype.clear=function(c){var d=this.changes;return this.changes=0,d},y})();r.RenderLoop=g}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,h){var f=e("../lib/oop"),g=e("../lib/dom"),y=e("../lib/lang"),c=e("../lib/event"),d=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,l=512,u=typeof ResizeObserver=="function",p=200,o=(function(){function s(m){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=y.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return s.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",d.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},s.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===m.width&&w.height===m.height,this._emit("changeCharacterSize",{data:m})}},s.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},s.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=c.onIdle(function w(){m.checkForSizeChanges(),c.onIdle(w,500)},500)},s.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},s.prototype.$measureSizes=function(m){var w={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/l};return w.width===0||w.height===0?null:w},s.prototype.$measureCharWidth=function(m){this.$main.textContent=y.stringRepeat(m,l);var w=this.$main.getBoundingClientRect();return w.width/l},s.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},s.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},s.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=g.buildDom([m(0,0),m(p,0),m(0,p),m(p,p)],this.el)},s.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function R(K,J,oe){var ee=K[1]*J[0]-K[0]*J[1];return[(-J[1]*oe[0]+J[0]*oe[1])/ee,(+K[1]*oe[0]-K[0]*oe[1])/ee]}function $(K,J){return[K[0]-J[0],K[1]-J[1]]}function k(K,J){return[K[0]+J[0],K[1]+J[1]]}function C(K,J){return[K*J[0],K*J[1]]}this.els||this.$initTransformMeasureNodes();function O(K){var J=K.getBoundingClientRect();return[J.left,J.top]}var N=O(this.els[0]),L=O(this.els[1]),I=O(this.els[2]),W=O(this.els[3]),F=R($(W,L),$(W,I),$(k(L,I),k(W,N))),D=C(1+F[0],$(L,N)),A=C(1+F[1],$(I,N));if(w){var _=w,M=F[0]*_[0]/p+F[1]*_[1]/p+1,B=k(C(_[0],D),C(_[1],A));return k(C(1/M/p,B),N)}var j=$(m,N),V=R($(D,C(F[0],j)),$(A,C(F[1],j)),j);return C(p,V)},s})();o.prototype.$characterSize={width:0,height:0},f.implement(o.prototype,i),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,h){h.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,h){var f=e("../lib/dom"),g=e("../lib/oop"),y=e("../lib/event_emitter").EventEmitter,c=(function(){function d(i,l){this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(i)}return d.prototype.$createCanvas=function(){this.canvas=f.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(i){this.$createCanvas(),this.scrollbarV=i,i.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(i){if(typeof this.canvas.getContext!="function")return;var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(i);var u=this.canvas.getContext("2d");function p(D,A){return D.priority<A.priority?-1:D.priority>A.priority?1:0}var o=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach(function(D){D.priority=s[D.type]||null}),o=o.sort(p);for(var m=0;m<o.length;m++){var w=o[m].row,x=this.getVerticalOffsetForRow(w),R=x+this.lineHeight,$=Math.round(this.heightRatio*x),k=Math.round(this.heightRatio*R),C=Math.round(($+k)/2),O=k-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var N=C-O,L=C+O,I=L-N;u.fillStyle=l[o[m].type]||null,u.fillRect(0,N,Math.round(this.oneZoneWidth-1),I)}}var W=this.renderer.session.selection.getCursor();if(W){var F=Math.round(this.getVerticalOffsetForRow(W.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,F,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(i){i=i|0;var l=this.renderer.session.documentToScreenRow(i,0)*this.lineHeight;return l},d.prototype.setDimensions=function(i){i=i||this.renderer.layerConfig,this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d})();g.implement(c.prototype,y),r.Decorator=c}),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,h){var f=e("./lib/oop"),g=e("./lib/dom"),y=e("./lib/lang"),c=e("./config"),d=e("./layer/gutter").Gutter,i=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,p=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,s=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),k=e("./layer/decorators").Decorator,C=e("./lib/useragent"),O=e("./layer/text_util").isTextToken;g.importCssString($,"ace_editor.css",!1);var N=(function(){function L(I,W){var F=this;this.container=I||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(W),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var D=this.$textLayer=new l(this.content);this.canvas=D.element,this.$markerFront=new i(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollTop(A.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollLeft(A.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return L.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},L.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},L.prototype.updateLines=function(I,W,F){if(W===void 0&&(W=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<W&&(this.$changedLines.lastRow=W)):this.$changedLines={firstRow:I,lastRow:W},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(I,W,F,D){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var A=this.container;D||(D=A.clientHeight||A.scrollHeight),!D&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",D=A.clientHeight||A.scrollHeight),F||(F=A.clientWidth||A.scrollWidth);var _=this.$updateCachedSize(I,W,F,D);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!D)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(_|this.$changes,!0):this.$loop.schedule(_|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(I,W,F,D){D-=this.$extraHeight||0;var A=0,_=this.$size,M={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};if(D&&(I||_.height!=D)&&(_.height=D,A|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(_.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),F&&(I||_.width!=F)){A|=this.CHANGE_SIZE,_.width=F,W==null&&(W=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=W,g.setStyle(this.scrollBarH.element.style,"left",W+"px"),g.setStyle(this.scroller.style,"left",W+this.margin.left+"px"),_.scrollerWidth=Math.max(0,F-W-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",B),g.setStyle(this.scroller.style,"right",B),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(_.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(A|=this.CHANGE_FULL)}return _.$dirty=!F||!D,A&&this._signal("resize",M),A},L.prototype.onGutterResize=function(I){var W=this.$showGutter?I: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()},L.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,W=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(W,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},L.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},L.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=g.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,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()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,W=this.$composition;if(!this.$keepTextAreaAtCursor&&!W){g.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){W&&W.markerRange&&(F=this.$cursorLayer.getPixelPosition(W.markerRange.start,!0));var D=this.layerConfig,A=F.top,_=F.left;A-=D.offset;var M=W&&W.useTextareaForIME||C.isMobile?this.lineHeight:1;if(A<0||A>D.height-M){g.translate(this.textarea,0,0);return}var B=1,j=this.$size.height-M;if(!W)A+=this.lineHeight;else if(W.useTextareaForIME){var V=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(V)[0]}else A+=this.lineHeight+2;_-=this.scrollLeft,_>this.$size.scrollerWidth-B&&(_=this.$size.scrollerWidth-B),_+=this.gutterWidth+this.margin.left,g.setStyle(I,"height",M+"px"),g.setStyle(I,"width",B+"px"),g.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-B),Math.min(A,j))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,W=I.lastRow,F=this.session.documentToScreenRow(W,0)*I.lineHeight;return F-this.session.getScrollTop()>I.height-I.lineHeight?W-1:W},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},L.prototype.setScrollMargin=function(I,W,F,D){var A=this.scrollMargin;A.top=I|0,A.bottom=W|0,A.right=D|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},L.prototype.setMargin=function(I,W,F,D){var A=this.margin;A.top=I|0,A.bottom=W|0,A.right=D|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},L.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,W=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(W-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-W&&(I=this.scrollTop+W,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.prototype.$renderChanges=function(I,W){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!W){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var D=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;D>0&&(this.scrollTop=D,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-F.offset);var A=F.width+2*this.$padding+"px",_=F.minHeight+"px";g.setStyle(this.content.style,"width",A),g.setStyle(this.content.style,"height",_)}if(I&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",I)},L.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,W=this.$maxLines*this.lineHeight,F=Math.min(W,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var D=F<=2*this.lineHeight,A=!D&&I>W;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var _=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,_,F),this.desiredHeight=F,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var I=this.session,W=this.$size,F=W.height<=2*this.lineHeight,D=this.session.getScreenLength(),A=D*this.lineHeight,_=this.$getLongestLine(),M=!F&&(this.$hScrollBarAlwaysVisible||W.scrollerWidth-_-2*this.$padding<0),B=this.$horizScroll!==M;B&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var j=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=W.height<=2*this.lineHeight);var V=W.scrollerHeight+this.lineHeight,K=!this.$maxLines&&this.$scrollPastEnd?(W.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=K;var J=this.scrollMargin;this.session.setScrollTop(Math.max(-J.top,Math.min(this.scrollTop,A-W.scrollerHeight+J.bottom))),this.session.setScrollLeft(Math.max(-J.left,Math.min(this.scrollLeft,_+2*this.$padding-W.scrollerWidth+J.right)));var oe=!F&&(this.$vScrollBarAlwaysVisible||W.scrollerHeight-A+K<0||this.scrollTop>J.top),ee=j!==oe;ee&&(this.$vScroll=oe,this.scrollBarV.setVisible(oe));var se=this.scrollTop%this.lineHeight,ce=Math.ceil(V/this.lineHeight)-1,he=Math.max(0,Math.round((this.scrollTop-se)/this.lineHeight)),me=he+ce,$e,Ee,Re=this.lineHeight;he=I.screenToDocumentRow(he,0);var rt=I.getFoldLine(he);rt&&(he=rt.start.row),$e=I.documentToScreenRow(he,0),Ee=I.getRowLength(he)*Re,me=Math.min(I.screenToDocumentRow(me,0),I.getLength()-1),V=W.scrollerHeight+I.getRowLength(me)*Re+Ee,se=this.scrollTop-$e*Re,se<0&&$e>0&&($e=Math.max(0,$e+Math.floor(se/Re)),se=this.scrollTop-$e*Re);var Xe=0;return(this.layerConfig.width!=_||B)&&(Xe=this.CHANGE_H_SCROLL),(B||ee)&&(Xe|=this.$updateCachedSize(!0,this.gutterWidth,W.width,W.height),this._signal("scrollbarVisibilityChanged"),ee&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:he,firstRowScreen:$e,lastRow:me,lineHeight:Re,characterWidth:this.characterWidth,minHeight:V,maxHeight:A,offset:se,gutterOffset:Re?Math.max(0,Math.ceil((se+W.height-W.scrollerHeight)/Re)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(_-this.$padding),Xe},L.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,W=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(I>F.lastRow+1)&&!(W<F.firstRow)){if(W===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,I,W),!0}}},L.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(I,W){this.$gutterLayer.addGutterDecoration(I,W)},L.prototype.removeGutterDecoration=function(I,W){this.$gutterLayer.removeGutterDecoration(I,W)},L.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(I,W,F){this.scrollCursorIntoView(I,F),this.scrollCursorIntoView(W,F)},L.prototype.scrollCursorIntoView=function(I,W,F){if(this.$size.scrollerHeight!==0){var D=this.$cursorLayer.getPixelPosition(I),A=D.left,_=D.top,M=F&&F.top||0,B=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var j=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;j+M>_?(W&&j+M>_+this.lineHeight&&(_-=W*this.$size.scrollerHeight),_===0&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):j+this.$size.scrollerHeight-B<_+this.lineHeight&&(W&&j+this.$size.scrollerHeight-B<_-this.lineHeight&&(_+=W*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight+B-this.$size.scrollerHeight));var V=this.scrollLeft,K=2*this.layerConfig.characterWidth;A-K<V?(A-=K,A<this.$padding+K&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=K,V+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):V<=this.$padding&&A-V<this.characterWidth&&this.session.setScrollLeft(0))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},L.prototype.alignCursor=function(I,W){typeof I=="number"&&(I={row:I,column:0});var F=this.$cursorLayer.getPixelPosition(I),D=this.$size.scrollerHeight-this.lineHeight,A=F.top-D*(W||0);return this.session.setScrollTop(A),A},L.prototype.$calcSteps=function(I,W){var F=0,D=this.STEPS,A=[],_=function(M,B,j){return j*(Math.pow(M-1,3)+1)+B};for(F=0;F<D;++F)A.push(_(F/this.STEPS,I,W-I));return A},L.prototype.scrollToLine=function(I,W,F,D){var A=this.$cursorLayer.getPixelPosition({row:I,column:0}),_=A.top;W&&(_-=this.$size.scrollerHeight/2);var M=this.scrollTop;this.session.setScrollTop(_),F!==!1&&this.animateScrolling(M,D)},L.prototype.animateScrolling=function(I,W){var F=this.scrollTop;if(!this.$animatedScroll)return;var D=this;if(I==F)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(I=A[0],I==F))return}var _=D.$calcSteps(I,F);this.$scrollAnimation={from:I,to:F,steps:_},clearInterval(this.$timer),D.session.setScrollTop(_.shift()),D.session.$scrollTop=F;function M(){D.$timer=clearInterval(D.$timer),D.$scrollAnimation=null,D.$stopAnimation=!1,W&&W()}this.$timer=setInterval(function(){if(D.$stopAnimation){M();return}if(!D.session)return clearInterval(D.$timer);_.length?(D.session.setScrollTop(_.shift()),D.session.$scrollTop=F):F!=null?(D.session.$scrollTop=-1,D.session.setScrollTop(F),F=null):M()},10)},L.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},L.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(I,W){this.session.setScrollTop(W),this.session.setScrollLeft(I)},L.prototype.scrollBy=function(I,W){W&&this.session.setScrollTop(this.session.getScrollTop()+W),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},L.prototype.isScrollableBy=function(I,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||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},L.prototype.pixelToScreenCoordinates=function(I,W){var F;if(this.$hasCssTransforms){F={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([I,W]);I=D[1]-this.gutterWidth-this.margin.left,W=D[0]}else F=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-F.left-this.$padding,_=A/this.characterWidth,M=Math.floor((W+this.scrollTop-F.top)/this.lineHeight),B=this.$blockCursor?Math.floor(_):Math.round(_);return{row:M,column:B,side:_-B>0?1:-1,offsetX:A}},L.prototype.screenToTextCoordinates=function(I,W){var F;if(this.$hasCssTransforms){F={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([I,W]);I=D[1]-this.gutterWidth-this.margin.left,W=D[0]}else F=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-F.left-this.$padding,_=A/this.characterWidth,M=this.$blockCursor?Math.floor(_):Math.round(_),B=Math.floor((W+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(M,0),A)},L.prototype.textToScreenCoordinates=function(I,W){var F=this.scroller.getBoundingClientRect(),D=this.session.documentToScreenPosition(I,W),A=this.$padding+(this.session.$bidiHandler.isBidiRow(D.row,I)?this.session.$bidiHandler.getPosLeft(D.column):Math.round(D.column*this.characterWidth)),_=D.row*this.lineHeight;return{pageX:F.left+A-this.scrollLeft,pageY:F.top+_-this.scrollTop}},L.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},L.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},L.prototype.setCompositionText=function(I){var W=this.session.selection.cursor;this.addToken(I,"composition_placeholder",W.row,W.column),this.$moveTextAreaToCursor()},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},L.prototype.setGhostText=function(I,W){var F=this.session.selection.cursor,D=W||{row:F.row,column:F.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(I,D);this.addToken(A[0].text,"ghost_text",D.row,D.column),this.$ghostText={text:I,position:{row:D.row,column:D.column}};var _=g.createElement("div");if(A.length>1){var M=this.hideTokensAfterPosition(D.row,D.column),B;A.slice(1).forEach(function(ee){var se=g.createElement("div"),ce=g.createElement("span");ce.className="ace_ghost_text",ee.wrapped&&(se.className="ghost_text_line_wrapped"),ee.text.length===0&&(ee.text=" "),ce.appendChild(g.createTextNode(ee.text)),se.appendChild(ce),_.appendChild(se),B=se}),M.forEach(function(ee){var se=g.createElement("span");O(ee.type)||(se.className="ace_"+ee.type.replace(/\./g," ace_")),se.appendChild(g.createTextNode(ee.value)),B.appendChild(se)}),this.$ghostTextWidget={el:_,row:D.row,column:D.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var j=this.$cursorLayer.getPixelPosition(D,!0),V=this.container,K=V.getBoundingClientRect().height,J=A.length*this.lineHeight,oe=J<K-j.top;if(oe)return;J<K?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(D.row)}},L.prototype.$calculateWrappedTextChunks=function(I,W){var F=this.$size.scrollerWidth-this.$padding*2,D=Math.floor(F/this.characterWidth)-2;D=D<=0?60:D;for(var A=I.split(/\r?\n/),_=[],M=0;M<A.length;M++){var B=this.session.$getDisplayTokens(A[M],W.column),j=this.session.$computeWrapSplits(B,D,this.session.$tabSize);if(j.length>0){var V=0;j.push(A[M].length);for(var K=0;K<j.length;K++){var J=A[M].slice(V,j[K]);_.push({text:J,wrapped:!0}),V=j[K]}}else _.push({text:A[M],wrapped:!1})}return _},L.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},L.prototype.addToken=function(I,W,F,D){var A=this.session;A.bgTokenizer.lines[F]=null;var _={type:W,value:I},M=A.getTokens(F);if(D==null||!M.length)M.push(_);else for(var B=0,j=0;j<M.length;j++){var V=M[j];if(B+=V.value.length,D<=B){var K=V.value.length-(B-D),J=V.value.slice(0,K),oe=V.value.slice(K);M.splice(j,1,{type:V.type,value:J},_,{type:V.type,value:oe});break}}this.updateLines(F,F)},L.prototype.hideTokensAfterPosition=function(I,W){for(var F=this.session.getTokens(I),D=0,A=!1,_=[],M=0;M<F.length;M++){var B=F[M];if(D+=B.value.length,B.type!=="ghost_text"){if(A){_.push({type:B.type,value:B.value}),B.type="hidden_token";continue}D===W&&(A=!0)}}return this.updateLines(I,I),_},L.prototype.removeExtraToken=function(I,W){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},L.prototype.setTheme=function(I,W){var F=this;if(this.$themeId=I,F._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var D=I||this.$options.theme.initialValue;c.loadModule(["theme",D],A)}else A(I);function A(_){if(F.$themeId!=I)return W&&W();if(!_||!_.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");_.$id&&(F.$themeId=_.$id),g.importCssString(_.cssText,_.cssClass,F.container),F.theme&&g.removeCssClass(F.container,F.theme.cssClass);var M="padding"in _?_.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&M!=F.$padding&&F.setPadding(M),F.$gutterLayer){var B=_.$showGutterCursorMarker;B&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!B&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=_.cssClass,F.theme=_,g.addCssClass(F.container,_.cssClass),g.setCssClass(F.container,"ace_dark",_.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:_}),W&&W(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(I,W){g.setCssClass(this.container,I,W!==!1)},L.prototype.unsetStyle=function(I){g.removeCssClass(this.container,I)},L.prototype.setCursorStyle=function(I){g.setStyle(this.scroller.style,"cursor",I)},L.prototype.setMouseCursor=function(I){g.setStyle(this.scroller.style,"cursor",I)},L.prototype.attachToShadowRoot=function(){g.importCssString($,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(I){var W=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollTop(F.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollLeft(F.data-W.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollTop(F.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollLeft(F.data-W.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=y.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(W){var F=W[0].contentRect.width,D=W[0].contentRect.height;Math.abs(I.$size.width-F)>1||Math.abs(I.$size.height-D)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L})();N.prototype.CHANGE_CURSOR=1,N.prototype.CHANGE_MARKER=2,N.prototype.CHANGE_GUTTER=4,N.prototype.CHANGE_SCROLL=8,N.prototype.CHANGE_LINES=16,N.prototype.CHANGE_TEXT=32,N.prototype.CHANGE_SIZE=64,N.prototype.CHANGE_MARKER_BACK=128,N.prototype.CHANGE_MARKER_FRONT=256,N.prototype.CHANGE_FULL=512,N.prototype.CHANGE_H_SCROLL=1024,N.prototype.$changes=0,N.prototype.$padding=null,N.prototype.$frozen=!1,N.prototype.STEPS=8,f.implement(N.prototype,R),c.defineOptions(N.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=N}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,h){var f=e("../lib/oop"),g=e("../lib/net"),y=e("../lib/event_emitter").EventEmitter,c=e("../config");function d(p){var o="importScripts('"+g.qualifyURL(p)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new s;return m.append(o),m.getBlob("application/javascript")}}function i(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var o=d(p),s=window.URL||window.webkitURL,m=s.createObjectURL(o);return new Worker(m)}return new Worker(p)}var l=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){f.implement(this,y),this.$createWorkerFromOldConfig=function(p,o,s,m,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),c.get("packaged")||!e.toUrl)m=m||c.moduleUrl(o,"worker");else{var x=this.$normalizePath;m=m||x(e.toUrl("ace/worker/worker.js",null,"_"));var R={};p.forEach(function($){R[$]=x(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:R,module:o,classname:s}),this.$worker},this.onMessage=function(p){var o=p.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var s=this.callbacks[o.id];s&&(s(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return g.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,o){this.$worker.postMessage({command:p,args:o})},this.call=function(p,o,s){if(s){var m=this.callbackId++;this.callbacks[m]=s,o.push(m)}this.send(p,o)},this.emit=function(p,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:p,data:{data:o.data}})}catch(s){console.error(s.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(l.prototype);var u=function(p,o,s){var m=null,w=!1,x=Object.create(y),R=[],$=new l({messageBuffer:R,terminate:function(){},postMessage:function(C){R.push(C),m&&(w?setTimeout(k):k())}});$.setEmitSync=function(C){w=C};var k=function(){var C=R.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,O){this.postMessage({type:"call",id:O,data:C})},x.emit=function(C,O){this.postMessage({type:"event",name:C,data:O})},c.loadModule(["worker",o],function(C){for(m=new C[s](x);R.length;)k()}),$};r.UIWorkerClient=u,r.WorkerClient=l,r.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,h){var f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,y=e("./lib/oop"),c=(function(){function d(i,l,u,p,o,s){var m=this;this.length=l,this.session=i,this.doc=i.getDocument(),this.mainClass=o,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var w=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var i=this,l=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=u.addMarker(new f(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var s=l.createAnchor(o.row,o.column);s.$insertRight=!0,s.detach(),i.others.push(s)}),u.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,l=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=i.addMarker(new f(u.row,u.column,u.row,u.column+l.length),l.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},d.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var l=i;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var u=i.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,p=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,o=l.start.column-this.pos.column;if(this.updateAnchors(i),p&&(this.length+=u),p&&!this.session.$fromUndo){if(i.action==="insert")for(var s=this.others.length-1;s>=0;s--){var m=this.others[s],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,i.lines)}else if(i.action==="remove")for(var s=this.others.length-1;s>=0;s--){var m=this.others[s],w={row:m.row,column:m.column+o};this.doc.remove(new f(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var l=this.others.length;l--;)this.others[l].onChange(i);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var i=this,l=this.session,u=function(o,s){l.removeMarker(o.markerId),o.markerId=l.addMarker(new f(o.row,o.column,o.row,o.column+i.length),s,null,!1)};u(this.pos,this.mainClass);for(var p=this.others.length;p--;)u(this.others[p],this.othersClass)}},d.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},d.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),l=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,u=0;u<l;u++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d})();y.implement(c.prototype,g),r.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,h){var f=e("../lib/event"),g=e("../lib/useragent");function y(d,i){return d.row==i.row&&d.column==i.column}function c(d){var i=d.domEvent,l=i.altKey,u=i.shiftKey,p=i.ctrlKey,o=d.getAccelKey(),s=d.getButton();if(p&&g.isMac&&(s=i.button),d.editor.inMultiSelectMode&&s==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!p&&!l&&!o){s===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(s===0){var m=d.editor,w=m.selection,x=m.inMultiSelectMode,R=d.getDocumentPosition(),$=w.getCursor(),k=d.inSelection()||w.isEmpty()&&y(R,$),C=d.x,O=d.y,N=function(J){C=J.clientX,O=J.clientY},L=m.session,I=m.renderer.pixelToScreenCoordinates(C,O),W=I,F;if(m.$mouseHandler.$enableJumpToDef)p&&l||o&&l?F=u?"block":"add":l&&m.$blockSelectEnabled&&(F="block");else if(o&&!l){if(F="add",!x&&u)return}else l&&m.$blockSelectEnabled&&(F="block");if(F&&g.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&k)return;if(!x){var D=w.toOrientedRange();m.addSelectionMarker(D)}var A=w.rangeList.rangeAtPoint(R);m.inVirtualSelectionMode=!0,u&&(A=null,D=w.ranges[0]||D,m.removeSelectionMarker(D)),m.once("mouseup",function(){var J=w.toOrientedRange();A&&J.isEmpty()&&y(A.cursor,J.cursor)?w.substractPoint(J.cursor):(u?w.substractPoint(D.cursor):D&&(m.removeSelectionMarker(D),w.addRange(D)),w.addRange(J)),m.inVirtualSelectionMode=!1})}else if(F=="block"){d.stop(),m.inVirtualSelectionMode=!0;var _,M=[],B=function(){var J=m.renderer.pixelToScreenCoordinates(C,O),oe=L.screenToDocumentPosition(J.row,J.column,J.offsetX);y(W,J)&&y(oe,w.lead)||(W=J,m.selection.moveToPosition(oe),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(M),M=w.rectangularRangeBlock(W,I),m.$mouseHandler.$clickSelection&&M.length==1&&M[0].isEmpty()&&(M[0]=m.$mouseHandler.$clickSelection.clone()),M.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!o?w.toSingleRange():!x&&o&&(_=w.toOrientedRange(),m.addSelectionMarker(_)),u?I=L.documentToScreenPosition(w.lead):w.moveToPosition(R),W={row:-1,column:-1};var j=function(J){B(),clearInterval(K),m.removeSelectionMarkers(M),M.length||(M=[w.toOrientedRange()]),_&&(m.removeSelectionMarker(_),w.toSingleRange(_));for(var oe=0;oe<M.length;oe++)w.addRange(M[oe]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},V=B;f.capture(m.container,N,j);var K=setInterval(function(){V()},20);return d.preventDefault()}}}r.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,h){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(g){g.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(g){g.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var f=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new f(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,h){var f=e("./range_list").RangeList,g=e("./range").Range,y=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),i=e("./lib/lang"),l=e("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=e("./search").Search,p=new u;function o($,k,C){return p.$options.wrap=!0,p.$options.needle=k,p.$options.backwards=C==-1,p.find($)}var s=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,k){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(),k||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var O=this.rangeList.add($);return this.$onAddRange($),O.length&&this.$onRemoveRange(O),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),$&&this.fromOrientedRange($)},this.substractPoint=function($){var k=this.rangeList.substractPoint($);if(k)return this.$onRemoveRange(k),k[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 k=this.rangeList.ranges.pop();$.push(k),this.rangeCount=0}for(var C=$.length;C--;){var O=this.ranges.indexOf($[C]);this.ranges.splice(O,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new f,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<$.length;C++){var O=$[C],N=O.start.row,L=O.end.row;if(N===L)k.push(O.clone());else{for(k.push(new g(N,O.start.column,N,this.session.getLine(N).length));++N<L;)k.push(this.getLineRange(N,!0));k.push(new g(L,0,L,O.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var $=this.rangeList.ranges,k=$[$.length-1],C=g.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,k=$[$.length-1],C=g.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var O=this.session.documentToScreenPosition(this.cursor),N=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(O,N);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,k,C){var O=[],N=$.column<k.column;if(N)var L=$.column,I=k.column,W=$.offsetX,F=k.offsetX;else var L=k.column,I=$.column,W=k.offsetX,F=$.offsetX;var D=$.row<k.row;if(D)var A=$.row,_=k.row;else var A=k.row,_=$.row;L<0&&(L=0),A<0&&(A=0),A==_&&(C=!0);for(var M,B=A;B<=_;B++){var j=g.fromPoints(this.session.screenToDocumentPosition(B,L,W),this.session.screenToDocumentPosition(B,I,F));if(j.isEmpty()){if(M&&w(j.end,M))break;M=j.end}j.cursor=N?j.start:j.end,O.push(j)}if(D&&O.reverse(),!C){for(var V=O.length-1;O[V].isEmpty()&&V>0;)V--;if(V>0)for(var K=0;O[K].isEmpty();)K++;for(var J=V;J>=K;J--)O[J].isEmpty()&&O.splice(J,1)}return O}}).call(y.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var k=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",k),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var k=this.session.$selectionMarkers.indexOf($);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var k=this.session.$selectionMarkers,C=$.length;C--;){var O=$[C];if(O.marker){this.session.removeMarker(O.marker);var N=k.indexOf(O);N!=-1&&k.splice(N,1)}}this.session.selectionMarkerCount=k.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(l.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(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var k=$.command,C=$.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?O=C.forEachSelection(k,$.args):k.multiSelectAction=="forEachLine"?O=C.forEachSelection(k,$.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=k.exec(C,$.args||{})):O=k.multiSelectAction(C,$.args||{});else{var O=k.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function($,k,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,N=C==!0||C&&C.$byLines,L=this.session,I=this.selection,W=I.rangeList,F=(O?I:W).ranges,D;if(!F.length)return $.exec?$.exec(this,k||{}):$(this,k||{});var A=I._eventRegistry;I._eventRegistry={};var _=new y(L);this.inVirtualSelectionMode=!0;for(var M=F.length;M--;){if(N)for(;M>0&&F[M].start.row==F[M-1].end.row;)M--;_.fromOrientedRange(F[M]),_.index=M,this.selection=L.selection=_;var B=$.exec?$.exec(this,k||{}):$(this,k||{});!D&&B!==void 0&&(D=B),_.toOrientedRange(F[M])}_.detach(),this.selection=L.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=A,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var j=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),j&&j.from==j.to&&this.renderer.animateScrolling(j.from),D}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],O=0;O<k.length;O++)C.push(this.session.getTextRange(k[O]));var N=this.session.getDocument().getNewLineCharacter();$=C.join(N),$.length==(C.length-1)*N.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var O=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=k.row||this.session.$clipPositionToDocument(O.row,O.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,k,C){if(k=k||{},k.needle=$||k.needle,k.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(O)}this.$search.set(k);var N=this.$search.findAll(this.session);if(!N.length)return 0;var L=this.multiSelect;C||L.toSingleRange(N[0]);for(var I=N.length;I--;)L.addRange(N[I],!0);return O&&L.rangeList.rangeAtPoint(O.start)&&L.addRange(O,!0),N.length},this.selectMoreLines=function($,k){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,N=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(N.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(N.row+$,N.column);if(C.isEmpty())var W=L;else var I=this.session.documentToScreenPosition(O?C.end:C.start),W=this.session.screenToDocumentPosition(I.row+$,I.column);if(O){var F=g.fromPoints(L,W);F.cursor=F.start}else{var F=g.fromPoints(W,L);F.cursor=F.end}if(F.desiredColumn=N.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var D=C.cursor;this.selection.addRange(F),D&&this.selection.substractPoint(D)},this.transposeSelections=function($){for(var k=this.session,C=k.multiSelect,O=C.ranges,N=O.length;N--;){var L=O[N];if(L.isEmpty()){var I=k.getWordRange(L.start.row,L.start.column);L.start.row=I.start.row,L.start.column=I.start.column,L.end.row=I.end.row,L.end.column=I.end.column}}C.mergeOverlappingRanges();for(var W=[],N=O.length;N--;){var L=O[N];W.unshift(k.getTextRange(L))}$<0?W.unshift(W.pop()):W.push(W.shift());for(var N=O.length;N--;){var L=O[N],F=L.clone();k.replace(L,W[N]),L.start.row=F.start.row,L.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,k,C){var O=this.session,N=O.multiSelect,L=N.toOrientedRange();if(!(L.isEmpty()&&(L=O.getWordRange(L.start.row,L.start.column),L.cursor=$==-1?L.start:L.end,this.multiSelect.addRange(L),C))){var I=O.getTextRange(L),W=o(O,I,$);W&&(W.cursor=$==-1?W.start:W.end,this.session.unfold(W),this.multiSelect.addRange(W),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(L.cursor)}},this.alignCursors=function(){var $=this.session,k=$.multiSelect,C=k.ranges,O=-1,N=C.filter(function(V){if(V.cursor.row==O)return!0;O=V.cursor.row});if(!C.length||N.length==C.length-1){var L=this.selection.getRange(),I=L.start.row,W=L.end.row,F=I==W;if(F){var D=this.session.getLength(),A;do A=this.session.getLine(W);while(/[=:]/.test(A)&&++W<D);do A=this.session.getLine(I);while(/[=:]/.test(A)&&--I>0);I<0&&(I=0),W>=D&&(W=D-1)}var _=this.session.removeFullLines(I,W);_=this.$reAlignText(_,F),this.session.insert({row:I,column:0},_.join(`
|
|
954
|
-
`)+`
|
|
955
|
-
`),F||(L.start.column=0,L.end.column=_[_.length-1].length),this.selection.setRange(L)}else{N.forEach(function(V){k.substractPoint(V.cursor)});var M=0,B=1/0,j=C.map(function(V){var K=V.cursor,J=$.getLine(K.row),oe=J.substr(K.column).search(/\S/g);return oe==-1&&(oe=0),K.column>M&&(M=K.column),oe<B&&(B=oe),oe});C.forEach(function(V,K){var J=V.cursor,oe=M-J.column,ee=j[K]-B;oe>ee?$.insert(J,i.stringRepeat(" ",oe-ee)):$.remove(new g(J.row,J.column,J.row,J.column-oe+ee)),V.start.column=V.end.column=M,V.start.row=V.end.row=J.row,V.cursor=V.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,k){var C=!0,O=!0,N,L,I;return $.map(function(_){var M=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?N==null?(N=M[1].length,L=M[2].length,I=M[3].length,M):(N+L+I!=M[1].length+M[2].length+M[3].length&&(O=!1),N!=M[1].length&&(C=!1),N>M[1].length&&(N=M[1].length),L<M[2].length&&(L=M[2].length),I>M[3].length&&(I=M[3].length),M):[_]}).map(k?F:C?O?D:F:A);function W(_){return i.stringRepeat(" ",_)}function F(_){return _[2]?W(N)+_[2]+W(L-_[2].length+I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function D(_){return _[2]?W(N+L-_[2].length)+_[2]+W(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function A(_){return _[2]?W(N)+_[2]+W(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(m.prototype);function w($,k){return $.row==k.row&&$.column==k.column}r.onSessionChange=function($){var k=$.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.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)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function 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",c),$.commands.addCommands(l.defaultCommands),R($))}function R($){if(!$.textInput)return;var k=$.textInput.getElement(),C=!1;d.addListener(k,"keydown",function(N){var L=N.keyCode==18&&!(N.ctrlKey||N.shiftKey||N.metaKey);$.$blockSelectEnabled&&L?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},$),d.addListener(k,"keyup",O,$),d.addListener(k,"blur",O,$);function O(N){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function($){x(this),$?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,h){var f=e("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(y,c,d){var i=y.getLine(d);return this.foldingStartMarker.test(i)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(y,c,d){return null},this.indentationBlock=function(y,c,d){var i=/\S/,l=y.getLine(c),u=l.search(i);if(u!=-1){for(var p=d||l.length,o=y.getLength(),s=c,m=c;++c<o;){var w=y.getLine(c).search(i);if(w!=-1){if(w<=u){var x=y.getTokenAt(c,0);if(!x||x.type!=="string")break}m=c}}if(m>s){var R=y.getLine(m).length;return new f(s,p,m,R)}}},this.openingBracketBlock=function(y,c,d,i,l){var u={row:d,column:i+1},p=y.$findClosingBracket(c,u,l);if(p){var o=y.foldWidgets[p.row];return o==null&&(o=y.getFoldWidget(p.row)),o=="start"&&p.row>u.row&&(p.row--,p.column=y.getLine(p.row).length),f.fromPoints(u,p)}},this.closingBracketBlock=function(y,c,d,i,l){var u={row:d,column:i},p=y.$findOpeningBracket(c,u);if(p)return p.column++,u.column--,f.fromPoints(p,u)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,h){var f=e("../lib/dom"),g=e("../range").Range,y=e("../config").nls;function c(i,l,u){for(var p=0,o=i.length-1;p<=o;){var s=p+o>>1,m=u(l,i[s]);if(m>0)p=s+1;else if(m<0)o=s-1;else return s}return-(p+1)}function d(i,l,u){var p=i.getAnnotations().sort(g.comparePoints);if(p.length){var o=c(p,{row:l,column:-1},g.comparePoints);o<0&&(o=-o-1),o>=p.length?o=u>0?0:p.length-1:o===0&&u<0&&(o=p.length-1);var s=p[o];if(!(!s||!u)){if(s.row===l){do s=p[o+=u];while(s&&s.row===l);if(!s)return p.slice()}var m=[];l=s.row;do m[u<0?"unshift":"push"](s),s=p[o+=u];while(s&&s.row==l);return m.length&&m}}}r.showErrorMarker=function(i,l){var u=i.session,p=i.getCursorPosition(),o=p.row,s=u.widgetManager.getWidgetsAtRow(o).filter(function(N){return N.type=="errorMarker"})[0];s?s.destroy():o-=l;var m=d(u,o,l),w;if(m){var x=m[0];p.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,p.row=x.row,w=i.renderer.$gutterLayer.$annotations[p.row]}else{if(s)return;w={displayText:[y("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(p.row),i.selection.moveToPosition(p);var R={row:p.row,fixedWidth:!0,coverGutter:!0,el:f.createElement("div"),type:"errorMarker"},$=R.el.appendChild(f.createElement("div")),k=R.el.appendChild(f.createElement("div"));k.className="error_widget_arrow "+w.className;var C=i.renderer.$cursorLayer.getPixelPosition(p).left;k.style.left=C+i.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(N,L){$.appendChild(f.createTextNode(N)),L<w.displayText.length-1&&$.appendChild(f.createElement("br"))}),$.appendChild(f.createElement("div"));var O=function(N,L,I){if(L===0&&(I==="esc"||I==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(O),u.widgetManager.removeLineWidget(R),i.off("changeSelection",R.destroy),i.off("changeSession",R.destroy),i.off("mouseup",R.destroy),i.off("change",R.destroy))},i.keyBinding.addKeyboardHandler(O),i.on("changeSelection",R.destroy),i.on("changeSession",R.destroy),i.on("mouseup",R.destroy),i.on("change",R.destroy),i.session.widgetManager.addLineWidget(R),R.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},f.importCssString(`
|
|
956
|
-
.error_widget_wrapper {
|
|
957
|
-
background: inherit;
|
|
958
|
-
color: inherit;
|
|
959
|
-
border:none
|
|
960
|
-
}
|
|
961
|
-
.error_widget {
|
|
962
|
-
border-top: solid 2px;
|
|
963
|
-
border-bottom: solid 2px;
|
|
964
|
-
margin: 5px 0;
|
|
965
|
-
padding: 10px 40px;
|
|
966
|
-
white-space: pre-wrap;
|
|
967
|
-
}
|
|
968
|
-
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
969
|
-
border-color: #ff5a5a
|
|
970
|
-
}
|
|
971
|
-
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
972
|
-
border-color: #F1D817
|
|
973
|
-
}
|
|
974
|
-
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
975
|
-
border-color: #5a5a5a
|
|
976
|
-
}
|
|
977
|
-
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
978
|
-
border-color: #5aaa5a
|
|
979
|
-
}
|
|
980
|
-
.error_widget_arrow {
|
|
981
|
-
position: absolute;
|
|
982
|
-
border: solid 5px;
|
|
983
|
-
border-top-color: transparent!important;
|
|
984
|
-
border-right-color: transparent!important;
|
|
985
|
-
border-left-color: transparent!important;
|
|
986
|
-
top: -5px;
|
|
987
|
-
}
|
|
988
|
-
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,h){e("./loader_build")(r);var f=e("./lib/dom"),g=e("./range").Range,y=e("./editor").Editor,c=e("./edit_session").EditSession,d=e("./undomanager").UndoManager,i=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(u,p){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof y)return u.env.editor;var s="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;s=m.value,u=f.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(s=u.textContent,u.innerHTML="");var w=r.createEditSession(s),x=new y(new i(u),w,p),R={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(R.textarea=m),x.on("destroy",function(){R.editor.container.env=null}),x.container.env=x.env=R,x},r.createEditSession=function(u,p){var o=new c(u,p);return o.setUndoManager(new d),o},r.Range=g,r.Editor=y,r.EditSession=c,r.UndoManager=d,r.VirtualRenderer=i;var l=r.config.version;r.version=l}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var h in e)e.hasOwnProperty(h)&&(r.ace[h]=e[h]);r.ace.default=r.ace,n&&(n.exports=r.ace)})})()})(Lm)),Lm.exports}var ys=Tn("m",oS()),Nm={exports:{}},Dm;function sS(){return Dm||(Dm=1,(function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,y=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 c=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},d=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},l=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},p=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},s=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",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",R="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",k=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":R,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,O={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(N,L,I){I.length&&(I=[]);var W=N[N.length-1];return I.unshift(W,L),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,L,I){I.length&&(I=[]);var W=N[N.length-1];return I.unshift(W,L),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,L,I){I.length&&(I=[]);var W=N[N.length-1];return I.unshift(W,L),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,L,I){I.length&&(I=[]);var W=N[N.length-1];return I.unshift(W,L),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,L,I){I.length&&(I=[]);var W=N[N.length-1];return I.unshift(W,L),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},s,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,p,y,c,o,d,i,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,L,I){var W=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",F=N.split(this.splitRegex);return I.push(W,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(N,L,I){return N===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,L,I){return N===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,L,I){return this.next="",N=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,L,I){return I.length&&N===I[0]?(I.unshift(N,L),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,L,I){return I.length&&N===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,L,I){return I.length&&N===I[0]?(I.unshift(N,L),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,L,I){return I.length&&N===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,L,I){return I.length&&N===I[0]?(I.unshift(N,L),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,L,I){return I.length&&N===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,L,I){return I.length&&N===I[0]?(I.unshift(N,L),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,L,I){return I.length&&N===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,L,I){return I.length&&N===I[0]?(I.unshift(N,L),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,L,I){return I.length&&N[0]===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};f.inherits(m,g),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,h){var f=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(y,c){return/^\s+$/.test(y)?/^\s*\}/.test(c):!1},this.autoOutdent=function(y,c){var d=y.getLine(c),i=d.match(/^(\s*\})/);if(!i)return 0;var l=i[1].length,u=y.findMatchingBracket({row:c,column:l});if(!u||u.row==c)return 0;var p=this.$getIndent(y.getLine(u.row));y.replace(new f(c,0,c,l-1),p)},this.$getIndent=function(y){return y.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,h){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,y=e("../../range").Range,c=e("../../token_iterator").TokenIterator,d=r.FoldMode=function(){};f.inherits(d,g),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(i,l,u){var p=i.getLine(u),o=this.foldingStartMarker.test(p),s=this.foldingStopMarker.test(p);if(o&&!s){var m=p.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(p)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(p)===!1)||m[1]=="when"&&/\sthen\s/.test(p)===!0)return;if(i.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!s||o&&s)return"";var m=p.match(this.foldingStopMarker);if(m[3]==="end"){if(i.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,l,u){var p=i.doc.getLine(u),o=this.foldingStartMarker.exec(p);if(o)return o[1]||o[3]?this.rubyBlock(i,u,o.index+2):this.openingBracketBlock(i,"{",u,o.index);var o=this.foldingStopMarker.exec(p);if(o)return o[3]==="end"&&i.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(i,u,o.index+1):o[1]==="=end"&&i.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(i,u,o.index+1):this.closingBracketBlock(i,"}",u,o.index+o[0].length)},this.rubyBlock=function(i,l,u,p){var o=new c(i,l,u),s=o.getCurrentToken();if(!(!s||s.type!="keyword"&&s.type!="comment.multiline")){var m=s.value,w=i.getLine(l);switch(s.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);if(!x.test(w))return;var R=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");if(!x.test(w))return;var R=1;break;default:var R=this.indentKeywords[m]}var $=[m];if(R){var k=R===-1?i.getLine(l-1).length:i.getLine(l).length,C=l,O=[];if(O.push(o.getCurrentTokenRange()),o.step=R===-1?o.stepBackward:o.stepForward,s.type=="comment.multiline"){for(;s=o.step();)if(s.type==="comment.multiline"){if(R==1){if(k=6,s.value=="=end")break}else if(s.value=="=begin")break}}else for(;s=o.step();){var N=!1;if(s.type==="keyword"){var L=R*this.indentKeywords[s.value];switch(w=i.getLine(o.getCurrentTokenRow()),s.value){case"do":for(var I=o.$tokenIndex-1;I>=0;I--){var W=o.$rowTokens[I];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){L=0;break}}break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");(!x.test(w)||m=="case")&&(L=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);x.test(w)||(L=0,N=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(L=0,N=!0)}if(L>0)$.unshift(s.value);else if(L<=0&&N===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&s.value!="do"||s.value=="do"&&R==-1&&L!=0||s.value!="do"))break;L===0&&$.unshift(s.value)}}}if(!s)return null;if(p)return O.push(o.getCurrentTokenRange()),O;var l=o.getCurrentTokenRow();if(R===-1){if(s.type==="comment.multiline")var F=6;else var F=i.getLine(l).length;return new y(l,F,C-1,k)}return new y(C,k,l-1,i.getLine(l-1).length)}}}}).call(d.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,r,h){var f=e("../lib/oop"),g=e("./text").Mode,y=e("./ruby_highlight_rules").RubyHighlightRules,c=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../range").Range,i=e("./folding/ruby").FoldMode,l=function(){this.HighlightRules=y,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};f.inherits(l,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,p,o){var s=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return s;if(u=="start"){var x=p.match(/^.*[\{\(\[]\s*$/),R=p.match(/^\s*(class|def|module)\s.*$/),$=p.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=p.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||R||$||k)&&(s+=o)}return s},this.checkOutdent=function(u,p,o){return/^\s+(end|else|rescue|ensure)$/.test(p+o)||this.$outdent.checkOutdent(p,o)},this.autoOutdent=function(u,p,o){var s=p.getLine(o);if(/}/.test(s))return this.$outdent.autoOutdent(p,o);var m=this.$getIndent(s),w=p.getLine(o-1),x=this.$getIndent(w),R=p.getTabString();x.length<=m.length&&m.slice(-R.length)==R&&p.remove(new d(o,m.length-R.length,o,m.length))},this.getMatching=function(u,p,o){if(p==null){var s=u.selection.lead;o=s.column,p=s.row}var m=u.getTokenAt(p,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,p,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})})()})(Nm)),Nm.exports}sS();var Pm={exports:{}},Fm;function aS(){return Fm||(Fm=1,(function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,y=function(){var c="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",d="True|False|None|NotImplemented|Ellipsis|__debug__",i="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",l=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"variable.language":"self|cls","constant.language":d,keyword:c},"identifier"),u="[uU]?",p="[rR]",o="[fF]",s="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",$="(?:"+m+"|"+w+"|"+x+"|"+R+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",N="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",L="(?:(?:"+N+"|"+O+")"+k+")",I="(?:"+L+"|"+N+")",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:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:p+'"{3}',next:"rawqqstring3"},{token:"string",regex:p+'"(?=.)',next:"rawqqstring"},{token:"string",regex:p+"'{3}",next:"rawqstring3"},{token:"string",regex:p+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:s+'"{3}',next:"rfqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rfqqstring"},{token:"string",regex:s+"'{3}",next:"rfqstring3"},{token:"string",regex:s+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex: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:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};f.inherits(y,g),r.PythonHighlightRules=y}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,h){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,y=r.FoldMode=function(c){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+c+")(?:\\s*)(?:#.*)?$")};f.inherits(y,g),(function(){this.getFoldWidgetRange=function(c,d,i){var l=c.getLine(i),u=l.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(c,u[1],i,u.index):u[2]?this.indentationBlock(c,i,u.index+u[2].length):this.indentationBlock(c,i)}}).call(y.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,h){var f=e("../lib/oop"),g=e("./text").Mode,y=e("./python_highlight_rules").PythonHighlightRules,c=e("./folding/pythonic").FoldMode,d=e("../range").Range,i=function(){this.HighlightRules=y,this.foldingRules=new c("\\:"),this.$behaviour=this.$defaultBehaviour};f.inherits(i,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,p,o){var s=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return s;if(u=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(s+=o)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,p,o){if(o!==`\r
|
|
989
|
-
`&&o!=="\r"&&o!==`
|
|
990
|
-
`)return!1;var s=this.getTokenizer().getLineTokens(p.trim(),u).tokens;if(!s)return!1;do var m=s.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(u,p,o){o+=1;var s=this.$getIndent(p.getLine(o)),m=p.getTabString();s.slice(-m.length)==m&&p.remove(new d(o,s.length-m.length,o,s.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})})()})(Pm)),Pm.exports}aS();var zm={exports:{}},Bm;function lS(){return Bm||(Bm=1,(function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,y=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};f.inherits(y,g),r.JsonHighlightRules=y}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,h){var f=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(y,c){return/^\s+$/.test(y)?/^\s*\}/.test(c):!1},this.autoOutdent=function(y,c){var d=y.getLine(c),i=d.match(/^(\s*\})/);if(!i)return 0;var l=i[1].length,u=y.findMatchingBracket({row:c,column:l});if(!u||u.row==c)return 0;var p=this.$getIndent(y.getLine(u.row));y.replace(new f(c,0,c,l-1),p)},this.$getIndent=function(y){return y.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,h){var f=e("../../lib/oop"),g=e("../../range").Range,y=e("./fold_mode").FoldMode,c=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};f.inherits(c,y),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,i,l){var u=d.getLine(l);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var p=this._getFoldWidgetBase(d,i,l);return!p&&this.startRegionRe.test(u)?"start":p},this.getFoldWidgetRange=function(d,i,l,u){var p=d.getLine(l);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(d,p,l);var o=p.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(d,o[1],l,s);var m=d.getCommentFoldRange(l,s+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(d,l):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=p.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,i){var l=d.getLine(i),u=l.search(/\S/),p=i,o=l.length;i+=1;for(var s=i,m=d.getLength();++i<m;){l=d.getLine(i);var w=l.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(d,"all",i);if(x){if(x.start.row<=p)break;if(x.isMultiLine())i=x.end.row;else if(u==w)break}s=i}}return new g(p,o,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,i,l){for(var u=i.search(/\s*$/),p=d.getLength(),o=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<p;){i=d.getLine(l);var w=s.exec(i);if(w&&(w[1]?m--:m++,!m))break}var x=l;if(x>o)return new g(o,u,x,i.length)}}).call(c.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,h){var f=e("../lib/oop"),g=e("./text").Mode,y=e("./json_highlight_rules").JsonHighlightRules,c=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("./folding/cstyle").FoldMode,i=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=y,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new d};f.inherits(l,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,p,o){var s=this.$getIndent(p);if(u=="start"){var m=p.match(/^.*[\{\(\[]\s*$/);m&&(s+=o)}return s},this.checkOutdent=function(u,p,o){return this.$outdent.checkOutdent(p,o)},this.autoOutdent=function(u,p,o){this.$outdent.autoOutdent(p,o)},this.createWorker=function(u){var p=new i(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(u.getDocument()),p.on("annotate",function(o){u.setAnnotations(o.data)}),p.on("terminate",function(){u.clearAnnotations()}),p},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})})()})(zm)),zm.exports}lS();var Wm={exports:{}},jm;function cS(){return jm||(jm=1,(function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop");e("../lib/lang");var g=e("./text_highlight_rules").TextHighlightRules,y=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",c=r.supportFunction="rgb|rgba|url|attr|counter|counters",d=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",i=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",s=function(){var m=this.createKeywordMapper({"support.function":c,"support.constant":d,"support.type":y,"support.constant.color":i,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};f.inherits(s,g),r.CssHighlightRules=s}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,y=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|$)"},y.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};f.inherits(y,g),y.getTagRule=function(c){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},y.getStartRule=function(c){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:c}},y.getEndRule=function(c){return{token:"comment.doc",regex:"\\*\\/",next:c}},r.JsDocCommentHighlightRules=y}),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,h){function f(){var u=i.replace("\\d","\\d\\-"),p={onMatch:function(s,m,w){var x=s.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:s.slice(0,x)},{type:"meta.tag.tag-name.xml",value:s.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(p);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,p,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(s,m,w){return m==w[0]&&w.shift(),s.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:s}]},nextState:"jsx"},o,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(u){return[{token:"comment",regex:/\/\*/,next:[c.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[c.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var y=e("../lib/oop"),c=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,d=e("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",l=function(u){var p={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(p,"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(p).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[c.getStartRule("doc-start"),g("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+i+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:i},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:i},{regex:"",token:"empty",next:"no_regex"}],start:[c.getStartRule("doc-start"),g("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[g("function_arguments"),{token:"variable.parameter",regex:i},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,$,k){if(this.next=R=="{"?this.nextState:"",R=="{"&&k.length)k.unshift("start",$);else if(R=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+i+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&f.call(this)),this.embedRules(c,"doc-",[c.getEndRule("no_regex")]),this.normalizeRules()};y.inherits(l,d),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,y=function(c){var d="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+d+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:d},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+d+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+d+":)?"+d+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===y&&this.normalizeRules()};(function(){this.embedTagRules=function(c,d,i){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(<)("+i+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:d+"start"}]}),this.$rules[i+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,u,p){return p.splice(0),this.token}}],this.embedRules(c,d,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(</)("+i+"(?=\\s|>|$))",next:i+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),f.inherits(y,g),r.XmlHighlightRules=y}),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,h){var f=e("../lib/oop"),g=e("../lib/lang"),y=e("./css_highlight_rules").CssHighlightRules,c=e("./javascript_highlight_rules").JavaScriptHighlightRules,d=e("./xml_highlight_rules").XmlHighlightRules,i=g.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){d.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,p){var o=i[p];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(y,"css-","style"),this.embedTagRules(new c({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};f.inherits(l,d),r.HtmlHighlightRules=l}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,h){var f=e("../config").$modes,g=e("../lib/oop"),y=e("../lib/lang"),c=e("./text_highlight_rules").TextHighlightRules,d=e("./html_highlight_rules").HtmlHighlightRules,i=function(u){return"(?:[^"+y.escapeRegExp(u)+"\\\\]|\\\\.)*"},l=function(){d.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,s,m,w){var x=o.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(x[3])[0];return f[R]||(R=""),m.unshift("githubblock",[],[x[1],x[2],R],s),this.token},next:"githubblock"},p=[{token:"support.function",regex:".*",onMatch:function(o,s,m,w){var x=m[1],R=m[2][0],$=m[2][1],k=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<R.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&f[k]){var O=f[k].getTokenizer().getLineTokens(o,x.slice(0));return m[1]=O.state,O.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+i("]")+")(\\]\\s*\\[)("+i("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+i("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+i('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:p}),this.normalizeRules()};g.inherits(l,c),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,h){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,y=e("../../range").Range,c=r.FoldMode=function(){};f.inherits(c,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(d,i,l){var u=d.getLine(l);return this.foldingStartMarker.test(u)?u[0]=="`"&&d.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(d,i,l){function u(N){return R=d.getTokens(N)[0],R&&R.type.lastIndexOf($,0)===0}function p(){var N=R.value[0];return N=="="?6:N=="-"?5:7-R.value.search(/[^#]|$/)}var o=d.getLine(l),s=o.length,m=d.getLength(),w=l,x=l;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(d.bgTokenizer.getState(l)!=="start"){for(;++l<m&&(o=d.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new y(w,s,l,0)}for(;l-- >0&&(o=d.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new y(l,o.length,w,0)}var R,$="markup.heading";if(u(l)){for(var k=p();++l<m;)if(u(l)){var C=p();if(C>=k)break}if(x=l-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(d.getLine(x));)x--;if(x>w){var O=d.getLine(x).length;return new y(w,s,x,O)}}}}}).call(c.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,h){var f=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(y,c){return/^\s+$/.test(y)?/^\s*\}/.test(c):!1},this.autoOutdent=function(y,c){var d=y.getLine(c),i=d.match(/^(\s*\})/);if(!i)return 0;var l=i[1].length,u=y.findMatchingBracket({row:c,column:l});if(!u||u.row==c)return 0;var p=this.$getIndent(y.getLine(u.row));y.replace(new f(c,0,c,l-1),p)},this.$getIndent=function(y){return y.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,h){function f(i,l){return i&&i.type.lastIndexOf(l+".xml")>-1}var g=e("../../lib/oop"),y=e("../behaviour").Behaviour,c=e("../../token_iterator").TokenIterator,d=function(){this.add("string_dquotes","insertion",function(i,l,u,p,o){if(o=='"'||o=="'"){var s=o,m=p.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:s+m+s,selection:!1};var w=u.getCursorPosition(),x=p.doc.getLine(w.row),R=x.substring(w.column,w.column+1),$=new c(p,w.row,w.column),k=$.getCurrentToken();if(R==s&&(f(k,"attribute-value")||f(k,"string")))return{text:"",selection:[1,1]};if(k||(k=$.stepBackward()),!k)return;for(;f(k,"tag-whitespace")||f(k,"whitespace");)k=$.stepBackward();var C=!R||R.match(/\s/);if(f(k,"attribute-equals")&&(C||R==">")||f(k,"decl-attribute-equals")&&(C||R=="?"))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,l,u,p,o){var s=p.doc.getTextRange(o);if(!o.isMultiLine()&&(s=='"'||s=="'")){var m=p.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==s)return o.end.column++,o}}),this.add("autoclosing","insertion",function(i,l,u,p,o){if(o==">"){var s=u.getSelectionRange().start,m=new c(p,s.row,s.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(f(w,"tag-name")||f(w,"tag-whitespace")||f(w,"attribute-name")||f(w,"attribute-equals")||f(w,"attribute-value"))||f(w,"reference.attribute-value"))return;if(f(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(s.column<x)return;if(s.column==x){var R=m.stepForward();if(R&&f(R,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(p.getLine(s.row).slice(s.column)))return;for(;!f(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var $=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(f(m.stepBackward(),"end-tag-open"))return;var C=w.value;return $==s.row&&(C=C.substring(0,s.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,l,u,p,o){if(o==`
|
|
991
|
-
`){var s=u.getCursorPosition(),m=p.getLine(s.row),w=new c(p,s.row,s.column),x=w.getCurrentToken();if(f(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var R=x.value,$=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var k=p.getTokenAt(s.row,s.column+1),m=p.getLine($),C=this.$getIndent(m),O=C+p.getTabString();return k&&k.value==="</"?{text:`
|
|
992
|
-
`+O+`
|
|
993
|
-
`+C,selection:[1,O.length,1,O.length]}:{text:`
|
|
994
|
-
`+O}}}}})};g.inherits(d,y),r.XmlBehaviour=d}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,h){var f=e("../../lib/oop"),g=e("../../token_iterator").TokenIterator,y=e("../behaviour/cstyle").CstyleBehaviour,c=e("../behaviour/xml").XmlBehaviour,d=function(){var i=new c({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(y),this.add("autoclosing-fragment","insertion",function(l,u,p,o,s){if(s==">"){var m=p.getSelectionRange().start,w=new g(o,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};f.inherits(d,y),r.JavaScriptBehaviour=d}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,h){function f(l,u){return l&&l.type&&l.type.lastIndexOf(u+".xml")>-1}var g=e("../../lib/oop"),y=e("../../range").Range,c=e("./fold_mode").FoldMode,d=r.FoldMode=function(l,u){c.call(this),this.voidElements=l||{},this.optionalEndTags=g.mixin({},this.voidElements),u&&g.mixin(this.optionalEndTags,u)};g.inherits(d,c);var i=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(l,u,p){var o=this._getFirstTagInLine(l,p);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(l,p,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(l,p)},this.getCommentFoldWidget=function(l,u){return/comment/.test(l.getState(u))&&/<!-/.test(l.getLine(u))?"start":""},this._getFirstTagInLine=function(l,u){for(var p=l.getTokens(u),o=new i,s=0;s<p.length;s++){var m=p[s];if(f(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=f(m,"end-tag-open"),m=p[++s],!m)return null;if(o.tagName=m.value,m.value===""){if(m=p[++s],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,s++;s<p.length;s++)if(m=p[s],o.end.column+=m.value.length,f(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(f(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(l,u,p,o){for(var s=l.getTokens(u),m=0,w=0;w<s.length;w++){var x=s[w];if(m+=x.value.length,!(m<o-1)&&f(x,"end-tag-open")&&(x=s[w+1],f(x,"tag-name")&&x.value===""&&(x=s[w+2]),x&&x.value==p))return!0}return!1},this.getFoldWidgetRange=function(l,u,p){var o=this._getFirstTagInLine(l,p);if(!o)return this.getCommentFoldWidget(l,p)&&l.getCommentFoldRange(p,l.getLine(p).length);var s=l.getMatchingTags({row:p,column:0});if(s)return new y(s.openTag.end.row,s.openTag.end.column,s.closeTag.start.row,s.closeTag.start.column)}}).call(d.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,h){var f=e("../../lib/oop"),g=e("../../range").Range,y=e("./fold_mode").FoldMode,c=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};f.inherits(c,y),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,i,l){var u=d.getLine(l);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var p=this._getFoldWidgetBase(d,i,l);return!p&&this.startRegionRe.test(u)?"start":p},this.getFoldWidgetRange=function(d,i,l,u){var p=d.getLine(l);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(d,p,l);var o=p.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(d,o[1],l,s);var m=d.getCommentFoldRange(l,s+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(d,l):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=p.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,i){var l=d.getLine(i),u=l.search(/\S/),p=i,o=l.length;i+=1;for(var s=i,m=d.getLength();++i<m;){l=d.getLine(i);var w=l.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(d,"all",i);if(x){if(x.start.row<=p)break;if(x.isMultiLine())i=x.end.row;else if(u==w)break}s=i}}return new g(p,o,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,i,l){for(var u=i.search(/\s*$/),p=d.getLength(),o=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<p;){i=d.getLine(l);var w=s.exec(i);if(w&&(w[1]?m--:m++,!m))break}var x=l;if(x>o)return new g(o,u,x,i.length)}}).call(c.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,h){var f=e("../../lib/oop"),g=e("./xml").FoldMode,y=e("./cstyle").FoldMode,c=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end))),this.xmlFoldMode=new g};f.inherits(c,y),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,i,l){var u=this.getFoldWidgetBase(d,i,l);return u||this.xmlFoldMode.getFoldWidget(d,i,l)},this.getFoldWidgetRange=function(d,i,l,u){var p=this.getFoldWidgetRangeBase(d,i,l,u);return p||this.xmlFoldMode.getFoldWidgetRange(d,i,l)}}).call(c.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,h){var f=e("../lib/oop"),g=e("./text").Mode,y=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,i=e("./behaviour/javascript").JavaScriptBehaviour,l=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=y,this.$outdent=new c,this.$behaviour=new i,this.foldingRules=new l};f.inherits(u,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,o,s){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,p),x=w.tokens,R=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var $=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(m+=s)}else if(p=="doc-start"&&(R=="start"||R=="no_regex"))return"";return m},this.checkOutdent=function(p,o,s){return this.$outdent.checkOutdent(o,s)},this.autoOutdent=function(p,o,s){this.$outdent.autoOutdent(o,s)},this.createWorker=function(p){var o=new d(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(p.getDocument()),o.on("annotate",function(s){p.setAnnotations(s.data)}),o.on("terminate",function(){p.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,h){var f={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var y=document.createElement("c").style;for(var c in y)if(typeof y[c]=="string"){var d=c.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});f.hasOwnProperty(d)||(f[d]=1)}}this.completionsDefined=!0},this.getCompletions=function(y,c,d,i){if(this.completionsDefined||this.defineCompletions(),y==="ruleset"||c.$mode.$id=="ace/mode/scss"){var l=c.getLine(d.row).substr(0,d.column),u=/\([^)]*$/.test(l);return u&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(y,c,d,i):this.getPropertyCompletions(y,c,d,i,u)}return[]},this.getPropertyCompletions=function(y,c,d,i,l){l=l||!1;var u=Object.keys(f);return u.map(function(p){return{caption:p,snippet:p+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(y,c,d,i){var l=c.getLine(d.row).substr(0,d.column),u=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!u)return[];var p=[];return u in f&&typeof f[u]=="object"&&(p=Object.keys(f[u])),p.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,h){var f=e("../../lib/oop");e("../behaviour").Behaviour;var g=e("./cstyle").CstyleBehaviour,y=e("../../token_iterator").TokenIterator,c=function(){this.inherit(g),this.add("colon","insertion",function(d,i,l,u,p){if(p===":"&&l.selection.isEmpty()){var o=l.getCursorPosition(),s=new y(u,o.row,o.column),m=s.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=s.stepBackward()),m&&m.type==="support.type"){var w=u.doc.getLine(o.row),x=w.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(d,i,l,u,p){var o=u.doc.getTextRange(p);if(!p.isMultiLine()&&o===":"){var s=l.getCursorPosition(),m=new y(u,s.row,s.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(p.start.row),R=x.substring(p.end.column,p.end.column+1);if(R===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(d,i,l,u,p){if(p===";"&&l.selection.isEmpty()){var o=l.getCursorPosition(),s=u.doc.getLine(o.row),m=s.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(d,i,l,u,p){if(p==="!"&&l.selection.isEmpty()){var o=l.getCursorPosition(),s=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(s.substring(o.column)))return{text:"!important",selection:[10,10]}}})};f.inherits(c,g),r.CssBehaviour=c}),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,h){var f=e("../lib/oop"),g=e("./text").Mode,y=e("./css_highlight_rules").CssHighlightRules,c=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,i=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=y,this.$outdent=new c,this.$behaviour=new l,this.$completer=new i,this.foldingRules=new u};f.inherits(p,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,s,m){var w=this.$getIndent(s),x=this.getTokenizer().getLineTokens(s,o).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var R=s.match(/^.*\{\s*$/);return R&&(w+=m),w},this.checkOutdent=function(o,s,m){return this.$outdent.checkOutdent(s,m)},this.autoOutdent=function(o,s,m){this.$outdent.autoOutdent(s,m)},this.getCompletions=function(o,s,m,w){return this.$completer.getCompletions(o,s,m,w)},this.createWorker=function(o){var s=new d(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(o.getDocument()),s.on("annotate",function(m){o.setAnnotations(m.data)}),s.on("terminate",function(){o.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,h){var f=e("../../lib/oop"),g=e("./fold_mode").FoldMode,y=r.FoldMode=function(c,d){this.defaultMode=c,this.subModes=d};f.inherits(y,g),(function(){this.$getMode=function(c){typeof c!="string"&&(c=c[0]);for(var d in this.subModes)if(c.indexOf(d)===0)return this.subModes[d];return null},this.$tryMode=function(c,d,i,l){var u=this.$getMode(c);return u?u.getFoldWidget(d,i,l):""},this.getFoldWidget=function(c,d,i){return this.$tryMode(c.getState(i-1),c,d,i)||this.$tryMode(c.getState(i),c,d,i)||this.defaultMode.getFoldWidget(c,d,i)},this.getFoldWidgetRange=function(c,d,i){var l=this.$getMode(c.getState(i-1));return(!l||!l.getFoldWidget(c,d,i))&&(l=this.$getMode(c.getState(i))),(!l||!l.getFoldWidget(c,d,i))&&(l=this.defaultMode),l.getFoldWidgetRange(c,d,i)}}).call(y.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,h){var f=e("../../lib/oop"),g=e("./mixed").FoldMode,y=e("./xml").FoldMode,c=e("./cstyle").FoldMode,d=r.FoldMode=function(i,l){g.call(this,new y(i,l),{"js-":new c,"css-":new c})};f.inherits(d,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,h){function f(s,m){return s.type.lastIndexOf(m+".xml")>-1}function g(s,m){for(var w=new c(s,m.row,m.column),x=w.getCurrentToken();x&&!f(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function y(s,m){for(var w=new c(s,m.row,m.column),x=w.getCurrentToken();x&&!f(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var c=e("../token_iterator").TokenIterator,d=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],i=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=d.concat(i),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},p=Object.keys(u),o=function(){};(function(){this.getCompletions=function(s,m,w,x){var R=m.getTokenAt(w.row,w.column);if(!R)return[];if(f(R,"tag-name")||f(R,"tag-open")||f(R,"end-tag-open"))return this.getTagCompletions(s,m,w,x);if(f(R,"tag-whitespace")||f(R,"attribute-name"))return this.getAttributeCompletions(s,m,w,x);if(f(R,"attribute-value"))return this.getAttributeValueCompletions(s,m,w,x);var $=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(s,m,w,x):[]},this.getTagCompletions=function(s,m,w,x){return p.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(s,m,w,x){var R=g(m,w);if(!R)return[];var $=l;return R in u&&($=$.concat(Object.keys(u[R]))),$.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(s,m,w,x){var R=g(m,w),$=y(m,w);if(!R)return[];var k=[];return R in u&&$ in u[R]&&typeof u[R][$]=="object"&&(k=Object.keys(u[R][$])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(s,m,w,x){var R=["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 R.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,h){var f=e("../lib/oop"),g=e("../lib/lang"),y=e("./text").Mode,c=e("./javascript").Mode,d=e("./css").Mode,i=e("./html_highlight_rules").HtmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,p=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,s=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=i,this.$behaviour=new l,this.$completer=new p,this.createModeDelegates({"js-":c,"css-":d}),this.foldingRules=new u(this.voidElements,g.arrayToMap(m))};f.inherits(w,y),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(s),this.getNextLineIndent=function(x,R,$){return this.$getIndent(R)},this.checkOutdent=function(x,R,$){return!1},this.getCompletions=function(x,R,$,k){return this.$completer.getCompletions(x,R,$,k)},this.createWorker=function(x){if(this.constructor==w){var R=new o(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(x.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function($){x.setAnnotations($.data)}),R.on("terminate",function(){x.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,h){var f=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,y=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",c=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",d=function(){var i=this.createKeywordMapper({keyword:y,"support.function.builtin":c,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",p="(?:\\d+)",o="(?:(?:"+p+"?"+u+")|(?:"+p+"\\.))",s="(?:(?:"+o+"|"+p+"))",m="(?:"+s+"|"+o+")",w="(?:&"+p+")",x="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,O,N){var L=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return N.push(L,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,O,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,O){return O[0]==="heredoc"||O[0]==="indentedHeredoc"?O[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:l+"\\b"},{token:i,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};f.inherits(d,g),r.ShHighlightRules=d}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,h){var f=e("../lib/oop"),g=e("./text").Mode,y=e("./sh_highlight_rules").ShHighlightRules,c=e("../range").Range,d=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=y,this.foldingRules=new d,this.$behaviour=this.$defaultBehaviour};f.inherits(i,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,p,o){var s=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return s;if(u=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(s+=o)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,p,o){if(o!==`\r
|
|
995
|
-
`&&o!=="\r"&&o!==`
|
|
996
|
-
`)return!1;var s=this.getTokenizer().getLineTokens(p.trim(),u).tokens;if(!s)return!1;do var m=s.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(u,p,o){o+=1;var s=this.$getIndent(p.getLine(o)),m=p.getTabString();s.slice(-m.length)==m&&p.remove(new c(o,s.length-m.length,o,s.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(i.prototype),r.Mode=i}),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,h){var f=e("../lib/oop"),g=e("../lib/lang"),y=e("./text").Mode,c=e("./xml_highlight_rules").XmlHighlightRules,d=e("./behaviour/xml").XmlBehaviour,i=e("./folding/xml").FoldMode,l=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=c,this.$behaviour=new d,this.foldingRules=new i};f.inherits(u,y),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(p){var o=new l(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(p.getDocument()),o.on("error",function(s){p.setAnnotations(s.data)}),o.on("terminate",function(){p.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,h){var f=e("../lib/oop"),g=e("./behaviour/cstyle").CstyleBehaviour,y=e("./text").Mode,c=e("./markdown_highlight_rules").MarkdownHighlightRules,d=e("./folding/markdown").FoldMode,i=function(){this.HighlightRules=c,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new d,this.$behaviour=new g({braces:!0})};f.inherits(i,y),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,u,p){if(l=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var s=o[2];return s||(s=parseInt(o[3],10)+1+"."),o[1]+s+o[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})})()})(Wm)),Wm.exports}cS();var Hm={exports:{}},Um;function uS(){return Um||(Um=1,(function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,h){h.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,h){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var f=e("../lib/dom");f.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})})()})(Hm)),Hm.exports}uS();var Vm={exports:{}},Gm;function hS(){return Gm||(Gm=1,(function(n,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,h){function f(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var g=e("./lib/dom"),y=e("./lib/oop"),c=e("./lib/event_emitter").EventEmitter,d=e("./lib/lang"),i=e("./range").Range,l=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,p=e("./tokenizer").Tokenizer,o=e("./clipboard"),s={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,N){var L=C.session.getTextRange();return N?L.replace(/\n\r?([ \t]*\S)/g,`
|
|
1127
|
-
`+N+"$1"):L},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.start||""},BLOCK_COMMENT_END:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.end||""},LINE_COMMENT:function(C){var O=C.session.$mode||{};return O.lineCommentStart||""},CURRENT_YEAR:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};s.SELECTED_TEXT=s.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=s}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function N(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var L={regex:"/("+N("/")+"+)/",onMatch:function(I,W,F){var D=F[0];return D.fmtString=!0,D.guard=I.slice(1,-1),D.flag="",""},next:"formatString"};return C.$tokenizer=new p({start:[{regex:/\\./,onMatch:function(I,W,F){var D=I[1];return(D=="}"&&F.length||"`$\\".indexOf(D)!=-1)&&(I=D),[I]}},{regex:/}/,onMatch:function(I,W,F){return[F.length?F.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,W,F){var D=O(I.substr(1));return F.unshift(D[0]),D},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+N("\\|")+"*\\|",onMatch:function(I,W,F){var D=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}});return F[0].choices=D,[D[0]]},next:"start"},L,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,W,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,W,F){var D=I[1];return D=="}"&&F.length||"`$\\".indexOf(D)!=-1?I=D:D=="n"?I=`
|
|
1128
|
-
`:D=="t"?I=" ":"ulULE".indexOf(D)!=-1&&(I={changeCase:D,local:D>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,W,F){var D=F.shift();return D&&(D.flag=I.slice(1,-1)),this.next=D&&D.tabstopId?"start":"",[D||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,W,F){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,W,F){var D={text:I.slice(2)};return F.unshift(D),[D]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,W,F){var D=F.shift();return this.next=D&&D.tabstopId?"start":"",[D||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,W,F){var D=F[0];return D.formatFunction=I.slice(2,-1),[F.shift()]},next:"formatString"},L,{regex:/:[\?\-+]?/,onMatch:function(I,W,F){I[1]=="+"&&(F[0].ifEnd=F[0]),I[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,N){return this.getTokenizer().getLineTokens(O,N).tokens.map(function(L){return L.value||L})},C.prototype.getVariableValue=function(O,N,L){if(/^\d+$/.test(N))return(this.variables.__||{})[N]||"";if(/^[A-Z]\d+$/.test(N))return(this.variables[N[0]+"__"]||{})[N.substr(1)]||"";if(N=N.replace(/^TM_/,""),!this.variables.hasOwnProperty(N))return"";var I=this.variables[N];return typeof I=="function"&&(I=this.variables[N](O,N,L)),I??""},C.prototype.tmStrFormat=function(O,N,L){if(!N.fmt)return O;var I=N.flag||"",W=N.guard;W=new RegExp(W,I.replace(/[^gim]/g,""));var F=typeof N.fmt=="string"?this.tokenizeTmSnippet(N.fmt,"formatString"):N.fmt,D=this,A=O.replace(W,function(){var _=D.variables.__;D.variables.__=[].slice.call(arguments);for(var M=D.resolveVariables(F,L),B="E",j=0;j<M.length;j++){var V=M[j];if(typeof V=="object")if(M[j]="",V.changeCase&&V.local){var K=M[j+1];K&&typeof K=="string"&&(V.changeCase=="u"?M[j]=K[0].toUpperCase():M[j]=K[0].toLowerCase(),M[j+1]=K.substr(1))}else V.changeCase&&(B=V.changeCase);else B=="U"?M[j]=V.toUpperCase():B=="L"&&(M[j]=V.toLowerCase())}return D.variables.__=_,M.join("")});return A},C.prototype.tmFormatFunction=function(O,N,L){return N.formatFunction=="upcase"?O.toUpperCase():N.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,N){function L(B){var j=O.indexOf(B,D+1);j!=-1&&(D=j)}for(var I=[],W="",F=!0,D=0;D<O.length;D++){var A=O[D];if(typeof A=="string"){I.push(A),A==`
|
|
1129
|
-
`?(F=!0,W=""):F&&(W=/^\t*/.exec(A)[0],F=/\S/.test(A));continue}if(A){if(F=!1,A.fmtString){var _=O.indexOf(A,D+1);_==-1&&(_=O.length),A.fmt=O.slice(D+1,_),D=_}if(A.text){var M=this.getVariableValue(N,A.text,W)+"";A.fmtString&&(M=this.tmStrFormat(M,A,N)),A.formatFunction&&(M=this.tmFormatFunction(M,A,N)),M&&!A.ifEnd?(I.push(M),L(A)):!M&&A.ifEnd&&L(A.ifEnd)}else A.elseEnd?L(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&I.push(A)}}return I},C.prototype.getDisplayTextForSnippet=function(O,N){var L=w.call(this,O,N);return L.text},C.prototype.insertSnippetForSelection=function(O,N,L){L===void 0&&(L={});var I=w.call(this,O,N,L),W=O.getSelectionRange(),F=O.session.replace(W,I.text),D=new x(O),A=O.inVirtualSelectionMode&&O.selection.index;D.addTabstops(I.tabstops,W.start,F,A)},C.prototype.insertSnippet=function(O,N,L){L===void 0&&(L={});var I=this;if(O.inVirtualSelectionMode)return I.insertSnippetForSelection(O,N,L);O.forEachSelection(function(){I.insertSnippetForSelection(O,N,L)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var N=O.session.$mode.$id||"";if(N=N.split("/").pop(),N==="html"||N==="php"){N==="php"&&!O.session.$mode.inlinePhp&&(N="html");var L=O.getCursorPosition(),I=O.session.getState(L.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?N="javascript":I.substring(0,4)=="css-"?N="css":I.substring(0,4)=="php-"&&(N="php"))}return N},C.prototype.getActiveScopes=function(O){var N=this.$getScope(O),L=[N],I=this.snippetMap;return I[N]&&I[N].includeScopes&&L.push.apply(L,I[N].includeScopes),L.push("_"),L},C.prototype.expandWithTab=function(O,N){var L=this,I=O.forEachSelection(function(){return L.expandSnippetForSelection(O,N)},null,{keepOrder:!0});return I&&O.tabstopManager&&O.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(O,N){var L=O.getCursorPosition(),I=O.session.getLine(L.row),W=I.substring(0,L.column),F=I.substr(L.column),D=this.snippetMap,A;return this.getActiveScopes(O).some(function(_){var M=D[_];return M&&(A=this.findMatchingSnippet(M,W,F)),!!A},this),A?(N&&N.dryRun||(O.session.doc.removeInLine(L.row,L.column-A.replaceBefore.length,L.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(O,A.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,N,L){for(var I=O.length;I--;){var W=O[I];if(!(W.startRe&&!W.startRe.test(N))&&!(W.endRe&&!W.endRe.test(L))&&!(!W.startRe&&!W.endRe))return W.matchBefore=W.startRe?W.startRe.exec(N):[""],W.matchAfter=W.endRe?W.endRe.exec(L):[""],W.replaceBefore=W.triggerRe?W.triggerRe.exec(N)[0]:"",W.replaceAfter=W.endTriggerRe?W.endTriggerRe.exec(L)[0]:"",W}},C.prototype.register=function(O,N){function L(_){return _&&!/^\^?\(.*\)\$?$|^\\b$/.test(_)&&(_="(?:"+_+")"),_||""}function I(_,M,B){return _=L(_),M=L(M),_=M+_,_&&_[_.length-1]!="$"&&(_+="$"),new RegExp(_)}function W(_){_.scope||(_.scope=N||"_"),N=_.scope,F[N]||(F[N]=[],D[N]={});var M=D[N];if(_.name){var B=M[_.name];B&&A.unregister(B),M[_.name]=_}F[N].push(_),_.prefix&&(_.tabTrigger=_.prefix),!_.content&&_.body&&(_.content=Array.isArray(_.body)?_.body.join(`
|
|
1130
|
-
`):_.body),_.tabTrigger&&!_.trigger&&(!_.guard&&/^\w/.test(_.tabTrigger)&&(_.guard="\\b"),_.trigger=d.escapeRegExp(_.tabTrigger)),!(!_.trigger&&!_.guard&&!_.endTrigger&&!_.endGuard)&&(_.startRe=I(_.trigger,_.guard),_.triggerRe=new RegExp(_.trigger),_.endRe=I(_.endTrigger,_.endGuard),_.endTriggerRe=new RegExp(_.endTrigger))}var F=this.snippetMap,D=this.snippetNameMap,A=this;O||(O=[]),Array.isArray(O)?O.forEach(W):Object.keys(O).forEach(function(_){W(O[_])}),this._signal("registerSnippets",{scope:N})},C.prototype.unregister=function(O,N){function L(F){var D=W[F.scope||N];if(D&&D[F.name]){delete D[F.name];var A=I[F.scope||N],_=A&&A.indexOf(F);_>=0&&A.splice(_,1)}}var I=this.snippetMap,W=this.snippetNameMap;O.content?L(O):Array.isArray(O)&&O.forEach(L)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var N=[],L={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,W;W=I.exec(O);){if(W[1])try{L=JSON.parse(W[1]),N.push(L)}catch{}if(W[4])L.content=W[4].replace(/^\t/gm,""),N.push(L),L={};else{var F=W[2],D=W[3];if(F=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;L.guard=A.exec(D)[1],L.trigger=A.exec(D)[1],L.endTrigger=A.exec(D)[1],L.endGuard=A.exec(D)[1]}else F=="snippet"?(L.tabTrigger=D.match(/^\S*/)[0],L.name||(L.name=D)):F&&(L[F]=D)}}return N},C.prototype.getSnippetByName=function(O,N){var L=this.snippetNameMap,I;return this.getActiveScopes(N).some(function(W){var F=L[W];return F&&(I=F[O]),!!I},this),I},C})();y.implement(m.prototype,c);var w=function(C,O,N){function L(he){for(var me=[],$e=0;$e<he.length;$e++){var Ee=he[$e];if(typeof Ee=="object"){if(M[Ee.tabstopId])continue;var Re=he.lastIndexOf(Ee,$e-1);Ee=me[Re]||{tabstopId:Ee.tabstopId}}me[$e]=Ee}return me}N===void 0&&(N={});var I=C.getCursorPosition(),W=C.session.getLine(I.row),F=C.session.getTabString(),D=W.match(/^\s*/)[0];I.column<D.length&&(D=D.slice(0,I.column)),O=O.replace(/\r/g,"");var A=this.tokenizeTmSnippet(O);A=this.resolveVariables(A,C),A=A.map(function(he){return he==`
|
|
1131
|
-
`&&!N.excludeExtraIndent?he+D:typeof he=="string"?he.replace(/\t/g,F):he});var _=[];A.forEach(function(he,me){if(typeof he=="object"){var $e=he.tabstopId,Ee=_[$e];if(Ee||(Ee=_[$e]=[],Ee.index=$e,Ee.value="",Ee.parents={}),Ee.indexOf(he)===-1){he.choices&&!Ee.choices&&(Ee.choices=he.choices),Ee.push(he);var Re=A.indexOf(he,me+1);if(Re!==-1){var rt=A.slice(me+1,Re),Xe=rt.some(function(at){return typeof at=="object"});Xe&&!Ee.value?Ee.value=rt:rt.length&&(!Ee.value||typeof Ee.value!="string")&&(Ee.value=rt.join(""))}}}}),_.forEach(function(he){he.length=0});for(var M={},B=0;B<A.length;B++){var j=A[B];if(typeof j=="object"){var V=j.tabstopId,K=_[V],J=A.indexOf(j,B+1);if(M[V]){M[V]===j&&(delete M[V],Object.keys(M).forEach(function(he){K.parents[he]=!0}));continue}M[V]=j;var oe=K.value;typeof oe!="string"?oe=L(oe):j.fmt&&(oe=this.tmStrFormat(oe,j,C)),A.splice.apply(A,[B+1,Math.max(0,J-B)].concat(oe,j)),K.indexOf(j)===-1&&K.push(j)}}var ee=0,se=0,ce="";return A.forEach(function(he){if(typeof he=="string"){var me=he.split(`
|
|
1132
|
-
`);me.length>1?(se=me[me.length-1].length,ee+=me.length-1):se+=he.length,ce+=he}else he&&(he.start?he.end={row:ee,column:se}:he.start={row:ee,column:se})}),{text:ce,tabstops:_,tokens:A}},x=(function(){function C(O){if(this.index=0,this.ranges=[],this.tabstops=[],O.tabstopManager)return O.tabstopManager;O.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(O)}return C.prototype.attach=function(O){this.$openTabstops=null,this.selectedTabstop=null,this.editor=O,this.session=O.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(O){for(var N=O.action[0]=="r",L=this.selectedTabstop||{},I=L.parents||{},W=this.tabstops.slice(),F=0;F<W.length;F++){var D=W[F],A=D==L||I[D.index];if(D.rangeList.$bias=A?0:1,O.action=="remove"&&D!==L){var _=D.parents&&D.parents[L.index],M=D.rangeList.pointIndex(O.start,_);M=M<0?-M-1:M+1;var B=D.rangeList.pointIndex(O.end,_);B=B<0?-B-1:B-1;for(var j=D.rangeList.ranges.slice(M,B),V=0;V<j.length;V++)this.removeRange(j[V])}D.rangeList.$onChange(O)}var K=this.session;!this.$inChange&&N&&K.getLength()==1&&!K.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var O=this.selectedTabstop;if(!(!O||!O.hasLinkedRanges||!O.firstNonLinked)){this.$inChange=!0;for(var N=this.session,L=N.getTextRange(O.firstNonLinked),I=0;I<O.length;I++){var W=O[I];if(W.linked){var F=W.original,D=r.snippetManager.tmStrFormat(L,F,this.editor);N.replace(W,D)}}this.$inChange=!1}},C.prototype.onAfterExec=function(O){O.command&&!O.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var O=this.editor.selection.lead,N=this.editor.selection.anchor,L=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var W=this.ranges[I].contains(O.row,O.column),F=L||this.ranges[I].contains(N.row,N.column);if(W&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var N=this.tabstops.length,L=this.index+(O||1);L=Math.min(Math.max(L,1),N),L==N&&(L=0),this.selectTabstop(L),this.updateTabstopMarkers(),L===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var N=this.tabstops[this.index];if(N&&this.addTabstopMarkers(N),this.index=O,N=this.tabstops[this.index],!(!N||!N.length)){this.selectedTabstop=N;var L=N.firstNonLinked||N;if(N.choices&&(L.cursor=L.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(L);else{var I=this.editor.multiSelect;I.toSingleRange(L);for(var W=0;W<N.length;W++)N.hasLinkedRanges&&N[W].linked||I.addRange(N[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(O,N,L){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var W=i.fromPoints(L,L);$(W.start,N),$(W.end,N),O[0]=[W],O[0].index=0}var F=this.index,D=[F+1,0],A=this.ranges,_=this.snippetId=(this.snippetId||0)+1;O.forEach(function(M,B){var j=this.$openTabstops[B]||M;j.snippetId=_;for(var V=0;V<M.length;V++){var K=M[V],J=i.fromPoints(K.start,K.end||K.start);R(J.start,N),R(J.end,N),J.original=K,J.tabstop=j,A.push(J),j!=M?j.unshift(J):j[V]=J,K.fmtString||j.firstNonLinked&&I?(J.linked=!0,j.hasLinkedRanges=!0):j.firstNonLinked||(j.firstNonLinked=J)}j.firstNonLinked||(j.hasLinkedRanges=!1),j===M&&(D.push(j),this.$openTabstops[B]=j),this.addTabstopMarkers(j),j.rangeList=j.rangeList||new l,j.rangeList.$bias=0,j.rangeList.addList(j)},this),D.length>2&&(this.tabstops.length&&D.push(D.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,D))},C.prototype.addTabstopMarkers=function(O){var N=this.session;O.forEach(function(L){L.markerId||(L.markerId=N.addMarker(L,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var N=this.session;O.forEach(function(L){N.removeMarker(L.markerId),L.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var O=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&O--,this.tabstops.forEach(function(N){N.snippetId===O?this.addTabstopMarkers(N):this.removeTabstopMarkers(N)},this)}},C.prototype.removeRange=function(O){var N=O.tabstop.indexOf(O);N!=-1&&O.tabstop.splice(N,1),N=this.ranges.indexOf(O),N!=-1&&this.ranges.splice(N,1),N=O.tabstop.rangeList.ranges.indexOf(O),N!=-1&&O.tabstop.splice(N,1),this.session.removeMarker(O.markerId),O.tabstop.length||(N=this.tabstops.indexOf(O.tabstop),N!=-1&&this.tabstops.splice(N,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new u,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var R=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},$=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};g.importCssString(`
|
|
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 m;var k=e("./editor").Editor;(function(){this.insertSnippet=function(C,O){return r.snippetManager.insertSnippet(this,C,O)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,h){var f=e("../virtual_renderer").VirtualRenderer,g=e("../editor").Editor,y=e("../range").Range,c=e("../lib/event"),d=e("../lib/lang"),i=e("../lib/dom"),l=e("../config").nls,u=e("./../lib/useragent"),p=function(R){return"suggest-aria-id:".concat(R)},o=u.isSafari?"menu":"listbox",s=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",w=function(R){var $=new f(R);$.$maxLines=4;var k=new g($);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},x=(function(){function R($){var k=i.createElement("div"),C=w(k);$&&$.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",l("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",l("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var O=function(){};C.focus=O,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=O,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(A){var _=A.getDocumentPosition();C.selection.moveToPosition(_),I.start.row=I.end.row=_.row,A.stop()});var N,L=new y(-1,0,-1,1/0),I=new y(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(A){A?L.id&&(C.session.removeMarker(L.id),L.id=null):L.id=C.session.addMarker(L,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(A){if(!N){N=A;return}if(!(N.x==A.x&&N.y==A.y)){N=A,N.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var _=N.getDocumentPosition().row;L.start.row!=_&&(L.id||C.setRow(_),F(_))}}),C.renderer.on("beforeRender",function(){if(N&&L.start.row!=-1){N.$pos=null;var A=N.getDocumentPosition().row;L.id||C.setRow(A),F(A,!0)}}),C.renderer.on("afterRender",function(){for(var A=C.renderer.$textLayer,_=A.config.firstRow,M=A.config.lastRow;_<=M;_++){var B=A.element.childNodes[_-A.config.firstRow];B.setAttribute("role",s),B.setAttribute("aria-roledescription",l("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",_+1);var j=C.getData(_);if(j){var V="".concat(j.caption||j.value).concat(j.meta?", ".concat(j.meta):"");B.setAttribute("aria-label",V)}var K=B.querySelectorAll(".ace_completion-highlight");K.forEach(function(J){J.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var A=C.getRow(),_=C.renderer.$textLayer,M=_.element.childNodes[A-_.config.firstRow],B=document.activeElement;if(M!==C.selectedNode&&C.selectedNode&&(i.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=M,M){var j=p(A);i.addCssClass(M,"ace_selected"),M.id=j,_.element.setAttribute("aria-activedescendant",j),B.setAttribute("aria-activedescendant",j),M.setAttribute(m,"true")}});var W=function(){F(-1)},F=function(A,_){A!==L.start.row&&(L.start.row=L.end.row=A,_||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return L.start.row},c.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(A){var _=C.data[A];return typeof _=="string"?_:_&&_.value||""};var D=C.session.bgTokenizer;return D.$tokenizeRow=function(A){function _(he,me){he&&B.push({type:(M.className||"")+(me||""),value:he})}var M=C.data[A],B=[];if(!M)return B;typeof M=="string"&&(M={value:M});for(var j=M.caption||M.value||M.name,V=j.toLowerCase(),K=(C.filterText||"").toLowerCase(),J=0,oe=0,ee=0;ee<=K.length;ee++)if(ee!=oe&&(M.matchMask&1<<ee||ee==K.length)){var se=K.slice(oe,ee);oe=ee;var ce=V.indexOf(se,J);if(ce==-1)continue;_(j.slice(J,ce),""),J=ce+se.length,_(j.slice(ce,J),"completion-highlight")}return _(j.slice(J,j.length),""),B.push({type:"completion-spacer",value:" "}),M.meta&&B.push({type:"completion-meta",value:M.meta}),M.message&&B.push({type:"completion-message",value:M.message}),B},D.$updateOnChange=O,D.start=O,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(A,_){C.filterText=_||"",C.setValue(d.stringRepeat(`
|
|
1140
|
-
`,A.length),-1),C.data=A||[],C.setRow(0)},C.getData=function(A){return C.data[A]},C.getRow=function(){return I.start.row},C.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),I.start.row!=A&&(C.selection.clearSelection(),I.start.row=I.end.row=A||0,C.session._emit("changeBackMarker"),C.moveCursorTo(A||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(A,_,M,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===A.top&&C.anchorPos.left===A.left&&C.anchor===M)return!0;var j=this.container,V=this.renderer.scrollBar.width||10,K=window.innerHeight-V,J=window.innerWidth-V,oe=this.renderer,ee=oe.$maxLines*_*1.4,se={top:0,bottom:0},ce=K-A.top-3*this.$borderSize-_,he=A.top-3*this.$borderSize;M||(he<=ce||ce>=ee?M="bottom":M="top"),M==="top"?(se.bottom=A.top-this.$borderSize,se.top=se.bottom-ee):M==="bottom"&&(se.top=A.top+_+this.$borderSize,se.bottom=se.top+ee);var me=se.top>=0&&se.bottom<=K;if(!B&&!me)return!1;me?oe.$maxPixelHeight=null:M==="top"?oe.$maxPixelHeight=he:oe.$maxPixelHeight=ce,M==="top"?(j.style.top="",j.style.bottom=K+V-se.bottom+"px",C.isTopdown=!1):(j.style.top=se.top+"px",j.style.bottom="",C.isTopdown=!0),j.style.display="";var $e=A.left;return $e+j.offsetWidth>J&&($e=J-j.offsetWidth),j.style.left=$e+"px",j.style.right="",i.$fixPositionBug(j),C.isOpen||(C.isOpen=!0,this._signal("show"),N=null),C.anchorPos=A,C.anchor=M,!0},C.show=function(A,_,M){this.tryShow(A,_,M?"bottom":void 0,!0)},C.goTo=function(A){var _=this.getRow(),M=this.session.getLength()-1;switch(A){case"up":_=_<=0?M:_-1;break;case"down":_=_>=M?-1:_+1;break;case"start":_=0;break;case"end":_=M}this.setRow(_)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return R})();i.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=w,r.getAriaId=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,h){var f=(function(){function g(y){this.editor=y,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(y){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var d=this.popup.getRow(),i=this.popup.renderer.$textLayer,l=i.element.childNodes[d-i.config.firstRow];if(l){for(var u="doc-tooltip ",p=0;p<this._lines.length;p++)u+="ace-inline-screenreader-line-".concat(p," ");l.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=y.split(/\r\n|\r|\n/);var c=this.createCodeBlock();this.screenReaderDiv.appendChild(c)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var y=document.createElement("pre");y.setAttribute("id","ace-inline-screenreader");for(var c=0;c<this._lines.length;c++){var d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(c));var i=document.createTextNode(this._lines[c]);d.appendChild(i),y.appendChild(d)}return y},g})();r.AceInlineScreenReader=f}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,h){var f=e("../snippets").snippetManager,g=e("./inline_screenreader").AceInlineScreenReader,y=(function(){function c(){this.editor=null}return c.prototype.show=function(d,i,l){if(l=l||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!i)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(d));var u=i.snippet?f.getDisplayTextForSnippet(d,i.snippet):i.value;return i.hideInlinePreview||!u||!u.startsWith(l)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(l.length),u===""?d.removeGhostText():d.setGhostText(u),!0)},c.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},c.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},c.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},c})();r.AceInline=y}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,h){r.parForEach=function(g,y,c){var d=0,i=g.length;i===0&&c();for(var l=0;l<i;l++)y(g[l],function(u,p){d++,d===i&&c(u,p)})};var f=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,y,c){c=c||f;for(var d=[],i=y-1;i>=0&&c.test(g[i]);i--)d.push(g[i]);return d.reverse().join("")},r.retrieveFollowingIdentifier=function(g,y,c){c=c||f;for(var d=[],i=y;i<g.length&&c.test(g[i]);i++)d.push(g[i]);return d},r.getCompletionPrefix=function(g){var y=g.getCursorPosition(),c=g.session.getLine(y.row),d;return g.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(l){!d&&l&&(d=this.retrievePrecedingIdentifier(c,y.column,l))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(c,y.column)},r.triggerAutocomplete=function(g,c){var c=c??g.session.getPrecedingCharacter();return g.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.triggerCharacters.includes(c)})}}),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,h){var f=e("./keyboard/hash_handler").HashHandler,g=e("./autocomplete/popup").AcePopup,y=e("./autocomplete/inline").AceInline,c=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),i=e("./lib/lang"),l=e("./lib/dom"),u=e("./snippets").snippetManager,p=e("./config"),o=e("./lib/event"),s=e("./lib/scroll").preventParentScroll,m=function($,k){k.completer&&k.completer.destroy()},w=(function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new f,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=i.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=i.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=i.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=i.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=i.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new R($.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:p.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new y,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(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},$.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(k){var C=this.base.row,O=this.base.column,N=this.editor.getCursorPosition().column,L=this.editor.session.getLine(C).slice(O,N);this.inlineRenderer.show(this.editor,k,L)?this.$seen(k):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var O=this.popup.getData(C);O&&(!k||O.hideInlinePreview)&&this.$seen(O)}},$.prototype.$onPopupShow=function(k){this.$onPopupChange(k),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 k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,O=C.layerConfig.lineHeight,N=C.$cursorLayer.getPixelPosition(this.base,!0);N.left-=this.popup.getTextLeftOffset();var L=k.container.getBoundingClientRect();N.top+=L.top-C.layerConfig.offset,N.left+=L.left-k.renderer.scrollLeft,N.left+=C.gutterWidth;var I={top:N.top,left:N.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var W=k.container.getBoundingClientRect().bottom-O,F=W<I.top?{top:W,left:I.left}:I;this.popup.tryShow(F,O,"bottom")||this.popup.tryShow(N,O,"top")||this.popup.show(N,O)},$.prototype.openPopup=function(k,C,O){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var N=this.popup.getRow(),L=this.popup.data[N];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:c(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(L)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===N&&L!==this.completions.filtered[I]&&this.$onPopupChange();var W=this.inlineRenderer&&this.inlineEnabled;if(I===N&&W){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}O||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.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(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(k){var C=document.activeElement,O=this.editor.textInput.getElement(),N=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),L=this.popup&&this.popup.container;C!=O&&C.parentNode!=L&&!N&&C!=this.tooltipNode&&k.relatedTarget!=O&&this.detach()},$.prototype.mousedownListener=function(k){this.detach()},$.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(k){this.popup.goTo(k)},$.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var O=this.completions,N=this.getCompletionProvider().insertMatch(this.editor,k,O.filterText,C);return this.completions==O&&this.detach(),N},$.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},$.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},$.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var N=this.editor.getCursorPosition(),L=this.editor.session.getTextRange({start:this.base,end:N});if(L==this.completions.filterText)return;if(this.completions.setFilter(L),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==L&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,L,k);return}if(C&&C.matches){var N=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(N.row,N.column),this.base.$insertRight=!0,this.completions=new R(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var O=this.editor.getSession(),N=this.editor.getCursorPosition(),L=d.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(N.row,N.column-L.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:L,pos:N}).provideCompletions(this.editor,I,(function(W,F,D){var A=F.filtered,_=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),D){if(!A.length){var M=!this.autoShown&&this.emptyMessage;if(typeof M=="function"&&(M=this.emptyMessage(_)),M){var B=[{caption:M,value:""}];this.completions=new R(B),this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==_&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!D&&this.showLoadingState?new R($.completionsForLoading.concat(A),F.filterText):F,this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!D)}).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 k=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[k.getHoveredRow()]||C[k.getRow()]),N=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var L=this.editor.completers.length,I=0;I<L;I++){var W=this.editor.completers[I];if(W.getDocTooltip&&O.completerId===W.id){N=W.getDocTooltip(O);break}}if(!N&&typeof O!="string"&&(N=O),typeof N=="string"&&(N={docText:N}),!N||!N.docHTML&&!N.docText)return this.hideDocTooltip();this.showDocTooltip(N)},$.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=l.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",s));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;k.docHTML?O.innerHTML=k.docHTML:k.docText&&(O.textContent=k.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var N=this.popup,L=N.container.getBoundingClientRect(),I=400,W=300,F=N.renderer.scrollBar.width||10,D=L.left,A=window.innerWidth-L.right-F,_=N.isTopdown?window.innerHeight-F-L.bottom:L.top,M=[Math.min(A/I,1),Math.min(D/I,1),Math.min(_/W,1)*.9],B=Math.max.apply(Math,M),j=O.style;j.display="block",B==M[0]||M[0]>=1?(j.left=L.right+1+"px",j.right="",j.maxWidth=I*B+"px",j.top=L.top+"px",j.bottom="",j.maxHeight=Math.min(window.innerHeight-F-L.top,W)+"px"):B==M[1]||M[1]>=1?(j.right=window.innerWidth-L.left+"px",j.left="",j.maxWidth=I*B+"px",j.top=L.top+"px",j.bottom="",j.maxHeight=Math.min(window.innerHeight-F-L.top,W)+"px"):B==M[2]&&(j.left=L.left+"px",j.right="",j.maxWidth=Math.min(I,window.innerWidth-L.left)+"px",N.isTopdown?(j.top=L.bottom+"px",j.bottom="",j.maxHeight=Math.min(window.innerHeight-F-L.bottom,W)+"px"):(j.top="",j.bottom=window.innerHeight-L.top+"px",j.maxHeight=Math.min(L.top,W)+"px")),l.$fixPositionBug(O)},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},$.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(k){return k.completer instanceof $||(k.completer&&(k.completer.destroy(),k.completer=null),p.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),k.completer=$.$sharedInstance):(k.completer=new $,k.once("destroy",m))),k.completer},$})();w.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 k=$.completer.insertMatch();if(k||$.tabstopManager)return k;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var k=d.getCompletionPrefix($);!k&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,k){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function $(k){this.initialPosition=k,this.active=!0}return $.prototype.insertByIndex=function(k,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],O)},$.prototype.insertMatch=function(k,C,O){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var N=this.completions.filterText.length,L=0;if(C.range&&C.range.start.row===C.range.end.row&&(N-=this.initialPosition.prefix.length,N+=this.initialPosition.pos.column-C.range.start.column,L+=C.range.end.column-this.initialPosition.pos.column),N||L){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var W=0,F;F=I[W];W++)F.start.column-=N,F.end.column+=L,k.session.remove(F)}C.snippet?u.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},$.prototype.$insertString=function(k,C){var O=C.value||C;k.execCommand("insertstring",O)},$.prototype.gatherCompletions=function(k,C){var O=k.getSession(),N=k.getCursorPosition(),L=d.getCompletionPrefix(k),I=[];this.completers=k.completers;var W=k.completers.length;return k.completers.forEach(function(F,D){F.getCompletions(k,O,N,L,function(A,_){F.hideInlinePreview&&(_=_.map(function(M){return Object.assign(M,{hideInlinePreview:F.hideInlinePreview})})),!A&&_&&(I=I.concat(_)),C(null,{prefix:d.getCompletionPrefix(k),matches:I,finished:--W===0})})}),!0},$.prototype.provideCompletions=function(k,C,O){var N=(function(F){var D=F.prefix,A=F.matches;this.completions=new R(A),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(D),(F.finished||this.completions.filtered.length)&&O(null,this.completions,F.finished)}).bind(this),L=!0,I=null;if(this.gatherCompletions(k,(function(F,D){if(this.active){F&&(O(F,[],!0),this.detach());var A=D.prefix;if(A.indexOf(D.prefix)===0){if(L){I=D;return}N(D)}}}).bind(this)),L=!1,I){var W=I;I=null,N(W)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},$})(),R=(function(){function $(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(N,L){return L.exactMatch-N.exactMatch||L.$score-N.$score||(N.caption||N.value).localeCompare(L.caption||L.value)});var O=null;C=C.filter(function(N){var L=N.snippet||N.caption||N.value;return L===O?!1:(O=L,!0)}),this.filtered=C},$.prototype.filterCompletions=function(k,C){var O=[],N=C.toUpperCase(),L=C.toLowerCase();e:for(var I=0,W;W=k[I];I++){if(W.skipFilter){W.$score=W.score,O.push(W);continue}var F=!this.ignoreCaption&&W.caption||W.value||W.snippet;if(F){var D=-1,A=0,_=0,M,B;if(this.exactMatch){if(C!==F.substr(0,C.length))continue e}else{var j=F.toLowerCase().indexOf(L);if(j>-1)_=j;else for(var V=0;V<C.length;V++){var K=F.indexOf(L[V],D+1),J=F.indexOf(N[V],D+1);if(M=K>=0&&(J<0||K<J)?K:J,M<0)continue e;B=M-D-1,B>0&&(D===-1&&(_+=10),_+=B,A|=1<<V),D=M}}W.matchMask=A,W.exactMatch=_?0:1,W.$score=(W.score||0)-_,O.push(W)}}return O},$})();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,h){var f=(function(){function g(y,c){c&&(this.markerType=c.markerType),this.markers=[],this.session=y,y.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(y){return this.markers.find(function(c){return c.range.contains(y.row,y.column)})},g.prototype.markersComparator=function(y,c){return y.range.start.row-c.range.start.row},g.prototype.setMarkers=function(y){this.markers=y.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(y,c,d,i){if(!(!this.markers||!this.markers.length))for(var l=i.firstRow,u=i.lastRow,p,o=0,s=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<l)&&!(w.range.start.row>u)&&(w.range.start.row===s?o++:(s=w.range.start.row,o=0),!(o>200))){var x=w.range.clipRows(l,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var R=x.toScreenRange(d);if(R.isEmpty()){p=d.getNextFoldLine(x.end.row,p),p&&p.end.row>x.end.row&&(l=p.end.row);continue}this.markerType==="fullLine"?c.drawFullLineMarker(y,R,w.className,i):R.isMultiLine()?this.markerType==="line"?c.drawMultiLineMarker(y,R,w.className,i):c.drawTextMarker(y,R,w.className,i):c.drawSingleLineMarker(y,R,w.className+" ace_br15",i)}}}},g})();f.prototype.MAX_MARKERS=1e4,r.MarkerGroup=f}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,h){function f(d,i){var l=d.getTextRange(y.fromPoints({row:0,column:0},i));return l.split(c).length-1}function g(d,i){var l=f(d,i),u=d.getValue().split(c),p=Object.create(null),o=u[l];return u.forEach(function(s,m){if(!(!s||s===o)){var w=Math.abs(l-m),x=u.length-w;p[s]?p[s]=Math.max(x,p[s]):p[s]=x}}),p}var y=e("../range").Range,c=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(d,i,l,u,p){var o=g(i,l),s=Object.keys(o);p(null,s.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,h){var f=e("../snippets").snippetManager,g=e("../autocomplete").Autocomplete,y=e("../config"),c=e("../lib/lang"),d=e("../autocomplete/util"),i=e("../marker_group").MarkerGroup,l=e("../autocomplete/text_completer"),u={getCompletions:function(L,I,W,F,D){if(I.$mode.completer)return I.$mode.completer.getCompletions(L,I,W,F,D);var A=L.session.getState(W.row),_=I.$mode.getCompletions(A,I,W,F);_=_.map(function(M){return M.completerId=u.id,M}),D(null,_)},id:"keywordCompleter"},p=function(L){var I={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(W,F,D,A){return I[F]=A||""}).replace(/\$(\d+?)/g,function(W,F){return I[F]})},o={getCompletions:function(L,I,W,F,D){var A=[],_=I.getTokenAt(W.row,W.column);_&&_.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?A.push("html-tag"):A=f.getActiveScopes(L);var M=f.snippetMap,B=[];A.forEach(function(j){for(var V=M[j]||[],K=V.length;K--;){var J=V[K],oe=J.name||J.tabTrigger;oe&&B.push({caption:oe,snippet:J.content,meta:J.tabTrigger&&!J.name?J.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),D(null,B)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",c.escapeHTML(L.caption),"</b>","<hr></hr>",c.escapeHTML(p(L.snippet))].join(""))},id:"snippetCompleter"},s=[o,l,u];r.setCompleters=function(L){s.length=0,L&&s.push.apply(s,L)},r.addCompleter=function(L){s.push(L)},r.textCompleter=l,r.keyWordCompleter=u,r.snippetCompleter=o;var m={name:"expandSnippet",exec:function(L){return f.expandWithTab(L)},bindKey:"Tab"},w=function(L,I){x(I.session.$mode)},x=function(L){typeof L=="string"&&(L=y.$modes[L]),L&&(f.files||(f.files={}),R(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(x))},R=function(L,I){!I||!L||f.files[L]||(f.files[L]={},y.loadModule(I,function(W){W&&(f.files[L]=W,!W.snippets&&W.snippetText&&(W.snippets=f.parseSnippetFile(W.snippetText)),f.register(W.snippets||[],W.scope),W.includeScopes&&(f.snippetMap[W.scope].includeScopes=W.includeScopes,W.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},$=function(L){var I=L.editor,W=I.completer&&I.completer.activated;if(L.command.name==="backspace")W&&!d.getCompletionPrefix(I)&&I.completer.detach();else if(L.command.name==="insertstring"&&!W){k=L;var F=L.editor.$liveAutocompletionDelay;F?C.delay(F):O(L)}},k,C=c.delayedCall(function(){O(k)},0),O=function(L){var I=L.editor,W=d.getCompletionPrefix(I),F=L.args,D=d.triggerAutocomplete(I,F);if(W&&W.length>=I.$liveAutocompletionThreshold||D){var A=g.for(I);A.autoShown=!0,A.showPopup(I)}},N=e("../editor").Editor;e("../config").defineOptions(N.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(g.for(this),this.completers||(this.completers=Array.isArray(L)?L:s),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:s),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=i}),(function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})})()})(Vm)),Vm.exports}hS();var qm={exports:{}},Ym;function dS(){return Ym||(Ym=1,(function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,h){h.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,h){var f=e("../lib/dom"),g=e("../lib/lang"),y=e("../lib/event"),c=e("./searchbox-css"),d=e("../keyboard/hash_handler").HashHandler,i=e("../lib/keys"),l=e("../config").nls,u=999;f.importCssString(c,"ace_searchbox",!1);var p=(function(){function m(w,x,R){this.activeInput,this.element=f.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:l("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},l("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:l("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},l("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},l("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:l("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:l("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:l("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:l("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:l("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),f.importCssString(c,"ace_searchbox",w.container),y.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;y.addListener(w,"mousedown",function(R){setTimeout(function(){x.activeInput.focus()},0),y.stopPropagation(R)}),y.addListener(w,"click",function(R){var $=R.target||R.srcElement,k=$.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),y.stopPropagation(R)}),y.addCommandKeyListener(w,function(R,$,k){var C=i.keyCodeToString(k),O=x.$searchBarKb.findKeyCommand($,C);O&&O.exec&&(O.exec(x),y.stopEvent(R))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),y.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),y.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),y.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){f.setCssClass(this.replaceOption,"checked",this.searchRange),f.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",f.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),f.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),f.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,R){if(this.editor.session){var $=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),k=!$&&this.searchInput.value;f.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,R=x.unicode,$=0,k=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
|
1394
|
-
`),w.session.doc.$autoNewLine=`
|
|
1395
|
-
`);var O=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(O-=w.session.doc.positionToIndex(this.searchRange.start));for(var N=x.lastIndex=0,L;(L=x.exec(C))&&($++,N=L.index,N<=O&&k++,!($>u||!L[0]&&(x.lastIndex=N+=g.skipEmptyMatch(C,N,R),N>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[k,$>u?u+"+":$])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;f.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(w,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&&(w=g.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m})(),o=new d;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},Tab:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var s=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);p.prototype.$searchBarKb=o,p.prototype.$closeSearchBarKb=s,r.SearchBox=p,r.Search=function(m,w){var x=m.searchBox||new p(m),R=m.session.selection.getRange(),$=R.isMultiLine()?"":m.session.getTextRange(R);x.show($,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})})()})(qm)),qm.exports}dS();var Km={exports:{}},Xm;function fS(){return Xm||(Xm=1,(function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,h){function f(d,i){function l(L,I,W){if(!(L.length<I)){var F=L.slice(0,I),D=L.slice(I),A=/^(?:(\s+)|(\S+)(\s+))/.exec(D),_=/(?:(\s+)|(\s+)(\S+))$/.exec(F),M=0,B=0;if(_&&!_[2]&&(M=I-_[1].length,B=I),A&&!A[2]&&(M||(M=I),B=I+A[1].length),M)return{start:M,end:B};if(_&&_[2]&&_.index>W)return{start:_.index,end:_.index+_[2].length};if(A&&A[2])return M=I+A[2].length,{start:M,end:M+A[3].length}}}for(var u=i.column||d.getOption("printMarginColumn"),p=i.allowMerge!=0,o=Math.min(i.startRow,i.endRow),s=Math.max(i.startRow,i.endRow),m=d.session;o<=s;){var w=m.getLine(o);if(w.length>u){var x=l(w,u,5);if(x){var R=/^\s*/.exec(w)[0];m.replace(new y(o,x.start,o,x.end),`
|
|
1396
|
-
`+R)}s++}else if(p&&/\S/.test(w)&&o!=s){var $=m.getLine(o+1);if($&&/\S/.test($)){var k=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),O=k+" "+C,x=l(O,u,5);if(x&&x.start>k.length||O.length<u){var N=new y(o,k.length,o+1,$.length-C.length);m.replace(N," "),o--,s--}else k.length<w.length&&m.remove(new y(o,k.length,o,w.length))}}o++}}function g(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var i=d.editor,l=i.selection.cursor;if(l.column<=i.renderer.$printMarginColumn)return;var u=i.session.$undoManager.$lastDelta;f(i,{startRow:l.row,endRow:l.row,allowMerge:!1}),u!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var y=e("../range").Range,c=e("../editor").Editor;e("../config").defineOptions(c.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=f}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,h){function f(b){return{row:b.line,column:b.ch}}function g(b){return new De(b.row,b.column)}function y(b,E,S){if(E.line===S.line&&E.ch>=S.ch-1){var P=b.getLine(E.line),z=P.charCodeAt(E.ch);55296<=z&&z<=55551&&(S.ch+=1)}return{start:E,end:S}}function c(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),Be.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",yo),O(b),Be.on(b.getInputField(),"paste",i(b))}function d(b){b.setOption("disableInput",!1),b.off("cursorActivity",yo),Be.off(b.getInputField(),"paste",i(b)),b.state.vim=null,ln&&clearTimeout(ln)}function i(b){var E=b.state.vim;return E.onPasteFn||(E.onPasteFn=function(){E.insertMode||(b.setCursor(me(b.getCursor(),0,1)),Vn.enterInsertMode(b,{},E))}),E.onPasteFn}function l(b,E){return E>=b.firstLine()&&E<=b.lastLine()}function u(b){return/^[a-z]$/.test(b)}function p(b){return"()[]{}".indexOf(b)!=-1}function o(b){return Ma.test(b)}function s(b){return ht.test(b)}function m(b){return/^\s*$/.test(b)}function w(b){return".?!".indexOf(b)!=-1}function x(b,E){for(var S=0;S<E.length;S++)if(E[S]==b)return!0;return!1}function R(b,E,S,P,z){if(E===void 0&&!z)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),Gt[b]={type:S,defaultValue:E,callback:z},P)for(var H=0;H<P.length;H++)Gt[P[H]]=Gt[b];E&&$(b,E)}function $(b,E,S,P){var z=Gt[b];P=P||{};var H=P.scope;if(!z)return new Error("Unknown option: "+b);if(z.type=="boolean"){if(E&&E!==!0)return new Error("Invalid argument: "+b+"="+E);E!==!1&&(E=!0)}z.callback?(H!=="local"&&z.callback(E,void 0),H!=="global"&&S&&z.callback(E,S)):(H!=="local"&&(z.value=z.type=="boolean"?!!E:E),H!=="global"&&S&&(S.state.vim.options[b]={value:E}))}function k(b,E,S){var P=Gt[b];S=S||{};var z=S.scope;if(!P)return new Error("Unknown option: "+b);if(P.callback){var H=E&&P.callback(void 0,E);return z!=="global"&&H!==void 0?H:z!=="local"?P.callback():void 0}var H=z!=="global"&&E&&E.state.vim.options[b];return(H||z!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Un()}function O(b){return b.state.vim||(b.state.vim={inputState:new A,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}),b.state.vim}function N(){Ve={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Fi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new K,exCommandHistoryController:new K};for(var b in Gt){var E=Gt[b];E.value=E.defaultValue}}function L(b){function E(X){typeof X=="string"?zt.value=X:zt=null}if(b[0]=="<"){var S=b.toLowerCase().slice(1,-1),P=S.split("-");if(S=P.pop()||"",S=="lt")b="<";else if(S=="space")b=" ";else if(S=="cr")b=`
|
|
1397
|
-
`;else if(so[S]){var z=zt.value,H={key:so[S],target:{value:z,selectionEnd:z.length,selectionStart:z.length}};zt.onKeyDown&&zt.onKeyDown(H,zt.value,E),zt&&zt.onKeyUp&&zt.onKeyUp(H,zt.value,E);return}}if(b==`
|
|
1398
|
-
`){var q=zt;zt=null,q.onClose&&q.onClose(q.value)}else zt.value=(zt.value||"")+b}function I(b,E,S){var P=zi;if(S){if(Fr.indexOf(S)!=-1)return;Fr.push(S),zi=S.noremap!=0}try{for(var z=O(b),H=/<(?:[CSMA]-)*\w+>|./gi,q;q=H.exec(E);){var X=q[0],Q=z.insertMode;if(zt){L(X);continue}var re=kt.handleKey(b,X,"mapping");if(!re&&Q&&z.insertMode){if(X[0]=="<"){var ue=X.toLowerCase().slice(1,-1),ye=ue.split("-");if(ue=ye.pop()||"",ue=="lt")X="<";else if(ue=="space")X=" ";else if(ue=="cr")X=`
|
|
1399
|
-
`;else{if(so.hasOwnProperty(ue)){X=so[ue],Fs(b,X);continue}X=X[0],H.lastIndex=q.index+1}}b.replaceSelection(X)}}}finally{if(Fr.pop(),zi=Fr.length?P:!1,!Fr.length&&zt){var Ce=zt;zt=null,dr(b,Ce)}}}function W(b,E){var S=b.key;if(!rr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=zr[S]||S;var P="";if(b.ctrlKey&&(P+="C-"),b.altKey&&(P+="A-"),b.metaKey&&(P+="M-"),Be.isMac&&b.altKey&&!b.metaKey&&!b.ctrlKey&&(P=P.slice(2)),(P||S.length>1)&&b.shiftKey&&(P+="S-"),E&&!E.expectLiteralNext&&S.length==1){if(Bn.keymap&&S in Bn.keymap)(Bn.remapCtrl!=0||!P)&&(S=Bn.keymap[S]);else if(S.charCodeAt(0)>255){var z=b.code&&b.code.slice(-1)||"";b.shiftKey||(z=z.toLowerCase()),z&&(S=z)}}return P+=S,P.length>1&&(P="<"+P+">"),P}}function F(b,E){Bn.string!==b&&(Bn=D(b)),Bn.remapCtrl=E}function D(b){function E(P){return P.split(/\\?(.)/).filter(Boolean)}var S={};return b?(b.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var z=P.split(/((?:[^\\;]|\\.)+);/);if(z.length==3){var H=E(z[1]),q=E(z[2]);if(H.length!==q.length)return;for(var X=0;X<H.length;++X)S[H[X]]=q[X]}else if(z.length==1){var Q=E(P);if(Q.length%2!==0)return;for(var X=0;X<Q.length;X+=2)S[Q[X]]=Q[X+1]}}}),{keymap:S,string:b}):{keymap:S,string:""}}function A(){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 _(b,E){b.state.vim.inputState=new A,b.state.vim.expectLiteralNext=!1,Be.signal(b,"vim-command-done",E)}function M(){this.removed=[],this.inserted=""}function B(b,E,S){this.clear(),this.keyBuffer=[b||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!E,this.blockwise=!!S}function j(b,E){var S=Ve.registerController.registers;if(!b||b.length!=1)throw Error("Register name must be 1 character");S[b]=E,Ws.push(b)}function V(b){this.registers=b,this.unnamedRegister=b['"']=new B,b["."]=new B,b[":"]=new B,b["/"]=new B,b["+"]=new B}function K(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function J(b,E){Ln[b]=E}function oe(b,E){for(var S=[],P=0;P<E;P++)S.push(b);return S}function ee(b,E){ts[b]=E}function se(b,E){Vn[b]=E}function ce(b,E,S){var P=b.state.vim,z=P.insertMode||P.visualMode,H=Math.min(Math.max(b.firstLine(),E.line),b.lastLine()),q=b.getLine(H),X=q.length-1+ +!!z,Q=Math.min(Math.max(0,E.ch),X),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var ue=1;S&&S.line==H&&S.ch>Q&&(ue=-1),Q+=ue,Q>X&&(Q-=2)}return new De(H,Q)}function he(b){var E={};for(var S in b)b.hasOwnProperty(S)&&(E[S]=b[S]);return E}function me(b,E,S){return typeof E=="object"&&(S=E.ch,E=E.line),new De(b.line+E,b.ch+S)}function $e(b,E,S,P){P.operator&&(S="operatorPending");for(var z,H=[],q=[],X=zi?E.length-Oo:0,Q=X;Q<E.length;Q++){var re=E[Q];S=="insert"&&re.context!="insert"||re.context&&re.context!=S||P.operator&&re.type=="action"||!(z=Ee(b,re.keys))||(z=="partial"&&H.push(re),z=="full"&&q.push(re))}return{partial:H.length&&H,full:q.length&&q}}function Ee(b,E){var S=E.slice(-11)=="<character>",P=E.slice(-10)=="<register>";if(S||P){var z=E.length-(S?11:10),H=b.slice(0,z),q=E.slice(0,z);return H==q&&b.length>z?"full":q.indexOf(H)==0?"partial":!1}return b==E?"full":E.indexOf(b)==0?"partial":!1}function Re(b){var E=/^.*(<[^>]+>)$/.exec(b),S=E?E[1]:b.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
|
|
1400
|
-
`;break;case"<Space>":S=" ";break;default:S=""}return S}function rt(b,E,S){return function(){for(var P=0;P<S;P++)E(b)}}function Xe(b){return new De(b.line,b.ch)}function at(b,E){return b.ch==E.ch&&b.line==E.line}function ut(b,E){return b.line<E.line?!0:b.line==E.line&&b.ch<E.ch}function st(b,E){return arguments.length>2&&(E=st.apply(void 0,Array.prototype.slice.call(arguments,1))),ut(b,E)?b:E}function Ht(b,E){return arguments.length>2&&(E=Ht.apply(void 0,Array.prototype.slice.call(arguments,1))),ut(b,E)?E:b}function _r(b,E,S){var P=ut(b,E),z=ut(E,S);return P&&z}function Rt(b,E){return b.getLine(E).length}function cr(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")}function Mn(b){return b.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function kr(b,E,S){var P=Rt(b,E),z=new Array(S-P+1).join(" ");b.setCursor(new De(E,P)),b.replaceRange(z,b.getCursor())}function yn(b,E){var S=[],P=b.listSelections(),z=Xe(b.clipPos(E)),H=!at(E,z),q=b.getCursor("head"),X=pt(P,q),Q=at(P[X].head,P[X].anchor),re=P.length-1,ue=re-X>X?re:0,ye=P[ue].anchor,Ce=Math.min(ye.line,z.line),ve=Math.max(ye.line,z.line),we=ye.ch,Oe=z.ch,Ie=P[ue].head.ch-we,Ye=Oe-we;Ie>0&&Ye<=0?(we++,H||Oe--):Ie<0&&Ye>=0?(we--,Q||Oe++):Ie<0&&Ye==-1&&(we--,Oe++);for(var dt=Ce;dt<=ve;dt++){var tt={anchor:new De(dt,we),head:new De(dt,Oe)};S.push(tt)}return b.setSelections(S),E.ch=Oe,ye.ch=we,ye}function ur(b,E,S){for(var P=[],z=0;z<S;z++){var H=me(E,z,0);P.push({anchor:H,head:H})}b.setSelections(P,0)}function pt(b,E,S){for(var P=0;P<b.length;P++){var z=at(b[P].anchor,E),H=at(b[P].head,E);if(z||H)return P}return-1}function Ke(b,E){var S=E.lastSelection,P=function(){var H=b.listSelections(),q=H[0],X=H[H.length-1],Q=ut(q.anchor,q.head)?q.anchor:q.head,re=ut(X.anchor,X.head)?X.head:X.anchor;return[Q,re]},z=function(){var H=b.getCursor(),q=b.getCursor(),X=S.visualBlock;if(X){var Q=X.width,re=X.height;q=new De(H.line+re,H.ch+Q);for(var ue=[],ye=H.line;ye<q.line;ye++){var Ce=new De(ye,H.ch),ve=new De(ye,q.ch),we={anchor:Ce,head:ve};ue.push(we)}b.setSelections(ue)}else{var Oe=S.anchorMark.find(),Ie=S.headMark.find(),Ye=Ie.line-Oe.line,dt=Ie.ch-Oe.ch;q={line:q.line+Ye,ch:Ye?q.ch:dt+q.ch},S.visualLine&&(H=new De(H.line,0),q=new De(q.line,Rt(b,q.line))),b.setSelection(H,q)}return[H,q]};return E.visualMode?P():z()}function Tt(b,E){var S=E.sel.anchor,P=E.sel.head;E.lastPastedText&&(P=b.posFromIndex(b.indexFromPos(S)+E.lastPastedText.length),E.lastPastedText=null),E.lastSelection={anchorMark:b.setBookmark(S),headMark:b.setBookmark(P),anchor:Xe(S),head:Xe(P),visualMode:E.visualMode,visualLine:E.visualLine,visualBlock:E.visualBlock}}function en(b,E,S,P){var z=b.state.vim.sel,H=P?E:z.head,q=P?E:z.anchor,X;return ut(S,E)&&(X=S,S=E,E=X),ut(H,q)?(H=st(E,H),q=Ht(q,S)):(q=st(E,q),H=Ht(H,S),H=me(H,0,-1),H.ch==-1&&H.line!=b.firstLine()&&(H=new De(H.line-1,Rt(b,H.line-1)))),[q,H]}function Dn(b,E,z){var P=b.state.vim;E=E||P.sel;var z=z||P.visualLine?"line":P.visualBlock?"block":"char",H=Xn(b,E,z);b.setSelections(H.ranges,H.primary)}function Xn(b,E,S,P){var z=Xe(E.head),H=Xe(E.anchor);if(S=="char"){var q=!P&&!ut(E.head,E.anchor)?1:0,X=ut(E.head,E.anchor)?1:0;return z=me(E.head,0,q),H=me(E.anchor,0,X),{ranges:[{anchor:H,head:z}],primary:0}}if(S=="line"){if(ut(E.head,E.anchor))z.ch=0,H.ch=Rt(b,H.line);else{H.ch=0;var Q=b.lastLine();z.line>Q&&(z.line=Q),z.ch=Rt(b,z.line)}return{ranges:[{anchor:H,head:z}],primary:0}}if(S=="block"){var re=Math.min(H.line,z.line),ue=H.ch,ye=Math.max(H.line,z.line),Ce=z.ch;ue<Ce?Ce+=1:ue+=1;for(var ve=ye-re+1,we=z.line==re?0:ve-1,Oe=[],Ie=0;Ie<ve;Ie++)Oe.push({anchor:new De(re+Ie,ue),head:new De(re+Ie,Ce)});return{ranges:Oe,primary:we}}}function hr(b){var E=b.getCursor("head");return b.getSelection().length==1&&(E=st(E,b.getCursor("anchor"))),E}function bn(b,E){var S=b.state.vim;E!==!1&&b.setCursor(ce(b,S.sel.head)),Tt(b,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Be.signal(b,"vim-mode-change",{mode:"normal"})}function Hn(b,E,S){var P=b.getRange(E,S);if(/\n\s*$/.test(P)){var z=P.split(`
|
|
1401
|
-
`);z.pop();for(var H,H=z.pop();z.length>0&&H&&m(H);H=z.pop())S.line--,S.ch=0;H?(S.line--,S.ch=Rt(b,S.line)):S.ch=0}}function Pn(b,E,S){E.ch=0,S.ch=0,S.line++}function Xt(b){if(!b)return 0;var E=b.search(/\S/);return E==-1?b.length:E}function an(b,E,S){var P=E.inclusive,z=E.innerWord,H=E.bigWord,q=E.noSymbol,X=E.multiline,Q=S||hr(b),re=b.getLine(Q.line),ue=re,ye=Q.line,Ce=ye,ve=Q.ch,we,Oe=q?No[0]:Pi[0];if(z&&/\s/.test(re.charAt(ve)))Oe=function(Rn){return/\s/.test(Rn)};else{for(;!Oe(re.charAt(ve));)if(ve++,ve>=re.length){if(!X)return null;ve--,we=_i(b,Q,!0,H,!0);break}H?Oe=Pi[0]:(Oe=No[0],Oe(re.charAt(ve))||(Oe=No[1]))}for(var Ie=ve,Ye=ve;Oe(re.charAt(Ye))&&Ye>=0;)Ye--;if(Ye++,we)Ie=we.to,Ce=we.line,ue=b.getLine(Ce),!ue&&Ie==0&&Ie++;else for(;Oe(re.charAt(Ie))&&Ie<re.length;)Ie++;if(P){var dt=Ie,tt=Q.ch<=Ye&&/\s/.test(re.charAt(Q.ch));if(!tt)for(;/\s/.test(ue.charAt(Ie))&&Ie<ue.length;)Ie++;if(dt==Ie||tt){for(var ot=Ye;/\s/.test(re.charAt(Ye-1))&&Ye>0;)Ye--;!Ye&&!tt&&(Ye=ot)}}return{start:new De(ye,Ye),end:new De(Ce,Ie)}}function Nr(b,E,S){var P=E;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:P,end:P};var z=Be.findMatchingTag(b,E)||Be.findEnclosingTag(b,E);return!z||!z.open||!z.close?{start:P,end:P}:S?{start:z.open.from,end:z.close.to}:{start:z.open.to,end:z.close.from}}function Xr(b,E,S){at(E,S)||Ve.jumpList.add(b,E,S)}function Ar(b,E){Ve.lastCharacterSearch.increment=b,Ve.lastCharacterSearch.forward=E.forward,Ve.lastCharacterSearch.selectedCharacter=E.selectedCharacter}function Ci(b,E,S,P){var z=Xe(b.getCursor()),H=S?1:-1,q=S?b.lineCount():-1,X=z.ch,Q=z.line,re=b.getLine(Q),ue={lineText:re,nextCh:re.charAt(X),lastCh:null,index:X,symb:P,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:S,depth:0,curMoveThrough:!1},ye=Si[P];if(!ye)return z;var Ce=$i[ye].init,ve=$i[ye].isComplete;for(Ce&&Ce(ue);Q!==q&&E;){if(ue.index+=H,ue.nextCh=ue.lineText.charAt(ue.index),!ue.nextCh){if(Q+=H,ue.lineText=b.getLine(Q)||"",H>0)ue.index=0;else{var we=ue.lineText.length;ue.index=we>0?we-1:0}ue.nextCh=ue.lineText.charAt(ue.index)}ve(ue)&&(z.line=Q,z.ch=ue.index,E--)}return ue.nextCh||ue.curMoveThrough?new De(Q,ue.index):z}function _i(b,E,S,P,z){var H=E.line,q=E.ch,X=b.getLine(H),Q=S?1:-1,re=P?Pi:No;if(z&&X==""){if(H+=Q,X=b.getLine(H),!l(b,H))return null;q=S?0:X.length}for(;;){if(z&&X=="")return{from:0,to:0,line:H};for(var ue=Q>0?X.length:-1,ye=ue,Ce=ue;q!=ue;){for(var ve=!1,we=0;we<re.length&&!ve;++we)if(re[we](X.charAt(q))){for(ye=q;q!=ue&&re[we](X.charAt(q));)q+=Q;if(Ce=q,ve=ye!=Ce,ye==E.ch&&H==E.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:H}}ve||(q+=Q)}if(H+=Q,!l(b,H))return null;X=b.getLine(H),q=Q>0?0:X.length}}function nr(b,E,S,P,z,H){var q=Xe(E),X=[];(P&&!z||!P&&z)&&S++;for(var Q=!P||!z,re=0;re<S;re++){var ue=_i(b,E,P,H,Q);if(!ue){var ye=Rt(b,b.lastLine());X.push(P?{line:b.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}X.push(ue),E=new De(ue.line,P?ue.to-1:ue.from)}var Ce=X.length!=S,ve=X[0],we=X.pop();return P&&!z?(!Ce&&(ve.from!=q.ch||ve.line!=q.line)&&(we=X.pop()),new De(we.line,we.from)):P&&z?new De(we.line,we.to-1):!P&&z?(!Ce&&(ve.to!=q.ch||ve.line!=q.line)&&(we=X.pop()),new De(we.line,we.to)):new De(we.line,we.from)}function no(b,E,S,P,z){var H=E,q=new De(H.line+S.repeat-1,1/0),X=b.clipPos(q);return X.ch--,z||(P.lastHPos=1/0,P.lastHSPos=b.charCoords(X,"div").left),q}function Jr(b,E,S,P,z){for(var H=z||b.getCursor(),q=H.ch,X,Q=0;Q<E;Q++){var re=b.getLine(H.line);if(X=$n(q,re,P,S),X==-1)return null;q=X}return new De(b.getCursor().line,X)}function Ms(b,E){var S=b.getCursor().line;return ce(b,new De(S,E-1))}function Zr(b,E,S,P){!x(S,Co)&&!on.test(S)||(E.marks[S]&&E.marks[S].clear(),E.marks[S]=b.setBookmark(P))}function $n(b,E,S,P,z){var H;return P?(H=E.indexOf(S,b+1),H!=-1):(H=E.lastIndexOf(S,b-1),H!=-1),H}function ki(b,E,S,P,z){function H(Ye){return!/\S/.test(b.getLine(Ye))}function q(Ye,dt,tt){return tt?H(Ye)!=H(Ye+dt):!H(Ye)&&H(Ye+dt)}function X(Ye){P=P>0?1:-1;var dt=b.ace.session.getFoldLine(Ye);dt&&Ye+P>dt.start.row&&Ye+P<dt.end.row&&(P=(P>0?dt.end.row:dt.start.row)-Ye)}var Q=E.line,re=b.firstLine(),ue=b.lastLine(),ye,Ce,ve=Q;if(P){for(;re<=ve&&ve<=ue&&S>0;)X(ve),q(ve,P)&&S--,ve+=P;return new De(ve,0)}var we=b.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!z||Oe.line!=Q)&&(Q+=1)}var Ie=H(Q);for(ve=Q;ve<=ue&&S;ve++)q(ve,1,!0)&&(!z||H(ve)!=Ie)&&S--;for(Ce=new De(ve,0),ve>ue&&!Ie?Ie=!0:z=!1,ve=Q;ve>re&&!((!z||H(ve)==Ie||ve==Q)&&q(ve,-1,!0));ve--);return ye=new De(ve,0),{start:ye,end:Ce}}function Ro(b,E,S,P,z){function H(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,ue,ye,Ce){var ve=re.getLine(ue),we={line:ve,ln:ue,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(H(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!z)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&m(we.line[we.pos]);)Oe=we.pos,H(we);return{ln:we.ln,pos:Oe+1}}H(we)}return{ln:we.ln,pos:Oe+1}}function X(re,ue,ye,Ce){var ve=re.getLine(ue),we={line:ve,ln:ue,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(H(we);we.line!==null;){if(!m(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return z?m(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};H(we)}return we.line=ve,z&&m(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:E.line,pos:E.ch};S>0;)P<0?Q=X(b,Q.ln,Q.pos,P):Q=q(b,Q.ln,Q.pos,P),S--;return new De(Q.ln,Q.pos)}function ui(b,E,S,P){function z(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!l(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function H(Q,re,ue,ye){var Ie=Q.getLine(re),Ce=Ie==="",ve={line:Ie,ln:re,pos:ue,dir:ye},we={ln:ve.ln,pos:ve.pos},Oe=ve.line==="";for(z(Q,ve);ve.line!==null;){if(we.ln=ve.ln,we.pos=ve.pos,ve.line===""&&!Oe)return{ln:ve.ln,pos:ve.pos};if(Ce&&ve.line!==""&&!m(ve.line[ve.pos]))return{ln:ve.ln,pos:ve.pos};w(ve.line[ve.pos])&&!Ce&&(ve.pos===ve.line.length-1||m(ve.line[ve.pos+1]))&&(Ce=!0),z(Q,ve)}var Ie=Q.getLine(we.ln);we.pos=0;for(var Ye=Ie.length-1;Ye>=0;--Ye)if(!m(Ie[Ye])){we.pos=Ye;break}return we}function q(Q,re,ue,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:ue,dir:ye},ve={ln:Ce.ln,pos:null},we=Ce.line==="";for(z(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return ve.pos!==null?ve:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||ve.pos===null||Ce.ln===ve.ln&&Ce.pos+1===ve.pos))return ve;Ce.line!==""&&!m(Ce.line[Ce.pos])&&(we=!1,ve={ln:Ce.ln,pos:Ce.pos}),z(Q,Ce)}var Oe=Q.getLine(ve.ln);ve.pos=0;for(var Ie=0;Ie<Oe.length;++Ie)if(!m(Oe[Ie])){ve.pos=Ie;break}return ve}for(var X={ln:E.line,pos:E.ch};S>0;)P<0?X=q(b,X.ln,X.pos,P):X=H(b,X.ln,X.pos,P),S--;return new De(X.ln,X.pos)}function En(b,E,S,P){var z=E,H,q,X={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],re=b.getLine(z.line).charAt(z.ch),ue=re===Q?1:0;if(H=b.scanForBracket(new De(z.line,z.ch+ue),-1,void 0,{bracketRegex:X}),q=b.scanForBracket(new De(z.line,z.ch+ue),1,void 0,{bracketRegex:X}),!H||!q)return null;if(H=H.pos,q=q.pos,H.line==q.line&&H.ch>q.ch||H.line>q.line){var ye=H;H=q,q=ye}return P?q.ch+=1:H.ch+=1,{start:H,end:q}}function Sr(b,E,S,P){var z=Xe(E),H=b.getLine(z.line),q=H.split(""),X,Q,re,ue,ye=q.indexOf(S);if(z.ch<ye)z.ch=ye;else if(ye<z.ch&&q[z.ch]==S){var Ce=/string/.test(b.getTokenTypeAt(me(E,0,1))),ve=/string/.test(b.getTokenTypeAt(E)),we=Ce&&!ve;we||(Q=z.ch,--z.ch)}if(q[z.ch]==S&&!Q)X=z.ch+1;else for(re=z.ch;re>-1&&!X;re--)q[re]==S&&(X=re+1);if(X&&!Q)for(re=X,ue=q.length;re<ue&&!Q;re++)q[re]==S&&(Q=re);return!X||!Q?{start:z,end:z}:(P&&(--X,++Q),{start:new De(z.line,X),end:new De(z.line,Q)})}function Dr(){}function Fn(b){var E=b.state.vim;return E.searchState_||(E.searchState_=new Dr)}function _n(b){return hi(b,"/")}function yr(b){return go(b,"/")}function hi(b,E){var S=go(b,E)||[];if(!S.length)return[];var P=[];if(S[0]===0){for(var z=0;z<S.length;z++)typeof S[z]=="number"&&P.push(b.substring(S[z]+1,S[z+1]));return P}}function go(b,E){E||(E="/");for(var S=!1,P=[],z=0;z<b.length;z++){var H=b.charAt(z);!S&&H==E&&P.push(z),S=!S&&H=="\\"}return P}function mo(b){for(var E="|(){",S="}",P=!1,z=[],H=-1;H<b.length;H++){var q=b.charAt(H)||"",X=b.charAt(H+1)||"",Q=X&&E.indexOf(X)!=-1;P?((q!=="\\"||!Q)&&z.push(q),P=!1):q==="\\"?(P=!0,X&&S.indexOf(X)!=-1&&(Q=!0),(!Q||X==="\\")&&z.push(q)):(z.push(q),Q&&X!=="\\"&&z.push("\\"))}return z.join("")}function To(b){for(var E=!1,S=[],P=-1;P<b.length;P++){var z=b.charAt(P)||"",H=b.charAt(P+1)||"";Bi[z+H]?(S.push(Bi[z+H]),P++):E?(S.push(z),E=!1):z==="\\"?(E=!0,o(H)||H==="$"?S.push("$"):H!=="/"&&H!=="\\"&&S.push("\\")):(z==="$"&&S.push("$"),S.push(z),H==="/"&&S.push("\\"))}return S.join("")}function Pr(b){for(var E=new Be.StringStream(b),S=[];!E.eol();){for(;E.peek()&&E.peek()!="\\";)S.push(E.next());var P=!1;for(var z in js)if(E.match(z,!0)){P=!0,S.push(js[z]);break}P||S.push(E.next())}return S.join("")}function di(b,E,S){var P=Ve.registerController.getRegister("/");if(P.setText(b),b instanceof RegExp)return b;var z=yr(b),H,q;if(!z.length)H=b;else{H=b.substring(0,z[0]);var X=b.substring(z[0]);q=X.indexOf("i")!=-1}if(!H)return null;k("pcre")||(H=mo(H)),S&&(E=/^[^A-Z]*$/.test(H));var Q=new RegExp(H,E||q?"im":"m");return Q}function Qr(b){typeof b=="string"&&(b=document.createElement(b));for(var E,S=1;S<arguments.length;S++)if(E=arguments[S])if(typeof E!="object"&&(E=document.createTextNode(E)),E.nodeType)b.appendChild(E);else for(var P in E)Object.prototype.hasOwnProperty.call(E,P)&&(P[0]==="$"?b.style[P.slice(1)]=E[P]:b.setAttribute(P,E[P]));return b}function Ft(b,E){var S=Qr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},E);b.openNotification?b.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function Mo(b,E){return Qr("div",{$display:"flex"},Qr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},b,Qr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),E&&Qr("span",{$color:"#888"},E))}function dr(b,E){if(Fr.length){E.value||(E.value=""),zt=E;return}var S=Mo(E.prefix,E.desc);if(b.openDialog)b.openDialog(S,E.onClose,{onKeyDown:E.onKeyDown,onKeyUp:E.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:E.value});else{var P="";typeof E.prefix!="string"&&E.prefix&&(P+=E.prefix.textContent),E.desc&&(P+=" "+E.desc),E.onClose(prompt(P,""))}}function In(b,E){if(b instanceof RegExp&&E instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],P=0;P<S.length;P++){var z=S[P];if(b[z]!==E[z])return!1}return!0}return!1}function ae(b,E,S,P){if(E){var z=Fn(b),H=di(E,!!S,!!P);if(H)return He(b,H),In(H,z.getQuery())||z.setQuery(H),H}}function Ne(b){if(b.source.charAt(0)=="^")var E=!0;return{token:function(S){if(E&&!S.sol()){S.skipToEnd();return}var P=S.match(b,!1);if(P)return P[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!b.exec(S.next()+P[0]))?(S.next(),null):(S.match(b),"searching");for(;!S.eol()&&(S.next(),!S.match(b,!1)););},query:b}}function He(b,E){clearTimeout(ln);var S=Fn(b);S.highlightTimeout=ln,ln=setTimeout(function(){if(b.state.vim){var P=Fn(b);P.highlightTimeout=null;var z=P.getOverlay();(!z||E!=z.query)&&(z&&b.removeOverlay(z),z=Ne(E),b.addOverlay(z),b.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(b.showMatchesOnScrollbar(E))),P.setOverlay(z))}},50)}function _t(b,E,S,P){return P===void 0&&(P=1),b.operation(function(){for(var z=b.getCursor(),H=b.getSearchCursor(S,z),q=0;q<P;q++){var X=H.find(E);if(q==0&&X&&at(H.from(),z)){var Q=E?H.from():H.to();X=H.find(E),X&&!X[0]&&at(H.from(),Q)&&b.getLine(Q.line).length==Q.ch&&(X=H.find(E))}if(!X&&(H=b.getSearchCursor(S,E?new De(b.lastLine()):new De(b.firstLine(),0)),!H.find(E)))return}return H.from()})}function wn(b,E,S,P,z){return P===void 0&&(P=1),b.operation(function(){var H=b.getCursor(),q=b.getSearchCursor(S,H),X=q.find(!E);!z.visualMode&&X&&at(q.from(),H)&&q.find(!E);for(var Q=0;Q<P;Q++)if(X=q.find(E),!X&&(q=b.getSearchCursor(S,E?new De(b.lastLine()):new De(b.firstLine(),0)),!q.find(E)))return;return[q.from(),q.to()]})}function Yt(b){var E=Fn(b);E.highlightTimeout&&(clearTimeout(E.highlightTimeout),E.highlightTimeout=null),b.removeOverlay(Fn(b).getOverlay()),E.setOverlay(null),E.getScrollbarAnnotate()&&(E.getScrollbarAnnotate().clear(),E.setScrollbarAnnotate(null))}function $r(b,E,S){return typeof b!="number"&&(b=b.line),E instanceof Array?x(b,E):typeof S=="number"?b>=E&&b<=S:b==E}function Jn(b){var E=b.ace.renderer;return{top:E.getFirstFullyVisibleRow(),bottom:E.getLastFullyVisibleRow()}}function fn(b,E,S){if(S=="'"||S=="`")return Ve.jumpList.find(b,-1)||new De(0,0);if(S==".")return br(b);var P=E.marks[S];return P&&P.find()}function br(b){if(b.getLastEditEnd)return b.getLastEditEnd();for(var E=b.doc.history.done,S=E.length;S--;)if(E[S].changes)return Xe(E[S].changes[0].to)}function xn(b,E,S,P,z,H,q,X,Q){function re(){b.operation(function(){for(;!Oe;)ue(),Ce();ve()})}function ue(){var tt=b.getRange(H.from(),H.to()),ot=tt.replace(q,X),Rn=H.to().line;H.replace(ot),Ye=H.to().line,z+=Ye-Rn,dt=Ye<Rn}function ye(){var tt=Ie&&Xe(H.to()),ot=H.findNext();return ot&&!ot[0]&&tt&&at(H.from(),tt)&&(ot=H.findNext()),ot}function Ce(){for(;ye()&&$r(H.from(),P,z);)if(!(!S&&H.from().line==Ye&&!dt)){b.scrollIntoView(H.from(),30),b.setSelection(H.from(),H.to()),Ie=H.from(),Oe=!1;return}Oe=!0}function ve(tt){if(tt&&tt(),b.focus(),Ie){b.setCursor(Ie);var ot=b.state.vim;ot.exMode=!1,ot.lastHPos=ot.lastHSPos=Ie.ch}Q&&Q()}function we(tt,ot,Rn){Be.e_stop(tt);var St=W(tt);switch(St){case"y":ue(),Ce();break;case"n":Ce();break;case"a":var Jt=Q;Q=void 0,b.operation(re),Q=Jt;break;case"l":ue();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ve(Rn)}return Oe&&ve(Rn),!0}b.state.vim.exMode=!0;var Oe=!1,Ie,Ye,dt;if(Ce(),Oe){Ft(b,"No matches for "+q.source);return}if(!E){re(),Q&&Q();return}dr(b,{prefix:Qr("span","replace with ",Qr("strong",X)," (y/n/a/q/l)"),onKeyDown:we})}function wr(b,E){var S=b.state.vim,P=Ve.macroModeState,z=Ve.registerController.getRegister("."),H=P.isPlaying,q=P.lastInsertModeChanges;H||(b.off("change",Ko),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Be.off(b.getInputField(),"keydown",Io)),!H&&S.insertModeRepeat>1&&(Ps(b,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,E||b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),z.setText(q.changes.join("")),Be.signal(b,"vim-mode-change",{mode:"normal"}),P.isRecording&&fr(P)}function vo(b){zn.unshift(b)}function Is(b,E,S,P,z){var H={keys:b,type:E};H[E]=S,H[E+"Args"]=P;for(var q in z)H[q]=z[q];vo(H)}function Ls(b,E,S,P){var z=Ve.registerController.getRegister(P);if(P==":"){z.keyBuffer[0]&&Br.processCommand(b,z.keyBuffer[0]),S.isPlaying=!1;return}var H=z.keyBuffer,q=0;S.isPlaying=!0,S.replaySearchQueries=z.searchQueries.slice(0);for(var X=0;X<H.length;X++)for(var Q=H[X],re,ue;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),ue=re[0],Q=Q.substring(re.index+ue.length),kt.handleKey(b,ue,"macro"),E.insertMode){var ye=z.insertModeChanges[q++].changes;Ve.macroModeState.lastInsertModeChanges.changes=ye,Jo(b,ye,1),wr(b)}S.isPlaying=!1}function Os(b,E){if(!b.isPlaying){var S=b.latestRegister,P=Ve.registerController.getRegister(S);P&&P.pushText(E)}}function fr(b){if(!b.isPlaying){var E=b.latestRegister,S=Ve.registerController.getRegister(E);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(b.lastInsertModeChanges)}}function Ns(b,E){if(!b.isPlaying){var S=b.latestRegister,P=Ve.registerController.getRegister(S);P&&P.pushSearchQuery&&P.pushSearchQuery(E)}}function Ko(b,E){var S=Ve.macroModeState,P=S.lastInsertModeChanges;if(!S.isPlaying)for(var z=b.state.vim;E;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(E.origin=="+input"||E.origin=="paste"||E.origin===void 0){var H=b.listSelections().length;H>1&&(P.ignoreCount=H);var q=E.text.join(`
|
|
1402
|
-
`);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(b.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var X=z&&z.insertEnd&&z.insertEnd.find(),Q=b.getCursor();if(X&&X.line==Q.line){var re=X.ch-Q.ch;re>0&&re<q.length&&(P.changes.push([q,re]),q="")}}q&&P.changes.push(q)}}E=E.next}}function yo(b){var E=b.state.vim;if(E.insertMode){var S=Ve.macroModeState;if(S.isPlaying)return;var P=S.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,E.insertEnd&&E.insertEnd.clear(),E.insertEnd=b.setBookmark(b.getCursor(),{insertLeft:!0}))}else b.curOp.isVimOp||Ds(b,E)}function Ds(b,E,S){var P=b.getCursor("anchor"),z=b.getCursor("head");if(E.visualMode&&!b.somethingSelected()?bn(b,!1):!E.visualMode&&!E.insertMode&&b.somethingSelected()&&(E.visualMode=!0,E.visualLine=!1,Be.signal(b,"vim-mode-change",{mode:"visual"})),E.visualMode){var H=ut(z,P)?0:-1,q=ut(z,P)?-1:0;z=me(z,0,H),P=me(P,0,q),E.sel={anchor:P,head:z},Zr(b,E,"<",st(z,P)),Zr(b,E,">",Ht(z,P))}else!E.insertMode&&!S&&(E.lastHPos=b.getCursor().ch)}function Xo(b,E){this.keyName=b,this.key=E.key,this.ctrlKey=E.ctrlKey,this.altKey=E.altKey,this.metaKey=E.metaKey,this.shiftKey=E.shiftKey}function Io(b){var E=Ve.macroModeState,S=E.lastInsertModeChanges,P=Be.keyName?Be.keyName(b):b.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new Xo(P,b)))}function Ps(b,E,S,P){function z(){X?Ai.processAction(b,E,E.lastEditActionCommand):Ai.evalInput(b,E)}function H(ue){if(q.lastInsertModeChanges.changes.length>0){ue=E.lastEditActionCommand?ue:1;var ye=q.lastInsertModeChanges;Jo(b,ye.changes,ue)}}var q=Ve.macroModeState;q.isPlaying=!0;var X=!!E.lastEditActionCommand,Q=E.inputState;if(E.inputState=E.lastEditInputState,X&&E.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<S;re++)z(),H(1);else P||z(),H(S);E.inputState=Q,E.insertMode&&!P&&wr(b),q.isPlaying=!1}function Fs(b,E){Be.lookupKey(E,"vim-insert",function(S){return typeof S=="string"?Be.commands[S](b):S(b),!0})}function Jo(b,E,S){var P=b.getCursor("head"),z=Ve.macroModeState.lastInsertModeChanges.visualBlock;z&&(ur(b,P,z+1),S=b.listSelections().length,b.setCursor(P));for(var H=0;H<S;H++){z&&b.setCursor(me(P,H,0));for(var q=0;q<E.length;q++){var X=E[q];if(X instanceof Xo)Fs(b,X.keyName);else if(typeof X=="string")b.replaceSelection(X);else{var Q=b.getCursor(),re=me(Q,0,X[0].length-(X[1]||0));b.replaceRange(X[0],Q,X[1]?Q:re),b.setCursor(re)}}}z&&b.setCursor(me(P,0,1))}function $a(b,E,S,P){E.length>1&&E[0]=="n"&&(E=E.replace("numpad","")),E=_o[E]||E;var z="";if(S.ctrlKey&&(z+="C-"),S.altKey&&(z+="A-"),(z||E.length>1)&&S.shiftKey&&(z+="S-"),P&&!P.expectLiteralNext&&E.length==1){if(Bn.keymap&&E in Bn.keymap)(Bn.remapCtrl!==!1||!z)&&(E=Bn.keymap[E]);else if(E.charCodeAt(0)>255){var H=S.code&&S.code.slice(-1)||"";S.shiftKey||(H=H.toLowerCase()),H&&(E=H)}}return z+=E,z.length>1&&(z="<"+z+">"),z}function bo(b){var E=new b.constructor;return Object.keys(b).forEach(function(S){if(S!="insertEnd"){var P=b[S];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=bo(P)),E[S]=P}}),b.sel&&(E.sel={head:b.sel.head&&Xe(b.sel.head),anchor:b.sel.anchor&&Xe(b.sel.anchor)}),E}function Zo(b,E,S){var P=!1,z=kt.maybeInitVimState_(b),H=z.visualBlock||z.wasInVisualBlock,q=b.ace.inMultiSelectMode;if(z.wasInVisualBlock&&!q?z.wasInVisualBlock=!1:q&&z.visualBlock&&(z.wasInVisualBlock=!0),E=="<Esc>"&&!z.insertMode&&!z.visualMode&&q)b.ace.exitMultiSelectMode();else if(H||!q||b.ace.inVirtualSelectionMode)P=kt.handleKey(b,E,S);else{var X=bo(z),Q=z.inputState.changeQueueList||[];b.operation(function(){b.curOp.isVimOp=!0;var re=0;b.ace.forEachSelection(function(){var ue=b.ace.selection;b.state.vim.lastHPos=ue.$desiredColumn==null?ue.lead.column:ue.$desiredColumn,b.state.vim.inputState.changeQueue=Q[re];var ye=b.getCursor("head"),Ce=b.getCursor("anchor"),ve=ut(ye,Ce)?0:-1,we=ut(ye,Ce)?-1:0;ye=me(ye,0,ve),Ce=me(Ce,0,we),b.state.vim.sel.head=ye,b.state.vim.sel.anchor=Ce,P=Er(b,E,S),ue.$desiredColumn=b.state.vim.lastHPos==-1?null:b.state.vim.lastHPos,b.ace.inVirtualSelectionMode&&(Q[re]=b.state.vim.inputState.changeQueue),b.virtualSelectionMode()&&(b.state.vim=bo(X)),re++}),b.curOp.cursorActivity&&!P&&(b.curOp.cursorActivity=!1),z.status=b.state.vim.status,b.state.vim=z,z.inputState.changeQueueList=Q,z.inputState.changeQueue=null},!0)}return P&&!z.visualMode&&!z.insert&&z.visualMode!=b.somethingSelected()&&Ds(b,z,!0),P}function ro(b,E){E.off("beforeEndOperation",ro);var S=E.state.cm.vimCmd;S&&E.execCommand(S.exec?S:S.name,S.args),E.curOp=E.prevOp}var pr=e("../range").Range,zs=e("../lib/event_emitter").EventEmitter,ei=e("../lib/dom"),Ea=e("../lib/oop"),Ra=e("../lib/keys"),Qo=e("../lib/event"),io=e("../search").Search,Lo=e("../lib/useragent"),es=e("../search_highlight").SearchHighlight,wo=e("../commands/multi_select_commands"),Ta=e("../mode/text").Mode.prototype.tokenRe,xo=e("../ext/hardwrap").hardWrap;e("../multi_select");var Be=function(b){this.ace=b,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(b,E){if(!(this instanceof De))return new De(b,E);this.line=b,this.ch=E},Be.defineOption=function(b,E,S){},Be.commands={redo:function(b){b.ace.redo()},undo:function(b){b.ace.undo()},newlineAndIndent:function(b){b.ace.insert(`
|
|
1403
|
-
`)},goLineLeft:function(b){b.ace.selection.moveCursorLineStart()},goLineRight:function(b){b.ace.selection.moveCursorLineEnd()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=Qo.stopEvent,Be.keyName=function(b){var E=Ra[b.keyCode]||b.key||"";return E.length==1&&(E=E.toUpperCase()),E=Qo.getModifierString(b).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+E,E},Be.keyMap.default=function(b){return function(E){var S=E.ace.commands.commandKeyBinding[b.toLowerCase()];return S&&E.ace.execCommand(S)!==!1}},Be.lookupKey=function b(E,S,P){S||(S="default"),typeof S=="string"&&(S=Be.keyMap[S]||Be.keyMap.default);var z=typeof S=="function"?S(E):S[E];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&P(z))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return b(E,S.fallthrough,P);for(var H=0;H<S.fallthrough.length;H++){var q=b(E,S.fallthrough[H],P);if(q)return q}}},Be.findMatchingTag=function(b,E){return b.findMatchingTag(E)},Be.findEnclosingTag=function(b,E){},Be.signal=function(b,E,S){return b._signal(E,S)},Be.on=Qo.addListener,Be.off=Qo.removeListener,Be.isWordChar=function(b){return b<""?/^\w$/.test(b):(Ta.lastIndex=0,Ta.test(b))},(function(){Ea.implement(Be.prototype,zs),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(S){this.$lineHandleChanges&&this.$lineHandleChanges.push(S);var P={text:S.action[0]=="i"?S.lines:[]},z=this.curOp=this.curOp||{};z.changeHandlers||(z.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),z.lastChange?z.lastChange.next=z.lastChange=P:z.lastChange=z.change=P,this.$updateMarkers(S)},this.onSelectionChange=function(){var S=this.curOp=this.curOp||{};S.cursorActivityHandlers||(S.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(wo.keyboardHandler)},this.operation=function(S,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return S();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var z=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=this.curOp=this.curOp||{};this.curOp.force=P;var q=S();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(),!H.cursorActivity&&!H.lastChange&&z&&(this.ace.prevOp=z)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var S=this.curOp;S&&(S.change&&this.signal("change",S.change,S),S&&S.cursorActivity&&this.signal("cursorActivity",null,S),this.curOp=null)},this.signal=function(S,P,z){var H=z?z[S+"Handlers"]:(this._eventRegistry||{})[S];if(H){H=H.slice();for(var q=0;q<H.length;q++)H[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(S,P){typeof S=="object"&&(P=S.ch,S=S.line);var z=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:P}),this.ace.selection.moveTo(S,P),z&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var P=this.ace.selection,z=S=="anchor"?P.isEmpty()?P.lead:P.anchor:S=="head"||!S?P.lead:P.getRange()[S];return g(z)},this.listSelections=function(S){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(z){return{anchor:this.clipPos(g(z.cursor==z.end?z.start:z.end)),head:this.clipPos(g(z.cursor))}},this)},this.setSelections=function(S,P){var z=this.ace.multiSelect,H=S.map(function(re){var ue=f(re.anchor),ye=f(re.head),Ce=pr.comparePoints(ue,ye)<0?new pr.fromPoints(ue,ye):new pr.fromPoints(ye,ue);return Ce.cursor=pr.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}P?H[P]&&H.push(H.splice(P,1)[0]):H=H.reverse(),z.toSingleRange(H[0].clone());for(var q=this.ace.session,X=0;X<H.length;X++){var Q=q.$clipRangeToDocument(H[X]);z.addRange(Q)}},this.setSelection=function(S,P,z){var H=this.ace.selection;H.moveTo(S.line,S.ch),H.selectTo(P.line,P.ch),z&&z.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var P=this.ace.session.$clipPositionToDocument(S.line,S.ch);return g(P)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var P=S.action=="insert",z=S.start,H=S.end,q=(H.row-z.row)*(P?1:-1),X=(H.column-z.column)*(P?1:-1);P&&(H=z);for(var Q in this.marks){var re=this.marks[Q],ue=pr.comparePoints(re,z);if(!(ue<0)){if(ue===0&&P)if(!re.$insertRight)ue=1;else{if(re.bias!=1){re.bias=-1;continue}ue=1}var ye=P?ue:pr.comparePoints(re,H);if(ye>0){re.row+=q,re.column+=re.row==H.row?X:0;continue}!P&&ye<=0&&(re.row=z.row,re.column=z.column,ye===0&&(re.bias=1))}}};var b=function(S,P,z,H){this.cm=S,this.id=P,this.row=z,this.column=H,S.marks[this.id]=this};b.prototype.clear=function(){delete this.cm.marks[this.id]},b.prototype.find=function(){return g(this)},this.setBookmark=function(S,P){var z=new b(this,this.$uid++,S.line,S.ch);return(!P||!P.insertLeft)&&(z.$insertRight=!0),this.marks[z.id]=z,z},this.moveH=function(S,P){if(P=="char"){var z=this.ace.selection;z.clearSelection(),z.moveCursorBy(0,S)}},this.findPosV=function(S,P,z,H){if(z=="page"){var q=this.ace.renderer,X=q.layerConfig;P*=Math.floor(X.height/X.lineHeight),z="line"}if(z=="line"){var Q=this.ace.session.documentToScreenPosition(S.line,S.ch);H!=null&&(Q.column=H),Q.row+=P,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return g(re)}debugger},this.charCoords=function(S,P){if(P=="div"||!P){var z=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:z.column,top:z.row}}if(P=="local"){var H=this.ace.renderer,z=this.ace.session.documentToScreenPosition(S.line,S.ch),q=H.layerConfig.lineHeight,X=H.layerConfig.characterWidth,Q=q*z.row;return{left:z.column*X,top:Q,bottom:Q+q}}},this.coordsChar=function(S,P){var z=this.ace.renderer;if(P=="local"){var H=Math.max(0,Math.floor(S.top/z.lineHeight)),q=Math.max(0,Math.floor(S.left/z.characterWidth)),X=z.session.screenToDocumentPosition(H,q);return g(X)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(S,P,z){var H=!1,q=!1;S instanceof RegExp&&!S.global&&(H=!S.ignoreCase,S=S.source,q=!0),S=="\\n"&&(S=`
|
|
1404
|
-
`,q=!1);var X=new io;P.ch==null&&(P.ch=Number.MAX_VALUE);var Q={row:P.line,column:P.ch},re=this,ue=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){X.setOptions({needle:S,caseSensitive:H,wrap:!1,backwards:ye,regExp:q,start:ue||Q});var Ce=X.find(re.ace.session);return ue=Ce,ue&&[!ue.isEmpty()]},from:function(){return ue&&g(ue.start)},to:function(){return ue&&g(ue.end)},replace:function(ye){ue&&(ue.end=re.ace.session.doc.replace(ue,ye))}}},this.scrollTo=function(S,P){var z=this.ace.renderer,H=z.layerConfig,q=H.maxHeight;q-=(z.$size.scrollerHeight-z.lineHeight)*z.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,q))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,P){if(S){var z=this.ace.renderer,H={top:0,bottom:P};z.scrollCursorIntoView(f(S),z.lineHeight*2/z.$size.scrollerHeight,H)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,P){return this.ace.session.getTextRange(new pr(S.line,S.ch,P.line,P.ch))},this.replaceRange=function(S,P,z){z||(z=P);var H=new pr(P.line,P.ch,z.line,z.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,S)},this.replaceSelection=this.replaceSelections=function(S){var P=Array.isArray(S)&&S,z=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(z.getRange(),P?S[0]||"":S);return}z.inVirtualSelectionMode=!0;var H=z.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var q=H.length;q--;)this.ace.session.replace(H[q],P?S[q]||"":S);z.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(S){return this.getRange(S.anchor,S.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var E={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(S,P){switch(this.state[S]=P,S){case"indentWithTabs":S=E[S],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:S=E[S]}S&&this.ace.setOption(S,P)},this.getOption=function(S){var P,z=E[S];switch(z&&(P=this.ace.getOption(z)),S){case"indentWithTabs":return S=E[S],!P;case"keyMap":return this.state.$keyMap||"vim"}return z?P:this.state[S]},this.toggleOverwrite=function(S){return this.state.overwrite=S,this.ace.setOverwrite(S)},this.addOverlay=function(S){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new es(null,"ace_highlight-marker","text"),z=this.ace.session.addDynamicMarker(P);P.id=z.id,P.session=this.ace.session,P.destroy=function(q){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(q){var X=q.start.row;X==q.end.row?P.cache[X]=void 0:P.cache.splice(X,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var H=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=P,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,P=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var P=this.ace.session.getTokenAt(S.line,S.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(S){var P=this.ace.session.findMatchingBracket(f(S));return{to:P&&g(P)}},this.findMatchingTag=function(S){var P=this.ace.session.getMatchingTags(f(S));if(P)return{open:{from:g(P.openTag.start),to:g(P.openTag.end)},close:{from:g(P.closeTag.start),to:g(P.closeTag.end)}}},this.indentLine=function(S,P){P===!0?this.ace.session.indentRows(S,S," "):P===!1&&this.ace.session.outdentRows(new pr(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(f(S))},this.posFromIndex=function(S){return g(this.ace.session.doc.indexToPosition(S))},this.focus=function(S){return this.ace.textInput.focus()},this.blur=function(S){return this.ace.blur()},this.defaultTextHeight=function(S){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(S,P,z,H){var q=H.bracketRegex.source,X=/paren|text|operator|tag/;if(P==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),f(S),X);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:S.line,column:S.ch+1},X);!Q&&H.bracketRegex&&H.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Q={row:S.line,column:S.ch-1})}return Q&&{pos:g(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(Be.commands.hasOwnProperty(S))return Be.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var P=this.$lineHandleChanges;if(!P)return null;for(var z=S.row,H=0;H<P.length;H++){var q=P[H];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<z&&(z+=q.end.row-q.start.row);else if(q.start.row<z){if(z<q.end.row||z==q.end.row&&q.start.column>0)return null;z-=q.end.row-q.start.row}}}return z},this.getLineHandle=function(S){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(S),row:S}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var S=this.ace.session.$undoManager;if(S&&S.$lastDelta)return g(S.$lastDelta.end)}}).call(Be.prototype);var Bs=Be.StringStream=function(b,E){this.pos=this.start=0,this.string=b,this.tabSize=E||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Bs.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(b){var E=this.string.charAt(this.pos);if(typeof b=="string")var S=E==b;else var S=E&&(b.test?b.test(E):b(E));if(S)return++this.pos,E},eatWhile:function(b){for(var E=this.pos;this.eat(b););return this.pos>E},eatSpace:function(){for(var b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>b},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){var E=this.string.indexOf(b,this.pos);if(E>-1)return this.pos=E,!0},backUp:function(b){this.pos-=b},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(b,E,S){if(typeof b!="string"){var P=this.string.slice(this.pos).match(b);return P&&P.index>0?null:(P&&E!==!1&&(this.pos+=P[0].length),P)}var z=function(q){return S?q.toLowerCase():q},H=this.string.substr(this.pos,b.length);if(z(H)==z(b))return E!==!1&&(this.pos+=b.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(b,E){this.lineStart+=b;try{return E()}finally{this.lineStart-=b}}},Be.defineExtension=function(b,E){Be.prototype[b]=E},ei.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 b(S,P,z){var H=S.ace.container,q;return q=H.appendChild(document.createElement("div")),z?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof P=="string"?q.innerHTML=P:q.appendChild(P),q}function E(S,P){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=P}Be.defineExtension("openDialog",function(S,P,z){function H(ye){if(typeof ye=="string")re.value=ye;else{if(X||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),X=!0,q.remove(),z.onClose&&z.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){z||(z={}),E(this,null);var q=b(this,S,z.bottom),X=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],ue;return re?(z.value&&(re.value=z.value,z.selectValueOnOpen!==!1&&re.select()),z.onInput&&Be.on(re,"input",function(ye){z.onInput(ye,re.value,H)}),z.onKeyUp&&Be.on(re,"keyup",function(ye){z.onKeyUp(ye,re.value,H)}),Be.on(re,"keydown",function(ye){z&&z.onKeyDown&&z.onKeyDown(ye,re.value,H)||(ye.keyCode==13&&P(re.value),(ye.keyCode==27||z.closeOnEnter!==!1&&ye.keyCode==13)&&(Be.e_stop(ye),H()))}),z.closeOnBlur!==!1&&Be.on(re,"blur",H),re.focus()):(ue=q.getElementsByTagName("button")[0])&&(Be.on(ue,"click",function(){H(),Q.focus()}),z.closeOnBlur!==!1&&Be.on(ue,"blur",H),ue.focus()),H}}),Be.defineExtension("openNotification",function(S,P){function z(){q||(q=!0,clearTimeout(X),H.remove())}if(!this.virtualSelectionMode()){E(this,z);var H=b(this,S,P&&P.bottom),q=!1,X,Q=P&&typeof P.duration<"u"?P.duration:5e3;return Be.on(H,"click",function(re){Be.e_preventDefault(re),z()}),Q&&(X=setTimeout(z,Q)),z}})})();var De=Be.Pos,zn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Oo=zn.length,oo=[{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=D(""),Ma=/[\d]/,No=[Be.isWordChar,function(b){return b&&!Be.isWordChar(b)&&!/\s/.test(b)}],Pi=[function(b){return/\S/.test(b)}],Co=["<",">"],Ws=["-",'"',".",":","_","/","+"],on=/^\w$/,ht;try{ht=new RegExp("^[\\p{Lu}]$","u")}catch{ht=/^[A-Z]$/}var Gt={};R("filetype",void 0,"string",["ft"],function(b,E){if(E!==void 0){if(b===void 0){var S=E.getOption("mode");return S=="null"?"":S}var S=b==""?"null":b;E.setOption("mode",S)}}),R("textwidth",80,"number",["tw"],function(b,E){if(E!==void 0){if(b===void 0){var S=E.getOption("textwidth");return S}var P=Math.round(b);P>1&&E.setOption("textwidth",P)}});var Fi=function(){function b(Q,re,ue){function ye(Oe){var Ie=++z%P,Ye=X[Ie];Ye&&Ye.clear(),X[Ie]=Q.setBookmark(Oe)}var Ce=z%P,ve=X[Ce];if(ve){var we=ve.find();we&&!at(we,re)&&ye(re)}else ye(re);ye(ue),H=z,q=z-P+1,q<0&&(q=0)}function E(Q,re){z+=re,z>H?z=H:z<q&&(z=q);var ue=X[(P+z)%P];if(ue&&!ue.find()){var ye=re>0?1:-1,Ce,ve=Q.getCursor();do if(z+=ye,ue=X[(P+z)%P],ue&&(Ce=ue.find())&&!at(ve,Ce))break;while(z<H&&z>q)}return ue}function S(Q,re){var ue=z,ye=E(Q,re);return z=ue,ye&&ye.find()}var P=100,z=-1,H=0,q=0,X=new Array(P);return{cachedCursor:void 0,add:b,find:S,move:E}},Un=function(b){return b?{changes:b.changes,expectCursorActivityForChange:b.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var b=Ve.macroModeState;b.onRecordingDone&&b.onRecordingDone(),b.onRecordingDone=void 0,b.isRecording=!1},enterMacroRecordMode:function(b,E){var S=Ve.registerController.getRegister(E);if(S){if(S.clear(),this.latestRegister=E,b.openDialog){var P=Qr("span",{class:"cm-vim-message"},"recording @"+E);this.onRecordingDone=b.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Ve,kn,kt={enterVimMode:c,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return Ve.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return Ve},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:Xo,map:function(b,E,S){Br.map(b,E,S)},unmap:function(b,E){return Br.unmap(b,E)},noremap:function(b,E,S){Br.map(b,E,S,!0)},mapclear:function(b){var E=zn.length,S=Oo,P=zn.slice(0,E-S);if(zn=zn.slice(E-S),b)for(var z=P.length-1;z>=0;z--){var H=P[z];if(b!==H.context)if(H.context)this._mapCommand(H);else{var q=["normal","insert","visual"];for(var X in q)if(q[X]!==b){var Q={};for(var re in H)Q[re]=H[re];Q.context=q[X],this._mapCommand(Q)}}}},langmap:F,vimKeyFromEvent:W,setOption:$,getOption:k,defineOption:R,defineEx:function(b,E,S){if(!E)E=b;else if(b.indexOf(E)!==0)throw new Error('(Vim.defineEx) "'+E+'" is not a prefix of "'+b+'", command not registered');gr[b]=S,Br.commandMap_[E]={name:b,shortName:E,type:"api"}},handleKey:function(b,E,S){var P=this.findKey(b,E,S);if(typeof P=="function")return P()},multiSelectHandleKey:Zo,findKey:function(b,E,S){function P(){var re=Ve.macroModeState;if(re.isRecording){if(E=="q")return re.exitMacroRecordMode(),_(b),!0;S!="mapping"&&Os(re,E)}}function z(){if(E=="<Esc>"){if(X.visualMode)bn(b);else{if(!X.insertMode)return;wr(b)}return _(b),!0}}function H(){if(z())return!0;X.inputState.keyBuffer.push(E);var re=X.inputState.keyBuffer.join(""),ue=E.length==1,ye=Ai.matchCommand(re,zn,X.inputState,"insert"),Ce=X.inputState.changeQueue;if(ye.type=="none")return _(b),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(X.expectLiteralNext=!0),kn&&window.clearTimeout(kn),kn=ue&&window.setTimeout(function(){X.insertMode&&X.inputState.keyBuffer.length&&_(b)},k("insertModeEscKeysTimeout")),ue){var ve=b.listSelections();(!Ce||Ce.removed.length!=ve.length)&&(Ce=X.inputState.changeQueue=new M),Ce.inserted+=E;for(var we=0;we<ve.length;we++){var Oe=st(ve[we].anchor,ve[we].head),Ie=Ht(ve[we].anchor,ve[we].head),Ye=b.getRange(Oe,b.state.overwrite?me(Ie,0,1):Ie);Ce.removed[we]=(Ce.removed[we]||"")+Ye}}return!ue}if(X.expectLiteralNext=!1,kn&&window.clearTimeout(kn),ye.command&&Ce){for(var ve=b.listSelections(),we=0;we<ve.length;we++){var dt=ve[we].head;b.replaceRange(Ce.removed[we]||"",me(dt,0,-Ce.inserted.length),dt,"+input")}Ve.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||_(b),ye.command}function q(){if(P()||z())return!0;X.inputState.keyBuffer.push(E);var re=X.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var ue=/^(\d*)(.*)$/.exec(re);if(!ue)return _(b),!1;var ye=X.visualMode?"visual":"normal",Ce=ue[2]||ue[1];X.inputState.operatorShortcut&&X.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=X.inputState.operatorShortcut);var ve=Ai.matchCommand(Ce,zn,X.inputState,ye);return ve.type=="none"?(_(b),!1):ve.type=="partial"?(ve.expectLiteralNext&&(X.expectLiteralNext=!0),!0):ve.type=="clear"?(_(b),!0):(X.expectLiteralNext=!1,X.inputState.keyBuffer.length=0,ue=/^(\d*)(.*)$/.exec(re),ue[1]&&ue[1]!="0"&&X.inputState.pushRepeatDigit(ue[1]),ve.command)}var X=O(b),Q;return X.insertMode?Q=H():Q=q(),Q===!1?!X.insertMode&&E.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&b.getOption("readOnly")))return b.operation(function(){b.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(b,Q.toKeys,Q):Ai.processCommand(b,X,Q)}catch(re){throw b.state.vim=void 0,O(b),kt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(b,E){Br.processCommand(b,E)},defineMotion:J,defineAction:se,defineOperator:ee,mapCommand:Is,_mapCommand:vo,defineRegister:j,exitVisualMode:bn,exitInsertMode:wr},Fr=[],zi=!1,zt,zr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},rr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},so={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(zr)).forEach(function(b){so[(zr[b]||"").toLowerCase()]=so[b.toLowerCase()]=b}),R("langmap",void 0,"string",["lmap"],function(b,E){if(b===void 0)return Bn.string;F(b)}),A.prototype.pushRepeatDigit=function(b){this.operator?this.motionRepeat=this.motionRepeat.concat(b):this.prefixRepeat=this.prefixRepeat.concat(b)},A.prototype.getRepeat=function(){var b=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(b=1,this.prefixRepeat.length>0&&(b*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(b*=parseInt(this.motionRepeat.join(""),10))),b},B.prototype={setText:function(b,E,S){this.keyBuffer=[b||""],this.linewise=!!E,this.blockwise=!!S},pushText:function(b,E){E&&(this.linewise||this.keyBuffer.push(`
|
|
1438
|
-
`),this.linewise=!0),this.keyBuffer.push(b)},pushInsertModeChanges:function(b){this.insertModeChanges.push(Un(b))},pushSearchQuery:function(b){this.searchQueries.push(b)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},V.prototype={pushText:function(b,E,S,P,z){if(b!=="_"){P&&S.charAt(S.length-1)!==`
|
|
1439
|
-
`&&(S+=`
|
|
1440
|
-
`);var H=this.isValidRegister(b)?this.getRegister(b):null;if(!H){switch(E){case"yank":this.registers[0]=new B(S,P,z);break;case"delete":case"change":S.indexOf(`
|
|
1441
|
-
`)==-1?this.registers["-"]=new B(S,P):(this.shiftNumericRegisters_(),this.registers[1]=new B(S,P))}this.unnamedRegister.setText(S,P,z);return}var q=s(b);q?H.pushText(S,P):H.setText(S,P,z),b==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(H.toString(),P)}},getRegister:function(b){return this.isValidRegister(b)?(b=b.toLowerCase(),this.registers[b]||(this.registers[b]=new B),this.registers[b]):this.unnamedRegister},isValidRegister:function(b){return b&&(x(b,Ws)||on.test(b))},shiftNumericRegisters_:function(){for(var b=9;b>=2;b--)this.registers[b]=this.getRegister(""+(b-1))}},K.prototype={nextMatch:function(b,E){var S=this.historyBuffer,P=E?-1:1;this.initialPrefix===null&&(this.initialPrefix=b);for(var z=this.iterator+P;E?z>=0:z<S.length;z+=P)for(var H=S[z],q=0;q<=H.length;q++)if(this.initialPrefix==H.substring(0,q))return this.iterator=z,H;if(z>=S.length)return this.iterator=S.length,this.initialPrefix;if(z<0)return b},pushInput:function(b){var E=this.historyBuffer.indexOf(b);E>-1&&this.historyBuffer.splice(E,1),b.length&&this.historyBuffer.push(b)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ai={matchCommand:function(b,E,S,P){var z=$e(b,E,P,S);if(!z.full&&!z.partial)return{type:"none"};if(!z.full&&z.partial)return{type:"partial",expectLiteralNext:z.partial.length==1&&z.partial[0].keys.slice(-11)=="<character>"};for(var H,q=0;q<z.full.length;q++){var X=z.full[q];H||(H=X)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var Q=Re(b);if(!Q||Q.length>1)return{type:"clear"};S.selectedCharacter=Q}return{type:"full",command:H}},processCommand:function(b,E,S){switch(E.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(b,E,S);break;case"operator":this.processOperator(b,E,S);break;case"operatorMotion":this.processOperatorMotion(b,E,S);break;case"action":this.processAction(b,E,S);break;case"search":this.processSearch(b,E,S);break;case"ex":case"keyToEx":this.processEx(b,E,S);break}},processMotion:function(b,E,S){E.inputState.motion=S.motion,E.inputState.motionArgs=he(S.motionArgs),this.evalInput(b,E)},processOperator:function(b,E,S){var P=E.inputState;if(P.operator){if(P.operator==S.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(b,E);return}_(b)}P.operator=S.operator,P.operatorArgs=he(S.operatorArgs),S.keys.length>1&&(P.operatorShortcut=S.keys),S.exitVisualBlock&&(E.visualBlock=!1,Dn(b)),E.visualMode&&this.evalInput(b,E)},processOperatorMotion:function(b,E,S){var P=E.visualMode,z=he(S.operatorMotionArgs);z&&P&&z.visualLine&&(E.visualLine=!0),this.processOperator(b,E,S),P||this.processMotion(b,E,S)},processAction:function(b,E,S){var P=E.inputState,z=P.getRepeat(),H=!!z,q=he(S.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),S.operator&&this.processOperator(b,E,S),S.motion&&this.processMotion(b,E,S),(S.motion||S.operator)&&this.evalInput(b,E),q.repeat=z||1,q.repeatIsExplicit=H,q.registerName=P.registerName,_(b),E.lastMotion=null,S.isEdit&&this.recordLastEdit(E,P,S),Vn[S.action](b,q,E)},processSearch:function(b,E,S){function P(Ie,Ye,dt){Ve.searchHistoryController.pushInput(Ie),Ve.searchHistoryController.reset();try{ae(b,Ie,Ye,dt)}catch{Ft(b,"Invalid regex: "+Ie),_(b);return}Ai.processMotion(b,E,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function z(Ie){P(Ie,!0,!0);var Ye=Ve.macroModeState;Ye.isRecording&&Ns(Ye,Ie)}function H(Ie,Ye,dt){var tt=W(Ie),ot,Rn;tt=="<Up>"||tt=="<Down>"?(ot=tt=="<Up>",Rn=Ie.target?Ie.target.selectionEnd:0,Ye=Ve.searchHistoryController.nextMatch(Ye,ot)||"",dt(Ye),Rn&&Ie.target&&(Ie.target.selectionEnd=Ie.target.selectionStart=Math.min(Rn,Ie.target.value.length))):tt&&tt!="<Left>"&&tt!="<Right>"&&Ve.searchHistoryController.reset();var St;try{St=ae(b,Ye,!0,!0)}catch{}St?b.scrollIntoView(_t(b,!X,St),30):(Yt(b),b.scrollTo(ye.left,ye.top))}function q(Ie,Ye,dt){var tt=W(Ie);tt=="<Esc>"||tt=="<C-c>"||tt=="<C-[>"||tt=="<BS>"&&Ye==""?(Ve.searchHistoryController.pushInput(Ye),Ve.searchHistoryController.reset(),ae(b,ue),Yt(b),b.scrollTo(ye.left,ye.top),Be.e_stop(Ie),_(b),dt(),b.focus()):tt=="<Up>"||tt=="<Down>"?Be.e_stop(Ie):tt=="<C-u>"&&(Be.e_stop(Ie),dt(""))}if(b.getSearchCursor){var X=S.searchArgs.forward,Q=S.searchArgs.wholeWordOnly;Fn(b).setReversed(!X);var re=X?"/":"?",ue=Fn(b).getQuery(),ye=b.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var Ce=Ve.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();P(Oe,!0,!1)}else dr(b,{onClose:z,prefix:re,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:q});break;case"wordUnderCursor":var ve=an(b,{noSymbol:!0}),we=!0;if(ve||(ve=an(b,{noSymbol:!1}),we=!1),!ve){Ft(b,"No word under cursor"),_(b);return}var Oe=b.getLine(ve.start.line).substring(ve.start.ch,ve.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=Mn(Oe),Ve.jumpList.cachedCursor=b.getCursor(),b.setCursor(ve.start),P(Oe,!0,!1)}}},processEx:function(b,E,S){function P(H){Ve.exCommandHistoryController.pushInput(H),Ve.exCommandHistoryController.reset(),Br.processCommand(b,H),b.state.vim&&_(b)}function z(H,q,X){var Q=W(H),re,ue;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Ve.exCommandHistoryController.pushInput(q),Ve.exCommandHistoryController.reset(),Be.e_stop(H),_(b),X(),b.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(H),re=Q=="<Up>",ue=H.target?H.target.selectionEnd:0,q=Ve.exCommandHistoryController.nextMatch(q,re)||"",X(q),ue&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(ue,H.target.value.length))):Q=="<C-u>"?(Be.e_stop(H),X("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Ve.exCommandHistoryController.reset()}S.type=="keyToEx"?Br.processCommand(b,S.exArgs.input):E.visualMode?dr(b,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:z,selectValueOnOpen:!1}):dr(b,{onClose:P,prefix:":",onKeyDown:z})},evalInput:function(b,E){var S=E.inputState,P=S.motion,z=S.motionArgs||{},H=S.operator,q=S.operatorArgs||{},X=S.registerName,Q=E.sel,re=Xe(E.visualMode?ce(b,Q.head):b.getCursor("head")),ue=Xe(E.visualMode?ce(b,Q.anchor):b.getCursor("anchor")),ye=Xe(re),Ce=Xe(ue),ve,we,Oe;if(H&&this.recordLastEdit(E,S),S.repeatOverride!==void 0?Oe=S.repeatOverride:Oe=S.getRepeat(),Oe>0&&z.explicitRepeat?z.repeatIsExplicit=!0:(z.noRepeat||!z.explicitRepeat&&Oe===0)&&(Oe=1,z.repeatIsExplicit=!1),S.selectedCharacter&&(z.selectedCharacter=q.selectedCharacter=S.selectedCharacter),z.repeat=Oe,_(b),P){var Ie=Ln[P](b,re,z,E,S);if(E.lastMotion=Ln[P],!Ie)return;if(z.toJumplist){!H&&b.ace.curOp!=null&&(b.ace.curOp.command.scrollIntoView="center-animate");var Ye=Ve.jumpList,dt=Ye.cachedCursor;dt?(Xr(b,dt,Ie),delete Ye.cachedCursor):Xr(b,re,Ie)}Ie instanceof Array?(we=Ie[0],ve=Ie[1]):ve=Ie,ve||(ve=Xe(re)),E.visualMode?((!E.visualBlock||ve.ch!==1/0)&&(ve=ce(b,ve,ye)),we&&(we=ce(b,we)),we=we||Ce,Q.anchor=we,Q.head=ve,Dn(b),Zr(b,E,"<",ut(we,ve)?we:ve),Zr(b,E,">",ut(we,ve)?ve:we)):H||(b.ace.curOp&&(b.ace.curOp.vimDialogScroll="center-animate"),ve=ce(b,ve,ye),b.setCursor(ve.line,ve.ch))}if(H){if(q.lastSel){we=Ce;var tt=q.lastSel,ot=Math.abs(tt.head.line-tt.anchor.line),Rn=Math.abs(tt.head.ch-tt.anchor.ch);tt.visualLine?ve=new De(Ce.line+ot,Ce.ch):tt.visualBlock?ve=new De(Ce.line+ot,Ce.ch+Rn):tt.head.line==tt.anchor.line?ve=new De(Ce.line,Ce.ch+Rn):ve=new De(Ce.line+ot,Ce.ch),E.visualMode=!0,E.visualLine=tt.visualLine,E.visualBlock=tt.visualBlock,Q=E.sel={anchor:we,head:ve},Dn(b)}else E.visualMode&&(q.lastSel={anchor:Xe(Q.anchor),head:Xe(Q.head),visualBlock:E.visualBlock,visualLine:E.visualLine});var St,Jt,It,$t,ir;if(E.visualMode){St=st(Q.head,Q.anchor),Jt=Ht(Q.head,Q.anchor),It=E.visualLine||q.linewise,$t=E.visualBlock?"block":It?"line":"char";var mr=y(b,St,Jt);if(ir=Xn(b,{anchor:mr.start,head:mr.end},$t),It){var On=ir.ranges;if($t=="block")for(var G=0;G<On.length;G++)On[G].head.ch=Rt(b,On[G].head.line);else $t=="line"&&(On[0].head=new De(On[0].head.line+1,0))}}else{if(St=Xe(we||Ce),Jt=Xe(ve||ye),ut(Jt,St)){var Z=St;St=Jt,Jt=Z}It=z.linewise||q.linewise,It?Pn(b,St,Jt):z.forward&&Hn(b,St,Jt),$t="char";var ie=!z.inclusive||It,mr=y(b,St,Jt);ir=Xn(b,{anchor:mr.start,head:mr.end},$t,ie)}b.setSelections(ir.ranges,ir.primary),E.lastMotion=null,q.repeat=Oe,q.registerName=X,q.linewise=It;var le=ts[H](b,q,ir.ranges,Ce,ve);E.visualMode&&bn(b,le!=null),le&&b.setCursor(le)}},recordLastEdit:function(b,E,S){var P=Ve.macroModeState;P.isPlaying||(b.lastEditInputState=E,b.lastEditActionCommand=S,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=b.visualBlock?b.sel.head.line-b.sel.anchor.line:0)}},Ln={moveToTopLine:function(b,E,S){var P=Jn(b).top+S.repeat-1;return new De(P,Xt(b.getLine(P)))},moveToMiddleLine:function(b){var E=Jn(b),S=Math.floor((E.top+E.bottom)*.5);return new De(S,Xt(b.getLine(S)))},moveToBottomLine:function(b,E,S){var P=Jn(b).bottom-S.repeat+1;return new De(P,Xt(b.getLine(P)))},expandToLine:function(b,E,S){var P=E;return new De(P.line+S.repeat-1,1/0)},findNext:function(b,E,S){var P=Fn(b),z=P.getQuery();if(z){var H=!S.forward;return H=P.isReversed()?!H:H,He(b,z),_t(b,H,z,S.repeat)}},findAndSelectNextInclusive:function(b,E,S,P,z){var H=Fn(b),q=H.getQuery();if(q){var X=!S.forward;X=H.isReversed()?!X:X;var Q=wn(b,X,q,S.repeat,P);if(Q){if(z.operator)return Q;var re=Q[0],ue=new De(Q[1].line,Q[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,Be.signal(b,"vim-mode-change",{mode:"visual",subMode:""}));var ye=P.sel.anchor;if(ye)return H.isReversed()?S.forward?[ye,re]:[ye,ue]:S.forward?[ye,ue]:[ye,re]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,Be.signal(b,"vim-mode-change",{mode:"visual",subMode:""});return X?[ue,re]:[re,ue]}}},goToMark:function(b,E,S,P){var z=fn(b,P,S.selectedCharacter);return z?S.linewise?{line:z.line,ch:Xt(b.getLine(z.line))}:z:null},moveToOtherHighlightedEnd:function(b,E,S,P){if(P.visualBlock&&S.sameLine){var z=P.sel;return[ce(b,new De(z.anchor.line,z.head.ch)),ce(b,new De(z.head.line,z.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(b,E,S,P){for(var z=E,H=0;H<S.repeat;H++){var q=z;for(var X in P.marks)if(u(X)){var Q=P.marks[X].find(),re=S.forward?ut(Q,q):ut(q,Q);if(!re&&!(S.linewise&&Q.line==q.line)){var ue=at(q,z),ye=S.forward?_r(q,Q,z):_r(z,Q,q);(ue||ye)&&(z=Q)}}}return S.linewise&&(z=new De(z.line,Xt(b.getLine(z.line)))),z},moveByCharacters:function(b,E,S){var P=E,z=S.repeat,H=S.forward?P.ch+z:P.ch-z;return new De(P.line,H)},moveByLines:function(b,E,S,P){var z=E,H=z.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=P.lastHPos;break;default:P.lastHPos=H}var q=S.repeat+(S.repeatOffset||0),X=S.forward?z.line+q:z.line-q,Q=b.firstLine(),re=b.lastLine();if(X<Q&&z.line==Q)return this.moveToStartOfLine(b,E,S,P);if(X>re&&z.line==re)return no(b,E,S,P,!0);var ue=b.ace.session.getFoldLine(X);return ue&&(S.forward?X>ue.start.row&&(X=ue.end.row+1):X=ue.start.row),S.toFirstChar&&(H=Xt(b.getLine(X)),P.lastHPos=H),P.lastHSPos=b.charCoords(new De(X,H),"div").left,new De(X,H)},moveByDisplayLines:function(b,E,S,P){var z=E;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=b.charCoords(z,"div").left}var H=S.repeat,Q=b.findPosV(z,S.forward?H:-H,"line",P.lastHSPos);if(Q.hitSide)if(S.forward)var q=b.charCoords(Q,"div"),X={top:q.top+8,left:P.lastHSPos},Q=b.coordsChar(X,"div");else{var re=b.charCoords(new De(b.firstLine(),0),"div");re.left=P.lastHSPos,Q=b.coordsChar(re,"div")}return P.lastHPos=Q.ch,Q},moveByPage:function(b,E,S){var P=E,z=S.repeat;return b.findPosV(P,S.forward?z:-z,"page")},moveByParagraph:function(b,E,S){var P=S.forward?1:-1;return ki(b,E,S.repeat,P)},moveBySentence:function(b,E,S){var P=S.forward?1:-1;return ui(b,E,S.repeat,P)},moveByScroll:function(b,E,S,P){var z=b.getScrollInfo(),H=null,q=S.repeat;q||(q=z.clientHeight/(2*b.defaultTextHeight()));var X=b.charCoords(E,"local");if(S.repeat=q,H=Ln.moveByDisplayLines(b,E,S,P),!H)return null;var Q=b.charCoords(H,"local");return b.scrollTo(null,z.top+Q.top-X.top),H},moveByWords:function(b,E,S){return nr(b,E,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(b,E,S){var P=S.repeat,z=Jr(b,P,S.forward,S.selectedCharacter,E),H=S.forward?-1:1;return Ar(H,S),z?(z.ch+=H,z):null},moveToCharacter:function(b,E,S){var P=S.repeat;return Ar(0,S),Jr(b,P,S.forward,S.selectedCharacter,E)||E},moveToSymbol:function(b,E,S){var P=S.repeat;return Ci(b,P,S.forward,S.selectedCharacter)||E},moveToColumn:function(b,E,S,P){var z=S.repeat;return P.lastHPos=z-1,P.lastHSPos=b.charCoords(E,"div").left,Ms(b,z)},moveToEol:function(b,E,S,P){return no(b,E,S,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(b,E){var S=E;return new De(S.line,Xt(b.getLine(S.line)))},moveToMatchedSymbol:function(b,E){for(var S=E,P=S.line,z=S.ch,H=b.getLine(P),q;z<H.length;z++)if(q=H.charAt(z),q&&p(q)){var X=b.getTokenTypeAt(new De(P,z+1));if(X!=="string"&&X!=="comment")break}if(z<H.length){var Q=/[<>]/.test(H[z])?/[(){}[\]<>]/:/[(){}[\]]/,re=b.findMatchingBracket(new De(P,z+1),{bracketRegex:Q});return re.to}return S},moveToStartOfLine:function(b,E){return new De(E.line,0)},moveToLineOrEdgeOfDocument:function(b,E,S){var P=S.forward?b.lastLine():b.firstLine();return S.repeatIsExplicit&&(P=S.repeat-b.getOption("firstLineNumber")),new De(P,Xt(b.getLine(P)))},moveToStartOfDisplayLine:function(b){return b.execCommand("goLineLeft"),b.getCursor()},moveToEndOfDisplayLine:function(b){b.execCommand("goLineRight");var E=b.getCursor();return E.sticky=="before"&&E.ch--,E},textObjectManipulation:function(b,E,S,P){var z={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},q=S.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var X=!S.textObjectInner,Q,re;if(z[q]){if(re=!0,Q=En(b,E,q,X),!Q){var ue=b.getSearchCursor(new RegExp("\\"+q,"g"),E);ue.find()&&(Q=En(b,ue.from(),q,X))}}else if(H[q])re=!0,Q=Sr(b,E,q,X);else if(q==="W"||q==="w")for(var ye=S.repeat||1;ye-- >0;){var Ce=an(b,{inclusive:X,innerWord:!X,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=ki(b,E,S.repeat,0,X),S.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var ve=P.inputState.operatorArgs;ve&&(ve.linewise=!0),Q.end.line--}else if(q==="t")Q=Nr(b,E,X);else if(q==="s"){var we=b.getLine(E.line);E.ch>0&&w(we[E.ch])&&(E.ch-=1);var Oe=Ro(b,E,S.repeat,1,X),Ie=Ro(b,E,S.repeat,-1,X);m(b.getLine(Ie.line)[Ie.ch])&&m(b.getLine(Oe.line)[Oe.ch-1])&&(Ie={line:Ie.line,ch:Ie.ch+1}),Q={start:Ie,end:Oe}}return Q?b.state.vim.visualMode?en(b,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(b,E,S){var P=Ve.lastCharacterSearch,z=S.repeat,H=S.forward===P.forward,q=(P.increment?1:0)*(H?-1:1);b.moveH(-q,"char"),S.inclusive=!!H;var X=Jr(b,z,H,P.selectedCharacter);return X?(X.ch+=q,X):(b.moveH(q,"char"),E)}},ts={change:function(b,E,S){var P,z,H=b.state.vim,q=S[0].anchor,X=S[0].head;if(H.visualMode)if(E.fullLine)X.ch=Number.MAX_VALUE,X.line--,b.setSelection(q,X),z=b.getSelection(),b.replaceSelection(""),P=q;else{z=b.getSelection();var Q=oe("",S.length);b.replaceSelections(Q),P=st(S[0].head,S[0].anchor)}else{z=b.getRange(q,X);var re=H.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(z)){var ue=/\s+$/.exec(z);ue&&re.motionArgs&&re.motionArgs.forward&&(X=me(X,0,-ue[0].length),z=z.slice(0,-ue[0].length))}E.linewise&&(q=new De(q.line,Xt(b.getLine(q.line))),X.line>q.line&&(X=new De(X.line-1,Number.MAX_VALUE))),b.replaceRange("",q,X),P=q}Ve.registerController.pushText(E.registerName,"change",z,E.linewise,S.length>1),Vn.enterInsertMode(b,{head:P},b.state.vim)},delete:function(b,E,S){var P,z,H=b.state.vim;if(H.visualBlock){z=b.getSelection();var q=oe("",S.length);b.replaceSelections(q),P=st(S[0].head,S[0].anchor)}else{var X=S[0].anchor,Q=S[0].head;E.linewise&&Q.line!=b.firstLine()&&X.line==b.lastLine()&&X.line==Q.line-1&&(X.line==b.firstLine()?X.ch=0:X=new De(X.line-1,Rt(b,X.line-1))),z=b.getRange(X,Q),b.replaceRange("",X,Q),P=X,E.linewise&&(P=Ln.moveToFirstNonWhiteSpaceCharacter(b,X))}return Ve.registerController.pushText(E.registerName,"delete",z,E.linewise,H.visualBlock),ce(b,P)},indent:function(b,E,S){var P=b.state.vim,z=P.visualMode?E.repeat:1;if(P.visualBlock){for(var H=b.getOption("tabSize"),q=b.getOption("indentWithTabs")?" ":" ".repeat(H),X,Q=S.length-1;Q>=0;Q--)if(X=st(S[Q].anchor,S[Q].head),E.indentRight)b.replaceRange(q.repeat(z),X,X);else{for(var re=b.getLine(X.line),ue=0,ye=0;ye<z;ye++){var Ce=re[X.ch+ue];if(Ce==" ")ue++;else{if(Ce!=" ")break;ue++;for(var ve=1;ve<q.length&&(Ce=re[X.ch+ue],Ce===" ");ve++)ue++}}b.replaceRange("",X,me(X,0,ue))}return X}if(b.indentMore)for(var ye=0;ye<z;ye++)E.indentRight?b.indentMore():b.indentLess();else{var we=S[0].anchor.line,Oe=P.visualBlock?S[S.length-1].anchor.line:S[0].head.line;E.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var ye=0;ye<z;ye++)b.indentLine(Q,E.indentRight)}return Ln.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},indentAuto:function(b,E,S){return b.execCommand("indentAuto"),Ln.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},hardWrap:function(b,E,S,P,z){if(b.hardWrap){var H=S[0].anchor.line,q=S[0].head.line;E.linewise&&q--;var X=b.hardWrap({from:H,to:q});return X>H&&E.linewise&&X--,E.keepCursor?P:new De(X,0)}},changeCase:function(b,E,S,P,z){for(var H=b.getSelections(),q=[],X=E.toLower,Q=0;Q<H.length;Q++){var re=H[Q],ue="";if(X===!0)ue=re.toLowerCase();else if(X===!1)ue=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);ue+=s(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(ue)}return b.replaceSelections(q),E.shouldMoveCursor?z:!b.state.vim.visualMode&&E.linewise&&S[0].anchor.line+1==S[0].head.line?Ln.moveToFirstNonWhiteSpaceCharacter(b,P):E.linewise?P:st(S[0].anchor,S[0].head)},yank:function(b,E,S,P){var z=b.state.vim,H=b.getSelection(),q=z.visualMode?st(z.sel.anchor,z.sel.head,S[0].head,S[0].anchor):P;return Ve.registerController.pushText(E.registerName,"yank",H,E.linewise,z.visualBlock),q}},Vn={jumpListWalk:function(b,E,S){if(!S.visualMode){var P=E.repeat,z=E.forward,H=Ve.jumpList,q=H.move(b,z?P:-P),X=q?q.find():void 0;X=X||b.getCursor(),b.setCursor(X),b.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(b,E,S){if(!S.visualMode){var P=E.repeat||1,z=b.defaultTextHeight(),H=b.getScrollInfo().top,q=z*P,X=E.forward?H+q:H-q,Q=Xe(b.getCursor()),re=b.charCoords(Q,"local");if(E.forward)X>re.top?(Q.line+=(X-re.top)/z,Q.line=Math.ceil(Q.line),b.setCursor(Q),re=b.charCoords(Q,"local"),b.scrollTo(null,re.top)):b.scrollTo(null,X);else{var ue=X+b.getScrollInfo().clientHeight;ue<re.bottom?(Q.line-=(re.bottom-ue)/z,Q.line=Math.floor(Q.line),b.setCursor(Q),re=b.charCoords(Q,"local"),b.scrollTo(null,re.bottom-b.getScrollInfo().clientHeight)):b.scrollTo(null,X)}}},scrollToCursor:function(b,E){var S=b.getCursor().line,P=b.charCoords(new De(S,0),"local"),z=b.getScrollInfo().clientHeight,H=P.top;switch(E.position){case"center":H=P.bottom-z/2;break;case"bottom":var q=new De(S,b.getLine(S).length-1),X=b.charCoords(q,"local"),Q=X.bottom-H;H=H-z+Q}b.scrollTo(null,H)},replayMacro:function(b,E,S){var P=E.selectedCharacter,z=E.repeat,H=Ve.macroModeState;for(P=="@"?P=H.latestRegister:H.latestRegister=P;z--;)Ls(b,S,H,P)},enterMacroRecordMode:function(b,E){var S=Ve.macroModeState,P=E.selectedCharacter;Ve.registerController.isValidRegister(P)&&S.enterMacroRecordMode(b,P)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Be.signal(b,"vim-mode-change",{mode:"insert"})):(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Be.signal(b,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(b,E,S){if(!b.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=E&&E.repeat||1;var P=E?E.insertAt:null,z=S.sel,H=E.head||b.getCursor("head"),q=b.listSelections().length;if(P=="eol")H=new De(H.line,Rt(b,H.line));else if(P=="bol")H=new De(H.line,0);else if(P=="charAfter"){var X=y(b,H,me(H,0,1));H=X.end}else if(P=="firstNonBlank"){var X=y(b,H,Ln.moveToFirstNonWhiteSpaceCharacter(b,H));H=X.end}else if(P=="startOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(H=new De(Math.min(z.head.line,z.anchor.line),Math.min(z.head.ch,z.anchor.ch)),q=Math.abs(z.head.line-z.anchor.line)+1):z.head.line<z.anchor.line?H=z.head:H=new De(z.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(H=new De(Math.min(z.head.line,z.anchor.line),Math.max(z.head.ch,z.anchor.ch)+1),q=Math.abs(z.head.line-z.anchor.line)+1):z.head.line>=z.anchor.line?H=me(z.head,0,1):H=new De(z.anchor.line,0)}else if(P=="inplace"){if(S.visualMode)return}else P=="lastEdit"&&(H=br(b)||H);b.setOption("disableInput",!1),E&&E.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Be.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Be.signal(b,"vim-mode-change",{mode:"insert"})),Ve.macroModeState.isPlaying||(b.on("change",Ko),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=b.setBookmark(H,{insertLeft:!0}),Be.on(b.getInputField(),"keydown",Io)),S.visualMode&&bn(b),ur(b,H,q)}},toggleVisualMode:function(b,E,S){var P=E.repeat,z=b.getCursor(),H;if(S.visualMode)S.visualLine^E.linewise||S.visualBlock^E.blockwise?(S.visualLine=!!E.linewise,S.visualBlock=!!E.blockwise,Be.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Dn(b)):bn(b);else{S.visualMode=!0,S.visualLine=!!E.linewise,S.visualBlock=!!E.blockwise,H=ce(b,new De(z.line,z.ch+P-1));var q=y(b,z,H);S.sel={anchor:q.start,head:q.end},Be.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Dn(b),Zr(b,S,"<",st(z,H)),Zr(b,S,">",Ht(z,H))}},reselectLastSelection:function(b,E,S){var P=S.lastSelection;if(S.visualMode&&Tt(b,S),P){var z=P.anchorMark.find(),H=P.headMark.find();if(!z||!H)return;S.sel={anchor:z,head:H},S.visualMode=!0,S.visualLine=P.visualLine,S.visualBlock=P.visualBlock,Dn(b),Zr(b,S,"<",st(z,H)),Zr(b,S,">",Ht(z,H)),Be.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(b,E,S){var P,z;if(S.visualMode){if(P=b.getCursor("anchor"),z=b.getCursor("head"),ut(z,P)){var H=z;z=P,P=H}z.ch=Rt(b,z.line)-1}else{var q=Math.max(E.repeat,2);P=b.getCursor(),z=ce(b,new De(P.line+q-1,1/0))}for(var X=0,Q=P.line;Q<z.line;Q++){X=Rt(b,P.line);var re="",ue=0;if(!E.keepSpaces){var ye=b.getLine(P.line+1);ue=ye.search(/\S/),ue==-1?ue=ye.length:re=" "}b.replaceRange(re,new De(P.line,X),new De(P.line+1,ue))}var Ce=ce(b,new De(P.line,X));S.visualMode&&bn(b,!1),b.setCursor(Ce)},newLineAndEnterInsertMode:function(b,E,S){S.insertMode=!0;var P=Xe(b.getCursor());if(P.line===b.firstLine()&&!E.after)b.replaceRange(`
|
|
1442
|
-
`,new De(b.firstLine(),0)),b.setCursor(b.firstLine(),0);else{P.line=E.after?P.line:P.line-1,P.ch=Rt(b,P.line),b.setCursor(P);var z=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;z(b)}this.enterInsertMode(b,{repeat:E.repeat},S)},paste:function(b,E,S){var P=this,z=Ve.registerController.getRegister(E.registerName),H=function(){var q=z.toString();P.continuePaste(b,E,S,q,z)};E.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(b,E,S,q,z)},function(){H()}):H()},continuePaste:function(b,E,S,P,z){var H=Xe(b.getCursor());if(P){if(E.matchIndent){var q=b.getOption("tabSize"),X=function(On){var G=On.split(" ").length-1,Z=On.split(" ").length-1;return G*q+Z*1},Q=b.getLine(b.getCursor().line),re=X(Q.match(/^\s*/)[0]),ue=P.replace(/\n$/,""),ye=P!==ue,Ce=X(P.match(/^\s*/)[0]),P=ue.replace(/^\s*/gm,function(On){var G=re+(X(On)-Ce);if(G<0)return"";if(b.getOption("indentWithTabs")){var Z=Math.floor(G/q);return Array(Z+1).join(" ")}return Array(G+1).join(" ")});P+=ye?`
|
|
1443
|
-
`:""}if(E.repeat>1)var P=Array(E.repeat+1).join(P);var ve=z.linewise,we=z.blockwise;if(we){P=P.split(`
|
|
1444
|
-
`),ve&&P.pop();for(var Oe=0;Oe<P.length;Oe++)P[Oe]=P[Oe]==""?" ":P[Oe];H.ch+=E.after?1:0,H.ch=Math.min(Rt(b,H.line),H.ch)}else ve?S.visualMode?P=S.visualLine?P.slice(0,-1):`
|
|
1445
|
-
`+P.slice(0,P.length-1)+`
|
|
1446
|
-
`:E.after?(P=`
|
|
1447
|
-
`+P.slice(0,P.length-1),H.ch=Rt(b,H.line)):H.ch=0:H.ch+=E.after?1:0;var Ie;if(S.visualMode){S.lastPastedText=P;var Ye,dt=Ke(b,S),tt=dt[0],ot=dt[1],Rn=b.getSelection(),St=b.listSelections(),Jt=new Array(St.length).join("1").split("1");S.lastSelection&&(Ye=S.lastSelection.headMark.find()),Ve.registerController.unnamedRegister.setText(Rn),we?(b.replaceSelections(Jt),ot=new De(tt.line+P.length-1,tt.ch),b.setCursor(tt),yn(b,ot),b.replaceSelections(P),Ie=tt):S.visualBlock?(b.replaceSelections(Jt),b.setCursor(tt),b.replaceRange(P,tt,tt),Ie=tt):(b.replaceRange(P,tt,ot),Ie=b.posFromIndex(b.indexFromPos(tt)+P.length-1)),Ye&&(S.lastSelection.headMark=b.setBookmark(Ye)),ve&&(Ie.ch=0)}else if(we){b.setCursor(H);for(var Oe=0;Oe<P.length;Oe++){var It=H.line+Oe;It>b.lastLine()&&b.replaceRange(`
|
|
1448
|
-
`,new De(It,0));var $t=Rt(b,It);$t<H.ch&&kr(b,It,H.ch)}b.setCursor(H),yn(b,new De(H.line+P.length-1,H.ch)),b.replaceSelections(P),Ie=H}else if(b.replaceRange(P,H),ve){var It=E.after?H.line+1:H.line;Ie=new De(It,Xt(b.getLine(It)))}else Ie=Xe(H),/\n/.test(P)||(Ie.ch+=P.length-(E.after?1:0));S.visualMode&&bn(b,!1),b.setCursor(Ie)}},undo:function(b,E){b.operation(function(){rt(b,Be.commands.undo,E.repeat)(),b.setCursor(ce(b,b.getCursor("start")))})},redo:function(b,E){rt(b,Be.commands.redo,E.repeat)()},setRegister:function(b,E,S){S.inputState.registerName=E.selectedCharacter},insertRegister:function(b,E,S){var P=E.selectedCharacter,z=Ve.registerController.getRegister(P),H=z&&z.toString();H&&b.replaceSelection(H)},oneNormalCommand:function(b,E,S){wr(b,!0),S.insertModeReturn=!0,Be.on(b,"vim-command-done",function P(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||Vn.enterInsertMode(b,{},S)),Be.off(b,"vim-command-done",P))})},setMark:function(b,E,S){var P=E.selectedCharacter;Zr(b,S,P,b.getCursor())},replace:function(b,E,S){var P=E.selectedCharacter,z=b.getCursor(),H,q,X=b.listSelections();if(S.visualMode)z=b.getCursor("start"),q=b.getCursor("end");else{var Q=b.getLine(z.line);H=z.ch+E.repeat,H>Q.length&&(H=Q.length),q=new De(z.line,H)}var re=y(b,z,q);if(z=re.start,q=re.end,P==`
|
|
1449
|
-
`)S.visualMode||b.replaceRange("",z,q),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(b);else{var ue=b.getRange(z,q);if(ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/[^\n]/g,P),S.visualBlock){var ye=new Array(b.getOption("tabSize")+1).join(" ");ue=b.getSelection(),ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/\t/g,ye).replace(/[^\n]/g,P).split(`
|
|
1450
|
-
`),b.replaceSelections(ue)}else b.replaceRange(ue,z,q);S.visualMode?(z=ut(X[0].anchor,X[0].head)?X[0].anchor:X[0].head,b.setCursor(z),bn(b,!1)):b.setCursor(me(q,0,-1))}},incrementNumberToken:function(b,E){for(var S=b.getCursor(),P=b.getLine(S.line),z=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,q,X,Q;(H=z.exec(P))!==null&&(q=H.index,X=q+H[0].length,!(S.ch<X)););if(!(!E.backtrack&&X<=S.ch)&&H){var re=H[2]||H[4],ue=H[3]||H[5],ye=E.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ve=parseInt(H[1]+ue,Ce)+ye*E.repeat;Q=ve.toString(Ce);var we=re?new Array(ue.length-Q.length+1+H[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new De(S.line,q),Ie=new De(S.line,X);b.replaceRange(Q,Oe,Ie),b.setCursor(new De(S.line,q+Q.length-1))}},repeatLastEdit:function(b,E,S){var P=S.lastEditInputState;if(P){var z=E.repeat;z&&E.repeatIsExplicit?S.lastEditInputState.repeatOverride=z:z=S.lastEditInputState.repeatOverride||z,Ps(b,S,z,!1)}},indent:function(b,E){b.indentLine(b.getCursor().line,E.indentRight)},exitInsertMode:wr},Si={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},$i={bracket:{isComplete:function(b){if(b.nextCh===b.symb){if(b.depth++,b.depth>=1)return!0}else b.nextCh===b.reverseSymb&&b.depth--;return!1}},section:{init:function(b){b.curMoveThrough=!0,b.symb=(b.forward?"]":"[")===b.symb?"{":"}"},isComplete:function(b){return b.index===0&&b.nextCh===b.symb}},comment:{isComplete:function(b){var E=b.lastCh==="*"&&b.nextCh==="/";return b.lastCh=b.nextCh,E}},method:{init:function(b){b.symb=b.symb==="m"?"{":"}",b.reverseSymb=b.symb==="{"?"}":"{"},isComplete:function(b){return b.nextCh===b.symb}},preprocess:{init:function(b){b.index=0},isComplete:function(b){if(b.nextCh==="#"){var E=b.lineText.match(/^#(\w+)/)[1];if(E==="endif"){if(b.forward&&b.depth===0)return!0;b.depth++}else if(E==="if"){if(!b.forward&&b.depth===0)return!0;b.depth--}if(E==="else"&&b.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),Dr.prototype={getQuery:function(){return Ve.query},setQuery:function(b){Ve.query=b},getOverlay:function(){return this.searchOverlay},setOverlay:function(b){this.searchOverlay=b},isReversed:function(){return Ve.isReversed},setReversed:function(b){Ve.isReversed=b},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(b){this.annotate=b}};var Bi={"\\n":`
|
|
1451
|
-
`,"\\r":"\r","\\t":" "},js={"\\/":"/","\\\\":"\\","\\n":`
|
|
1452
|
-
`,"\\r":"\r","\\t":" ","\\&":"&"},ln=0,Ia=function(){this.buildCommandMap_()};Ia.prototype={processCommand:function(b,E,S){var P=this;b.operation(function(){b.curOp.isVimOp=!0,P._processCommand(b,E,S)})},_processCommand:function(b,E,S){var P=b.state.vim,z=Ve.registerController.getRegister(":"),H=z.toString(),q=new Be.StringStream(E);z.setText(E);var X=S||{};X.input=E;try{this.parseInput_(b,q,X)}catch(ue){throw Ft(b,ue.toString()),ue}P.visualMode&&bn(b);var Q,re;if(!X.commandName)X.line!==void 0&&(re="move");else if(Q=this.matchCommand_(X.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&z.setText(H),this.parseCommandArgs_(q,X,Q),Q.type=="exToKey"){I(b,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(b,Q.toInput);return}}if(!re){Ft(b,'Not an editor command ":'+E+'"');return}try{gr[re](b,X),(!Q||!Q.possiblyAsync)&&X.callback&&X.callback()}catch(ue){throw Ft(b,ue.toString()),ue}},parseInput_:function(b,E,S){if(E.eatWhile(":"),E.eat("%")?(S.line=b.firstLine(),S.lineEnd=b.lastLine()):(S.line=this.parseLineSpec_(b,E),S.line!==void 0&&E.eat(",")&&(S.lineEnd=this.parseLineSpec_(b,E))),S.line==null)if(b.state.vim.visualMode){var P=fn(b,b.state.vim,"<");S.selectionLine=P&&P.line,P=fn(b,b.state.vim,">"),S.selectionLineEnd=P&&P.line}else S.selectionLine=b.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var z=E.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return z?S.commandName=z[1]:S.commandName=E.match(/.*/)[0],S},parseLineSpec_:function(b,E){var S=E.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(E.next()){case".":return this.parseLineSpecOffset_(E,b.getCursor().line);case"$":return this.parseLineSpecOffset_(E,b.lastLine());case"'":var P=E.next(),z=fn(b,b.state.vim,P);if(!z)throw new Error("Mark not set");return this.parseLineSpecOffset_(E,z.line);case"-":case"+":return E.backUp(1),this.parseLineSpecOffset_(E,b.getCursor().line);default:return E.backUp(1),void 0}},parseLineSpecOffset_:function(b,E){var S=b.match(/^([+-])?(\d+)/);if(S){var P=parseInt(S[2],10);S[1]=="-"?E-=P:E+=P}return E},parseCommandArgs_:function(b,E,S){if(!b.eol()){E.argString=b.match(/.*/)[0];var P=S.argDelimiter||/\s+/,z=cr(E.argString).split(P);z.length&&z[0]&&(E.args=z)}},matchCommand_:function(b){for(var E=b.length;E>0;E--){var S=b.substring(0,E);if(this.commandMap_[S]){var P=this.commandMap_[S];if(P.name.indexOf(b)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var b=0;b<oo.length;b++){var E=oo[b],S=E.shortName||E.name;this.commandMap_[S]=E}},map:function(b,E,S,P){if(b!=":"&&b.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var z=b.substring(1);E!=":"&&E.charAt(0)==":"?this.commandMap_[z]={name:z,type:"exToEx",toInput:E.substring(1),user:!0}:this.commandMap_[z]={name:z,type:"exToKey",toKeys:E,user:!0}}else{var H={keys:b,type:"keyToKey",toKeys:E,noremap:!!P};S&&(H.context=S),zn.unshift(H)}},unmap:function(b,E){if(b!=":"&&b.charAt(0)==":"){if(E)throw Error("Mode not supported for ex mappings");var S=b.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var P=b,z=0;z<zn.length;z++)if(P==zn[z].keys&&zn[z].context===E)return zn.splice(z,1),!0}};var gr={colorscheme:function(b,E){if(!E.args||E.args.length<1){Ft(b,b.getOption("theme"));return}b.setOption("theme",E.args[0])},map:function(b,E,S,P){var z=E.args;if(!z||z.length<2){b&&Ft(b,"Invalid mapping: "+E.input);return}Br.map(z[0],z[1],S,P)},imap:function(b,E){this.map(b,E,"insert")},nmap:function(b,E){this.map(b,E,"normal")},vmap:function(b,E){this.map(b,E,"visual")},omap:function(b,E){this.map(b,E,"operatorPending")},noremap:function(b,E){this.map(b,E,void 0,!0)},inoremap:function(b,E){this.map(b,E,"insert",!0)},nnoremap:function(b,E){this.map(b,E,"normal",!0)},vnoremap:function(b,E){this.map(b,E,"visual",!0)},onoremap:function(b,E){this.map(b,E,"operatorPending",!0)},unmap:function(b,E,S){var P=E.args;(!P||P.length<1||!Br.unmap(P[0],S))&&b&&Ft(b,"No such mapping: "+E.input)},mapclear:function(b,E){kt.mapclear()},imapclear:function(b,E){kt.mapclear("insert")},nmapclear:function(b,E){kt.mapclear("normal")},vmapclear:function(b,E){kt.mapclear("visual")},omapclear:function(b,E){kt.mapclear("operatorPending")},move:function(b,E){Ai.processCommand(b,b.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:E.line+1})},set:function(b,E){var S=E.args,P=E.setCfg||{};if(!S||S.length<1){b&&Ft(b,"Invalid mapping: "+E.input);return}var z=S[0].split("="),H=z[0],q=z[1],X=!1,Q=!1;if(H.charAt(H.length-1)=="?"){if(q)throw Error("Trailing characters: "+E.argString);H=H.substring(0,H.length-1),X=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),Q=!0);q===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),q=!1);var re=Gt[H]&&Gt[H].type=="boolean";if(re&&(Q?q=!k(H,b,P):q==null&&(q=!0)),!re&&q===void 0||X){var ue=k(H,b,P);ue instanceof Error?Ft(b,ue.message):ue===!0||ue===!1?Ft(b," "+(ue?"":"no")+H):Ft(b," "+H+"="+ue)}else{var ye=$(H,q,b,P);ye instanceof Error&&Ft(b,ye.message)}},setlocal:function(b,E){E.setCfg={scope:"local"},this.set(b,E)},setglobal:function(b,E){E.setCfg={scope:"global"},this.set(b,E)},registers:function(b,E){var S=E.args,P=Ve.registerController.registers,z=`----------Registers----------
|
|
1453
|
-
|
|
1454
|
-
`;if(S){var H;S=S.join("");for(var q=0;q<S.length;q++)if(H=S.charAt(q),!!Ve.registerController.isValidRegister(H)){var X=P[H]||new B;z+='"'+H+" "+X.toString()+`
|
|
1455
|
-
`}}else for(var H in P){var Q=P[H].toString();Q.length&&(z+='"'+H+" "+Q+`
|
|
1456
|
-
`)}Ft(b,z)},sort:function(b,E){function S(){if(E.argString){var It=new Be.StringStream(E.argString);if(It.eat("!")&&(H=!0),It.eol())return;if(!It.eatSpace())return"Invalid arguments";var $t=It.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!It.eol())return"Invalid arguments";if($t[1]){q=$t[1].indexOf("i")!=-1,X=$t[1].indexOf("u")!=-1;var ir=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,mr=$t[1].indexOf("x")!=-1&&1,On=$t[1].indexOf("o")!=-1&&1;if(ir+mr+On>1)return"Invalid arguments";Q=ir&&"decimal"||mr&&"hex"||On&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),q?"i":""))}}function P(It,$t){if(H){var ir;ir=It,It=$t,$t=ir}q&&(It=It.toLowerCase(),$t=$t.toLowerCase());var mr=Q&&Ie.exec(It),On=Q&&Ie.exec($t);return mr?(mr=parseInt((mr[1]+mr[2]).toLowerCase(),Ye),On=parseInt((On[1]+On[2]).toLowerCase(),Ye),mr-On):It<$t?-1:1}function z(It,$t){if(H){var ir;ir=It,It=$t,$t=ir}return q&&(It[0]=It[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),It[0]<$t[0]?-1:1}var H,q,X,Q,re,ue=S();if(ue){Ft(b,ue+": "+E.argString);return}var ye=E.line||b.firstLine(),Ce=E.lineEnd||E.line||b.lastLine();if(ye!=Ce){var ve=new De(ye,0),we=new De(Ce,Rt(b,Ce)),Oe=b.getRange(ve,we).split(`
|
|
1457
|
-
`),Ie=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ye=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,dt=[],tt=[];if(Q||re)for(var ot=0;ot<Oe.length;ot++){var Rn=re?Oe[ot].match(re):null;Rn&&Rn[0]!=""?dt.push(Rn):!re&&Ie.exec(Oe[ot])?dt.push(Oe[ot]):tt.push(Oe[ot])}else tt=Oe;if(dt.sort(re?z:P),re)for(var ot=0;ot<dt.length;ot++)dt[ot]=dt[ot].input;else Q||tt.sort(P);if(Oe=H?dt.concat(tt):tt.concat(dt),X){var St=Oe,Jt;Oe=[];for(var ot=0;ot<St.length;ot++)St[ot]!=Jt&&Oe.push(St[ot]),Jt=St[ot]}b.replaceRange(Oe.join(`
|
|
1458
|
-
`),ve,we)}},vglobal:function(b,E){this.global(b,E)},normal:function(b,E){var S=E.argString;if(S&&S[0]=="!"&&(S=S.slice(1),zi=!0),S=S.trimStart(),!S){Ft(b,"Argument is required.");return}var P=E.line;if(typeof P=="number")for(var z=isNaN(E.lineEnd)?P:E.lineEnd,H=P;H<=z;H++)b.setCursor(H,0),I(b,E.argString.trimStart()),b.state.vim.insertMode&&wr(b,!0);else I(b,E.argString.trimStart()),b.state.vim.insertMode&&wr(b,!0)},global:function(b,E){var S=E.argString;if(!S){Ft(b,"Regular Expression missing from global");return}var P=E.commandName[0]==="v";S[0]==="!"&&E.commandName[0]==="g"&&(P=!0,S=S.slice(1));var z=E.line!==void 0?E.line:b.firstLine(),H=E.lineEnd||E.line||b.lastLine(),q=_n(S),X=S,Q;if(q.length&&(X=q[0],Q=q.slice(1,q.length).join("/")),X)try{ae(b,X,!0,!0)}catch{Ft(b,"Invalid regex: "+X);return}for(var re=Fn(b).getQuery(),ue=[],ye=z;ye<=H;ye++){var Ce=b.getLine(ye),ve=re.test(Ce);ve!==P&&ue.push(Q?b.getLineHandle(ye):Ce)}if(!Q){Ft(b,ue.join(`
|
|
1459
|
-
`));return}var we=0,Oe=function(){if(we<ue.length){var Ie=ue[we++],Ye=b.getLineNumber(Ie);if(Ye==null){Oe();return}var dt=Ye+1+Q;Br.processCommand(b,dt,{callback:Oe})}else b.releaseLineHandles&&b.releaseLineHandles()};Oe()},substitute:function(b,E){if(!b.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=E.argString,P=S?hi(S,S[0]):[],z,H="",q,X,Q,re=!1,ue=!1;if(P.length)z=P[0],k("pcre")&&z!==""&&(z=new RegExp(z).source),H=P[1],H!==void 0&&(k("pcre")?H=Pr(H.replace(/([^\\])&/g,"$1$$&")):H=To(H),Ve.lastSubstituteReplacePart=H),q=P[2]?P[2].split(" "):[];else if(S&&S.length){Ft(b,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(X=q[0],Q=parseInt(q[1]),X&&(X.indexOf("c")!=-1&&(re=!0),X.indexOf("g")!=-1&&(ue=!0),k("pcre")?z=z+"/"+X:z=z.replace(/\//g,"\\/")+"/"+X)),z)try{ae(b,z,!0,!0)}catch{Ft(b,"Invalid regex: "+z);return}if(H=H||Ve.lastSubstituteReplacePart,H===void 0){Ft(b,"No previous substitute regular expression");return}var ye=Fn(b),Ce=ye.getQuery(),ve=E.line!==void 0?E.line:b.getCursor().line,we=E.lineEnd||ve;ve==b.firstLine()&&we==b.lastLine()&&(we=1/0),Q&&(ve=we,we=ve+Q-1);var Oe=ce(b,new De(ve,0)),Ie=b.getSearchCursor(Ce,Oe);xn(b,re,ue,ve,we,Ie,Ce,H,E.callback)},startinsert:function(b,E){I(b,E.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(b){Be.commands.save?Be.commands.save(b):b.save&&b.save()},nohlsearch:function(b){Yt(b)},yank:function(b){var E=Xe(b.getCursor()),S=E.line,P=b.getLine(S);Ve.registerController.pushText("0","yank",P,!0,!0)},delete:function(b,E){var S=E.selectionLine,P=isNaN(E.selectionLineEnd)?S:E.selectionLineEnd;ts.delete(b,{linewise:!0},[{anchor:new De(S,0),head:new De(P+1,0)}])},join:function(b,E){var S=E.selectionLine,P=isNaN(E.selectionLineEnd)?S:E.selectionLineEnd;b.setCursor(new De(S,0)),Vn.joinLines(b,{repeat:P-S},b.state.vim)},delmarks:function(b,E){if(!E.argString||!cr(E.argString)){Ft(b,"Argument required");return}for(var S=b.state.vim,P=new Be.StringStream(cr(E.argString));!P.eol();){P.eatSpace();var z=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Ft(b,"Invalid argument: "+E.argString.substring(z));return}var H=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Ft(b,"Invalid argument: "+E.argString.substring(z));return}var q=H,X=P.next();if(!(u(q)&&u(X)||s(q)&&s(X))){Ft(b,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=X.charCodeAt(0);if(Q>=re){Ft(b,"Invalid argument: "+E.argString.substring(z));return}for(var ue=0;ue<=re-Q;ue++){var ye=String.fromCharCode(Q+ue);delete S.marks[ye]}}else delete S.marks[H]}}},Br=new Ia;R("insertModeEscKeysTimeout",200,"number"),Be.Vim=kt;var _o={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"},Er=kt.handleKey.bind(kt);kt.handleKey=function(b,E,S){return b.operation(function(){return Er(b,E,S)},!0)},N(),r.CodeMirror=Be;var fi=kt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(b,E,S,P,z){var H=this.state.vim||{},q=S.characterWidth,X=S.lineHeight,Q=E.top,re=E.left;if(!H.insertMode){var ue=P.cursor?pr.comparePoints(P.cursor,P.start)<=0:z.selection.isBackwards()||z.selection.isEmpty();!ue&&re>q&&(re-=q)}!H.insertMode&&H.status&&(X/=2,Q+=X),ei.translate(b,re,Q),ei.setStyle(b.style,"width",q+"px"),ei.setStyle(b.style,"height",X+"px")},$getDirectionForHighlight:function(b){var E=b.state.cm,S=fi(E);if(!S.insertMode)return b.session.selection.isBackwards()||b.session.selection.isEmpty()},handleKeyboard:function(b,E,S,P,z){var H=b.editor,q=H.state.cm,X=fi(q);if(P!=-1){if(X.insertMode||(E==-1?(S.charCodeAt(0)>255&&b.inputKey&&(S=b.inputKey,S&&b.inputHash==4&&(S=S.toUpperCase())),b.inputChar=S):E==4||E==0?b.inputKey==S&&b.inputHash==E&&b.inputChar?(S=b.inputChar,E=-1):(b.inputChar=null,b.inputKey=S,b.inputHash=E):b.inputChar=b.inputKey=null),q.state.overwrite&&X.insertMode&&S=="backspace"&&E==0)return{command:"gotoleft"};if(S=="c"&&E==1&&!Lo.isMac&&H.getCopyText())return H.once("copy",function(){X.insertMode?H.selection.clearSelection():q.operation(function(){bn(q)})}),{command:"null",passEvent:!0};if(S=="esc"&&!X.insertMode&&!X.visualMode&&!q.ace.inMultiSelectMode){var Q=Fn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(E==-1||E&1||E===0&&S.length>1){var ue=X.insertMode,ye=$a(E,S,z||{},X);X.status==null&&(X.status="");var Ce=Zo(q,ye,"user");return X=fi(q),Ce&&X.status!=null?X.status+=ye:X.status==null&&(X.status=""),q._signal("changeStatus"),!Ce&&(E!=-1||ue)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(b){function E(){var P=fi(S).insertMode;S.ace.renderer.setStyle("normal-mode",!P),b.textInput.setCommandMode(!P),b.renderer.$keepTextAreaAtCursor=P,b.renderer.$blockCursor=!P}b.state||(b.state={});var S=new Be(b);b.state.cm=S,b.$vimModeHandler=this,c(S),fi(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(fi(S).status=null,S.ace._signal("changeStatus"),S.ace.session.markUndoGroup())}),S.on("changeStatus",function(){S.ace.renderer.updateCursor(),S.ace._signal("changeStatus")}),S.on("vim-mode-change",function(){S.virtualSelectionMode()||(E(),S._signal("changeStatus"))}),E(),b.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(b){var E=b.state.cm;d(E),E.destroy(),b.state.cm=null,b.$vimModeHandler=null,b.renderer.$cursorLayer.drawCursor=null,b.renderer.setStyle("normal-mode",!1),b.textInput.setCommandMode(!1),b.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(b){var E=b.state.cm,S=fi(E);if(S.insertMode)return"INSERT";var P="";return S.visualMode&&(P+="VISUAL",S.visualLine&&(P+=" LINE"),S.visualBlock&&(P+=" BLOCK")),S.status&&(P+=(P?" ":"")+S.status),P}},kt.defineOption({name:"wrap",set:function(b,E){E&&E.ace.setOption("wrap",b)},type:"boolean"},!1),kt.defineEx("write","w",function(){console.log(":write is not implemented")}),zn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),zn.push({keys:"gq",type:"operator",operator:"hardWrap"}),kt.defineOperator("hardWrap",function(b,E,S,P,z){var H=S[0].anchor.line,q=S[0].head.line;return E.linewise&&q--,xo(b.ace,{startRow:H,endRow:q}),De(q,0)}),R("textwidth",void 0,"number",["tw"],function(b,E){if(E!==void 0){if(b===void 0){var S=E.ace.getOption("printMarginColumn");return S}var P=Math.round(b);P>1&&E.ace.setOption("printMarginColumn",P)}}),Vn.aceCommand=function(b,E,S){b.vimCmd=E,b.ace.inVirtualSelectionMode?b.ace.on("beforeEndOperation",ro):ro(null,b.ace)},Vn.fold=function(b,E,S){b.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(E.all?2:0)+(E.open?1:0)])},Oo=zn.length,r.handler.defaultKeymap=zn,r.handler.actions=Vn,r.Vim=kt}),(function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})})()})(Km)),Km.exports}fS();var Jm={},Zm;function pS(){return Zm||(Zm=1,(function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(y){return h(g(y),arguments)}function r(y,c){return e.apply(null,[y].concat(c||[]))}function h(y,c){var d=1,i=y.length,l,u="",p,o,s,m,w,x,R,$;for(p=0;p<i;p++)if(typeof y[p]=="string")u+=y[p];else if(typeof y[p]=="object"){if(s=y[p],s.keys)for(l=c[d],o=0;o<s.keys.length;o++){if(l==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));l=l[s.keys[o]]}else s.param_no?l=c[s.param_no]:l=c[d++];if(t.not_type.test(s.type)&&t.not_primitive.test(s.type)&&l instanceof Function&&(l=l()),t.numeric_arg.test(s.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(e("[sprintf] expecting number but found %T",l));switch(t.number.test(s.type)&&(R=l>=0),s.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,s.width?parseInt(s.width):0);break;case"e":l=s.precision?parseFloat(l).toExponential(s.precision):parseFloat(l).toExponential();break;case"f":l=s.precision?parseFloat(l).toFixed(s.precision):parseFloat(l);break;case"g":l=s.precision?String(Number(l.toPrecision(s.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=s.precision?l.substring(0,s.precision):l;break;case"t":l=String(!!l),l=s.precision?l.substring(0,s.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=s.precision?l.substring(0,s.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=s.precision?l.substring(0,s.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}t.json.test(s.type)?u+=l:(t.number.test(s.type)&&(!R||s.sign)?($=R?"+":"-",l=l.toString().replace(t.sign,"")):$="",w=s.pad_char?s.pad_char==="0"?"0":s.pad_char.charAt(1):" ",x=s.width-($+l).length,m=s.width&&x>0?w.repeat(x):"",u+=s.align?$+l+m:w==="0"?$+m+l:m+$+l)}return u}var f=Object.create(null);function g(y){if(f[y])return f[y];for(var c=y,d,i=[],l=0;c;){if((d=t.text.exec(c))!==null)i.push(d[0]);else if((d=t.modulo.exec(c))!==null)i.push("%");else if((d=t.placeholder.exec(c))!==null){if(d[2]){l|=1;var u=[],p=d[2],o=[];if((o=t.key.exec(p))!==null)for(u.push(o[1]);(p=p.substring(o[0].length))!=="";)if((o=t.key_access.exec(p))!==null)u.push(o[1]);else if((o=t.index_access.exec(p))!==null)u.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=u}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(d[0].length)}return f[y]=i}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(Jm)),Jm}pS();var rc={exports:{}},gS=rc.exports,Qm;function mS(){return Qm||(Qm=1,(function(n,t){(function(){var e,r="4.18.1",h=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",y="Invalid `variable` option passed into `_.template`",c="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",i=500,l="__lodash_placeholder__",u=1,p=2,o=4,s=1,m=2,w=1,x=2,R=4,$=8,k=16,C=32,O=64,N=128,L=256,I=512,W=30,F="...",D=800,A=16,_=1,M=2,B=3,j=1/0,V=9007199254740991,K=17976931348623157e292,J=NaN,oe=4294967295,ee=oe-1,se=oe>>>1,ce=[["ary",N],["bind",w],["bindKey",x],["curry",$],["curryRight",k],["flip",I],["partial",C],["partialRight",O],["rearg",L]],he="[object Arguments]",me="[object Array]",$e="[object AsyncFunction]",Ee="[object Boolean]",Re="[object Date]",rt="[object DOMException]",Xe="[object Error]",at="[object Function]",ut="[object GeneratorFunction]",st="[object Map]",Ht="[object Number]",_r="[object Null]",Rt="[object Object]",cr="[object Promise]",Mn="[object Proxy]",kr="[object RegExp]",yn="[object Set]",ur="[object String]",pt="[object Symbol]",Ke="[object Undefined]",Tt="[object WeakMap]",en="[object WeakSet]",Dn="[object ArrayBuffer]",Xn="[object DataView]",hr="[object Float32Array]",bn="[object Float64Array]",Hn="[object Int8Array]",Pn="[object Int16Array]",Xt="[object Int32Array]",an="[object Uint8Array]",Nr="[object Uint8ClampedArray]",Xr="[object Uint16Array]",Ar="[object Uint32Array]",Ci=/\b__p \+= '';/g,_i=/\b(__p \+=) '' \+/g,nr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,no=/&(?:amp|lt|gt|quot|#39);/g,Jr=/[&<>"']/g,Ms=RegExp(no.source),Zr=RegExp(Jr.source),$n=/<%-([\s\S]+?)%>/g,ki=/<%([\s\S]+?)%>/g,Ro=/<%=([\s\S]+?)%>/g,ui=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,En=/^\w*$/,Sr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(Dr.source),_n=/^\s+/,yr=/\s/,hi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,go=/\{\n\/\* \[wrapped with (.+)\] \*/,mo=/,? & /,To=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pr=/[()=,{}\[\]\/\s]/,di=/\\(\\)?/g,Qr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ft=/\w*$/,Mo=/^[-+]0x[0-9a-f]+$/i,dr=/^0b[01]+$/i,In=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,He=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",$r="\\u0300-\\u036f",Jn="\\ufe20-\\ufe2f",fn="\\u20d0-\\u20ff",br=$r+Jn+fn,xn="\\u2700-\\u27bf",wr="a-z\\xdf-\\xf6\\xf8-\\xff",vo="\\xac\\xb1\\xd7\\xf7",Is="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ls="\\u2000-\\u206f",Os=" \\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",fr="A-Z\\xc0-\\xd6\\xd8-\\xde",Ns="\\ufe0e\\ufe0f",Ko=vo+Is+Ls+Os,yo="['’]",Ds="["+Yt+"]",Xo="["+Ko+"]",Io="["+br+"]",Ps="\\d+",Fs="["+xn+"]",Jo="["+wr+"]",$a="[^"+Yt+Ko+Ps+xn+wr+fr+"]",bo="\\ud83c[\\udffb-\\udfff]",Zo="(?:"+Io+"|"+bo+")",ro="[^"+Yt+"]",pr="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",ei="["+fr+"]",Ea="\\u200d",Ra="(?:"+Jo+"|"+$a+")",Qo="(?:"+ei+"|"+$a+")",io="(?:"+yo+"(?:d|ll|m|re|s|t|ve))?",Lo="(?:"+yo+"(?:D|LL|M|RE|S|T|VE))?",es=Zo+"?",wo="["+Ns+"]?",Ta="(?:"+Ea+"(?:"+[ro,pr,zs].join("|")+")"+wo+es+")*",xo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Be="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bs=wo+es+Ta,De="(?:"+[Fs,pr,zs].join("|")+")"+Bs,zn="(?:"+[ro+Io+"?",Io,pr,zs,Ds].join("|")+")",Oo=RegExp(yo,"g"),oo=RegExp(Io,"g"),Bn=RegExp(bo+"(?="+bo+")|"+zn+Bs,"g"),Ma=RegExp([ei+"?"+Jo+"+"+io+"(?="+[Xo,ei,"$"].join("|")+")",Qo+"+"+Lo+"(?="+[Xo,ei+Ra,"$"].join("|")+")",ei+"?"+Ra+"+"+io,ei+"+"+Lo,Be,xo,Ps,De].join("|"),"g"),No=RegExp("["+Ea+Yt+br+Ns+"]"),Pi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Co=["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"],Ws=-1,on={};on[hr]=on[bn]=on[Hn]=on[Pn]=on[Xt]=on[an]=on[Nr]=on[Xr]=on[Ar]=!0,on[he]=on[me]=on[Dn]=on[Ee]=on[Xn]=on[Re]=on[Xe]=on[at]=on[st]=on[Ht]=on[Rt]=on[kr]=on[yn]=on[ur]=on[Tt]=!1;var ht={};ht[he]=ht[me]=ht[Dn]=ht[Xn]=ht[Ee]=ht[Re]=ht[hr]=ht[bn]=ht[Hn]=ht[Pn]=ht[Xt]=ht[st]=ht[Ht]=ht[Rt]=ht[kr]=ht[yn]=ht[ur]=ht[pt]=ht[an]=ht[Nr]=ht[Xr]=ht[Ar]=!0,ht[Xe]=ht[at]=ht[Tt]=!1;var Gt={À:"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"},Fi={"&":"&","<":"<",">":">",'"':""","'":"'"},Un={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kn=parseFloat,kt=parseInt,Fr=typeof Go=="object"&&Go&&Go.Object===Object&&Go,zi=typeof self=="object"&&self&&self.Object===Object&&self,zt=Fr||zi||Function("return this")(),zr=t&&!t.nodeType&&t,rr=zr&&!0&&n&&!n.nodeType&&n,so=rr&&rr.exports===zr,Ai=so&&Fr.process,Ln=(function(){try{var ge=rr&&rr.require&&rr.require("util").types;return ge||Ai&&Ai.binding&&Ai.binding("util")}catch{}})(),ts=Ln&&Ln.isArrayBuffer,Vn=Ln&&Ln.isDate,Si=Ln&&Ln.isMap,$i=Ln&&Ln.isRegExp,Bi=Ln&&Ln.isSet,js=Ln&&Ln.isTypedArray;function ln(ge,Se,_e){switch(_e.length){case 0:return ge.call(Se);case 1:return ge.call(Se,_e[0]);case 2:return ge.call(Se,_e[0],_e[1]);case 3:return ge.call(Se,_e[0],_e[1],_e[2])}return ge.apply(Se,_e)}function Ia(ge,Se,_e,qe){for(var ft=-1,Et=ge==null?0:ge.length;++ft<Et;){var tn=ge[ft];Se(qe,tn,_e(tn),ge)}return qe}function gr(ge,Se){for(var _e=-1,qe=ge==null?0:ge.length;++_e<qe&&Se(ge[_e],_e,ge)!==!1;);return ge}function Br(ge,Se){for(var _e=ge==null?0:ge.length;_e--&&Se(ge[_e],_e,ge)!==!1;);return ge}function _o(ge,Se){for(var _e=-1,qe=ge==null?0:ge.length;++_e<qe;)if(!Se(ge[_e],_e,ge))return!1;return!0}function Er(ge,Se){for(var _e=-1,qe=ge==null?0:ge.length,ft=0,Et=[];++_e<qe;){var tn=ge[_e];Se(tn,_e,ge)&&(Et[ft++]=tn)}return Et}function fi(ge,Se){var _e=ge==null?0:ge.length;return!!_e&&ye(ge,Se,0)>-1}function b(ge,Se,_e){for(var qe=-1,ft=ge==null?0:ge.length;++qe<ft;)if(_e(Se,ge[qe]))return!0;return!1}function E(ge,Se){for(var _e=-1,qe=ge==null?0:ge.length,ft=Array(qe);++_e<qe;)ft[_e]=Se(ge[_e],_e,ge);return ft}function S(ge,Se){for(var _e=-1,qe=Se.length,ft=ge.length;++_e<qe;)ge[ft+_e]=Se[_e];return ge}function P(ge,Se,_e,qe){var ft=-1,Et=ge==null?0:ge.length;for(qe&&Et&&(_e=ge[++ft]);++ft<Et;)_e=Se(_e,ge[ft],ft,ge);return _e}function z(ge,Se,_e,qe){var ft=ge==null?0:ge.length;for(qe&&ft&&(_e=ge[--ft]);ft--;)_e=Se(_e,ge[ft],ft,ge);return _e}function H(ge,Se){for(var _e=-1,qe=ge==null?0:ge.length;++_e<qe;)if(Se(ge[_e],_e,ge))return!0;return!1}var q=Oe("length");function X(ge){return ge.split("")}function Q(ge){return ge.match(To)||[]}function re(ge,Se,_e){var qe;return _e(ge,function(ft,Et,tn){if(Se(ft,Et,tn))return qe=Et,!1}),qe}function ue(ge,Se,_e,qe){for(var ft=ge.length,Et=_e+(qe?1:-1);qe?Et--:++Et<ft;)if(Se(ge[Et],Et,ge))return Et;return-1}function ye(ge,Se,_e){return Se===Se?At(ge,Se,_e):ue(ge,ve,_e)}function Ce(ge,Se,_e,qe){for(var ft=_e-1,Et=ge.length;++ft<Et;)if(qe(ge[ft],Se))return ft;return-1}function ve(ge){return ge!==ge}function we(ge,Se){var _e=ge==null?0:ge.length;return _e?tt(ge,Se)/_e:J}function Oe(ge){return function(Se){return Se==null?e:Se[ge]}}function Ie(ge){return function(Se){return ge==null?e:ge[Se]}}function Ye(ge,Se,_e,qe,ft){return ft(ge,function(Et,tn,Wt){_e=qe?(qe=!1,Et):Se(_e,Et,tn,Wt)}),_e}function dt(ge,Se){var _e=ge.length;for(ge.sort(Se);_e--;)ge[_e]=ge[_e].value;return ge}function tt(ge,Se){for(var _e,qe=-1,ft=ge.length;++qe<ft;){var Et=Se(ge[qe]);Et!==e&&(_e=_e===e?Et:_e+Et)}return _e}function ot(ge,Se){for(var _e=-1,qe=Array(ge);++_e<ge;)qe[_e]=Se(_e);return qe}function Rn(ge,Se){return E(Se,function(_e){return[_e,ge[_e]]})}function St(ge){return ge&&ge.slice(0,gt(ge)+1).replace(_n,"")}function Jt(ge){return function(Se){return ge(Se)}}function It(ge,Se){return E(Se,function(_e){return ge[_e]})}function $t(ge,Se){return ge.has(Se)}function ir(ge,Se){for(var _e=-1,qe=ge.length;++_e<qe&&ye(Se,ge[_e],0)>-1;);return _e}function mr(ge,Se){for(var _e=ge.length;_e--&&ye(Se,ge[_e],0)>-1;);return _e}function On(ge,Se){for(var _e=ge.length,qe=0;_e--;)ge[_e]===Se&&++qe;return qe}var G=Ie(Gt),Z=Ie(Fi);function ie(ge){return"\\"+Ve[ge]}function le(ge,Se){return ge==null?e:ge[Se]}function pe(ge){return No.test(ge)}function xe(ge){return Pi.test(ge)}function Te(ge){for(var Se,_e=[];!(Se=ge.next()).done;)_e.push(Se.value);return _e}function Fe(ge){var Se=-1,_e=Array(ge.size);return ge.forEach(function(qe,ft){_e[++Se]=[ft,qe]}),_e}function je(ge,Se){return function(_e){return ge(Se(_e))}}function Ge(ge,Se){for(var _e=-1,qe=ge.length,ft=0,Et=[];++_e<qe;){var tn=ge[_e];(tn===Se||tn===l)&&(ge[_e]=l,Et[ft++]=_e)}return Et}function Je(ge){var Se=-1,_e=Array(ge.size);return ge.forEach(function(qe){_e[++Se]=qe}),_e}function it(ge){var Se=-1,_e=Array(ge.size);return ge.forEach(function(qe){_e[++Se]=[qe,qe]}),_e}function At(ge,Se,_e){for(var qe=_e-1,ft=ge.length;++qe<ft;)if(ge[qe]===Se)return qe;return-1}function Zt(ge,Se,_e){for(var qe=_e+1;qe--;)if(ge[qe]===Se)return qe;return qe}function Bt(ge){return pe(ge)?Cn(ge):q(ge)}function xt(ge){return pe(ge)?Nn(ge):X(ge)}function gt(ge){for(var Se=ge.length;Se--&&yr.test(ge.charAt(Se)););return Se}var ct=Ie(Un);function Cn(ge){for(var Se=Bn.lastIndex=0;Bn.test(ge);)++Se;return Se}function Nn(ge){return ge.match(Bn)||[]}function or(ge){return ge.match(Ma)||[]}var cn=(function ge(Se){Se=Se==null?zt:pn.defaults(zt.Object(),Se,pn.pick(zt,Co));var _e=Se.Array,qe=Se.Date,ft=Se.Error,Et=Se.Function,tn=Se.Math,Wt=Se.Object,pi=Se.RegExp,Rr=Se.String,An=Se.TypeError,Wi=_e.prototype,Tr=Et.prototype,Do=Wt.prototype,Xc=Se["__core-js_shared__"],Jc=Tr.toString,un=Do.hasOwnProperty,dO=0,Qw=(function(){var a=/[^.]+$/.exec(Xc&&Xc.keys&&Xc.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})(),Zc=Do.toString,fO=Jc.call(Wt),pO=zt._,gO=pi("^"+Jc.call(un).replace(Dr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qc=so?Se.Buffer:e,ns=Se.Symbol,eu=Se.Uint8Array,e1=Qc?Qc.allocUnsafe:e,tu=je(Wt.getPrototypeOf,Wt),t1=Wt.create,n1=Do.propertyIsEnumerable,nu=Wi.splice,r1=ns?ns.isConcatSpreadable:e,kl=ns?ns.iterator:e,Hs=ns?ns.toStringTag:e,ru=(function(){try{var a=Ys(Wt,"defineProperty");return a({},"",{}),a}catch{}})(),mO=Se.clearTimeout!==zt.clearTimeout&&Se.clearTimeout,vO=qe&&qe.now!==zt.Date.now&&qe.now,yO=Se.setTimeout!==zt.setTimeout&&Se.setTimeout,iu=tn.ceil,ou=tn.floor,Xf=Wt.getOwnPropertySymbols,bO=Qc?Qc.isBuffer:e,i1=Se.isFinite,wO=Wi.join,xO=je(Wt.keys,Wt),vr=tn.max,Wr=tn.min,CO=qe.now,_O=Se.parseInt,o1=tn.random,kO=Wi.reverse,Jf=Ys(Se,"DataView"),Al=Ys(Se,"Map"),Zf=Ys(Se,"Promise"),La=Ys(Se,"Set"),Sl=Ys(Se,"WeakMap"),$l=Ys(Wt,"create"),su=Sl&&new Sl,Oa={},AO=Ks(Jf),SO=Ks(Al),$O=Ks(Zf),EO=Ks(La),RO=Ks(Sl),au=ns?ns.prototype:e,El=au?au.valueOf:e,s1=au?au.toString:e;function te(a){if(Gn(a)&&!Mt(a)&&!(a instanceof qt)){if(a instanceof ji)return a;if(un.call(a,"__wrapped__"))return ax(a)}return new ji(a)}var Na=(function(){function a(){}return function(v){if(!Wn(v))return{};if(t1)return t1(v);a.prototype=v;var T=new a;return a.prototype=e,T}})();function lu(){}function ji(a,v){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}te.templateSettings={escape:$n,evaluate:ki,interpolate:Ro,variable:"",imports:{_:te}},te.prototype=lu.prototype,te.prototype.constructor=te,ji.prototype=Na(lu.prototype),ji.prototype.constructor=ji;function qt(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=oe,this.__views__=[]}function TO(){var a=new qt(this.__wrapped__);return a.__actions__=gi(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=gi(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=gi(this.__views__),a}function MO(){if(this.__filtered__){var a=new qt(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function IO(){var a=this.__wrapped__.value(),v=this.__dir__,T=Mt(a),U=v<0,Y=T?a.length:0,ne=UN(0,Y,this.__views__),de=ne.start,fe=ne.end,be=fe-de,Me=U?fe:de-1,Le=this.__iteratees__,Pe=Le.length,Ze=0,lt=Wr(be,this.__takeCount__);if(!T||!U&&Y==be&<==be)return T1(a,this.__actions__);var wt=[];e:for(;be--&&Ze<lt;){Me+=v;for(var Dt=-1,mt=a[Me];++Dt<Pe;){var Ut=Le[Dt],Kt=Ut.iteratee,Ti=Ut.type,ri=Kt(mt);if(Ti==M)mt=ri;else if(!ri){if(Ti==_)continue e;break e}}wt[Ze++]=mt}return wt}qt.prototype=Na(lu.prototype),qt.prototype.constructor=qt;function Us(a){var v=-1,T=a==null?0:a.length;for(this.clear();++v<T;){var U=a[v];this.set(U[0],U[1])}}function LO(){this.__data__=$l?$l(null):{},this.size=0}function OO(a){var v=this.has(a)&&delete this.__data__[a];return this.size-=v?1:0,v}function NO(a){var v=this.__data__;if($l){var T=v[a];return T===d?e:T}return un.call(v,a)?v[a]:e}function DO(a){var v=this.__data__;return $l?v[a]!==e:un.call(v,a)}function PO(a,v){var T=this.__data__;return this.size+=this.has(a)?0:1,T[a]=$l&&v===e?d:v,this}Us.prototype.clear=LO,Us.prototype.delete=OO,Us.prototype.get=NO,Us.prototype.has=DO,Us.prototype.set=PO;function Po(a){var v=-1,T=a==null?0:a.length;for(this.clear();++v<T;){var U=a[v];this.set(U[0],U[1])}}function FO(){this.__data__=[],this.size=0}function zO(a){var v=this.__data__,T=cu(v,a);if(T<0)return!1;var U=v.length-1;return T==U?v.pop():nu.call(v,T,1),--this.size,!0}function BO(a){var v=this.__data__,T=cu(v,a);return T<0?e:v[T][1]}function WO(a){return cu(this.__data__,a)>-1}function jO(a,v){var T=this.__data__,U=cu(T,a);return U<0?(++this.size,T.push([a,v])):T[U][1]=v,this}Po.prototype.clear=FO,Po.prototype.delete=zO,Po.prototype.get=BO,Po.prototype.has=WO,Po.prototype.set=jO;function Fo(a){var v=-1,T=a==null?0:a.length;for(this.clear();++v<T;){var U=a[v];this.set(U[0],U[1])}}function HO(){this.size=0,this.__data__={hash:new Us,map:new(Al||Po),string:new Us}}function UO(a){var v=xu(this,a).delete(a);return this.size-=v?1:0,v}function VO(a){return xu(this,a).get(a)}function GO(a){return xu(this,a).has(a)}function qO(a,v){var T=xu(this,a),U=T.size;return T.set(a,v),this.size+=T.size==U?0:1,this}Fo.prototype.clear=HO,Fo.prototype.delete=UO,Fo.prototype.get=VO,Fo.prototype.has=GO,Fo.prototype.set=qO;function Vs(a){var v=-1,T=a==null?0:a.length;for(this.__data__=new Fo;++v<T;)this.add(a[v])}function YO(a){return this.__data__.set(a,d),this}function KO(a){return this.__data__.has(a)}Vs.prototype.add=Vs.prototype.push=YO,Vs.prototype.has=KO;function ao(a){var v=this.__data__=new Po(a);this.size=v.size}function XO(){this.__data__=new Po,this.size=0}function JO(a){var v=this.__data__,T=v.delete(a);return this.size=v.size,T}function ZO(a){return this.__data__.get(a)}function QO(a){return this.__data__.has(a)}function eN(a,v){var T=this.__data__;if(T instanceof Po){var U=T.__data__;if(!Al||U.length<h-1)return U.push([a,v]),this.size=++T.size,this;T=this.__data__=new Fo(U)}return T.set(a,v),this.size=T.size,this}ao.prototype.clear=XO,ao.prototype.delete=JO,ao.prototype.get=ZO,ao.prototype.has=QO,ao.prototype.set=eN;function a1(a,v){var T=Mt(a),U=!T&&Xs(a),Y=!T&&!U&&as(a),ne=!T&&!U&&!Y&&za(a),de=T||U||Y||ne,fe=de?ot(a.length,Rr):[],be=fe.length;for(var Me in a)(v||un.call(a,Me))&&!(de&&(Me=="length"||Y&&(Me=="offset"||Me=="parent")||ne&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||Wo(Me,be)))&&fe.push(Me);return fe}function l1(a){var v=a.length;return v?a[cp(0,v-1)]:e}function tN(a,v){return Cu(gi(a),Gs(v,0,a.length))}function nN(a){return Cu(gi(a))}function Qf(a,v,T){(T!==e&&!co(a[v],T)||T===e&&!(v in a))&&ko(a,v,T)}function Rl(a,v,T){var U=a[v];(!(un.call(a,v)&&co(U,T))||T===e&&!(v in a))&&ko(a,v,T)}function cu(a,v){for(var T=a.length;T--;)if(co(a[T][0],v))return T;return-1}function rN(a,v,T,U){return rs(a,function(Y,ne,de){v(U,Y,T(Y),de)}),U}function c1(a,v){return a&&So(v,xr(v),a)}function iN(a,v){return a&&So(v,vi(v),a)}function ko(a,v,T){v=="__proto__"&&ru?ru(a,v,{configurable:!0,enumerable:!0,value:T,writable:!0}):a[v]=T}function ep(a,v){for(var T=-1,U=v.length,Y=_e(U),ne=a==null;++T<U;)Y[T]=ne?e:Np(a,v[T]);return Y}function Gs(a,v,T){return a===a&&(T!==e&&(a=a<=T?a:T),v!==e&&(a=a>=v?a:v)),a}function Hi(a,v,T,U,Y,ne){var de,fe=v&u,be=v&p,Me=v&o;if(T&&(de=Y?T(a,U,Y,ne):T(a)),de!==e)return de;if(!Wn(a))return a;var Le=Mt(a);if(Le){if(de=GN(a),!fe)return gi(a,de)}else{var Pe=jr(a),Ze=Pe==at||Pe==ut;if(as(a))return L1(a,fe);if(Pe==Rt||Pe==he||Ze&&!Y){if(de=be||Ze?{}:Z1(a),!fe)return be?NN(a,iN(de,a)):ON(a,c1(de,a))}else{if(!ht[Pe])return Y?a:{};de=qN(a,Pe,fe)}}ne||(ne=new ao);var lt=ne.get(a);if(lt)return lt;ne.set(a,de),$x(a)?a.forEach(function(mt){de.add(Hi(mt,v,T,mt,a,ne))}):Ax(a)&&a.forEach(function(mt,Ut){de.set(Ut,Hi(mt,v,T,Ut,a,ne))});var wt=Me?be?wp:bp:be?vi:xr,Dt=Le?e:wt(a);return gr(Dt||a,function(mt,Ut){Dt&&(Ut=mt,mt=a[Ut]),Rl(de,Ut,Hi(mt,v,T,Ut,a,ne))}),de}function oN(a){var v=xr(a);return function(T){return u1(T,a,v)}}function u1(a,v,T){var U=T.length;if(a==null)return!U;for(a=Wt(a);U--;){var Y=T[U],ne=v[Y],de=a[Y];if(de===e&&!(Y in a)||!ne(de))return!1}return!0}function h1(a,v,T){if(typeof a!="function")throw new An(g);return Dl(function(){a.apply(e,T)},v)}function Tl(a,v,T,U){var Y=-1,ne=fi,de=!0,fe=a.length,be=[],Me=v.length;if(!fe)return be;T&&(v=E(v,Jt(T))),U?(ne=b,de=!1):v.length>=h&&(ne=$t,de=!1,v=new Vs(v));e:for(;++Y<fe;){var Le=a[Y],Pe=T==null?Le:T(Le);if(Le=U||Le!==0?Le:0,de&&Pe===Pe){for(var Ze=Me;Ze--;)if(v[Ze]===Pe)continue e;be.push(Le)}else ne(v,Pe,U)||be.push(Le)}return be}var rs=F1(Ao),d1=F1(np,!0);function sN(a,v){var T=!0;return rs(a,function(U,Y,ne){return T=!!v(U,Y,ne),T}),T}function uu(a,v,T){for(var U=-1,Y=a.length;++U<Y;){var ne=a[U],de=v(ne);if(de!=null&&(fe===e?de===de&&!Ri(de):T(de,fe)))var fe=de,be=ne}return be}function aN(a,v,T,U){var Y=a.length;for(T=Nt(T),T<0&&(T=-T>Y?0:Y+T),U=U===e||U>Y?Y:Nt(U),U<0&&(U+=Y),U=T>U?0:Rx(U);T<U;)a[T++]=v;return a}function f1(a,v){var T=[];return rs(a,function(U,Y,ne){v(U,Y,ne)&&T.push(U)}),T}function Mr(a,v,T,U,Y){var ne=-1,de=a.length;for(T||(T=KN),Y||(Y=[]);++ne<de;){var fe=a[ne];v>0&&T(fe)?v>1?Mr(fe,v-1,T,U,Y):S(Y,fe):U||(Y[Y.length]=fe)}return Y}var tp=z1(),p1=z1(!0);function Ao(a,v){return a&&tp(a,v,xr)}function np(a,v){return a&&p1(a,v,xr)}function hu(a,v){return Er(v,function(T){return jo(a[T])})}function qs(a,v){v=os(v,a);for(var T=0,U=v.length;a!=null&&T<U;)a=a[lo(v[T++])];return T&&T==U?a:e}function g1(a,v,T){var U=v(a);return Mt(a)?U:S(U,T(a))}function ti(a){return a==null?a===e?Ke:_r:Hs&&Hs in Wt(a)?HN(a):n2(a)}function rp(a,v){return a>v}function lN(a,v){return a!=null&&un.call(a,v)}function cN(a,v){return a!=null&&v in Wt(a)}function uN(a,v,T){return a>=Wr(v,T)&&a<vr(v,T)}function ip(a,v,T){for(var U=T?b:fi,Y=a[0].length,ne=a.length,de=ne,fe=_e(ne),be=1/0,Me=[];de--;){var Le=a[de];de&&v&&(Le=E(Le,Jt(v))),be=Wr(Le.length,be),fe[de]=!T&&(v||Y>=120&&Le.length>=120)?new Vs(de&&Le):e}Le=a[0];var Pe=-1,Ze=fe[0];e:for(;++Pe<Y&&Me.length<be;){var lt=Le[Pe],wt=v?v(lt):lt;if(lt=T||lt!==0?lt:0,!(Ze?$t(Ze,wt):U(Me,wt,T))){for(de=ne;--de;){var Dt=fe[de];if(!(Dt?$t(Dt,wt):U(a[de],wt,T)))continue e}Ze&&Ze.push(wt),Me.push(lt)}}return Me}function hN(a,v,T,U){return Ao(a,function(Y,ne,de){v(U,T(Y),ne,de)}),U}function Ml(a,v,T){v=os(v,a),a=nx(a,v);var U=a==null?a:a[lo(Vi(v))];return U==null?e:ln(U,a,T)}function m1(a){return Gn(a)&&ti(a)==he}function dN(a){return Gn(a)&&ti(a)==Dn}function fN(a){return Gn(a)&&ti(a)==Re}function Il(a,v,T,U,Y){return a===v?!0:a==null||v==null||!Gn(a)&&!Gn(v)?a!==a&&v!==v:pN(a,v,T,U,Il,Y)}function pN(a,v,T,U,Y,ne){var de=Mt(a),fe=Mt(v),be=de?me:jr(a),Me=fe?me:jr(v);be=be==he?Rt:be,Me=Me==he?Rt:Me;var Le=be==Rt,Pe=Me==Rt,Ze=be==Me;if(Ze&&as(a)){if(!as(v))return!1;de=!0,Le=!1}if(Ze&&!Le)return ne||(ne=new ao),de||za(a)?K1(a,v,T,U,Y,ne):WN(a,v,be,T,U,Y,ne);if(!(T&s)){var lt=Le&&un.call(a,"__wrapped__"),wt=Pe&&un.call(v,"__wrapped__");if(lt||wt){var Dt=lt?a.value():a,mt=wt?v.value():v;return ne||(ne=new ao),Y(Dt,mt,T,U,ne)}}return Ze?(ne||(ne=new ao),jN(a,v,T,U,Y,ne)):!1}function gN(a){return Gn(a)&&jr(a)==st}function op(a,v,T,U){var Y=T.length,ne=Y,de=!U;if(a==null)return!ne;for(a=Wt(a);Y--;){var fe=T[Y];if(de&&fe[2]?fe[1]!==a[fe[0]]:!(fe[0]in a))return!1}for(;++Y<ne;){fe=T[Y];var be=fe[0],Me=a[be],Le=fe[1];if(de&&fe[2]){if(Me===e&&!(be in a))return!1}else{var Pe=new ao;if(U)var Ze=U(Me,Le,be,a,v,Pe);if(!(Ze===e?Il(Le,Me,s|m,U,Pe):Ze))return!1}}return!0}function v1(a){if(!Wn(a)||JN(a))return!1;var v=jo(a)?gO:In;return v.test(Ks(a))}function mN(a){return Gn(a)&&ti(a)==kr}function vN(a){return Gn(a)&&jr(a)==yn}function yN(a){return Gn(a)&&Eu(a.length)&&!!on[ti(a)]}function y1(a){return typeof a=="function"?a:a==null?yi:typeof a=="object"?Mt(a)?x1(a[0],a[1]):w1(a):Wx(a)}function sp(a){if(!Nl(a))return xO(a);var v=[];for(var T in Wt(a))un.call(a,T)&&T!="constructor"&&v.push(T);return v}function bN(a){if(!Wn(a))return t2(a);var v=Nl(a),T=[];for(var U in a)U=="constructor"&&(v||!un.call(a,U))||T.push(U);return T}function ap(a,v){return a<v}function b1(a,v){var T=-1,U=mi(a)?_e(a.length):[];return rs(a,function(Y,ne,de){U[++T]=v(Y,ne,de)}),U}function w1(a){var v=Cp(a);return v.length==1&&v[0][2]?ex(v[0][0],v[0][1]):function(T){return T===a||op(T,a,v)}}function x1(a,v){return kp(a)&&Q1(v)?ex(lo(a),v):function(T){var U=Np(T,a);return U===e&&U===v?Dp(T,a):Il(v,U,s|m)}}function du(a,v,T,U,Y){a!==v&&tp(v,function(ne,de){if(Y||(Y=new ao),Wn(ne))wN(a,v,de,T,du,U,Y);else{var fe=U?U(Sp(a,de),ne,de+"",a,v,Y):e;fe===e&&(fe=ne),Qf(a,de,fe)}},vi)}function wN(a,v,T,U,Y,ne,de){var fe=Sp(a,T),be=Sp(v,T),Me=de.get(be);if(Me){Qf(a,T,Me);return}var Le=ne?ne(fe,be,T+"",a,v,de):e,Pe=Le===e;if(Pe){var Ze=Mt(be),lt=!Ze&&as(be),wt=!Ze&&!lt&&za(be);Le=be,Ze||lt||wt?Mt(fe)?Le=fe:Zn(fe)?Le=gi(fe):lt?(Pe=!1,Le=L1(be,!0)):wt?(Pe=!1,Le=O1(be,!0)):Le=[]:Pl(be)||Xs(be)?(Le=fe,Xs(fe)?Le=Tx(fe):(!Wn(fe)||jo(fe))&&(Le=Z1(be))):Pe=!1}Pe&&(de.set(be,Le),Y(Le,be,U,ne,de),de.delete(be)),Qf(a,T,Le)}function C1(a,v){var T=a.length;if(T)return v+=v<0?T:0,Wo(v,T)?a[v]:e}function _1(a,v,T){v.length?v=E(v,function(ne){return Mt(ne)?function(de){return qs(de,ne.length===1?ne[0]:ne)}:ne}):v=[yi];var U=-1;v=E(v,Jt(bt()));var Y=b1(a,function(ne,de,fe){var be=E(v,function(Me){return Me(ne)});return{criteria:be,index:++U,value:ne}});return dt(Y,function(ne,de){return LN(ne,de,T)})}function xN(a,v){return k1(a,v,function(T,U){return Dp(a,U)})}function k1(a,v,T){for(var U=-1,Y=v.length,ne={};++U<Y;){var de=v[U],fe=qs(a,de);T(fe,de)&&Ll(ne,os(de,a),fe)}return ne}function CN(a){return function(v){return qs(v,a)}}function lp(a,v,T,U){var Y=U?Ce:ye,ne=-1,de=v.length,fe=a;for(a===v&&(v=gi(v)),T&&(fe=E(a,Jt(T)));++ne<de;)for(var be=0,Me=v[ne],Le=T?T(Me):Me;(be=Y(fe,Le,be,U))>-1;)fe!==a&&nu.call(fe,be,1),nu.call(a,be,1);return a}function A1(a,v){for(var T=a?v.length:0,U=T-1;T--;){var Y=v[T];if(T==U||Y!==ne){var ne=Y;Wo(Y)?nu.call(a,Y,1):dp(a,Y)}}return a}function cp(a,v){return a+ou(o1()*(v-a+1))}function _N(a,v,T,U){for(var Y=-1,ne=vr(iu((v-a)/(T||1)),0),de=_e(ne);ne--;)de[U?ne:++Y]=a,a+=T;return de}function up(a,v){var T="";if(!a||v<1||v>V)return T;do v%2&&(T+=a),v=ou(v/2),v&&(a+=a);while(v);return T}function jt(a,v){return $p(tx(a,v,yi),a+"")}function kN(a){return l1(Ba(a))}function AN(a,v){var T=Ba(a);return Cu(T,Gs(v,0,T.length))}function Ll(a,v,T,U){if(!Wn(a))return a;v=os(v,a);for(var Y=-1,ne=v.length,de=ne-1,fe=a;fe!=null&&++Y<ne;){var be=lo(v[Y]),Me=T;if(be==="__proto__"||be==="constructor"||be==="prototype")return a;if(Y!=de){var Le=fe[be];Me=U?U(Le,be,fe):e,Me===e&&(Me=Wn(Le)?Le:Wo(v[Y+1])?[]:{})}Rl(fe,be,Me),fe=fe[be]}return a}var S1=su?function(a,v){return su.set(a,v),a}:yi,SN=ru?function(a,v){return ru(a,"toString",{configurable:!0,enumerable:!1,value:Fp(v),writable:!0})}:yi;function $N(a){return Cu(Ba(a))}function Ui(a,v,T){var U=-1,Y=a.length;v<0&&(v=-v>Y?0:Y+v),T=T>Y?Y:T,T<0&&(T+=Y),Y=v>T?0:T-v>>>0,v>>>=0;for(var ne=_e(Y);++U<Y;)ne[U]=a[U+v];return ne}function EN(a,v){var T;return rs(a,function(U,Y,ne){return T=v(U,Y,ne),!T}),!!T}function fu(a,v,T){var U=0,Y=a==null?U:a.length;if(typeof v=="number"&&v===v&&Y<=se){for(;U<Y;){var ne=U+Y>>>1,de=a[ne];de!==null&&!Ri(de)&&(T?de<=v:de<v)?U=ne+1:Y=ne}return Y}return hp(a,v,yi,T)}function hp(a,v,T,U){var Y=0,ne=a==null?0:a.length;if(ne===0)return 0;v=T(v);for(var de=v!==v,fe=v===null,be=Ri(v),Me=v===e;Y<ne;){var Le=ou((Y+ne)/2),Pe=T(a[Le]),Ze=Pe!==e,lt=Pe===null,wt=Pe===Pe,Dt=Ri(Pe);if(de)var mt=U||wt;else Me?mt=wt&&(U||Ze):fe?mt=wt&&Ze&&(U||!lt):be?mt=wt&&Ze&&!lt&&(U||!Dt):lt||Dt?mt=!1:mt=U?Pe<=v:Pe<v;mt?Y=Le+1:ne=Le}return Wr(ne,ee)}function $1(a,v){for(var T=-1,U=a.length,Y=0,ne=[];++T<U;){var de=a[T],fe=v?v(de):de;if(!T||!co(fe,be)){var be=fe;ne[Y++]=de===0?0:de}}return ne}function E1(a){return typeof a=="number"?a:Ri(a)?J:+a}function Ei(a){if(typeof a=="string")return a;if(Mt(a))return E(a,Ei)+"";if(Ri(a))return s1?s1.call(a):"";var v=a+"";return v=="0"&&1/a==-j?"-0":v}function is(a,v,T){var U=-1,Y=fi,ne=a.length,de=!0,fe=[],be=fe;if(T)de=!1,Y=b;else if(ne>=h){var Me=v?null:zN(a);if(Me)return Je(Me);de=!1,Y=$t,be=new Vs}else be=v?[]:fe;e:for(;++U<ne;){var Le=a[U],Pe=v?v(Le):Le;if(Le=T||Le!==0?Le:0,de&&Pe===Pe){for(var Ze=be.length;Ze--;)if(be[Ze]===Pe)continue e;v&&be.push(Pe),fe.push(Le)}else Y(be,Pe,T)||(be!==fe&&be.push(Pe),fe.push(Le))}return fe}function dp(a,v){v=os(v,a);var T=-1,U=v.length;if(!U)return!0;for(;++T<U;){var Y=lo(v[T]);if(Y==="__proto__"&&!un.call(a,"__proto__")||(Y==="constructor"||Y==="prototype")&&T<U-1)return!1}var ne=nx(a,v);return ne==null||delete ne[lo(Vi(v))]}function R1(a,v,T,U){return Ll(a,v,T(qs(a,v)),U)}function pu(a,v,T,U){for(var Y=a.length,ne=U?Y:-1;(U?ne--:++ne<Y)&&v(a[ne],ne,a););return T?Ui(a,U?0:ne,U?ne+1:Y):Ui(a,U?ne+1:0,U?Y:ne)}function T1(a,v){var T=a;return T instanceof qt&&(T=T.value()),P(v,function(U,Y){return Y.func.apply(Y.thisArg,S([U],Y.args))},T)}function fp(a,v,T){var U=a.length;if(U<2)return U?is(a[0]):[];for(var Y=-1,ne=_e(U);++Y<U;)for(var de=a[Y],fe=-1;++fe<U;)fe!=Y&&(ne[Y]=Tl(ne[Y]||de,a[fe],v,T));return is(Mr(ne,1),v,T)}function M1(a,v,T){for(var U=-1,Y=a.length,ne=v.length,de={};++U<Y;){var fe=U<ne?v[U]:e;T(de,a[U],fe)}return de}function pp(a){return Zn(a)?a:[]}function gp(a){return typeof a=="function"?a:yi}function os(a,v){return Mt(a)?a:kp(a,v)?[a]:sx(hn(a))}var RN=jt;function ss(a,v,T){var U=a.length;return T=T===e?U:T,!v&&T>=U?a:Ui(a,v,T)}var I1=mO||function(a){return zt.clearTimeout(a)};function L1(a,v){if(v)return a.slice();var T=a.length,U=e1?e1(T):new a.constructor(T);return a.copy(U),U}function mp(a){var v=new a.constructor(a.byteLength);return new eu(v).set(new eu(a)),v}function TN(a,v){var T=v?mp(a.buffer):a.buffer;return new a.constructor(T,a.byteOffset,a.byteLength)}function MN(a){var v=new a.constructor(a.source,Ft.exec(a));return v.lastIndex=a.lastIndex,v}function IN(a){return El?Wt(El.call(a)):{}}function O1(a,v){var T=v?mp(a.buffer):a.buffer;return new a.constructor(T,a.byteOffset,a.length)}function N1(a,v){if(a!==v){var T=a!==e,U=a===null,Y=a===a,ne=Ri(a),de=v!==e,fe=v===null,be=v===v,Me=Ri(v);if(!fe&&!Me&&!ne&&a>v||ne&&de&&be&&!fe&&!Me||U&&de&&be||!T&&be||!Y)return 1;if(!U&&!ne&&!Me&&a<v||Me&&T&&Y&&!U&&!ne||fe&&T&&Y||!de&&Y||!be)return-1}return 0}function LN(a,v,T){for(var U=-1,Y=a.criteria,ne=v.criteria,de=Y.length,fe=T.length;++U<de;){var be=N1(Y[U],ne[U]);if(be){if(U>=fe)return be;var Me=T[U];return be*(Me=="desc"?-1:1)}}return a.index-v.index}function D1(a,v,T,U){for(var Y=-1,ne=a.length,de=T.length,fe=-1,be=v.length,Me=vr(ne-de,0),Le=_e(be+Me),Pe=!U;++fe<be;)Le[fe]=v[fe];for(;++Y<de;)(Pe||Y<ne)&&(Le[T[Y]]=a[Y]);for(;Me--;)Le[fe++]=a[Y++];return Le}function P1(a,v,T,U){for(var Y=-1,ne=a.length,de=-1,fe=T.length,be=-1,Me=v.length,Le=vr(ne-fe,0),Pe=_e(Le+Me),Ze=!U;++Y<Le;)Pe[Y]=a[Y];for(var lt=Y;++be<Me;)Pe[lt+be]=v[be];for(;++de<fe;)(Ze||Y<ne)&&(Pe[lt+T[de]]=a[Y++]);return Pe}function gi(a,v){var T=-1,U=a.length;for(v||(v=_e(U));++T<U;)v[T]=a[T];return v}function So(a,v,T,U){var Y=!T;T||(T={});for(var ne=-1,de=v.length;++ne<de;){var fe=v[ne],be=U?U(T[fe],a[fe],fe,T,a):e;be===e&&(be=a[fe]),Y?ko(T,fe,be):Rl(T,fe,be)}return T}function ON(a,v){return So(a,_p(a),v)}function NN(a,v){return So(a,X1(a),v)}function gu(a,v){return function(T,U){var Y=Mt(T)?Ia:rN,ne=v?v():{};return Y(T,a,bt(U,2),ne)}}function Da(a){return jt(function(v,T){var U=-1,Y=T.length,ne=Y>1?T[Y-1]:e,de=Y>2?T[2]:e;for(ne=a.length>3&&typeof ne=="function"?(Y--,ne):e,de&&ni(T[0],T[1],de)&&(ne=Y<3?e:ne,Y=1),v=Wt(v);++U<Y;){var fe=T[U];fe&&a(v,fe,U,ne)}return v})}function F1(a,v){return function(T,U){if(T==null)return T;if(!mi(T))return a(T,U);for(var Y=T.length,ne=v?Y:-1,de=Wt(T);(v?ne--:++ne<Y)&&U(de[ne],ne,de)!==!1;);return T}}function z1(a){return function(v,T,U){for(var Y=-1,ne=Wt(v),de=U(v),fe=de.length;fe--;){var be=de[a?fe:++Y];if(T(ne[be],be,ne)===!1)break}return v}}function DN(a,v,T){var U=v&w,Y=Ol(a);function ne(){var de=this&&this!==zt&&this instanceof ne?Y:a;return de.apply(U?T:this,arguments)}return ne}function B1(a){return function(v){v=hn(v);var T=pe(v)?xt(v):e,U=T?T[0]:v.charAt(0),Y=T?ss(T,1).join(""):v.slice(1);return U[a]()+Y}}function Pa(a){return function(v){return P(zx(Fx(v).replace(Oo,"")),a,"")}}function Ol(a){return function(){var v=arguments;switch(v.length){case 0:return new a;case 1:return new a(v[0]);case 2:return new a(v[0],v[1]);case 3:return new a(v[0],v[1],v[2]);case 4:return new a(v[0],v[1],v[2],v[3]);case 5:return new a(v[0],v[1],v[2],v[3],v[4]);case 6:return new a(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new a(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var T=Na(a.prototype),U=a.apply(T,v);return Wn(U)?U:T}}function PN(a,v,T){var U=Ol(a);function Y(){for(var ne=arguments.length,de=_e(ne),fe=ne,be=Fa(Y);fe--;)de[fe]=arguments[fe];var Me=ne<3&&de[0]!==be&&de[ne-1]!==be?[]:Ge(de,be);if(ne-=Me.length,ne<T)return V1(a,v,mu,Y.placeholder,e,de,Me,e,e,T-ne);var Le=this&&this!==zt&&this instanceof Y?U:a;return ln(Le,this,de)}return Y}function W1(a){return function(v,T,U){var Y=Wt(v);if(!mi(v)){var ne=bt(T,3);v=xr(v),T=function(fe){return ne(Y[fe],fe,Y)}}var de=a(v,T,U);return de>-1?Y[ne?v[de]:de]:e}}function j1(a){return Bo(function(v){var T=v.length,U=T,Y=ji.prototype.thru;for(a&&v.reverse();U--;){var ne=v[U];if(typeof ne!="function")throw new An(g);if(Y&&!de&&wu(ne)=="wrapper")var de=new ji([],!0)}for(U=de?U:T;++U<T;){ne=v[U];var fe=wu(ne),be=fe=="wrapper"?xp(ne):e;be&&Ap(be[0])&&be[1]==(N|$|C|L)&&!be[4].length&&be[9]==1?de=de[wu(be[0])].apply(de,be[3]):de=ne.length==1&&Ap(ne)?de[fe]():de.thru(ne)}return function(){var Me=arguments,Le=Me[0];if(de&&Me.length==1&&Mt(Le))return de.plant(Le).value();for(var Pe=0,Ze=T?v[Pe].apply(this,Me):Le;++Pe<T;)Ze=v[Pe].call(this,Ze);return Ze}})}function mu(a,v,T,U,Y,ne,de,fe,be,Me){var Le=v&N,Pe=v&w,Ze=v&x,lt=v&($|k),wt=v&I,Dt=Ze?e:Ol(a);function mt(){for(var Ut=arguments.length,Kt=_e(Ut),Ti=Ut;Ti--;)Kt[Ti]=arguments[Ti];if(lt)var ri=Fa(mt),Mi=On(Kt,ri);if(U&&(Kt=D1(Kt,U,Y,lt)),ne&&(Kt=P1(Kt,ne,de,lt)),Ut-=Mi,lt&&Ut<Me){var Qn=Ge(Kt,ri);return V1(a,v,mu,mt.placeholder,T,Kt,Qn,fe,be,Me-Ut)}var uo=Pe?T:this,Uo=Ze?uo[a]:a;return Ut=Kt.length,fe?Kt=r2(Kt,fe):wt&&Ut>1&&Kt.reverse(),Le&&be<Ut&&(Kt.length=be),this&&this!==zt&&this instanceof mt&&(Uo=Dt||Ol(Uo)),Uo.apply(uo,Kt)}return mt}function H1(a,v){return function(T,U){return hN(T,a,v(U),{})}}function vu(a,v){return function(T,U){var Y;if(T===e&&U===e)return v;if(T!==e&&(Y=T),U!==e){if(Y===e)return U;typeof T=="string"||typeof U=="string"?(T=Ei(T),U=Ei(U)):(T=E1(T),U=E1(U)),Y=a(T,U)}return Y}}function vp(a){return Bo(function(v){return v=E(v,Jt(bt())),jt(function(T){var U=this;return a(v,function(Y){return ln(Y,U,T)})})})}function yu(a,v){v=v===e?" ":Ei(v);var T=v.length;if(T<2)return T?up(v,a):v;var U=up(v,iu(a/Bt(v)));return pe(v)?ss(xt(U),0,a).join(""):U.slice(0,a)}function FN(a,v,T,U){var Y=v&w,ne=Ol(a);function de(){for(var fe=-1,be=arguments.length,Me=-1,Le=U.length,Pe=_e(Le+be),Ze=this&&this!==zt&&this instanceof de?ne:a;++Me<Le;)Pe[Me]=U[Me];for(;be--;)Pe[Me++]=arguments[++fe];return ln(Ze,Y?T:this,Pe)}return de}function U1(a){return function(v,T,U){return U&&typeof U!="number"&&ni(v,T,U)&&(T=U=e),v=Ho(v),T===e?(T=v,v=0):T=Ho(T),U=U===e?v<T?1:-1:Ho(U),_N(v,T,U,a)}}function bu(a){return function(v,T){return typeof v=="string"&&typeof T=="string"||(v=Gi(v),T=Gi(T)),a(v,T)}}function V1(a,v,T,U,Y,ne,de,fe,be,Me){var Le=v&$,Pe=Le?de:e,Ze=Le?e:de,lt=Le?ne:e,wt=Le?e:ne;v|=Le?C:O,v&=~(Le?O:C),v&R||(v&=-4);var Dt=[a,v,Y,lt,Pe,wt,Ze,fe,be,Me],mt=T.apply(e,Dt);return Ap(a)&&rx(mt,Dt),mt.placeholder=U,ix(mt,a,v)}function yp(a){var v=tn[a];return function(T,U){if(T=Gi(T),U=U==null?0:Wr(Nt(U),292),U&&i1(T)){var Y=(hn(T)+"e").split("e"),ne=v(Y[0]+"e"+(+Y[1]+U));return Y=(hn(ne)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-U))}return v(T)}}var zN=La&&1/Je(new La([,-0]))[1]==j?function(a){return new La(a)}:Wp;function G1(a){return function(v){var T=jr(v);return T==st?Fe(v):T==yn?it(v):Rn(v,a(v))}}function zo(a,v,T,U,Y,ne,de,fe){var be=v&x;if(!be&&typeof a!="function")throw new An(g);var Me=U?U.length:0;if(Me||(v&=-97,U=Y=e),de=de===e?de:vr(Nt(de),0),fe=fe===e?fe:Nt(fe),Me-=Y?Y.length:0,v&O){var Le=U,Pe=Y;U=Y=e}var Ze=be?e:xp(a),lt=[a,v,T,U,Y,Le,Pe,ne,de,fe];if(Ze&&e2(lt,Ze),a=lt[0],v=lt[1],T=lt[2],U=lt[3],Y=lt[4],fe=lt[9]=lt[9]===e?be?0:a.length:vr(lt[9]-Me,0),!fe&&v&($|k)&&(v&=-25),!v||v==w)var wt=DN(a,v,T);else v==$||v==k?wt=PN(a,v,fe):(v==C||v==(w|C))&&!Y.length?wt=FN(a,v,T,U):wt=mu.apply(e,lt);var Dt=Ze?S1:rx;return ix(Dt(wt,lt),a,v)}function q1(a,v,T,U){return a===e||co(a,Do[T])&&!un.call(U,T)?v:a}function Y1(a,v,T,U,Y,ne){return Wn(a)&&Wn(v)&&(ne.set(v,a),du(a,v,e,Y1,ne),ne.delete(v)),a}function BN(a){return Pl(a)?e:a}function K1(a,v,T,U,Y,ne){var de=T&s,fe=a.length,be=v.length;if(fe!=be&&!(de&&be>fe))return!1;var Me=ne.get(a),Le=ne.get(v);if(Me&&Le)return Me==v&&Le==a;var Pe=-1,Ze=!0,lt=T&m?new Vs:e;for(ne.set(a,v),ne.set(v,a);++Pe<fe;){var wt=a[Pe],Dt=v[Pe];if(U)var mt=de?U(Dt,wt,Pe,v,a,ne):U(wt,Dt,Pe,a,v,ne);if(mt!==e){if(mt)continue;Ze=!1;break}if(lt){if(!H(v,function(Ut,Kt){if(!$t(lt,Kt)&&(wt===Ut||Y(wt,Ut,T,U,ne)))return lt.push(Kt)})){Ze=!1;break}}else if(!(wt===Dt||Y(wt,Dt,T,U,ne))){Ze=!1;break}}return ne.delete(a),ne.delete(v),Ze}function WN(a,v,T,U,Y,ne,de){switch(T){case Xn:if(a.byteLength!=v.byteLength||a.byteOffset!=v.byteOffset)return!1;a=a.buffer,v=v.buffer;case Dn:return!(a.byteLength!=v.byteLength||!ne(new eu(a),new eu(v)));case Ee:case Re:case Ht:return co(+a,+v);case Xe:return a.name==v.name&&a.message==v.message;case kr:case ur:return a==v+"";case st:var fe=Fe;case yn:var be=U&s;if(fe||(fe=Je),a.size!=v.size&&!be)return!1;var Me=de.get(a);if(Me)return Me==v;U|=m,de.set(a,v);var Le=K1(fe(a),fe(v),U,Y,ne,de);return de.delete(a),Le;case pt:if(El)return El.call(a)==El.call(v)}return!1}function jN(a,v,T,U,Y,ne){var de=T&s,fe=bp(a),be=fe.length,Me=bp(v),Le=Me.length;if(be!=Le&&!de)return!1;for(var Pe=be;Pe--;){var Ze=fe[Pe];if(!(de?Ze in v:un.call(v,Ze)))return!1}var lt=ne.get(a),wt=ne.get(v);if(lt&&wt)return lt==v&&wt==a;var Dt=!0;ne.set(a,v),ne.set(v,a);for(var mt=de;++Pe<be;){Ze=fe[Pe];var Ut=a[Ze],Kt=v[Ze];if(U)var Ti=de?U(Kt,Ut,Ze,v,a,ne):U(Ut,Kt,Ze,a,v,ne);if(!(Ti===e?Ut===Kt||Y(Ut,Kt,T,U,ne):Ti)){Dt=!1;break}mt||(mt=Ze=="constructor")}if(Dt&&!mt){var ri=a.constructor,Mi=v.constructor;ri!=Mi&&"constructor"in a&&"constructor"in v&&!(typeof ri=="function"&&ri instanceof ri&&typeof Mi=="function"&&Mi instanceof Mi)&&(Dt=!1)}return ne.delete(a),ne.delete(v),Dt}function Bo(a){return $p(tx(a,e,ux),a+"")}function bp(a){return g1(a,xr,_p)}function wp(a){return g1(a,vi,X1)}var xp=su?function(a){return su.get(a)}:Wp;function wu(a){for(var v=a.name+"",T=Oa[v],U=un.call(Oa,v)?T.length:0;U--;){var Y=T[U],ne=Y.func;if(ne==null||ne==a)return Y.name}return v}function Fa(a){var v=un.call(te,"placeholder")?te:a;return v.placeholder}function bt(){var a=te.iteratee||zp;return a=a===zp?y1:a,arguments.length?a(arguments[0],arguments[1]):a}function xu(a,v){var T=a.__data__;return XN(v)?T[typeof v=="string"?"string":"hash"]:T.map}function Cp(a){for(var v=xr(a),T=v.length;T--;){var U=v[T],Y=a[U];v[T]=[U,Y,Q1(Y)]}return v}function Ys(a,v){var T=le(a,v);return v1(T)?T:e}function HN(a){var v=un.call(a,Hs),T=a[Hs];try{a[Hs]=e;var U=!0}catch{}var Y=Zc.call(a);return U&&(v?a[Hs]=T:delete a[Hs]),Y}var _p=Xf?function(a){return a==null?[]:(a=Wt(a),Er(Xf(a),function(v){return n1.call(a,v)}))}:jp,X1=Xf?function(a){for(var v=[];a;)S(v,_p(a)),a=tu(a);return v}:jp,jr=ti;(Jf&&jr(new Jf(new ArrayBuffer(1)))!=Xn||Al&&jr(new Al)!=st||Zf&&jr(Zf.resolve())!=cr||La&&jr(new La)!=yn||Sl&&jr(new Sl)!=Tt)&&(jr=function(a){var v=ti(a),T=v==Rt?a.constructor:e,U=T?Ks(T):"";if(U)switch(U){case AO:return Xn;case SO:return st;case $O:return cr;case EO:return yn;case RO:return Tt}return v});function UN(a,v,T){for(var U=-1,Y=T.length;++U<Y;){var ne=T[U],de=ne.size;switch(ne.type){case"drop":a+=de;break;case"dropRight":v-=de;break;case"take":v=Wr(v,a+de);break;case"takeRight":a=vr(a,v-de);break}}return{start:a,end:v}}function VN(a){var v=a.match(go);return v?v[1].split(mo):[]}function J1(a,v,T){v=os(v,a);for(var U=-1,Y=v.length,ne=!1;++U<Y;){var de=lo(v[U]);if(!(ne=a!=null&&T(a,de)))break;a=a[de]}return ne||++U!=Y?ne:(Y=a==null?0:a.length,!!Y&&Eu(Y)&&Wo(de,Y)&&(Mt(a)||Xs(a)))}function GN(a){var v=a.length,T=new a.constructor(v);return v&&typeof a[0]=="string"&&un.call(a,"index")&&(T.index=a.index,T.input=a.input),T}function Z1(a){return typeof a.constructor=="function"&&!Nl(a)?Na(tu(a)):{}}function qN(a,v,T){var U=a.constructor;switch(v){case Dn:return mp(a);case Ee:case Re:return new U(+a);case Xn:return TN(a,T);case hr:case bn:case Hn:case Pn:case Xt:case an:case Nr:case Xr:case Ar:return O1(a,T);case st:return new U;case Ht:case ur:return new U(a);case kr:return MN(a);case yn:return new U;case pt:return IN(a)}}function YN(a,v){var T=v.length;if(!T)return a;var U=T-1;return v[U]=(T>1?"& ":"")+v[U],v=v.join(T>2?", ":" "),a.replace(hi,`{
|
|
1460
|
-
/* [wrapped with `+v+`] */
|
|
1461
|
-
`)}function KN(a){return Mt(a)||Xs(a)||!!(r1&&a&&a[r1])}function Wo(a,v){var T=typeof a;return v=v??V,!!v&&(T=="number"||T!="symbol"&&Ne.test(a))&&a>-1&&a%1==0&&a<v}function ni(a,v,T){if(!Wn(T))return!1;var U=typeof v;return(U=="number"?mi(T)&&Wo(v,T.length):U=="string"&&v in T)?co(T[v],a):!1}function kp(a,v){if(Mt(a))return!1;var T=typeof a;return T=="number"||T=="symbol"||T=="boolean"||a==null||Ri(a)?!0:En.test(a)||!ui.test(a)||v!=null&&a in Wt(v)}function XN(a){var v=typeof a;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?a!=="__proto__":a===null}function Ap(a){var v=wu(a),T=te[v];if(typeof T!="function"||!(v in qt.prototype))return!1;if(a===T)return!0;var U=xp(T);return!!U&&a===U[0]}function JN(a){return!!Qw&&Qw in a}var ZN=Xc?jo:Hp;function Nl(a){var v=a&&a.constructor,T=typeof v=="function"&&v.prototype||Do;return a===T}function Q1(a){return a===a&&!Wn(a)}function ex(a,v){return function(T){return T==null?!1:T[a]===v&&(v!==e||a in Wt(T))}}function QN(a){var v=Su(a,function(U){return T.size===i&&T.clear(),U}),T=v.cache;return v}function e2(a,v){var T=a[1],U=v[1],Y=T|U,ne=Y<(w|x|N),de=U==N&&T==$||U==N&&T==L&&a[7].length<=v[8]||U==(N|L)&&v[7].length<=v[8]&&T==$;if(!(ne||de))return a;U&w&&(a[2]=v[2],Y|=T&w?0:R);var fe=v[3];if(fe){var be=a[3];a[3]=be?D1(be,fe,v[4]):fe,a[4]=be?Ge(a[3],l):v[4]}return fe=v[5],fe&&(be=a[5],a[5]=be?P1(be,fe,v[6]):fe,a[6]=be?Ge(a[5],l):v[6]),fe=v[7],fe&&(a[7]=fe),U&N&&(a[8]=a[8]==null?v[8]:Wr(a[8],v[8])),a[9]==null&&(a[9]=v[9]),a[0]=v[0],a[1]=Y,a}function t2(a){var v=[];if(a!=null)for(var T in Wt(a))v.push(T);return v}function n2(a){return Zc.call(a)}function tx(a,v,T){return v=vr(v===e?a.length-1:v,0),function(){for(var U=arguments,Y=-1,ne=vr(U.length-v,0),de=_e(ne);++Y<ne;)de[Y]=U[v+Y];Y=-1;for(var fe=_e(v+1);++Y<v;)fe[Y]=U[Y];return fe[v]=T(de),ln(a,this,fe)}}function nx(a,v){return v.length<2?a:qs(a,Ui(v,0,-1))}function r2(a,v){for(var T=a.length,U=Wr(v.length,T),Y=gi(a);U--;){var ne=v[U];a[U]=Wo(ne,T)?Y[ne]:e}return a}function Sp(a,v){if(!(v==="constructor"&&typeof a[v]=="function")&&v!="__proto__")return a[v]}var rx=ox(S1),Dl=yO||function(a,v){return zt.setTimeout(a,v)},$p=ox(SN);function ix(a,v,T){var U=v+"";return $p(a,YN(U,i2(VN(U),T)))}function ox(a){var v=0,T=0;return function(){var U=CO(),Y=A-(U-T);if(T=U,Y>0){if(++v>=D)return arguments[0]}else v=0;return a.apply(e,arguments)}}function Cu(a,v){var T=-1,U=a.length,Y=U-1;for(v=v===e?U:v;++T<v;){var ne=cp(T,Y),de=a[ne];a[ne]=a[T],a[T]=de}return a.length=v,a}var sx=QN(function(a){var v=[];return a.charCodeAt(0)===46&&v.push(""),a.replace(Sr,function(T,U,Y,ne){v.push(Y?ne.replace(di,"$1"):U||T)}),v});function lo(a){if(typeof a=="string"||Ri(a))return a;var v=a+"";return v=="0"&&1/a==-j?"-0":v}function Ks(a){if(a!=null){try{return Jc.call(a)}catch{}try{return a+""}catch{}}return""}function i2(a,v){return gr(ce,function(T){var U="_."+T[0];v&T[1]&&!fi(a,U)&&a.push(U)}),a.sort()}function ax(a){if(a instanceof qt)return a.clone();var v=new ji(a.__wrapped__,a.__chain__);return v.__actions__=gi(a.__actions__),v.__index__=a.__index__,v.__values__=a.__values__,v}function o2(a,v,T){(T?ni(a,v,T):v===e)?v=1:v=vr(Nt(v),0);var U=a==null?0:a.length;if(!U||v<1)return[];for(var Y=0,ne=0,de=_e(iu(U/v));Y<U;)de[ne++]=Ui(a,Y,Y+=v);return de}function s2(a){for(var v=-1,T=a==null?0:a.length,U=0,Y=[];++v<T;){var ne=a[v];ne&&(Y[U++]=ne)}return Y}function a2(){var a=arguments.length;if(!a)return[];for(var v=_e(a-1),T=arguments[0],U=a;U--;)v[U-1]=arguments[U];return S(Mt(T)?gi(T):[T],Mr(v,1))}var l2=jt(function(a,v){return Zn(a)?Tl(a,Mr(v,1,Zn,!0)):[]}),c2=jt(function(a,v){var T=Vi(v);return Zn(T)&&(T=e),Zn(a)?Tl(a,Mr(v,1,Zn,!0),bt(T,2)):[]}),u2=jt(function(a,v){var T=Vi(v);return Zn(T)&&(T=e),Zn(a)?Tl(a,Mr(v,1,Zn,!0),e,T):[]});function h2(a,v,T){var U=a==null?0:a.length;return U?(v=T||v===e?1:Nt(v),Ui(a,v<0?0:v,U)):[]}function d2(a,v,T){var U=a==null?0:a.length;return U?(v=T||v===e?1:Nt(v),v=U-v,Ui(a,0,v<0?0:v)):[]}function f2(a,v){return a&&a.length?pu(a,bt(v,3),!0,!0):[]}function p2(a,v){return a&&a.length?pu(a,bt(v,3),!0):[]}function g2(a,v,T,U){var Y=a==null?0:a.length;return Y?(T&&typeof T!="number"&&ni(a,v,T)&&(T=0,U=Y),aN(a,v,T,U)):[]}function lx(a,v,T){var U=a==null?0:a.length;if(!U)return-1;var Y=T==null?0:Nt(T);return Y<0&&(Y=vr(U+Y,0)),ue(a,bt(v,3),Y)}function cx(a,v,T){var U=a==null?0:a.length;if(!U)return-1;var Y=U-1;return T!==e&&(Y=Nt(T),Y=T<0?vr(U+Y,0):Wr(Y,U-1)),ue(a,bt(v,3),Y,!0)}function ux(a){var v=a==null?0:a.length;return v?Mr(a,1):[]}function m2(a){var v=a==null?0:a.length;return v?Mr(a,j):[]}function v2(a,v){var T=a==null?0:a.length;return T?(v=v===e?1:Nt(v),Mr(a,v)):[]}function y2(a){for(var v=-1,T=a==null?0:a.length,U={};++v<T;){var Y=a[v];ko(U,Y[0],Y[1])}return U}function hx(a){return a&&a.length?a[0]:e}function b2(a,v,T){var U=a==null?0:a.length;if(!U)return-1;var Y=T==null?0:Nt(T);return Y<0&&(Y=vr(U+Y,0)),ye(a,v,Y)}function w2(a){var v=a==null?0:a.length;return v?Ui(a,0,-1):[]}var x2=jt(function(a){var v=E(a,pp);return v.length&&v[0]===a[0]?ip(v):[]}),C2=jt(function(a){var v=Vi(a),T=E(a,pp);return v===Vi(T)?v=e:T.pop(),T.length&&T[0]===a[0]?ip(T,bt(v,2)):[]}),_2=jt(function(a){var v=Vi(a),T=E(a,pp);return v=typeof v=="function"?v:e,v&&T.pop(),T.length&&T[0]===a[0]?ip(T,e,v):[]});function k2(a,v){return a==null?"":wO.call(a,v)}function Vi(a){var v=a==null?0:a.length;return v?a[v-1]:e}function A2(a,v,T){var U=a==null?0:a.length;if(!U)return-1;var Y=U;return T!==e&&(Y=Nt(T),Y=Y<0?vr(U+Y,0):Wr(Y,U-1)),v===v?Zt(a,v,Y):ue(a,ve,Y,!0)}function S2(a,v){return a&&a.length?C1(a,Nt(v)):e}var $2=jt(dx);function dx(a,v){return a&&a.length&&v&&v.length?lp(a,v):a}function E2(a,v,T){return a&&a.length&&v&&v.length?lp(a,v,bt(T,2)):a}function R2(a,v,T){return a&&a.length&&v&&v.length?lp(a,v,e,T):a}var T2=Bo(function(a,v){var T=a==null?0:a.length,U=ep(a,v);return A1(a,E(v,function(Y){return Wo(Y,T)?+Y:Y}).sort(N1)),U});function M2(a,v){var T=[];if(!(a&&a.length))return T;var U=-1,Y=[],ne=a.length;for(v=bt(v,3);++U<ne;){var de=a[U];v(de,U,a)&&(T.push(de),Y.push(U))}return A1(a,Y),T}function Ep(a){return a==null?a:kO.call(a)}function I2(a,v,T){var U=a==null?0:a.length;return U?(T&&typeof T!="number"&&ni(a,v,T)?(v=0,T=U):(v=v==null?0:Nt(v),T=T===e?U:Nt(T)),Ui(a,v,T)):[]}function L2(a,v){return fu(a,v)}function O2(a,v,T){return hp(a,v,bt(T,2))}function N2(a,v){var T=a==null?0:a.length;if(T){var U=fu(a,v);if(U<T&&co(a[U],v))return U}return-1}function D2(a,v){return fu(a,v,!0)}function P2(a,v,T){return hp(a,v,bt(T,2),!0)}function F2(a,v){var T=a==null?0:a.length;if(T){var U=fu(a,v,!0)-1;if(co(a[U],v))return U}return-1}function z2(a){return a&&a.length?$1(a):[]}function B2(a,v){return a&&a.length?$1(a,bt(v,2)):[]}function W2(a){var v=a==null?0:a.length;return v?Ui(a,1,v):[]}function j2(a,v,T){return a&&a.length?(v=T||v===e?1:Nt(v),Ui(a,0,v<0?0:v)):[]}function H2(a,v,T){var U=a==null?0:a.length;return U?(v=T||v===e?1:Nt(v),v=U-v,Ui(a,v<0?0:v,U)):[]}function U2(a,v){return a&&a.length?pu(a,bt(v,3),!1,!0):[]}function V2(a,v){return a&&a.length?pu(a,bt(v,3)):[]}var G2=jt(function(a){return is(Mr(a,1,Zn,!0))}),q2=jt(function(a){var v=Vi(a);return Zn(v)&&(v=e),is(Mr(a,1,Zn,!0),bt(v,2))}),Y2=jt(function(a){var v=Vi(a);return v=typeof v=="function"?v:e,is(Mr(a,1,Zn,!0),e,v)});function K2(a){return a&&a.length?is(a):[]}function X2(a,v){return a&&a.length?is(a,bt(v,2)):[]}function J2(a,v){return v=typeof v=="function"?v:e,a&&a.length?is(a,e,v):[]}function Rp(a){if(!(a&&a.length))return[];var v=0;return a=Er(a,function(T){if(Zn(T))return v=vr(T.length,v),!0}),ot(v,function(T){return E(a,Oe(T))})}function fx(a,v){if(!(a&&a.length))return[];var T=Rp(a);return v==null?T:E(T,function(U){return ln(v,e,U)})}var Z2=jt(function(a,v){return Zn(a)?Tl(a,v):[]}),Q2=jt(function(a){return fp(Er(a,Zn))}),eD=jt(function(a){var v=Vi(a);return Zn(v)&&(v=e),fp(Er(a,Zn),bt(v,2))}),tD=jt(function(a){var v=Vi(a);return v=typeof v=="function"?v:e,fp(Er(a,Zn),e,v)}),nD=jt(Rp);function rD(a,v){return M1(a||[],v||[],Rl)}function iD(a,v){return M1(a||[],v||[],Ll)}var oD=jt(function(a){var v=a.length,T=v>1?a[v-1]:e;return T=typeof T=="function"?(a.pop(),T):e,fx(a,T)});function px(a){var v=te(a);return v.__chain__=!0,v}function sD(a,v){return v(a),a}function _u(a,v){return v(a)}var aD=Bo(function(a){var v=a.length,T=v?a[0]:0,U=this.__wrapped__,Y=function(ne){return ep(ne,a)};return v>1||this.__actions__.length||!(U instanceof qt)||!Wo(T)?this.thru(Y):(U=U.slice(T,+T+(v?1:0)),U.__actions__.push({func:_u,args:[Y],thisArg:e}),new ji(U,this.__chain__).thru(function(ne){return v&&!ne.length&&ne.push(e),ne}))});function lD(){return px(this)}function cD(){return new ji(this.value(),this.__chain__)}function uD(){this.__values__===e&&(this.__values__=Ex(this.value()));var a=this.__index__>=this.__values__.length,v=a?e:this.__values__[this.__index__++];return{done:a,value:v}}function hD(){return this}function dD(a){for(var v,T=this;T instanceof lu;){var U=ax(T);U.__index__=0,U.__values__=e,v?Y.__wrapped__=U:v=U;var Y=U;T=T.__wrapped__}return Y.__wrapped__=a,v}function fD(){var a=this.__wrapped__;if(a instanceof qt){var v=a;return this.__actions__.length&&(v=new qt(this)),v=v.reverse(),v.__actions__.push({func:_u,args:[Ep],thisArg:e}),new ji(v,this.__chain__)}return this.thru(Ep)}function pD(){return T1(this.__wrapped__,this.__actions__)}var gD=gu(function(a,v,T){un.call(a,T)?++a[T]:ko(a,T,1)});function mD(a,v,T){var U=Mt(a)?_o:sN;return T&&ni(a,v,T)&&(v=e),U(a,bt(v,3))}function vD(a,v){var T=Mt(a)?Er:f1;return T(a,bt(v,3))}var yD=W1(lx),bD=W1(cx);function wD(a,v){return Mr(ku(a,v),1)}function xD(a,v){return Mr(ku(a,v),j)}function CD(a,v,T){return T=T===e?1:Nt(T),Mr(ku(a,v),T)}function gx(a,v){var T=Mt(a)?gr:rs;return T(a,bt(v,3))}function mx(a,v){var T=Mt(a)?Br:d1;return T(a,bt(v,3))}var _D=gu(function(a,v,T){un.call(a,T)?a[T].push(v):ko(a,T,[v])});function kD(a,v,T,U){a=mi(a)?a:Ba(a),T=T&&!U?Nt(T):0;var Y=a.length;return T<0&&(T=vr(Y+T,0)),Ru(a)?T<=Y&&a.indexOf(v,T)>-1:!!Y&&ye(a,v,T)>-1}var AD=jt(function(a,v,T){var U=-1,Y=typeof v=="function",ne=mi(a)?_e(a.length):[];return rs(a,function(de){ne[++U]=Y?ln(v,de,T):Ml(de,v,T)}),ne}),SD=gu(function(a,v,T){ko(a,T,v)});function ku(a,v){var T=Mt(a)?E:b1;return T(a,bt(v,3))}function $D(a,v,T,U){return a==null?[]:(Mt(v)||(v=v==null?[]:[v]),T=U?e:T,Mt(T)||(T=T==null?[]:[T]),_1(a,v,T))}var ED=gu(function(a,v,T){a[T?0:1].push(v)},function(){return[[],[]]});function RD(a,v,T){var U=Mt(a)?P:Ye,Y=arguments.length<3;return U(a,bt(v,4),T,Y,rs)}function TD(a,v,T){var U=Mt(a)?z:Ye,Y=arguments.length<3;return U(a,bt(v,4),T,Y,d1)}function MD(a,v){var T=Mt(a)?Er:f1;return T(a,$u(bt(v,3)))}function ID(a){var v=Mt(a)?l1:kN;return v(a)}function LD(a,v,T){(T?ni(a,v,T):v===e)?v=1:v=Nt(v);var U=Mt(a)?tN:AN;return U(a,v)}function OD(a){var v=Mt(a)?nN:$N;return v(a)}function ND(a){if(a==null)return 0;if(mi(a))return Ru(a)?Bt(a):a.length;var v=jr(a);return v==st||v==yn?a.size:sp(a).length}function DD(a,v,T){var U=Mt(a)?H:EN;return T&&ni(a,v,T)&&(v=e),U(a,bt(v,3))}var PD=jt(function(a,v){if(a==null)return[];var T=v.length;return T>1&&ni(a,v[0],v[1])?v=[]:T>2&&ni(v[0],v[1],v[2])&&(v=[v[0]]),_1(a,Mr(v,1),[])}),Au=vO||function(){return zt.Date.now()};function FD(a,v){if(typeof v!="function")throw new An(g);return a=Nt(a),function(){if(--a<1)return v.apply(this,arguments)}}function vx(a,v,T){return v=T?e:v,v=a&&v==null?a.length:v,zo(a,N,e,e,e,e,v)}function yx(a,v){var T;if(typeof v!="function")throw new An(g);return a=Nt(a),function(){return--a>0&&(T=v.apply(this,arguments)),a<=1&&(v=e),T}}var Tp=jt(function(a,v,T){var U=w;if(T.length){var Y=Ge(T,Fa(Tp));U|=C}return zo(a,U,v,T,Y)}),bx=jt(function(a,v,T){var U=w|x;if(T.length){var Y=Ge(T,Fa(bx));U|=C}return zo(v,U,a,T,Y)});function wx(a,v,T){v=T?e:v;var U=zo(a,$,e,e,e,e,e,v);return U.placeholder=wx.placeholder,U}function xx(a,v,T){v=T?e:v;var U=zo(a,k,e,e,e,e,e,v);return U.placeholder=xx.placeholder,U}function Cx(a,v,T){var U,Y,ne,de,fe,be,Me=0,Le=!1,Pe=!1,Ze=!0;if(typeof a!="function")throw new An(g);v=Gi(v)||0,Wn(T)&&(Le=!!T.leading,Pe="maxWait"in T,ne=Pe?vr(Gi(T.maxWait)||0,v):ne,Ze="trailing"in T?!!T.trailing:Ze);function lt(Qn){var uo=U,Uo=Y;return U=Y=e,Me=Qn,de=a.apply(Uo,uo),de}function wt(Qn){return Me=Qn,fe=Dl(Ut,v),Le?lt(Qn):de}function Dt(Qn){var uo=Qn-be,Uo=Qn-Me,jx=v-uo;return Pe?Wr(jx,ne-Uo):jx}function mt(Qn){var uo=Qn-be,Uo=Qn-Me;return be===e||uo>=v||uo<0||Pe&&Uo>=ne}function Ut(){var Qn=Au();if(mt(Qn))return Kt(Qn);fe=Dl(Ut,Dt(Qn))}function Kt(Qn){return fe=e,Ze&&U?lt(Qn):(U=Y=e,de)}function Ti(){fe!==e&&I1(fe),Me=0,U=be=Y=fe=e}function ri(){return fe===e?de:Kt(Au())}function Mi(){var Qn=Au(),uo=mt(Qn);if(U=arguments,Y=this,be=Qn,uo){if(fe===e)return wt(be);if(Pe)return I1(fe),fe=Dl(Ut,v),lt(be)}return fe===e&&(fe=Dl(Ut,v)),de}return Mi.cancel=Ti,Mi.flush=ri,Mi}var zD=jt(function(a,v){return h1(a,1,v)}),BD=jt(function(a,v,T){return h1(a,Gi(v)||0,T)});function WD(a){return zo(a,I)}function Su(a,v){if(typeof a!="function"||v!=null&&typeof v!="function")throw new An(g);var T=function(){var U=arguments,Y=v?v.apply(this,U):U[0],ne=T.cache;if(ne.has(Y))return ne.get(Y);var de=a.apply(this,U);return T.cache=ne.set(Y,de)||ne,de};return T.cache=new(Su.Cache||Fo),T}Su.Cache=Fo;function $u(a){if(typeof a!="function")throw new An(g);return function(){var v=arguments;switch(v.length){case 0:return!a.call(this);case 1:return!a.call(this,v[0]);case 2:return!a.call(this,v[0],v[1]);case 3:return!a.call(this,v[0],v[1],v[2])}return!a.apply(this,v)}}function jD(a){return yx(2,a)}var HD=RN(function(a,v){v=v.length==1&&Mt(v[0])?E(v[0],Jt(bt())):E(Mr(v,1),Jt(bt()));var T=v.length;return jt(function(U){for(var Y=-1,ne=Wr(U.length,T);++Y<ne;)U[Y]=v[Y].call(this,U[Y]);return ln(a,this,U)})}),Mp=jt(function(a,v){var T=Ge(v,Fa(Mp));return zo(a,C,e,v,T)}),_x=jt(function(a,v){var T=Ge(v,Fa(_x));return zo(a,O,e,v,T)}),UD=Bo(function(a,v){return zo(a,L,e,e,e,v)});function VD(a,v){if(typeof a!="function")throw new An(g);return v=v===e?v:Nt(v),jt(a,v)}function GD(a,v){if(typeof a!="function")throw new An(g);return v=v==null?0:vr(Nt(v),0),jt(function(T){var U=T[v],Y=ss(T,0,v);return U&&S(Y,U),ln(a,this,Y)})}function qD(a,v,T){var U=!0,Y=!0;if(typeof a!="function")throw new An(g);return Wn(T)&&(U="leading"in T?!!T.leading:U,Y="trailing"in T?!!T.trailing:Y),Cx(a,v,{leading:U,maxWait:v,trailing:Y})}function YD(a){return vx(a,1)}function KD(a,v){return Mp(gp(v),a)}function XD(){if(!arguments.length)return[];var a=arguments[0];return Mt(a)?a:[a]}function JD(a){return Hi(a,o)}function ZD(a,v){return v=typeof v=="function"?v:e,Hi(a,o,v)}function QD(a){return Hi(a,u|o)}function eP(a,v){return v=typeof v=="function"?v:e,Hi(a,u|o,v)}function tP(a,v){return v==null||u1(a,v,xr(v))}function co(a,v){return a===v||a!==a&&v!==v}var nP=bu(rp),rP=bu(function(a,v){return a>=v}),Xs=m1((function(){return arguments})())?m1:function(a){return Gn(a)&&un.call(a,"callee")&&!n1.call(a,"callee")},Mt=_e.isArray,iP=ts?Jt(ts):dN;function mi(a){return a!=null&&Eu(a.length)&&!jo(a)}function Zn(a){return Gn(a)&&mi(a)}function oP(a){return a===!0||a===!1||Gn(a)&&ti(a)==Ee}var as=bO||Hp,sP=Vn?Jt(Vn):fN;function aP(a){return Gn(a)&&a.nodeType===1&&!Pl(a)}function lP(a){if(a==null)return!0;if(mi(a)&&(Mt(a)||typeof a=="string"||typeof a.splice=="function"||as(a)||za(a)||Xs(a)))return!a.length;var v=jr(a);if(v==st||v==yn)return!a.size;if(Nl(a))return!sp(a).length;for(var T in a)if(un.call(a,T))return!1;return!0}function cP(a,v){return Il(a,v)}function uP(a,v,T){T=typeof T=="function"?T:e;var U=T?T(a,v):e;return U===e?Il(a,v,e,T):!!U}function Ip(a){if(!Gn(a))return!1;var v=ti(a);return v==Xe||v==rt||typeof a.message=="string"&&typeof a.name=="string"&&!Pl(a)}function hP(a){return typeof a=="number"&&i1(a)}function jo(a){if(!Wn(a))return!1;var v=ti(a);return v==at||v==ut||v==$e||v==Mn}function kx(a){return typeof a=="number"&&a==Nt(a)}function Eu(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=V}function Wn(a){var v=typeof a;return a!=null&&(v=="object"||v=="function")}function Gn(a){return a!=null&&typeof a=="object"}var Ax=Si?Jt(Si):gN;function dP(a,v){return a===v||op(a,v,Cp(v))}function fP(a,v,T){return T=typeof T=="function"?T:e,op(a,v,Cp(v),T)}function pP(a){return Sx(a)&&a!=+a}function gP(a){if(ZN(a))throw new ft(f);return v1(a)}function mP(a){return a===null}function vP(a){return a==null}function Sx(a){return typeof a=="number"||Gn(a)&&ti(a)==Ht}function Pl(a){if(!Gn(a)||ti(a)!=Rt)return!1;var v=tu(a);if(v===null)return!0;var T=un.call(v,"constructor")&&v.constructor;return typeof T=="function"&&T instanceof T&&Jc.call(T)==fO}var Lp=$i?Jt($i):mN;function yP(a){return kx(a)&&a>=-V&&a<=V}var $x=Bi?Jt(Bi):vN;function Ru(a){return typeof a=="string"||!Mt(a)&&Gn(a)&&ti(a)==ur}function Ri(a){return typeof a=="symbol"||Gn(a)&&ti(a)==pt}var za=js?Jt(js):yN;function bP(a){return a===e}function wP(a){return Gn(a)&&jr(a)==Tt}function xP(a){return Gn(a)&&ti(a)==en}var CP=bu(ap),_P=bu(function(a,v){return a<=v});function Ex(a){if(!a)return[];if(mi(a))return Ru(a)?xt(a):gi(a);if(kl&&a[kl])return Te(a[kl]());var v=jr(a),T=v==st?Fe:v==yn?Je:Ba;return T(a)}function Ho(a){if(!a)return a===0?a:0;if(a=Gi(a),a===j||a===-j){var v=a<0?-1:1;return v*K}return a===a?a:0}function Nt(a){var v=Ho(a),T=v%1;return v===v?T?v-T:v:0}function Rx(a){return a?Gs(Nt(a),0,oe):0}function Gi(a){if(typeof a=="number")return a;if(Ri(a))return J;if(Wn(a)){var v=typeof a.valueOf=="function"?a.valueOf():a;a=Wn(v)?v+"":v}if(typeof a!="string")return a===0?a:+a;a=St(a);var T=dr.test(a);return T||ae.test(a)?kt(a.slice(2),T?2:8):Mo.test(a)?J:+a}function Tx(a){return So(a,vi(a))}function kP(a){return a?Gs(Nt(a),-V,V):a===0?a:0}function hn(a){return a==null?"":Ei(a)}var AP=Da(function(a,v){if(Nl(v)||mi(v)){So(v,xr(v),a);return}for(var T in v)un.call(v,T)&&Rl(a,T,v[T])}),Mx=Da(function(a,v){So(v,vi(v),a)}),Ix=Da(function(a,v,T,U){So(v,vi(v),a,U)}),Op=Da(function(a,v,T,U){So(v,xr(v),a,U)}),SP=Bo(ep);function $P(a,v){var T=Na(a);return v==null?T:c1(T,v)}var EP=jt(function(a,v){a=Wt(a);var T=-1,U=v.length,Y=U>2?v[2]:e;for(Y&&ni(v[0],v[1],Y)&&(U=1);++T<U;)for(var ne=v[T],de=vi(ne),fe=-1,be=de.length;++fe<be;){var Me=de[fe],Le=a[Me];(Le===e||co(Le,Do[Me])&&!un.call(a,Me))&&(a[Me]=ne[Me])}return a}),RP=jt(function(a){return a.push(e,Y1),ln(Lx,e,a)});function TP(a,v){return re(a,bt(v,3),Ao)}function MP(a,v){return re(a,bt(v,3),np)}function IP(a,v){return a==null?a:tp(a,bt(v,3),vi)}function LP(a,v){return a==null?a:p1(a,bt(v,3),vi)}function OP(a,v){return a&&Ao(a,bt(v,3))}function NP(a,v){return a&&np(a,bt(v,3))}function DP(a){return a==null?[]:hu(a,xr(a))}function PP(a){return a==null?[]:hu(a,vi(a))}function Np(a,v,T){var U=a==null?e:qs(a,v);return U===e?T:U}function FP(a,v){return a!=null&&J1(a,v,lN)}function Dp(a,v){return a!=null&&J1(a,v,cN)}var zP=H1(function(a,v,T){v!=null&&typeof v.toString!="function"&&(v=Zc.call(v)),a[v]=T},Fp(yi)),BP=H1(function(a,v,T){v!=null&&typeof v.toString!="function"&&(v=Zc.call(v)),un.call(a,v)?a[v].push(T):a[v]=[T]},bt),WP=jt(Ml);function xr(a){return mi(a)?a1(a):sp(a)}function vi(a){return mi(a)?a1(a,!0):bN(a)}function jP(a,v){var T={};return v=bt(v,3),Ao(a,function(U,Y,ne){ko(T,v(U,Y,ne),U)}),T}function HP(a,v){var T={};return v=bt(v,3),Ao(a,function(U,Y,ne){ko(T,Y,v(U,Y,ne))}),T}var UP=Da(function(a,v,T){du(a,v,T)}),Lx=Da(function(a,v,T,U){du(a,v,T,U)}),VP=Bo(function(a,v){var T={};if(a==null)return T;var U=!1;v=E(v,function(ne){return ne=os(ne,a),U||(U=ne.length>1),ne}),So(a,wp(a),T),U&&(T=Hi(T,u|p|o,BN));for(var Y=v.length;Y--;)dp(T,v[Y]);return T});function GP(a,v){return Ox(a,$u(bt(v)))}var qP=Bo(function(a,v){return a==null?{}:xN(a,v)});function Ox(a,v){if(a==null)return{};var T=E(wp(a),function(U){return[U]});return v=bt(v),k1(a,T,function(U,Y){return v(U,Y[0])})}function YP(a,v,T){v=os(v,a);var U=-1,Y=v.length;for(Y||(Y=1,a=e);++U<Y;){var ne=a==null?e:a[lo(v[U])];ne===e&&(U=Y,ne=T),a=jo(ne)?ne.call(a):ne}return a}function KP(a,v,T){return a==null?a:Ll(a,v,T)}function XP(a,v,T,U){return U=typeof U=="function"?U:e,a==null?a:Ll(a,v,T,U)}var Nx=G1(xr),Dx=G1(vi);function JP(a,v,T){var U=Mt(a),Y=U||as(a)||za(a);if(v=bt(v,4),T==null){var ne=a&&a.constructor;Y?T=U?new ne:[]:Wn(a)?T=jo(ne)?Na(tu(a)):{}:T={}}return(Y?gr:Ao)(a,function(de,fe,be){return v(T,de,fe,be)}),T}function ZP(a,v){return a==null?!0:dp(a,v)}function QP(a,v,T){return a==null?a:R1(a,v,gp(T))}function eF(a,v,T,U){return U=typeof U=="function"?U:e,a==null?a:R1(a,v,gp(T),U)}function Ba(a){return a==null?[]:It(a,xr(a))}function tF(a){return a==null?[]:It(a,vi(a))}function nF(a,v,T){return T===e&&(T=v,v=e),T!==e&&(T=Gi(T),T=T===T?T:0),v!==e&&(v=Gi(v),v=v===v?v:0),Gs(Gi(a),v,T)}function rF(a,v,T){return v=Ho(v),T===e?(T=v,v=0):T=Ho(T),a=Gi(a),uN(a,v,T)}function iF(a,v,T){if(T&&typeof T!="boolean"&&ni(a,v,T)&&(v=T=e),T===e&&(typeof v=="boolean"?(T=v,v=e):typeof a=="boolean"&&(T=a,a=e)),a===e&&v===e?(a=0,v=1):(a=Ho(a),v===e?(v=a,a=0):v=Ho(v)),a>v){var U=a;a=v,v=U}if(T||a%1||v%1){var Y=o1();return Wr(a+Y*(v-a+kn("1e-"+((Y+"").length-1))),v)}return cp(a,v)}var oF=Pa(function(a,v,T){return v=v.toLowerCase(),a+(T?Px(v):v)});function Px(a){return Pp(hn(a).toLowerCase())}function Fx(a){return a=hn(a),a&&a.replace(He,G).replace(oo,"")}function sF(a,v,T){a=hn(a),v=Ei(v);var U=a.length;T=T===e?U:Gs(Nt(T),0,U);var Y=T;return T-=v.length,T>=0&&a.slice(T,Y)==v}function aF(a){return a=hn(a),a&&Zr.test(a)?a.replace(Jr,Z):a}function lF(a){return a=hn(a),a&&Fn.test(a)?a.replace(Dr,"\\$&"):a}var cF=Pa(function(a,v,T){return a+(T?"-":"")+v.toLowerCase()}),uF=Pa(function(a,v,T){return a+(T?" ":"")+v.toLowerCase()}),hF=B1("toLowerCase");function dF(a,v,T){a=hn(a),v=Nt(v);var U=v?Bt(a):0;if(!v||U>=v)return a;var Y=(v-U)/2;return yu(ou(Y),T)+a+yu(iu(Y),T)}function fF(a,v,T){a=hn(a),v=Nt(v);var U=v?Bt(a):0;return v&&U<v?a+yu(v-U,T):a}function pF(a,v,T){a=hn(a),v=Nt(v);var U=v?Bt(a):0;return v&&U<v?yu(v-U,T)+a:a}function gF(a,v,T){return T||v==null?v=0:v&&(v=+v),_O(hn(a).replace(_n,""),v||0)}function mF(a,v,T){return(T?ni(a,v,T):v===e)?v=1:v=Nt(v),up(hn(a),v)}function vF(){var a=arguments,v=hn(a[0]);return a.length<3?v:v.replace(a[1],a[2])}var yF=Pa(function(a,v,T){return a+(T?"_":"")+v.toLowerCase()});function bF(a,v,T){return T&&typeof T!="number"&&ni(a,v,T)&&(v=T=e),T=T===e?oe:T>>>0,T?(a=hn(a),a&&(typeof v=="string"||v!=null&&!Lp(v))&&(v=Ei(v),!v&&pe(a))?ss(xt(a),0,T):a.split(v,T)):[]}var wF=Pa(function(a,v,T){return a+(T?" ":"")+Pp(v)});function xF(a,v,T){return a=hn(a),T=T==null?0:Gs(Nt(T),0,a.length),v=Ei(v),a.slice(T,T+v.length)==v}function CF(a,v,T){var U=te.templateSettings;T&&ni(a,v,T)&&(v=e),a=hn(a),v=Op({},v,U,q1);var Y=Op({},v.imports,U.imports,q1),ne=xr(Y),de=It(Y,ne);gr(ne,function(mt){if(Pr.test(mt))throw new ft(c)});var fe,be,Me=0,Le=v.interpolate||_t,Pe="__p += '",Ze=pi((v.escape||_t).source+"|"+Le.source+"|"+(Le===Ro?Qr:_t).source+"|"+(v.evaluate||_t).source+"|$","g"),lt="//# sourceURL="+(un.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ws+"]")+`
|
|
1462
|
-
`;a.replace(Ze,function(mt,Ut,Kt,Ti,ri,Mi){return Kt||(Kt=Ti),Pe+=a.slice(Me,Mi).replace(wn,ie),Ut&&(fe=!0,Pe+=`' +
|
|
1463
|
-
__e(`+Ut+`) +
|
|
1464
|
-
'`),ri&&(be=!0,Pe+=`';
|
|
1465
|
-
`+ri+`;
|
|
1466
|
-
__p += '`),Kt&&(Pe+=`' +
|
|
1467
|
-
((__t = (`+Kt+`)) == null ? '' : __t) +
|
|
1468
|
-
'`),Me=Mi+mt.length,mt}),Pe+=`';
|
|
1469
|
-
`;var wt=un.call(v,"variable")&&v.variable;if(!wt)Pe=`with (obj) {
|
|
1470
|
-
`+Pe+`
|
|
1471
|
-
}
|
|
1472
|
-
`;else if(Pr.test(wt))throw new ft(y);Pe=(be?Pe.replace(Ci,""):Pe).replace(_i,"$1").replace(nr,"$1;"),Pe="function("+(wt||"obj")+`) {
|
|
1473
|
-
`+(wt?"":`obj || (obj = {});
|
|
1474
|
-
`)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(be?`, __j = Array.prototype.join;
|
|
1475
|
-
function print() { __p += __j.call(arguments, '') }
|
|
1476
|
-
`:`;
|
|
1477
|
-
`)+Pe+`return __p
|
|
1478
|
-
}`;var Dt=Bx(function(){return Et(ne,lt+"return "+Pe).apply(e,de)});if(Dt.source=Pe,Ip(Dt))throw Dt;return Dt}function _F(a){return hn(a).toLowerCase()}function kF(a){return hn(a).toUpperCase()}function AF(a,v,T){if(a=hn(a),a&&(T||v===e))return St(a);if(!a||!(v=Ei(v)))return a;var U=xt(a),Y=xt(v),ne=ir(U,Y),de=mr(U,Y)+1;return ss(U,ne,de).join("")}function SF(a,v,T){if(a=hn(a),a&&(T||v===e))return a.slice(0,gt(a)+1);if(!a||!(v=Ei(v)))return a;var U=xt(a),Y=mr(U,xt(v))+1;return ss(U,0,Y).join("")}function $F(a,v,T){if(a=hn(a),a&&(T||v===e))return a.replace(_n,"");if(!a||!(v=Ei(v)))return a;var U=xt(a),Y=ir(U,xt(v));return ss(U,Y).join("")}function EF(a,v){var T=W,U=F;if(Wn(v)){var Y="separator"in v?v.separator:Y;T="length"in v?Nt(v.length):T,U="omission"in v?Ei(v.omission):U}a=hn(a);var ne=a.length;if(pe(a)){var de=xt(a);ne=de.length}if(T>=ne)return a;var fe=T-Bt(U);if(fe<1)return U;var be=de?ss(de,0,fe).join(""):a.slice(0,fe);if(Y===e)return be+U;if(de&&(fe+=be.length-fe),Lp(Y)){if(a.slice(fe).search(Y)){var Me,Le=be;for(Y.global||(Y=pi(Y.source,hn(Ft.exec(Y))+"g")),Y.lastIndex=0;Me=Y.exec(Le);)var Pe=Me.index;be=be.slice(0,Pe===e?fe:Pe)}}else if(a.indexOf(Ei(Y),fe)!=fe){var Ze=be.lastIndexOf(Y);Ze>-1&&(be=be.slice(0,Ze))}return be+U}function RF(a){return a=hn(a),a&&Ms.test(a)?a.replace(no,ct):a}var TF=Pa(function(a,v,T){return a+(T?" ":"")+v.toUpperCase()}),Pp=B1("toUpperCase");function zx(a,v,T){return a=hn(a),v=T?e:v,v===e?xe(a)?or(a):Q(a):a.match(v)||[]}var Bx=jt(function(a,v){try{return ln(a,e,v)}catch(T){return Ip(T)?T:new ft(T)}}),MF=Bo(function(a,v){return gr(v,function(T){T=lo(T),ko(a,T,Tp(a[T],a))}),a});function IF(a){var v=a==null?0:a.length,T=bt();return a=v?E(a,function(U){if(typeof U[1]!="function")throw new An(g);return[T(U[0]),U[1]]}):[],jt(function(U){for(var Y=-1;++Y<v;){var ne=a[Y];if(ln(ne[0],this,U))return ln(ne[1],this,U)}})}function LF(a){return oN(Hi(a,u))}function Fp(a){return function(){return a}}function OF(a,v){return a==null||a!==a?v:a}var NF=j1(),DF=j1(!0);function yi(a){return a}function zp(a){return y1(typeof a=="function"?a:Hi(a,u))}function PF(a){return w1(Hi(a,u))}function FF(a,v){return x1(a,Hi(v,u))}var zF=jt(function(a,v){return function(T){return Ml(T,a,v)}}),BF=jt(function(a,v){return function(T){return Ml(a,T,v)}});function Bp(a,v,T){var U=xr(v),Y=hu(v,U);T==null&&!(Wn(v)&&(Y.length||!U.length))&&(T=v,v=a,a=this,Y=hu(v,xr(v)));var ne=!(Wn(T)&&"chain"in T)||!!T.chain,de=jo(a);return gr(Y,function(fe){var be=v[fe];a[fe]=be,de&&(a.prototype[fe]=function(){var Me=this.__chain__;if(ne||Me){var Le=a(this.__wrapped__),Pe=Le.__actions__=gi(this.__actions__);return Pe.push({func:be,args:arguments,thisArg:a}),Le.__chain__=Me,Le}return be.apply(a,S([this.value()],arguments))})}),a}function WF(){return zt._===this&&(zt._=pO),this}function Wp(){}function jF(a){return a=Nt(a),jt(function(v){return C1(v,a)})}var HF=vp(E),UF=vp(_o),VF=vp(H);function Wx(a){return kp(a)?Oe(lo(a)):CN(a)}function GF(a){return function(v){return a==null?e:qs(a,v)}}var qF=U1(),YF=U1(!0);function jp(){return[]}function Hp(){return!1}function KF(){return{}}function XF(){return""}function JF(){return!0}function ZF(a,v){if(a=Nt(a),a<1||a>V)return[];var T=oe,U=Wr(a,oe);v=bt(v),a-=oe;for(var Y=ot(U,v);++T<a;)v(T);return Y}function QF(a){return Mt(a)?E(a,lo):Ri(a)?[a]:gi(sx(hn(a)))}function ez(a){var v=++dO;return hn(a)+v}var tz=vu(function(a,v){return a+v},0),nz=yp("ceil"),rz=vu(function(a,v){return a/v},1),iz=yp("floor");function oz(a){return a&&a.length?uu(a,yi,rp):e}function sz(a,v){return a&&a.length?uu(a,bt(v,2),rp):e}function az(a){return we(a,yi)}function lz(a,v){return we(a,bt(v,2))}function cz(a){return a&&a.length?uu(a,yi,ap):e}function uz(a,v){return a&&a.length?uu(a,bt(v,2),ap):e}var hz=vu(function(a,v){return a*v},1),dz=yp("round"),fz=vu(function(a,v){return a-v},0);function pz(a){return a&&a.length?tt(a,yi):0}function gz(a,v){return a&&a.length?tt(a,bt(v,2)):0}return te.after=FD,te.ary=vx,te.assign=AP,te.assignIn=Mx,te.assignInWith=Ix,te.assignWith=Op,te.at=SP,te.before=yx,te.bind=Tp,te.bindAll=MF,te.bindKey=bx,te.castArray=XD,te.chain=px,te.chunk=o2,te.compact=s2,te.concat=a2,te.cond=IF,te.conforms=LF,te.constant=Fp,te.countBy=gD,te.create=$P,te.curry=wx,te.curryRight=xx,te.debounce=Cx,te.defaults=EP,te.defaultsDeep=RP,te.defer=zD,te.delay=BD,te.difference=l2,te.differenceBy=c2,te.differenceWith=u2,te.drop=h2,te.dropRight=d2,te.dropRightWhile=f2,te.dropWhile=p2,te.fill=g2,te.filter=vD,te.flatMap=wD,te.flatMapDeep=xD,te.flatMapDepth=CD,te.flatten=ux,te.flattenDeep=m2,te.flattenDepth=v2,te.flip=WD,te.flow=NF,te.flowRight=DF,te.fromPairs=y2,te.functions=DP,te.functionsIn=PP,te.groupBy=_D,te.initial=w2,te.intersection=x2,te.intersectionBy=C2,te.intersectionWith=_2,te.invert=zP,te.invertBy=BP,te.invokeMap=AD,te.iteratee=zp,te.keyBy=SD,te.keys=xr,te.keysIn=vi,te.map=ku,te.mapKeys=jP,te.mapValues=HP,te.matches=PF,te.matchesProperty=FF,te.memoize=Su,te.merge=UP,te.mergeWith=Lx,te.method=zF,te.methodOf=BF,te.mixin=Bp,te.negate=$u,te.nthArg=jF,te.omit=VP,te.omitBy=GP,te.once=jD,te.orderBy=$D,te.over=HF,te.overArgs=HD,te.overEvery=UF,te.overSome=VF,te.partial=Mp,te.partialRight=_x,te.partition=ED,te.pick=qP,te.pickBy=Ox,te.property=Wx,te.propertyOf=GF,te.pull=$2,te.pullAll=dx,te.pullAllBy=E2,te.pullAllWith=R2,te.pullAt=T2,te.range=qF,te.rangeRight=YF,te.rearg=UD,te.reject=MD,te.remove=M2,te.rest=VD,te.reverse=Ep,te.sampleSize=LD,te.set=KP,te.setWith=XP,te.shuffle=OD,te.slice=I2,te.sortBy=PD,te.sortedUniq=z2,te.sortedUniqBy=B2,te.split=bF,te.spread=GD,te.tail=W2,te.take=j2,te.takeRight=H2,te.takeRightWhile=U2,te.takeWhile=V2,te.tap=sD,te.throttle=qD,te.thru=_u,te.toArray=Ex,te.toPairs=Nx,te.toPairsIn=Dx,te.toPath=QF,te.toPlainObject=Tx,te.transform=JP,te.unary=YD,te.union=G2,te.unionBy=q2,te.unionWith=Y2,te.uniq=K2,te.uniqBy=X2,te.uniqWith=J2,te.unset=ZP,te.unzip=Rp,te.unzipWith=fx,te.update=QP,te.updateWith=eF,te.values=Ba,te.valuesIn=tF,te.without=Z2,te.words=zx,te.wrap=KD,te.xor=Q2,te.xorBy=eD,te.xorWith=tD,te.zip=nD,te.zipObject=rD,te.zipObjectDeep=iD,te.zipWith=oD,te.entries=Nx,te.entriesIn=Dx,te.extend=Mx,te.extendWith=Ix,Bp(te,te),te.add=tz,te.attempt=Bx,te.camelCase=oF,te.capitalize=Px,te.ceil=nz,te.clamp=nF,te.clone=JD,te.cloneDeep=QD,te.cloneDeepWith=eP,te.cloneWith=ZD,te.conformsTo=tP,te.deburr=Fx,te.defaultTo=OF,te.divide=rz,te.endsWith=sF,te.eq=co,te.escape=aF,te.escapeRegExp=lF,te.every=mD,te.find=yD,te.findIndex=lx,te.findKey=TP,te.findLast=bD,te.findLastIndex=cx,te.findLastKey=MP,te.floor=iz,te.forEach=gx,te.forEachRight=mx,te.forIn=IP,te.forInRight=LP,te.forOwn=OP,te.forOwnRight=NP,te.get=Np,te.gt=nP,te.gte=rP,te.has=FP,te.hasIn=Dp,te.head=hx,te.identity=yi,te.includes=kD,te.indexOf=b2,te.inRange=rF,te.invoke=WP,te.isArguments=Xs,te.isArray=Mt,te.isArrayBuffer=iP,te.isArrayLike=mi,te.isArrayLikeObject=Zn,te.isBoolean=oP,te.isBuffer=as,te.isDate=sP,te.isElement=aP,te.isEmpty=lP,te.isEqual=cP,te.isEqualWith=uP,te.isError=Ip,te.isFinite=hP,te.isFunction=jo,te.isInteger=kx,te.isLength=Eu,te.isMap=Ax,te.isMatch=dP,te.isMatchWith=fP,te.isNaN=pP,te.isNative=gP,te.isNil=vP,te.isNull=mP,te.isNumber=Sx,te.isObject=Wn,te.isObjectLike=Gn,te.isPlainObject=Pl,te.isRegExp=Lp,te.isSafeInteger=yP,te.isSet=$x,te.isString=Ru,te.isSymbol=Ri,te.isTypedArray=za,te.isUndefined=bP,te.isWeakMap=wP,te.isWeakSet=xP,te.join=k2,te.kebabCase=cF,te.last=Vi,te.lastIndexOf=A2,te.lowerCase=uF,te.lowerFirst=hF,te.lt=CP,te.lte=_P,te.max=oz,te.maxBy=sz,te.mean=az,te.meanBy=lz,te.min=cz,te.minBy=uz,te.stubArray=jp,te.stubFalse=Hp,te.stubObject=KF,te.stubString=XF,te.stubTrue=JF,te.multiply=hz,te.nth=S2,te.noConflict=WF,te.noop=Wp,te.now=Au,te.pad=dF,te.padEnd=fF,te.padStart=pF,te.parseInt=gF,te.random=iF,te.reduce=RD,te.reduceRight=TD,te.repeat=mF,te.replace=vF,te.result=YP,te.round=dz,te.runInContext=ge,te.sample=ID,te.size=ND,te.snakeCase=yF,te.some=DD,te.sortedIndex=L2,te.sortedIndexBy=O2,te.sortedIndexOf=N2,te.sortedLastIndex=D2,te.sortedLastIndexBy=P2,te.sortedLastIndexOf=F2,te.startCase=wF,te.startsWith=xF,te.subtract=fz,te.sum=pz,te.sumBy=gz,te.template=CF,te.times=ZF,te.toFinite=Ho,te.toInteger=Nt,te.toLength=Rx,te.toLower=_F,te.toNumber=Gi,te.toSafeInteger=kP,te.toString=hn,te.toUpper=kF,te.trim=AF,te.trimEnd=SF,te.trimStart=$F,te.truncate=EF,te.unescape=RF,te.uniqueId=ez,te.upperCase=TF,te.upperFirst=Pp,te.each=gx,te.eachRight=mx,te.first=hx,Bp(te,(function(){var a={};return Ao(te,function(v,T){un.call(te.prototype,T)||(a[T]=v)}),a})(),{chain:!1}),te.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){te[a].placeholder=te}),gr(["drop","take"],function(a,v){qt.prototype[a]=function(T){T=T===e?1:vr(Nt(T),0);var U=this.__filtered__&&!v?new qt(this):this.clone();return U.__filtered__?U.__takeCount__=Wr(T,U.__takeCount__):U.__views__.push({size:Wr(T,oe),type:a+(U.__dir__<0?"Right":"")}),U},qt.prototype[a+"Right"]=function(T){return this.reverse()[a](T).reverse()}}),gr(["filter","map","takeWhile"],function(a,v){var T=v+1,U=T==_||T==B;qt.prototype[a]=function(Y){var ne=this.clone();return ne.__iteratees__.push({iteratee:bt(Y,3),type:T}),ne.__filtered__=ne.__filtered__||U,ne}}),gr(["head","last"],function(a,v){var T="take"+(v?"Right":"");qt.prototype[a]=function(){return this[T](1).value()[0]}}),gr(["initial","tail"],function(a,v){var T="drop"+(v?"":"Right");qt.prototype[a]=function(){return this.__filtered__?new qt(this):this[T](1)}}),qt.prototype.compact=function(){return this.filter(yi)},qt.prototype.find=function(a){return this.filter(a).head()},qt.prototype.findLast=function(a){return this.reverse().find(a)},qt.prototype.invokeMap=jt(function(a,v){return typeof a=="function"?new qt(this):this.map(function(T){return Ml(T,a,v)})}),qt.prototype.reject=function(a){return this.filter($u(bt(a)))},qt.prototype.slice=function(a,v){a=Nt(a);var T=this;return T.__filtered__&&(a>0||v<0)?new qt(T):(a<0?T=T.takeRight(-a):a&&(T=T.drop(a)),v!==e&&(v=Nt(v),T=v<0?T.dropRight(-v):T.take(v-a)),T)},qt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},qt.prototype.toArray=function(){return this.take(oe)},Ao(qt.prototype,function(a,v){var T=/^(?:filter|find|map|reject)|While$/.test(v),U=/^(?:head|last)$/.test(v),Y=te[U?"take"+(v=="last"?"Right":""):v],ne=U||/^find/.test(v);Y&&(te.prototype[v]=function(){var de=this.__wrapped__,fe=U?[1]:arguments,be=de instanceof qt,Me=fe[0],Le=be||Mt(de),Pe=function(Ut){var Kt=Y.apply(te,S([Ut],fe));return U&&Ze?Kt[0]:Kt};Le&&T&&typeof Me=="function"&&Me.length!=1&&(be=Le=!1);var Ze=this.__chain__,lt=!!this.__actions__.length,wt=ne&&!Ze,Dt=be&&!lt;if(!ne&&Le){de=Dt?de:new qt(this);var mt=a.apply(de,fe);return mt.__actions__.push({func:_u,args:[Pe],thisArg:e}),new ji(mt,Ze)}return wt&&Dt?a.apply(this,fe):(mt=this.thru(Pe),wt?U?mt.value()[0]:mt.value():mt)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var v=Wi[a],T=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",U=/^(?:pop|shift)$/.test(a);te.prototype[a]=function(){var Y=arguments;if(U&&!this.__chain__){var ne=this.value();return v.apply(Mt(ne)?ne:[],Y)}return this[T](function(de){return v.apply(Mt(de)?de:[],Y)})}}),Ao(qt.prototype,function(a,v){var T=te[v];if(T){var U=T.name+"";un.call(Oa,U)||(Oa[U]=[]),Oa[U].push({name:v,func:T})}}),Oa[mu(e,x).name]=[{name:"wrapper",func:e}],qt.prototype.clone=TO,qt.prototype.reverse=MO,qt.prototype.value=IO,te.prototype.at=aD,te.prototype.chain=lD,te.prototype.commit=cD,te.prototype.next=uD,te.prototype.plant=dD,te.prototype.reverse=fD,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=pD,te.prototype.first=te.prototype.head,kl&&(te.prototype[kl]=hD),te}),pn=cn();rr?((rr.exports=pn)._=pn,zr._=pn):zt._=pn}).call(gS)})(rc,rc.exports)),rc.exports}var vS=mS();Tn("s",nc(vS)).debounce(function(){this.rebuildDisplayText()},300);var ev={exports:{}},tv;function yS(){return tv||(tv=1,(function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()})(ev)),ev.exports}yS();const bS=!0,sr="u-",wS="uplot",xS=sr+"hz",CS=sr+"vt",_S=sr+"title",kS=sr+"wrap",AS=sr+"under",SS=sr+"over",$S=sr+"axis",bs=sr+"off",ES=sr+"select",RS=sr+"cursor-x",TS=sr+"cursor-y",MS=sr+"cursor-pt",IS=sr+"legend",LS=sr+"live",OS=sr+"inline",NS=sr+"series",DS=sr+"marker",nv=sr+"label",PS=sr+"value",nl="width",rl="height",il="top",rv="bottom",oa="left",sh="right",ah="#000",iv=ah+"0",lh="mousemove",ov="mousedown",ch="mouseup",sv="mouseenter",av="mouseleave",lv="dblclick",FS="resize",zS="scroll",cv="change",ic="dppxchange",uh="--",sa=typeof window<"u",hh=sa?document:null,aa=sa?window:null,BS=sa?navigator:null;let rn,oc;function dh(){let n=devicePixelRatio;rn!=n&&(rn=n,oc&&gh(cv,oc,dh),oc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),ws(cv,oc,dh),aa.dispatchEvent(new CustomEvent(ic)))}function bi(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function fh(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function Sn(n,t,e){n.style[t]=e+"px"}function Xi(n,t,e,r){let h=hh.createElement(n);return t!=null&&bi(h,t),e?.insertBefore(h,r),h}function Li(n,t){return Xi("div",n,t)}const uv=new WeakMap;function po(n,t,e,r,h){let f="translate("+t+"px,"+e+"px)",g=uv.get(n);f!=g&&(n.style.transform=f,uv.set(n,f),t<0||e<0||t>r||e>h?bi(n,bs):fh(n,bs))}const hv=new WeakMap;function dv(n,t,e){let r=t+e,h=hv.get(n);r!=h&&(hv.set(n,r),n.style.background=t,n.style.borderColor=e)}const fv=new WeakMap;function pv(n,t,e,r){let h=t+""+e,f=fv.get(n);h!=f&&(fv.set(n,h),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const ph={passive:!0},WS={...ph,capture:!0};function ws(n,t,e,r){t.addEventListener(n,e,r?WS:ph)}function gh(n,t,e,r){t.removeEventListener(n,e,ph)}sa&&dh();function Ji(n,t,e,r){let h;e=e||0,r=r||t.length-1;let f=r<=2147483647;for(;r-e>1;)h=f?e+r>>1:xi((e+r)/2),t[h]<n?e=h:r=h;return n-t[e]<=t[r]-n?e:r}function gv(n){return(t,e,r)=>{let h=-1,f=-1;for(let g=e;g<=r;g++)if(n(t[g])){h=g;break}for(let g=r;g>=e;g--)if(n(t[g])){f=g;break}return[h,f]}}const mv=n=>n!=null,vv=n=>n!=null&&n>0,sc=gv(mv),jS=gv(vv);function HS(n,t,e,r=0,h=!1){let f=h?jS:sc,g=h?vv:mv;[t,e]=f(n,t,e);let y=n[t],c=n[t];if(t>-1)if(r==1)y=n[t],c=n[e];else if(r==-1)y=n[e],c=n[t];else for(let d=t;d<=e;d++){let i=n[d];g(i)&&(i<y?y=i:i>c&&(c=i))}return[y??mn,c??-mn]}function ac(n,t,e,r){let h=wv(n),f=wv(t);n==t&&(h==-1?(n*=e,t/=e):(n/=e,t*=e));let g=e==10?$o:xv,y=h==1?xi:Oi,c=f==1?Oi:xi,d=y(g(ar(n))),i=c(g(ar(t))),l=la(e,d),u=la(e,i);return e==10&&(d<0&&(l=vn(l,-d)),i<0&&(u=vn(u,-i))),r||e==2?(n=l*h,t=u*f):(n=Ev(n,l),t=uc(t,u)),[n,t]}function mh(n,t,e,r){let h=ac(n,t,e,r);return n==0&&(h[0]=0),t==0&&(h[1]=0),h}const vh=.1,yv={mode:3,pad:vh},ol={pad:0,soft:null,mode:0},US={min:ol,max:ol};function lc(n,t,e,r){return hc(e)?bv(n,t,e):(ol.pad=e,ol.soft=r?0:null,ol.mode=r?3:0,bv(n,t,US))}function Qt(n,t){return n??t}function VS(n,t,e){for(t=Qt(t,0),e=Qt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function bv(n,t,e){let r=e.min,h=e.max,f=Qt(r.pad,0),g=Qt(h.pad,0),y=Qt(r.hard,-mn),c=Qt(h.hard,mn),d=Qt(r.soft,mn),i=Qt(h.soft,-mn),l=Qt(r.mode,0),u=Qt(h.mode,0),p=t-n,o=$o(p),s=Vr(ar(n),ar(t)),m=$o(s),w=ar(m-o);(p<1e-24||w>10)&&(p=0,(n==0||t==0)&&(p=1e-24,l==2&&d!=mn&&(f=0),u==2&&i!=-mn&&(g=0)));let x=p||s||1e3,R=$o(x),$=la(10,xi(R)),k=x*(p==0?n==0?.1:1:f),C=vn(Ev(n-k,$/10),24),O=n>=d&&(l==1||l==3&&C<=d||l==2&&C>=d)?d:mn,N=Vr(y,C<O&&n>=O?O:Zi(O,C)),L=x*(p==0?t==0?.1:1:g),I=vn(uc(t+L,$/10),24),W=t<=i&&(u==1||u==3&&I>=i||u==2&&I<=i)?i:-mn,F=Zi(c,I>W&&t<=W?W:Vr(W,I));return N==F&&N==0&&(F=100),[N,F]}const GS=new Intl.NumberFormat(sa?BS.language:"en-US"),yh=n=>GS.format(n),wi=Math,cc=wi.PI,ar=wi.abs,xi=wi.floor,lr=wi.round,Oi=wi.ceil,Zi=wi.min,Vr=wi.max,la=wi.pow,wv=wi.sign,$o=wi.log10,xv=wi.log2,qS=(n,t=1)=>wi.sinh(n)*t,bh=(n,t=1)=>wi.asinh(n/t),mn=1/0;function Cv(n){return($o((n^n>>31)-(n>>31))|0)+1}function wh(n,t,e){return Zi(Vr(n,t),e)}function _v(n){return typeof n=="function"}function Vt(n){return _v(n)?n:()=>n}const YS=()=>{},kv=n=>n,Av=(n,t)=>t,KS=n=>null,Sv=n=>!0,$v=(n,t)=>n==t,XS=/\.\d*?(?=9{6,}|0{6,})/gm,xs=n=>{if(Tv(n)||qo.has(n))return n;const t=`${n}`,e=t.match(XS);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[h,f]=t.split("e");return+`${xs(h)}e${f}`}return vn(n,r)};function Cs(n,t){return xs(vn(xs(n/t))*t)}function uc(n,t){return xs(Oi(xs(n/t))*t)}function Ev(n,t){return xs(xi(xs(n/t))*t)}function vn(n,t=0){if(Tv(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return lr(r)/e}const qo=new Map;function Rv(n){return((""+n).split(".")[1]||"").length}function sl(n,t,e,r){let h=[],f=r.map(Rv);for(let g=t;g<e;g++){let y=ar(g),c=vn(la(n,g),y);for(let d=0;d<r.length;d++){let i=n==10?+`${r[d]}e${g}`:r[d]*c,l=(g>=0?0:y)+(g>=f[d]?0:f[d]),u=n==10?i:vn(i,l);h.push(u),qo.set(u,l)}}return h}const al={},xh=[],ca=[null,null],Yo=Array.isArray,Tv=Number.isInteger,JS=n=>n===void 0;function Mv(n){return typeof n=="string"}function hc(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function ZS(n){return n!=null&&typeof n=="object"}const QS=Object.getPrototypeOf(Uint8Array),Iv="__proto__";function ua(n,t=hc){let e;if(Yo(n)){let r=n.find(h=>h!=null);if(Yo(r)||t(r)){e=Array(n.length);for(let h=0;h<n.length;h++)e[h]=ua(n[h],t)}else e=n.slice()}else if(n instanceof QS)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Iv&&(e[r]=ua(n[r],t))}else e=n;return e}function er(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let h in r)h!=Iv&&(hc(n[h])?er(n[h],ua(r[h])):n[h]=ua(r[h]))}return n}const e$=0,t$=1,n$=2;function r$(n,t,e){for(let r=0,h,f=-1;r<t.length;r++){let g=t[r];if(g>f){for(h=g-1;h>=0&&n[h]==null;)n[h--]=null;for(h=g+1;h<e&&n[h]==null;)n[f=h++]=null}}}function i$(n,t){if(a$(n)){let g=n[0].slice();for(let y=1;y<n.length;y++)g.push(...n[y].slice(1));return l$(g[0])||(g=s$(g)),g}let e=new Set;for(let g=0;g<n.length;g++){let y=n[g][0],c=y.length;for(let d=0;d<c;d++)e.add(y[d])}let r=[Array.from(e).sort((g,y)=>g-y)],h=r[0].length,f=new Map;for(let g=0;g<h;g++)f.set(r[0][g],g);for(let g=0;g<n.length;g++){let y=n[g],c=y[0];for(let d=1;d<y.length;d++){let i=y[d],l=Array(h).fill(void 0),u=t?t[g][d]:t$,p=[];for(let o=0;o<i.length;o++){let s=i[o],m=f.get(c[o]);s===null?u!=e$&&(l[m]=s,u==n$&&p.push(m)):l[m]=s}r$(l,p,h),r.push(l)}}return r}const o$=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function s$(n){let t=n[0],e=t.length,r=Array(e);for(let f=0;f<r.length;f++)r[f]=f;r.sort((f,g)=>t[f]-t[g]);let h=[];for(let f=0;f<n.length;f++){let g=n[f],y=Array(e);for(let c=0;c<e;c++)y[c]=g[r[c]];h.push(y)}return h}function a$(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let h=n[r][0];if(h.length!=e)return!1;if(h!=t){for(let f=0;f<e;f++)if(h[f]!=t[f])return!1}}return!0}function l$(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,h=e-1;for(;r<=h&&n[r]==null;)r++;for(;h>=r&&n[h]==null;)h--;if(h<=r)return!0;const f=Vr(1,xi((h-r+1)/t));for(let g=n[r],y=r+f;y<=h;y+=f){const c=n[y];if(c!=null){if(c<=g)return!1;g=c}}return!0}const Lv=["January","February","March","April","May","June","July","August","September","October","November","December"],Ov=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Nv(n){return n.slice(0,3)}const c$=Ov.map(Nv),u$=Lv.map(Nv),h$={MMMM:Lv,MMM:u$,WWWW:Ov,WWW:c$};function ll(n){return(n<10?"0":"")+n}function d$(n){return(n<10?"00":n<100?"0":"")+n}const f$={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>ll(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>ll(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>ll(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>ll(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>ll(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>d$(n.getMilliseconds())};function Ch(n,t){t=t||h$;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,h;for(;h=r.exec(n);)e.push(h[0][0]=="{"?f$[h[1]]:h[0]);return f=>{let g="";for(let y=0;y<e.length;y++)g+=typeof e[y]=="string"?e[y]:e[y](f,t);return g}}const p$=new Intl.DateTimeFormat().resolvedOptions().timeZone;function g$(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==p$?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Dv=n=>n%1==0,dc=[1,2,2.5,5],m$=sl(10,-32,0,dc),Pv=sl(10,0,32,dc),v$=Pv.filter(Dv),_s=m$.concat(Pv),_h=`
|
|
1479
|
-
`,Fv="{YYYY}",zv=_h+Fv,Bv="{M}/{D}",cl=_h+Bv,fc=cl+"/{YY}",Wv="{aa}",y$="{h}:{mm}",ha=y$+Wv,jv=_h+ha,Hv=":{ss}",sn=null;function Uv(n){let t=n*1e3,e=t*60,r=e*60,h=r*24,f=h*30,g=h*365,y=(n==1?sl(10,0,3,dc).filter(Dv):sl(10,-3,0,dc)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,h,h*2,h*3,h*4,h*5,h*6,h*7,h*8,h*9,h*10,h*15,f,f*2,f*3,f*4,f*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const c=[[g,Fv,sn,sn,sn,sn,sn,sn,1],[h*28,"{MMM}",zv,sn,sn,sn,sn,sn,1],[h,Bv,zv,sn,sn,sn,sn,sn,1],[r,"{h}"+Wv,fc,sn,cl,sn,sn,sn,1],[e,ha,fc,sn,cl,sn,sn,sn,1],[t,Hv,fc+" "+ha,sn,cl+" "+ha,sn,jv,sn,1],[n,Hv+".{fff}",fc+" "+ha,sn,cl+" "+ha,sn,jv,sn,1]];function d(i){return(l,u,p,o,s,m)=>{let w=[],x=s>=g,R=s>=f&&s<g,$=i(p),k=vn($*n,3),C=kh($.getFullYear(),x?0:$.getMonth(),R||x?1:$.getDate()),O=vn(C*n,3);if(R||x){let N=R?s/f:0,L=x?s/g:0,I=k==O?k:vn(kh(C.getFullYear()+L,C.getMonth()+N,1)*n,3),W=new Date(lr(I/n)),F=W.getFullYear(),D=W.getMonth();for(let A=0;I<=o;A++){let _=kh(F+L*A,D+N*A,1),M=_-i(vn(_*n,3));I=vn((+_+M)*n,3),I<=o&&w.push(I)}}else{let N=s>=h?h:s,L=xi(p)-xi(k),I=O+L+uc(k-O,N);w.push(I);let W=i(I),F=W.getHours()+W.getMinutes()/e+W.getSeconds()/r,D=s/r,A=l.axes[u]._space,_=m/A;for(;I=vn(I+s,n==1?0:3),!(I>o);)if(D>1){let M=xi(vn(F+D,6))%24,B=i(I).getHours()-M;B>1&&(B=-1),I-=B*r,F=(F+D)%24;let j=w[w.length-1];vn((I-j)/s,3)*_>=.7&&w.push(I)}else w.push(I)}return w}}return[y,c,d]}const[b$,w$,x$]=Uv(1),[C$,_$,k$]=Uv(.001);sl(2,-53,53,[1]);function Vv(n,t){return n.map(e=>e.map((r,h)=>h==0||h==8||r==null?r:t(h==1||e[8]==0?r:e[1]+r)))}function Gv(n,t){return(e,r,h,f,g)=>{let y=t.find(o=>g>=o[0])||t[t.length-1],c,d,i,l,u,p;return r.map(o=>{let s=n(o),m=s.getFullYear(),w=s.getMonth(),x=s.getDate(),R=s.getHours(),$=s.getMinutes(),k=s.getSeconds(),C=m!=c&&y[2]||w!=d&&y[3]||x!=i&&y[4]||R!=l&&y[5]||$!=u&&y[6]||k!=p&&y[7]||y[1];return c=m,d=w,i=x,l=R,u=$,p=k,C(s)})}}function A$(n,t){let e=Ch(t);return(r,h,f,g,y)=>h.map(c=>e(n(c)))}function kh(n,t,e){return new Date(n,t,e)}function qv(n,t){return t(n)}const S$="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Yv(n,t){return(e,r,h,f)=>f==null?uh:t(n(r))}function $$(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function E$(n,t){return n.series[t].fill(n,t)}const R$={show:!0,live:!0,isolate:!1,mount:YS,markers:{show:!0,width:2,stroke:$$,fill:E$,dash:"solid"},idx:null,idxs:null,values:[]};function T$(n,t){let e=n.cursor.points,r=Li(),h=e.size(n,t);Sn(r,nl,h),Sn(r,rl,h);let f=h/-2;Sn(r,"marginLeft",f),Sn(r,"marginTop",f);let g=e.width(n,t,h);return g&&Sn(r,"borderWidth",g),r}function M$(n,t){let e=n.series[t].points;return e._fill||e._stroke}function I$(n,t){let e=n.series[t].points;return e._stroke||e._fill}function L$(n,t){return n.series[t].points.size}const Ah=[0,0];function O$(n,t,e){return Ah[0]=t,Ah[1]=e,Ah}function pc(n,t,e,r=!0){return h=>{h.button==0&&(!r||h.target==t)&&e(h)}}function Sh(n,t,e,r=!0){return h=>{(!r||h.target==t)&&e(h)}}const N$={show:!0,x:!0,y:!0,lock:!1,move:O$,points:{one:!1,show:T$,size:L$,width:0,stroke:I$,fill:M$},bind:{mousedown:pc,mouseup:pc,click:pc,dblclick:pc,mousemove:Sh,mouseleave:Sh,mouseenter:Sh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,h)=>r-h,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Kv={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},$h=er({},Kv,{filter:Av}),Xv=er({},$h,{size:10}),Jv=er({},Kv,{show:!1}),Eh='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"',Zv="bold "+Eh,Qv=1.5,ey={show:!0,scale:"x",stroke:ah,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zv,side:2,grid:$h,ticks:Xv,border:Jv,font:Eh,lineGap:Qv,rotate:0},D$="Value",P$="Time",ty={show:!0,scale:"x",auto:!1,sorted:1,min:mn,max:-mn,idxs:[]};function F$(n,t,e,r,h){return t.map(f=>f==null?"":yh(f))}function z$(n,t,e,r,h,f,g){let y=[],c=qo.get(h)||0;e=g?e:vn(uc(e,h),c);for(let d=e;d<=r;d=vn(d+h,c))y.push(Object.is(d,-0)?0:d);return y}function Rh(n,t,e,r,h,f,g){const y=[],c=n.scales[n.axes[t].scale].log,d=c==10?$o:xv,i=xi(d(e));h=la(c,i),c==10&&(h=_s[Ji(h,_s)]);let l=e,u=h*c;c==10&&(u=_s[Ji(u,_s)]);do y.push(l),l=l+h,c==10&&!qo.has(l)&&(l=vn(l,qo.get(h))),l>=u&&(h=l,u=h*c,c==10&&(u=_s[Ji(u,_s)]));while(l<=r);return y}function B$(n,t,e,r,h,f,g){let y=n.scales[n.axes[t].scale].asinh,c=r>y?Rh(n,t,Vr(y,e),r,h):[y],d=r>=0&&e<=0?[0]:[];return(e<-y?Rh(n,t,Vr(y,-r),-e,h):[y]).reverse().map(i=>-i).concat(d,c)}const ny=/./,W$=/[12357]/,j$=/[125]/,ry=/1/,Th=(n,t,e,r)=>n.map((h,f)=>t==4&&h==0||f%r==0&&e.test(h.toExponential()[h<0?1:0])?h:null);function H$(n,t,e,r,h){let f=n.axes[e],g=f.scale,y=n.scales[g],c=n.valToPos,d=f._space,i=c(10,g),l=c(9,g)-i>=d?ny:c(7,g)-i>=d?W$:c(5,g)-i>=d?j$:ry;if(l==ry){let u=ar(c(1,g)-i);if(u<d)return Th(t.slice().reverse(),y.distr,l,Oi(d/u)).reverse()}return Th(t,y.distr,l,1)}function U$(n,t,e,r,h){let f=n.axes[e],g=f.scale,y=f._space,c=n.valToPos,d=ar(c(1,g)-c(2,g));return d<y?Th(t.slice().reverse(),3,ny,Oi(y/d)).reverse():t}function V$(n,t,e,r){return r==null?uh:t==null?"":yh(t)}const iy={show:!0,scale:"y",stroke:ah,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zv,side:3,grid:$h,ticks:Xv,border:Jv,font:Eh,lineGap:Qv,rotate:0};function G$(n,t){let e=3+(n||1)*2;return vn(e*t,3)}function q$(n,t){let{scale:e,idxs:r}=n.series[0],h=n._data[0],f=n.valToPos(h[r[0]],e,!0),g=n.valToPos(h[r[1]],e,!0),y=ar(g-f),c=n.series[t],d=y/(c.points.space*rn);return r[1]-r[0]<=d}const oy={scale:null,auto:!0,sorted:0,min:mn,max:-mn},sy=(n,t,e,r,h)=>h,ay={show:!0,auto:!0,sorted:0,gaps:sy,alpha:1,facets:[er({},oy,{scale:"x"}),er({},oy,{scale:"y"})]},ly={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:sy,alpha:1,points:{show:q$,filter:null},values:null,min:mn,max:-mn,idxs:[],path:null,clip:null};function Y$(n,t,e,r,h){return e/10}const cy={time:bS,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},K$=er({},cy,{time:!1,ori:1}),uy={};function hy(n,t){let e=uy[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(h=>h!=r)},pub(r,h,f,g,y,c,d){for(let i=0;i<e.plots.length;i++)e.plots[i]!=h&&e.plots[i].pub(r,h,f,g,y,c,d)}},n!=null&&(uy[n]=e)),e}const da=1,Mh=2;function ks(n,t,e){const r=n.mode,h=n.series[t],f=r==2?n._data[t]:n._data,g=n.scales,y=n.bbox;let c=f[0],d=r==2?f[1]:f[t],i=r==2?g[h.facets[0].scale]:g[n.series[0].scale],l=r==2?g[h.facets[1].scale]:g[h.scale],u=y.left,p=y.top,o=y.width,s=y.height,m=n.valToPosH,w=n.valToPosV;return i.ori==0?e(h,c,d,i,l,m,w,u,p,o,s,mc,fa,yc,py,my):e(h,c,d,i,l,w,m,p,u,s,o,vc,pa,Oh,gy,vy)}function Ih(n,t){let e=0,r=0,h=Qt(n.bands,xh);for(let f=0;f<h.length;f++){let g=h[f];g.series[0]==t?e=g.dir:g.series[1]==t&&(g.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function X$(n,t,e,r,h){let f=n.mode,g=n.series[t],y=f==2?g.facets[1].scale:g.scale,c=n.scales[y];return h==-1?c.min:h==1?c.max:c.distr==3?c.dir==1?c.min:c.max:0}function Eo(n,t,e,r,h,f){return ks(n,t,(g,y,c,d,i,l,u,p,o,s,m)=>{let w=g.pxRound;const x=d.dir*(d.ori==0?1:-1),R=d.ori==0?fa:pa;let $,k;x==1?($=e,k=r):($=r,k=e);let C=w(l(y[$],d,s,p)),O=w(u(c[$],i,m,o)),N=w(l(y[k],d,s,p)),L=w(u(f==1?i.max:i.min,i,m,o)),I=new Path2D(h);return R(I,N,L),R(I,C,L),R(I,C,O),I})}function gc(n,t,e,r,h,f){let g=null;if(n.length>0){g=new Path2D;const y=t==0?yc:Oh;let c=e;for(let l=0;l<n.length;l++){let u=n[l];if(u[1]>u[0]){let p=u[0]-c;p>0&&y(g,c,r,p,r+f),c=u[1]}}let d=e+h-c,i=10;d>0&&y(g,c,r-i/2,d,r+f+i)}return g}function J$(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Lh(n,t,e,r,h,f,g){let y=[],c=n.length;for(let d=h==1?e:r;d>=e&&d<=r;d+=h)if(t[d]===null){let i=d,l=d;if(h==1)for(;++d<=r&&t[d]===null;)l=d;else for(;--d>=e&&t[d]===null;)l=d;let u=f(n[i]),p=l==i?u:f(n[l]),o=i-h;u=g<=0&&o>=0&&o<c?f(n[o]):u;let s=l+h;p=g>=0&&s>=0&&s<c?f(n[s]):p,p>=u&&y.push([u,p])}return y}function dy(n){return n==0?kv:n==1?lr:t=>Cs(t,n)}function fy(n){let t=n==0?mc:vc,e=n==0?(h,f,g,y,c,d)=>{h.arcTo(f,g,y,c,d)}:(h,f,g,y,c,d)=>{h.arcTo(g,f,c,y,d)},r=n==0?(h,f,g,y,c)=>{h.rect(f,g,y,c)}:(h,f,g,y,c)=>{h.rect(g,f,c,y)};return(h,f,g,y,c,d=0,i=0)=>{d==0&&i==0?r(h,f,g,y,c):(d=Zi(d,y/2,c/2),i=Zi(i,y/2,c/2),t(h,f+d,g),e(h,f+y,g,f+y,g+c,d),e(h,f+y,g+c,f,g+c,i),e(h,f,g+c,f,g,i),e(h,f,g,f+y,g,d),h.closePath())}}const mc=(n,t,e)=>{n.moveTo(t,e)},vc=(n,t,e)=>{n.moveTo(e,t)},fa=(n,t,e)=>{n.lineTo(t,e)},pa=(n,t,e)=>{n.lineTo(e,t)},yc=fy(0),Oh=fy(1),py=(n,t,e,r,h,f)=>{n.arc(t,e,r,h,f)},gy=(n,t,e,r,h,f)=>{n.arc(e,t,r,h,f)},my=(n,t,e,r,h,f,g)=>{n.bezierCurveTo(t,e,r,h,f,g)},vy=(n,t,e,r,h,f,g)=>{n.bezierCurveTo(e,t,h,r,g,f)};function yy(n){return(t,e,r,h,f)=>ks(t,e,(g,y,c,d,i,l,u,p,o,s,m)=>{let{pxRound:w,points:x}=g,R,$;d.ori==0?(R=mc,$=py):(R=vc,$=gy);const k=vn(x.width*rn,3);let C=(x.size-x.width)/2*rn,O=vn(C*2,3),N=new Path2D,L=new Path2D,{left:I,top:W,width:F,height:D}=t.bbox;yc(L,I-O,W-O,F+O*2,D+O*2);const A=_=>{if(c[_]!=null){let M=w(l(y[_],d,s,p)),B=w(u(c[_],i,m,o));R(N,M+C,B),$(N,M,B,C,0,cc*2)}};if(f)f.forEach(A);else for(let _=r;_<=h;_++)A(_);return{stroke:k>0?N:null,fill:N,clip:L,flags:da|Mh}})}function by(n){return(t,e,r,h,f,g)=>{r!=h&&(f!=r&&g!=r&&n(t,e,r),f!=h&&g!=h&&n(t,e,h),n(t,e,g))}}const Z$=by(fa),Q$=by(pa);function wy(n){const t=Qt(n?.alignGaps,0);return(e,r,h,f)=>ks(e,r,(g,y,c,d,i,l,u,p,o,s,m)=>{[h,f]=sc(c,h,f);let w=g.pxRound,x=F=>w(l(F,d,s,p)),R=F=>w(u(F,i,m,o)),$,k;d.ori==0?($=fa,k=Z$):($=pa,k=Q$);const C=d.dir*(d.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:da},N=O.stroke;let L=!1;if(f-h>=s*4){let F=oe=>e.posToVal(oe,d.key,!0),D=null,A=null,_,M,B,j=x(y[C==1?h:f]),V=x(y[h]),K=x(y[f]),J=F(C==1?V+1:K-1);for(let oe=C==1?h:f;oe>=h&&oe<=f;oe+=C){let ee=y[oe],se=(C==1?ee<J:ee>J)?j:x(ee),ce=c[oe];se==j?ce!=null?(M=ce,D==null?($(N,se,R(M)),_=D=A=M):M<D?D=M:M>A&&(A=M)):ce===null&&(L=!0):(D!=null&&k(N,j,R(D),R(A),R(_),R(M)),ce!=null?(M=ce,$(N,se,R(M)),D=A=_=M):(D=A=null,ce===null&&(L=!0)),j=se,J=F(j+C))}D!=null&&D!=A&&B!=j&&k(N,j,R(D),R(A),R(_),R(M))}else for(let F=C==1?h:f;F>=h&&F<=f;F+=C){let D=c[F];D===null?L=!0:D!=null&&$(N,x(y[F]),R(D))}let[I,W]=Ih(e,r);if(g.fill!=null||I!=0){let F=O.fill=new Path2D(N),D=g.fillTo(e,r,g.min,g.max,I),A=R(D),_=x(y[h]),M=x(y[f]);C==-1&&([M,_]=[_,M]),$(F,M,A),$(F,_,A)}if(!g.spanGaps){let F=[];L&&F.push(...Lh(y,c,h,f,C,x,t)),O.gaps=F=g.gaps(e,r,h,f,F),O.clip=gc(F,d.ori,p,o,s,m)}return W!=0&&(O.band=W==2?[Eo(e,r,h,f,N,-1),Eo(e,r,h,f,N,1)]:Eo(e,r,h,f,N,W)),O})}function eE(n){const t=Qt(n.align,1),e=Qt(n.ascDesc,!1),r=Qt(n.alignGaps,0),h=Qt(n.extend,!1);return(f,g,y,c)=>ks(f,g,(d,i,l,u,p,o,s,m,w,x,R)=>{[y,c]=sc(l,y,c);let $=d.pxRound,{left:k,width:C}=f.bbox,O=K=>$(o(K,u,x,m)),N=K=>$(s(K,p,R,w)),L=u.ori==0?fa:pa;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:da},W=I.stroke,F=u.dir*(u.ori==0?1:-1);let D=N(l[F==1?y:c]),A=O(i[F==1?y:c]),_=A,M=A;h&&t==-1&&(M=k,L(W,M,D)),L(W,A,D);for(let K=F==1?y:c;K>=y&&K<=c;K+=F){let J=l[K];if(J==null)continue;let oe=O(i[K]),ee=N(J);t==1?L(W,oe,D):L(W,_,ee),L(W,oe,ee),D=ee,_=oe}let B=_;h&&t==1&&(B=k+C,L(W,B,D));let[j,V]=Ih(f,g);if(d.fill!=null||j!=0){let K=I.fill=new Path2D(W),J=d.fillTo(f,g,d.min,d.max,j),oe=N(J);L(K,B,oe),L(K,M,oe)}if(!d.spanGaps){let K=[];K.push(...Lh(i,l,y,c,F,O,r));let J=d.width*rn/2,oe=e||t==1?J:-J,ee=e||t==-1?-J:J;K.forEach(se=>{se[0]+=oe,se[1]+=ee}),I.gaps=K=d.gaps(f,g,y,c,K),I.clip=gc(K,u.ori,m,w,x,R)}return V!=0&&(I.band=V==2?[Eo(f,g,y,c,W,-1),Eo(f,g,y,c,W,1)]:Eo(f,g,y,c,W,V)),I})}function xy(n,t,e,r,h,f,g=mn){if(n.length>1){let y=null;for(let c=0,d=1/0;c<n.length;c++)if(t[c]!==void 0){if(y!=null){let i=ar(n[c]-n[y]);i<d&&(d=i,g=ar(e(n[c],r,h,f)-e(n[y],r,h,f)))}y=c}}return g}function tE(n){n=n||al;const t=Qt(n.size,[.6,mn,1]),e=n.align||0,r=n.gap||0;let h=n.radius;h=h==null?[0,0]:typeof h=="number"?[h,0]:h;const f=Vt(h),g=1-t[0],y=Qt(t[1],mn),c=Qt(t[2],1),d=Qt(n.disp,al),i=Qt(n.each,p=>{}),{fill:l,stroke:u}=d;return(p,o,s,m)=>ks(p,o,(w,x,R,$,k,C,O,N,L,I,W)=>{let F=w.pxRound,D=e,A=r*rn,_=y*rn,M=c*rn,B,j;$.ori==0?[B,j]=f(p,o):[j,B]=f(p,o);const V=$.dir*($.ori==0?1:-1);let K=$.ori==0?yc:Oh,J=$.ori==0?i:(Ke,Tt,en,Dn,Xn,hr,bn)=>{i(Ke,Tt,en,Xn,Dn,bn,hr)},oe=Qt(p.bands,xh).find(Ke=>Ke.series[0]==o),ee=oe!=null?oe.dir:0,se=w.fillTo(p,o,w.min,w.max,ee),ce=F(O(se,k,W,L)),he,me,$e,Ee=I,Re=F(w.width*rn),rt=!1,Xe=null,at=null,ut=null,st=null;l!=null&&(Re==0||u!=null)&&(rt=!0,Xe=l.values(p,o,s,m),at=new Map,new Set(Xe).forEach(Ke=>{Ke!=null&&at.set(Ke,new Path2D)}),Re>0&&(ut=u.values(p,o,s,m),st=new Map,new Set(ut).forEach(Ke=>{Ke!=null&&st.set(Ke,new Path2D)})));let{x0:Ht,size:_r}=d;if(Ht!=null&&_r!=null){D=1,x=Ht.values(p,o,s,m),Ht.unit==2&&(x=x.map(Tt=>p.posToVal(N+Tt*I,$.key,!0)));let Ke=_r.values(p,o,s,m);_r.unit==2?me=Ke[0]*I:me=C(Ke[0],$,I,N)-C(0,$,I,N),Ee=xy(x,R,C,$,I,N,Ee),$e=Ee-me+A}else Ee=xy(x,R,C,$,I,N,Ee),$e=Ee*g+A,me=Ee-$e;$e<1&&($e=0),Re>=me/2&&(Re=0),$e<5&&(F=kv);let Rt=$e>0,cr=Ee-$e-(Rt?Re:0);me=F(wh(cr,M,_)),he=(D==0?me/2:D==V?0:me)-D*V*((D==0?A/2:0)+(Rt?Re/2:0));const Mn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},kr=rt?null:new Path2D;let yn=null;if(oe!=null)yn=p.data[oe.series[1]];else{let{y0:Ke,y1:Tt}=d;Ke!=null&&Tt!=null&&(R=Tt.values(p,o,s,m),yn=Ke.values(p,o,s,m))}let ur=B*me,pt=j*me;for(let Ke=V==1?s:m;Ke>=s&&Ke<=m;Ke+=V){let Tt=R[Ke];if(Tt==null)continue;if(yn!=null){let Xt=yn[Ke]??0;if(Tt-Xt==0)continue;ce=O(Xt,k,W,L)}let en=$.distr!=2||d!=null?x[Ke]:Ke,Dn=C(en,$,I,N),Xn=O(Qt(Tt,se),k,W,L),hr=F(Dn-he),bn=F(Vr(Xn,ce)),Hn=F(Zi(Xn,ce)),Pn=bn-Hn;if(Tt!=null){let Xt=Tt<0?pt:ur,an=Tt<0?ur:pt;rt?(Re>0&&ut[Ke]!=null&&K(st.get(ut[Ke]),hr,Hn+xi(Re/2),me,Vr(0,Pn-Re),Xt,an),Xe[Ke]!=null&&K(at.get(Xe[Ke]),hr,Hn+xi(Re/2),me,Vr(0,Pn-Re),Xt,an)):K(kr,hr,Hn+xi(Re/2),me,Vr(0,Pn-Re),Xt,an),J(p,o,Ke,hr-Re/2,Hn,me+Re,Pn)}}return Re>0?Mn.stroke=rt?st:kr:rt||(Mn._fill=w.width==0?w._fill:w._stroke??w._fill,Mn.width=0),Mn.fill=rt?at:kr,Mn})}function nE(n,t){const e=Qt(t?.alignGaps,0);return(r,h,f,g)=>ks(r,h,(y,c,d,i,l,u,p,o,s,m,w)=>{[f,g]=sc(d,f,g);let x=y.pxRound,R=B=>x(u(B,i,m,o)),$=B=>x(p(B,l,w,s)),k,C,O;i.ori==0?(k=mc,O=fa,C=my):(k=vc,O=pa,C=vy);const N=i.dir*(i.ori==0?1:-1);let L=R(c[N==1?f:g]),I=L,W=[],F=[];for(let B=N==1?f:g;B>=f&&B<=g;B+=N)if(d[B]!=null){let j=c[B],V=R(j);W.push(I=V),F.push($(d[B]))}const D={stroke:n(W,F,k,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:da},A=D.stroke;let[_,M]=Ih(r,h);if(y.fill!=null||_!=0){let B=D.fill=new Path2D(A),j=y.fillTo(r,h,y.min,y.max,_),V=$(j);O(B,I,V),O(B,L,V)}if(!y.spanGaps){let B=[];B.push(...Lh(c,d,f,g,N,R,e)),D.gaps=B=y.gaps(r,h,f,g,B),D.clip=gc(B,i.ori,o,s,m,w)}return M!=0&&(D.band=M==2?[Eo(r,h,f,g,A,-1),Eo(r,h,f,g,A,1)]:Eo(r,h,f,g,A,M)),D})}function rE(n){return nE(iE,n)}function iE(n,t,e,r,h,f){const g=n.length;if(g<2)return null;const y=new Path2D;if(e(y,n[0],t[0]),g==2)r(y,n[1],t[1]);else{let c=Array(g),d=Array(g-1),i=Array(g-1),l=Array(g-1);for(let u=0;u<g-1;u++)i[u]=t[u+1]-t[u],l[u]=n[u+1]-n[u],d[u]=i[u]/l[u];c[0]=d[0];for(let u=1;u<g-1;u++)d[u]===0||d[u-1]===0||d[u-1]>0!=d[u]>0?c[u]=0:(c[u]=3*(l[u-1]+l[u])/((2*l[u]+l[u-1])/d[u-1]+(l[u]+2*l[u-1])/d[u]),isFinite(c[u])||(c[u]=0));c[g-1]=d[g-2];for(let u=0;u<g-1;u++)h(y,n[u]+l[u]/3,t[u]+c[u]*l[u]/3,n[u+1]-l[u]/3,t[u+1]-c[u+1]*l[u]/3,n[u+1],t[u+1])}return y}const Nh=new Set;function Cy(){for(let n of Nh)n.syncRect(!0)}sa&&(ws(FS,aa,Cy),ws(zS,aa,Cy,!0),ws(ic,aa,()=>{Lr.pxRatio=rn}));const oE=wy(),sE=yy();function _y(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((h,f)=>Dh(h,f,t,e))}function aE(n,t){return n.map((e,r)=>r==0?{}:er({},t,e))}function Dh(n,t,e,r){return er({},t==0?e:r,n)}function ky(n,t,e){return t==null?ca:[t,e]}const lE=ky;function cE(n,t,e){return t==null?ca:lc(t,e,vh,!0)}function Ay(n,t,e,r){return t==null?ca:ac(t,e,n.scales[r].log,!1)}const uE=Ay;function Sy(n,t,e,r){return t==null?ca:mh(t,e,n.scales[r].log,!1)}const hE=Sy;function dE(n,t,e,r,h){let f=Vr(Cv(n),Cv(t)),g=t-n,y=Ji(h/r*g,e);do{let c=e[y],d=r*c/g;if(d>=h&&f+(c<5?qo.get(c):0)<=17)return[c,d]}while(++y<e.length);return[0,0]}function $y(n){let t,e;return n=n.replace(/(\d+)px/,(r,h)=>(t=lr((e=+h)*rn))+"px"),[n,t,e]}function fE(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=vn(t[2]*rn,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function Lr(n,t,e){const r={mode:Qt(n.mode,1)},h=r.mode;function f(G,Z,ie,le){let pe=Z.valToPct(G);return le+ie*(Z.dir==-1?1-pe:pe)}function g(G,Z,ie,le){let pe=Z.valToPct(G);return le+ie*(Z.dir==-1?pe:1-pe)}function y(G,Z,ie,le){return Z.ori==0?f(G,Z,ie,le):g(G,Z,ie,le)}r.valToPosH=f,r.valToPosV=g;let c=!1;r.status=0;const d=r.root=Li(wS);if(n.id!=null&&(d.id=n.id),bi(d,n.class),n.title){let G=Li(_S,d);G.textContent=n.title}const i=Xi("canvas"),l=r.ctx=i.getContext("2d"),u=Li(kS,d);ws("click",u,G=>{G.target===o&&(ht!=Pi||Gt!=Co)&&Un.click(r,G)},!0);const p=r.under=Li(AS,u);u.appendChild(i);const o=r.over=Li(SS,u);n=ua(n);const s=+Qt(n.pxAlign,1),m=dy(s);(n.plugins||[]).forEach(G=>{G.opts&&(n=G.opts(r,n)||n)});const w=n.ms||.001,x=r.series=h==1?_y(n.series||[],ty,ly,!1):aE(n.series||[null],ay),R=r.axes=_y(n.axes||[],ey,iy,!0),$=r.scales={},k=r.bands=n.bands||[];k.forEach(G=>{G.fill=Vt(G.fill||null),G.dir=Qt(G.dir,-1)});const C=h==2?x[1].facets[0].scale:x[0].scale,O={axes:Qo,series:Ps},N=(n.drawOrder||["axes","series"]).map(G=>O[G]);function L(G){const Z=G.distr==3?ie=>$o(ie>0?ie:G.clamp(r,ie,G.min,G.max,G.key)):G.distr==4?ie=>bh(ie,G.asinh):G.distr==100?ie=>G.fwd(ie):ie=>ie;return ie=>{let le=Z(ie),{_min:pe,_max:xe}=G,Te=xe-pe;return(le-pe)/Te}}function I(G){let Z=$[G];if(Z==null){let ie=(n.scales||al)[G]||al;if(ie.from!=null){I(ie.from);let le=er({},$[ie.from],ie,{key:G});le.valToPct=L(le),$[G]=le}else{Z=$[G]=er({},G==C?cy:K$,ie),Z.key=G;let le=Z.time,pe=Z.range,xe=Yo(pe);if((G!=C||h==2&&!le)&&(xe&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?yv:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?yv:{mode:1,hard:pe[1],soft:pe[1]}},xe=!1),!xe&&hc(pe))){let Te=pe;pe=(Fe,je,Ge)=>je==null?ca:lc(je,Ge,Te)}Z.range=Vt(pe||(le?lE:G==C?Z.distr==3?uE:Z.distr==4?hE:ky:Z.distr==3?Ay:Z.distr==4?Sy:cE)),Z.auto=Vt(xe?!1:Z.auto),Z.clamp=Vt(Z.clamp||Y$),Z._min=Z._max=null,Z.valToPct=L(Z)}}}I("x"),I("y"),h==1&&x.forEach(G=>{I(G.scale)}),R.forEach(G=>{I(G.scale)});for(let G in n.scales)I(G);const W=$[C],F=W.distr;let D,A;W.ori==0?(bi(d,xS),D=f,A=g):(bi(d,CS),D=g,A=f);const _={};for(let G in $){let Z=$[G];(Z.min!=null||Z.max!=null)&&(_[G]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const M=n.tzDate||(G=>new Date(lr(G/w))),B=n.fmtDate||Ch,j=w==1?x$(M):k$(M),V=Gv(M,Vv(w==1?w$:_$,B)),K=Yv(M,qv(S$,B)),J=[],oe=r.legend=er({},R$,n.legend),ee=r.cursor=er({},N$,{drag:{y:h==2}},n.cursor),se=oe.show,ce=ee.show,he=oe.markers;oe.idxs=J,he.width=Vt(he.width),he.dash=Vt(he.dash),he.stroke=Vt(he.stroke),he.fill=Vt(he.fill);let me,$e,Ee,Re=[],rt=[],Xe,at=!1,ut={};if(oe.live){const G=x[1]?x[1].values:null;at=G!=null,Xe=at?G(r,1,0):{_:0};for(let Z in Xe)ut[Z]=uh}if(se)if(me=Xi("table",IS,d),Ee=Xi("tbody",null,me),oe.mount(r,me),at){$e=Xi("thead",null,me,Ee);let G=Xi("tr",null,$e);Xi("th",null,G);for(var st in Xe)Xi("th",nv,G).textContent=st}else bi(me,OS),oe.live&&bi(me,LS);const Ht={show:!0},_r={show:!1};function Rt(G,Z){if(Z==0&&(at||!oe.live||h==2))return ca;let ie=[],le=Xi("tr",NS,Ee,Ee.childNodes[Z]);bi(le,G.class),G.show||bi(le,bs);let pe=Xi("th",null,le);if(he.show){let Fe=Li(DS,pe);if(Z>0){let je=he.width(r,Z);je&&(Fe.style.border=je+"px "+he.dash(r,Z)+" "+he.stroke(r,Z)),Fe.style.background=he.fill(r,Z)}}let xe=Li(nv,pe);G.label instanceof HTMLElement?xe.appendChild(G.label):xe.textContent=G.label,Z>0&&(he.show||(xe.style.color=G.width>0?he.stroke(r,Z):he.fill(r,Z)),Mn("click",pe,Fe=>{if(ee._lock)return;ui(Fe);let je=x.indexOf(G);if((Fe.ctrlKey||Fe.metaKey)!=oe.isolate){let Ge=x.some((Je,it)=>it>0&&it!=je&&Je.show);x.forEach((Je,it)=>{it>0&&rr(it,Ge?it==je?Ht:_r:Ht,!0,St.setSeries)})}else rr(je,{show:!G.show},!0,St.setSeries)},!1),Dr&&Mn(sv,pe,Fe=>{ee._lock||(ui(Fe),rr(x.indexOf(G),Bi,!0,St.setSeries))},!1));for(var Te in Xe){let Fe=Xi("td",PS,le);Fe.textContent="--",ie.push(Fe)}return[le,ie]}const cr=new Map;function Mn(G,Z,ie,le=!0){const pe=cr.get(Z)||{},xe=ee.bind[G](r,Z,ie,le);xe&&(ws(G,Z,pe[G]=xe),cr.set(Z,pe))}function kr(G,Z,ie){const le=cr.get(Z)||{};for(let pe in le)(G==null||pe==G)&&(gh(pe,Z,le[pe]),delete le[pe]);G==null&&cr.delete(Z)}let yn=0,ur=0,pt=0,Ke=0,Tt=0,en=0,Dn=Tt,Xn=en,hr=pt,bn=Ke,Hn=0,Pn=0,Xt=0,an=0;r.bbox={};let Nr=!1,Xr=!1,Ar=!1,Ci=!1,_i=!1,nr=!1;function no(G,Z,ie){(ie||G!=r.width||Z!=r.height)&&Jr(G,Z),io(!1),Ar=!0,Xr=!0,xo()}function Jr(G,Z){r.width=yn=pt=G,r.height=ur=Ke=Z,Tt=en=0,ki(),Ro();let ie=r.bbox;Hn=ie.left=Cs(Tt*rn,.5),Pn=ie.top=Cs(en*rn,.5),Xt=ie.width=Cs(pt*rn,.5),an=ie.height=Cs(Ke*rn,.5)}const Ms=3;function Zr(){let G=!1,Z=0;for(;!G;){Z++;let ie=Ea(Z),le=Ra(Z);G=Z==Ms||ie&&le,G||(Jr(r.width,r.height),Xr=!0)}}function $n({width:G,height:Z}){no(G,Z)}r.setSize=$n;function ki(){let G=!1,Z=!1,ie=!1,le=!1;R.forEach((pe,xe)=>{if(pe.show&&pe._show){let{side:Te,_size:Fe}=pe,je=Te%2,Ge=pe.label!=null?pe.labelSize:0,Je=Fe+Ge;Je>0&&(je?(pt-=Je,Te==3?(Tt+=Je,le=!0):ie=!0):(Ke-=Je,Te==0?(en+=Je,G=!0):Z=!0))}}),di[0]=G,di[1]=ie,di[2]=Z,di[3]=le,pt-=dr[1]+dr[3],Tt+=dr[3],Ke-=dr[2]+dr[0],en+=dr[0]}function Ro(){let G=Tt+pt,Z=en+Ke,ie=Tt,le=en;function pe(xe,Te){switch(xe){case 1:return G+=Te,G-Te;case 2:return Z+=Te,Z-Te;case 3:return ie-=Te,ie+Te;case 0:return le-=Te,le+Te}}R.forEach((xe,Te)=>{if(xe.show&&xe._show){let Fe=xe.side;xe._pos=pe(Fe,xe._size),xe.label!=null&&(xe._lpos=pe(Fe,xe.labelSize))}})}if(ee.dataIdx==null){let G=ee.hover,Z=G.skip=new Set(G.skip??[]);Z.add(void 0);let ie=G.prox=Vt(G.prox),le=G.bias??=0;ee.dataIdx=(pe,xe,Te,Fe)=>{if(xe==0)return Te;let je=Te,Ge=ie(pe,xe,Te,Fe)??mn,Je=Ge>=0&&Ge<mn,it=W.ori==0?pt:Ke,At=ee.left,Zt=t[0],Bt=t[xe];if(Z.has(Bt[Te])){je=null;let xt=null,gt=null,ct;if(le==0||le==-1)for(ct=Te;xt==null&&ct-- >0;)Z.has(Bt[ct])||(xt=ct);if(le==0||le==1)for(ct=Te;gt==null&&ct++<Bt.length;)Z.has(Bt[ct])||(gt=ct);if(xt!=null||gt!=null)if(Je){let Cn=xt==null?-1/0:D(Zt[xt],W,it,0),Nn=gt==null?1/0:D(Zt[gt],W,it,0),or=At-Cn,cn=Nn-At;or<=cn?or<=Ge&&(je=xt):cn<=Ge&&(je=gt)}else je=gt==null?xt:xt==null?gt:Te-xt<=gt-Te?xt:gt}else Je&&ar(At-D(Zt[Te],W,it,0))>Ge&&(je=null);return je}}const ui=G=>{ee.event=G};ee.idxs=J,ee._lock=!1;let En=ee.points;En.show=Vt(En.show),En.size=Vt(En.size),En.stroke=Vt(En.stroke),En.width=Vt(En.width),En.fill=Vt(En.fill);const Sr=r.focus=er({},n.focus||{alpha:.3},ee.focus),Dr=Sr.prox>=0,Fn=Dr&&En.one;let _n=[],yr=[],hi=[];function go(G,Z){let ie=En.show(r,Z);if(ie instanceof HTMLElement)return bi(ie,MS),bi(ie,G.class),po(ie,-10,-10,pt,Ke),o.insertBefore(ie,_n[Z]),ie}function mo(G,Z){if(h==1||Z>0){let ie=h==1&&$[G.scale].time,le=G.value;G.value=ie?Mv(le)?Yv(M,qv(le,B)):le||K:le||V$,G.label=G.label||(ie?P$:D$)}if(Fn||Z>0){G.width=G.width==null?1:G.width,G.paths=G.paths||oE||KS,G.fillTo=Vt(G.fillTo||X$),G.pxAlign=+Qt(G.pxAlign,s),G.pxRound=dy(G.pxAlign),G.stroke=Vt(G.stroke||null),G.fill=Vt(G.fill||null),G._stroke=G._fill=G._paths=G._focus=null;let ie=G$(Vr(1,G.width),1),le=G.points=er({},{size:ie,width:Vr(1,ie*.2),stroke:G.stroke,space:ie*2,paths:sE,_stroke:null,_fill:null},G.points);le.show=Vt(le.show),le.filter=Vt(le.filter),le.fill=Vt(le.fill),le.stroke=Vt(le.stroke),le.paths=Vt(le.paths),le.pxAlign=G.pxAlign}if(se){let ie=Rt(G,Z);Re.splice(Z,0,ie[0]),rt.splice(Z,0,ie[1]),oe.values.push(null)}if(ce){J.splice(Z,0,null);let ie=null;Fn?Z==0&&(ie=go(G,Z)):Z>0&&(ie=go(G,Z)),_n.splice(Z,0,ie),yr.splice(Z,0,0),hi.splice(Z,0,0)}ot("addSeries",Z)}function To(G,Z){Z=Z??x.length,G=h==1?Dh(G,Z,ty,ly):Dh(G,Z,{},ay),x.splice(Z,0,G),mo(x[Z],Z)}r.addSeries=To;function Pr(G){if(x.splice(G,1),se){oe.values.splice(G,1),rt.splice(G,1);let Z=Re.splice(G,1)[0];kr(null,Z.firstChild),Z.remove()}ce&&(J.splice(G,1),_n.splice(G,1)[0].remove(),yr.splice(G,1),hi.splice(G,1)),ot("delSeries",G)}r.delSeries=Pr;const di=[!1,!1,!1,!1];function Qr(G,Z){if(G._show=G.show,G.show){let ie=G.side%2,le=$[G.scale];le==null&&(G.scale=ie?x[1].scale:C,le=$[G.scale]);let pe=le.time;G.size=Vt(G.size),G.space=Vt(G.space),G.rotate=Vt(G.rotate),Yo(G.incrs)&&G.incrs.forEach(Te=>{!qo.has(Te)&&qo.set(Te,Rv(Te))}),G.incrs=Vt(G.incrs||(le.distr==2?v$:pe?w==1?b$:C$:_s)),G.splits=Vt(G.splits||(pe&&le.distr==1?j:le.distr==3?Rh:le.distr==4?B$:z$)),G.stroke=Vt(G.stroke),G.grid.stroke=Vt(G.grid.stroke),G.ticks.stroke=Vt(G.ticks.stroke),G.border.stroke=Vt(G.border.stroke);let xe=G.values;G.values=Yo(xe)&&!Yo(xe[0])?Vt(xe):pe?Yo(xe)?Gv(M,Vv(xe,B)):Mv(xe)?A$(M,xe):xe||V:xe||F$,G.filter=Vt(G.filter||(le.distr>=3&&le.log==10?H$:le.distr==3&&le.log==2?U$:Av)),G.font=$y(G.font),G.labelFont=$y(G.labelFont),G._size=G.size(r,null,Z,0),G._space=G._rotate=G._incrs=G._found=G._splits=G._values=null,G._size>0&&(di[Z]=!0,G._el=Li($S,u))}}function Ft(G,Z,ie,le){let[pe,xe,Te,Fe]=ie,je=Z%2,Ge=0;return je==0&&(Fe||xe)&&(Ge=Z==0&&!pe||Z==2&&!Te?lr(ey.size/3):0),je==1&&(pe||Te)&&(Ge=Z==1&&!xe||Z==3&&!Fe?lr(iy.size/2):0),Ge}const Mo=r.padding=(n.padding||[Ft,Ft,Ft,Ft]).map(G=>Vt(Qt(G,Ft))),dr=r._padding=Mo.map((G,Z)=>G(r,Z,di,0));let In,ae=null,Ne=null;const He=h==1?x[0].idxs:null;let _t=null,wn=!1;function Yt(G,Z){if(t=G??[],r.data=r._data=t,h==2){In=0;for(let ie=1;ie<x.length;ie++)In+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),_t=t[0],In=_t.length;let ie=t;if(F==2){ie=t.slice();let le=ie[0]=Array(In);for(let pe=0;pe<In;pe++)le[pe]=pe}r._data=t=ie}if(io(!0),ot("setData"),F==2&&(Ar=!0),Z!==!1){let ie=W;ie.auto(r,wn)?$r():zr(C,ie.min,ie.max),Ci=Ci||ee.left>=0,nr=!0,xo()}}r.setData=Yt;function $r(){wn=!0;let G,Z;h==1&&(In>0?(ae=He[0]=0,Ne=He[1]=In-1,G=t[0][ae],Z=t[0][Ne],F==2?(G=ae,Z=Ne):G==Z&&(F==3?[G,Z]=ac(G,G,W.log,!1):F==4?[G,Z]=mh(G,G,W.log,!1):W.time?Z=G+lr(86400/w):[G,Z]=lc(G,Z,vh,!0))):(ae=He[0]=G=null,Ne=He[1]=Z=null)),zr(C,G,Z)}let Jn,fn,br,xn,wr,vo,Is,Ls,Os,fr;function Ns(G,Z,ie,le,pe,xe){G??=iv,ie??=xh,le??="butt",pe??=iv,xe??="round",G!=Jn&&(l.strokeStyle=Jn=G),pe!=fn&&(l.fillStyle=fn=pe),Z!=br&&(l.lineWidth=br=Z),xe!=wr&&(l.lineJoin=wr=xe),le!=vo&&(l.lineCap=vo=le),ie!=xn&&l.setLineDash(xn=ie)}function Ko(G,Z,ie,le){Z!=fn&&(l.fillStyle=fn=Z),G!=Is&&(l.font=Is=G),ie!=Ls&&(l.textAlign=Ls=ie),le!=Os&&(l.textBaseline=Os=le)}function yo(G,Z,ie,le,pe=0){if(le.length>0&&G.auto(r,wn)&&(Z==null||Z.min==null)){let xe=Qt(ae,0),Te=Qt(Ne,le.length-1),Fe=ie.min==null?HS(le,xe,Te,pe,G.distr==3):[ie.min,ie.max];G.min=Zi(G.min,ie.min=Fe[0]),G.max=Vr(G.max,ie.max=Fe[1])}}const Ds={min:null,max:null};function Xo(){for(let le in $){let pe=$[le];_[le]==null&&(pe.min==null||_[C]!=null&&pe.auto(r,wn))&&(_[le]=Ds)}for(let le in $){let pe=$[le];_[le]==null&&pe.from!=null&&_[pe.from]!=null&&(_[le]=Ds)}_[C]!=null&&io(!0);let G={};for(let le in _){let pe=_[le];if(pe!=null){let xe=G[le]=ua($[le],ZS);if(pe.min!=null)er(xe,pe);else if(le!=C||h==2)if(In==0&&xe.from==null){let Te=xe.range(r,null,null,le);xe.min=Te[0],xe.max=Te[1]}else xe.min=mn,xe.max=-mn}}if(In>0){x.forEach((le,pe)=>{if(h==1){let xe=le.scale,Te=_[xe];if(Te==null)return;let Fe=G[xe];if(pe==0){let je=Fe.range(r,Fe.min,Fe.max,xe);Fe.min=je[0],Fe.max=je[1],ae=Ji(Fe.min,t[0]),Ne=Ji(Fe.max,t[0]),Ne-ae>1&&(t[0][ae]<Fe.min&&ae++,t[0][Ne]>Fe.max&&Ne--),le.min=_t[ae],le.max=_t[Ne]}else le.show&&le.auto&&yo(Fe,Te,le,t[pe],le.sorted);le.idxs[0]=ae,le.idxs[1]=Ne}else if(pe>0&&le.show&&le.auto){let[xe,Te]=le.facets,Fe=xe.scale,je=Te.scale,[Ge,Je]=t[pe],it=G[Fe],At=G[je];it!=null&&yo(it,_[Fe],xe,Ge,xe.sorted),At!=null&&yo(At,_[je],Te,Je,Te.sorted),le.min=Te.min,le.max=Te.max}});for(let le in G){let pe=G[le],xe=_[le];if(pe.from==null&&(xe==null||xe.min==null)){let Te=pe.range(r,pe.min==mn?null:pe.min,pe.max==-mn?null:pe.max,le);pe.min=Te[0],pe.max=Te[1]}}}for(let le in G){let pe=G[le];if(pe.from!=null){let xe=G[pe.from];if(xe.min==null)pe.min=pe.max=null;else{let Te=pe.range(r,xe.min,xe.max,le);pe.min=Te[0],pe.max=Te[1]}}}let Z={},ie=!1;for(let le in G){let pe=G[le],xe=$[le];if(xe.min!=pe.min||xe.max!=pe.max){xe.min=pe.min,xe.max=pe.max;let Te=xe.distr;xe._min=Te==3?$o(xe.min):Te==4?bh(xe.min,xe.asinh):Te==100?xe.fwd(xe.min):xe.min,xe._max=Te==3?$o(xe.max):Te==4?bh(xe.max,xe.asinh):Te==100?xe.fwd(xe.max):xe.max,Z[le]=ie=!0}}if(ie){x.forEach((le,pe)=>{h==2?pe>0&&Z.y&&(le._paths=null):Z[le.scale]&&(le._paths=null)});for(let le in Z)Ar=!0,ot("setScale",le);ce&&ee.left>=0&&(Ci=nr=!0)}for(let le in _)_[le]=null}function Io(G){let Z=wh(ae-1,0,In-1),ie=wh(Ne+1,0,In-1);for(;G[Z]==null&&Z>0;)Z--;for(;G[ie]==null&&ie<In-1;)ie++;return[Z,ie]}function Ps(){if(In>0){let G=x.some(Z=>Z._focus)&&fr!=Sr.alpha;G&&(l.globalAlpha=fr=Sr.alpha),x.forEach((Z,ie)=>{if(ie>0&&Z.show&&(Fs(ie,!1),Fs(ie,!0),Z._paths==null)){let le=fr;fr!=Z.alpha&&(l.globalAlpha=fr=Z.alpha);let pe=h==2?[0,t[ie][0].length-1]:Io(t[ie]);Z._paths=Z.paths(r,ie,pe[0],pe[1]),fr!=le&&(l.globalAlpha=fr=le)}}),x.forEach((Z,ie)=>{if(ie>0&&Z.show){let le=fr;fr!=Z.alpha&&(l.globalAlpha=fr=Z.alpha),Z._paths!=null&&Jo(ie,!1);{let pe=Z._paths!=null?Z._paths.gaps:null,xe=Z.points.show(r,ie,ae,Ne,pe),Te=Z.points.filter(r,ie,xe,pe);(xe||Te)&&(Z.points._paths=Z.points.paths(r,ie,ae,Ne,Te),Jo(ie,!0))}fr!=le&&(l.globalAlpha=fr=le),ot("drawSeries",ie)}}),G&&(l.globalAlpha=fr=1)}}function Fs(G,Z){let ie=Z?x[G].points:x[G];ie._stroke=ie.stroke(r,G),ie._fill=ie.fill(r,G)}function Jo(G,Z){let ie=Z?x[G].points:x[G],{stroke:le,fill:pe,clip:xe,flags:Te,_stroke:Fe=ie._stroke,_fill:je=ie._fill,_width:Ge=ie.width}=ie._paths;Ge=vn(Ge*rn,3);let Je=null,it=Ge%2/2;Z&&je==null&&(je=Ge>0?"#fff":Fe);let At=ie.pxAlign==1&&it>0;if(At&&l.translate(it,it),!Z){let Zt=Hn-Ge/2,Bt=Pn-Ge/2,xt=Xt+Ge,gt=an+Ge;Je=new Path2D,Je.rect(Zt,Bt,xt,gt)}Z?Zo(Fe,Ge,ie.dash,ie.cap,je,le,pe,Te,xe):$a(G,Fe,Ge,ie.dash,ie.cap,je,le,pe,Te,Je,xe),At&&l.translate(-it,-it)}function $a(G,Z,ie,le,pe,xe,Te,Fe,je,Ge,Je){let it=!1;je!=0&&k.forEach((At,Zt)=>{if(At.series[0]==G){let Bt=x[At.series[1]],xt=t[At.series[1]],gt=(Bt._paths||al).band;Yo(gt)&&(gt=At.dir==1?gt[0]:gt[1]);let ct,Cn=null;Bt.show&>&&VS(xt,ae,Ne)?(Cn=At.fill(r,Zt)||xe,ct=Bt._paths.clip):gt=null,Zo(Z,ie,le,pe,Cn,Te,Fe,je,Ge,Je,ct,gt),it=!0}}),it||Zo(Z,ie,le,pe,xe,Te,Fe,je,Ge,Je)}const bo=da|Mh;function Zo(G,Z,ie,le,pe,xe,Te,Fe,je,Ge,Je,it){Ns(G,Z,ie,le,pe),(je||Ge||it)&&(l.save(),je&&l.clip(je),Ge&&l.clip(Ge)),it?(Fe&bo)==bo?(l.clip(it),Je&&l.clip(Je),pr(pe,Te),ro(G,xe,Z)):Fe&Mh?(pr(pe,Te),l.clip(it),ro(G,xe,Z)):Fe&da&&(l.save(),l.clip(it),Je&&l.clip(Je),pr(pe,Te),l.restore(),ro(G,xe,Z)):(pr(pe,Te),ro(G,xe,Z)),(je||Ge||it)&&l.restore()}function ro(G,Z,ie){ie>0&&(Z instanceof Map?Z.forEach((le,pe)=>{l.strokeStyle=Jn=pe,l.stroke(le)}):Z!=null&&G&&l.stroke(Z))}function pr(G,Z){Z instanceof Map?Z.forEach((ie,le)=>{l.fillStyle=fn=le,l.fill(ie)}):Z!=null&&G&&l.fill(Z)}function zs(G,Z,ie,le){let pe=R[G],xe;if(le<=0)xe=[0,0];else{let Te=pe._space=pe.space(r,G,Z,ie,le),Fe=pe._incrs=pe.incrs(r,G,Z,ie,le,Te);xe=dE(Z,ie,Fe,le,Te)}return pe._found=xe}function ei(G,Z,ie,le,pe,xe,Te,Fe,je,Ge){let Je=Te%2/2;s==1&&l.translate(Je,Je),Ns(Fe,Te,je,Ge,Fe),l.beginPath();let it,At,Zt,Bt,xt=pe+(le==0||le==3?-xe:xe);ie==0?(At=pe,Bt=xt):(it=pe,Zt=xt);for(let gt=0;gt<G.length;gt++)Z[gt]!=null&&(ie==0?it=Zt=G[gt]:At=Bt=G[gt],l.moveTo(it,At),l.lineTo(Zt,Bt));l.stroke(),s==1&&l.translate(-Je,-Je)}function Ea(G){let Z=!0;return R.forEach((ie,le)=>{if(!ie.show)return;let pe=$[ie.scale];if(pe.min==null){ie._show&&(Z=!1,ie._show=!1,io(!1));return}else ie._show||(Z=!1,ie._show=!0,io(!1));let xe=ie.side,Te=xe%2,{min:Fe,max:je}=pe,[Ge,Je]=zs(le,Fe,je,Te==0?pt:Ke);if(Je==0)return;let it=pe.distr==2,At=ie._splits=ie.splits(r,le,Fe,je,Ge,Je,it),Zt=pe.distr==2?At.map(ct=>_t[ct]):At,Bt=pe.distr==2?_t[At[1]]-_t[At[0]]:Ge,xt=ie._values=ie.values(r,ie.filter(r,Zt,le,Je,Bt),le,Je,Bt);ie._rotate=xe==2?ie.rotate(r,xt,le,Je):0;let gt=ie._size;ie._size=Oi(ie.size(r,xt,le,G)),gt!=null&&ie._size!=gt&&(Z=!1)}),Z}function Ra(G){let Z=!0;return Mo.forEach((ie,le)=>{let pe=ie(r,le,di,G);pe!=dr[le]&&(Z=!1),dr[le]=pe}),Z}function Qo(){for(let G=0;G<R.length;G++){let Z=R[G];if(!Z.show||!Z._show)continue;let ie=Z.side,le=ie%2,pe,xe,Te=Z.stroke(r,G),Fe=ie==0||ie==3?-1:1,[je,Ge]=Z._found;if(Z.label!=null){let Rr=Z.labelGap*Fe,An=lr((Z._lpos+Rr)*rn);Ko(Z.labelFont[0],Te,"center",ie==2?il:rv),l.save(),le==1?(pe=xe=0,l.translate(An,lr(Pn+an/2)),l.rotate((ie==3?-cc:cc)/2)):(pe=lr(Hn+Xt/2),xe=An);let Wi=_v(Z.label)?Z.label(r,G,je,Ge):Z.label;l.fillText(Wi,pe,xe),l.restore()}if(Ge==0)continue;let Je=$[Z.scale],it=le==0?Xt:an,At=le==0?Hn:Pn,Zt=Z._splits,Bt=Je.distr==2?Zt.map(Rr=>_t[Rr]):Zt,xt=Je.distr==2?_t[Zt[1]]-_t[Zt[0]]:je,gt=Z.ticks,ct=Z.border,Cn=gt.show?gt.size:0,Nn=lr(Cn*rn),or=lr((Z.alignTo==2?Z._size-Cn-Z.gap:Z.gap)*rn),cn=Z._rotate*-cc/180,pn=m(Z._pos*rn),ge=(Nn+or)*Fe,Se=pn+ge;xe=le==0?Se:0,pe=le==1?Se:0;let _e=Z.font[0],qe=Z.align==1?oa:Z.align==2?sh:cn>0?oa:cn<0?sh:le==0?"center":ie==3?sh:oa,ft=cn||le==1?"middle":ie==2?il:rv;Ko(_e,Te,qe,ft);let Et=Z.font[1]*Z.lineGap,tn=Zt.map(Rr=>m(y(Rr,Je,it,At))),Wt=Z._values;for(let Rr=0;Rr<Wt.length;Rr++){let An=Wt[Rr];if(An!=null){le==0?pe=tn[Rr]:xe=tn[Rr],An=""+An;let Wi=An.indexOf(`
|
|
1480
|
-
`)==-1?[An]:An.split(/\n/gm);for(let Tr=0;Tr<Wi.length;Tr++){let Do=Wi[Tr];cn?(l.save(),l.translate(pe,xe+Tr*Et),l.rotate(cn),l.fillText(Do,0,0),l.restore()):l.fillText(Do,pe,xe+Tr*Et)}}}gt.show&&ei(tn,gt.filter(r,Bt,G,Ge,xt),le,ie,pn,Nn,vn(gt.width*rn,3),gt.stroke(r,G),gt.dash,gt.cap);let pi=Z.grid;pi.show&&ei(tn,pi.filter(r,Bt,G,Ge,xt),le,le==0?2:1,le==0?Pn:Hn,le==0?an:Xt,vn(pi.width*rn,3),pi.stroke(r,G),pi.dash,pi.cap),ct.show&&ei([pn],[1],le==0?1:0,le==0?1:2,le==1?Pn:Hn,le==1?an:Xt,vn(ct.width*rn,3),ct.stroke(r,G),ct.dash,ct.cap)}ot("drawAxes")}function io(G){x.forEach((Z,ie)=>{ie>0&&(Z._paths=null,G&&(h==1?(Z.min=null,Z.max=null):Z.facets.forEach(le=>{le.min=null,le.max=null})))})}let Lo=!1,es=!1,wo=[];function Ta(){es=!1;for(let G=0;G<wo.length;G++)ot(...wo[G]);wo.length=0}function xo(){Lo||(o$(Bs),Lo=!0)}function Be(G,Z=!1){Lo=!0,es=Z,G(r),Bs(),Z&&wo.length>0&&queueMicrotask(Ta)}r.batch=Be;function Bs(){if(Nr&&(Xo(),Nr=!1),Ar&&(Zr(),Ar=!1),Xr){if(Sn(p,oa,Tt),Sn(p,il,en),Sn(p,nl,pt),Sn(p,rl,Ke),Sn(o,oa,Tt),Sn(o,il,en),Sn(o,nl,pt),Sn(o,rl,Ke),Sn(u,nl,yn),Sn(u,rl,ur),i.width=lr(yn*rn),i.height=lr(ur*rn),R.forEach(({_el:G,_show:Z,_size:ie,_pos:le,side:pe})=>{if(G!=null)if(Z){let xe=pe===3||pe===0?ie:0,Te=pe%2==1;Sn(G,Te?"left":"top",le-xe),Sn(G,Te?"width":"height",ie),Sn(G,Te?"top":"left",Te?en:Tt),Sn(G,Te?"height":"width",Te?Ke:pt),fh(G,bs)}else bi(G,bs)}),Jn=fn=br=wr=vo=Is=Ls=Os=xn=null,fr=1,z(!0),Tt!=Dn||en!=Xn||pt!=hr||Ke!=bn){io(!1);let G=pt/hr,Z=Ke/bn;if(ce&&!Ci&&ee.left>=0){ee.left*=G,ee.top*=Z,oo&&po(oo,lr(ee.left),0,pt,Ke),Bn&&po(Bn,0,lr(ee.top),pt,Ke);for(let ie=0;ie<_n.length;ie++){let le=_n[ie];le!=null&&(yr[ie]*=G,hi[ie]*=Z,po(le,Oi(yr[ie]),Oi(hi[ie]),pt,Ke))}}if(kt.show&&!_i&&kt.left>=0&&kt.width>0){kt.left*=G,kt.width*=G,kt.top*=Z,kt.height*=Z;for(let ie in X)Sn(Fr,ie,kt[ie])}Dn=Tt,Xn=en,hr=pt,bn=Ke}ot("setSize"),Xr=!1}yn>0&&ur>0&&(l.clearRect(0,0,i.width,i.height),ot("drawClear"),N.forEach(G=>G()),ot("draw")),kt.show&&_i&&(zi(kt),_i=!1),ce&&Ci&&(S(null,!0,!1),Ci=!1),oe.show&&oe.live&&nr&&(b(),nr=!1),c||(c=!0,r.status=1,ot("ready")),wn=!1,Lo=!1}r.redraw=(G,Z)=>{Ar=Z||!1,G!==!1?zr(C,W.min,W.max):xo()};function De(G,Z){let ie=$[G];if(ie.from==null){if(In==0){let le=ie.range(r,Z.min,Z.max,G);Z.min=le[0],Z.max=le[1]}if(Z.min>Z.max){let le=Z.min;Z.min=Z.max,Z.max=le}if(In>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;G==C&&ie.distr==2&&In>0&&(Z.min=Ji(Z.min,t[0]),Z.max=Ji(Z.max,t[0]),Z.min==Z.max&&Z.max++),_[G]=Z,Nr=!0,xo()}}r.setScale=De;let zn,Oo,oo,Bn,Ma,No,Pi,Co,Ws,on,ht,Gt,Fi=!1;const Un=ee.drag;let Ve=Un.x,kn=Un.y;ce&&(ee.x&&(zn=Li(RS,o)),ee.y&&(Oo=Li(TS,o)),W.ori==0?(oo=zn,Bn=Oo):(oo=Oo,Bn=zn),ht=ee.left,Gt=ee.top);const kt=r.select=er({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Fr=kt.show?Li(ES,kt.over?o:p):null;function zi(G,Z){if(kt.show){for(let ie in G)kt[ie]=G[ie],ie in X&&Sn(Fr,ie,G[ie]);Z!==!1&&ot("setSelect")}}r.setSelect=zi;function zt(G){if(x[G].show)se&&fh(Re[G],bs);else if(se&&bi(Re[G],bs),ce){let Z=Fn?_n[0]:_n[G];Z!=null&&po(Z,-10,-10,pt,Ke)}}function zr(G,Z,ie){De(G,{min:Z,max:ie})}function rr(G,Z,ie,le){Z.focus!=null&&js(G),Z.show!=null&&x.forEach((pe,xe)=>{xe>0&&(G==xe||G==null)&&(pe.show=Z.show,zt(xe),h==2?(zr(pe.facets[0].scale,null,null),zr(pe.facets[1].scale,null,null)):zr(pe.scale,null,null),xo())}),ie!==!1&&ot("setSeries",G,Z),le&&$t("setSeries",r,G,Z)}r.setSeries=rr;function so(G,Z){er(k[G],Z)}function Ai(G,Z){G.fill=Vt(G.fill||null),G.dir=Qt(G.dir,-1),Z=Z??k.length,k.splice(Z,0,G)}function Ln(G){G==null?k.length=0:k.splice(G,1)}r.addBand=Ai,r.setBand=so,r.delBand=Ln;function ts(G,Z){x[G].alpha=Z,ce&&_n[G]!=null&&(_n[G].style.opacity=Z),se&&Re[G]&&(Re[G].style.opacity=Z)}let Vn,Si,$i;const Bi={focus:!0};function js(G){if(G!=$i){let Z=G==null,ie=Sr.alpha!=1;x.forEach((le,pe)=>{if(h==1||pe>0){let xe=Z||pe==0||pe==G;le._focus=Z?null:xe,ie&&ts(pe,xe?1:Sr.alpha)}}),$i=G,ie&&xo()}}se&&Dr&&Mn(av,me,G=>{ee._lock||(ui(G),$i!=null&&rr(null,Bi,!0,St.setSeries))});function ln(G,Z,ie){let le=$[Z];ie&&(G=G/rn-(le.ori==1?en:Tt));let pe=pt;le.ori==1&&(pe=Ke,G=pe-G),le.dir==-1&&(G=pe-G);let xe=le._min,Te=le._max,Fe=G/pe,je=xe+(Te-xe)*Fe,Ge=le.distr;return Ge==3?la(10,je):Ge==4?qS(je,le.asinh):Ge==100?le.bwd(je):je}function Ia(G,Z){let ie=ln(G,C,Z);return Ji(ie,t[0],ae,Ne)}r.valToIdx=G=>Ji(G,t[0]),r.posToIdx=Ia,r.posToVal=ln,r.valToPos=(G,Z,ie)=>$[Z].ori==0?f(G,$[Z],ie?Xt:pt,ie?Hn:0):g(G,$[Z],ie?an:Ke,ie?Pn:0),r.setCursor=(G,Z,ie)=>{ht=G.left,Gt=G.top,S(null,Z,ie)};function gr(G,Z){Sn(Fr,oa,kt.left=G),Sn(Fr,nl,kt.width=Z)}function Br(G,Z){Sn(Fr,il,kt.top=G),Sn(Fr,rl,kt.height=Z)}let _o=W.ori==0?gr:Br,Er=W.ori==1?gr:Br;function fi(){if(se&&oe.live)for(let G=h==2?1:0;G<x.length;G++){if(G==0&&at)continue;let Z=oe.values[G],ie=0;for(let le in Z)rt[G][ie++].firstChild.nodeValue=Z[le]}}function b(G,Z){if(G!=null&&(G.idxs?G.idxs.forEach((ie,le)=>{J[le]=ie}):JS(G.idx)||J.fill(G.idx),oe.idx=J[0]),se&&oe.live){for(let ie=0;ie<x.length;ie++)(ie>0||h==1&&!at)&&E(ie,J[ie]);fi()}nr=!1,Z!==!1&&ot("setLegend")}r.setLegend=b;function E(G,Z){let ie=x[G],le=G==0&&F==2?_t:t[G],pe;at?pe=ie.values(r,G,Z)??ut:(pe=ie.value(r,Z==null?null:le[Z],G,Z),pe=pe==null?ut:{_:pe}),oe.values[G]=pe}function S(G,Z,ie){Ws=ht,on=Gt,[ht,Gt]=ee.move(r,ht,Gt),ee.left=ht,ee.top=Gt,ce&&(oo&&po(oo,lr(ht),0,pt,Ke),Bn&&po(Bn,0,lr(Gt),pt,Ke));let le,pe=ae>Ne;Vn=mn,Si=null;let xe=W.ori==0?pt:Ke,Te=W.ori==1?pt:Ke;if(ht<0||In==0||pe){le=ee.idx=null;for(let Fe=0;Fe<x.length;Fe++){let je=_n[Fe];je!=null&&po(je,-10,-10,pt,Ke)}Dr&&rr(null,Bi,!0,G==null&&St.setSeries),oe.live&&(J.fill(le),nr=!0)}else{let Fe,je,Ge;h==1&&(Fe=W.ori==0?ht:Gt,je=ln(Fe,C),le=ee.idx=Ji(je,t[0],ae,Ne),Ge=D(t[0][le],W,xe,0));let Je=-10,it=-10,At=0,Zt=0,Bt=!0,xt="",gt="";for(let ct=h==2?1:0;ct<x.length;ct++){let Cn=x[ct],Nn=J[ct],or=Nn==null?null:h==1?t[ct][Nn]:t[ct][1][Nn],cn=ee.dataIdx(r,ct,le,je),pn=cn==null?null:h==1?t[ct][cn]:t[ct][1][cn];if(nr=nr||pn!=or||cn!=Nn,J[ct]=cn,ct>0&&Cn.show){let ge=cn==null?-10:cn==le?Ge:D(h==1?t[0][cn]:t[ct][0][cn],W,xe,0),Se=pn==null?-10:A(pn,h==1?$[Cn.scale]:$[Cn.facets[1].scale],Te,0);if(Dr&&pn!=null){let _e=W.ori==1?ht:Gt,qe=ar(Sr.dist(r,ct,cn,Se,_e));if(qe<Vn){let ft=Sr.bias;if(ft!=0){let Et=ln(_e,Cn.scale),tn=pn>=0?1:-1,Wt=Et>=0?1:-1;Wt==tn&&(Wt==1?ft==1?pn>=Et:pn<=Et:ft==1?pn<=Et:pn>=Et)&&(Vn=qe,Si=ct)}else Vn=qe,Si=ct}}if(nr||Fn){let _e,qe;W.ori==0?(_e=ge,qe=Se):(_e=Se,qe=ge);let ft,Et,tn,Wt,pi,Rr,An=!0,Wi=En.bbox;if(Wi!=null){An=!1;let Tr=Wi(r,ct);tn=Tr.left,Wt=Tr.top,ft=Tr.width,Et=Tr.height}else tn=_e,Wt=qe,ft=Et=En.size(r,ct);if(Rr=En.fill(r,ct),pi=En.stroke(r,ct),Fn)ct==Si&&Vn<=Sr.prox&&(Je=tn,it=Wt,At=ft,Zt=Et,Bt=An,xt=Rr,gt=pi);else{let Tr=_n[ct];Tr!=null&&(yr[ct]=tn,hi[ct]=Wt,pv(Tr,ft,Et,An),dv(Tr,Rr,pi),po(Tr,Oi(tn),Oi(Wt),pt,Ke))}}}}if(Fn){let ct=Sr.prox,Cn=$i==null?Vn<=ct:Vn>ct||Si!=$i;if(nr||Cn){let Nn=_n[0];Nn!=null&&(yr[0]=Je,hi[0]=it,pv(Nn,At,Zt,Bt),dv(Nn,xt,gt),po(Nn,Oi(Je),Oi(it),pt,Ke))}}}if(kt.show&&Fi)if(G!=null){let[Fe,je]=St.scales,[Ge,Je]=St.match,[it,At]=G.cursor.sync.scales,Zt=G.cursor.drag;if(Ve=Zt._x,kn=Zt._y,Ve||kn){let{left:Bt,top:xt,width:gt,height:ct}=G.select,Cn=G.scales[it].ori,Nn=G.posToVal,or,cn,pn,ge,Se,_e=Fe!=null&&Ge(Fe,it),qe=je!=null&&Je(je,At);_e&&Ve?(Cn==0?(or=Bt,cn=gt):(or=xt,cn=ct),pn=$[Fe],ge=D(Nn(or,it),pn,xe,0),Se=D(Nn(or+cn,it),pn,xe,0),_o(Zi(ge,Se),ar(Se-ge))):_o(0,xe),qe&&kn?(Cn==1?(or=Bt,cn=gt):(or=xt,cn=ct),pn=$[je],ge=A(Nn(or,At),pn,Te,0),Se=A(Nn(or+cn,At),pn,Te,0),Er(Zi(ge,Se),ar(Se-ge))):Er(0,Te)}else Q()}else{let Fe=ar(Ws-Ma),je=ar(on-No);if(W.ori==1){let At=Fe;Fe=je,je=At}Ve=Un.x&&Fe>=Un.dist,kn=Un.y&&je>=Un.dist;let Ge=Un.uni;Ge!=null?Ve&&kn&&(Ve=Fe>=Ge,kn=je>=Ge,!Ve&&!kn&&(je>Fe?kn=!0:Ve=!0)):Un.x&&Un.y&&(Ve||kn)&&(Ve=kn=!0);let Je,it;Ve&&(W.ori==0?(Je=Pi,it=ht):(Je=Co,it=Gt),_o(Zi(Je,it),ar(it-Je)),kn||Er(0,Te)),kn&&(W.ori==1?(Je=Pi,it=ht):(Je=Co,it=Gt),Er(Zi(Je,it),ar(it-Je)),Ve||_o(0,xe)),!Ve&&!kn&&(_o(0,0),Er(0,0))}if(Un._x=Ve,Un._y=kn,G==null){if(ie){if(Jt!=null){let[Fe,je]=St.scales;St.values[0]=Fe!=null?ln(W.ori==0?ht:Gt,Fe):null,St.values[1]=je!=null?ln(W.ori==1?ht:Gt,je):null}$t(lh,r,ht,Gt,pt,Ke,le)}if(Dr){let Fe=ie&&St.setSeries,je=Sr.prox;$i==null?Vn<=je&&rr(Si,Bi,!0,Fe):Vn>je?rr(null,Bi,!0,Fe):Si!=$i&&rr(Si,Bi,!0,Fe)}}nr&&(oe.idx=le,b()),Z!==!1&&ot("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&z(!1),P}});function z(G=!1){G?P=null:(P=o.getBoundingClientRect(),ot("syncRect",P))}function H(G,Z,ie,le,pe,xe,Te){ee._lock||Fi&&G!=null&&G.movementX==0&&G.movementY==0||(q(G,Z,ie,le,pe,xe,Te,!1,G!=null),G!=null?S(null,!0,!0):S(Z,!0,!1))}function q(G,Z,ie,le,pe,xe,Te,Fe,je){if(P==null&&z(!1),ui(G),G!=null)ie=G.clientX-P.left,le=G.clientY-P.top;else{if(ie<0||le<0){ht=-10,Gt=-10;return}let[Ge,Je]=St.scales,it=Z.cursor.sync,[At,Zt]=it.values,[Bt,xt]=it.scales,[gt,ct]=St.match,Cn=Z.axes[0].side%2==1,Nn=W.ori==0?pt:Ke,or=W.ori==1?pt:Ke,cn=Cn?xe:pe,pn=Cn?pe:xe,ge=Cn?le:ie,Se=Cn?ie:le;if(Bt!=null?ie=gt(Ge,Bt)?y(At,$[Ge],Nn,0):-10:ie=Nn*(ge/cn),xt!=null?le=ct(Je,xt)?y(Zt,$[Je],or,0):-10:le=or*(Se/pn),W.ori==1){let _e=ie;ie=le,le=_e}}je&&(Z==null||Z.cursor.event.type==lh)&&((ie<=1||ie>=pt-1)&&(ie=Cs(ie,pt)),(le<=1||le>=Ke-1)&&(le=Cs(le,Ke))),Fe?(Ma=ie,No=le,[Pi,Co]=ee.move(r,ie,le)):(ht=ie,Gt=le)}const X={width:0,height:0,left:0,top:0};function Q(){zi(X,!1)}let re,ue,ye,Ce;function ve(G,Z,ie,le,pe,xe,Te){Fi=!0,Ve=kn=Un._x=Un._y=!1,q(G,Z,ie,le,pe,xe,Te,!0,!1),G!=null&&(Mn(ch,hh,we,!1),$t(ov,r,Pi,Co,pt,Ke,null));let{left:Fe,top:je,width:Ge,height:Je}=kt;re=Fe,ue=je,ye=Ge,Ce=Je}function we(G,Z,ie,le,pe,xe,Te){Fi=Un._x=Un._y=!1,q(G,Z,ie,le,pe,xe,Te,!1,!0);let{left:Fe,top:je,width:Ge,height:Je}=kt,it=Ge>0||Je>0,At=re!=Fe||ue!=je||ye!=Ge||Ce!=Je;if(it&&At&&zi(kt),Un.setScale&&it&&At){let Zt=Fe,Bt=Ge,xt=je,gt=Je;if(W.ori==1&&(Zt=je,Bt=Je,xt=Fe,gt=Ge),Ve&&zr(C,ln(Zt,C),ln(Zt+Bt,C)),kn)for(let ct in $){let Cn=$[ct];ct!=C&&Cn.from==null&&Cn.min!=mn&&zr(ct,ln(xt+gt,ct),ln(xt,ct))}Q()}else ee.lock&&(ee._lock=!ee._lock,S(Z,!0,G!=null));G!=null&&(kr(ch,hh),$t(ch,r,ht,Gt,pt,Ke,null))}function Oe(G,Z,ie,le,pe,xe,Te){if(ee._lock)return;ui(G);let Fe=Fi;if(Fi){let je=!0,Ge=!0,Je=10,it,At;W.ori==0?(it=Ve,At=kn):(it=kn,At=Ve),it&&At&&(je=ht<=Je||ht>=pt-Je,Ge=Gt<=Je||Gt>=Ke-Je),it&&je&&(ht=ht<Pi?0:pt),At&&Ge&&(Gt=Gt<Co?0:Ke),S(null,!0,!0),Fi=!1}ht=-10,Gt=-10,J.fill(null),S(null,!0,!0),Fe&&(Fi=Fe)}function Ie(G,Z,ie,le,pe,xe,Te){ee._lock||(ui(G),$r(),Q(),G!=null&&$t(lv,r,ht,Gt,pt,Ke,null))}function Ye(){R.forEach(fE),no(r.width,r.height,!0)}ws(ic,aa,Ye);const dt={};dt.mousedown=ve,dt.mousemove=H,dt.mouseup=we,dt.dblclick=Ie,dt.setSeries=(G,Z,ie,le)=>{let pe=St.match[2];ie=pe(r,Z,ie),ie!=-1&&rr(ie,le,!0,!1)},ce&&(Mn(ov,o,ve),Mn(lh,o,H),Mn(sv,o,G=>{ui(G),z(!1)}),Mn(av,o,Oe),Mn(lv,o,Ie),Nh.add(r),r.syncRect=z);const tt=r.hooks=n.hooks||{};function ot(G,Z,ie){es?wo.push([G,Z,ie]):G in tt&&tt[G].forEach(le=>{le.call(null,r,Z,ie)})}(n.plugins||[]).forEach(G=>{for(let Z in G.hooks)tt[Z]=(tt[Z]||[]).concat(G.hooks[Z])});const Rn=(G,Z,ie)=>ie,St=er({key:null,setSeries:!1,filters:{pub:Sv,sub:Sv},scales:[C,x[1]?x[1].scale:null],match:[$v,$v,Rn],values:[null,null]},ee.sync);St.match.length==2&&St.match.push(Rn),ee.sync=St;const Jt=St.key,It=hy(Jt);function $t(G,Z,ie,le,pe,xe,Te){St.filters.pub(G,Z,ie,le,pe,xe,Te)&&It.pub(G,Z,ie,le,pe,xe,Te)}It.sub(r);function ir(G,Z,ie,le,pe,xe,Te){St.filters.sub(G,Z,ie,le,pe,xe,Te)&&dt[G](null,Z,ie,le,pe,xe,Te)}r.pub=ir;function mr(){It.unsub(r),Nh.delete(r),cr.clear(),gh(ic,aa,Ye),d.remove(),me?.remove(),ot("destroy")}r.destroy=mr;function On(){ot("init",n,t),Yt(t||n.data,!1),_[C]?De(C,_[C]):$r(),_i=kt.show&&(kt.width>0||kt.height>0),Ci=nr=!0,no(n.width,n.height)}return x.forEach(mo),R.forEach(Qr),e?e instanceof HTMLElement?(e.appendChild(d),On()):e(r,On):On(),r}Lr.assign=er,Lr.fmtNum=yh,Lr.rangeNum=lc,Lr.rangeLog=ac,Lr.rangeAsinh=mh,Lr.orient=ks,Lr.pxRatio=rn,Lr.join=i$,Lr.fmtDate=Ch,Lr.tzDate=g$,Lr.sync=hy;{Lr.addGap=J$,Lr.clipGaps=gc;let n=Lr.paths={points:yy};n.linear=wy,n.stepped=eE,n.bars=tE,n.spline=rE}var Ey,Ry;function pE(){return Ry||(Ry=1,Ey=function(n,t,e,r,h){var f,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(h===void 0)h=n.length-1;else if(h=h|0,h<r||h>=n.length)throw new RangeError("invalid upper bound");for(;r<=h;)if(f=r+(h-r>>>1),g=+e(n[f],t,f,n),g<0)r=f+1;else if(g>0)h=f-1;else return f;return~r}),Ey}var gE=pE();const Fz=Tn("y",nc(gE));var Ph,Ty;function mE(){if(Ty)return Ph;Ty=1;function n(t,e,r){var h=-1,f=t.length;e<0&&(e=-e>f?0:f+e),r=r>f?f:r,r<0&&(r+=f),f=e>r?0:r-e>>>0,e>>>=0;for(var g=Array(f);++h<f;)g[h]=t[h+e];return g}return Ph=n,Ph}var Fh,My;function vE(){if(My)return Fh;My=1;var n=mE();function t(e,r,h){var f=e.length;return h=h===void 0?f:h,!r&&h>=f?e:n(e,r,h)}return Fh=t,Fh}var zh,Iy;function Ly(){if(Iy)return zh;Iy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=t+e+r,f="\\ufe0e\\ufe0f",g="\\u200d",y=RegExp("["+g+n+h+f+"]");function c(d){return y.test(d)}return zh=c,zh}var Bh,Oy;function yE(){if(Oy)return Bh;Oy=1;function n(t){return t.split("")}return Bh=n,Bh}var Wh,Ny;function bE(){if(Ny)return Wh;Ny=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=t+e+r,f="\\ufe0e\\ufe0f",g="["+n+"]",y="["+h+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+y+"|"+c+")",i="[^"+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",o=d+"?",s="["+f+"]?",m="(?:"+p+"(?:"+[i,l,u].join("|")+")"+s+o+")*",w=s+o+m,x="(?:"+[i+y+"?",y,l,u,g].join("|")+")",R=RegExp(c+"(?="+c+")|"+x+w,"g");function $(k){return k.match(R)||[]}return Wh=$,Wh}var jh,Dy;function wE(){if(Dy)return jh;Dy=1;var n=yE(),t=Ly(),e=bE();function r(h){return t(h)?e(h):n(h)}return jh=r,jh}var Hh,Py;function xE(){if(Py)return Hh;Py=1;var n=typeof Go=="object"&&Go&&Go.Object===Object&&Go;return Hh=n,Hh}var Uh,Fy;function CE(){if(Fy)return Uh;Fy=1;var n=xE(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Uh=e,Uh}var Vh,zy;function Gh(){if(zy)return Vh;zy=1;var n=CE(),t=n.Symbol;return Vh=t,Vh}var qh,By;function _E(){if(By)return qh;By=1;function n(t,e){for(var r=-1,h=t==null?0:t.length,f=Array(h);++r<h;)f[r]=e(t[r],r,t);return f}return qh=n,qh}var Yh,Wy;function kE(){if(Wy)return Yh;Wy=1;var n=Array.isArray;return Yh=n,Yh}var Kh,jy;function AE(){if(jy)return Kh;jy=1;var n=Gh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,h=n?n.toStringTag:void 0;function f(g){var y=e.call(g,h),c=g[h];try{g[h]=void 0;var d=!0}catch{}var i=r.call(g);return d&&(y?g[h]=c:delete g[h]),i}return Kh=f,Kh}var Xh,Hy;function SE(){if(Hy)return Xh;Hy=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return Xh=e,Xh}var Jh,Uy;function $E(){if(Uy)return Jh;Uy=1;var n=Gh(),t=AE(),e=SE(),r="[object Null]",h="[object Undefined]",f=n?n.toStringTag:void 0;function g(y){return y==null?y===void 0?h:r:f&&f in Object(y)?t(y):e(y)}return Jh=g,Jh}var Zh,Vy;function EE(){if(Vy)return Zh;Vy=1;function n(t){return t!=null&&typeof t=="object"}return Zh=n,Zh}var Qh,Gy;function RE(){if(Gy)return Qh;Gy=1;var n=$E(),t=EE(),e="[object Symbol]";function r(h){return typeof h=="symbol"||t(h)&&n(h)==e}return Qh=r,Qh}var ed,qy;function TE(){if(qy)return ed;qy=1;var n=Gh(),t=_E(),e=kE(),r=RE(),h=n?n.prototype:void 0,f=h?h.toString:void 0;function g(y){if(typeof y=="string")return y;if(e(y))return t(y,g)+"";if(r(y))return f?f.call(y):"";var c=y+"";return c=="0"&&1/y==-1/0?"-0":c}return ed=g,ed}var td,Yy;function bc(){if(Yy)return td;Yy=1;var n=TE();function t(e){return e==null?"":n(e)}return td=t,td}var nd,Ky;function ME(){if(Ky)return nd;Ky=1;var n=vE(),t=Ly(),e=wE(),r=bc();function h(f){return function(g){g=r(g);var y=t(g)?e(g):void 0,c=y?y[0]:g.charAt(0),d=y?n(y,1).join(""):g.slice(1);return c[f]()+d}}return nd=h,nd}var rd,Xy;function Jy(){if(Xy)return rd;Xy=1;var n=ME(),t=n("toUpperCase");return rd=t,rd}var IE=Jy();const LE=nc(IE);var id,Zy;function OE(){if(Zy)return id;Zy=1;var n=bc(),t=Jy();function e(r){return t(n(r).toLowerCase())}return id=e,id}var od,Qy;function NE(){if(Qy)return od;Qy=1;function n(t,e,r,h){var f=-1,g=t==null?0:t.length;for(h&&g&&(r=t[++f]);++f<g;)r=e(r,t[f],f,t);return r}return od=n,od}var sd,e0;function DE(){if(e0)return sd;e0=1;function n(t){return function(e){return t?.[e]}}return sd=n,sd}var ad,t0;function PE(){if(t0)return ad;t0=1;var n=DE(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return ad=e,ad}var ld,n0;function FE(){if(n0)return ld;n0=1;var n=PE(),t=bc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",h="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",g=r+h+f,y="["+g+"]",c=RegExp(y,"g");function d(i){return i=t(i),i&&i.replace(e,n).replace(c,"")}return ld=d,ld}var cd,r0;function zE(){if(r0)return cd;r0=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return cd=t,cd}var ud,i0;function BE(){if(i0)return ud;i0=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return ud=t,ud}var hd,o0;function WE(){if(o0)return hd;o0=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=t+e+r,f="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",y="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",i=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",p=y+c+d+i,o="['’]",s="["+p+"]",m="["+h+"]",w="\\d+",x="["+f+"]",R="["+g+"]",$="[^"+n+p+w+f+g+l+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",O="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+l+"]",W="\\u200d",F="(?:"+R+"|"+$+")",D="(?:"+I+"|"+$+")",A="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",M=C+"?",B="["+u+"]?",j="(?:"+W+"(?:"+[O,N,L].join("|")+")"+B+M+")*",V="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",K="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",J=B+M+j,oe="(?:"+[x,N,L].join("|")+")"+J,ee=RegExp([I+"?"+R+"+"+A+"(?="+[s,I,"$"].join("|")+")",D+"+"+_+"(?="+[s,I+F,"$"].join("|")+")",I+"?"+F+"+"+A,I+"+"+_,K,V,w,oe].join("|"),"g");function se(ce){return ce.match(ee)||[]}return hd=se,hd}var dd,s0;function jE(){if(s0)return dd;s0=1;var n=zE(),t=BE(),e=bc(),r=WE();function h(f,g,y){return f=e(f),g=y?void 0:g,g===void 0?t(f)?r(f):n(f):f.match(g)||[]}return dd=h,dd}var fd,a0;function HE(){if(a0)return fd;a0=1;var n=NE(),t=FE(),e=jE(),r="['’]",h=RegExp(r,"g");function f(g){return function(y){return n(e(t(y).replace(h,"")),g,"")}}return fd=f,fd}var pd,l0;function UE(){if(l0)return pd;l0=1;var n=OE(),t=HE(),e=t(function(r,h,f){return h=h.toLowerCase(),r+(f?n(h):h)});return pd=e,pd}var VE=UE();const GE=nc(VE),qE=Object.assign({"./ArrayWidget.vue":()=>et(()=>Qe.import("./ArrayWidget-CcQFJGCA-c1e313dd26dacdcca369.js"),void 0),"./ArrayplotWidget.vue":()=>et(()=>Qe.import("./ArrayplotWidget-DGJEXAY0-5973f039c77b3ba446cb.js"),void 0),"./BlockWidget.vue":()=>et(()=>Qe.import("./BlockWidget-BHtugveV-1cab136df7dbe1306618.js"),void 0),"./ButtonWidget.vue":()=>et(()=>Qe.import("./ButtonWidget-Cc9cYsg8-76799976508952c2794c.js"),void 0),"./CanvasWidget.vue":()=>et(()=>Qe.import("./CanvasWidget-Bn70gBcc-1f45b874237dce369747.js"),void 0),"./CanvasdotWidget.vue":()=>et(()=>Qe.import("./CanvasdotWidget-CMROfW3O-0d78913e6b2e8de60b20.js"),void 0),"./CanvasimageWidget.vue":()=>et(()=>Qe.import("./CanvasimageWidget-BpM05v_m-3e2ced79b65869951a35.js"),void 0),"./CanvasimagevalueWidget.vue":()=>et(()=>Qe.import("./CanvasimagevalueWidget-E6G93iGc-a1517cc5078a6195d110.js"),void 0),"./CanvaslabelWidget.vue":()=>et(()=>Qe.import("./CanvaslabelWidget-C074R2Fy-ba9bf286d8c1c178d2e9.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>et(()=>Qe.import("./CanvaslabelvalueWidget-B0nJeS4X-998aa3aefcc9a53fdb57.js"),void 0),"./CanvaslineWidget.vue":()=>et(()=>Qe.import("./CanvaslineWidget-CxnNAqOX-b28d8c979cff5863f6f9.js"),void 0),"./CanvaslinevalueWidget.vue":()=>et(()=>Qe.import("./CanvaslinevalueWidget-BwfFyCwH-78ca2cef2a5352724add.js"),void 0),"./CheckbuttonWidget.vue":()=>et(()=>Qe.import("./CheckbuttonWidget-yAm10oX0-3b8cd481bd50c23db7ea.js"),void 0),"./ComboboxWidget.vue":()=>et(()=>Qe.import("./ComboboxWidget-BnWksnnp-e0acb306b760add01fd9.js"),void 0),"./DateWidget.vue":()=>et(()=>Qe.import("./DateWidget-CAiG2FIl-e83f3c8fa86a4cb63c08.js"),void 0),"./DynamicWidget.vue":()=>et(()=>Qe.import("./DynamicWidget-BuSbQVhf-3a901a22b32b0908e511.js"),void 0),"./FilechecksumWidget.vue":()=>et(()=>Qe.import("./FilechecksumWidget-DeW9wy5d-ad4a15110a5eb00418bc.js"),void 0),"./FiledisplayWidget.vue":()=>et(()=>Qe.import("./FiledisplayWidget-C_zPFu2E-58a35735cd3b6d9bb251.js"),void 0),"./FormatvalueWidget.vue":()=>et(()=>Qe.import("./FormatvalueWidget-BrvPWwfN-40beb2cd8bc9081eb881.js"),void 0),"./HorizontalWidget.vue":()=>et(()=>Qe.import("./HorizontalWidget-cFSsdChw-9e8be5a4c341c9e2a48d.js"),void 0),"./HorizontalboxWidget.vue":()=>et(()=>Qe.import("./HorizontalboxWidget-CKA7rLGd-3f41a44400ea46dcf39e.js"),void 0),"./HorizontallineWidget.vue":()=>et(()=>Qe.import("./HorizontallineWidget-BqbLK0zc-5f28e518ef775ecc7983.js"),void 0),"./IframeWidget.vue":()=>et(()=>Qe.import("./IframeWidget-CITX8Es1-d2843bef19564e161e74.js"),void 0),"./ImageviewerWidget.vue":()=>et(()=>Qe.import("./ImageviewerWidget-BIsSA7KD-fb7deb592ddaf77428d9.js"),void 0),"./LabelWidget.vue":()=>et(()=>Qe.import("./LabelWidget-FQI-cH_A-8f8bc1c1f7df473ba1c7.js"),void 0),"./LabelledWidget.vue":()=>et(()=>Qe.import("./LabelledWidget-KGXtQ4Zb-ac56cd3791054c971526.js"),void 0),"./LabelprogressbarWidget.vue":()=>et(()=>Qe.import("./LabelprogressbarWidget-72WyzD_Q-d713e91f3bc4d5e9bb86.js"),void 0),"./LabelsparklineWidget.vue":()=>et(()=>Qe.import("./LabelsparklineWidget-DtWNf4mK-e571c4c30dd5e6600e2d.js"),void 0),"./LabelvalueWidget.vue":()=>et(()=>Qe.import("./LabelvalueWidget-D_JLdY7r-d8b0113b840e1d424218.js"),void 0),"./LabelvaluedescWidget.vue":()=>et(()=>Qe.import("./LabelvaluedescWidget-BppM5vGp-60d49f07e899e6190fc8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>et(()=>Qe.import("./LabelvaluelimitsbarWidget-B69ogLif-1b72fbb67e4bbf4e944c.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>et(()=>Qe.import("./LabelvaluelimitscolumnWidget-DPYwFdgq-39778adddee40bf5323b.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>et(()=>Qe.import("./LabelvaluerangebarWidget-BT0BcOoK-c8faf743155ec6a952be.js"),void 0),"./LedWidget.vue":()=>et(()=>Qe.import("./LedWidget-Cmr6eVG2-0629e1460c7ccffb594b.js"),void 0),"./LimitsbarWidget.vue":()=>et(()=>Qe.import("./LimitsbarWidget-CMvcwa-m-0713ea3e20a6e70ea995.js"),void 0),"./LimitscolorWidget.vue":()=>et(()=>Qe.import("./LimitscolorWidget-CZ9wMtcI-b6559956fcf07908552b.js"),void 0),"./LimitscolumnWidget.vue":()=>et(()=>Qe.import("./LimitscolumnWidget-r84KJGU--ad41610e4bf266f348a5.js"),void 0),"./LinegraphWidget.vue":()=>et(()=>Qe.import("./LinegraphWidget-COGBGOjF-cc12f6b529350d7e1e43.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>et(()=>Qe.import("./MatrixbycolumnsWidget-Dx2iz0YF-6f5b9d26b3678f3200c4.js"),void 0),"./ProgressbarWidget.vue":()=>et(()=>Qe.import("./ProgressbarWidget-DPbAVjdC-fe70c4f878b34c21a297.js"),void 0),"./RadiobuttonWidget.vue":()=>et(()=>Qe.import("./RadiobuttonWidget-iXI9yCDk-b46058fb3a6703e141c3.js"),void 0),"./RadiogroupWidget.vue":()=>et(()=>Qe.import("./RadiogroupWidget-CMM_p1eA-ab34167d8d07579889eb.js"),void 0),"./RangebarWidget.vue":()=>et(()=>Qe.import("./RangebarWidget-DJXGUHAc-22969b9af0d9fc81fb0a.js"),void 0),"./RollupWidget.vue":()=>et(()=>Qe.import("./RollupWidget-BbWLSsTT-3ff00735fdd5975e73d6.js"),void 0),"./ScrollwindowWidget.vue":()=>et(()=>Qe.import("./ScrollwindowWidget-Dxhp7yKn-212c665370260983c033.js"),void 0),"./SignalWidget.vue":()=>et(()=>Qe.import("./SignalWidget-65q0tiuo-449ea3f3201cd3be57fc.js"),void 0),"./SpacerWidget.vue":()=>et(()=>Qe.import("./SpacerWidget-DFzbojmX-b949b9bd454547dd5c32.js"),void 0),"./SparklineWidget.vue":()=>et(()=>Qe.import("./SparklineWidget-Bu4I8zY0-bd2a64c423f945d2b719.js"),void 0),"./TabbookWidget.vue":()=>et(()=>Qe.import("./TabbookWidget-CELMWyx7-389bde713eda9ce6ec21.js"),void 0),"./TextboxWidget.vue":()=>et(()=>Qe.import("./TextboxWidget-DYsqXntS-b8ed82dfb3407b1b3ded.js"),void 0),"./TextfieldWidget.vue":()=>et(()=>Qe.import("./TextfieldWidget-BIUgV9Q4-c9b84219519a6b225ba9.js"),void 0),"./TimeWidget.vue":()=>et(()=>Qe.import("./TimeWidget-BPXcY1Wy-ba8743a763af51255bd9.js"),void 0),"./TitleWidget.vue":()=>et(()=>Qe.import("./TitleWidget-DJ9mHRLE-7e3251bb102d37f0fc2d.js"),void 0),"./ValueWidget.vue":()=>et(()=>Qe.import("./ValueWidget-DzOSy7lp-e35ee45ffa2bd853bbcb.js"),void 0),"./ValuelimitsbarWidget.vue":()=>et(()=>Qe.import("./ValuelimitsbarWidget-D5dSlW6D-8d8036cefd6d2b014d73.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>et(()=>Qe.import("./ValuelimitscolumnWidget-7DXCsVW_-54ad4c81e5c324d8a098.js"),void 0),"./ValuerangebarWidget.vue":()=>et(()=>Qe.import("./ValuerangebarWidget-BWjnpmyy-2e43d6b213fdd9d6500d.js"),void 0),"./VerticalWidget.vue":()=>et(()=>Qe.import("./VerticalWidget-BOtXAhxt-f42425fb37f426b0e3b7.js"),void 0),"./VerticalboxWidget.vue":()=>et(()=>Qe.import("./VerticalboxWidget-RAsXfGdI-99f7d03eb06c4352f752.js"),void 0)}),YE=Object.entries(qE).reduce((n,[t,e])=>{t=t.split("/").pop();const r=LE(GE(t.replace(/\.\w+$/,"")));return{...n,[r]:Vp(e)}},{}),zz=Tn("w",{components:YE}),c0="openc3-ace-vim-mode-enabled",gd="ace/keyboard/vim",u0="openc3-ace-default-scripting-language",wc=Tn("Z",{isVimModeEnabled(){return localStorage.getItem(c0)==="true"},setVimMode(n){localStorage.setItem(c0,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(gd),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:t}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(gd),ace.config.loadModule(gd,e=>{e.CodeMirror.Vim.defineEx("write","w",r=>{typeof t=="function"?t():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(u0)||"python"},setDefaultScriptingLanguage(n){(n==="ruby"||n==="python")&&localStorage.setItem(u0,n)}}),KE={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(n,{emit:t}){const e=t,r=qp(!1);function h(){r.value=!1}function f(g){return g.replaceAll(" ","-").toLowerCase()}return(g,y)=>{const c=Ue("v-icon"),d=Ue("v-btn"),i=Ue("v-divider"),l=Ue("v-list-item-title"),u=Ue("v-list-item"),p=Ue("v-list"),o=Ue("v-menu"),s=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return nt(),Pt(o,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=R=>r.value=R),"close-on-content-click":!1},{activator:ze(({props:R})=>[We(d,Wa(R,{variant:"outlined",class:"mx-1 menu-button",text:n.menu.label,"data-test":f(`${n.title} ${n.menu.label}`)}),{append:ze(()=>[We(c,{class:"menu-button-icon"},{default:ze(()=>[...y[1]||(y[1]=[Lt(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:ze(()=>[We(p,null,{default:ze(()=>[(nt(!0),nn(ii,null,ho(n.menu.items,(R,$)=>(nt(),nn(ii,null,[R.divider?(nt(),Pt(i,{key:$+"-divider"})):R.subMenu&&R.subMenu.length>0?(nt(),nn("div",{key:$+"-submenu"},[(nt(),Pt(o,{key:$,"open-on-hover":"",location:"right"},{activator:ze(({props:k})=>[(nt(),Pt(u,Wa({ref_for:!0},k,{key:$,disabled:R.disabled}),Tu({append:ze(()=>[We(c,null,{default:ze(()=>[...y[2]||(y[2]=[Lt(" mdi-chevron-right ",-1)])]),_:1})]),default:ze(()=>[!R.radio&&!R.checkbox?(nt(),Pt(l,{key:0,style:ls("cursor: pointer;"+(R.disabled?"opacity: 0.2":""))},{default:ze(()=>[Lt(gn(R.label),1)]),_:2},1032,["style"])):Hr("",!0)]),_:2},[R.icon?{name:"prepend",fn:ze(()=>[We(c,{disabled:R.disabled},{default:ze(()=>[Lt(gn(R.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:ze(()=>[We(p,null,{default:ze(()=>[(nt(!0),nn(ii,null,ho(R.subMenu,(k,C)=>(nt(),Pt(u,{key:C,"prepend-icon":k.icon,onClick:O=>e("submenu-click",k)},{default:ze(()=>[We(l,null,{default:ze(()=>[Lt(gn(k.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):R.radioGroup?(nt(),Pt(w,{key:$+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":R.value,"onUpdate:modelValue":R.command},{default:ze(()=>[(nt(!0),nn(ii,null,ho(R.choices,(k,C)=>(nt(),Pt(u,{key:C+"-choice"},{default:ze(()=>[We(m,{class:"list-action"},{default:ze(()=>[We(s,{color:"secondary",label:k.label,value:k.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(nt(),Pt(u,{key:$+"-list",disabled:R.disabled,"data-test":f(`${n.title} ${n.menu.label} ${R.label}`),onClick:()=>{R.command(R),R.checkbox||h()}},Tu({default:ze(()=>[R.checkbox?(nt(),Pt(m,{key:0,class:"list-action"},{default:ze(()=>[We(x,{modelValue:R.checked,"onUpdate:modelValue":k=>R.checked=k,label:R.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Hr("",!0),!R.radio&&!R.checkbox?(nt(),Pt(l,{key:1,style:ls("cursor: pointer;"+(R.disabled?"opacity: 0.2":""))},{default:ze(()=>[Lt(gn(R.label),1)]),_:2},1032,["style"])):Hr("",!0)]),_:2},[R.icon?{name:"prepend",fn:ze(()=>[We(c,{icon:R.icon,disabled:R.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},XE={components:{TopBarMenu:KE},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}}},JE={class:"app-title mr-2"};function ZE(n,t,e,r,h,f){const g=Ue("v-col"),y=Ue("v-row"),c=Ue("TopBarMenu");return nt(),Pt(Gp,{to:"#openc3-menu"},[We(y,{"no-gutters":""},{default:ze(()=>[We(g,{"align-self":"end"},{default:ze(()=>[qn("span",JE,gn(e.title),1)]),_:1})]),_:1}),We(y,{dense:"",class:"flex-nowrap"},{default:ze(()=>[(nt(!0),nn(ii,null,ho(e.menus,(d,i)=>(nt(),Pt(c,{key:i+"-top-menu",ref_for:!0,ref:"topmenu",menu:d,title:e.title,onSubmenuClick:f.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const QE=qi(XE,[["render",ZE],["__scopeId","data-v-f4fb184e"]]);function h0(n,t){return function(){return n.apply(t,arguments)}}const{toString:eR}=Object.prototype,{getPrototypeOf:xc}=Object,{iterator:Cc,toStringTag:d0}=Symbol,_c=(n=>t=>{const e=eR.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Qi=n=>(n=n.toLowerCase(),t=>_c(t)===n),kc=n=>t=>typeof t===n,{isArray:ga}=Array,ma=kc("undefined");function ul(n){return n!==null&&!ma(n)&&n.constructor!==null&&!ma(n.constructor)&&ai(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const f0=Qi("ArrayBuffer");function tR(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&f0(n.buffer),t}const nR=kc("string"),ai=kc("function"),p0=kc("number"),hl=n=>n!==null&&typeof n=="object",rR=n=>n===!0||n===!1,Ac=n=>{if(_c(n)!=="object")return!1;const t=xc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(d0 in n)&&!(Cc in n)},iR=n=>{if(!hl(n)||ul(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},oR=Qi("Date"),sR=Qi("File"),aR=n=>!!(n&&typeof n.uri<"u"),lR=n=>n&&typeof n.getParts<"u",cR=Qi("Blob"),uR=Qi("FileList"),hR=n=>hl(n)&&ai(n.pipe);function dR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const g0=dR(),m0=typeof g0.FormData<"u"?g0.FormData:void 0,fR=n=>{if(!n)return!1;if(m0&&n instanceof m0)return!0;const t=xc(n);if(!t||t===Object.prototype||!ai(n.append))return!1;const e=_c(n);return e==="formdata"||e==="object"&&ai(n.toString)&&n.toString()==="[object FormData]"},pR=Qi("URLSearchParams"),[gR,mR,vR,yR]=["ReadableStream","Request","Response","Headers"].map(Qi),bR=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function dl(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,h;if(typeof n!="object"&&(n=[n]),ga(n))for(r=0,h=n.length;r<h;r++)t.call(null,n[r],r,n);else{if(ul(n))return;const f=e?Object.getOwnPropertyNames(n):Object.keys(n),g=f.length;let y;for(r=0;r<g;r++)y=f[r],t.call(null,n[y],y,n)}}function v0(n,t){if(ul(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,h;for(;r-- >0;)if(h=e[r],t===h.toLowerCase())return h;return null}const As=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,y0=n=>!ma(n)&&n!==As;function md(){const{caseless:n,skipUndefined:t}=y0(this)&&this||{},e={},r=(h,f)=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const g=n&&v0(e,f)||f;Ac(e[g])&&Ac(h)?e[g]=md(e[g],h):Ac(h)?e[g]=md({},h):ga(h)?e[g]=h.slice():(!t||!ma(h))&&(e[g]=h)};for(let h=0,f=arguments.length;h<f;h++)arguments[h]&&dl(arguments[h],r);return e}const wR=(n,t,e,{allOwnKeys:r}={})=>(dl(t,(h,f)=>{e&&ai(h)?Object.defineProperty(n,f,{value:h0(h,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,f,{value:h,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),xR=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),CR=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},_R=(n,t,e,r)=>{let h,f,g;const y={};if(t=t||{},n==null)return t;do{for(h=Object.getOwnPropertyNames(n),f=h.length;f-- >0;)g=h[f],(!r||r(g,n,t))&&!y[g]&&(t[g]=n[g],y[g]=!0);n=e!==!1&&xc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},kR=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},AR=n=>{if(!n)return null;if(ga(n))return n;let t=n.length;if(!p0(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},SR=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&xc(Uint8Array)),$R=(n,t)=>{const e=(n&&n[Cc]).call(n);let r;for(;(r=e.next())&&!r.done;){const h=r.value;t.call(n,h[0],h[1])}},ER=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},RR=Qi("HTMLFormElement"),TR=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),b0=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),MR=Qi("RegExp"),w0=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};dl(e,(h,f)=>{let g;(g=t(h,f,n))!==!1&&(r[f]=g||h)}),Object.defineProperties(n,r)},IR=n=>{w0(n,(t,e)=>{if(ai(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(ai(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},LR=(n,t)=>{const e={},r=h=>{h.forEach(f=>{e[f]=!0})};return ga(n)?r(n):r(String(n).split(t)),e},OR=()=>{},NR=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function DR(n){return!!(n&&ai(n.append)&&n[d0]==="FormData"&&n[Cc])}const PR=n=>{const t=new Array(10),e=(r,h)=>{if(hl(r)){if(t.indexOf(r)>=0)return;if(ul(r))return r;if(!("toJSON"in r)){t[h]=r;const f=ga(r)?[]:{};return dl(r,(g,y)=>{const c=e(g,h+1);!ma(c)&&(f[y]=c)}),t[h]=void 0,f}}return r};return e(n,0)},FR=Qi("AsyncFunction"),zR=n=>n&&(hl(n)||ai(n))&&ai(n.then)&&ai(n.catch),x0=((n,t)=>n?setImmediate:t?((e,r)=>(As.addEventListener("message",({source:h,data:f})=>{h===As&&f===e&&r.length&&r.shift()()},!1),h=>{r.push(h),As.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ai(As.postMessage)),BR=typeof queueMicrotask<"u"?queueMicrotask.bind(As):typeof process<"u"&&process.nextTick||x0,WR=n=>n!=null&&ai(n[Cc]),Ae={isArray:ga,isArrayBuffer:f0,isBuffer:ul,isFormData:fR,isArrayBufferView:tR,isString:nR,isNumber:p0,isBoolean:rR,isObject:hl,isPlainObject:Ac,isEmptyObject:iR,isReadableStream:gR,isRequest:mR,isResponse:vR,isHeaders:yR,isUndefined:ma,isDate:oR,isFile:sR,isReactNativeBlob:aR,isReactNative:lR,isBlob:cR,isRegExp:MR,isFunction:ai,isStream:hR,isURLSearchParams:pR,isTypedArray:SR,isFileList:uR,forEach:dl,merge:md,extend:wR,trim:bR,stripBOM:xR,inherits:CR,toFlatObject:_R,kindOf:_c,kindOfTest:Qi,endsWith:kR,toArray:AR,forEachEntry:$R,matchAll:ER,isHTMLForm:RR,hasOwnProperty:b0,hasOwnProp:b0,reduceDescriptors:w0,freezeMethods:IR,toObjectSet:LR,toCamelCase:TR,noop:OR,toFiniteNumber:NR,findKey:v0,global:As,isContextDefined:y0,isSpecCompliantForm:DR,toJSONObject:PR,isAsyncFn:FR,isThenable:zR,setImmediate:x0,asap:BR,isIterable:WR};let yt=class Vx extends Error{static from(t,e,r,h,f,g){const y=new Vx(t.message,e||t.code,r,h,f);return y.cause=t,y.name=t.name,t.status!=null&&y.status==null&&(y.status=t.status),g&&Object.assign(y,g),y}constructor(t,e,r,h,f){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),h&&(this.request=h),f&&(this.response=f,this.status=f.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}};yt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",yt.ERR_BAD_OPTION="ERR_BAD_OPTION",yt.ECONNABORTED="ECONNABORTED",yt.ETIMEDOUT="ETIMEDOUT",yt.ERR_NETWORK="ERR_NETWORK",yt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",yt.ERR_DEPRECATED="ERR_DEPRECATED",yt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",yt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",yt.ERR_CANCELED="ERR_CANCELED",yt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",yt.ERR_INVALID_URL="ERR_INVALID_URL",yt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const jR=null;function vd(n){return Ae.isPlainObject(n)||Ae.isArray(n)}function C0(n){return Ae.endsWith(n,"[]")?n.slice(0,-2):n}function yd(n,t,e){return n?n.concat(t).map(function(r,h){return r=C0(r),!e&&h?"["+r+"]":r}).join(e?".":""):t}function HR(n){return Ae.isArray(n)&&!n.some(vd)}const UR=Ae.toFlatObject(Ae,{},null,function(n){return/^is[A-Z]/.test(n)});function Sc(n,t,e){if(!Ae.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Ae.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(s,m){return!Ae.isUndefined(m[s])});const r=e.metaTokens,h=e.visitor||l,f=e.dots,g=e.indexes,y=e.Blob||typeof Blob<"u"&&Blob,c=e.maxDepth===void 0?100:e.maxDepth,d=y&&Ae.isSpecCompliantForm(t);if(!Ae.isFunction(h))throw new TypeError("visitor must be a function");function i(s){if(s===null)return"";if(Ae.isDate(s))return s.toISOString();if(Ae.isBoolean(s))return s.toString();if(!d&&Ae.isBlob(s))throw new yt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(s)||Ae.isTypedArray(s)?d&&typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function l(s,m,w){let x=s;if(Ae.isReactNative(t)&&Ae.isReactNativeBlob(s))return t.append(yd(w,m,f),i(s)),!1;if(s&&!w&&typeof s=="object"){if(Ae.endsWith(m,"{}"))m=r?m:m.slice(0,-2),s=JSON.stringify(s);else if(Ae.isArray(s)&&HR(s)||(Ae.isFileList(s)||Ae.endsWith(m,"[]"))&&(x=Ae.toArray(s)))return m=C0(m),x.forEach(function(R,$){!(Ae.isUndefined(R)||R===null)&&t.append(g===!0?yd([m],$,f):g===null?m:m+"[]",i(R))}),!1}return vd(s)?!0:(t.append(yd(w,m,f),i(s)),!1)}const u=[],p=Object.assign(UR,{defaultVisitor:l,convertValue:i,isVisitable:vd});function o(s,m,w=0){if(!Ae.isUndefined(s)){if(w>c)throw new yt("Object is too deeply nested ("+w+" levels). Max depth: "+c,yt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(u.indexOf(s)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(s),Ae.forEach(s,function(x,R){(!(Ae.isUndefined(x)||x===null)&&h.call(t,x,Ae.isString(R)?R.trim():R,m,p))===!0&&o(x,m?m.concat(R):[R],w+1)}),u.pop()}}if(!Ae.isObject(n))throw new TypeError("data must be an object");return o(n),t}function _0(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function bd(n,t){this._pairs=[],n&&Sc(n,this,t)}const k0=bd.prototype;k0.append=function(n,t){this._pairs.push([n,t])},k0.toString=function(n){const t=n?function(e){return n.call(this,e,_0)}:_0;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function VR(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function A0(n,t,e){if(!t)return n;const r=e&&e.encode||VR,h=Ae.isFunction(e)?{serialize:e}:e,f=h&&h.serialize;let g;if(f?g=f(t,h):g=Ae.isURLSearchParams(t)?t.toString():new bd(t,h).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}let S0=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ae.forEach(this.handlers,function(e){e!==null&&t(e)})}};const wd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},GR=typeof URLSearchParams<"u"?URLSearchParams:bd,qR=typeof FormData<"u"?FormData:null,YR=typeof Blob<"u"?Blob:null,KR={isBrowser:!0,classes:{URLSearchParams:GR,FormData:qR,Blob:YR},protocols:["http","https","file","blob","url","data"]},xd=typeof window<"u"&&typeof document<"u",Cd=typeof navigator=="object"&&navigator||void 0,XR=xd&&(!Cd||["ReactNative","NativeScript","NS"].indexOf(Cd.product)<0),JR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ZR=xd&&window.location.href||"http://localhost",QR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xd,hasStandardBrowserEnv:XR,hasStandardBrowserWebWorkerEnv:JR,navigator:Cd,origin:ZR},Symbol.toStringTag,{value:"Module"})),Or={...QR,...KR};function eT(n,t){return Sc(n,new Or.classes.URLSearchParams,{visitor:function(e,r,h,f){return Or.isNode&&Ae.isBuffer(e)?(this.append(r,e.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...t})}function tT(n){return Ae.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nT(n){const t={},e=Object.keys(n);let r;const h=e.length;let f;for(r=0;r<h;r++)f=e[r],t[f]=n[f];return t}function $0(n){function t(e,r,h,f){let g=e[f++];if(g==="__proto__")return!0;const y=Number.isFinite(+g),c=f>=e.length;return g=!g&&Ae.isArray(h)?h.length:g,c?(Ae.hasOwnProp(h,g)?h[g]=Ae.isArray(h[g])?h[g].concat(r):[h[g],r]:h[g]=r,!y):((!h[g]||!Ae.isObject(h[g]))&&(h[g]=[]),t(e,r,h[g],f)&&Ae.isArray(h[g])&&(h[g]=nT(h[g])),!y)}if(Ae.isFormData(n)&&Ae.isFunction(n.entries)){const e={};return Ae.forEachEntry(n,(r,h)=>{t(tT(r),h,e,0)}),e}return null}const va=(n,t)=>n!=null&&Ae.hasOwnProp(n,t)?n[t]:void 0;function rT(n,t,e){if(Ae.isString(n))try{return(t||JSON.parse)(n),Ae.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const fl={transitional:wd,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,h=Ae.isObject(n);if(h&&Ae.isHTMLForm(n)&&(n=new FormData(n)),Ae.isFormData(n))return r?JSON.stringify($0(n)):n;if(Ae.isArrayBuffer(n)||Ae.isBuffer(n)||Ae.isStream(n)||Ae.isFile(n)||Ae.isBlob(n)||Ae.isReadableStream(n))return n;if(Ae.isArrayBufferView(n))return n.buffer;if(Ae.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let f;if(h){const g=va(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return eT(n,g).toString();if((f=Ae.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=va(this,"env"),c=y&&y.FormData;return Sc(f?{"files[]":n}:n,c&&new c,g)}}return h||r?(t.setContentType("application/json",!1),rT(n)):n}],transformResponse:[function(n){const t=va(this,"transitional")||fl.transitional,e=t&&t.forcedJSONParsing,r=va(this,"responseType"),h=r==="json";if(Ae.isResponse(n)||Ae.isReadableStream(n))return n;if(n&&Ae.isString(n)&&(e&&!r||h)){const f=!(t&&t.silentJSONParsing)&&h;try{return JSON.parse(n,va(this,"parseReviver"))}catch(g){if(f)throw g.name==="SyntaxError"?yt.from(g,yt.ERR_BAD_RESPONSE,this,null,va(this,"response")):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Or.classes.FormData,Blob:Or.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],n=>{fl.headers[n]={}});const iT=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oT=n=>{const t={};let e,r,h;return n&&n.split(`
|
|
1481
|
-
`).forEach(function(f){h=f.indexOf(":"),e=f.substring(0,h).trim().toLowerCase(),r=f.substring(h+1).trim(),!(!e||t[e]&&iT[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},E0=Symbol("internals"),sT=/[^\x09\x20-\x7E\x80-\xFF]/g;function aT(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}function pl(n){return n&&String(n).trim().toLowerCase()}function lT(n){return aT(n.replace(sT,""))}function $c(n){return n===!1||n==null?n:Ae.isArray(n)?n.map($c):lT(String(n))}function cT(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const uT=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function _d(n,t,e,r,h){if(Ae.isFunction(r))return r.call(this,t,e);if(h&&(t=e),!!Ae.isString(t)){if(Ae.isString(r))return t.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(t)}}function hT(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function dT(n,t){const e=Ae.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(h,f,g){return this[r].call(this,t,h,f,g)},configurable:!0})})}let li=class{constructor(t){t&&this.set(t)}set(t,e,r){const h=this;function f(y,c,d){const i=pl(c);if(!i)throw new Error("header name must be a non-empty string");const l=Ae.findKey(h,i);(!l||h[l]===void 0||d===!0||d===void 0&&h[l]!==!1)&&(h[l||c]=$c(y))}const g=(y,c)=>Ae.forEach(y,(d,i)=>f(d,i,c));if(Ae.isPlainObject(t)||t instanceof this.constructor)g(t,e);else if(Ae.isString(t)&&(t=t.trim())&&!uT(t))g(oT(t),e);else if(Ae.isObject(t)&&Ae.isIterable(t)){let y={},c,d;for(const i of t){if(!Ae.isArray(i))throw TypeError("Object iterator must return a key-value pair");y[d=i[0]]=(c=y[d])?Ae.isArray(c)?[...c,i[1]]:[c,i[1]]:i[1]}g(y,e)}else t!=null&&f(e,t,r);return this}get(t,e){if(t=pl(t),t){const r=Ae.findKey(this,t);if(r){const h=this[r];if(!e)return h;if(e===!0)return cT(h);if(Ae.isFunction(e))return e.call(this,h,r);if(Ae.isRegExp(e))return e.exec(h);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=pl(t),t){const r=Ae.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||_d(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let h=!1;function f(g){if(g=pl(g),g){const y=Ae.findKey(r,g);y&&(!e||_d(r,r[y],y,e))&&(delete r[y],h=!0)}}return Ae.isArray(t)?t.forEach(f):f(t),h}clear(t){const e=Object.keys(this);let r=e.length,h=!1;for(;r--;){const f=e[r];(!t||_d(this,this[f],f,t,!0))&&(delete this[f],h=!0)}return h}normalize(t){const e=this,r={};return Ae.forEach(this,(h,f)=>{const g=Ae.findKey(r,f);if(g){e[g]=$c(h),delete e[f];return}const y=t?hT(f):String(f).trim();y!==f&&delete e[f],e[y]=$c(h),r[y]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ae.forEach(this,(r,h)=>{r!=null&&r!==!1&&(e[h]=t&&Ae.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
1482
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(h=>r.set(h)),r}static accessor(t){const e=(this[E0]=this[E0]={accessors:{}}).accessors,r=this.prototype;function h(f){const g=pl(f);e[g]||(dT(r,f),e[g]=!0)}return Ae.isArray(t)?t.forEach(h):h(t),this}};li.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(li.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ae.freezeMethods(li);function kd(n,t){const e=this||fl,r=t||e,h=li.from(r.headers);let f=r.data;return Ae.forEach(n,function(g){f=g.call(e,f,h.normalize(),t?t.status:void 0)}),h.normalize(),f}function R0(n){return!!(n&&n.__CANCEL__)}let gl=class extends yt{constructor(t,e,r){super(t??"canceled",yt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function T0(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new yt("Request failed with status code "+e.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function fT(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function pT(n,t){n=n||10;const e=new Array(n),r=new Array(n);let h=0,f=0,g;return t=t!==void 0?t:1e3,function(y){const c=Date.now(),d=r[f];g||(g=c),e[h]=y,r[h]=c;let i=f,l=0;for(;i!==h;)l+=e[i++],i=i%n;if(h=(h+1)%n,h===f&&(f=(f+1)%n),c-g<t)return;const u=d&&c-d;return u?Math.round(l*1e3/u):void 0}}function gT(n,t){let e=0,r=1e3/t,h,f;const g=(y,c=Date.now())=>{e=c,h=null,f&&(clearTimeout(f),f=null),n(...y)};return[(...y)=>{const c=Date.now(),d=c-e;d>=r?g(y,c):(h=y,f||(f=setTimeout(()=>{f=null,g(h)},r-d)))},()=>h&&g(h)]}const Ec=(n,t,e=3)=>{let r=0;const h=pT(50,250);return gT(f=>{const g=f.loaded,y=f.lengthComputable?f.total:void 0,c=y!=null?Math.min(g,y):g,d=Math.max(0,c-r),i=h(d);r=Math.max(r,c);const l={loaded:c,total:y,progress:y?c/y:void 0,bytes:d,rate:i||void 0,estimated:i&&y?(y-c)/i:void 0,event:f,lengthComputable:y!=null,[t?"download":"upload"]:!0};n(l)},e)},M0=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},I0=n=>(...t)=>Ae.asap(()=>n(...t)),mT=Or.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Or.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Or.origin),Or.navigator&&/(msie|trident)/i.test(Or.navigator.userAgent)):()=>!0,vT=Or.hasStandardBrowserEnv?{write(n,t,e,r,h,f,g){if(typeof document>"u")return;const y=[`${n}=${encodeURIComponent(t)}`];Ae.isNumber(e)&&y.push(`expires=${new Date(e).toUTCString()}`),Ae.isString(r)&&y.push(`path=${r}`),Ae.isString(h)&&y.push(`domain=${h}`),f===!0&&y.push("secure"),Ae.isString(g)&&y.push(`SameSite=${g}`),document.cookie=y.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function yT(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function bT(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function L0(n,t,e){let r=!yT(t);return n&&(r||e===!1)?bT(n,t):t}const O0=n=>n instanceof li?{...n}:n;function Ss(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,i,l,u){return Ae.isPlainObject(d)&&Ae.isPlainObject(i)?Ae.merge.call({caseless:u},d,i):Ae.isPlainObject(i)?Ae.merge({},i):Ae.isArray(i)?i.slice():i}function h(d,i,l,u){if(Ae.isUndefined(i)){if(!Ae.isUndefined(d))return r(void 0,d,l,u)}else return r(d,i,l,u)}function f(d,i){if(!Ae.isUndefined(i))return r(void 0,i)}function g(d,i){if(Ae.isUndefined(i)){if(!Ae.isUndefined(d))return r(void 0,d)}else return r(void 0,i)}function y(d,i,l){if(Ae.hasOwnProp(t,l))return r(d,i);if(Ae.hasOwnProp(n,l))return r(void 0,d)}const c={url:f,method:f,data:f,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:y,headers:(d,i,l)=>h(O0(d),O0(i),l,!0)};return Ae.forEach(Object.keys({...n,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const i=Ae.hasOwnProp(c,d)?c[d]:h,l=Ae.hasOwnProp(n,d)?n[d]:void 0,u=Ae.hasOwnProp(t,d)?t[d]:void 0,p=i(l,u,d);Ae.isUndefined(p)&&i!==y||(e[d]=p)}),e}const N0=n=>{const t=Ss({},n),e=u=>Ae.hasOwnProp(t,u)?t[u]:void 0,r=e("data");let h=e("withXSRFToken");const f=e("xsrfHeaderName"),g=e("xsrfCookieName");let y=e("headers");const c=e("auth"),d=e("baseURL"),i=e("allowAbsoluteUrls"),l=e("url");if(t.headers=y=li.from(y),t.url=A0(L0(d,l,i),n.params,n.paramsSerializer),c&&y.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Ae.isFormData(r)){if(Or.hasStandardBrowserEnv||Or.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if(Ae.isFunction(r.getHeaders)){const u=r.getHeaders(),p=["content-type","content-length"];Object.entries(u).forEach(([o,s])=>{p.includes(o.toLowerCase())&&y.set(o,s)})}}if(Or.hasStandardBrowserEnv&&(Ae.isFunction(h)&&(h=h(t)),h===!0||h==null&&mT(t.url))){const u=f&&g&&vT.read(g);u&&y.set(f,u)}return t},wT=typeof XMLHttpRequest<"u",xT=wT&&function(n){return new Promise(function(t,e){const r=N0(n);let h=r.data;const f=li.from(r.headers).normalize();let{responseType:g,onUploadProgress:y,onDownloadProgress:c}=r,d,i,l,u,p;function o(){u&&u(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function m(){if(!s)return;const x=li.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),R={data:!g||g==="text"||g==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:n,request:s};T0(function($){t($),o()},function($){e($),o()},R),s=null}"onloadend"in s?s.onloadend=m:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(m)},s.onabort=function(){s&&(e(new yt("Request aborted",yt.ECONNABORTED,n,s)),s=null)},s.onerror=function(x){const R=x&&x.message?x.message:"Network Error",$=new yt(R,yt.ERR_NETWORK,n,s);$.event=x||null,e($),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||wd;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new yt(x,R.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,n,s)),s=null},h===void 0&&f.setContentType(null),"setRequestHeader"in s&&Ae.forEach(f.toJSON(),function(x,R){s.setRequestHeader(R,x)}),Ae.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),g&&g!=="json"&&(s.responseType=r.responseType),c&&([l,p]=Ec(c,!0),s.addEventListener("progress",l)),y&&s.upload&&([i,u]=Ec(y),s.upload.addEventListener("progress",i),s.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new gl(null,n,s):x),s.abort(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=fT(r.url);if(w&&Or.protocols.indexOf(w)===-1){e(new yt("Unsupported protocol "+w+":",yt.ERR_BAD_REQUEST,n));return}s.send(h||null)})},CT=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,h;const f=function(d){if(!h){h=!0,y();const i=d instanceof Error?d:this.reason;r.abort(i instanceof yt?i:new gl(i instanceof Error?i.message:i))}};let g=t&&setTimeout(()=>{g=null,f(new yt(`timeout of ${t}ms exceeded`,yt.ETIMEDOUT))},t);const y=()=>{n&&(g&&clearTimeout(g),g=null,n.forEach(d=>{d.unsubscribe?d.unsubscribe(f):d.removeEventListener("abort",f)}),n=null)};n.forEach(d=>d.addEventListener("abort",f));const{signal:c}=r;return c.unsubscribe=()=>Ae.asap(y),c}},_T=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,h;for(;r<e;)h=r+t,yield n.slice(r,h),r=h},kT=async function*(n,t){for await(const e of AT(n))yield*_T(e,t)},AT=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},D0=(n,t,e,r)=>{const h=kT(n,t);let f=0,g,y=c=>{g||(g=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:i}=await h.next();if(d){y(),c.close();return}let l=i.byteLength;if(e){let u=f+=l;e(u)}c.enqueue(new Uint8Array(i))}catch(d){throw y(d),d}},cancel(c){return y(c),h.return()}},{highWaterMark:2})},P0=64*1024,{isFunction:Rc}=Ae,ST=(({Request:n,Response:t})=>({Request:n,Response:t}))(Ae.global),{ReadableStream:F0,TextEncoder:z0}=Ae.global,B0=(n,...t)=>{try{return!!n(...t)}catch{return!1}},$T=n=>{n=Ae.merge.call({skipUndefined:!0},ST,n);const{fetch:t,Request:e,Response:r}=n,h=t?Rc(t):typeof fetch=="function",f=Rc(e),g=Rc(r);if(!h)return!1;const y=h&&Rc(F0),c=h&&(typeof z0=="function"?(o=>s=>o.encode(s))(new z0):async o=>new Uint8Array(await new e(o).arrayBuffer())),d=f&&y&&B0(()=>{let o=!1;const s=new e(Or.origin,{body:new F0,method:"POST",get duplex(){return o=!0,"half"}}),m=s.headers.has("Content-Type");return s.body!=null&&s.body.cancel(),o&&!m}),i=g&&y&&B0(()=>Ae.isReadableStream(new r("").body)),l={stream:i&&(o=>o.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!l[o]&&(l[o]=(s,m)=>{let w=s&&s[o];if(w)return w.call(s);throw new yt(`Response type '${o}' is not supported`,yt.ERR_NOT_SUPPORT,m)})});const u=async o=>{if(o==null)return 0;if(Ae.isBlob(o))return o.size;if(Ae.isSpecCompliantForm(o))return(await new e(Or.origin,{method:"POST",body:o}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(o)||Ae.isArrayBuffer(o))return o.byteLength;if(Ae.isURLSearchParams(o)&&(o=o+""),Ae.isString(o))return(await c(o)).byteLength},p=async(o,s)=>Ae.toFiniteNumber(o.getContentLength())??u(s);return async o=>{let{url:s,method:m,data:w,signal:x,cancelToken:R,timeout:$,onDownloadProgress:k,onUploadProgress:C,responseType:O,headers:N,withCredentials:L="same-origin",fetchOptions:I}=N0(o),W=t||fetch;O=O?(O+"").toLowerCase():"text";let F=CT([x,R&&R.toAbortSignal()],$),D=null;const A=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let _;try{if(C&&d&&m!=="get"&&m!=="head"&&(_=await p(N,w))!==0){let J=new e(s,{method:"POST",body:w,duplex:"half"}),oe;if(Ae.isFormData(w)&&(oe=J.headers.get("content-type"))&&N.setContentType(oe),J.body){const[ee,se]=M0(_,Ec(I0(C)));w=D0(J.body,P0,ee,se)}}Ae.isString(L)||(L=L?"include":"omit");const M=f&&"credentials"in e.prototype;if(Ae.isFormData(w)){const J=N.getContentType();J&&/^multipart\/form-data/i.test(J)&&!/boundary=/i.test(J)&&N.delete("content-type")}const B={...I,signal:F,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:M?L:void 0};D=f&&new e(s,B);let j=await(f?W(D,I):W(s,B));const V=i&&(O==="stream"||O==="response");if(i&&(k||V&&A)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=j[ce]});const oe=Ae.toFiniteNumber(j.headers.get("content-length")),[ee,se]=k&&M0(oe,Ec(I0(k),!0))||[];j=new r(D0(j.body,P0,ee,()=>{se&&se(),A&&A()}),J)}O=O||"text";let K=await l[Ae.findKey(l,O)||"text"](j,o);return!V&&A&&A(),await new Promise((J,oe)=>{T0(J,oe,{data:K,headers:li.from(j.headers),status:j.status,statusText:j.statusText,config:o,request:D})})}catch(M){throw A&&A(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new yt("Network Error",yt.ERR_NETWORK,o,D,M&&M.response),{cause:M.cause||M}):yt.from(M,M&&M.code,o,D,M&&M.response)}}},ET=new Map,W0=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:h}=t,f=[r,h,e];let g=f.length,y=g,c,d,i=ET;for(;y--;)c=f[y],d=i.get(c),d===void 0&&i.set(c,d=y?new Map:$T(t)),i=d;return d};W0();const Ad={http:jR,xhr:xT,fetch:{get:W0}};Ae.forEach(Ad,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const j0=n=>`- ${n}`,RT=n=>Ae.isFunction(n)||n===null||n===!1;function TT(n,t){n=Ae.isArray(n)?n:[n];const{length:e}=n;let r,h;const f={};for(let g=0;g<e;g++){r=n[g];let y;if(h=r,!RT(r)&&(h=Ad[(y=String(r)).toLowerCase()],h===void 0))throw new yt(`Unknown adapter '${y}'`);if(h&&(Ae.isFunction(h)||(h=h.get(t))))break;f[y||"#"+g]=h}if(!h){const g=Object.entries(f).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let y=e?g.length>1?`since :
|
|
1483
|
-
`+g.map(j0).join(`
|
|
1484
|
-
`):" "+j0(g[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return h}const H0={getAdapter:TT,adapters:Ad};function Sd(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new gl(null,n)}function U0(n){return Sd(n),n.headers=li.from(n.headers),n.data=kd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),H0.getAdapter(n.adapter||fl.adapter,n)(n).then(function(t){return Sd(n),t.data=kd.call(n,n.transformResponse,t),t.headers=li.from(t.headers),t},function(t){return R0(t)||(Sd(n),t&&t.response&&(t.response.data=kd.call(n,n.transformResponse,t.response),t.response.headers=li.from(t.response.headers))),Promise.reject(t)})}const V0="1.15.2",Tc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Tc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const G0={};Tc.transitional=function(n,t,e){function r(h,f){return"[Axios v"+V0+"] Transitional option '"+h+"'"+f+(e?". "+e:"")}return(h,f,g)=>{if(n===!1)throw new yt(r(f," has been removed"+(t?" in "+t:"")),yt.ERR_DEPRECATED);return t&&!G0[f]&&(G0[f]=!0,console.warn(r(f," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(h,f,g):!0}},Tc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function MT(n,t,e){if(typeof n!="object")throw new yt("options must be an object",yt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let h=r.length;for(;h-- >0;){const f=r[h],g=Object.prototype.hasOwnProperty.call(t,f)?t[f]:void 0;if(g){const y=n[f],c=y===void 0||g(y,f,n);if(c!==!0)throw new yt("option "+f+" must be "+c,yt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new yt("Unknown option "+f,yt.ERR_BAD_OPTION)}}const Mc={assertOptions:MT,validators:Tc},Ni=Mc.validators;let $s=class{constructor(t){this.defaults=t||{},this.interceptors={request:new S0,response:new S0}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let h={};Error.captureStackTrace?Error.captureStackTrace(h):h=new Error;const f=(()=>{if(!h.stack)return"";const g=h.stack.indexOf(`
|
|
1485
|
-
`);return g===-1?"":h.stack.slice(g+1)})();try{if(!r.stack)r.stack=f;else if(f){const g=f.indexOf(`
|
|
1486
|
-
`),y=g===-1?-1:f.indexOf(`
|
|
1487
|
-
`,g+1),c=y===-1?"":f.slice(y+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
1488
|
-
`+f)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ss(this.defaults,e);const{transitional:r,paramsSerializer:h,headers:f}=e;r!==void 0&&Mc.assertOptions(r,{silentJSONParsing:Ni.transitional(Ni.boolean),forcedJSONParsing:Ni.transitional(Ni.boolean),clarifyTimeoutError:Ni.transitional(Ni.boolean),legacyInterceptorReqResOrdering:Ni.transitional(Ni.boolean)},!1),h!=null&&(Ae.isFunction(h)?e.paramsSerializer={serialize:h}:Mc.assertOptions(h,{encode:Ni.function,serialize:Ni.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Mc.assertOptions(e,{baseUrl:Ni.spelling("baseURL"),withXsrfToken:Ni.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=f&&Ae.merge(f.common,f[e.method]);f&&Ae.forEach(["delete","get","head","post","put","patch","common"],o=>{delete f[o]}),e.headers=li.concat(g,f);const y=[];let c=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;c=c&&o.synchronous;const s=e.transitional||wd;s&&s.legacyInterceptorReqResOrdering?y.unshift(o.fulfilled,o.rejected):y.push(o.fulfilled,o.rejected)});const d=[];this.interceptors.response.forEach(function(o){d.push(o.fulfilled,o.rejected)});let i,l=0,u;if(!c){const o=[U0.bind(this),void 0];for(o.unshift(...y),o.push(...d),u=o.length,i=Promise.resolve(e);l<u;)i=i.then(o[l++],o[l++]);return i}u=y.length;let p=e;for(;l<u;){const o=y[l++],s=y[l++];try{p=o(p)}catch(m){s.call(this,m);break}}try{i=U0.call(this,p)}catch(o){return Promise.reject(o)}for(l=0,u=d.length;l<u;)i=i.then(d[l++],d[l++]);return i}getUri(t){t=Ss(this.defaults,t);const e=L0(t.baseURL,t.url,t.allowAbsoluteUrls);return A0(e,t.params,t.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){$s.prototype[n]=function(t,e){return this.request(Ss(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ae.forEach(["post","put","patch"],function(n){function t(e){return function(r,h,f){return this.request(Ss(f||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}$s.prototype[n]=t(),$s.prototype[n+"Form"]=t(!0)});let IT=class Gx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(h){e=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](h);r._listeners=null}),this.promise.then=h=>{let f;const g=new Promise(y=>{r.subscribe(y),f=y}).then(h);return g.cancel=function(){r.unsubscribe(f)},g},t(function(h,f,g){r.reason||(r.reason=new gl(h,f,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Gx(function(e){t=e}),cancel:t}}};function LT(n){return function(t){return n.apply(null,t)}}function OT(n){return Ae.isObject(n)&&n.isAxiosError===!0}const $d={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($d).forEach(([n,t])=>{$d[t]=n});function q0(n){const t=new $s(n),e=h0($s.prototype.request,t);return Ae.extend(e,$s.prototype,t,{allOwnKeys:!0}),Ae.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return q0(Ss(n,r))},e}const Kn=Tn("g",q0(fl));Kn.Axios=$s,Kn.CanceledError=gl,Kn.CancelToken=IT,Kn.isCancel=R0,Kn.VERSION=V0,Kn.toFormData=Sc,Kn.AxiosError=yt,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=LT,Kn.isAxiosError=OT,Kn.mergeConfig=Ss,Kn.AxiosHeaders=li,Kn.formToJSON=n=>$0(Ae.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=H0.getAdapter,Kn.HttpStatusCode=$d,Kn.default=Kn;const{Axios:Bz,AxiosError:Wz,CanceledError:jz,isCancel:Hz,CancelToken:Uz,VERSION:Vz,all:Gz,Cancel:qz,isAxiosError:Yz,spread:Kz,toFormData:Xz,AxiosHeaders:Jz,HttpStatusCode:Zz,formToJSON:Qz,getAdapter:eB,mergeConfig:tB}=Kn;function Y0(){return Object.assign({},na())}function NT(n,t,e){const r=Ur(n,e?.in);return r.setTime(r.getTime()+t*tc),r}function DT(n,t){const e=()=>fo(t?.in,NaN),r=BT(n);let h;if(r.date){const c=WT(r.date,2);h=jT(c.restDateString,c.year)}if(!h||isNaN(+h))return e();const f=+h;let g=0,y;if(r.time&&(g=HT(r.time),isNaN(g)))return e();if(r.timezone){if(y=UT(r.timezone),isNaN(y))return e()}else{const c=new Date(f+g),d=Ur(0,t?.in);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return Ur(f+g+y,t?.in)}const Ic={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},PT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,FT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,zT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function BT(n){const t={},e=n.split(Ic.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],Ic.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Ic.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const h=Ic.timezone.exec(r);h?(t.time=r.replace(h[1],""),t.timezone=h[1]):t.time=r}return t}function WT(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const h=r[1]?parseInt(r[1]):null,f=r[2]?parseInt(r[2]):null;return{year:f===null?h:f*100,restDateString:n.slice((r[1]||r[2]).length)}}function jT(n,t){if(t===null)return new Date(NaN);const e=n.match(PT);if(!e)return new Date(NaN);const r=!!e[4],h=ml(e[1]),f=ml(e[2])-1,g=ml(e[3]),y=ml(e[4]),c=ml(e[5])-1;if(r)return KT(t,y,c)?VT(t,y,c):new Date(NaN);{const d=new Date(0);return!qT(t,f,g)||!YT(t,h)?new Date(NaN):(d.setUTCFullYear(t,f,Math.max(h,g)),d)}}function ml(n){return n?parseInt(n):1}function HT(n){const t=n.match(FT);if(!t)return NaN;const e=Ed(t[1]),r=Ed(t[2]),h=Ed(t[3]);return XT(e,r,h)?e*nh+r*tc+h*1e3:NaN}function Ed(n){return n&&parseFloat(n.replace(",","."))||0}function UT(n){if(n==="Z")return 0;const t=n.match(zT);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),h=t[3]&&parseInt(t[3])||0;return JT(r,h)?e*(r*nh+h*tc):NaN}function VT(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const h=r.getUTCDay()||7,f=(t-1)*7+e+1-h;return r.setUTCDate(r.getUTCDate()+f),r}const GT=[31,null,31,30,31,30,31,31,30,31,30,31];function K0(n){return n%400===0||n%4===0&&n%100!==0}function qT(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(GT[t]||(K0(n)?29:28))}function YT(n,t){return t>=1&&t<=(K0(n)?366:365)}function KT(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function XT(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function JT(n,t){return t>=0&&t<=59}function ZT(n,t,e){return NT(n,-t,e)}function X0(n,t,e){const r=Y0(),h=tM(n,e.timeZone,e.locale??r.locale);return"formatToParts"in h?QT(h,t):eM(h,t)}function QT(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function eM(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function tM(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function nM(n,t){const e=aM(t);return"formatToParts"in e?iM(e,n):oM(e,n)}const rM={year:0,month:1,day:2,hour:3,minute:4,second:5};function iM(n,t){try{const e=n.formatToParts(t),r=[];for(let h=0;h<e.length;h++){const f=rM[e[h].type];f!==void 0&&(r[f]=parseInt(e[h].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function oM(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Rd={},J0=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")),sM=J0==="06/25/2014, 00:00:00"||J0==="06/25/2014 00:00:00";function aM(n){return Rd[n]||(Rd[n]=sM?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Rd[n]}function Z0(n,t,e,r,h,f,g){const y=new Date(0);return y.setUTCFullYear(n,t,e),y.setUTCHours(r,h,f,g),y}const Q0=36e5,lM=6e4,Td={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Md(n,t,e){if(!n)return 0;let r=Td.timezoneZ.exec(n);if(r)return 0;let h,f;if(r=Td.timezoneHH.exec(n),r)return h=parseInt(r[1],10),eb(h)?-(h*Q0):NaN;if(r=Td.timezoneHHMM.exec(n),r){h=parseInt(r[2],10);const g=parseInt(r[3],10);return eb(h,g)?(f=Math.abs(h)*Q0+g*lM,r[1]==="+"?-f:f):NaN}if(hM(n)){t=new Date(t||Date.now());const g=e?t:cM(t),y=Id(g,n);return-(e?y:uM(t,y,n))}return NaN}function cM(n){return Z0(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Id(n,t){const e=nM(n,t),r=Z0(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let h=n.getTime();const f=h%1e3;return h-=f>=0?f:1e3+f,r-h}function uM(n,t,e){let r=n.getTime()-t;const h=Id(new Date(r),e);if(t===h)return t;r-=h-t;const f=Id(new Date(r),e);return h===f?h:Math.max(h,f)}function eb(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const tb={};function hM(n){if(tb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),tb[n]=!0,!0}catch{return!1}}const dM=60*1e3,fM={X:function(n,t,e){const r=Ld(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return nb(r);case"XXXX":case"XX":return ya(r);default:return ya(r,":")}},x:function(n,t,e){const r=Ld(e.timeZone,n);switch(t){case"x":return nb(r);case"xxxx":case"xx":return ya(r);default:return ya(r,":")}},O:function(n,t,e){const r=Ld(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+pM(r,":");default:return"GMT"+ya(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return X0("short",n,e);default:return X0("long",n,e)}}};function Ld(n,t){const e=n?Md(n,t,!0)/dM:t?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Lc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ya(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),h=Lc(Math.floor(r/60),2),f=Lc(Math.floor(r%60),2);return e+h+t+f}function nb(n,t){return n%60===0?(n>0?"-":"+")+Lc(Math.abs(n)/60,2):ya(n,t)}function pM(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),h=Math.floor(r/60),f=r%60;return f===0?e+String(h):e+String(h)+t+Lc(f,2)}function rb(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const gM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Od=36e5,ib=6e4,mM=2,Gr={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:gM};function ob(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?mM:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=vM(n),{year:h,restDateString:f}=yM(r.date,e),g=bM(f,h);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const y=g.getTime();let c=0,d;if(r.time&&(c=wM(r.time),c===null||isNaN(c)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=Md(r.timeZone||t.timeZone,new Date(y+c)),isNaN(d))return new Date(NaN)}else d=rb(new Date(y+c)),d=rb(new Date(y+c+d));return new Date(y+c+d)}else return new Date(NaN)}function vM(n){const t={};let e=Gr.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Gr.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const h=Gr.timeZone.exec(r);h?(t.time=r.replace(h[1],""),t.timeZone=h[1].trim()):t.time=r}return t}function yM(n,t){if(n){const e=Gr.YYY[t],r=Gr.YYYYY[t];let h=Gr.YYYY.exec(n)||r.exec(n);if(h){const f=h[1];return{year:parseInt(f,10),restDateString:n.slice(f.length)}}if(h=Gr.YY.exec(n)||e.exec(n),h){const f=h[1];return{year:parseInt(f,10)*100,restDateString:n.slice(f.length)}}}return{year:null}}function bM(n,t){if(t===null)return null;let e,r,h;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let f=Gr.MM.exec(n);if(f)return e=new Date(0),r=parseInt(f[1],10)-1,lb(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(f=Gr.DDD.exec(n),f){e=new Date(0);const g=parseInt(f[1],10);return _M(t,g)?(e.setUTCFullYear(t,0,g),e):new Date(NaN)}if(f=Gr.MMDD.exec(n),f){e=new Date(0),r=parseInt(f[1],10)-1;const g=parseInt(f[2],10);return lb(t,r,g)?(e.setUTCFullYear(t,r,g),e):new Date(NaN)}if(f=Gr.Www.exec(n),f)return h=parseInt(f[1],10)-1,cb(h)?sb(t,h):new Date(NaN);if(f=Gr.WwwD.exec(n),f){h=parseInt(f[1],10)-1;const g=parseInt(f[2],10)-1;return cb(h,g)?sb(t,h,g):new Date(NaN)}return null}function wM(n){let t,e,r=Gr.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Nd(t)?t%24*Od:NaN;if(r=Gr.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Nd(t,e)?t%24*Od+e*ib:NaN;if(r=Gr.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const h=parseFloat(r[3].replace(",","."));return Nd(t,e,h)?t%24*Od+e*ib+h*1e3:NaN}return null}function sb(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const h=r.getUTCDay()||7,f=t*7+e+1-h;return r.setUTCDate(r.getUTCDate()+f),r}const xM=[31,28,31,30,31,30,31,31,30,31,30,31],CM=[31,29,31,30,31,30,31,31,30,31,30,31];function ab(n){return n%400===0||n%4===0&&n%100!==0}function lb(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=ab(n);if(r&&e>CM[t]||!r&&e>xM[t])return!1}return!0}function _M(n,t){if(t<1)return!1;const e=ab(n);return!(e&&t>366||!e&&t>365)}function cb(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Nd(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const kM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function AM(n,t,e={}){t=String(t);const r=t.match(kM);if(r){const h=ob(e.originalDate||n,e);t=r.reduce(function(f,g){if(g[0]==="'")return f;const y=f.indexOf(g),c=f[y-1]==="'",d=f.replace(g,"'"+fM[g[0]](h,g,e)+"'");return c?d.substring(0,y-1)+d.substring(y+1):d},t)}return vs(n,t,e)}function SM(n,t,e){n=ob(n,e);const r=Md(t,n,!0),h=new Date(n.getTime()-r),f=new Date(0);return f.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),f.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),f}function Oc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},AM(SM(n,t,{timeZone:r.timeZone}),e,r)}const Nc="yyyy-MM-dd",ub="HH:mm:ss.SSS",hb="HH:mm:ss",Dc=`${Nc} ${ub}`,db=`${Nc} ${hb}`,nB=Tn("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return vs(!t||t==="local"?ZT(n,n.getTimezoneOffset()):n,Dc)},formatDateTime(n,t){return!t||t==="local"?vs(n,Dc):Oc(n,t,Dc)},formatDateTimeHMS(n,t){return!t||t==="local"?vs(n,db):Oc(n,t,db)},formatDate:function(n,t){return!t||t==="local"?vs(n,Nc):Oc(n,this.timeZone,Nc)},formatTime:function(n,t,e=ub){return!t||t==="local"?vs(n,e):Oc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,hb)},formatTimestamp(n,t){return this.formatDateTime(DT(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}}),fb=100,pb=Tn("c",ag("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:n=>t=>n.namedWidgets[t]},actions:{notifyAddHistory(n){this.notifyHistory.length>=fb&&(this.notifyHistory.length=fb-1),this.notifyHistory.unshift(n)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(n){Object.assign(this.namedWidgets,n)},clearNamedWidget(n){delete this.namedWidgets[n]},updatePlayback(n){Object.assign(this.playback,n)}}})),ba=lg();ba.use(({store:n})=>{n.commit=(t,e)=>{typeof n[t]=="function"&&n[t](e)},n.dispatch=(t,e)=>{if(typeof n[t]=="function")return n[t](e)}});const $M=ba.install.bind(ba);ba.install=n=>{$M(n);const t=pb(ba);n.config.globalProperties.$store={state:new Proxy({},{get(e,r){return t.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,h]=r.split("/");return t[h]}return t[r]}}),commit(e,r){if(e.includes("/")){const[,h]=e.split("/");t[h]?.(r)}else t[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,h]=e.split("/");return t[h]?.(r)}else return t[e]?.(r)}}};const EM="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=",RM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return EM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=DM.indexOf(gb[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,h=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*h}px;`,`background-size: ${e}px ${r}px;`,`height: ${h}px;`,`width: ${h}px;`,`padding-top: ${n-1}px;`].join("")}}};function TM(n,t,e,r,h,f){return nt(),nn("div",{style:ls(f.iconStyle)},null,4)}const MM=qi(RM,[["render",TM]]),IM={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function LM(n,t,e,r,h,f){const g=Ue("rux-icon");return nt(),Pt(g,{size:e.size,icon:e.icon,style:ls(f.colorStyle)},null,8,["size","icon","style"])}const OM=qi(IM,[["render",LM],["__scopeId","data-v-bb4cd487"]]),gb={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"},Dd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},NM=function(n){const t="#000000",e="#ffffff",r=Dd[gb[n]];if(r){const h=+`0x${r.slice(1,3)}`,f=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((h*299+f*587+g*114)/1e3>128)return t}return e},DM=Object.keys(Dd),PM={astro:{component:n=>Js(OM,{...n})},"astro-status":{component:n=>Js(MM,{...n,status:n.icon})}},FM={extras:{component:n=>Js(cC,{...n})}},zM=50,BM=2e3,mb="single-spa:app-change",WM={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(mb,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},BM)},unmounted(){window.removeEventListener(mb,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Lu().length>0,Lu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},zM)}}},jM={class:"mx-1"},HM={key:1,class:"d-flex justify-center align-center"};function UM(n,t,e,r,h,f){const g=Ue("v-card-title"),y=Ue("v-card-text"),c=Ue("v-card"),d=Ue("v-progress-circular");return nt(),nn(ii,null,[h.show?(nt(),Pt(c,{key:0},{default:ze(()=>[We(g,null,{default:ze(()=>[...t[0]||(t[0]=[Lt(" 404 Not Found ",-1)])]),_:1}),We(y,{class:"d-flex align-center mt-3"},{default:ze(()=>[t[1]||(t[1]=Lt(" The requested URL ",-1)),qn("code",jM,gn(n.$route.fullPath),1),t[2]||(t[2]=Lt(" was not routable. ",-1)),t[3]||(t[3]=qn("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Hr("",!0),f.showSpinner?(nt(),nn("div",HM,[We(d,{indeterminate:""})])):Hr("",!0)],64)}const VM=qi(WM,[["render",UM]]);var Pd={};const GM={props:{modelValue:Boolean},emits:["update:modelValue"],data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const n=/\w+.gem/;return this.response.tree.filter(t=>n.exec(t.path)).map(t=>({name:t.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${t.path}`}))},getResponse:function(){this.disableSearch=!0,Kn.get(this.url).then(n=>{this.response=n.data}),setTimeout(()=>{this.disableSearch=!1},1e4)},searchGithub:function(){this.type="github",this.url="https://api.github.com/repos/OpenC3/openc3-tools/git/trees/main?recursive=1",this.getResponse()},downloadGem:function(n){const t=document.createElement("a");t.href=n.url,t.setAttribute("download",n.name),t.click(),t.remove()}}},qM={class:"pa-3"},YM={class:"px-2"},KM={key:0,class:"mt-4"},XM={key:1,class:"mt-4"};function JM(n,t,e,r,h,f){const g=Ue("v-spacer"),y=Ue("v-toolbar"),c=Ue("v-row"),d=Ue("v-icon"),i=Ue("v-btn"),l=Ue("v-col"),u=Ue("v-list-item-title"),p=Ue("v-progress-circular"),o=Ue("v-list-item"),s=Ue("v-divider"),m=Ue("v-card-text"),w=Ue("v-card"),x=Ue("v-dialog");return nt(),Pt(x,{modelValue:f.show,"onUpdate:modelValue":t[0]||(t[0]=R=>f.show=R),width:"600"},{default:ze(()=>[We(w,null,{default:ze(()=>[We(y,{height:"24"},{default:ze(()=>[We(g),t[1]||(t[1]=qn("span",null," Download Gems ",-1)),We(g)]),_:1}),We(m,null,{default:ze(()=>[qn("div",qM,[We(c,{class:"my-2"},{default:ze(()=>[...t[2]||(t[2]=[Lt(" Select a download option ",-1)])]),_:1}),We(c,null,{default:ze(()=>[We(l,null,{default:ze(()=>[qn("div",YM,[We(i,{block:"","data-test":"searchGithub",color:"primary",disabled:h.disableSearch,onClick:f.searchGithub},{default:ze(()=>[t[4]||(t[4]=Lt(" Github ",-1)),We(d,{end:"",theme:"dark"},{default:ze(()=>[...t[3]||(t[3]=[Lt(" mdi-github ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(c,{class:"mt-5"},{default:ze(()=>[...t[5]||(t[5]=[Lt(" Community Gems ",-1)])]),_:1}),f.listData.length<1?(nt(),nn("div",KM,[We(c,{class:"mx-2"},{default:ze(()=>[...t[6]||(t[6]=[qn("span",null," I’m sorry, Dave. No gems available.... ",-1)])]),_:1})])):(nt(),nn("div",XM,[(nt(!0),nn(ii,null,ho(f.listData,(R,$)=>(nt(),nn("div",{key:$},[We(o,null,{default:ze(()=>[We(u,null,{default:ze(()=>[Lt(gn(R.name),1)]),_:2},1024),We(o,{icon:""},{default:ze(()=>[h.activeDownload?(nt(),Pt(p,{key:0,indeterminate:"",color:"primary"})):(nt(),Pt(i,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:h.activeDownload,onClick:k=>f.downloadGem(R)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),$<f.listData.length-1?(nt(),Pt(s,{key:$})):Hr("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const rB=Tn("E",qi(GM,[["render",JM]])),ZM={props:{modelValue:Boolean,plugin:{type:String,default:null},targets:{type:Array,default:null},pluginDelete:Boolean},emits:["update:modelValue","submit","cancel"],data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)Ku.get(`/openc3-api/targets/${n.name}/modified_files`).then(t=>{t.data.length!==0&&this.modifiedTargets.push({name:n.name,files:t.data})})},methods:{cancel(){this.show=!1,this.$emit("cancel")}}},QM={class:"file-list-container"};function eI(n,t,e,r,h,f){const g=Ue("v-spacer"),y=Ue("v-toolbar"),c=Ue("v-list-item-title"),d=Ue("v-list-item-subtitle"),i=Ue("v-list-item"),l=Ue("v-checkbox"),u=Ue("v-card-text"),p=Ue("v-btn"),o=Ue("v-card-actions"),s=Ue("v-card"),m=Ue("v-dialog");return nt(),Pt(m,{modelValue:f.show,"onUpdate:modelValue":t[2]||(t[2]=w=>f.show=w),persistent:"",width:"600",onKeydown:Fl(f.cancel,["esc"])},{default:ze(()=>[We(s,null,{default:ze(()=>[We(y,{height:"24"},{default:ze(()=>[We(g),t[3]||(t[3]=qn("span",null," Modified Plugin ",-1)),We(g)]),_:1}),We(u,{class:"pa-3 card-container"},{default:ze(()=>[qn("div",null," Plugin "+gn(e.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(nt(!0),nn(ii,null,ho(h.modifiedTargets,(w,x)=>(nt(),Pt(i,{key:x,lines:"two"},{default:ze(()=>[We(c,null,{default:ze(()=>[Lt(gn(w.name),1)]),_:2},1024),qn("div",QM,[(nt(!0),nn(ii,null,ho(w.files,(R,$)=>(nt(),Pt(d,{key:$},{default:ze(()=>[Lt(gn(R),1)]),_:2},1024))),128))])]),_:2},1024))),128)),We(l,{modelValue:h.deleteModified,"onUpdate:modelValue":t[0]||(t[0]=w=>h.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(o,{class:"px-2"},{default:ze(()=>[We(g),We(p,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:f.cancel},{default:ze(()=>[...t[4]||(t[4]=[Lt(" Cancel ",-1)])]),_:1},8,["onClick"]),We(p,{variant:"flat","data-test":"modified-plugin-submit",onClick:t[1]||(t[1]=()=>{f.show=!1,n.$emit("submit",h.deleteModified)})},{default:ze(()=>[...t[5]||(t[5]=[Lt(" Confirm ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const iB=Tn("v",qi(ZM,[["render",eI],["__scopeId","data-v-06cfb31b"]])),Fd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>et(()=>Qe.import("./PluginsTab-nWngR5kY-fb723f730cae605368ca.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>et(()=>Qe.import("./TargetsTab-BJZEtKY4-eb3c520d9f8896dc52e2.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>et(()=>Qe.import("./InterfacesTab-twne_Qp4-7a5803ca2d2e183ea27f.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>et(()=>Qe.import("./RoutersTab-CLKIJ5cm-192f71834ece51ffdb96.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>et(()=>Qe.import("./MicroservicesTab-Bhsf1soi-1ae5a6c0aa51b620f298.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>et(()=>Qe.import("./PackagesTab-Bb221-aM-f1e26eed5c8756e90bf0.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>et(()=>Qe.import("./ToolsTab-VSCWDywf-8a291cbe6cc534d27ddf.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>et(()=>Qe.import("./RedisTab-BZtfqEcP-26828a24578c54ad2bd1.js"),void 0)},{displayName:"TSDB",name:"TsdbTab",path:"tsdb",component:()=>et(()=>Qe.import("./TsdbTab-Cv8GjpoJ-4fc1c6979b74d5408ab1.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>et(()=>Qe.import("./SecretsTab-BoBmTh63-0b1ebb50cbbbcd22ea0e.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>et(()=>Qe.import("./SettingsTab-BL7gkaO9-1451155a58c685c1b589.js"),void 0)}],tI={components:{TopBar:QE},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return Fd.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function nI(n,t,e,r,h,f){const g=Ue("top-bar"),y=Ue("v-tab"),c=Ue("v-tabs"),d=Ue("router-view"),i=Ue("v-card");return nt(),nn("div",null,[We(g,{title:h.title},null,8,["title"]),We(i,null,{default:ze(()=>[We(c,{modelValue:h.curTab,"onUpdate:modelValue":t[0]||(t[0]=l=>h.curTab=l),"fixed-tabs":""},{default:ze(()=>[(nt(!0),nn(ii,null,ho(f.tabs,(l,u)=>(nt(),Pt(y,{key:u,to:l.path},{default:ze(()=>[Lt(gn(l.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(d)]),_:1})])}const rI=qi(tI,[["render",nI]]);function zd(n){let[t,e]=n;return[t,e]}function vb(n,t){let e=n,r=t,h=e.length,f=r.length;if(h===0||f===0)return 0;h>f?e=e.substring(h-f):h<f&&(r=r.substring(0,h));let g=Math.min(h,f);if(e===r)return g;let y=0,c=1;for(let d=0;d!==-1;){let i=e.substring(g-c);if(d=r.indexOf(i),d===-1)return y;c+=d,(d===0||e.substring(g-c)===r.substring(0,c))&&(y=c,c++)}return y}function Bd(n,t){if(!n||!t||n[0]!==t[0])return 0;let e=0,r=Math.min(n.length,t.length),h=r,f=0;for(;e<h;)n.substring(f,h)===t.substring(f,h)?(e=h,f=e):r=h,h=Math.floor((r-e)/2+e);return h}function Pc(n,t){if(!n||!t||n[n.length-1]!==t[t.length-1])return 0;let e=0,r=Math.min(n.length,t.length),h=r,f=0;for(;e<h;)n.substring(n.length-h,n.length-f)===t.substring(t.length-h,t.length-f)?(e=h,f=e):r=h,h=Math.floor((r-e)/2+e);return h}function iI(n){let t=n.charCodeAt(0);return t>=55296&&t<=56319}function oI(n){let t=n.charCodeAt(0);return t>=56320&&t<=57343}function sI(n,t,e){let r=n.length,h=t.length,f=Math.ceil((r+h)/2),g=f,y=2*f,c=Array(y),d=Array(y);for(let m=0;m<y;m++)c[m]=-1,d[m]=-1;c[g+1]=0,d[g+1]=0;let i=r-h,l=i%2!=0,u=0,p=0,o=0,s=0;for(let m=0;m<f&&!(Date.now()>e);m++){for(let w=-m+u;w<=m-p;w+=2){let x=g+w,R;R=w===-m||w!==m&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1;let $=R-w;for(;R<r&&$<h&&n.charAt(R)===t.charAt($);)R++,$++;if(c[x]=R,R>r)p+=2;else if($>h)u+=2;else if(l){let k=g+i-w;if(k>=0&&k<y&&d[k]!==-1){let C=r-d[k];if(R>=C)return yb(n,t,R,$,e)}}}for(let w=-m+o;w<=m-s;w+=2){let x=g+w,R;R=w===-m||w!==m&&d[x-1]<d[x+1]?d[x+1]:d[x-1]+1;let $=R-w;for(;R<r&&$<h&&n.charAt(r-R-1)===t.charAt(h-$-1);)R++,$++;if(d[x]=R,R>r)s+=2;else if($>h)o+=2;else if(!l){let k=g+i-w;if(k>=0&&k<y&&c[k]!==-1){let C=c[k],O=g+C-k;if(R=r-R,C>=R)return yb(n,t,C,O,e)}}}}return[[wa,n],[xa,t]]}function yb(n,t,e,r,h){let f=n.substring(0,e),g=t.substring(0,r),y=n.substring(e),c=t.substring(r),d=Es(f,g,{checkLines:!1,deadline:h}),i=Es(y,c,{checkLines:!1,deadline:h});return d.concat(i)}function aI(n,t,e=1){if(e<=0)return null;let r=n.length>t.length?n:t,h=n.length>t.length?t:n;if(r.length<4||h.length*2<r.length)return null;let f=bb(r,h,Math.ceil(r.length/4)),g=bb(r,h,Math.ceil(r.length/2)),y;if(f&&g)y=f[4].length>g[4].length?f:g;else{if(!f&&!g)return null;g?f||(y=g):y=f}if(!y)throw Error("Unable to find a half match.");let c,d,i,l;n.length>t.length?(c=y[0],d=y[1],i=y[2],l=y[3]):(i=y[0],l=y[1],c=y[2],d=y[3]);let u=y[4];return[c,d,i,l,u]}function bb(n,t,e){let r=n.slice(e,e+Math.floor(n.length/4)),h=-1,f="",g,y,c,d;for(;(h=t.indexOf(r,h+1))!==-1;){let i=Bd(n.slice(e),t.slice(h)),l=Pc(n.slice(0,e),t.slice(0,h));f.length<l+i&&(f=t.slice(h-l,h)+t.slice(h,h+i),g=n.slice(0,e-l),y=n.slice(e+i),c=t.slice(0,h-l),d=t.slice(h+i))}return f.length*2>=n.length?[g||"",y||"",c||"",d||"",f||""]:null}function lI(n,t){for(let e=0;e<n.length;e++){let r=n[e][1],h=[];for(let f=0;f<r.length;f++)h[f]=t[r.charCodeAt(f)];n[e][1]=h.join("")}}function cI(n,t){let e=[],r={};e[0]="";function h(y){let c="",d=0,i=-1,l=e.length;for(;i<y.length-1;){i=y.indexOf(`
|
|
1489
|
-
`,d),i===-1&&(i=y.length-1);let u=y.slice(d,i+1);(r.hasOwnProperty?r.hasOwnProperty(u):r[u]!==void 0)?c+=String.fromCharCode(r[u]):(l===f&&(u=y.slice(d),i=y.length),c+=String.fromCharCode(l),r[u]=l,e[l++]=u),d=i+1}return c}let f=4e4,g=h(n);return f=65535,{chars1:g,chars2:h(t),lineArray:e}}function uI(n,t,e){let r=n,h=t,f=cI(r,h);r=f.chars1,h=f.chars2;let g=f.lineArray,y=Es(r,h,{checkLines:!1,deadline:e.deadline});lI(y,g),y=_b(y),y.push([Fc,""]);let c=0,d=0,i=0,l="",u="";for(;c<y.length;){switch(y[c][0]){case xa:i++,u+=y[c][1];break;case wa:d++,l+=y[c][1];break;case Fc:if(d>=1&&i>=1){y.splice(c-d-i,d+i),c=c-d-i;let p=Es(l,u,{checkLines:!1,deadline:e.deadline});for(let o=p.length-1;o>=0;o--)y.splice(c,0,p[o]);c+=p.length}i=0,d=0,l="",u="";break;default:throw Error("Unknown diff operation.")}c++}return y.pop(),y}function hI(n,t,e){let r;if(!n)return[[xa,t]];if(!t)return[[wa,n]];let h=n.length>t.length?n:t,f=n.length>t.length?t:n,g=h.indexOf(f);if(g!==-1)return r=[[xa,h.substring(0,g)],[Fc,f],[xa,h.substring(g+f.length)]],n.length>t.length&&(r[0][0]=wa,r[2][0]=wa),r;if(f.length===1)return[[wa,n],[xa,t]];let y=aI(n,t);if(y){let c=y[0],d=y[1],i=y[2],l=y[3],u=y[4],p=Es(c,i,e),o=Es(d,l,e);return p.concat([[Fc,u]],o)}return e.checkLines&&n.length>100&&t.length>100?uI(n,t,e):sI(n,t,e.deadline)}var dI=Object.defineProperty,wb=Object.getOwnPropertySymbols,fI=Object.prototype.hasOwnProperty,pI=Object.prototype.propertyIsEnumerable,xb=(n,t,e)=>t in n?dI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,gI=(n,t)=>{for(var e in t||={})fI.call(t,e)&&xb(n,e,t[e]);if(wb)for(var e of wb(t))pI.call(t,e)&&xb(n,e,t[e]);return n};const wa=-1,xa=1,Fc=0;function mI(n,t,e){if(n===null||t===null)throw Error("Null input. (diff)");let r=Es(n,t,yI({}));return wI(r),r}function Es(n,t,e){let r=n,h=t;if(r===h)return r?[[0,r]]:[];let f=Bd(r,h),g=r.substring(0,f);r=r.substring(f),h=h.substring(f),f=Pc(r,h);let y=r.substring(r.length-f);r=r.substring(0,r.length-f),h=h.substring(0,h.length-f);let c=hI(r,h,e);return g&&c.unshift([0,g]),y&&c.push([0,y]),c=Wd(c),c}function vI(n){let t=1;return typeof n<"u"&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+t*1e3}function yI(n){return gI({checkLines:!0,deadline:vI(n.timeout||1)},n)}function zc(n,t,e){return e===1?n+t:t+n}function Bc(n,t){return t===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function bI(n,t,e,r){return r===1?n[t][1][n[t][1].length-1]===n[e][1][n[e][1].length-1]:n[t][1][0]===n[e][1][0]}function Cb(n,t,e){let r=e===1?-1:1,h=null,f=null,g=t+e;for(;g>=0&&g<n.length&&(h===null||f===null);g+=e){let[d,i]=n[g];if(i.length!==0){if(d===1){h===null&&(h=g);continue}else if(d===-1){f===null&&(f=g);continue}else if(d===0){if(h===null&&f===null){let[l,u]=Bc(n[t][1],e);n[t][1]=l,n[g][1]=zc(n[g][1],u,r);return}break}}}if(h!==null&&f!==null&&bI(n,h,f,e)){let[d,i]=Bc(n[h][1],r),[l]=Bc(n[f][1],r);n[h][1]=d,n[f][1]=l,n[t][1]=zc(n[t][1],i,e);return}let[y,c]=Bc(n[t][1],e);n[t][1]=y,h===null?(n.splice(g,0,[1,c]),f!==null&&f>=g&&f++):n[h][1]=zc(n[h][1],c,r),f===null?n.splice(g,0,[-1,c]):n[f][1]=zc(n[f][1],c,r)}function wI(n){for(let t=0;t<n.length;t++){let[e,r]=n[t];if(r.length===0)continue;let h=r[0],f=r[r.length-1];iI(f)&&e===0&&Cb(n,t,1),oI(h)&&e===0&&Cb(n,t,-1)}for(let t=0;t<n.length;t++)n[t][1].length===0&&n.splice(t,1)}function _b(n){let t=n.map(l=>zd(l)),e=!1,r=[],h=0,f=null,g=0,y=0,c=0,d=0,i=0;for(;g<t.length;)t[g][0]===0?(r[h++]=g,y=d,c=i,d=0,i=0,f=t[g][1]):(t[g][0]===1?d+=t[g][1].length:i+=t[g][1].length,f&&f.length<=Math.max(y,c)&&f.length<=Math.max(d,i)&&(t.splice(r[h-1],0,[-1,f]),t[r[h-1]+1][0]=1,h--,h--,g=h>0?r[h-1]:-1,y=0,c=0,d=0,i=0,f=null,e=!0)),g++;for(e&&(t=Wd(t)),t=_I(t),g=1;g<t.length;){if(t[g-1][0]===-1&&t[g][0]===1){let l=t[g-1][1],u=t[g][1],p=vb(l,u),o=vb(u,l);p>=o?(p>=l.length/2||p>=u.length/2)&&(t.splice(g,0,[0,u.substring(0,p)]),t[g-1][1]=l.substring(0,l.length-p),t[g+1][1]=u.substring(p),g++):(o>=l.length/2||o>=u.length/2)&&(t.splice(g,0,[0,l.substring(0,o)]),t[g-1][0]=1,t[g-1][1]=u.substring(0,u.length-o),t[g+1][0]=-1,t[g+1][1]=l.substring(o),g++),g++}g++}return t}const kb=/[^a-zA-Z0-9]/,Ab=/\s/,Sb=/[\r\n]/,xI=/\n\r?\n$/,CI=/^\r?\n\r?\n/;function _I(n){let t=n.map(h=>zd(h));function e(h,f){if(!h||!f)return 6;let g=h.charAt(h.length-1),y=f.charAt(0),c=g.match(kb),d=y.match(kb),i=c&&g.match(Ab),l=d&&y.match(Ab),u=i&&g.match(Sb),p=l&&y.match(Sb),o=u&&h.match(xI),s=p&&f.match(CI);return o||s?5:u||p?4:c&&!i&&l?3:i||l?2:c||d?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let h=t[r-1][1],f=t[r][1],g=t[r+1][1],y=Pc(h,f);if(y){let u=f.substring(f.length-y);h=h.substring(0,h.length-y),f=u+f.substring(0,f.length-y),g=u+g}let c=h,d=f,i=g,l=e(h,f)+e(f,g);for(;f.charAt(0)===g.charAt(0);){h+=f.charAt(0),f=f.substring(1)+g.charAt(0),g=g.substring(1);let u=e(h,f)+e(f,g);u>=l&&(l=u,c=h,d=f,i=g)}t[r-1][1]!==c&&(c?t[r-1][1]=c:(t.splice(r-1,1),r--),t[r][1]=d,i?t[r+1][1]=i:(t.splice(r+1,1),r--))}r++}return t}function Wd(n){let t=n.map(d=>zd(d));t.push([0,""]);let e=0,r=0,h=0,f="",g="",y;for(;e<t.length;)switch(t[e][0]){case 1:h++,g+=t[e][1],e++;break;case-1:r++,f+=t[e][1],e++;break;case 0:r+h>1?(r!==0&&h!==0&&(y=Bd(g,f),y!==0&&(e-r-h>0&&t[e-r-h-1][0]===0?t[e-r-h-1][1]+=g.substring(0,y):(t.splice(0,0,[0,g.substring(0,y)]),e++),g=g.substring(y),f=f.substring(y)),y=Pc(g,f),y!==0&&(t[e][1]=g.substring(g.length-y)+t[e][1],g=g.substring(0,g.length-y),f=f.substring(0,f.length-y))),e-=r+h,t.splice(e,r+h),f.length&&(t.splice(e,0,[-1,f]),e++),g.length&&(t.splice(e,0,[1,g]),e++),e++):e!==0&&t[e-1][0]===0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,h=0,r=0,f="",g="";break;default:throw Error("Unknown diff operation")}t[t.length-1][1]===""&&t.pop();let c=!1;for(e=1;e<t.length-1;)t[e-1][0]===0&&t[e+1][0]===0&&(t[e][1].substring(t[e][1].length-t[e-1][1].length)===t[e-1][1]?(t[e][1]=t[e-1][1]+t[e][1].substring(0,t[e][1].length-t[e-1][1].length),t[e+1][1]=t[e-1][1]+t[e+1][1],t.splice(e-1,1),c=!0):t[e][1].substring(0,t[e+1][1].length)===t[e+1][1]&&(t[e-1][1]+=t[e+1][1],t[e][1]=t[e][1].substring(t[e+1][1].length)+t[e+1][1],t.splice(e+1,1),c=!0)),e++;return c&&(t=Wd(t)),t}function $b(n,t,e=!1){let r=null,h=!0;return function(...f){let g=e&&h,y=()=>{n.apply(this,f),r=null};g&&(h=!1,y()),r||=setTimeout(y,t)}}function kI(n,t){let e;return function(...r){clearTimeout(e),e=setTimeout(()=>n.apply(this,r),t)}}function Eb(n=""){return(n??"").replace(/\r\n/g,`
|
|
1490
|
-
`)}function Rb(n,t,e,r){let h=n+(e-n)/2;return`M ${n} ${t} C ${h},${t} ${h},${r} ${e},${r}`}const Ca="right",Rs="left",AI="specific",SI="broad";var Tb={SVG_NS:"http://www.w3.org/2000/svg"};function Mb(n,t){let{mode:e}=n.options;return t===Rs&&n.options.left.mode!==null&&(e=n.options.left.mode??e),t===Ca&&n.options.right.mode!==null&&(e=n.options.right.mode??e),e}function Ib(n,t){let{theme:e}=n.options;return t===Rs&&n.options.left.theme!==null&&(e=n.options.left.theme??e),t===Ca&&n.options.right.theme!==null&&(e=n.options.right.theme??e),e}function $I(n,t){return n.ace.getSession().doc.getLine(t)}function EI(n){let t=n.options.left.id;return t?document.getElementById(t)?.offsetHeight??0:0}function Lb(n){let t=document.createElement("div"),e={class:n.className,style:`top:${n.topOffset}px`,title:n.tooltip,"data-diff-index":n.diffIndex};for(let r in e)t.setAttribute(r,String(e[r]));return t.innerHTML=n.arrowContent,t}function jd(n,t){let e=`js-${t}-${Math.random().toString(36).substr(2,5)}`,r=n.querySelector(`.${t}`);if(r)return r.id=r.id||e,r.id;let h=document.createElement("div");return n.appendChild(h),h.className=t,h.id=e,h.id}function Ob(n,t,e,r){let h=n==="document"?document:document.querySelector(n);h&&h.addEventListener(t,f=>{let g=h.querySelectorAll(e),y=f.target;for(let c=0,d=g.length;c<d;c+=1){let i=y,l=g[c];for(;i&&i!==h;)i===l&&r.call(l,f),i=i.parentNode}})}let Ts=null;function RI(n){if(n.Range)return n.Range;let t=n.acequire||n.require;return t?t("ace/range"):!1}const TI={ace:void 0,mode:null,theme:null,element:null,diffGranularity:SI,lockScrolling:!0,showDiffs:!0,showConnectors:!0,charDiffs:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",diffChar:"acediff__diffChar",diffGutter:"acediff__diffGutter",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"→",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"←",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0,onDiffReady:null};var MI=class{options;el;editors;diffs=[];lineHeight=0;gutterSVG=null;gutterWidth=0;gutterHeight=0;copyLeftContainer=null;copyRightContainer=null;connectorYOffset=0;removeEventHandlers=null;constructor(n={}){let t=JSON.parse(JSON.stringify(TI));this.options={...t,...n,left:{...t.left,...n.left},right:{...t.right,...n.right},classes:{...t.classes,...n.classes}};let e=()=>typeof window<"u"?window.ace:void 0;this.options.ace||(this.options.ace=e());let{ace:r}=this.options;if(!r){let f="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";throw console.error(f),Error(f)}let h=RI(r);if(!h){let f="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";throw console.error(f),Error(f)}if(Ts=h,this.options.element===null){let f="You need to specify an element for Ace-diff - `options.element` is missing";throw console.error(f),Error(f)}if(this.options.element instanceof HTMLElement)this.el=this.options.element;else{let f=document.body.querySelector(this.options.element);if(!f){let g=`Can't find the specified element ${this.options.element}`;throw console.error(g),Error(g)}this.el=f}this.options.left.id=jd(this.el,"acediff__left"),this.options.classes.gutterID=jd(this.el,"acediff__gutter"),this.options.right.id=jd(this.el,"acediff__right"),this.el.innerHTML=`<div class="acediff acediff__wrap">${this.el.innerHTML}</div>`,this.editors={left:{ace:r.edit(this.options.left.id),markers:[],lineLengths:[],diffGutters:[]},right:{ace:r.edit(this.options.right.id),markers:[],lineLengths:[],diffGutters:[]},editorHeight:null},this.editors.left.ace.getSession().setMode(Mb(this,Rs)??""),this.editors.right.ace.getSession().setMode(Mb(this,Ca)??""),this.editors.left.ace.setReadOnly(!this.options.left.editable),this.editors.right.ace.setReadOnly(!this.options.right.editable),this.editors.left.ace.setShowFoldWidgets(!1),this.editors.right.ace.setShowFoldWidgets(!1),this.editors.left.ace.setTheme(Ib(this,Rs)??""),this.editors.right.ace.setTheme(Ib(this,Ca)??""),this.editors.left.ace.setValue(Eb(this.options.left.content??null),-1),this.editors.right.ace.setValue(Eb(this.options.right.content??null),-1),this.editors.editorHeight=EI(this),setTimeout(()=>{this.lineHeight=this.editors.left.ace.renderer.lineHeight,this.addEventHandlers(),this.createCopyContainers(),this.createGutter(),this.diff()},1)}setOptions(n){this.options={...this.options,...n,left:{...this.options.left,...n.left},right:{...this.options.right,...n.right},classes:{...this.options.classes,...n.classes}},this.diff()}getNumDiffs(){return this.diffs.length}getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}}diff(){let n=this.editors.left.ace.getSession().getValue(),t=_b(mI(this.editors.right.ace.getSession().getValue(),n));this.editors.left.lineLengths=this.getLineLengths(this.editors.left),this.editors.right.lineLengths=this.getLineLengths(this.editors.right);let e=[],r={left:0,right:0};t.forEach(h=>{let f=h[0],g=h[1];g.length!==0&&(f===0?(r.left+=g.length,r.right+=g.length):f===-1?(e.push(this.computeDiff(-1,r.left,r.right,g)),r.right+=g.length):f===1&&(e.push(this.computeDiff(1,r.left,r.right,g)),r.left+=g.length))}),this.diffs=this.simplifyDiffs(e),!(this.diffs.length>this.options.maxDiffs)&&(this.clearDiffs(),this.decorate(),typeof this.options.onDiffReady=="function"&&this.options.onDiffReady(this.diffs))}clear(){this.clearDiffs(),this.clearGutter(),this.clearArrows()}destroy(){let n=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let t=this.editors.left.ace.container,e=t.cloneNode(!1);e.textContent=n,t.parentNode?.replaceChild(e,t);let r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),t=this.editors.right.ace.container,e=t.cloneNode(!1),e.textContent=r,t.parentNode?.replaceChild(e,t);let h=document.getElementById(this.options.classes.gutterID);h&&(h.innerHTML=""),this.removeEventHandlers?.()}addEventHandlers(){let n=!1,t=(h,f)=>{if(!this.options.lockScrolling||n)return;let g=h.ace.getSession(),y=f.ace.getSession(),c=g.getScrollTop(),d=g.getLength()*this.lineHeight,i=h.ace.renderer.$size.scrollerHeight,l=Math.max(0,d-i),u=l>0?c/l:0,p=y.getLength()*this.lineHeight,o=f.ace.renderer.$size.scrollerHeight,s=u*Math.max(0,p-o);n=!0,y.setScrollTop(s),n=!1};this.editors.left.ace.getSession().on("changeScrollTop",$b(()=>{t(this.editors.left,this.editors.right),this.updateGap()},16)),this.editors.right.ace.getSession().on("changeScrollTop",$b(()=>{t(this.editors.right,this.editors.left),this.updateGap()},16));let e=this.diff.bind(this);this.editors.left.ace.on("change",e),this.editors.right.ace.on("change",e),this.options.left.copyLinkEnabled&&Ob(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.newCodeConnectorLink}`,h=>this.copy(h,"ltr")),this.options.right.copyLinkEnabled&&Ob(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.deletedCodeConnectorLink}`,h=>this.copy(h,"rtl"));let r=kI(()=>{let h=document.getElementById(this.options.left.id);h&&(this.editors.availableHeight=h.offsetHeight),this.diff()},250);window.addEventListener("resize",r),this.removeEventHandlers=()=>{window.removeEventListener("resize",r)}}copy(n,t){let e=n.target,r=parseInt(e.getAttribute("data-diff-index")??"0",10),h=this.diffs[r];if(!h||t==="ltr"&&!this.options.right.editable||t==="rtl"&&!this.options.left.editable)return;let f,g,y,c,d,i;t==="ltr"?(f=this.editors.left,g=this.editors.right,y=h.leftStartOffset,c=h.leftEndOffset,d=h.rightStartOffset,i=h.rightEndOffset):(f=this.editors.right,g=this.editors.left,y=h.rightStartOffset,c=h.rightEndOffset,d=h.leftStartOffset,i=h.leftEndOffset);let l=f.ace.getValue().substring(y,c),u=g.ace.getSession().doc,p=u.indexToPosition(d,0),o=u.indexToPosition(i,0),s=g.ace.getSession().getScrollTop();Ts&&g.ace.getSession().replace(new Ts(p.row,p.column,o.row,o.column),l),g.ace.getSession().setScrollTop(parseInt(String(s),10)),this.diff()}getLineLengths(n){return n.ace.getSession().doc.getAllLines().map(t=>t.length+1)}showDiff(n,t,e,r,h){let f=this.editors[n],g=e;g<t&&(g=t);let y=`${h} ${g>t?"lines":"targetOnly"} ${n}`,c=g;if(c>t&&--c,Ts&&f.markers.push(f.ace.session.addMarker(new Ts(t,0,c,1),y,"fullLine")),this.options.charDiffs&&r&&r.length>0){let i=`${this.options.classes.diffChar} ${n}`;r.forEach(l=>{Ts&&f.markers.push(f.ace.session.addMarker(new Ts(l.lineStart,l.start,l.lineEnd-1,l.end),i,"text"))})}let d=`${this.options.classes.diffGutter} ${n}`;for(let i=t;i<g;i+=1)f.ace.session.addGutterDecoration(i,d),f.diffGutters.push({line:i,className:d})}updateGap(){this.clearDiffs(),this.decorate(),this.positionCopyContainers()}clearDiffs(){this.editors.left.markers.forEach(n=>{this.editors.left.ace.getSession().removeMarker(n)}),this.editors.right.markers.forEach(n=>{this.editors.right.ace.getSession().removeMarker(n)}),this.editors.left.markers=[],this.editors.right.markers=[],this.editors.left.diffGutters.forEach(n=>{this.editors.left.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.right.diffGutters.forEach(n=>{this.editors.right.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.left.diffGutters=[],this.editors.right.diffGutters=[]}addConnector(n,t,e,r){let h=this.editors.left.ace.getSession().getScrollTop(),f=this.editors.right.ace.getSession().getScrollTop();this.connectorYOffset=1;let g=n*this.lineHeight-h+.5,y=this.gutterWidth+1,c=e*this.lineHeight-f+.5,d=t*this.lineHeight-h+this.connectorYOffset+.5,i=this.gutterWidth+1,l=r*this.lineHeight-f+this.connectorYOffset+.5,u=Rb(-1,g,y,c),p=Rb(i,l,-1,d),o=`${u} ${`L${y},${c} ${i},${l}`} ${p} ${`L-1,${d} -1,${g}`}`,s=document.createElementNS(Tb.SVG_NS,"path");s.setAttribute("d",o),s.setAttribute("class",this.options.classes.connector??""),this.gutterSVG?.appendChild(s)}addCopyArrows(n,t){if(n.leftEndLine>n.leftStartLine&&this.options.left.copyLinkEnabled&&this.options.right.editable){let e=Lb({className:this.options.classes.newCodeConnectorLink??"",topOffset:n.leftStartLine*this.lineHeight,tooltip:"Copy to right",diffIndex:t,arrowContent:this.options.classes.newCodeConnectorLinkContent??""});this.copyRightContainer?.appendChild(e)}if(n.rightEndLine>n.rightStartLine&&this.options.right.copyLinkEnabled&&this.options.left.editable){let e=Lb({className:this.options.classes.deletedCodeConnectorLink??"",topOffset:n.rightStartLine*this.lineHeight,tooltip:"Copy to left",diffIndex:t,arrowContent:this.options.classes.deletedCodeConnectorLinkContent??""});this.copyLeftContainer?.appendChild(e)}}positionCopyContainers(){let n=this.editors.left.ace.getSession().getScrollTop(),t=this.editors.right.ace.getSession().getScrollTop();this.copyRightContainer&&(this.copyRightContainer.style.cssText=`top: ${-n}px`),this.copyLeftContainer&&(this.copyLeftContainer.style.cssText=`top: ${-t}px`)}computeDiff(n,t,e,r){let h={};if(n===1){let f=this.getSingleDiffInfo(this.editors.left,t,r),g=this.getLineForCharPosition(this.editors.right,e),y=this.getCharsOnLine(this.editors.right,g),c=this.getCharsOnLine(this.editors.left,f.startLine),d=g,i=f.startLine===f.endLine,l=0;(f.startChar>0||i&&r.length<c)&&y>0&&f.startChar<c&&l++,h={leftStartLine:f.startLine,leftEndLine:f.endLine+1,rightStartLine:d,rightEndLine:d+l,leftStartOffset:t,leftEndOffset:t+r.length,rightStartOffset:e,rightEndOffset:e,leftStartChar:f.startChar,leftEndChar:f.endChar}}else{let f=this.getSingleDiffInfo(this.editors.right,e,r),g=this.getLineForCharPosition(this.editors.left,t),y=this.getCharsOnLine(this.editors.left,g),c=this.getCharsOnLine(this.editors.right,f.startLine),d=g,i=f.startLine===f.endLine,l=0;(f.startChar>0||i&&r.length<c)&&y>0&&f.startChar<c&&l++,h={leftStartLine:d,leftEndLine:d+l,rightStartLine:f.startLine,rightEndLine:f.endLine+1,leftStartOffset:t,leftEndOffset:t,rightStartOffset:e,rightEndOffset:e+r.length,rightStartChar:f.startChar,rightEndChar:f.endChar}}return h}getSingleDiffInfo(n,t,e){let r={startLine:0,startChar:0,endLine:0,endChar:0},h=t+e.length,f=0,g=!1,y=!1;n.lineLengths.forEach((d,i)=>{f+=d,!g&&t<f&&(r.startLine=i,r.startChar=t-f+d,g=!0),!y&&h<=f&&(r.endLine=i,r.endChar=h-f+d,y=!0)}),r.startChar>0&&this.getCharsOnLine(n,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;let c=/\n$/.test(e);return r.startChar>0&&c&&r.endLine++,r}getCharsOnLine(n,t){return $I(n,t).length}getLineForCharPosition(n,t){let e=n.ace.getSession().doc.getAllLines(),r=0,h=0;for(let f=0;f<e.length;f+=1){let g=e[f];if(g!==void 0&&(h+=g.length+1),t<=h){r=f,t===h&&f<e.length-1&&(r+=1);break}}return h>=n.ace.getSession().getValue().length&&(r+=1),r}createGutter(){let n=document.getElementById(this.options.classes.gutterID);if(!n)return;this.gutterHeight=n.clientHeight,this.gutterWidth=n.clientWidth;let t=this.getTotalHeight(Rs),e=this.getTotalHeight(Ca),r=Math.max(t,e,this.gutterHeight);this.gutterSVG=document.createElementNS(Tb.SVG_NS,"svg"),this.gutterSVG.setAttribute("width",String(this.gutterWidth)),this.gutterSVG.setAttribute("height",String(r)),n.appendChild(this.gutterSVG)}getTotalHeight(n){return(n===Rs?this.editors.left:this.editors.right).ace.getSession().getLength()*this.lineHeight}createCopyContainers(){this.copyRightContainer=document.createElement("div"),this.copyRightContainer.setAttribute("class",this.options.classes.copyRightContainer??""),this.copyLeftContainer=document.createElement("div"),this.copyLeftContainer.setAttribute("class",this.options.classes.copyLeftContainer??"");let n=document.getElementById(this.options.classes.gutterID);n&&(n.appendChild(this.copyRightContainer),n.appendChild(this.copyLeftContainer))}clearGutter(){let n=document.getElementById(this.options.classes.gutterID);n&&this.gutterSVG&&n.removeChild(this.gutterSVG),this.createGutter()}clearArrows(){this.copyLeftContainer&&(this.copyLeftContainer.innerHTML=""),this.copyRightContainer&&(this.copyRightContainer.innerHTML="")}simplifyDiffs(n){let t=[],e=h=>this.options.diffGranularity===AI?h<1:h<=1,r=h=>{let f={...h,leftChars:[],rightChars:[]};return h.leftEndChar!==void 0&&f.leftChars.push({start:h.leftStartChar??0,end:h.leftEndChar,lineStart:h.leftStartLine??0,lineEnd:h.leftEndLine??0}),h.rightEndChar!==void 0&&f.rightChars.push({start:h.rightStartChar??0,end:h.rightEndChar,lineStart:h.rightStartLine??0,lineEnd:h.rightEndLine??0}),f};return n.forEach((h,f)=>{if(f===0){t.push(r(h));return}let g=!1;for(let y=0;y<t.length;y+=1)if(e(Math.abs(h.leftStartLine-t[y].leftEndLine))&&e(Math.abs(h.rightStartLine-t[y].rightEndLine))){t[y].leftStartLine=Math.min(h.leftStartLine,t[y].leftStartLine),t[y].rightStartLine=Math.min(h.rightStartLine,t[y].rightStartLine),t[y].leftEndLine=Math.max(h.leftEndLine,t[y].leftEndLine),t[y].rightEndLine=Math.max(h.rightEndLine,t[y].rightEndLine),t[y].leftStartOffset=Math.min(h.leftStartOffset,t[y].leftStartOffset),t[y].leftEndOffset=Math.max(h.leftEndOffset,t[y].leftEndOffset),t[y].rightStartOffset=Math.min(h.rightStartOffset,t[y].rightStartOffset),t[y].rightEndOffset=Math.max(h.rightEndOffset,t[y].rightEndOffset),h.leftEndChar!==void 0&&t[y].leftChars.push({start:h.leftStartChar??0,end:h.leftEndChar,lineStart:h.leftStartLine,lineEnd:h.leftEndLine}),h.rightEndChar!==void 0&&t[y].rightChars.push({start:h.rightStartChar??0,end:h.rightEndChar,lineStart:h.rightStartLine,lineEnd:h.rightEndLine}),g=!0;break}g||t.push(r(h))}),t.filter(h=>!(h.leftStartLine===h.leftEndLine&&h.rightStartLine===h.rightEndLine))}decorate(){this.clearGutter(),this.clearArrows(),this.diffs.forEach((n,t)=>{this.options.showDiffs&&(this.showDiff(Rs,n.leftStartLine,n.leftEndLine,n.leftChars,this.options.classes.diff??""),this.showDiff(Ca,n.rightStartLine,n.rightEndLine,n.rightChars,this.options.classes.diff??""),this.options.showConnectors&&this.addConnector(n.leftStartLine,n.leftEndLine,n.rightStartLine,n.rightEndLine),this.addCopyArrows(n,t))})}},Hd={exports:{}},Ud,Nb;function Wc(){if(Nb)return Ud;Nb=1;const n="2.0.0",t=256,e=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,h=t-6;return Ud={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:h,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ud}var Db,Pb;function jc(){return Pb||(Pb=1,Db=typeof process=="object"&&Pd&&Pd.NODE_DEBUG&&/\bsemver\b/i.test(Pd.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{}),Db}var Fb;function vl(){return Fb||(Fb=1,(function(n,t){const{MAX_SAFE_COMPONENT_LENGTH:e,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:h}=Wc(),f=jc();t=n.exports={};const g=t.re=[],y=t.safeRe=[],c=t.src=[],d=t.safeSrc=[],i=t.t={};let l=0;const u="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",h],[u,r]],o=m=>{for(const[w,x]of p)m=m.split(`${w}*`).join(`${w}{0,${x}}`).split(`${w}+`).join(`${w}{1,${x}}`);return m},s=(m,w,x)=>{const R=o(w),$=l++;f(m,$,w),i[m]=$,c[$]=w,d[$]=R,g[$]=new RegExp(w,x?"g":void 0),y[$]=new RegExp(R,x?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","\\d+"),s("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),s("MAINVERSION",`(${c[i.NUMERICIDENTIFIER]})\\.(${c[i.NUMERICIDENTIFIER]})\\.(${c[i.NUMERICIDENTIFIER]})`),s("MAINVERSIONLOOSE",`(${c[i.NUMERICIDENTIFIERLOOSE]})\\.(${c[i.NUMERICIDENTIFIERLOOSE]})\\.(${c[i.NUMERICIDENTIFIERLOOSE]})`),s("PRERELEASEIDENTIFIER",`(?:${c[i.NONNUMERICIDENTIFIER]}|${c[i.NUMERICIDENTIFIER]})`),s("PRERELEASEIDENTIFIERLOOSE",`(?:${c[i.NONNUMERICIDENTIFIER]}|${c[i.NUMERICIDENTIFIERLOOSE]})`),s("PRERELEASE",`(?:-(${c[i.PRERELEASEIDENTIFIER]}(?:\\.${c[i.PRERELEASEIDENTIFIER]})*))`),s("PRERELEASELOOSE",`(?:-?(${c[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[i.PRERELEASEIDENTIFIERLOOSE]})*))`),s("BUILDIDENTIFIER",`${u}+`),s("BUILD",`(?:\\+(${c[i.BUILDIDENTIFIER]}(?:\\.${c[i.BUILDIDENTIFIER]})*))`),s("FULLPLAIN",`v?${c[i.MAINVERSION]}${c[i.PRERELEASE]}?${c[i.BUILD]}?`),s("FULL",`^${c[i.FULLPLAIN]}$`),s("LOOSEPLAIN",`[v=\\s]*${c[i.MAINVERSIONLOOSE]}${c[i.PRERELEASELOOSE]}?${c[i.BUILD]}?`),s("LOOSE",`^${c[i.LOOSEPLAIN]}$`),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE",`${c[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),s("XRANGEIDENTIFIER",`${c[i.NUMERICIDENTIFIER]}|x|X|\\*`),s("XRANGEPLAIN",`[v=\\s]*(${c[i.XRANGEIDENTIFIER]})(?:\\.(${c[i.XRANGEIDENTIFIER]})(?:\\.(${c[i.XRANGEIDENTIFIER]})(?:${c[i.PRERELEASE]})?${c[i.BUILD]}?)?)?`),s("XRANGEPLAINLOOSE",`[v=\\s]*(${c[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[i.XRANGEIDENTIFIERLOOSE]})(?:${c[i.PRERELEASELOOSE]})?${c[i.BUILD]}?)?)?`),s("XRANGE",`^${c[i.GTLT]}\\s*${c[i.XRANGEPLAIN]}$`),s("XRANGELOOSE",`^${c[i.GTLT]}\\s*${c[i.XRANGEPLAINLOOSE]}$`),s("COERCEPLAIN",`(^|[^\\d])(\\d{1,${e}})(?:\\.(\\d{1,${e}}))?(?:\\.(\\d{1,${e}}))?`),s("COERCE",`${c[i.COERCEPLAIN]}(?:$|[^\\d])`),s("COERCEFULL",c[i.COERCEPLAIN]+`(?:${c[i.PRERELEASE]})?(?:${c[i.BUILD]})?(?:$|[^\\d])`),s("COERCERTL",c[i.COERCE],!0),s("COERCERTLFULL",c[i.COERCEFULL],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM",`(\\s*)${c[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",s("TILDE",`^${c[i.LONETILDE]}${c[i.XRANGEPLAIN]}$`),s("TILDELOOSE",`^${c[i.LONETILDE]}${c[i.XRANGEPLAINLOOSE]}$`),s("LONECARET","(?:\\^)"),s("CARETTRIM",`(\\s*)${c[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",s("CARET",`^${c[i.LONECARET]}${c[i.XRANGEPLAIN]}$`),s("CARETLOOSE",`^${c[i.LONECARET]}${c[i.XRANGEPLAINLOOSE]}$`),s("COMPARATORLOOSE",`^${c[i.GTLT]}\\s*(${c[i.LOOSEPLAIN]})$|^$`),s("COMPARATOR",`^${c[i.GTLT]}\\s*(${c[i.FULLPLAIN]})$|^$`),s("COMPARATORTRIM",`(\\s*)${c[i.GTLT]}\\s*(${c[i.LOOSEPLAIN]}|${c[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE",`^\\s*(${c[i.XRANGEPLAIN]})\\s+-\\s+(${c[i.XRANGEPLAIN]})\\s*$`),s("HYPHENRANGELOOSE",`^\\s*(${c[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[i.XRANGEPLAINLOOSE]})\\s*$`),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Hd,Hd.exports)),Hd.exports}var Vd,zb;function Gd(){if(zb)return Vd;zb=1;const n=Object.freeze({loose:!0}),t=Object.freeze({});return Vd=e=>e?typeof e!="object"?n:e:t,Vd}var qd,Bb;function Wb(){if(Bb)return qd;Bb=1;const n=/^[0-9]+$/,t=(e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;const h=n.test(e),f=n.test(r);return h&&f&&(e=+e,r=+r),e===r?0:h&&!f?-1:f&&!h?1:e<r?-1:1};return qd={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)},qd}var Yd,jb;function qr(){if(jb)return Yd;jb=1;const n=jc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:e}=Wc(),{safeRe:r,t:h}=vl(),f=Gd(),{compareIdentifiers:g}=Wb();class y{constructor(d,i){if(i=f(i),d instanceof y){if(d.loose===!!i.loose&&d.includePrerelease===!!i.includePrerelease)return d;d=d.version}else if(typeof d!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof d}".`);if(d.length>t)throw new TypeError(`version is longer than ${t} characters`);n("SemVer",d,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const l=d.trim().match(i.loose?r[h.LOOSE]:r[h.FULL]);if(!l)throw new TypeError(`Invalid Version: ${d}`);if(this.raw=d,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>e||this.major<0)throw new TypeError("Invalid major version");if(this.minor>e||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>e||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(u=>{if(/^[0-9]+$/.test(u)){const p=+u;if(p>=0&&p<e)return p}return u}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(d){if(n("SemVer.compare",this.version,this.options,d),!(d instanceof y)){if(typeof d=="string"&&d===this.version)return 0;d=new y(d,this.options)}return d.version===this.version?0:this.compareMain(d)||this.comparePre(d)}compareMain(d){return d instanceof y||(d=new y(d,this.options)),this.major<d.major?-1:this.major>d.major?1:this.minor<d.minor?-1:this.minor>d.minor?1:this.patch<d.patch?-1:this.patch>d.patch?1:0}comparePre(d){if(d instanceof y||(d=new y(d,this.options)),this.prerelease.length&&!d.prerelease.length)return-1;if(!this.prerelease.length&&d.prerelease.length)return 1;if(!this.prerelease.length&&!d.prerelease.length)return 0;let i=0;do{const l=this.prerelease[i],u=d.prerelease[i];if(n("prerelease compare",i,l,u),l===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(l===void 0)return-1;if(l!==u)return g(l,u)}while(++i)}compareBuild(d){d instanceof y||(d=new y(d,this.options));let i=0;do{const l=this.build[i],u=d.build[i];if(n("build compare",i,l,u),l===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(l===void 0)return-1;if(l!==u)return g(l,u)}while(++i)}inc(d,i,l){if(d.startsWith("pre")){if(!i&&l===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const u=`-${i}`.match(this.options.loose?r[h.PRERELEASELOOSE]:r[h.PRERELEASE]);if(!u||u[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(d){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,l),this.inc("pre",i,l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,l),this.inc("pre",i,l);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const u=Number(l)?1:0;if(this.prerelease.length===0)this.prerelease=[u];else{let p=this.prerelease.length;for(;--p>=0;)typeof this.prerelease[p]=="number"&&(this.prerelease[p]++,p=-2);if(p===-1){if(i===this.prerelease.join(".")&&l===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(u)}}if(i){let p=[i,u];l===!1&&(p=[i]),g(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=p):this.prerelease=p}break}default:throw new Error(`invalid increment argument: ${d}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Yd=y,Yd}var Kd,Hb;function _a(){if(Hb)return Kd;Hb=1;const n=qr();return Kd=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(h){if(!r)return null;throw h}},Kd}var Xd,Ub;function II(){if(Ub)return Xd;Ub=1;const n=_a();return Xd=(t,e)=>{const r=n(t,e);return r?r.version:null},Xd}var Jd,Vb;function LI(){if(Vb)return Jd;Vb=1;const n=_a();return Jd=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},Jd}var Zd,Gb;function OI(){if(Gb)return Zd;Gb=1;const n=qr();return Zd=(t,e,r,h,f)=>{typeof r=="string"&&(f=h,h=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,h,f).version}catch{return null}},Zd}var Qd,qb;function NI(){if(qb)return Qd;qb=1;const n=_a();return Qd=(t,e)=>{const r=n(t,null,!0),h=n(e,null,!0),f=r.compare(h);if(f===0)return null;const g=f>0,y=g?r:h,c=g?h:r,d=!!y.prerelease.length;if(c.prerelease.length&&!d){if(!c.patch&&!c.minor)return"major";if(c.compareMain(y)===0)return c.minor&&!c.patch?"minor":"patch"}const i=d?"pre":"";return r.major!==h.major?i+"major":r.minor!==h.minor?i+"minor":r.patch!==h.patch?i+"patch":"prerelease"},Qd}var ef,Yb;function DI(){if(Yb)return ef;Yb=1;const n=qr();return ef=(t,e)=>new n(t,e).major,ef}var tf,Kb;function PI(){if(Kb)return tf;Kb=1;const n=qr();return tf=(t,e)=>new n(t,e).minor,tf}var nf,Xb;function FI(){if(Xb)return nf;Xb=1;const n=qr();return nf=(t,e)=>new n(t,e).patch,nf}var rf,Jb;function zI(){if(Jb)return rf;Jb=1;const n=_a();return rf=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null},rf}var of,Zb;function eo(){if(Zb)return of;Zb=1;const n=qr();return of=(t,e,r)=>new n(t,r).compare(new n(e,r)),of}var sf,Qb;function BI(){if(Qb)return sf;Qb=1;const n=eo();return sf=(t,e,r)=>n(e,t,r),sf}var af,ew;function WI(){if(ew)return af;ew=1;const n=eo();return af=(t,e)=>n(t,e,!0),af}var lf,tw;function cf(){if(tw)return lf;tw=1;const n=qr();return lf=(t,e,r)=>{const h=new n(t,r),f=new n(e,r);return h.compare(f)||h.compareBuild(f)},lf}var uf,nw;function jI(){if(nw)return uf;nw=1;const n=cf();return uf=(t,e)=>t.sort((r,h)=>n(r,h,e)),uf}var hf,rw;function HI(){if(rw)return hf;rw=1;const n=cf();return hf=(t,e)=>t.sort((r,h)=>n(h,r,e)),hf}var df,iw;function Hc(){if(iw)return df;iw=1;const n=eo();return df=(t,e,r)=>n(t,e,r)>0,df}var ff,ow;function pf(){if(ow)return ff;ow=1;const n=eo();return ff=(t,e,r)=>n(t,e,r)<0,ff}var gf,sw;function aw(){if(sw)return gf;sw=1;const n=eo();return gf=(t,e,r)=>n(t,e,r)===0,gf}var mf,lw;function cw(){if(lw)return mf;lw=1;const n=eo();return mf=(t,e,r)=>n(t,e,r)!==0,mf}var vf,uw;function yf(){if(uw)return vf;uw=1;const n=eo();return vf=(t,e,r)=>n(t,e,r)>=0,vf}var bf,hw;function wf(){if(hw)return bf;hw=1;const n=eo();return bf=(t,e,r)=>n(t,e,r)<=0,bf}var xf,dw;function fw(){if(dw)return xf;dw=1;const n=aw(),t=cw(),e=Hc(),r=yf(),h=pf(),f=wf();return xf=(g,y,c,d)=>{switch(y){case"===":return typeof g=="object"&&(g=g.version),typeof c=="object"&&(c=c.version),g===c;case"!==":return typeof g=="object"&&(g=g.version),typeof c=="object"&&(c=c.version),g!==c;case"":case"=":case"==":return n(g,c,d);case"!=":return t(g,c,d);case">":return e(g,c,d);case">=":return r(g,c,d);case"<":return h(g,c,d);case"<=":return f(g,c,d);default:throw new TypeError(`Invalid operator: ${y}`)}},xf}var Cf,pw;function UI(){if(pw)return Cf;pw=1;const n=qr(),t=_a(),{safeRe:e,t:r}=vl();return Cf=(h,f)=>{if(h instanceof n)return h;if(typeof h=="number"&&(h=String(h)),typeof h!="string")return null;f=f||{};let g=null;if(!f.rtl)g=h.match(f.includePrerelease?e[r.COERCEFULL]:e[r.COERCE]);else{const u=f.includePrerelease?e[r.COERCERTLFULL]:e[r.COERCERTL];let p;for(;(p=u.exec(h))&&(!g||g.index+g[0].length!==h.length);)(!g||p.index+p[0].length!==g.index+g[0].length)&&(g=p),u.lastIndex=p.index+p[1].length+p[2].length;u.lastIndex=-1}if(g===null)return null;const y=g[2],c=g[3]||"0",d=g[4]||"0",i=f.includePrerelease&&g[5]?`-${g[5]}`:"",l=f.includePrerelease&&g[6]?`+${g[6]}`:"";return t(`${y}.${c}.${d}${i}${l}`,f)},Cf}var _f,gw;function VI(){if(gw)return _f;gw=1;class n{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const h=this.map.keys().next().value;this.delete(h)}this.map.set(e,r)}return this}}return _f=n,_f}var kf,mw;function to(){if(mw)return kf;mw=1;const n=/\s+/g;class t{constructor(_,M){if(M=h(M),_ instanceof t)return _.loose===!!M.loose&&_.includePrerelease===!!M.includePrerelease?_:new t(_.raw,M);if(_ instanceof f)return this.raw=_.value,this.set=[[_]],this.formatted=void 0,this;if(this.options=M,this.loose=!!M.loose,this.includePrerelease=!!M.includePrerelease,this.raw=_.trim().replace(n," "),this.set=this.raw.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(j=>!s(j[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const j of this.set)if(j.length===1&&m(j[0])){this.set=[j];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let _=0;_<this.set.length;_++){_>0&&(this.formatted+="||");const M=this.set[_];for(let B=0;B<M.length;B++)B>0&&(this.formatted+=" "),this.formatted+=M[B].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(_){const M=((this.options.includePrerelease&&p)|(this.options.loose&&o))+":"+_,B=r.get(M);if(B)return B;const j=this.options.loose,V=j?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];_=_.replace(V,F(this.options.includePrerelease)),g("hyphen replace",_),_=_.replace(c[d.COMPARATORTRIM],i),g("comparator trim",_),_=_.replace(c[d.TILDETRIM],l),g("tilde trim",_),_=_.replace(c[d.CARETTRIM],u),g("caret trim",_);let K=_.split(" ").map(se=>x(se,this.options)).join(" ").split(/\s+/).map(se=>W(se,this.options));j&&(K=K.filter(se=>(g("loose invalid filter",se,this.options),!!se.match(c[d.COMPARATORLOOSE])))),g("range list",K);const J=new Map,oe=K.map(se=>new f(se,this.options));for(const se of oe){if(s(se))return[se];J.set(se.value,se)}J.size>1&&J.has("")&&J.delete("");const ee=[...J.values()];return r.set(M,ee),ee}intersects(_,M){if(!(_ instanceof t))throw new TypeError("a Range is required");return this.set.some(B=>w(B,M)&&_.set.some(j=>w(j,M)&&B.every(V=>j.every(K=>V.intersects(K,M)))))}test(_){if(!_)return!1;if(typeof _=="string")try{_=new y(_,this.options)}catch{return!1}for(let M=0;M<this.set.length;M++)if(D(this.set[M],_,this.options))return!0;return!1}}kf=t;const e=VI(),r=new e,h=Gd(),f=Uc(),g=jc(),y=qr(),{safeRe:c,t:d,comparatorTrimReplace:i,tildeTrimReplace:l,caretTrimReplace:u}=vl(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:o}=Wc(),s=A=>A.value==="<0.0.0-0",m=A=>A.value==="",w=(A,_)=>{let M=!0;const B=A.slice();let j=B.pop();for(;M&&B.length;)M=B.every(V=>j.intersects(V,_)),j=B.pop();return M},x=(A,_)=>(A=A.replace(c[d.BUILD],""),g("comp",A,_),A=C(A,_),g("caret",A),A=$(A,_),g("tildes",A),A=N(A,_),g("xrange",A),A=I(A,_),g("stars",A),A),R=A=>!A||A.toLowerCase()==="x"||A==="*",$=(A,_)=>A.trim().split(/\s+/).map(M=>k(M,_)).join(" "),k=(A,_)=>{const M=_.loose?c[d.TILDELOOSE]:c[d.TILDE];return A.replace(M,(B,j,V,K,J)=>{g("tilde",A,B,j,V,K,J);let oe;return R(j)?oe="":R(V)?oe=`>=${j}.0.0 <${+j+1}.0.0-0`:R(K)?oe=`>=${j}.${V}.0 <${j}.${+V+1}.0-0`:J?(g("replaceTilde pr",J),oe=`>=${j}.${V}.${K}-${J} <${j}.${+V+1}.0-0`):oe=`>=${j}.${V}.${K} <${j}.${+V+1}.0-0`,g("tilde return",oe),oe})},C=(A,_)=>A.trim().split(/\s+/).map(M=>O(M,_)).join(" "),O=(A,_)=>{g("caret",A,_);const M=_.loose?c[d.CARETLOOSE]:c[d.CARET],B=_.includePrerelease?"-0":"";return A.replace(M,(j,V,K,J,oe)=>{g("caret",A,j,V,K,J,oe);let ee;return R(V)?ee="":R(K)?ee=`>=${V}.0.0${B} <${+V+1}.0.0-0`:R(J)?V==="0"?ee=`>=${V}.${K}.0${B} <${V}.${+K+1}.0-0`:ee=`>=${V}.${K}.0${B} <${+V+1}.0.0-0`:oe?(g("replaceCaret pr",oe),V==="0"?K==="0"?ee=`>=${V}.${K}.${J}-${oe} <${V}.${K}.${+J+1}-0`:ee=`>=${V}.${K}.${J}-${oe} <${V}.${+K+1}.0-0`:ee=`>=${V}.${K}.${J}-${oe} <${+V+1}.0.0-0`):(g("no pr"),V==="0"?K==="0"?ee=`>=${V}.${K}.${J}${B} <${V}.${K}.${+J+1}-0`:ee=`>=${V}.${K}.${J}${B} <${V}.${+K+1}.0-0`:ee=`>=${V}.${K}.${J} <${+V+1}.0.0-0`),g("caret return",ee),ee})},N=(A,_)=>(g("replaceXRanges",A,_),A.split(/\s+/).map(M=>L(M,_)).join(" ")),L=(A,_)=>{A=A.trim();const M=_.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return A.replace(M,(B,j,V,K,J,oe)=>{g("xRange",A,B,j,V,K,J,oe);const ee=R(V),se=ee||R(K),ce=se||R(J),he=ce;return j==="="&&he&&(j=""),oe=_.includePrerelease?"-0":"",ee?j===">"||j==="<"?B="<0.0.0-0":B="*":j&&he?(se&&(K=0),J=0,j===">"?(j=">=",se?(V=+V+1,K=0,J=0):(K=+K+1,J=0)):j==="<="&&(j="<",se?V=+V+1:K=+K+1),j==="<"&&(oe="-0"),B=`${j+V}.${K}.${J}${oe}`):se?B=`>=${V}.0.0${oe} <${+V+1}.0.0-0`:ce&&(B=`>=${V}.${K}.0${oe} <${V}.${+K+1}.0-0`),g("xRange return",B),B})},I=(A,_)=>(g("replaceStars",A,_),A.trim().replace(c[d.STAR],"")),W=(A,_)=>(g("replaceGTE0",A,_),A.trim().replace(c[_.includePrerelease?d.GTE0PRE:d.GTE0],"")),F=A=>(_,M,B,j,V,K,J,oe,ee,se,ce,he)=>(R(B)?M="":R(j)?M=`>=${B}.0.0${A?"-0":""}`:R(V)?M=`>=${B}.${j}.0${A?"-0":""}`:K?M=`>=${M}`:M=`>=${M}${A?"-0":""}`,R(ee)?oe="":R(se)?oe=`<${+ee+1}.0.0-0`:R(ce)?oe=`<${ee}.${+se+1}.0-0`:he?oe=`<=${ee}.${se}.${ce}-${he}`:A?oe=`<${ee}.${se}.${+ce+1}-0`:oe=`<=${oe}`,`${M} ${oe}`.trim()),D=(A,_,M)=>{for(let B=0;B<A.length;B++)if(!A[B].test(_))return!1;if(_.prerelease.length&&!M.includePrerelease){for(let B=0;B<A.length;B++)if(g(A[B].semver),A[B].semver!==f.ANY&&A[B].semver.prerelease.length>0){const j=A[B].semver;if(j.major===_.major&&j.minor===_.minor&&j.patch===_.patch)return!0}return!1}return!0};return kf}var Af,vw;function Uc(){if(vw)return Af;vw=1;const n=Symbol("SemVer ANY");class t{static get ANY(){return n}constructor(i,l){if(l=e(l),i instanceof t){if(i.loose===!!l.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),g("comparator",i,l),this.options=l,this.loose=!!l.loose,this.parse(i),this.semver===n?this.value="":this.value=this.operator+this.semver.version,g("comp",this)}parse(i){const l=this.options.loose?r[h.COMPARATORLOOSE]:r[h.COMPARATOR],u=i.match(l);if(!u)throw new TypeError(`Invalid comparator: ${i}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new y(u[2],this.options.loose):this.semver=n}toString(){return this.value}test(i){if(g("Comparator.test",i,this.options.loose),this.semver===n||i===n)return!0;if(typeof i=="string")try{i=new y(i,this.options)}catch{return!1}return f(i,this.operator,this.semver,this.options)}intersects(i,l){if(!(i instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(i.value,l).test(this.value):i.operator===""?i.value===""?!0:new c(this.value,l).test(i.semver):(l=e(l),l.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!l.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||f(this.semver,"<",i.semver,l)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||f(this.semver,">",i.semver,l)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}}Af=t;const e=Gd(),{safeRe:r,t:h}=vl(),f=fw(),g=jc(),y=qr(),c=to();return Af}var Sf,yw;function Vc(){if(yw)return Sf;yw=1;const n=to();return Sf=(t,e,r)=>{try{e=new n(e,r)}catch{return!1}return e.test(t)},Sf}var $f,bw;function GI(){if(bw)return $f;bw=1;const n=to();return $f=(t,e)=>new n(t,e).set.map(r=>r.map(h=>h.value).join(" ").trim().split(" ")),$f}var Ef,ww;function qI(){if(ww)return Ef;ww=1;const n=qr(),t=to();return Ef=(e,r,h)=>{let f=null,g=null,y=null;try{y=new t(r,h)}catch{return null}return e.forEach(c=>{y.test(c)&&(!f||g.compare(c)===-1)&&(f=c,g=new n(f,h))}),f},Ef}var Rf,xw;function YI(){if(xw)return Rf;xw=1;const n=qr(),t=to();return Rf=(e,r,h)=>{let f=null,g=null,y=null;try{y=new t(r,h)}catch{return null}return e.forEach(c=>{y.test(c)&&(!f||g.compare(c)===1)&&(f=c,g=new n(f,h))}),f},Rf}var Tf,Cw;function KI(){if(Cw)return Tf;Cw=1;const n=qr(),t=to(),e=Hc();return Tf=(r,h)=>{r=new t(r,h);let f=new n("0.0.0");if(r.test(f)||(f=new n("0.0.0-0"),r.test(f)))return f;f=null;for(let g=0;g<r.set.length;++g){const y=r.set[g];let c=null;y.forEach(d=>{const i=new n(d.semver.version);switch(d.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!c||e(i,c))&&(c=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${d.operator}`)}}),c&&(!f||e(f,c))&&(f=c)}return f&&r.test(f)?f:null},Tf}var Mf,_w;function XI(){if(_w)return Mf;_w=1;const n=to();return Mf=(t,e)=>{try{return new n(t,e).range||"*"}catch{return null}},Mf}var If,kw;function Lf(){if(kw)return If;kw=1;const n=qr(),t=Uc(),{ANY:e}=t,r=to(),h=Vc(),f=Hc(),g=pf(),y=wf(),c=yf();return If=(d,i,l,u)=>{d=new n(d,u),i=new r(i,u);let p,o,s,m,w;switch(l){case">":p=f,o=y,s=g,m=">",w=">=";break;case"<":p=g,o=c,s=f,m="<",w="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(h(d,i,u))return!1;for(let x=0;x<i.set.length;++x){const R=i.set[x];let $=null,k=null;if(R.forEach(C=>{C.semver===e&&(C=new t(">=0.0.0")),$=$||C,k=k||C,p(C.semver,$.semver,u)?$=C:s(C.semver,k.semver,u)&&(k=C)}),$.operator===m||$.operator===w||(!k.operator||k.operator===m)&&o(d,k.semver)||k.operator===w&&s(d,k.semver))return!1}return!0},If}var Of,Aw;function JI(){if(Aw)return Of;Aw=1;const n=Lf();return Of=(t,e,r)=>n(t,e,">",r),Of}var Nf,Sw;function ZI(){if(Sw)return Nf;Sw=1;const n=Lf();return Nf=(t,e,r)=>n(t,e,"<",r),Nf}var Df,$w;function QI(){if($w)return Df;$w=1;const n=to();return Df=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r)),Df}var Pf,Ew;function eL(){if(Ew)return Pf;Ew=1;const n=Vc(),t=eo();return Pf=(e,r,h)=>{const f=[];let g=null,y=null;const c=e.sort((u,p)=>t(u,p,h));for(const u of c)n(u,r,h)?(y=u,g||(g=u)):(y&&f.push([g,y]),y=null,g=null);g&&f.push([g,null]);const d=[];for(const[u,p]of f)u===p?d.push(u):!p&&u===c[0]?d.push("*"):p?u===c[0]?d.push(`<=${p}`):d.push(`${u} - ${p}`):d.push(`>=${u}`);const i=d.join(" || "),l=typeof r.raw=="string"?r.raw:String(r);return i.length<l.length?i:r},Pf}var Ff,Rw;function tL(){if(Rw)return Ff;Rw=1;const n=to(),t=Uc(),{ANY:e}=t,r=Vc(),h=eo(),f=(l,u,p={})=>{if(l===u)return!0;l=new n(l,p),u=new n(u,p);let o=!1;e:for(const s of l.set){for(const m of u.set){const w=c(s,m,p);if(o=o||w!==null,w)continue e}if(o)return!1}return!0},g=[new t(">=0.0.0-0")],y=[new t(">=0.0.0")],c=(l,u,p)=>{if(l===u)return!0;if(l.length===1&&l[0].semver===e){if(u.length===1&&u[0].semver===e)return!0;p.includePrerelease?l=g:l=y}if(u.length===1&&u[0].semver===e){if(p.includePrerelease)return!0;u=y}const o=new Set;let s,m;for(const N of l)N.operator===">"||N.operator===">="?s=d(s,N,p):N.operator==="<"||N.operator==="<="?m=i(m,N,p):o.add(N.semver);if(o.size>1)return null;let w;if(s&&m&&(w=h(s.semver,m.semver,p),w>0||w===0&&(s.operator!==">="||m.operator!=="<=")))return null;for(const N of o){if(s&&!r(N,String(s),p)||m&&!r(N,String(m),p))return null;for(const L of u)if(!r(N,String(L),p))return!1;return!0}let x,R,$,k,C=m&&!p.includePrerelease&&m.semver.prerelease.length?m.semver:!1,O=s&&!p.includePrerelease&&s.semver.prerelease.length?s.semver:!1;C&&C.prerelease.length===1&&m.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const N of u){if(k=k||N.operator===">"||N.operator===">=",$=$||N.operator==="<"||N.operator==="<=",s){if(O&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===O.major&&N.semver.minor===O.minor&&N.semver.patch===O.patch&&(O=!1),N.operator===">"||N.operator===">="){if(x=d(s,N,p),x===N&&x!==s)return!1}else if(s.operator===">="&&!r(s.semver,String(N),p))return!1}if(m){if(C&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===C.major&&N.semver.minor===C.minor&&N.semver.patch===C.patch&&(C=!1),N.operator==="<"||N.operator==="<="){if(R=i(m,N,p),R===N&&R!==m)return!1}else if(m.operator==="<="&&!r(m.semver,String(N),p))return!1}if(!N.operator&&(m||s)&&w!==0)return!1}return!(s&&$&&!m&&w!==0||m&&k&&!s&&w!==0||O||C)},d=(l,u,p)=>{if(!l)return u;const o=h(l.semver,u.semver,p);return o>0?l:o<0||u.operator===">"&&l.operator===">="?u:l},i=(l,u,p)=>{if(!l)return u;const o=h(l.semver,u.semver,p);return o<0?l:o>0||u.operator==="<"&&l.operator==="<="?u:l};return Ff=f,Ff}var zf,Tw;function nL(){if(Tw)return zf;Tw=1;const n=vl(),t=Wc(),e=qr(),r=Wb(),h=_a(),f=II(),g=LI(),y=OI(),c=NI(),d=DI(),i=PI(),l=FI(),u=zI(),p=eo(),o=BI(),s=WI(),m=cf(),w=jI(),x=HI(),R=Hc(),$=pf(),k=aw(),C=cw(),O=yf(),N=wf(),L=fw(),I=UI(),W=Uc(),F=to(),D=Vc(),A=GI(),_=qI(),M=YI(),B=KI(),j=XI(),V=Lf(),K=JI(),J=ZI(),oe=QI(),ee=eL(),se=tL();return zf={parse:h,valid:f,clean:g,inc:y,diff:c,major:d,minor:i,patch:l,prerelease:u,compare:p,rcompare:o,compareLoose:s,compareBuild:m,sort:w,rsort:x,gt:R,lt:$,eq:k,neq:C,gte:O,lte:N,cmp:L,coerce:I,Comparator:W,Range:F,satisfies:D,toComparators:A,maxSatisfying:_,minSatisfying:M,minVersion:B,validRange:j,outside:V,gtr:K,ltr:J,intersects:oe,simplifyRange:ee,subset:se,SemVer:e,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},zf}var rL=Tn("r",nL());const iL={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1,default:null},storePluginId:{type:Number,required:!1,default:null},storeVersionId:{type:Number,required:!1,default:null},minCosmosVersion:{type:String,required:!1,default:void 0},modelValue:Boolean},emits:["callback","update:modelValue"],data(){return{installedCosmosVersion:null,tab:0,localVariables:{},localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{value:{immediate:!0,handler:function(){const n=JSON.parse(JSON.stringify(this.variables));this.localVariables={};for(const[t,e]of Object.entries(n))typeof e=="string"?this.localVariables[t]={value:e}:this.localVariables[t]=e;this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},created(){Ku.get("/openc3-api/info").then(({data:n})=>{this.installedCosmosVersion=n.version})},mounted(){const n=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ys.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new n),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.localPluginTxt),this.editor.clearSelection(),wc.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new MI({element:this.$refs.editor,mode:new n,theme:"ace/theme/twilight",left:{content:this.localExistingPluginTxt,copyLinkEnabled:!1},right:{content:this.localPluginTxt,editable:!1}}),this.differ.getEditors().left.setFontSize(16),this.differ.getEditors().right.setFontSize(16),wc.applyVimModeIfEnabled(this.differ.getEditors().left),wc.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},methods:{previousDiff(){this.curDiff--,this.curDiff<0&&(this.curDiff=this.differ.diffs.length-1),this.scrollToCurDiff()},nextDiff(){this.curDiff++,this.curDiff>=this.differ.diffs.length&&(this.curDiff=0),this.scrollToCurDiff()},scrollToCurDiff(){if(this.differ.diffs.length===0)return;let n=this.differ.diffs[this.curDiff].leftStartLine,t=this.differ.diffs[this.curDiff].rightStartLine;n>5&&(n-=5),t>5&&(t-=5),this.differ.getEditors().left.scrollToLine(n),this.differ.getEditors().right.scrollToLine(t)},buildPluginMode(){let n=ys.require("ace/lib/oop"),t=ys.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,e=["VARIABLE","VARIABLE_DESCRIPTION","VARIABLE_STATE"],r=new RegExp(`(\\b${e.join("\\b|\\b")}\\b)`),h=function(){t.call(this);for(let i in this.$rules)this.$rules[i].unshift({regex:r,token:"support.function"})};n.inherits(h,t);let f=ys.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=ys.require("ace/mode/behaviour/cstyle").CstyleBehaviour,y=ys.require("ace/mode/folding/ruby").FoldMode,c=function(){this.HighlightRules=h,this.$outdent=new f,this.$behaviour=new g,this.foldingRules=new y,this.indentKeywords=this.foldingRules.indentKeywords},d=ys.require("ace/mode/ruby").Mode;return n.inherits(c,d),(function(){this.$id="ace/mode/openc3"}).call(c.prototype),c},checkVersionAndSubmit:function(){!this.installedCosmosVersion||!this.minCosmosVersion||rL.gte(this.installedCosmosVersion,this.minCosmosVersion)?this.submit():this.$dialog.confirm(`This plugin requires a minimum COSMOS version of ${this.minCosmosVersion}, which is greater than your installed version (${this.installedCosmosVersion}). Install anyway?`,{okText:"Install",cancelText:"Cancel"}).then(n=>{this.submit()}).catch(n=>{this.close()})},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
|
|
1491
|
-
`)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
|
1492
|
-
`)):this.$dialog.confirm("Diffs still detected! Install using 'Existing plugin.txt' (left) and ignore additional changes in the new plugin.txt (right)?",{okText:"Install",cancelText:"Cancel"}).then(n=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
|
1493
|
-
`))}).catch(n=>{})},emitSubmit(n){let t={name:this.pluginName,variables:Yp(this.localVariables),plugin_txt_lines:n,store_plugin_id:this.storePluginId,store_version_id:this.storeVersionId};this.$emit("callback",t)},close:function(){this.show=!this.show},showContextMenu:function(n){this.menuX=n.pageX,this.menuY=n.pageY;let t=this.editor.getCursorPosition(),e=this.editor.session.getTokenAt(t.row,t.column);if(e){let r=e.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&wc.toggleVimMode(this.editor)},hasOptions(n){return n.options&&n.options.length>0},getDescription(n){return n.description||""},getOptionItems(n){return n.options?n.options.map(t=>({text:t.text||t.value,value:t.value})):[]}}},oL={key:0,class:"text-body-1 text-medium-emphasis pa-3"},sL={ref:"editor",class:"editor"},aL={key:0};function lL(n,t,e,r,h,f){const g=Ue("v-card-title"),y=Ue("v-alert"),c=Ue("v-tab"),d=Ue("v-tabs"),i=Ue("v-list-item"),l=Ue("v-combobox"),u=Ue("v-text-field"),p=Ue("v-col"),o=Ue("v-row"),s=Ue("v-window-item"),m=Ue("v-list-item-title"),w=Ue("v-divider"),x=Ue("v-list"),R=Ue("v-menu"),$=Ue("v-window"),k=Ue("v-btn"),C=Ue("v-spacer"),O=Ue("v-card-actions"),N=Ue("v-card-text"),L=Ue("v-card"),I=Ue("v-dialog");return nt(),Pt(I,{modelValue:f.show,"onUpdate:modelValue":t[5]||(t[5]=W=>f.show=W),persistent:"",width:"80vw",onKeydown:Fl(f.close,["esc"])},{default:ze(()=>[We(L,null,{default:ze(()=>[We(g,null,{default:ze(()=>[Lt(gn(e.pluginName),1)]),_:1}),We(N,{class:"pt-0"},{default:ze(()=>[e.existingPluginTxt!==null?(nt(),Pt(y,{key:0,type:"warning",variant:"tonal",class:"mb-3"},{default:ze(()=>[Lt(" The existing plugin.txt is different from the "+gn(e.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+gn(e.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Hr("",!0),We(d,{modelValue:h.tab,"onUpdate:modelValue":t[0]||(t[0]=W=>h.tab=W),class:"mb-3"},{default:ze(()=>[(nt(),Pt(c,{key:0},{default:ze(()=>[...t[6]||(t[6]=[Lt(" Variables ",-1)])]),_:1})),(nt(),Pt(c,{key:1},{default:ze(()=>[...t[7]||(t[7]=[Lt(" plugin.txt ",-1)])]),_:1}))]),_:1},8,["modelValue"]),qn("form",{onSubmit:t[4]||(t[4]=ja((...W)=>n.onSubmit&&n.onSubmit(...W),["prevent"]))},[We($,{modelValue:h.tab,"onUpdate:modelValue":t[3]||(t[3]=W=>h.tab=W)},{default:ze(()=>[We(s,{value:0,eager:"true",class:"tab"},{default:ze(()=>[Object.keys(h.localVariables).length===0?(nt(),nn("div",oL," No variables defined for this plugin. ")):(nt(),Pt(o,{key:1,class:"pt-2"},{default:ze(()=>[(nt(!0),nn(ii,null,ho(h.localVariables,(W,F)=>(nt(),Pt(p,{key:F,cols:"12",sm:"6",md:"3"},{default:ze(()=>[f.hasOptions(W)?(nt(),Pt(l,{key:0,modelValue:W.value,"onUpdate:modelValue":D=>W.value=D,items:f.getOptionItems(W),"item-title":"text","item-value":"value","return-object":!1,label:F,hint:f.getDescription(W),"persistent-hint":"",density:"comfortable",variant:"outlined","data-test":"variable-combobox"},{item:ze(({item:D,props:A})=>[We(i,Wa({ref_for:!0},A),{title:ze(()=>[Lt(gn(D.raw.text),1)]),_:2},1040)]),_:1},8,["modelValue","onUpdate:modelValue","items","label","hint"])):(nt(),Pt(u,{key:1,modelValue:W.value,"onUpdate:modelValue":D=>W.value=D,label:F,hint:f.getDescription(W),"persistent-hint":"",clearable:"",density:"comfortable",variant:"outlined","data-test":"variable-text"},null,8,["modelValue","onUpdate:modelValue","label","hint"]))]),_:2},1024))),128))]),_:1}))]),_:1}),e.existingPluginTxt===null?(nt(),Pt(s,{key:0,value:1,eager:"true",class:"tab"},{default:ze(()=>[We(o,{class:"pa-3"},{default:ze(()=>[We(p,null,{default:ze(()=>[...t[8]||(t[8]=[Lt(" This can be edited before installation. ",-1)])]),_:1})]),_:1}),qn("pre",{ref:"editor",class:"editor",onContextmenu:t[1]||(t[1]=ja((...W)=>f.showContextMenu&&f.showContextMenu(...W),["prevent"]))},null,544),We(R,{modelValue:h.contextMenu,"onUpdate:modelValue":t[2]||(t[2]=W=>h.contextMenu=W),target:[h.menuX,h.menuY]},{default:ze(()=>[We(x,null,{default:ze(()=>[We(i,{link:""},{default:ze(()=>[We(m,{onClick:n.openDocumentation},{default:ze(()=>[Lt(gn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(w),We(i,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:f.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(nt(),Pt(s,{key:1,value:1,eager:"true",class:"tab"},{default:ze(()=>[We(o,{class:"pa-3"},{default:ze(()=>[We(p,null,{default:ze(()=>[...t[9]||(t[9]=[Lt(" Existing plugin.txt. This can be edited before installation. ",-1)])]),_:1}),We(p,{class:"ml-6"},{default:ze(()=>[...t[10]||(t[10]=[Lt(" Uneditable plugin.txt from the new plugin. ",-1)])]),_:1})]),_:1}),qn("pre",sL,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(O,{class:"px-2 mt-2"},{default:ze(()=>[e.existingPluginTxt!==null?(nt(),nn("div",aL,[We(k,{variant:"text",onClick:f.nextDiff},{default:ze(()=>[...t[11]||(t[11]=[Lt(" Next Diff ",-1)])]),_:1},8,["onClick"]),We(k,{variant:"text",onClick:f.previousDiff},{default:ze(()=>[...t[12]||(t[12]=[Lt(" Previous Diff ",-1)])]),_:1},8,["onClick"])])):Hr("",!0),We(C),We(k,{variant:"outlined","data-test":"edit-cancel",onClick:ja(f.close,["prevent"])},{default:ze(()=>[...t[13]||(t[13]=[Lt(" Cancel ",-1)])]),_:1},8,["onClick"]),We(k,{variant:"flat","data-test":"edit-submit",onClick:f.checkVersionAndSubmit},{default:ze(()=>[...t[14]||(t[14]=[Lt(" Install ",-1)])]),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const oB=Tn("a",qi(iL,[["render",lL],["__scopeId","data-v-5375c2b3"]])),cL=Fd.find(n=>n.name==="PluginsTab"),Mw=[{path:"/",component:rI,children:[{component:cL.component,path:""},...Fd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:VM}];Mw.forEach(n=>hg(n));const uL=og({history:sg(),routes:Mw}),{entries:Iw,setPrototypeOf:Lw,isFrozen:hL,getPrototypeOf:dL,getOwnPropertyDescriptor:fL}=Object;let{freeze:Yr,seal:Di,create:ka}=Object,{apply:Bf,construct:Wf}=typeof Reflect<"u"&&Reflect;Yr||(Yr=function(n){return n}),Di||(Di=function(n){return n}),Bf||(Bf=function(n,t){for(var e=arguments.length,r=new Array(e>2?e-2:0),h=2;h<e;h++)r[h-2]=arguments[h];return n.apply(t,r)}),Wf||(Wf=function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return new n(...e)});const yl=tr(Array.prototype.forEach),pL=tr(Array.prototype.lastIndexOf),Ow=tr(Array.prototype.pop),bl=tr(Array.prototype.push),gL=tr(Array.prototype.splice),Kr=Array.isArray,wl=tr(String.prototype.toLowerCase),jf=tr(String.prototype.toString),Nw=tr(String.prototype.match),Aa=tr(String.prototype.replace),Dw=tr(String.prototype.indexOf),mL=tr(String.prototype.trim),vL=tr(Number.prototype.toString),yL=tr(Boolean.prototype.toString),Pw=typeof BigInt>"u"?null:tr(BigInt.prototype.toString),Fw=typeof Symbol>"u"?null:tr(Symbol.prototype.toString),jn=tr(Object.prototype.hasOwnProperty),xl=tr(Object.prototype.toString),Cr=tr(RegExp.prototype.test),Gc=bL(TypeError);function tr(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),h=1;h<e;h++)r[h-1]=arguments[h];return Bf(n,t,r)}}function bL(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Wf(n,e)}}function Ot(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wl;if(Lw&&Lw(n,null),!Kr(t))return n;let r=t.length;for(;r--;){let h=t[r];if(typeof h=="string"){const f=e(h);f!==h&&(hL(t)||(t[r]=f),h=f)}n[h]=!0}return n}function wL(n){for(let t=0;t<n.length;t++)jn(n,t)||(n[t]=null);return n}function ci(n){const t=ka(null);for(const[e,r]of Iw(n))jn(n,e)&&(Kr(r)?t[e]=wL(r):r&&typeof r=="object"&&r.constructor===Object?t[e]=ci(r):t[e]=r);return t}function xL(n){switch(typeof n){case"string":return n;case"number":return vL(n);case"boolean":return yL(n);case"bigint":return Pw?Pw(n):"0";case"symbol":return Fw?Fw(n):"Symbol()";case"undefined":return xl(n);case"function":case"object":{if(n===null)return xl(n);const t=n,e=Sa(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:xl(r)}return xl(n)}default:return xl(n)}}function Sa(n,t){for(;n!==null;){const r=fL(n,t);if(r){if(r.get)return tr(r.get);if(typeof r.value=="function")return tr(r.value)}n=dL(n)}function e(){return null}return e}function CL(n){try{return Cr(n,""),!0}catch{return!1}}const zw=Yr(["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"]),Hf=Yr(["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"]),Uf=Yr(["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"]),_L=Yr(["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"]),Vf=Yr(["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"]),kL=Yr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Bw=Yr(["#text"]),Ww=Yr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Gf=Yr(["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"]),jw=Yr(["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"]),qc=Yr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),AL=Di(/\{\{[\w\W]*|[\w\W]*\}\}/gm),SL=Di(/<%[\w\W]*|[\w\W]*%>/gm),$L=Di(/\$\{[\w\W]*/gm),EL=Di(/^data-[\-\w.\u00B7-\uFFFF]+$/),RL=Di(/^aria-[\-\w]+$/),Hw=Di(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TL=Di(/^(?:\w+script|data):/i),ML=Di(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Uw=Di(/^html$/i),IL=Di(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vw=Object.freeze({__proto__:null,ARIA_ATTR:RL,ATTR_WHITESPACE:ML,CUSTOM_ELEMENT:IL,DATA_ATTR:EL,DOCTYPE_NAME:Uw,ERB_EXPR:SL,IS_ALLOWED_URI:Hw,IS_SCRIPT_OR_DATA:TL,MUSTACHE_EXPR:AL,TMPLIT_EXPR:$L});const Cl={element:1,text:3,progressingInstruction:7,comment:8,document:9},LL=function(){return typeof window>"u"?null:window},OL=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const h="dompurify"+(e?"#"+e:"");try{return n.createPolicy(h,{createHTML(f){return f},createScriptURL(f){return f}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},Gw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:LL();const t=ae=>qw(ae);if(t.version="3.4.1",t.removed=[],!n||!n.document||n.document.nodeType!==Cl.document||!n.Element)return t.isSupported=!1,t;let{document:e}=n;const r=e,h=r.currentScript,{DocumentFragment:f,HTMLTemplateElement:g,Node:y,Element:c,NodeFilter:d,NamedNodeMap:i=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:l,DOMParser:u,trustedTypes:p}=n,o=c.prototype,s=Sa(o,"cloneNode"),m=Sa(o,"remove"),w=Sa(o,"nextSibling"),x=Sa(o,"childNodes"),R=Sa(o,"parentNode");if(typeof g=="function"){const ae=e.createElement("template");ae.content&&ae.content.ownerDocument&&(e=ae.content.ownerDocument)}let $,k="";const{implementation:C,createNodeIterator:O,createDocumentFragment:N,getElementsByTagName:L}=e,{importNode:I}=r;let W=Gw();t.isSupported=typeof Iw=="function"&&typeof R=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:D,TMPLIT_EXPR:A,DATA_ATTR:_,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:V}=Vw;let{IS_ALLOWED_URI:K}=Vw,J=null;const oe=Ot({},[...zw,...Hf,...Uf,...Vf,...Bw]);let ee=null;const se=Ot({},[...Ww,...Gf,...jw,...qc]);let ce=Object.seal(ka(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}})),he=null,me=null;const $e=Object.seal(ka(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,Re=!0,rt=!1,Xe=!0,at=!1,ut=!0,st=!1,Ht=!1,_r=!1,Rt=!1,cr=!1,Mn=!1,kr=!0,yn=!1;const ur="user-content-";let pt=!0,Ke=!1,Tt={},en=null;const Dn=Ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xn=null;const hr=Ot({},["audio","video","img","source","image","track"]);let bn=null;const Hn=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",an="http://www.w3.org/1999/xhtml";let Nr=an,Xr=!1,Ar=null;const Ci=Ot({},[Pn,Xt,an],jf);let _i=Ot({},["mi","mo","mn","ms","mtext"]),nr=Ot({},["annotation-xml"]);const no=Ot({},["title","style","font","a","script"]);let Jr=null;const Ms=["application/xhtml+xml","text/html"],Zr="text/html";let $n=null,ki=null;const Ro=e.createElement("form"),ui=function(ae){return ae instanceof RegExp||ae instanceof Function},En=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ki&&ki===ae)return;(!ae||typeof ae!="object")&&(ae={}),ae=ci(ae),Jr=Ms.indexOf(ae.PARSER_MEDIA_TYPE)===-1?Zr:ae.PARSER_MEDIA_TYPE,$n=Jr==="application/xhtml+xml"?jf:wl,J=jn(ae,"ALLOWED_TAGS")&&Kr(ae.ALLOWED_TAGS)?Ot({},ae.ALLOWED_TAGS,$n):oe,ee=jn(ae,"ALLOWED_ATTR")&&Kr(ae.ALLOWED_ATTR)?Ot({},ae.ALLOWED_ATTR,$n):se,Ar=jn(ae,"ALLOWED_NAMESPACES")&&Kr(ae.ALLOWED_NAMESPACES)?Ot({},ae.ALLOWED_NAMESPACES,jf):Ci,bn=jn(ae,"ADD_URI_SAFE_ATTR")&&Kr(ae.ADD_URI_SAFE_ATTR)?Ot(ci(Hn),ae.ADD_URI_SAFE_ATTR,$n):Hn,Xn=jn(ae,"ADD_DATA_URI_TAGS")&&Kr(ae.ADD_DATA_URI_TAGS)?Ot(ci(hr),ae.ADD_DATA_URI_TAGS,$n):hr,en=jn(ae,"FORBID_CONTENTS")&&Kr(ae.FORBID_CONTENTS)?Ot({},ae.FORBID_CONTENTS,$n):Dn,he=jn(ae,"FORBID_TAGS")&&Kr(ae.FORBID_TAGS)?Ot({},ae.FORBID_TAGS,$n):ci({}),me=jn(ae,"FORBID_ATTR")&&Kr(ae.FORBID_ATTR)?Ot({},ae.FORBID_ATTR,$n):ci({}),Tt=jn(ae,"USE_PROFILES")?ae.USE_PROFILES&&typeof ae.USE_PROFILES=="object"?ci(ae.USE_PROFILES):ae.USE_PROFILES:!1,Ee=ae.ALLOW_ARIA_ATTR!==!1,Re=ae.ALLOW_DATA_ATTR!==!1,rt=ae.ALLOW_UNKNOWN_PROTOCOLS||!1,Xe=ae.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=ae.SAFE_FOR_TEMPLATES||!1,ut=ae.SAFE_FOR_XML!==!1,st=ae.WHOLE_DOCUMENT||!1,Rt=ae.RETURN_DOM||!1,cr=ae.RETURN_DOM_FRAGMENT||!1,Mn=ae.RETURN_TRUSTED_TYPE||!1,_r=ae.FORCE_BODY||!1,kr=ae.SANITIZE_DOM!==!1,yn=ae.SANITIZE_NAMED_PROPS||!1,pt=ae.KEEP_CONTENT!==!1,Ke=ae.IN_PLACE||!1,K=CL(ae.ALLOWED_URI_REGEXP)?ae.ALLOWED_URI_REGEXP:Hw,Nr=typeof ae.NAMESPACE=="string"?ae.NAMESPACE:an,_i=jn(ae,"MATHML_TEXT_INTEGRATION_POINTS")&&ae.MATHML_TEXT_INTEGRATION_POINTS&&typeof ae.MATHML_TEXT_INTEGRATION_POINTS=="object"?ci(ae.MATHML_TEXT_INTEGRATION_POINTS):Ot({},["mi","mo","mn","ms","mtext"]),nr=jn(ae,"HTML_INTEGRATION_POINTS")&&ae.HTML_INTEGRATION_POINTS&&typeof ae.HTML_INTEGRATION_POINTS=="object"?ci(ae.HTML_INTEGRATION_POINTS):Ot({},["annotation-xml"]);const Ne=jn(ae,"CUSTOM_ELEMENT_HANDLING")&&ae.CUSTOM_ELEMENT_HANDLING&&typeof ae.CUSTOM_ELEMENT_HANDLING=="object"?ci(ae.CUSTOM_ELEMENT_HANDLING):ka(null);if(ce=ka(null),jn(Ne,"tagNameCheck")&&ui(Ne.tagNameCheck)&&(ce.tagNameCheck=Ne.tagNameCheck),jn(Ne,"attributeNameCheck")&&ui(Ne.attributeNameCheck)&&(ce.attributeNameCheck=Ne.attributeNameCheck),jn(Ne,"allowCustomizedBuiltInElements")&&typeof Ne.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=Ne.allowCustomizedBuiltInElements),at&&(Re=!1),cr&&(Rt=!0),Tt&&(J=Ot({},Bw),ee=ka(null),Tt.html===!0&&(Ot(J,zw),Ot(ee,Ww)),Tt.svg===!0&&(Ot(J,Hf),Ot(ee,Gf),Ot(ee,qc)),Tt.svgFilters===!0&&(Ot(J,Uf),Ot(ee,Gf),Ot(ee,qc)),Tt.mathMl===!0&&(Ot(J,Vf),Ot(ee,jw),Ot(ee,qc))),$e.tagCheck=null,$e.attributeCheck=null,jn(ae,"ADD_TAGS")&&(typeof ae.ADD_TAGS=="function"?$e.tagCheck=ae.ADD_TAGS:Kr(ae.ADD_TAGS)&&(J===oe&&(J=ci(J)),Ot(J,ae.ADD_TAGS,$n))),jn(ae,"ADD_ATTR")&&(typeof ae.ADD_ATTR=="function"?$e.attributeCheck=ae.ADD_ATTR:Kr(ae.ADD_ATTR)&&(ee===se&&(ee=ci(ee)),Ot(ee,ae.ADD_ATTR,$n))),jn(ae,"ADD_URI_SAFE_ATTR")&&Kr(ae.ADD_URI_SAFE_ATTR)&&Ot(bn,ae.ADD_URI_SAFE_ATTR,$n),jn(ae,"FORBID_CONTENTS")&&Kr(ae.FORBID_CONTENTS)&&(en===Dn&&(en=ci(en)),Ot(en,ae.FORBID_CONTENTS,$n)),jn(ae,"ADD_FORBID_CONTENTS")&&Kr(ae.ADD_FORBID_CONTENTS)&&(en===Dn&&(en=ci(en)),Ot(en,ae.ADD_FORBID_CONTENTS,$n)),pt&&(J["#text"]=!0),st&&Ot(J,["html","head","body"]),J.table&&(Ot(J,["tbody"]),delete he.tbody),ae.TRUSTED_TYPES_POLICY){if(typeof ae.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ae.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=ae.TRUSTED_TYPES_POLICY,k=$.createHTML("")}else $===void 0&&($=OL(p,h)),$!==null&&typeof k=="string"&&(k=$.createHTML(""));Yr&&Yr(ae),ki=ae},Sr=Ot({},[...Hf,...Uf,..._L]),Dr=Ot({},[...Vf,...kL]),Fn=function(ae){let Ne=R(ae);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:Nr,tagName:"template"});const He=wl(ae.tagName),_t=wl(Ne.tagName);return Ar[ae.namespaceURI]?ae.namespaceURI===Xt?Ne.namespaceURI===an?He==="svg":Ne.namespaceURI===Pn?He==="svg"&&(_t==="annotation-xml"||_i[_t]):!!Sr[He]:ae.namespaceURI===Pn?Ne.namespaceURI===an?He==="math":Ne.namespaceURI===Xt?He==="math"&&nr[_t]:!!Dr[He]:ae.namespaceURI===an?Ne.namespaceURI===Xt&&!nr[_t]||Ne.namespaceURI===Pn&&!_i[_t]?!1:!Dr[He]&&(no[He]||!Sr[He]):!!(Jr==="application/xhtml+xml"&&Ar[ae.namespaceURI]):!1},_n=function(ae){bl(t.removed,{element:ae});try{R(ae).removeChild(ae)}catch{m(ae)}},yr=function(ae,Ne){try{bl(t.removed,{attribute:Ne.getAttributeNode(ae),from:Ne})}catch{bl(t.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(ae),ae==="is")if(Rt||cr)try{_n(Ne)}catch{}else try{Ne.setAttribute(ae,"")}catch{}},hi=function(ae){let Ne=null,He=null;if(_r)ae="<remove></remove>"+ae;else{const Yt=Nw(ae,/^[\r\n\t ]+/);He=Yt&&Yt[0]}Jr==="application/xhtml+xml"&&Nr===an&&(ae='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ae+"</body></html>");const _t=$?$.createHTML(ae):ae;if(Nr===an)try{Ne=new u().parseFromString(_t,Jr)}catch{}if(!Ne||!Ne.documentElement){Ne=C.createDocument(Nr,"template",null);try{Ne.documentElement.innerHTML=Xr?k:_t}catch{}}const wn=Ne.body||Ne.documentElement;return ae&&He&&wn.insertBefore(e.createTextNode(He),wn.childNodes[0]||null),Nr===an?L.call(Ne,st?"html":"body")[0]:st?Ne.documentElement:wn},go=function(ae){return O.call(ae.ownerDocument||ae,ae,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},mo=function(ae){return ae instanceof l&&(typeof ae.nodeName!="string"||typeof ae.textContent!="string"||typeof ae.removeChild!="function"||!(ae.attributes instanceof i)||typeof ae.removeAttribute!="function"||typeof ae.setAttribute!="function"||typeof ae.namespaceURI!="string"||typeof ae.insertBefore!="function"||typeof ae.hasChildNodes!="function")},To=function(ae){return typeof y=="function"&&ae instanceof y};function Pr(ae,Ne,He){yl(ae,_t=>{_t.call(t,Ne,He,ki)})}const di=function(ae){let Ne=null;if(Pr(W.beforeSanitizeElements,ae,null),mo(ae))return _n(ae),!0;const He=$n(ae.nodeName);if(Pr(W.uponSanitizeElement,ae,{tagName:He,allowedTags:J}),ut&&ae.hasChildNodes()&&!To(ae.firstElementChild)&&Cr(/<[/\w!]/g,ae.innerHTML)&&Cr(/<[/\w!]/g,ae.textContent)||ut&&ae.namespaceURI===an&&He==="style"&&To(ae.firstElementChild)||ae.nodeType===Cl.progressingInstruction||ut&&ae.nodeType===Cl.comment&&Cr(/<[/\w]/g,ae.data))return _n(ae),!0;if(he[He]||!($e.tagCheck instanceof Function&&$e.tagCheck(He))&&!J[He]){if(!he[He]&&Mo(He)&&(ce.tagNameCheck instanceof RegExp&&Cr(ce.tagNameCheck,He)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(He)))return!1;if(pt&&!en[He]){const _t=R(ae)||ae.parentNode,wn=x(ae)||ae.childNodes;if(wn&&_t){const Yt=wn.length;for(let $r=Yt-1;$r>=0;--$r){const Jn=s(wn[$r],!0);_t.insertBefore(Jn,w(ae))}}}return _n(ae),!0}return ae instanceof c&&!Fn(ae)||(He==="noscript"||He==="noembed"||He==="noframes")&&Cr(/<\/no(script|embed|frames)/i,ae.innerHTML)?(_n(ae),!0):(at&&ae.nodeType===Cl.text&&(Ne=ae.textContent,yl([F,D,A],_t=>{Ne=Aa(Ne,_t," ")}),ae.textContent!==Ne&&(bl(t.removed,{element:ae.cloneNode()}),ae.textContent=Ne)),Pr(W.afterSanitizeElements,ae,null),!1)},Qr=function(ae,Ne,He){if(me[Ne]||kr&&(Ne==="id"||Ne==="name")&&(He in e||He in Ro))return!1;if(!(Re&&!me[Ne]&&Cr(_,Ne))&&!(Ee&&Cr(M,Ne))&&!($e.attributeCheck instanceof Function&&$e.attributeCheck(Ne,ae))){if(!ee[Ne]||me[Ne]){if(!(Mo(ae)&&(ce.tagNameCheck instanceof RegExp&&Cr(ce.tagNameCheck,ae)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(ae))&&(ce.attributeNameCheck instanceof RegExp&&Cr(ce.attributeNameCheck,Ne)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(Ne,ae))||Ne==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&Cr(ce.tagNameCheck,He)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(He))))return!1}else if(!bn[Ne]&&!Cr(K,Aa(He,j,""))&&!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&ae!=="script"&&Dw(He,"data:")===0&&Xn[ae])&&!(rt&&!Cr(B,Aa(He,j,"")))&&He)return!1}return!0},Ft=Ot({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mo=function(ae){return!Ft[wl(ae)]&&Cr(V,ae)},dr=function(ae){Pr(W.beforeSanitizeAttributes,ae,null);const{attributes:Ne}=ae;if(!Ne||mo(ae))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let _t=Ne.length;for(;_t--;){const wn=Ne[_t],{name:Yt,namespaceURI:$r,value:Jn}=wn,fn=$n(Yt),br=Jn;let xn=Yt==="value"?br:mL(br);if(He.attrName=fn,He.attrValue=xn,He.keepAttr=!0,He.forceKeepAttr=void 0,Pr(W.uponSanitizeAttribute,ae,He),xn=He.attrValue,yn&&(fn==="id"||fn==="name")&&Dw(xn,ur)!==0&&(yr(Yt,ae),xn=ur+xn),ut&&Cr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xn)){yr(Yt,ae);continue}if(fn==="attributename"&&Nw(xn,"href")){yr(Yt,ae);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){yr(Yt,ae);continue}if(!Xe&&Cr(/\/>/i,xn)){yr(Yt,ae);continue}at&&yl([F,D,A],vo=>{xn=Aa(xn,vo," ")});const wr=$n(ae.nodeName);if(!Qr(wr,fn,xn)){yr(Yt,ae);continue}if($&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!$r)switch(p.getAttributeType(wr,fn)){case"TrustedHTML":{xn=$.createHTML(xn);break}case"TrustedScriptURL":{xn=$.createScriptURL(xn);break}}if(xn!==br)try{$r?ae.setAttributeNS($r,Yt,xn):ae.setAttribute(Yt,xn),mo(ae)?_n(ae):Ow(t.removed)}catch{yr(Yt,ae)}}Pr(W.afterSanitizeAttributes,ae,null)},In=function(ae){let Ne=null;const He=go(ae);for(Pr(W.beforeSanitizeShadowDOM,ae,null);Ne=He.nextNode();)Pr(W.uponSanitizeShadowNode,Ne,null),di(Ne),dr(Ne),Ne.content instanceof f&&In(Ne.content);Pr(W.afterSanitizeShadowDOM,ae,null)};return t.sanitize=function(ae){let Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=null,_t=null,wn=null,Yt=null;if(Xr=!ae,Xr&&(ae="<!-->"),typeof ae!="string"&&!To(ae)&&(ae=xL(ae),typeof ae!="string"))throw Gc("dirty is not a string, aborting");if(!t.isSupported)return ae;if(Ht||En(Ne),t.removed=[],typeof ae=="string"&&(Ke=!1),Ke){const fn=ae.nodeName;if(typeof fn=="string"){const br=$n(fn);if(!J[br]||he[br])throw Gc("root node is forbidden and cannot be sanitized in-place")}}else if(ae instanceof y)He=hi("<!---->"),_t=He.ownerDocument.importNode(ae,!0),_t.nodeType===Cl.element&&_t.nodeName==="BODY"||_t.nodeName==="HTML"?He=_t:He.appendChild(_t);else{if(!Rt&&!at&&!st&&ae.indexOf("<")===-1)return $&&Mn?$.createHTML(ae):ae;if(He=hi(ae),!He)return Rt?null:Mn?k:""}He&&_r&&_n(He.firstChild);const $r=go(Ke?ae:He);for(;wn=$r.nextNode();)di(wn),dr(wn),wn.content instanceof f&&In(wn.content);if(Ke)return ae;if(Rt){if(at){He.normalize();let fn=He.innerHTML;yl([F,D,A],br=>{fn=Aa(fn,br," ")}),He.innerHTML=fn}if(cr)for(Yt=N.call(He.ownerDocument);He.firstChild;)Yt.appendChild(He.firstChild);else Yt=He;return(ee.shadowroot||ee.shadowrootmode)&&(Yt=I.call(r,Yt,!0)),Yt}let Jn=st?He.outerHTML:He.innerHTML;return st&&J["!doctype"]&&He.ownerDocument&&He.ownerDocument.doctype&&He.ownerDocument.doctype.name&&Cr(Uw,He.ownerDocument.doctype.name)&&(Jn="<!DOCTYPE "+He.ownerDocument.doctype.name+`>
|
|
1494
|
-
`+Jn),at&&yl([F,D,A],fn=>{Jn=Aa(Jn,fn," ")}),$&&Mn?$.createHTML(Jn):Jn},t.setConfig=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};En(ae),Ht=!0},t.clearConfig=function(){ki=null,Ht=!1},t.isValidAttribute=function(ae,Ne,He){ki||En({});const _t=$n(ae),wn=$n(Ne);return Qr(_t,wn,He)},t.addHook=function(ae,Ne){typeof Ne=="function"&&bl(W[ae],Ne)},t.removeHook=function(ae,Ne){if(Ne!==void 0){const He=pL(W[ae],Ne);return He===-1?void 0:gL(W[ae],He,1)[0]}return Ow(W[ae])},t.removeHooks=function(ae){W[ae]=[]},t.removeAllHooks=function(){W=Gw()},t}var NL=qw();const DL={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"}},PL={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return NL.sanitize(this.params.text)}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},FL=["innerHTML"],zL={key:2},BL={key:3,class:"validate mt-4"};function WL(n,t,e,r,h,f){const g=Ue("v-spacer"),y=Ue("v-toolbar"),c=Ue("v-icon"),d=Ue("v-text-field"),i=Ue("v-card-text"),l=Ue("v-btn"),u=Ue("v-card-actions"),p=Ue("v-card"),o=Ue("v-dialog"),s=Ue("v-app");return nt(),Pt(s,null,{default:ze(()=>[We(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=m=>n.show=m),persistent:"",width:"600",onKeydown:Fl(f.cancel,["esc"])},{default:ze(()=>[We(p,null,{default:ze(()=>[We(y,{height:"24"},{default:ze(()=>[We(g),qn("span",null,gn(n.params.title),1),We(g)]),_:1}),We(i,{class:"mt-4 pa-3"},{default:ze(()=>[n.params.validateText?(nt(),Pt(c,{key:0,class:"mr-2"},{default:ze(()=>[...t[2]||(t[2]=[Lt(" mdi-alert ",-1)])]),_:1})):Hr("",!0),n.params.html?(nt(),nn("span",{key:1,innerHTML:f.sanitizedText},null,8,FL)):(nt(),nn("span",zL,gn(f.sanitizedText),1)),n.params.validateText?(nt(),nn("div",BL,[Lt(" Enter "+gn(n.params.validateText)+" to confirm! ",1),We(d,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=m=>n.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Hr("",!0)]),_:1}),We(u,{class:"px-2"},{default:ze(()=>[We(g),n.params.cancelText?(nt(),Pt(l,{key:0,variant:"outlined","data-test":f.dataTestCancel,onClick:f.cancel},{default:ze(()=>[Lt(gn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Hr("",!0),We(l,{variant:"flat",color:n.params.okClass,"data-test":f.dataTestOk,onClick:f.ok},{default:ze(()=>[Lt(gn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const jL=qi(PL,[["render",WL],["__scopeId","data-v-53691296"]]);class HL{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(jL);t.use(Yf);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:h,validateText:f,cancelText:g,html:y}){return this.mount(),new Promise((c,d)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:h,validateText:f,cancelText:g,html:y},c,d)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:h,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:h="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:h,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:h="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:f,validateText:r,cancelText:h,html:!1})}}const UL={install(n,t){const e=new HL;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},VL={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`
|
|
1495
|
-
--toast-bg-color:${Dd[this.toastNotification.level]};
|
|
1496
|
-
--toast-fg-color:${NM(this.toastNotification.level)};
|
|
1497
|
-
`},contentStyle:function(){return`
|
|
1498
|
-
white-space: ${this.expanded?"normal":"nowrap"};
|
|
1499
|
-
overflow-x: ${this.expanded?"visible":"hidden"};
|
|
1500
|
-
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
|
1501
|
-
`}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},GL={key:0,class:"text-subtitle-1 mr-1 notification-text"},qL={key:1,class:"text-body-2 notification-text"},YL={key:2,class:"text-body-2 notification-text"};function KL(n,t,e,r,h,f){const g=Ue("v-icon"),y=Ue("v-spacer"),c=Ue("v-btn"),d=Ue("v-sheet"),i=Ue("v-slide-y-transition");return nt(),Pt(i,null,{default:ze(()=>[rg(We(d,{style:ls(f.toastStyle),class:"toast-notification",onClick:f.expand},{default:ze(()=>[We(g,{class:"mr-1 notification-text"},{default:ze(()=>[Lt(gn(f.toastNotificationIcon),1)]),_:1}),qn("div",{class:"toast-content",style:ls(f.contentStyle)},[n.toastNotification.title?(nt(),nn("span",GL,[n.toastNotification.body||n.toastNotification.message?(nt(),nn(ii,{key:0},[Lt(gn(n.toastNotification.title)+": ",1)],64)):(nt(),nn(ii,{key:1},[Lt(gn(n.toastNotification.title),1)],64))])):Hr("",!0),n.toastNotification.body?(nt(),nn("span",qL,gn(n.toastNotification.body),1)):Hr("",!0),n.toastNotification.message?(nt(),nn("span",YL,gn(n.toastNotification.message),1)):Hr("",!0)],4),We(y),We(c,{variant:"text",class:"notification-text",onClick:ja(f.hide,["stop"])},{default:ze(()=>[...t[0]||(t[0]=[Lt(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ig,n.showToast]])]),_:1})}const XL=qi(VL,[["render",KL],["__scopeId","data-v-ef96840d"]]);class JL{constructor(t={}){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=pb()),this.store}mount(){if(this.mounted)return;const t=Iu(XL);t.use(Yf);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:h,level:f,duration:g,type:y="alert",logToConsole:c=!1,saveToHistory:d=!0}){this.mount(),c&&console.log(h?`${f.toUpperCase()} - ${h}`:`${f.toUpperCase()} - ${e}: ${r}`),d&&this.getStore().notifyAddHistory({title:e,body:r,message:h,level:f}),this[t]({title:e,body:r,message:h,level:f,duration:g,type:y})}toast({title:t,body:e,message:r,level:h,duration:f,type:g}){this.$root.toast({title:t,body:e,message:r,level:h,type:g},f)}critical({title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y})}caution({title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y})}off({title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:h,duration:f,logToConsole:g,saveToHistory:y})}}const ZL={install(n,t){const e=new JL(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}};function QL(n){Xp(`Vuetify: ${n}`)}function Yw(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function eO(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function Kw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const h in n)r[h]=n[h];for(const h in t){const f=n[h],g=t[h];if(Yw(f)&&Yw(g)){r[h]=Kw(f,g,e);continue}if(e&&Array.isArray(f)&&Array.isArray(g)){r[h]=e(f,g);continue}r[h]=g}return r}function _l(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(_l.cache.has(n))return _l.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return _l.cache.set(n,t),t}_l.cache=new Map;function Xw(n,t){return e=>Object.keys(n).reduce((r,h)=>{const f=typeof n[h]=="object"&&n[h]!=null&&!Array.isArray(n[h])?n[h]:{type:n[h]};return e&&h in e?r[h]={...f,default:e[h]}:r[h]=f,t&&!r[h].source&&(r[h].source=t),r},{})}function Jw(n,t){const e=tg();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function tO(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jw("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const qf=Symbol.for("vuetify:defaults");function Zw(){const n=Jp(qf);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function nO(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[_l(t)]<"u")}function rO(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zw();const r=Jw("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const h=Mu(()=>e.value?.[n._as??t]),f=new Proxy(n,{get(c,d){const i=Reflect.get(c,d);if(d==="class"||d==="style")return[h.value?.[d],i].filter(p=>p!=null);if(nO(r.vnode,d))return i;const l=h.value?.[d];if(l!==void 0)return l;const u=e.value?.global?.[d];return u!==void 0?u:i}}),g=Zp();Qp(()=>{if(h.value){const c=Object.entries(h.value).filter(d=>{let[i]=d;return i.startsWith(i[0].toUpperCase())});g.value=c.length?Object.fromEntries(c):void 0}else g.value=void 0});function y(){const c=tO(qf,r);ng(qf,Mu(()=>g.value?Kw(c?.value??{},g.value):c?.value))}return{props:f,provideSubDefaults:y}}function Yc(n){if(n._setup=n._setup??n.setup,!n.name)return QL("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Xw(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return eO(e,t)},n.props._as=String,n.setup=function(e,r){const h=Zw();if(!h.value)return n._setup(e,r);const{props:f,provideSubDefaults:g}=rO(e,e._as??n.name,h),y=n._setup(f,r);return g(),y}}return n}function iO(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?Yc:Kp)(t)}const oO=[String,Function,Object,Array],Kc=Xw({icon:{type:oO},tag:{type:[String,Object,Function],required:!0}},"icon");iO()({name:"VComponentIcon",props:Kc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return We(n.tag,null,{default:()=>[n.icon?We(r,null,null):e.default?.()]})}}}),Yc({name:"VSvgIcon",inheritAttrs:!1,props:Kc(),setup(n,t){let{attrs:e}=t;return()=>We(n.tag,Wa(e,{style:null}),{default:()=>[qn("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?qn("path",{d:r[0],"fill-opacity":r[1]},null):qn("path",{d:r},null)):qn("path",{d:n.icon},null)])]})}}),Yc({name:"VLigatureIcon",props:Kc(),setup(n){return()=>We(n.tag,null,{default:()=>[n.icon]})}});const sO=Yc({name:"VClassIcon",props:Kc(),setup(n){return()=>We(n.tag,{class:eg(n.icon)},null)}}),aO={component:n=>Js(sO,{...n,class:"mdi"})},lO={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"}},cO={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"}},uO={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"}},hO={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"}},Yf=cg({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:DL,cosmosDarkCobalt:lO,cosmosDarkIndigo:cO,cosmosDarkSlate:uO,cosmosDarkEmerald:hO}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:aO,...PM,...FM}}}),Kf=Kx({createApp:Iu,appOptions:{render(){return Js(rC,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(uL),n.use(ba),n.use(Yf),n.use(UL),n.use(ZL)}}),sB=Tn("t",Kf.bootstrap),aB=Tn("x",Kf.mount),lB=Tn("A",Kf.unmount)})}}));
|