openc3-cosmos-tool-cmdsender 7.4.0 → 7.5.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/cmdsender/{ArrayWidget-CIDdZjk3-a9135bf517dc437bb4e5.js → ArrayWidget-9OSo49r--c15d01a72bfc47e79a2e.js} +2 -2
- data/tools/cmdsender/{ArrayplotWidget-BfO1atvG-3b21881f28f660aa207e.js → ArrayplotWidget-D5C_WTX2-7b861f8316497af974e4.js} +1 -1
- data/tools/cmdsender/{BarColumn-CHX_3ye3-dbb06e6e3066489137bf.js → BarColumn-CvHnnifr-9856e0b5dde5ae8a8386.js} +1 -1
- data/tools/cmdsender/{BlockWidget-DSbunlY_-bcb8a36540f3a6876874.js → BlockWidget-DuEDZ4dJ-cc0276ffcbe9fc8afa8b.js} +2 -2
- data/tools/cmdsender/{ButtonWidget-BB4ZOCI8-e2c97a761e9be6f28330.js → ButtonWidget-CZIUtd9z-c1181b5fe7e272448c88.js} +1 -1
- data/tools/cmdsender/{CanvasWidget-DsyMt7xW-95affc85b9cfc6611c65.js → CanvasWidget-C4-pXiKY-b0ad39d1976f2ea0965c.js} +1 -1
- data/tools/cmdsender/CanvasdotWidget-Bh0HHx67-2427800500b5974b2bb9.js +1 -0
- data/tools/cmdsender/{CanvasimageWidget-DY1DDf0a-0e37671f1329d8146da0.js → CanvasimageWidget-Bu5NmsDs-1e51b45a73e2a074038a.js} +1 -1
- data/tools/cmdsender/{CanvasimagevalueWidget-0lc2cCPV-8fcfd17acb86fd16b3f1.js → CanvasimagevalueWidget-Dv8dQrnj-105c42a1835a76de83c7.js} +1 -1
- data/tools/cmdsender/CanvaslabelWidget-68IeeM3a-ca40f8e3d927109f4cb1.js +1 -0
- data/tools/cmdsender/{CanvaslabelvalueWidget-Cf_dcDW2-1bfc18d2309cab773751.js → CanvaslabelvalueWidget-C6j_A4z6-4ed536c44989735f4188.js} +1 -1
- data/tools/cmdsender/{CanvaslineWidget-jg2ozQ0N-79d2f4ce510a0bf4364e.js → CanvaslineWidget-BgQ6wLDv-93ada50aab0dd1d0da9e.js} +1 -1
- data/tools/cmdsender/{CanvaslinevalueWidget-CKpjqlKA-81c9d2073594c598eb73.js → CanvaslinevalueWidget-C6-HkTJp-b2598c6348a41966d047.js} +1 -1
- data/tools/cmdsender/CheckbuttonWidget-DJmT73t9-a02b4bdbbc3e845962c5.js +1 -0
- data/tools/cmdsender/{ComboboxWidget-BzKkyRDT-2c1d0d3da2add9a42433.js → ComboboxWidget-vTtsjxRm-37271cca6519fc512b45.js} +1 -1
- data/tools/cmdsender/CommandSender-4a5f470adc4bfff06fdc.js +1124 -0
- data/tools/cmdsender/{CriticalCmdDialog-DW0Sx39N-02c2404b1c0ed96e6ba3.js → CriticalCmdDialog-D40Ymmci-4db554fdea009d9be9bf.js} +1 -1
- data/tools/cmdsender/DateWidget-BjKIDtsf-22911af0aa75b9439cf7.js +1 -0
- data/tools/cmdsender/{DetailsDialog-CLPj0nP0-b36aba78bca0189e8165.js → DetailsDialog-S1nw1d0h-4bf00abc52ed74a77000.js} +1 -1
- data/tools/cmdsender/{DynamicWidget-yna_ejyc-9a22854801be919aebc9.js → DynamicWidget-yna_ejyc-d6e81636ff8c9e48dbfb.js} +1 -1
- data/tools/cmdsender/{FilechecksumWidget-DqNThsOX-b5db0e7122e5cc64ec98.js → FilechecksumWidget-obppYSP4-93415c74f58d8c4b7761.js} +1 -1
- data/tools/cmdsender/{FiledisplayWidget-BRhhiVEs-d58e13cf168bb7b115c7.js → FiledisplayWidget-BstroKFo-5d7926c19991c3d299a7.js} +1 -1
- data/tools/cmdsender/{FormatvalueWidget-pEjAh0h2-9b98bf61d2bb2874fe94.js → FormatvalueWidget-MJIJg6Bf-4f4618f29b094ced9a3b.js} +1 -1
- data/tools/cmdsender/Graph-BL-czUPp-95a7e957d66e26958e83.js +1 -0
- data/tools/cmdsender/{GraphWidget-BZjBkefj-2cd65ceab30aa36f069a.js → GraphWidget-C8KRp-QN-21d1d0b8dd9b8f8df699.js} +1 -1
- data/tools/cmdsender/{HorizontalWidget-Brag6E4y-d2d20833f765dbdbfeaf.js → HorizontalWidget-Cn9qnYVh-3a4213afdba342274154.js} +1 -1
- data/tools/cmdsender/{HorizontalboxWidget-BnkH4cVq-3ef4fe523c72ae26fb33.js → HorizontalboxWidget-gz8uYYFZ-99ff02f2fa2258533ecc.js} +1 -1
- data/tools/cmdsender/HorizontallineWidget-CrDua5-L-1ecbc217572e21077b81.js +1 -0
- data/tools/cmdsender/{IframeWidget-Ciu5u58E-e18fde4fd539972df604.js → IframeWidget-CtS7MjKL-e3429048c308330ee36e.js} +1 -1
- data/tools/cmdsender/ImageLoader-Vpn27aUN-68ad43c46951171301a8.js +1 -0
- data/tools/cmdsender/{ImageviewerWidget-vWMGPveb-c6da44b34f3a6bb54359.js → ImageviewerWidget-Kmzt8wuP-72f065b70c88956b4c8f.js} +1 -1
- data/tools/cmdsender/{LabelWidget-DVp0CmFH-e3089c14b93f91e8ed20.js → LabelWidget-DIZpHxYX-8990177aafe100a2785e.js} +1 -1
- data/tools/cmdsender/LabelledWidget-CGxDI8XZ-aa90a8e9a1ce4c38318f.js +1 -0
- data/tools/cmdsender/{LabelprogressbarWidget-DME-BrZe-89eb9c7b5be7970c97d4.js → LabelprogressbarWidget-CXOc5p8G-4368cdca3f6107ded629.js} +1 -1
- data/tools/cmdsender/LabelsparklineWidget-B_LuqFcA-648a71264b079a2ece65.js +1 -0
- data/tools/cmdsender/LabelvalueWidget--G4wHMZL-e1aa2bd64e5318c03789.js +1 -0
- data/tools/cmdsender/{LabelvaluedescWidget-c5BUCRxB-754908bbc87785e4dea1.js → LabelvaluedescWidget-DqLK0wvi-f712dafbe68ccee4b933.js} +1 -1
- data/tools/cmdsender/{LabelvaluelimitsbarWidget-DBKZLpXJ-efbd4f0027d33c2adcfb.js → LabelvaluelimitsbarWidget-BWOQJkLP-3556afbfcf43df17a3cc.js} +1 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-BfF73Y2F-4be1f30a94cb1b0af436.js +1 -0
- data/tools/cmdsender/LabelvaluerangebarWidget-CKsFRW6t-ed403b300585498d5148.js +1 -0
- data/tools/cmdsender/{Layout-Df-lJgpB-b3ea2141f43bd7bc02a1.js → Layout-CGL1JfeU-49010693bc0ddbb51bc6.js} +1 -1
- data/tools/cmdsender/{LedWidget-C97EJXBo-5646163f3b5bcfa5bfee.js → LedWidget-DrAJ8_fN-614e9dd15d436679fa3a.js} +1 -1
- data/tools/cmdsender/{LimitsBar-DNV39okL-30041505e9f536129b55.js → LimitsBar-CxPzG0Zv-6e3587f651a5c3e359de.js} +1 -1
- data/tools/cmdsender/{LimitsbarWidget-BIO6xztx-de9e6848e8b6555f75c3.js → LimitsbarWidget-1IayV5D7-5149517773e5761be053.js} +1 -1
- data/tools/cmdsender/{LimitscolorWidget-BGrNA65J-ffeccf710e92b6f0a16b.js → LimitscolorWidget-C7LY3BQ7-1bd6487415c156a861cf.js} +1 -1
- data/tools/cmdsender/{LimitscolumnWidget-Bw6EXJs9-7086e962b409c9ac8455.js → LimitscolumnWidget-JhIc5Sjl-d3c2663e47002b6c4613.js} +1 -1
- data/tools/cmdsender/LinegraphWidget-BaROxuUn-ad745617d29f6522a990.js +1 -0
- data/tools/cmdsender/{MatrixbycolumnsWidget-C33-g7kK-f85c38c9ecf8e68876f0.js → MatrixbycolumnsWidget-i0gGPMOV-2ba22606745be8090982.js} +1 -1
- data/tools/cmdsender/{OpenC3TimePicker-cOr0aOVn-b1e4149deec7fb8984cb.js → OpenC3TimePicker-DDTLwTEw-5a57046a69173bdb36d2.js} +1 -1
- data/tools/cmdsender/{ProgressbarWidget-DqfSMI10-cc4541817b630837aeee.js → ProgressbarWidget-QxEq8C4A-b3ac8d11bd585c3a4ad6.js} +1 -1
- data/tools/cmdsender/{RadiobuttonWidget-CSQeEacF-6974aed51c1332625df2.js → RadiobuttonWidget-DYf3qvBq-8ca40869c009ffa15a01.js} +1 -1
- data/tools/cmdsender/RadiogroupWidget-C0b_ckej-6fa3cd5ecfeb156a5540.js +1 -0
- data/tools/cmdsender/{RangebarWidget-CJSUof1--aadf55a0f5eeb4d63143.js → RangebarWidget-DcSEHktI-93d8ddec5d5f8c8bbd9f.js} +1 -1
- data/tools/cmdsender/{RollupWidget-C977Lkcx-36304a03fbcb89dfab1f.js → RollupWidget-AVS4drYX-ca79ea3d17b2aa6ec9df.js} +1 -1
- data/tools/cmdsender/{ScrollwindowWidget-BFxz61oW-ab412e1eb3a239c562aa.js → ScrollwindowWidget-Dpf3BScA-7ec1601ed138f08b7689.js} +1 -1
- data/tools/cmdsender/{SignalWidget-BT6AcbBx-e635c970d3f13a26a665.js → SignalWidget-Q1YtPsNw-b324a119b0ef8586f524.js} +1 -1
- data/tools/cmdsender/SpacerWidget-DGEOqhu_-7b3f9e933a3d4bdc2163.js +1 -0
- data/tools/cmdsender/SparklineWidget-DbNWbNzY-4f41154ff621c8d65dee.js +1 -0
- data/tools/cmdsender/TabbookWidget-CrkPPZIF-e947da701262513f866c.js +1 -0
- data/tools/cmdsender/TargetPacketItemChooser-H0APWwGe-d9c590a86d6a1d8e5618.js +1 -0
- data/tools/cmdsender/TextboxWidget-CfQEzaRr-97204461d102b05f56ee.js +1 -0
- data/tools/cmdsender/TextfieldWidget-BQL8dOTg-6ac06bf728373d871991.js +1 -0
- data/tools/cmdsender/{TimeWidget-BTaXBxVm-368a36e46aefae731ec5.js → TimeWidget-DiE_oc7J-12bd2aff343138f1c200.js} +1 -1
- data/tools/cmdsender/TitleWidget-C5a_ZsqM-8d8799741cbfe402ef28.js +1 -0
- data/tools/cmdsender/VWidget-D4ipW0SF-4e4e9f1ca4e4a6bddbf2.js +1 -0
- data/tools/cmdsender/ValueWidget-9JNo-Sk8-e39f3c43886e7b71914c.js +1 -0
- data/tools/cmdsender/{ValuelimitsbarWidget-CqRkPwWS-7d0de6ea5e8b9bd13abf.js → ValuelimitsbarWidget-CqiFVnaT-95179c67575cbba6b06e.js} +1 -1
- data/tools/cmdsender/ValuelimitscolumnWidget-DWDFVRNg-b094114b73f89f39d4f4.js +1 -0
- data/tools/cmdsender/ValuerangebarWidget-BAVMrD0L-112df0a63fc4acc52d06.js +1 -0
- data/tools/cmdsender/{VerticalWidget-CoJiy2TT-24937be89e210499af20.js → VerticalWidget-Dw0j42K2-112c4d1536c2b44c7033.js} +1 -1
- data/tools/cmdsender/{VerticalboxWidget-BD5Eq3BH-4725629248627a1a50c8.js → VerticalboxWidget-xusQtXo0-ae815a4044f3fe1fc645.js} +1 -1
- data/tools/cmdsender/{Widget-ClRi417b-14b295f96dc76a274e7b.js → Widget-Dy-YgkeU-84a92614f720a288274b.js} +1 -1
- data/tools/cmdsender/main-32d395363f39e76f7dfe.js +1493 -0
- data/tools/cmdsender/main.js +1 -1
- metadata +74 -74
- data/tools/cmdsender/CanvasdotWidget-BZpkCAoH-4222a579326c0050dbb9.js +0 -1
- data/tools/cmdsender/CanvaslabelWidget-C6TDW9WO-f7f77b94092681dfe12a.js +0 -1
- data/tools/cmdsender/CheckbuttonWidget-BWXinMaT-3a20ff74eab9d3df67cc.js +0 -1
- data/tools/cmdsender/CommandSender-ab647899514acfad5bad.js +0 -1124
- data/tools/cmdsender/DateWidget-qUbLzQsX-e04ae48b8ac1d163e08e.js +0 -1
- data/tools/cmdsender/Graph-GVQZltap-ce3baf453a00113d57b9.js +0 -1
- data/tools/cmdsender/HorizontallineWidget-k7fL4EPN-5c10d48cab23194958ce.js +0 -1
- data/tools/cmdsender/ImageLoader-DH5e4lg8-362b2cfec13377a87a57.js +0 -1
- data/tools/cmdsender/LabelledWidget-1DeE1-6G-43b0ea0b91b96071caed.js +0 -1
- data/tools/cmdsender/LabelsparklineWidget-4iDHGnPL-e17064f5f6014eaba542.js +0 -1
- data/tools/cmdsender/LabelvalueWidget-C6NQSHTb-c898618d25310acec330.js +0 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-NdEu06go-8b1f684fffcfcd1ffb42.js +0 -1
- data/tools/cmdsender/LabelvaluerangebarWidget-CL5HLK0t-94036ba3d830cbc5c866.js +0 -1
- data/tools/cmdsender/LinegraphWidget-Drf9tTPN-7d629dc1b55819627668.js +0 -1
- data/tools/cmdsender/RadiogroupWidget-DlQN9z-Z-be1b8ee24fdd6244dba6.js +0 -1
- data/tools/cmdsender/SpacerWidget-B_f09KAi-20de4c3357434e1e4524.js +0 -1
- data/tools/cmdsender/SparklineWidget-Bji9DILO-0bce07bb5e33c4e7d511.js +0 -1
- data/tools/cmdsender/TabbookWidget-B74U8t2i-2fab3435abd44db5c5ae.js +0 -1
- data/tools/cmdsender/TargetPacketItemChooser-XyyCP_cB-fc012960d8225dfdd3c9.js +0 -1
- data/tools/cmdsender/TextboxWidget-CbKE9aSW-b860aecd9bffd0913f73.js +0 -1
- data/tools/cmdsender/TextfieldWidget-CpdmfNk5-0292422adeb1a00c2104.js +0 -1
- data/tools/cmdsender/TitleWidget-ulO_gdVY-99bdfa13eb37e715740c.js +0 -1
- data/tools/cmdsender/VWidget-C4VLQ7-b-f8c9fb89e19a1970b149.js +0 -1
- data/tools/cmdsender/ValueWidget-B3-Jjoux-0c269f0810a4025cd129.js +0 -1
- data/tools/cmdsender/ValuelimitscolumnWidget-CF4CN14a-8702a04a78243c9fb9a1.js +0 -1
- data/tools/cmdsender/ValuerangebarWidget-DJtrknKH-63f4c75cc55381249bba.js +0 -1
- data/tools/cmdsender/main-0e8598f28e1f0d677014.js +0 -1493
|
@@ -0,0 +1,1124 @@
|
|
|
1
|
+
System.register(["./main-32d395363f39e76f7dfe.js","vue","./VWidget-D4ipW0SF-4e4e9f1ca4e4a6bddbf2.js","./TargetPacketItemChooser-H0APWwGe-d9c590a86d6a1d8e5618.js","./DetailsDialog-S1nw1d0h-4bf00abc52ed74a77000.js","./CriticalCmdDialog-D40Ymmci-4db554fdea009d9be9bf.js","single-spa","vue-router","pinia","vuetify","./Widget-Dy-YgkeU-84a92614f720a288274b.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./LimitsBar-CxPzG0Zv-6e3587f651a5c3e359de.js"],(function(Li,pa){"use strict";var xe,qt,Fe,Ae,Xe,en,wt,Pe,tn,Z,J,re,nn,j,K,oe,ce,fe,Se,ke,rn,le,Ie,bt,We,pe,Ct,Je,qe,et,tt,nt,it,on,sn,an,ln,cn;return{setters:[te=>{xe=te.h,qt=te.w,Fe=te.E,Ae=te.j,Xe=te.P,en=te.R,wt=te.M,Pe=te.m,tn=te._},te=>{Z=te.resolveComponent,J=te.openBlock,re=te.createBlock,nn=te.Teleport,j=te.createVNode,K=te.withCtx,oe=te.createElementVNode,ce=te.toDisplayString,fe=te.createElementBlock,Se=te.Fragment,ke=te.renderList,rn=te.ref,le=te.createTextVNode,Ie=te.mergeProps,bt=te.createSlots,We=te.normalizeStyle,pe=te.createCommentVNode,Ct=te.normalizeClass,Je=te.withDirectives,qe=te.vShow,et=te.normalizeProps,tt=te.guardReactiveProps,nt=te.withKeys,it=te.withModifiers,on=te.renderSlot},te=>{sn=te.A},te=>{an=te.s},te=>{ln=te.Z},te=>{cn=te.P},null,null,null,null,null,null,null],execute:(function(){var te=document.createElement("style");te.textContent=`.editor[data-v-a17c9da1]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(te);const hn="openc3-ace-vim-mode-enabled",$t="ace/keyboard/vim",un="openc3-ace-default-scripting-language",St={isVimModeEnabled(){return localStorage.getItem(hn)==="true"},setVimMode(o){localStorage.setItem(hn,JSON.stringify(!!o))},toggleVimMode(o){this.isVimModeEnabled()?(o.setKeyboardHandler(null),this.setVimMode(!1)):(o.setKeyboardHandler($t),this.setVimMode(!0)),o.focus()},applyVimModeIfEnabled(o,{saveFn:h}={}){this.isVimModeEnabled()?(o.setKeyboardHandler($t),ace.config.loadModule($t,l=>{l.CodeMirror.Vim.defineEx("write","w",d=>{typeof h=="function"?h():d.ace.execCommand("save")})})):o.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(un)||"python"},setDefaultScriptingLanguage(o){(o==="ruby"||o==="python")&&localStorage.setItem(un,o)}},Ri={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(o,{emit:h}){const l=h,d=rn(!1);function M(){d.value=!1}function y(p){return p.replaceAll(" ","-").toLowerCase()}return(p,w)=>{const a=Z("v-icon"),u=Z("v-btn"),r=Z("v-divider"),s=Z("v-list-item-title"),n=Z("v-list-item"),t=Z("v-list"),e=Z("v-menu"),i=Z("v-radio"),c=Z("v-list-item-action"),f=Z("v-radio-group"),g=Z("v-checkbox"),k=Z("v-tooltip");return J(),re(e,{modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=$=>d.value=$),"close-on-content-click":!1},{activator:K(({props:$})=>[j(u,Ie($,{variant:"outlined",class:"mx-1 menu-button",text:o.menu.label,"data-test":y(`${o.title} ${o.menu.label}`)}),{append:K(()=>[j(a,{class:"menu-button-icon"},{default:K(()=>[...w[1]||(w[1]=[le(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:K(()=>[j(t,null,{default:K(()=>[(J(!0),fe(Se,null,ke(o.menu.items,($,C)=>(J(),fe(Se,null,[$.divider?(J(),re(r,{key:C+"-divider"})):$.subMenu&&$.subMenu.length>0?(J(),fe("div",{key:C+"-submenu"},[(J(),re(e,{key:C,"open-on-hover":"",location:"right"},{activator:K(({props:b})=>[(J(),re(n,Ie({ref_for:!0},b,{key:C,disabled:$.disabled}),bt({append:K(()=>[j(a,null,{default:K(()=>[...w[2]||(w[2]=[le(" mdi-chevron-right ",-1)])]),_:1})]),default:K(()=>[!$.radio&&!$.checkbox?(J(),re(s,{key:0,style:We("cursor: pointer;"+($.disabled?"opacity: 0.2":""))},{default:K(()=>[le(ce($.label),1)]),_:2},1032,["style"])):pe("",!0)]),_:2},[$.icon?{name:"prepend",fn:K(()=>[j(a,{disabled:$.disabled},{default:K(()=>[le(ce($.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:K(()=>[j(t,null,{default:K(()=>[(J(!0),fe(Se,null,ke($.subMenu,(b,T)=>(J(),re(n,{key:T,"prepend-icon":b.icon,onClick:L=>l("submenu-click",b)},{default:K(()=>[j(s,null,{default:K(()=>[le(ce(b.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):$.radioGroup?(J(),re(f,{key:C+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":$.value,"onUpdate:modelValue":$.command},{default:K(()=>[(J(!0),fe(Se,null,ke($.choices,(b,T)=>(J(),re(n,{key:T+"-choice"},{default:K(()=>[j(c,{class:"list-action"},{default:K(()=>[j(i,{color:"secondary",label:b.label,value:b.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(J(),re(k,{key:C+"-list",disabled:!$.tooltip,text:$.tooltip,location:"right"},{activator:K(({props:b})=>[oe("div",Ie({ref_for:!0},b),[j(n,{disabled:$.disabled,"data-test":y(`${o.title} ${o.menu.label} ${$.label}`),onClick:()=>{$.command($),$.checkbox||M()}},bt({default:K(()=>[$.checkbox?(J(),re(c,{key:0,class:"list-action"},{default:K(()=>[j(g,{modelValue:$.checked,"onUpdate:modelValue":T=>$.checked=T,label:$.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):pe("",!0),!$.radio&&!$.checkbox?(J(),re(s,{key:1,style:We("cursor: pointer;"+($.disabled?"opacity: 0.2":""))},{default:K(()=>[le(ce($.label),1)]),_:2},1032,["style"])):pe("",!0)]),_:2},[$.icon?{name:"prepend",fn:K(()=>[j(a,{icon:$.icon,disabled:$.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"])],16)]),_:2},1032,["disabled","text"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Ii={components:{TopBarMenu:Ri},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(o){o.command(o),this.$refs.topmenu[0].isActive=!1}}},Oi={class:"app-title mr-2"};function Di(o,h,l,d,M,y){const p=Z("v-col"),w=Z("v-row"),a=Z("TopBarMenu");return J(),re(nn,{to:"#openc3-menu"},[j(w,{"no-gutters":""},{default:K(()=>[j(p,{"align-self":"end"},{default:K(()=>[oe("span",Oi,ce(l.title),1)]),_:1})]),_:1}),j(w,{dense:"",class:"flex-nowrap"},{default:K(()=>[(J(!0),fe(Se,null,ke(l.menus,(u,r)=>(J(),re(a,{key:r+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:l.title,onSubmenuClick:y.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const Ni=xe(Ii,[["render",Di],["__scopeId","data-v-f4fb184e"]]);class Fi{constructor(){Fe.get("/openc3-api/autocomplete/data/screen").then(h=>{this.autocompleteData=h.data}).catch(console.error),this.api=new Xe}async getCompletions(h,l,d,M,y){if(!this.autocompleteData)return y(null,[]);let p=l.getLine(d.row).slice(0,d.column).trimStart().split(/ (?![^<>]*>)/),w=this.autocompleteData;p.length>1&&(w=w.find(r=>r.caption===p[0]));let a={},u=!0;if(w&&w.params){w.params.length==p.length-1&&(u=!1);let r=w.params[p.length-2];if(r["Target name"])w=(await this.api.get_target_names()).reduce((s,n)=>(s[n]=1,s),{});else if(r["Packet name"]){let s=p[p.length-2];w=(await this.api.get_all_tlm(s)).reduce((n,t)=>(n[t.packet_name]=t.description,n),{}),w.LATEST="LATEST values from all packets"}else if(r["Item name"]){let s=p[p.length-3],n=p[p.length-2];if(n==="LATEST"){let t=await this.api.get_all_tlm_item_names(s);w={},t.forEach(e=>{w[e]=`LATEST ${e}`})}else w=(await this.api.get_tlm(s,n)).items.reduce((t,e)=>(t[e.name]=e.description,t),{})}else w=r;a=Object.keys(w||{}).map(s=>{let n={value:s+(u?" ":""),command:u&&"startAutocomplete"};return typeof w[s]=="string"&&(n.meta=w[s]),n})}else a=w;y(null,a)}}const Pi={props:{modelValue:{type:String,default:""},keywords:{type:Array,default:()=>[]},height:{type:String,default:"45vh"},filename:{type:String,default:"screen.txt"}},emits:["update:modelValue"],data(){return{editor:null,file:null,loadedKeywords:[],docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{effectiveKeywords(){return this.keywords.length>0?this.keywords:this.loadedKeywords}},watch:{modelValue(o){this.editor&&this.editor.getValue()!==o&&(this.editor.setValue(o),this.editor.clearSelection())},effectiveKeywords(){if(this.editor){const o=this.buildScreenMode();this.editor.session.setMode(new o)}}},created(){this.keywords.length===0&&this.loadKeywords()},mounted(){this.initEditor()},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor.container.remove())},methods:{async loadKeywords(){try{const o=await Fe.get("/openc3-api/autocomplete/keywords/screen");this.loadedKeywords=o.data}catch(o){console.error("Error loading screen keywords:",o)}},initEditor(){this.editor=Pe.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const o=this.buildScreenMode();this.editor.session.setMode(new o),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Fi],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.modelValue),this.editor.clearSelection(),St.applyVimModeIfEnabled(this.editor),this.editor.focus(),this.editor.session.on("change",()=>{this.$emit("update:modelValue",this.editor.getValue())})},getValue(){return this.editor?this.editor.getValue():this.modelValue},buildScreenMode(){let o=Pe.require("ace/lib/oop"),h=Pe.require("ace/mode/text_highlight_rules").TextHighlightRules,l=this.effectiveKeywords.join("|"),d=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:l?new RegExp(`^\\s*(${l})\\b`):/(?!)/}]},this.normalizeRules()};o.inherits(d,h);let M=function(){this.HighlightRules=d},y=Pe.require("ace/mode/text").Mode;return o.inherits(M,y),(function(){this.$id="ace/mode/openc3"}).call(M.prototype),M},toggleVimMode(){St.toggleVimMode(this.editor)},showContextMenu(o){this.menuX=o.pageX,this.menuY=o.pageY;let h=this.editor.getCursorPosition(),l=this.editor.session.getTokenAt(h.row,h.column);if(l){let d=l.value.trim();d.includes(" ")?this.docsKeyword=d.split(" ")[0]:this.docsKeyword=d,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},downloadContent(){const o=new Blob([this.editor.getValue()],{type:"text/plain"}),h=document.createElement("a");h.href=URL.createObjectURL(o),h.setAttribute("download",this.filename),h.click()},loadFile(){const o=new FileReader;o.readAsText(this.file),o.onload=()=>{this.editor.setValue(o.result),this.editor.clearSelection(),this.file=null}}}},Wi={class:"screen-editor-container"};function zi(o,h,l,d,M,y){const p=Z("v-btn"),w=Z("v-file-input"),a=Z("v-spacer"),u=Z("v-row"),r=Z("v-list-item-title"),s=Z("v-list-item"),n=Z("v-divider"),t=Z("v-list"),e=Z("v-menu");return J(),fe("div",Wi,[j(u,{"no-gutters":"",align:"center",class:"mb-2"},{default:K(()=>[j(p,{disabled:!M.file,color:"primary",size:"small",class:"mr-3","data-test":"screen-editor-load",onClick:y.loadFile},{default:K(()=>[...h[3]||(h[3]=[le(" Load ",-1)])]),_:1},8,["disabled","onClick"]),j(w,{modelValue:M.file,"onUpdate:modelValue":h[0]||(h[0]=i=>M.file=i),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file.",density:"compact","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"]),j(a),j(p,{icon:"mdi-download",variant:"text",density:"compact",title:"Download","data-test":"download-screen-icon",onClick:y.downloadContent},null,8,["onClick"])]),_:1}),j(u,{"no-gutters":"",class:"mb-2"},{default:K(()=>[oe("pre",{ref:"editor",class:"screen-editor",style:We({height:l.height,width:"100%"}),onContextmenu:h[1]||(h[1]=it((...i)=>y.showContextMenu&&y.showContextMenu(...i),["prevent"]))},null,36),j(e,{modelValue:M.contextMenu,"onUpdate:modelValue":h[2]||(h[2]=i=>M.contextMenu=i),target:[M.menuX,M.menuY]},{default:K(()=>[j(t,null,{default:K(()=>[j(s,{link:"",onClick:y.openDocumentation},{default:K(()=>[j(r,null,{default:K(()=>[le(ce(M.docsKeyword)+" documentation ",1)]),_:1})]),_:1},8,["onClick"]),j(n),j(s,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:y.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),j(u,{"no-gutters":""},{default:K(()=>[...h[4]||(h[4]=[oe("span",{class:"text-caption text-grey"}," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)])]),_:1})])}const Bi=xe(Pi,[["render",zi],["__scopeId","data-v-4a28c34b"]]),Hi={components:{ScreenEditor:Bi},props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{editorContent:this.definition,editorIsDirty:!1}},computed:{editErrors:function(){if(this.editorContent==="")return["Input can not be blank."];if(this.errors.length!==0){let o=new Set,h=[];const l=this.errors.toSorted((d,M)=>d.lineNumber-M.lineNumber);for(const d of l){const M=`${d.lineNumber}:${d.message}`;if(o.has(M))continue;let y=d.lineNumber?`At ${d.lineNumber}: (${d.line}) ${d.message}.`:`${d.message}.`;d.usage&&(y+=` Usage: ${d.usage}`),h.push(y),o.add(M)}return h}return[]},show:{get(){return this.modelValue},set(o){this.$emit("update:modelValue",o)}}},watch:{editorContent(){this.editorIsDirty=!0},definition(o){this.editorContent=o}},methods:{deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(o=>{this.$emit("delete")}).catch(()=>{})},handleEsc:function(){this.editorIsDirty?this.$dialog.confirm("You have unsaved changes. Are you sure you want to close?",{okText:"Close without saving",cancelText:"Cancel"}).then(()=>{this.$emit("cancel")}).catch(()=>{this.$refs.screenEditor?.editor?.focus()}):this.$emit("cancel")}}},Ui=["textContent"];function Vi(o,h,l,d,M,y){const p=Z("v-btn"),w=Z("v-spacer"),a=Z("v-toolbar"),u=Z("screen-editor"),r=Z("v-row"),s=Z("v-card-text"),n=Z("v-card"),t=Z("v-dialog");return J(),re(t,{modelValue:y.show,"onUpdate:modelValue":h[3]||(h[3]=e=>y.show=e),persistent:"",width:"75vw",onKeydown:nt(it(y.handleEsc,["stop"]),["esc"])},{default:K(()=>[j(n,null,{default:K(()=>[j(a,{height:"24"},{default:K(()=>[j(p,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:y.deleteScreen},null,8,["onClick"]),j(w),oe("span",null," Edit Screen: "+ce(l.target)+" "+ce(l.screen),1),j(w)]),_:1}),j(s,{style:{"max-height":"90vh"}},{default:K(()=>[j(u,{ref:"screenEditor",modelValue:M.editorContent,"onUpdate:modelValue":h[0]||(h[0]=e=>M.editorContent=e),keywords:l.keywords,filename:`${l.screen.toLowerCase()}.txt`,height:"45vh"},null,8,["modelValue","keywords","filename"]),j(r,{class:"ma-3",style:{"max-height":"120px","overflow-y":"auto"}},{default:K(()=>[(J(!0),fe(Se,null,ke(y.editErrors,(e,i)=>(J(),fe("div",{key:i},[oe("span",{class:"text-red",textContent:ce(e)},null,8,Ui)]))),128))]),_:1}),j(r,{class:"mt-3"},{default:K(()=>[j(w),j(p,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:h[1]||(h[1]=e=>o.$emit("cancel"))},{default:K(()=>[...h[4]||(h[4]=[le(" Cancel ",-1)])]),_:1}),j(p,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:h[2]||(h[2]=e=>o.$emit("save",M.editorContent))},{default:K(()=>[...h[5]||(h[5]=[le(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const ji=xe(Hi,[["render",Vi]]),Gi=20,dn="screen:get_tlm_values";function fn(o,h){if(Object.is(o,h))return!0;if(o===null||h===null||typeof o!="object"||typeof h!="object"||Array.isArray(o)!==Array.isArray(h))return!1;const l=Object.keys(o);return l.length===Object.keys(h).length&&l.every(d=>Object.hasOwn(h,d)&&fn(o[d],h[d]))}const Ki={components:{EditScreenDialog:ji},mixins:[qt],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},initialWidth:{type:Number,default:null},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null},frozen:{type:Boolean,default:!1},frozenValues:{type:Object,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,floatedWidth:this.initialWidth,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:wt.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let o=new Set,h="";for(const l of this.errors){if(o.has(l.message))continue;let d=`${l.time}: (${l.type}) ${l.message}
|
|
3
|
+
`;h+=d,o.add(l.message)}return h}return null},computedStyle(){let o={};const h=this.width||this.floatedWidth||this.$refs.bar?.clientWidth;return this.floated&&(o.position="absolute",o.top=this.top+"px",o.left=this.left+"px",o.width=h+"px"),o}},watch:{count:{handler(o,h){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(o,h){this.playbackMode==="playback"&&o&&this.update()}},playbackMode:{handler(o,h){o==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}},frozen:{handler(o){o?this.updater&&(clearInterval(this.updater),this.updater=null):this.playbackMode==="realtime"&&this.updateRefreshInterval()}},frozenValues:{immediate:!0,handler(o){o&&this.frozen&&Object.assign(this.screenValues,o)}}},errorCaptured(o,h,l){return console.error("Screen widget error",o,l),this.addError({type:o.usage?"usage":"error",message:o.message??String(o),usage:o.usage,line:o.line,lineNumber:o.lineNumber}),!1},created(){this.unchangedCounts={},this.api=new Xe,this.configParser=new en,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&!this.frozen&&this.updateRefreshInterval(),this.frozen&&this.frozenValues&&this.$nextTick(()=>{Object.assign(this.screenValues,this.frozenValues)}),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(o,h){this.$parent.showScreen(o,h)},close(o,h){this.$parent.closeScreenByName(o,h)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},clearErrorSource:function({source:o}){this.errors=this.errors.filter(h=>!h.transient||h.source!==o)},addError:function(o){!o?.message||this.errors.length>=Gi||this.errors.find(h=>h.message===o.message&&h.lineNumber===o.lineNumber)||this.errors.push({...o,type:o.type||"error",time:o.time||new Date().getTime()})},updateRefreshInterval:function(){if(this.updater&&(clearInterval(this.updater),this.updater=null),this.pollingPeriod===0)return;this.update();let o=this.pollingPeriod*1e3;this.updater=setInterval(()=>{this.update()},o)},parseDefinition:function(){this.clearErrors(),this.screenItems=[],this.unchangedCounts={},this.actualScreenItems=[],this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null),this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],settings:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1];try{this.parseKeywords()}catch(o){this.addError({type:o.usage?"usage":"error",message:o.message??String(o),usage:o.usage,line:o.line,lineNumber:o.lineNumber})}if(typeof this.layoutStack[0]>"u"){const o=this.dynamicWidgets.map(l=>`${l.name} (line ${l.lineNumber})`),h=this.dynamicWidgets[0];this.addError({type:"usage",message:`Unknown widget! Are these widgets: ${o.join(", ")}?`,line:h?.line,lineNumber:h?.lineNumber}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],settings:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},parseKeywords:function(){this.configParser.parse_string(this.currentDefinition,"",!1,!0,(o,h,l,d)=>{if(o)switch(o){case"SCREEN":{if(this.configParser.verify_num_parameters(3,4,`${o} <Width or AUTO> <Height or AUTO> <Polling Period>`),h[0].toUpperCase()==="AUTO")this.width=null;else if(Number.isFinite(Number.parseInt(h[0])))this.width=Number.parseInt(h[0]);else throw new Ae(this.configParser,`SCREEN width must be a number or AUTO, got '${h[0]}'`,`${o} <Width or AUTO> <Height or AUTO> <Polling Period>`);if(h[1].toUpperCase()==="AUTO")this.height=null;else if(Number.isFinite(Number.parseInt(h[1])))this.height=Number.parseInt(h[1]);else throw new Ae(this.configParser,`SCREEN height must be a number or AUTO, got '${h[1]}'`,`${o} <Width or AUTO> <Height or AUTO> <Polling Period>`);const M=Number.parseFloat(h[2]);if(Number.isNaN(M)||M<0||M>0&&M<.1)throw new Ae(this.configParser,`SCREEN polling period must be a number 0 or >= 0.1, got '${h[2]}'`,`${o} <Width or AUTO> <Height or AUTO> <Polling Period>`);this.pollingPeriod=M;break}case"END":if(this.configParser.verify_num_parameters(0,0,`${o}`),this.layoutStack.length===1)throw new Ae(this.configParser,"END without a matching layout widget",`${o}`);this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":if(this.configParser.verify_num_parameters(1,1,`${o} <Time (s)>`),this.staleTime=Number.parseInt(h[0]),Number.isNaN(this.staleTime))throw new Ae(this.configParser,`SCREEN stale time must be a number, got '${h[0]}'`,`${o} <Time (s)>`);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${o} <Index> <Widget Type> <Widget Settings...>`),h[1]==="RAW"&&(h[1]="RAW__"+h[2].toLowerCase());case"SETTING":{this.configParser.verify_num_parameters(2,null,`${o} <Widget Type> <Widget Settings...>`),h[0]==="RAW"&&(h[0]="RAW__"+h[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(h);break}case"TOOLTIP":{this.configParser.verify_num_parameters(1,2,`${o} <Tooltip Text> <Delay (ms)>`);let M=600;if(h[1]!==void 0&&(M=Number.parseInt(h[1]),Number.isNaN(M)))throw new Ae(this.configParser,`SCREEN tooltip delay must be a number, got '${h[1]}'`,`${o} <Tooltip Text> <Delay (ms)>`);(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(["TOOLTIP",h[0],M]);break}case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${o} <Index> <Widget Type> <Widget Settings...>`),h[2]==="RAW"&&(h[2]="RAW__"+h[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${o} <Widget Type> <Widget Settings...>`),h[1]==="RAW"&&(h[1]="RAW__"+h[2].toLowerCase()),this.globalSettings.push(h);break;default:this.processWidget(o,h,l,d);break}})},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex,this.floatedWidth])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex,this.floatedWidth]);else{let o=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),h=this.$refs.bar.getBoundingClientRect();this.top=h.top-o.top-5,this.left=h.left-o.left-5,this.floatedWidth=this.$refs.bar.clientWidth,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex,this.floatedWidth])}},dragMouseDown:function(o){o=o||window.event;const h=o.target;if(!h.closest(".v-toolbar"))return;const l=["INPUT","TEXTAREA","BUTTON","SELECT"],d=["button",".v-btn","input","textarea",".v-text-field",".v-select",".v-combobox",".v-autocomplete"];l.includes(h.tagName)||d.some(M=>h.closest(M))||(o.preventDefault(),this.dragX=o.clientX,this.dragY=o.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag)},elementDrag:function(o){o=o||window.event,o.preventDefault();let h=this.dragX-o.clientX,l=this.dragY-o.clientY;this.dragX=o.clientX,this.dragY=o.clientY,this.top=this.$refs.bar.offsetTop-l,this.left=this.$refs.bar.offsetLeft-h,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex,this.floatedWidth])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(o){this.editDialog=!1,this.currentDefinition=o,this.rerender(),this.$nextTick(function(){Fe.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0).catch(console.error)})},deleteScreen:function(){this.editDialog=!1,Fe.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(o=>{this.$emit("delete-screen")}).catch(console.error)},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(o,h,l,d){let M=null;o==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${o} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),M=h[0].toUpperCase(),o=h[1].toUpperCase(),h=h.slice(2,h.length));const y=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()+"Widget";let p=[];if(p.push(["__SCREEN_ID__",this.screenId]),M!==null&&p.push(["NAMED_WIDGET",M]),o==="VERTICAL"||o==="VERTICALBOX"||o==="HORIZONTAL"||o==="HORIZONTALBOX"||o==="MATRIXBYCOLUMNS"||o==="TABBOOK"||o==="TABITEM"||o==="CANVAS"||o==="RADIOGROUP"||o==="SCROLLWINDOW"){const w={type:y,parameters:h,settings:p,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(w),this.currentLayout.widgets.push(w),this.currentLayout=w}else if(this.$options.components[y])this.currentLayout.widgets.push({type:y,target:this.target,parameters:h,settings:p,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:l,lineNumber:d});else{let w={type:"DynamicWidget",target:this.target,parameters:h,settings:p,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:y,line:l,lineNumber:d};this.currentLayout.widgets.push(w),this.dynamicWidgets.push(w)}},applyGlobalSettings:function(o){o.forEach(h=>{this.globalSettings.forEach(l=>{h.type.toLowerCase()===l[0].toLowerCase()+"widget"&&(h.settings.find(d=>d[0]===l[1])||h.settings.push(l.slice(1)))}),h.widgets&&this.applyGlobalSettings(h.widgets)})},update:function(){if(this.frozen)return;let o=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,o,null,{"Ignore-Errors":"403"}).then(h=>{h&&h.length>0&&(this.updateValues(h),this.clearErrorSource({source:dn}))}).catch(h=>{this.addError({message:h.message||JSON.stringify(h,null,2),transient:!0,source:dn})})},updateValues:function(o){if(this.updateCounter+=1,o.length!=this.screenItems.length||o.length!=this.actualScreenItems.length)console.error(`get_tlm_values mismatch: data.length: ${o.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(o),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else{const h=new Set;for(let l=0;l<o.length;l++){const d=this.screenItems[l];if(h.has(d))continue;h.add(d);const M=this.screenValues[d];if(M&&fn(M[0],o[l][0])&&M[1]===o[l][1]){const y=(this.unchangedCounts[d]||0)+1;if(this.unchangedCounts[d]=y,y>sn)continue}else this.unchangedCounts[d]=0;o[l].push(this.updateCounter),this.screenValues[d]=o[l]}}},sameScreenItems:function(o){return o.length===this.screenItems.length&&o.every((h,l)=>h===this.screenItems[l])},debouncedUpdateTlmAvailable:function(){this.frozen||(this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{const o=[...this.screenItems];this.api.get_tlm_available(o,{},{"Ignore-Errors":"403"}).then(h=>{if(this.sameScreenItems(o)){if(this.actualScreenItems=h,this.updater!==null&&this.updateRefreshInterval(),this.screenItems.length!=h.length)console.error("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let l=0;l<this.actualScreenItems.length;l++)if(this.actualScreenItems[l]===null){const d=this.screenItems[l].split("__"),M=this.currentDefinition.split(`
|
|
4
|
+
`),y=M.findIndex(p=>p.includes(d[0])&&p.includes(d[1])&&p.includes(d[2]))+1;y>0?this.addError({type:"usage",message:`Null for ${d.join(" ")}! Does it exist?`,line:M[y-1],lineNumber:y}):this.addError({message:`Null for ${d.join(" ")}! Does it exist?`})}}}).catch(h=>{console.error("Error getting tlm available",h),this.sameScreenItems(o)&&(this.actualScreenItems=[...this.screenItems],this.updater!==null&&this.updateRefreshInterval())}),this.tlmAvailableTimeout=null},100))},checkItems:function({valueIds:o,line:h,lineNumber:l}){if(!o?.length)return;const d=this.screenKey;this.api.get_tlm_available(o,{},{"Ignore-Errors":"403"}).then(M=>{this.screenKey===d&&M.forEach((y,p)=>{if(y!==null)return;const w=o[p].split("__").slice(0,3);this.addError({type:"usage",message:`Null for ${w.join(" ")}! Does it exist?`,line:h,lineNumber:l})})}).catch(M=>{console.error("Error getting tlm available",M)})},addItem:function(o){this.screenItems.push(o),delete this.unchangedCounts[o],this.frozen&&this.frozenValues&&this.frozenValues[o]?this.screenValues[o]=this.frozenValues[o]:this.screenValues[o]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(o){let h=this.screenItems.indexOf(o);this.screenItems.splice(h,1),this.debouncedUpdateTlmAvailable()},getScreenValues:function(){return JSON.parse(JSON.stringify(this.screenValues))}}},Yi={ref:"screen",class:"pa-1",style:{position:"relative"}},Qi={key:1,class:"pa-1",style:{position:"relative"}};function Zi(o,h,l,d,M,y){const p=Z("v-btn"),w=Z("v-tooltip"),a=Z("v-spacer"),u=Z("v-toolbar"),r=Z("v-overlay"),s=Z("vertical-widget"),n=Z("v-expand-transition"),t=Z("v-card"),e=Z("edit-screen-dialog"),i=Z("v-textarea"),c=Z("v-card-actions"),f=Z("v-dialog");return J(),fe("div",{ref:"bar",style:We(y.computedStyle)},[l.inline?pe("",!0):(J(),re(t,{key:0,"min-height":M.height,"min-width":M.width,style:{cursor:"default"}},{default:K(()=>[j(u,{height:"24",class:Ct({"floated-toolbar":M.floated})},{default:K(()=>[Je(j(p,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:h[0]||(h[0]=()=>{M.errorDialog=!0})},null,512),[[qe,M.errors.length!==0]]),j(p,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:y.openEdit},null,8,["onClick"]),l.fixFloated?pe("",!0):(J(),re(w,{key:0,"open-delay":600,location:"top"},{activator:K(({props:g})=>[oe("div",et(tt(g)),[j(p,{icon:M.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":M.floated?"Unfloat Screen":"Float Screen",onClick:y.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:K(()=>[oe("span",null,ce(M.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),M.floated?(J(),re(w,{key:1,"open-delay":600,location:"top"},{activator:K(({props:g})=>[oe("div",et(tt(g)),[j(p,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:y.upScreen},null,8,["onClick"])],16)]),default:K(()=>[h[6]||(h[6]=oe("span",null," Move Screen Up ",-1))]),_:1})):pe("",!0),M.floated&&M.zIndex>l.minZ?(J(),re(w,{key:2,"open-delay":600,location:"top"},{activator:K(({props:g})=>[oe("div",et(tt(g)),[j(p,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:y.downScreen},null,8,["onClick"])],16)]),default:K(()=>[h[7]||(h[7]=oe("span",null," Move Screen Down ",-1))]),_:1})):pe("",!0),j(a),oe("span",null,ce(l.target)+" "+ce(l.screen),1),j(a),M.expand?(J(),re(p,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:y.minMaxTransition},null,8,["onClick"])):(J(),re(p,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:y.minMaxTransition},null,8,["onClick"])),l.showClose?(J(),re(p,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:h[1]||(h[1]=g=>o.$emit("close-screen"))})):pe("",!0)]),_:1},8,["class"]),M.editDialog?pe("",!0):(J(),re(n,{key:0},{default:K(()=>[Je(oe("div",Yi,[j(r,{style:{"pointer-events":"none"},"model-value":M.errors.length!==0,opacity:"0.8",contained:"","scroll-strategy":"none"},null,8,["model-value"]),(J(),re(s,{key:M.screenKey,widgets:M.layoutStack[0].widgets,"screen-values":M.screenValues,"screen-time-zone":l.timeZone,onAddItem:y.addItem,onDeleteItem:y.deleteItem,onOpen:y.open,onClose:y.close,onCloseAll:y.closeAll,onScreenError:y.addError,onScreenCheckItems:y.checkItems,onScreenErrorsCleared:y.clearErrorSource},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll","onScreenError","onScreenCheckItems","onScreenErrorsCleared"]))],512),[[qe,M.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),l.inline?(J(),fe("div",Qi,[j(r,{style:{"pointer-events":"none"},"model-value":M.errors.length!==0,opacity:"0.8",contained:"","scroll-strategy":"none"},null,8,["model-value"]),Je(j(p,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:h[2]||(h[2]=()=>{M.errorDialog=!0})},null,512),[[qe,M.errors.length!==0]]),(J(),re(s,{key:M.screenKey,widgets:M.layoutStack[0].widgets,"screen-values":M.screenValues,"screen-time-zone":l.timeZone,onAddItem:y.addItem,onDeleteItem:y.deleteItem,onOpen:y.open,onClose:y.close,onCloseAll:y.closeAll,onScreenError:y.addError,onScreenCheckItems:y.checkItems,onScreenErrorsCleared:y.clearErrorSource},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll","onScreenError","onScreenCheckItems","onScreenErrorsCleared"]))])):pe("",!0),M.editDialog?(J(),re(e,{key:2,modelValue:M.editDialog,"onUpdate:modelValue":h[3]||(h[3]=g=>M.editDialog=g),target:l.target,screen:l.screen,definition:M.currentDefinition,keywords:l.keywords,errors:M.errors,onSave:y.saveEdit,onCancel:y.cancelEdit,onDelete:y.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):pe("",!0),j(f,{modelValue:M.errorDialog,"onUpdate:modelValue":h[5]||(h[5]=g=>M.errorDialog=g),width:"60vw"},{default:K(()=>[j(u,{height:"24"},{default:K(()=>[j(a),oe("span",null," Screen: "+ce(l.target)+" "+ce(l.screen)+" Errors ",1),j(a)]),_:1}),j(t,null,{default:K(()=>[j(i,{class:"errors",readonly:"",rows:"13","model-value":y.error},null,8,["model-value"]),j(c,{class:"pb-5"},{default:K(()=>[j(a),j(p,{variant:"outlined",class:"mr-2",onClick:y.clearErrors},{default:K(()=>[...h[8]||(h[8]=[le(" Clear Errors ",-1)])]),_:1},8,["onClick"]),j(p,{variant:"flat",class:"mr-2",onClick:h[4]||(h[4]=g=>M.errorDialog=!1)},{default:K(()=>[...h[9]||(h[9]=[le(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Xi=xe(Ki,[["render",Zi],["__scopeId","data-v-1b81a1e0"]]),_t={methods:{isFloat(o){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(o)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(o))},isInt(o){return!!(/^\s*[-+]?\d+\s*$/.test(o)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(o))},isArray(o){return/^\s*\[.*\]\s*$/.test(o)},removeQuotes(o){if(o.length<2)return o;let h=o.charAt(0);if(h!=='"'&&h!=="'")return o;let l=o.charAt(o.length-1);return h!==l?o:o.slice(1,-1)},convertToValue(o){if(o.val!==void 0&&o.states&&!this.cmdRaw){const d=Object.keys(o.states).find(M=>o.states[M].value===o.val);if(d!==void 0)return d}if(typeof o.val!="string")return o.val;let h=o.val,l=this.removeQuotes(h);if(h===l){let d=h.toUpperCase();if((o.type==="STRING"||o.type==="BLOCK")&&d.startsWith("0X")){let M=d.slice(2);M.length%2!==0&&(M="0"+M);let y={json_class:"String",raw:[]};for(let p=0;p<M.length;p+=2){let w=M.charAt(p)+M.charAt(p+1);y.raw.push(Number.parseInt(w,16))}return y}if(d==="INFINITY")return Number.POSITIVE_INFINITY;if(d==="-INFINITY")return Number.NEGATIVE_INFINITY;if(d==="NAN")return Number.NaN;if(this.isFloat(h))return Number.parseFloat(h);if(this.isInt(h))return Number.isSafeInteger(Number(h))?Number.parseInt(h):BigInt(h);if(this.isArray(h))try{return JSON.parse(h)}catch{throw new Error(`Invalid array parameter value: ${h}`)}return h}return l},convertToString(o){let h="";if(Object.prototype.toString.call(o).slice(8,-1)==="Array"){let l=o.length;h="[ ";for(let d=0;d<l;d++)Object.prototype.toString.call(o[d]).slice(8,-1)==="String"?h+='"'+o[d]+'"':h+=o[d],d!==l-1&&(h+=", ");h+=" ]"}else if(Object.prototype.toString.call(o).slice(8,-1)==="Object")if(o.json_class==="String"&&o.raw){h="0x";for(let l of o.raw)h+=l.toString(16).padStart(2,"0").toUpperCase()}else o.json_class==="Float"&&o.raw?h=o.raw:h=JSON.stringify(o).replace(/\\n/g,"");else h=String(o);return h}}},Ji={name:"CommandParameterEditor",mixins:[_t],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowManualEntry:{type:Boolean,default:!1}},emits:["update:modelValue","hazardous-change"],data(){return{manuallyEntered:!1}},computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.manuallyEntered?"__manual__":this.modelValue===""?null:this.modelValue},stateOptions(){if(!this.states)return null;const o=Object.keys(this.states).map(h=>({label:h,...this.states[h]}));return this.allowManualEntry&&o.push({label:"MANUALLY_ENTERED",value:"__manual__"}),o},hazardous(){return this.states?this.manuallyEntered?!0:Object.entries(this.states).find(([o,h])=>h.value===this.modelValue)?.at(1)?.hazardous!==void 0:!1},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},watch:{hazardous:{immediate:!0,handler(o){this.$emit("hazardous-change",o)}},allowManualEntry(o){o||(this.manuallyEntered=!1)}},methods:{handleChange(o){this.$emit("update:modelValue",o)},handleStateSelect(o){o==="__manual__"?(this.manuallyEntered=!0,this.$emit("update:modelValue","")):(this.manuallyEntered=!1,this.$emit("update:modelValue",o))}}},qi={key:1,class:"d-flex align-center"};function er(o,h,l,d,M,y){const p=Z("v-text-field"),w=Z("v-select"),a=Z("v-icon"),u=Z("v-tooltip");return J(),fe("div",null,[l.states?(J(),fe("div",qi,[j(w,{items:y.stateOptions,"model-value":y.selectValue,disabled:l.disabled,"item-title":"label",class:Ct(y.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":y.handleStateSelect},null,8,["items","model-value","disabled","class","onUpdate:modelValue"]),M.manuallyEntered?(J(),re(p,{key:0,"model-value":y.textFieldValue,"hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value","onUpdate:modelValue":y.handleChange},null,8,["model-value","onUpdate:modelValue"])):pe("",!0),M.manuallyEntered?(J(),re(u,{key:1,location:"top"},{activator:K(({props:r})=>[j(a,Ie(r,{class:"ml-1"}),{default:K(()=>[...h[0]||(h[0]=[le("mdi-information-outline",-1)])]),_:1},16)]),default:K(()=>[h[1]||(h[1]=oe("span",null,[le("Enter a raw value (e.g. numeric) for this parameter."),oe("br"),le("State names are not accepted here.")],-1))]),_:1})):(J(),re(p,{key:2,"model-value":y.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"]))])):(J(),re(p,{key:0,"model-value":y.textFieldValue,disabled:l.disabled,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":y.handleChange},null,8,["model-value","disabled","onUpdate:modelValue"]))])}const tr=xe(Ji,[["render",er],["__scopeId","data-v-19092424"]]),nr={name:"CommandEditor",components:{TargetPacketItemChooser:an,CommandParameterEditor:tr,DetailsDialog:ln},mixins:[_t],props:{initialTargetName:{type:String,default:null},initialPacketName:{type:String,default:null},cmdString:{type:String,default:null},sendDisabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},statesInHex:{type:Boolean,default:!1},showIgnoredParams:{type:Boolean,default:!1},cmdRaw:{type:Boolean,default:!1},showCommandButton:{type:Boolean,default:!0},showQueueSelect:{type:Boolean,default:!0},ignoreRangeChecks:{type:Boolean,default:!1}},emits:["command-changed","build-cmd","command-loaded"],data(){return{search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],api:null,targetName:"",commandName:"",commandDescription:"",commandLoading:!1,ignoredParams:[],computedRows:[],reservedItemNames:["PACKET_TIMESECONDS","PACKET_TIMEFORMATTED","RECEIVED_TIMESECONDS","RECEIVED_TIMEFORMATTED","RECEIVED_COUNT"],contextMenuShown:!1,viewDetails:!1,parameterName:"",hazardousParameters:{},x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}]}},computed:{hasHazardousParameter(){return Object.values(this.hazardousParameters).some(o=>o===!0)}},created(){this.api=new Xe,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{onParameterHazardousChange(o,h){this.hazardousParameters[o.parameter_name]=h},commandChanged(o){(this.targetName!==o.targetName||this.commandName!==o.packetName)&&(this.targetName=o.targetName,this.commandName=o.packetName,this.updateCmdParams()),this.$emit("command-changed",o)},buildCmd(o){this.$emit("build-cmd",o)},showContextMenu(o,h){o.preventDefault(),this.parameterName=h.item.parameter_name,this.contextMenuShown=!1,this.x=o.clientX,this.y=o.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.hazardousParameters={},this.targetName&&this.commandName?(this.commandLoading=!0,this.api.get_target(this.targetName).then(o=>(this.ignoredParams=o.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),o=>{console.error("Error getting ignored parameters:",o)}).then(o=>{if(this.commandLoading=!1,o){const h=new Set;o.items.forEach(l=>{l.variable_bit_size&&h.add(l.variable_bit_size.length_item_name.toUpperCase())}),o.items.forEach(l=>{if(!this.reservedItemNames.includes(l.name)&&!l.hidden&&(!this.ignoredParams.includes(l.name)||this.showIgnoredParams)){let d=l.default;!l.states&&l.data_type==="STRING"&&typeof l.default=="string"&&(d=`'${d}'`),l.required&&(d=null),l.format_string&&l.default&&(d=sprintf(l.format_string,l.default)),Object.prototype.toString.call(d).slice(8,-1)==="Object"&&(d=this.convertToString(d));let M="N/A";l.minimum!=null&&l.maximum!=null&&(l.data_type==="FLOAT"&&(l.minimum<-1e6&&(l.minimum=l.minimum.toExponential(3)),l.maximum>1e6&&(l.maximum=l.maximum.toExponential(3))),M=`${l.minimum}..${l.maximum}`);const y=h.has(l.name.toUpperCase());this.computedRows.push({parameter_name:l.name,val:d,states:l.states,description:l.description,range:M,units:l.units,type:l.data_type,disabled:y})}}),this.commandDescription=o.description,this.populateParametersFromParsed(),this.$emit("command-loaded",o)}else this.$emit("command-loaded",null)},o=>{this.commandLoading=!1,console.error("Error getting command parameters:",o),this.$emit("command-loaded",null)})):this.$emit("command-loaded",null)},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let o=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return o;o+=" with";for(const h of this.computedRows){if(h.val===null)throw new Error(`Required parameter ${h.parameter_name} not set`);if(h.val!==null&&h.val!==void 0&&h.val!==""){if(h.states){const d=wt.findKey(h.states,M=>M.value===h.val);if(d){o+=` ${h.parameter_name} '${d}',`;continue}}let l=this.convertToString(h.val);l.includes(" ")&&!this.isArray(l)?o+=` ${h.parameter_name} '${l}',`:o+=` ${h.parameter_name} ${l},`}}return o.slice(0,-1)},parseCmdString(o){const h=o.split(" ");if(h.length<2)return{target:"",command:"",params:{}};if(h.length===2)return{target:h[0],command:h[1],params:{}};if(h[2]!=="with")return{target:"",command:"",params:{}};const l=h[0],d=h[1];let M={};const y=o.split(" with ")[1];let p=[],w=0,a="";for(let u of y)u==="["?(w++,a+=u):u==="]"?(w--,a+=u):u===","&&w===0?(p.push(a.trim()),a=""):a+=u;a.trim()!==""&&p.push(a.trim());for(let u of p){let r=u.indexOf(" ");if(r>0){let s=u.substring(0,r).trim(),n=u.substring(r+1).trim();M[s]=n}}return{target:l,command:d,params:M}},processCmdString(){const o=this.parseCmdString(this.cmdString);o.target&&o.command&&(this.targetName=o.target,this.commandName=o.command,this.parsedParameters=o.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(o=>{if(this.parsedParameters.hasOwnProperty(o.parameter_name)){const h=this.parsedParameters[o.parameter_name];if(o.states&&typeof h=="string"){const l=Object.keys(o.states).find(d=>d===h||d.toLowerCase()===h.toLowerCase());l?o.val=o.states[l].value:o.val=h}else o.type==="STRING"&&typeof h=="string"?o.val=h.startsWith("'")||h.startsWith('"')?h:`'${h}'`:o.val=h}})},100)})}}},ir={style:{padding:"10px"}};function rr(o,h,l,d,M,y){const p=Z("target-packet-item-chooser"),w=Z("v-spacer"),a=Z("v-text-field"),u=Z("v-card-title"),r=Z("command-parameter-editor"),s=Z("v-data-table"),n=Z("v-card"),t=Z("v-list-item-title"),e=Z("v-list-item"),i=Z("v-list"),c=Z("v-menu"),f=Z("details-dialog");return J(),re(n,null,{default:K(()=>[oe("div",ir,[j(p,{ref:"targetPacketChooser","initial-target-name":M.targetName,"initial-packet-name":M.commandName,disabled:l.sendDisabled||M.commandLoading,"disable-button-text":l.readOnly?"Viewers cannot send commands":null,"button-text":l.showCommandButton?"Send":null,"show-queue-select":l.showQueueSelect,"parameter-hazardous":y.hasHazardousParameter,mode:"cmd",onOnSet:h[0]||(h[0]=g=>y.commandChanged(g)),onAddItem:h[1]||(h[1]=g=>y.buildCmd(g))},null,8,["initial-target-name","initial-packet-name","disabled","disable-button-text","button-text","show-queue-select","parameter-hazardous"])]),M.computedRows.length!==0?(J(),re(n,{key:0},{default:K(()=>[j(u,{class:"d-flex align-center justify-content-space-between"},{default:K(()=>[h[5]||(h[5]=le(" Parameters ",-1)),j(w),j(a,{modelValue:M.search,"onUpdate:modelValue":h[2]||(h[2]=g=>M.search=g),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),j(s,{headers:M.headers,items:M.computedRows,search:M.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",class:"parameters-table","onContextmenu:row":y.showContextMenu},{"item.val":K(({item:g})=>[on(o.$slots,"parameter-editor",{item:g,statesInHex:l.statesInHex},()=>[j(r,{modelValue:g.val,"onUpdate:modelValue":k=>g.val=k,states:g.states,"states-in-hex":l.statesInHex,disabled:g.disabled,"allow-manual-entry":l.ignoreRangeChecks,onHazardousChange:k=>y.onParameterHazardousChange(g,k)},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex","disabled","allow-manual-entry","onHazardousChange"])],!0)]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):pe("",!0),j(c,{modelValue:M.contextMenuShown,"onUpdate:modelValue":h[3]||(h[3]=g=>M.contextMenuShown=g),target:[M.x,M.y]},{default:K(()=>[j(i,null,{default:K(()=>[(J(!0),fe(Se,null,ke(M.contextMenuOptions,(g,k)=>(J(),re(e,{key:k,onClick:it(g.action,["stop"])},{default:K(()=>[j(t,null,{default:K(()=>[le(ce(g.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),j(f,{modelValue:M.viewDetails,"onUpdate:modelValue":h[4]||(h[4]=g=>M.viewDetails=g),"target-name":M.targetName,"packet-name":M.commandName,"item-name":M.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const or=xe(nr,[["render",rr],["__scopeId","data-v-f54b3855"]]);var xt={exports:{}},gn;function sr(){return gn||(gn=1,(function(o,h){(function(){var l="ace",d=(function(){return this})();!d&&typeof window<"u"&&(d=window);var M=function(r,s,n){if(typeof r!="string"){M.original?M.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=s),M.modules[r]||(M.payloads[r]=n,M.modules[r]=null)};M.modules={},M.payloads={};var y=function(r,s,n){if(typeof s=="string"){var t=a(r,s);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(s)==="[object Array]"){for(var e=[],i=0,c=s.length;i<c;++i){var f=a(r,s[i]);if(f==null&&p.original)return;e.push(f)}return n&&n.apply(null,e)||!0}},p=function(r,s){var n=y("",r,s);return n==null&&p.original?p.original.apply(this,arguments):n},w=function(r,s){if(s.indexOf("!")!==-1){var n=s.split("!");return w(r,n[0])+"!"+w(r,n[1])}if(s.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(s=t+"/"+s;s.indexOf(".")!==-1&&e!=s;){var e=s;s=s.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return s},a=function(r,s){s=w(r,s);var n=M.modules[s];if(!n){if(n=M.payloads[s],typeof n=="function"){var t={},e={id:s,uri:"",exports:t,packaged:!0},i=function(f,g){return y(s,f,g)},c=n(i,t,e);t=c||e.exports,M.modules[s]=t,delete M.payloads[s]}n=M.modules[s]=t||n}return n};function u(r){var s=d;d[r]||(d[r]={}),s=d[r],(!s.define||!s.define.packaged)&&(M.original=s.define,s.define=M,s.define.packaged=!0),(!s.require||!s.require.packaged)&&(p.original=s.require,s.require=p,s.require.packaged=!0)}u(l)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(l,d,M){function y(p,w,a){Object.defineProperty(p,w,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||y(String.prototype,"startsWith",function(p,w){return w=w||0,this.lastIndexOf(p,w)===w}),String.prototype.endsWith||y(String.prototype,"endsWith",function(p,w){var a=this;(w===void 0||w>a.length)&&(w=a.length),w-=p.length;var u=a.indexOf(p,w);return u!==-1&&u===w}),String.prototype.repeat||y(String.prototype,"repeat",function(p){for(var w="",a=this;p>0;)p&1&&(w+=a),(p>>=1)&&(a+=a);return w}),String.prototype.includes||y(String.prototype,"includes",function(p,w){return this.indexOf(p,w)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(p),a=1;a<arguments.length;a++){var u=arguments[a];u!=null&&Object.keys(u).forEach(function(r){w[r]=u[r]})}return w}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(w){return p[w]})}),Array.prototype.find||y(Array.prototype,"find",function(p){for(var w=this.length,a=arguments[1],u=0;u<w;u++){var r=this[u];if(p.call(a,r,u,this))return r}}),Array.prototype.findIndex||y(Array.prototype,"findIndex",function(p){for(var w=this.length,a=arguments[1],u=0;u<w;u++){var r=this[u];if(p.call(a,r,u,this))return u}}),Array.prototype.includes||y(Array.prototype,"includes",function(p,w){return this.indexOf(p,w)!=-1}),Array.prototype.fill||y(Array.prototype,"fill",function(p){for(var w=this,a=w.length>>>0,u=arguments[1],r=u>>0,s=r<0?Math.max(a+r,0):Math.min(r,a),n=arguments[2],t=n===void 0?a:n>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);s<e;)w[s]=p,s++;return w}),Array.of||y(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(l,d,M){l("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(l,d,M){d.deepCopy=function y(p){if(typeof p!="object"||!p)return p;var w;if(Array.isArray(p)){w=[];for(var a=0;a<p.length;a++)w[a]=y(p[a]);return w}if(Object.prototype.toString.call(p)!=="[object Object]")return p;w={};for(var a in p)w[a]=y(p[a]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(l,d,M){d.last=function(w){return w[w.length-1]},d.stringReverse=function(w){return w.split("").reverse().join("")},d.stringRepeat=function(w,a){for(var u="";a>0;)a&1&&(u+=w),(a>>=1)&&(w+=w);return u};var y=/^\s\s*/,p=/\s\s*$/;d.stringTrimLeft=function(w){return w.replace(y,"")},d.stringTrimRight=function(w){return w.replace(p,"")},d.copyObject=function(w){var a={};for(var u in w)a[u]=w[u];return a},d.copyArray=function(w){for(var a=[],u=0,r=w.length;u<r;u++)w[u]&&typeof w[u]=="object"?a[u]=this.copyObject(w[u]):a[u]=w[u];return a},d.deepCopy=l("./deep_copy").deepCopy,d.arrayToMap=function(w){for(var a={},u=0;u<w.length;u++)a[w[u]]=1;return a},d.createMap=function(w){var a=Object.create(null);for(var u in w)a[u]=w[u];return a},d.arrayRemove=function(w,a){for(var u=0;u<=w.length;u++)a===w[u]&&w.splice(u,1)},d.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},d.escapeHTML=function(w){return(""+w).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},d.getMatchOffsets=function(w,a){var u=[];return w.replace(a,function(r){u.push({offset:arguments[arguments.length-2],length:r.length})}),u},d.deferredCall=function(w){var a=null,u=function(){a=null,w()},r=function(s){return r.cancel(),a=setTimeout(u,s||0),r};return r.schedule=r,r.call=function(){return this.cancel(),w(),r},r.cancel=function(){return clearTimeout(a),a=null,r},r.isPending=function(){return a},r},d.delayedCall=function(w,a){var u=null,r=function(){u=null,w()},s=function(n){u==null&&(u=setTimeout(r,n||a))};return s.delay=function(n){u&&clearTimeout(u),u=setTimeout(r,n||a)},s.schedule=s,s.call=function(){this.cancel(),w()},s.cancel=function(){u&&clearTimeout(u),u=null},s.isPending=function(){return u},s},d.sleep=function(w){return new Promise(function(a){setTimeout(a,w)})},d.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},d.skipEmptyMatch=function(w,a,u){return u&&w.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(l,d,M){d.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},d.getOS=function(){return d.isMac?d.OS.MAC:d.isLinux?d.OS.LINUX:d.OS.WINDOWS};var y=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(y.platform)||["other"])[0].toLowerCase(),w=y.userAgent||"",a=y.appName||"";d.isWin=p=="win",d.isMac=p=="mac",d.isLinux=p=="linux",d.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),d.isOldIE=d.isIE&&d.isIE<9,d.isGecko=d.isMozilla=w.match(/ Gecko\/\d+/),d.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",d.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,d.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,d.isSafari=parseFloat(w.split(" Safari/")[1])&&!d.isChrome||void 0,d.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,d.isAIR=w.indexOf("AdobeAIR")>=0,d.isAndroid=w.indexOf("Android")>=0,d.isChromeOS=w.indexOf(" CrOS ")>=0,d.isIOS=/iPad|iPhone|iPod/.test(w)&&!window.MSStream,d.isIOS&&(d.isMac=!0),d.isMobile=d.isIOS||d.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(l,d,M){var y=l("./useragent"),p="http://www.w3.org/1999/xhtml";d.buildDom=function n(t,e,i){if(typeof t=="string"&&t){var c=document.createTextNode(t);return e&&e.appendChild(c),c}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var f=[],g=0;g<t.length;g++){var k=n(t[g],e,i);k&&f.push(k)}return f}var $=document.createElement(t[0]),C=t[1],b=1;C&&typeof C=="object"&&!Array.isArray(C)&&(b=2);for(var g=b;g<t.length;g++)n(t[g],$,i);return b==2&&Object.keys(C).forEach(function(T){var L=C[T];T==="class"?$.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||T=="value"||T[0]=="$"?$[T]=L:T==="ref"?i&&(i[L]=$):T==="style"?typeof L=="string"&&($.style.cssText=L):L!=null&&$.setAttribute(T,L)}),e&&e.appendChild($),$},d.getDocumentHead=function(n){return n||(n=document),n.head||n.getElementsByTagName("head")[0]||n.documentElement},d.createElement=function(n,t){return document.createElementNS?document.createElementNS(t||p,n):document.createElement(n)},d.removeChildren=function(n){n.innerHTML=""},d.createTextNode=function(n,t){var e=t?t.ownerDocument:document;return e.createTextNode(n)},d.createFragment=function(n){var t=n?n.ownerDocument:document;return t.createDocumentFragment()},d.hasCssClass=function(n,t){var e=(n.className+"").split(/\s+/g);return e.indexOf(t)!==-1},d.addCssClass=function(n,t){d.hasCssClass(n,t)||(n.className+=" "+t)},d.removeCssClass=function(n,t){for(var e=n.className.split(/\s+/g);;){var i=e.indexOf(t);if(i==-1)break;e.splice(i,1)}n.className=e.join(" ")},d.toggleCssClass=function(n,t){for(var e=n.className.split(/\s+/g),i=!0;;){var c=e.indexOf(t);if(c==-1)break;i=!1,e.splice(c,1)}return i&&e.push(t),n.className=e.join(" "),i},d.setCssClass=function(n,t,e){e?d.addCssClass(n,t):d.removeCssClass(n,t)},d.hasCssString=function(n,t){var e=0,i;if(t=t||document,i=t.querySelectorAll("style")){for(;e<i.length;)if(i[e++].id===n)return!0}},d.removeElementById=function(n,t){t=t||document,t.getElementById(n)&&t.getElementById(n).remove()};var w,a=[];d.useStrictCSP=function(n){w=n,n==!1?u():a||(a=[])};function u(){var n=a;a=null,n&&n.forEach(function(t){r(t[0],t[1])})}function r(n,t,e){if(!(typeof document>"u")){if(a){if(e)u();else if(e===!1)return a.push([n,t])}if(!w){var i=e;!e||!e.getRootNode?i=document:(i=e.getRootNode(),(!i||i==e)&&(i=document));var c=i.ownerDocument||i;if(t&&d.hasCssString(t,i))return null;t&&(n+=`
|
|
5
|
+
/*# sourceURL=ace/css/`+t+" */");var f=d.createElement("style");f.appendChild(c.createTextNode(n)),t&&(f.id=t),i==c&&(i=d.getDocumentHead(c)),i.insertBefore(f,i.firstChild)}}}if(d.importCssString=r,d.importCssStylsheet=function(n,t){d.buildDom(["link",{rel:"stylesheet",href:n}],d.getDocumentHead(t))},d.$fixPositionBug=function(n){var t=n.getBoundingClientRect();if(n.style.left){var e=parseFloat(n.style.left),i=+t.left;Math.abs(e-i)>1&&(n.style.left=2*e-i+"px")}if(n.style.right){var e=parseFloat(n.style.right),i=window.innerWidth-t.right;Math.abs(e-i)>1&&(n.style.right=2*e-i+"px")}if(n.style.top){var e=parseFloat(n.style.top),i=+t.top;Math.abs(e-i)>1&&(n.style.top=2*e-i+"px")}if(n.style.bottom){var e=parseFloat(n.style.bottom),i=window.innerHeight-t.bottom;Math.abs(e-i)>1&&(n.style.bottom=2*e-i+"px")}},d.scrollbarWidth=function(n){var t=d.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=d.createElement("ace_outer"),i=e.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",e.appendChild(t);var c=n&&n.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(e);var f=t.offsetWidth;i.overflow="scroll";var g=t.offsetWidth;return f===g&&(g=e.clientWidth),c.removeChild(e),f-g},d.computedStyle=function(n,t){return window.getComputedStyle(n,"")||{}},d.setStyle=function(n,t,e){n[t]!==e&&(n[t]=e)},d.HAS_CSS_ANIMATION=!1,d.HAS_CSS_TRANSFORMS=!1,d.HI_DPI=y.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,y.isChromeOS&&(d.HI_DPI=!1),typeof document<"u"){var s=document.createElement("div");d.HI_DPI&&s.style.transform!==void 0&&(d.HAS_CSS_TRANSFORMS=!0),!y.isEdge&&typeof s.style.animationName<"u"&&(d.HAS_CSS_ANIMATION=!0),s=null}d.HAS_CSS_TRANSFORMS?d.translate=function(n,t,e){n.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:d.translate=function(n,t,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(l,d,M){var y=l("./dom");d.get=function(p,w){var a=new XMLHttpRequest;a.open("GET",p,!0),a.onreadystatechange=function(){a.readyState===4&&w(a.responseText)},a.send(null)},d.loadScript=function(p,w){var a=y.getDocumentHead(),u=document.createElement("script");u.src=p,a.appendChild(u),u.onload=u.onreadystatechange=function(r,s){(s||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,s||w())}},d.qualifyURL=function(p){var w=document.createElement("a");return w.href=p,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(l,d,M){d.inherits=function(y,p){y.super_=p,y.prototype=Object.create(p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}})},d.mixin=function(y,p){for(var w in p)y[w]=p[w];return y},d.implement=function(y,p){d.mixin(y,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(l,d,M){var y={},p=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};y._emit=y._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],s=this._defaultHandlers[a];if(!(!r.length&&!s)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=p),u.preventDefault||(u.preventDefault=w),r=r.slice();for(var n=0;n<r.length&&(r[n](u,this),!u.propagationStopped);n++);if(s&&!u.defaultPrevented)return s(u,this)}},y._signal=function(a,u){var r=(this._eventRegistry||{})[a];if(r){r=r.slice();for(var s=0;s<r.length;s++)r[s](u,this)}},y.once=function(a,u){var r=this;if(this.on(a,function s(){r.off(a,s),u.apply(null,arguments)}),!u)return new Promise(function(s){u=s})},y.setDefaultHandler=function(a,u){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[a]){var s=r[a],n=r._disabled_[a];n||(r._disabled_[a]=n=[]),n.push(s);var t=n.indexOf(u);t!=-1&&n.splice(t,1)}r[a]=u},y.removeDefaultHandler=function(a,u){var r=this._defaultHandlers;if(r){var s=r._disabled_[a];if(r[a]==u)s&&this.setDefaultHandler(a,s.pop());else if(s){var n=s.indexOf(u);n!=-1&&s.splice(n,1)}}},y.on=y.addEventListener=function(a,u,r){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[a];return s||(s=this._eventRegistry[a]=[]),s.indexOf(u)==-1&&s[r?"unshift":"push"](u),u},y.off=y.removeListener=y.removeEventListener=function(a,u){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];if(r){var s=r.indexOf(u);s!==-1&&r.splice(s,1)}},y.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},d.EventEmitter=y}),ace.define("ace/lib/report_error",["require","exports","module"],function(l,d,M){d.reportError=function(p,w){var a=new Error(p);a.data=w,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(l,d,M){var y={"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"};d.defaultEnglishMessages=y}),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(l,d,M){"no use strict";var y=l("./oop"),p=l("./event_emitter").EventEmitter,w=l("./report_error").reportError,a=l("./default_english_messages").defaultEnglishMessages,u={setOptions:function(e){Object.keys(e).forEach(function(i){this.setOption(i,e[i])},this)},getOptions:function(e){var i={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var c=this.$options;e=Object.keys(c).filter(function(f){return!c[f].hidden})}return e.forEach(function(f){i[f]=this.getOption(f)},this),i},setOption:function(e,i){if(this["$"+e]!==i){var c=this.$options[e];if(!c)return r('misspelled option "'+e+'"');if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(e,i);c.handlesSet||(this["$"+e]=i),c&&c.set&&c.set.call(this,i)}},getOption:function(e){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(e):i&&i.get?i.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}};function r(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var s,n,t=(function(){function e(){this.$defaultOptions={},s=a,n="dollarSigns"}return e.prototype.defineOptions=function(i,c,f){return i.$options||(this.$defaultOptions[c]=i.$options={}),Object.keys(f).forEach(function(g){var k=f[g];typeof k=="string"&&(k={forwardTo:k}),k.name||(k.name=g),i.$options[k.name]=k,"initialValue"in k&&(i["$"+k.name]=k.initialValue)}),y.implement(i,u),this},e.prototype.resetOptions=function(i){Object.keys(i.$options).forEach(function(c){var f=i.$options[c];"value"in f&&i.setOption(c,f.value)})},e.prototype.setDefaultValue=function(i,c,f){if(!i){for(i in this.$defaultOptions)if(this.$defaultOptions[i][c])break;if(!this.$defaultOptions[i][c])return!1}var g=this.$defaultOptions[i]||(this.$defaultOptions[i]={});g[c]&&(g.forwardTo?this.setDefaultValue(g.forwardTo,c,f):g[c].value=f)},e.prototype.setDefaultValues=function(i,c){Object.keys(c).forEach(function(f){this.setDefaultValue(i,f,c[f])},this)},e.prototype.setMessages=function(i,c){s=i,c&&c.placeholders&&(n=c.placeholders)},e.prototype.nls=function(i,c,f){s[i]||(r("No message found for the key '"+i+"' in messages with id "+s.$id+", trying to find a translation for the default string '"+c+"'."),s[c]||r("No message found for the default string '"+c+"' in the provided messages. Falling back to the default English message."));var g=s[i]||s[c]||c;return f&&(n==="dollarSigns"&&(g=g.replace(/\$(\$|[\d]+)/g,function(k,$){return $=="$"?"$":f[$]})),n==="curlyBrackets"&&(g=g.replace(/\{([^\}]+)\}/g,function(k,$){return f[$]}))),g},e})();t.prototype.warn=r,t.prototype.reportError=w,y.implement(t.prototype,p),d.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(l,d,M){M.exports=`.ace-tm .ace_gutter {
|
|
6
|
+
background: #f0f0f0;
|
|
7
|
+
color: #333;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ace-tm .ace_print-margin {
|
|
11
|
+
width: 1px;
|
|
12
|
+
background: #e8e8e8;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ace-tm .ace_fold {
|
|
16
|
+
background-color: #6B72E6;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ace-tm {
|
|
20
|
+
background-color: #FFFFFF;
|
|
21
|
+
color: black;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ace-tm .ace_cursor {
|
|
25
|
+
color: black;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ace-tm .ace_invisible {
|
|
29
|
+
color: rgb(191, 191, 191);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ace-tm .ace_storage,
|
|
33
|
+
.ace-tm .ace_keyword {
|
|
34
|
+
color: blue;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ace-tm .ace_constant {
|
|
38
|
+
color: rgb(197, 6, 11);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ace-tm .ace_constant.ace_buildin {
|
|
42
|
+
color: rgb(88, 72, 246);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ace-tm .ace_constant.ace_language {
|
|
46
|
+
color: rgb(88, 92, 246);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ace-tm .ace_constant.ace_library {
|
|
50
|
+
color: rgb(6, 150, 14);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ace-tm .ace_invalid {
|
|
54
|
+
background-color: rgba(255, 0, 0, 0.1);
|
|
55
|
+
color: red;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ace-tm .ace_support.ace_function {
|
|
59
|
+
color: rgb(60, 76, 114);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ace-tm .ace_support.ace_constant {
|
|
63
|
+
color: rgb(6, 150, 14);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ace-tm .ace_support.ace_type,
|
|
67
|
+
.ace-tm .ace_support.ace_class {
|
|
68
|
+
color: rgb(109, 121, 222);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ace-tm .ace_keyword.ace_operator {
|
|
72
|
+
color: rgb(104, 118, 135);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ace-tm .ace_string {
|
|
76
|
+
color: rgb(3, 106, 7);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ace-tm .ace_comment {
|
|
80
|
+
color: rgb(76, 136, 107);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ace-tm .ace_comment.ace_doc {
|
|
84
|
+
color: rgb(0, 102, 255);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
88
|
+
color: rgb(128, 159, 191);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ace-tm .ace_constant.ace_numeric {
|
|
92
|
+
color: rgb(0, 0, 205);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ace-tm .ace_variable {
|
|
96
|
+
color: rgb(49, 132, 149);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ace-tm .ace_xml-pe {
|
|
100
|
+
color: rgb(104, 104, 91);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
|
104
|
+
color: #0000A2;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
.ace-tm .ace_heading {
|
|
109
|
+
color: rgb(12, 7, 255);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ace-tm .ace_list {
|
|
113
|
+
color:rgb(185, 6, 144);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ace-tm .ace_meta.ace_tag {
|
|
117
|
+
color:rgb(0, 22, 142);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ace-tm .ace_string.ace_regex {
|
|
121
|
+
color: rgb(255, 0, 0)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
|
125
|
+
background: rgb(181, 213, 255);
|
|
126
|
+
}
|
|
127
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
128
|
+
box-shadow: 0 0 3px 0px white;
|
|
129
|
+
}
|
|
130
|
+
.ace-tm .ace_marker-layer .ace_step {
|
|
131
|
+
background: rgb(252, 255, 0);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
|
135
|
+
background: rgb(164, 229, 101);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
|
139
|
+
margin: -1px 0 0 -1px;
|
|
140
|
+
border: 1px solid rgb(192, 192, 192);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
|
144
|
+
background: rgba(0, 0, 0, 0.07);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.ace-tm .ace_gutter-active-line {
|
|
148
|
+
background-color : #dcdcdc;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
152
|
+
background: rgb(250, 250, 255);
|
|
153
|
+
border: 1px solid rgb(200, 200, 250);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.ace-tm .ace_indent-guide {
|
|
157
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ace-tm .ace_indent-guide-active {
|
|
161
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
162
|
+
}
|
|
163
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(l,d,M){d.isDark=!1,d.cssClass="ace-tm",d.cssText=l("./textmate-css"),d.$id="ace/theme/textmate";var y=l("../lib/dom");y.importCssString(d.cssText,d.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(l,d,M){"no use strict";var y=l("./lib/lang"),p=l("./lib/net"),w=l("./lib/dom"),a=l("./lib/app_config").AppConfig;M.exports=d=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};d.get=function(t){if(!u.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return u[t]},d.set=function(t,e){if(u.hasOwnProperty(t))u[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&w.useStrictCSP(e)},d.all=function(){return y.copyObject(u)},d.$modes={},d.moduleUrl=function(t,e){if(u.$moduleUrls[t])return u.$moduleUrls[t];var i=t.split("/");e=e||i[i.length-2]||"";var c=e=="snippets"?"/":"-",f=i[i.length-1];if(e=="worker"&&c=="-"){var g=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");f=f.replace(g,"")}(!f||f==e)&&i.length>1&&(f=i[i.length-2]);var k=u[e+"Path"];return k==null?k=u.basePath:c=="/"&&(e=c=""),k&&k.slice(-1)!="/"&&(k+="/"),k+e+c+f+this.get("suffix")},d.setModuleUrl=function(t,e){return u.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,l("./theme/textmate"));if(s)return s(t,e);console.error("loader is not configured")},s;d.setLoader=function(t){s=t},d.dynamicModules=Object.create(null),d.$loading={},d.$loaded={},d.loadModule=function(t,e){var i;if(Array.isArray(t))var c=t[0],f=t[1];else if(typeof t=="string")var f=t;var g=function(k){if(k&&!d.$loading[f])return e&&e(k);if(d.$loading[f]||(d.$loading[f]=[]),d.$loading[f].push(e),!(d.$loading[f].length>1)){var $=function(){r(f,function(C,b){b&&(d.$loaded[f]=b),d._emit("load.module",{name:f,module:b});var T=d.$loading[f];d.$loading[f]=null,T.forEach(function(L){L&&L(b)})})};if(!d.get("packaged"))return $();p.loadScript(d.moduleUrl(f,c),$),n()}};if(d.dynamicModules[f])d.dynamicModules[f]().then(function(k){k.default?g(k.default):g(k)});else{try{i=this.$require(f)}catch{}g(i||d.$loaded[f])}},d.$require=function(t){if(typeof M.require=="function"){var e="require";return M[e](t)}},d.setModuleLoader=function(t,e){d.dynamicModules[t]=e};var n=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$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"),n=function(){})};d.version="1.45.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(l,d,M){l("./lib/fixoldbrowsers");var y=l("./config");y.setLoader(function(u,r){l([u],function(s){r(null,s)})});var p=(function(){return this||typeof window<"u"&&window})();M.exports=function(u){y.init=w,y.$require=l,u.require=l},w(!0);function w(u){if(!(!p||!p.document)){y.set("packaged",u||l.packaged||M.packaged||p.define&&(void 0).packaged);var r={},s="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(s=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),i=0;i<e.length;i++){var c=e[i],f=c.src||c.getAttribute("src");if(f){for(var g=c.attributes,k=0,$=g.length;k<$;k++){var C=g[k];C.name.indexOf("data-ace-")===0&&(r[a(C.name.replace(/^data-ace-/,""))]=C.value)}var b=f.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(s=b[1])}}s&&(r.base=r.base||s,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var T in r)typeof r[T]<"u"&&y.set(T,r[T])}}function a(u){return u.replace(/-(.)/g,function(r,s){return s.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(l,d,M){var y=(function(){function p(w,a,u,r){this.start={row:w,column:a},this.end={row:u,column:r}}return p.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(w,a){return this.compare(w,a)==0},p.prototype.compareRange=function(w){var a,u=w.end,r=w.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},p.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},p.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},p.prototype.intersects=function(w){var a=this.compareRange(w);return a==-1||a==0||a==1},p.prototype.isEnd=function(w,a){return this.end.row==w&&this.end.column==a},p.prototype.isStart=function(w,a){return this.start.row==w&&this.start.column==a},p.prototype.setStart=function(w,a){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=a)},p.prototype.setEnd=function(w,a){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=a)},p.prototype.inside=function(w,a){return this.compare(w,a)==0?!(this.isEnd(w,a)||this.isStart(w,a)):!1},p.prototype.insideStart=function(w,a){return this.compare(w,a)==0?!this.isEnd(w,a):!1},p.prototype.insideEnd=function(w,a){return this.compare(w,a)==0?!this.isStart(w,a):!1},p.prototype.compare=function(w,a){return!this.isMultiLine()&&w===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?a>=this.start.column?0:-1:this.end.row===w?a<=this.end.column?0:1:0},p.prototype.compareStart=function(w,a){return this.start.row==w&&this.start.column==a?-1:this.compare(w,a)},p.prototype.compareEnd=function(w,a){return this.end.row==w&&this.end.column==a?1:this.compare(w,a)},p.prototype.compareInside=function(w,a){return this.end.row==w&&this.end.column==a?1:this.start.row==w&&this.start.column==a?-1:this.compare(w,a)},p.prototype.clipRows=function(w,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.row<w)var u={row:w,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<w)var r={row:w,column:0};return p.fromPoints(r||this.start,u||this.end)},p.prototype.extend=function(w,a){var u=this.compare(w,a);if(u==0)return this;if(u==-1)var r={row:w,column:a};else var s={row:w,column:a};return p.fromPoints(r||this.start,s||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(w){var a=w.documentToScreenPosition(this.start),u=w.documentToScreenPosition(this.end);return new p(a.row,a.column,u.row,u.column)},p.prototype.moveBy=function(w,a){this.start.row+=w,this.start.column+=a,this.end.row+=w,this.end.column+=a},p})();y.fromPoints=function(p,w){return new y(p.row,p.column,w.row,w.column)},y.comparePoints=function(p,w){return p.row-w.row||p.column-w.column},d.Range=y}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(l,d,M){for(var y=l("./oop"),p={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},w={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)w["Digit"+a]=48+a,w["Numpad"+a]=96+a,p.PRINTABLE_KEYS[48+a]=""+a,p.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var u=String.fromCharCode(a+32);w["Key"+u.toUpperCase()]=a,p.PRINTABLE_KEYS[a]=u}for(var a=1;a<13;a++)w["F"+a]=111+a,p.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var s in r)w[s]=w[s+"Left"]=w[s+"Right"]=r[s];d.$codeToKeyCode=w,p.PRINTABLE_KEYS[173]="-";for(var n in p.FUNCTION_KEYS){var t=p.FUNCTION_KEYS[n].toLowerCase();p[t]=parseInt(n,10)}for(var n in p.PRINTABLE_KEYS){var t=p.PRINTABLE_KEYS[n].toLowerCase();p[t]=parseInt(n,10)}y.mixin(p,p.MODIFIER_KEYS),y.mixin(p,p.PRINTABLE_KEYS),y.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],i=Math.pow(2,e.length);i--;)p.KEY_MODS[i]=e.filter(function(c){return i&p.KEY_MODS[c]}).join("-")+"-"})(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",y.mixin(d,p),d.default=d,d.keyCodeToString=function(e){var i=p[e];return typeof i!="string"&&(i=String.fromCharCode(e)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(l,d,M){var y=l("./keys"),p=l("./useragent"),w=null,a=0,u;function r(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function s(){return u==null&&r(),u}function n(k,$,C){this.elem=k,this.type=$,this.callback=C}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=d.addListener=function(k,$,C,b){k.addEventListener($,C,s()),b&&b.$toDestroy.push(new n(k,$,C))},e=d.removeListener=function(k,$,C){k.removeEventListener($,C,s())};d.stopEvent=function(k){return d.stopPropagation(k),d.preventDefault(k),!1},d.stopPropagation=function(k){k.stopPropagation&&k.stopPropagation()},d.preventDefault=function(k){k.preventDefault&&k.preventDefault()},d.getButton=function(k){return k.type=="dblclick"?0:k.type=="contextmenu"||p.isMac&&k.ctrlKey&&!k.altKey&&!k.shiftKey?2:k.button},d.capture=function(k,$,C){var b=k&&k.ownerDocument||document;function T(L){$&&$(L),C&&C(L),e(b,"mousemove",$),e(b,"mouseup",T),e(b,"dragstart",T)}return t(b,"mousemove",$),t(b,"mouseup",T),t(b,"dragstart",T),T},d.addMouseWheelListener=function(k,$,C){t(k,"wheel",function(b){var T=.15,L=b.deltaX||0,A=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=L*T,b.wheelY=A*T;break;case b.DOM_DELTA_LINE:var S=15;b.wheelX=L*S,b.wheelY=A*S;break;case b.DOM_DELTA_PAGE:var I=150;b.wheelX=L*I,b.wheelY=A*I;break}$(b)},C)},d.addMultiMouseDownListener=function(k,$,C,b,T){var L=0,A,S,I,E={2:"dblclick",3:"tripleclick",4:"quadclick"};function x(v){if(d.getButton(v)!==0?L=0:v.detail>1?(L++,L>4&&(L=1)):L=1,p.isIE){var m=Math.abs(v.clientX-A)>5||Math.abs(v.clientY-S)>5;(!I||m)&&(L=1),I&&clearTimeout(I),I=setTimeout(function(){I=null},$[L-1]||600),L==1&&(A=v.clientX,S=v.clientY)}if(v._clicks=L,C[b]("mousedown",v),L>4)L=0;else if(L>1)return C[b](E[L],v)}Array.isArray(k)||(k=[k]),k.forEach(function(v){t(v,"mousedown",x,T)})};function i(k){return 0|(k.ctrlKey?1:0)|(k.altKey?2:0)|(k.shiftKey?4:0)|(k.metaKey?8:0)}d.getModifierString=function(k){return y.KEY_MODS[i(k)]};function c(k,$,C){var b=i($);if(!C&&$.code&&(C=y.$codeToKeyCode[$.code]||C),!p.isMac&&w){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(b|=8),w.altGr)if((3&b)!=3)w.altGr=0;else return;if(C===18||C===17){var T=$.location;if(C===17&&T===1)w[C]==1&&(a=$.timeStamp);else if(C===18&&b===3&&T===2){var L=$.timeStamp-a;L<50&&(w.altGr=!0)}}}if(C in y.MODIFIER_KEYS&&(C=-1),!(!b&&C===13&&$.location===3&&(k($,b,-C),$.defaultPrevented))){if(p.isChromeOS&&b&8){if(k($,b,C),$.defaultPrevented)return;b&=-9}return!b&&!(C in y.FUNCTION_KEYS)&&!(C in y.PRINTABLE_KEYS)?!1:k($,b,C)}}d.addCommandKeyListener=function(k,$,C){var b=null;t(k,"keydown",function(T){w[T.keyCode]=(w[T.keyCode]||0)+1;var L=c($,T,T.keyCode);return b=T.defaultPrevented,L},C),t(k,"keypress",function(T){b&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(d.stopEvent(T),b=null)},C),t(k,"keyup",function(T){w[T.keyCode]=null},C),w||(f(),t(window,"focus",f))};function f(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var g=1;d.nextTick=function(k,$){$=$||window;var C="zero-timeout-message-"+g++,b=function(T){T.data==C&&(d.stopPropagation(T),e($,"message",b),k())};t($,"message",b),$.postMessage(C,"*")}}d.$idleBlocked=!1,d.onIdle=function(k,$){return setTimeout(function C(){d.$idleBlocked?setTimeout(C,100):k()},$)},d.$idleBlockId=null,d.blockIdle=function(k){d.$idleBlockId&&clearTimeout(d.$idleBlockId),d.$idleBlocked=!0,d.$idleBlockId=setTimeout(function(){d.$idleBlocked=!1},k||100)},d.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),d.nextFrame?d.nextFrame=d.nextFrame.bind(window):d.nextFrame=function(k){setTimeout(k,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(l,d,M){var y;M.exports={lineMode:!1,pasteCancelled:function(){return y&&y>Date.now()-50?!0:y=!1},cancel:function(){y=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(l,d,M){var y=l("../lib/event"),p=l("../config").nls,w=l("../lib/useragent"),a=l("../lib/dom"),u=l("../lib/lang"),r=l("../clipboard"),s=w.isChrome<18,n=w.isIE,t=w.isChrome>63,e=400,i=l("../lib/keys"),c=i.KEY_MODS,f=w.isIOS,g=f?/\s/:/\n/,k=w.isMobile,$=(function(){function C(b,T){var L=this;this.host=T,this.text=a.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",b.insertBefore(this.text,b.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",k||(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"}),y.addListener(this.text,"blur",function(A){L.ignoreFocusEvents||(T.onBlur(A),L.$isFocused=!1)},T),y.addListener(this.text,"focus",function(A){if(!L.ignoreFocusEvents){if(L.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}T.onFocus(A),w.isEdge?setTimeout(L.resetSelection.bind(L)):L.resetSelection()}},T),this.$focusScroll=!1,T.on("beforeEndOperation",function(){var A=T.curOp,S=A&&A.command&&A.command.name;if(S!="insertstring"){var I=S&&(A.docChanged||A.selectionChanged);L.inComposition&&I&&(L.lastValue=L.text.value="",L.onCompositionEnd()),L.resetSelection()}}),T.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=f?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&T.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,y.addCommandKeyListener(this.text,function(A,S,I){if(!L.inComposition)return T.onCommandKey(A,S,I)},T),y.addListener(this.text,"select",this.onSelect.bind(this),T),y.addListener(this.text,"input",this.onInput.bind(this),T),y.addListener(this.text,"cut",this.onCut.bind(this),T),y.addListener(this.text,"copy",this.onCopy.bind(this),T),y.addListener(this.text,"paste",this.onPaste.bind(this),T),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&y.addListener(b,"keydown",function(A){if(!(w.isMac&&!A.metaKey||!A.ctrlKey))switch(A.keyCode){case 67:L.onCopy(A);break;case 86:L.onPaste(A);break;case 88:L.onCut(A);break}},T),this.syncComposition=u.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),y.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),T),y.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),T),y.addListener(this.text,"keyup",this.onKeyup.bind(this),T),y.addListener(this.text,"keydown",this.syncComposition.bind(this),T),y.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),T),this.closeTimeout,y.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),T),y.addListener(this.text,"mousedown",function(A){A.preventDefault(),L.onContextMenuClose()},T),y.addListener(T.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),T),y.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),T),f&&this.addIosSelectionHandler(b,T,this.text)}return C.prototype.addIosSelectionHandler=function(b,T,L){var A=this,S=null,I=!1;L.addEventListener("keydown",function(x){S&&clearTimeout(S),I=!0},!0),L.addEventListener("keyup",function(x){S=setTimeout(function(){I=!1},100)},!0);var E=function(x){if(document.activeElement===L&&!(I||A.inComposition||T.$mouseHandler.isMousePressed)&&!A.copied){var v=L.selectionStart,m=L.selectionEnd,_=null,R=0;if(v==0?_=i.up:v==1?_=i.home:m>A.lastSelectionEnd&&A.lastValue[m]==`
|
|
164
|
+
`?_=i.end:v<A.lastSelectionStart&&A.lastValue[v-1]==" "?(_=i.left,R=c.option):v<A.lastSelectionStart||v==A.lastSelectionStart&&A.lastSelectionEnd!=A.lastSelectionStart&&v==m?_=i.left:m>A.lastSelectionEnd&&A.lastValue.slice(0,m).split(`
|
|
165
|
+
`).length>2?_=i.down:m>A.lastSelectionEnd&&A.lastValue[m-1]==" "?(_=i.right,R=c.option):(m>A.lastSelectionEnd||m==A.lastSelectionEnd&&A.lastSelectionEnd!=A.lastSelectionStart&&v==m)&&(_=i.right),v!==m&&(R|=c.shift),_){var O=T.onCommandKey({},R,_);if(!O&&T.commands){_=i.keyCodeToString(_);var D=T.commands.findKeyCommand(R,_);D&&T.execCommand(D)}A.lastSelectionStart=v,A.lastSelectionEnd=m,A.resetSelection("")}}};document.addEventListener("selectionchange",E),T.on("destroy",function(){document.removeEventListener("selectionchange",E)})},C.prototype.onContextMenuClose=function(){var b=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){b.tempStyle&&(b.text.style.cssText=b.tempStyle,b.tempStyle=""),b.host.renderer.$isMousePressed=!1,b.host.renderer.$keepTextAreaAtCursor&&b.host.renderer.$moveTextAreaToCursor()},0)},C.prototype.$onContextMenu=function(b){this.host.textInput.onContextMenu(b),this.onContextMenuClose()},C.prototype.onKeyup=function(b){b.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()},C.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},C.prototype.onCompositionStart=function(b){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){b.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var T=this.host.getSelectionRange();T.end.row=T.start.row,T.end.column=T.start.column,this.inComposition.markerRange=T,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()))}},C.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 b=this.text.value;this.sendText(b),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)}}},C.prototype.onCompositionEnd=function(b){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),b&&this.onInput())},C.prototype.onCut=function(b){this.doCopy(b,!0)},C.prototype.onCopy=function(b){this.doCopy(b,!1)},C.prototype.onPaste=function(b){var T=this.handleClipboardData(b);r.pasteCancelled()||(typeof T=="string"?(T&&this.host.onPaste(T,b),w.isIE&&setTimeout(this.resetSelection),y.preventDefault(b)):(this.text.value="",this.pasted=!0))},C.prototype.doCopy=function(b,T){var L=this,A=this.host.getCopyText();if(!A)return y.preventDefault(b);this.handleClipboardData(b,A)?(f&&(this.resetSelection(A),this.copied=A,setTimeout(function(){L.copied=!1},10)),T?this.host.onCut():this.host.onCopy(),y.preventDefault(b)):(this.copied=!0,this.text.value=A,this.text.select(),setTimeout(function(){L.copied=!1,L.resetSelection(),T?L.host.onCut():L.host.onCopy()}))},C.prototype.handleClipboardData=function(b,T,L){var A=b.clipboardData||window.clipboardData;if(!(!A||s)){var S=n||L?"Text":"text/plain";try{return T?A.setData(S,T)!==!1:A.getData(S)}catch(I){if(!L)return this.handleClipboardData(I,T,!0)}}},C.prototype.onInput=function(b){if(this.inComposition)return this.onCompositionUpdate();if(b&&b.inputType){if(b.inputType=="historyUndo")return this.host.execCommand("undo");if(b.inputType=="historyRedo")return this.host.execCommand("redo")}var T=this.text.value,L=this.sendText(T,!0);(T.length>e+100||g.test(L)||k&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},C.prototype.sendText=function(b,T){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),b&&this.host.onPaste(b),this.pasted=!1,"";for(var L=this.text.selectionStart,A=this.text.selectionEnd,S=this.lastSelectionStart,I=this.lastValue.length-this.lastSelectionEnd,E=b,x=b.length-L,v=b.length-A,m=0;S>0&&this.lastValue[m]==b[m];)m++,S--;for(E=E.slice(m),m=1;I>0&&this.lastValue.length-m>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-m]==b[b.length-m];)m++,I--;x-=m-1,v-=m-1;var _=E.length-m+1;if(_<0&&(S=-_,_=0),E=E.slice(0,_),!T&&!E&&!x&&!S&&!I&&!v)return"";this.sendingText=!0;var R=!1;return w.isAndroid&&E==". "&&(E=" ",R=!0),E&&!S&&!I&&!x&&!v||this.commandMode?this.host.onTextInput(E):this.host.onTextInput(E,{extendLeft:S,extendRight:I,restoreStart:x,restoreEnd:v}),this.sendingText=!1,this.lastValue=b,this.lastSelectionStart=L,this.lastSelectionEnd=A,this.lastRestoreEnd=v,R?`
|
|
166
|
+
`:E},C.prototype.onSelect=function(b){var T=this;if(!this.inComposition){var L=function(A){return A.selectionStart===0&&A.selectionEnd>=T.lastValue.length&&A.value===T.lastValue&&T.lastValue&&A.selectionEnd!==T.lastSelectionEnd};this.copied?this.copied=!1:L(this.text)?(this.host.selectAll(),this.resetSelection()):k&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},C.prototype.$resetSelectionIOS=function(b){if(!(!this.$isFocused||this.copied&&!b||this.sendingText)){b||(b="");var T=`
|
|
167
|
+
ab`+b+`cde fg
|
|
168
|
+
`;T!=this.text.value&&(this.text.value=this.lastValue=T);var L=4,A=4+(b.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=L||this.lastSelectionEnd!=A)&&this.text.setSelectionRange(L,A),this.lastSelectionStart=L,this.lastSelectionEnd=A}},C.prototype.$resetSelection=function(){var b=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var T=0,L=0,A="",S=function(D,N){for(var P=N,U=1;U<=D-b.rowStart&&U<2*b.numberOfExtraLines+1;U++)P+=b.host.session.getLine(D-U).length+1;return P};if(this.host.session){var I=this.host.selection,E=I.getRange(),x=I.cursor.row;x===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):x===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(x<this.rowStart-1||x>this.rowEnd+1)&&(this.rowStart=x>this.numberOfExtraLines?x-this.numberOfExtraLines:0,this.rowEnd=x>this.numberOfExtraLines?x+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var v=[],m=this.rowStart;m<=this.rowEnd;m++)v.push(this.host.session.getLine(m));if(A=v.join(`
|
|
169
|
+
`),T=S(E.start.row,E.start.column),L=S(E.end.row,E.end.column),E.start.row<this.rowStart){var _=this.host.session.getLine(this.rowStart-1);T=E.start.row<this.rowStart-1?0:T,L+=_.length+1,A=_+`
|
|
170
|
+
`+A}else if(E.end.row>this.rowEnd){var R=this.host.session.getLine(this.rowEnd+1);L=E.end.row>this.rowEnd+1?R.length:E.end.column,L+=A.length+1,A=A+`
|
|
171
|
+
`+R}else k&&x>0&&(A=`
|
|
172
|
+
`+A,L+=1,T+=1);A.length>e&&(T<e&&L<e?A=A.slice(0,e):(A=`
|
|
173
|
+
`,T==L?T=L=0:(T=0,L=1)));var O=A+`
|
|
174
|
+
|
|
175
|
+
`;O!=this.lastValue&&(this.text.value=this.lastValue=O,this.lastSelectionStart=this.lastSelectionEnd=O.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=L||this.lastSelectionStart!=T||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(T,L),this.lastSelectionStart=T,this.lastSelectionEnd=L}catch{}this.inComposition=!1}},C.prototype.setHost=function(b){this.host=b},C.prototype.setNumberOfExtraLines=function(b){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,b<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=b},C.prototype.setAriaLabel=function(){var b="";if(this.host.$textInputAriaLabel&&(b+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var T=this.host.session.selection.cursor.row;b+=p("text-input.aria-label","Cursor at row $0",[T+1])}this.text.setAttribute("aria-label",b)},C.prototype.setAriaOptions=function(b){b.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",b.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",b.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),b.role&&this.text.setAttribute("role",b.role),b.setLabel&&(this.text.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},C.prototype.focus=function(){var b=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||t||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var T=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var L=this.text.getBoundingClientRect().top!=0}catch{return}var A=[];if(L)for(var S=this.text.parentElement;S&&S.nodeType==1;)A.push(S),S.setAttribute("ace_nocontext","true"),!S.parentElement&&S.getRootNode?S=S.getRootNode().host:S=S.parentElement;this.text.focus({preventScroll:!0}),L&&A.forEach(function(I){I.removeAttribute("ace_nocontext")}),setTimeout(function(){b.text.style.position="",b.text.style.top=="0px"&&(b.text.style.top=T)},0)},C.prototype.blur=function(){this.text.blur()},C.prototype.isFocused=function(){return this.$isFocused},C.prototype.setInputHandler=function(b){this.inputHandler=b},C.prototype.getInputHandler=function(){return this.inputHandler},C.prototype.getElement=function(){return this.text},C.prototype.setCommandMode=function(b){this.commandMode=b,this.text.readOnly=!1},C.prototype.setReadOnly=function(b){this.commandMode||(this.text.readOnly=b)},C.prototype.setCopyWithEmptySelection=function(b){},C.prototype.onContextMenu=function(b){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:b}),this.moveToMouse(b,!0)},C.prototype.moveToMouse=function(b,T){var L=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(T?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var A=this.host.container.getBoundingClientRect(),S=a.computedStyle(this.host.container),I=A.top+(parseInt(S.borderTopWidth)||0),E=A.left+(parseInt(S.borderLeftWidth)||0),x=A.bottom-I-this.text.clientHeight-2,v=function(m){a.translate(L.text,m.clientX-E-2,Math.min(m.clientY-I-2,x))};v(b),b.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&y.capture(this.host.container,v,this.onContextMenuClose.bind(this)))},C.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},C})();d.TextInput=$,d.$setUserAgentForTests=function(C,b){k=C,f=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(l,d,M){var y=l("../lib/useragent"),p=0,w=550,a=(function(){function s(n){n.$clickSelection=null;var t=n.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(i){n[i]=this[i]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return s.prototype.onMouseDown=function(n){var t=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var i=this.editor,c=n.getButton();if(c!==0){var f=i.getSelectionRange(),g=f.isEmpty();(g||c==1)&&i.selection.moveToPosition(e),c==2&&(i.textInput.onContextMenu(n.domEvent),y.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},s.prototype.startSelect=function(n,t){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):t||e.selection.moveToPosition(n),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},s.prototype.select=function(){var n,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(e);if(i==-1)n=this.$clickSelection.end;else if(i==1)n=this.$clickSelection.start;else{var c=r(this.$clickSelection,e,t.session);e=c.cursor,n=c.anchor}t.selection.setSelectionAnchor(n.row,n.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},s.prototype.extendSelectionBy=function(n){var t,e=this.editor,i=e.renderer.screenToTextCoordinates(this.x,this.y),c=e.selection[n](i.row,i.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(c.start),g=this.$clickSelection.comparePoint(c.end);if(f==-1&&g<=0)t=this.$clickSelection.end,(c.end.row!=i.row||c.end.column!=i.column)&&(i=c.start);else if(g==1&&f>=0)t=this.$clickSelection.start,(c.start.row!=i.row||c.start.column!=i.column)&&(i=c.end);else if(f==-1&&g==1)i=c.end,t=c.start;else{var k=r(this.$clickSelection,i,e.session);i=k.cursor,t=k.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(i),e.renderer.scrollCursorIntoView()},s.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},s.prototype.focusWait=function(){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>p||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},s.prototype.onDoubleClick=function(n){var t=n.getDocumentPosition(),e=this.editor,i=e.session,c=i.getBracketRange(t);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=c,this.select()},s.prototype.onTripleClick=function(n){var t=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var i=e.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(i.start.row),this.$clickSelection.end=e.selection.getLineRange(i.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},s.prototype.onQuadClick=function(n){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},s.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,i=n.domEvent.timeStamp,c=i-e.t,f=c?n.wheelX/c:e.vx,g=c?n.wheelY/c:e.vy;c<w&&(f=(f+e.vx)/2,g=(g+e.vy)/2);var k=Math.abs(f/g),$=!1;if(k>=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&($=!0),k<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&($=!0),$)e.allowed=i;else if(i-e.allowed<w){var C=Math.abs(f)<=1.5*Math.abs(e.vx)&&Math.abs(g)<=1.5*Math.abs(e.vy);C?($=!0,e.allowed=i):e.allowed=0}if(e.t=i,e.vx=f,e.vy=g,$)return t.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},s})();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,d.DefaultHandlers=a;function u(s,n,t,e){return Math.sqrt(Math.pow(t-s,2)+Math.pow(e-n,2))}function r(s,n,t){if(s.start.row==s.end.row)var e=2*n.column-s.start.column-s.end.column;else if(s.start.row==s.end.row-1&&!s.start.column&&!s.end.column)var e=3*n.column-2*t.getLine(s.start.row).length;else var e=2*n.row-s.start.row-s.end.row;return e<0?{cursor:s.start,anchor:s.end}:{cursor:s.end,anchor:s.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(l,d,M){var y=l("../lib/event"),p=l("../lib/useragent"),w=(function(){function a(u,r){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=r,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){y.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){y.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(u,0),s=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-s},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,r=u.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var s=this.getDocumentPosition();this.$inSelection=r.contains(s.row,s.column)}return this.$inSelection},a.prototype.getButton=function(){return y.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a})();d.MouseEvent=w}),ace.define("ace/lib/scroll",["require","exports","module"],function(l,d,M){d.preventParentScroll=function(p){p.stopPropagation();var w=p.currentTarget,a=w.scrollHeight>w.clientHeight;a||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(l,d,M){var y=this&&this.__extends||(function(){var i=function(c,f){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,k){g.__proto__=k}||function(g,k){for(var $ in k)Object.prototype.hasOwnProperty.call(k,$)&&(g[$]=k[$])},i(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");i(c,f);function g(){this.constructor=c}c.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}})(),p=this&&this.__values||function(i){var c=typeof Symbol=="function"&&Symbol.iterator,f=c&&i[c],g=0;if(f)return f.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&g>=i.length&&(i=void 0),{value:i&&i[g++],done:!i}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},w=l("./lib/dom");l("./lib/event");var a=l("./range").Range,u=l("./lib/scroll").preventParentScroll,r="ace_tooltip",s=(function(){function i(c){this.isOpen=!1,this.$element=null,this.$parentNode=c}return i.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(c){this.getElement().textContent=c},i.prototype.setHtml=function(c){this.getElement().innerHTML=c},i.prototype.setPosition=function(c,f){this.getElement().style.left=c+"px",this.getElement().style.top=f+"px"},i.prototype.setClassName=function(c){w.addCssClass(this.getElement(),c)},i.prototype.setTheme=function(c){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),c.isDark&&w.addCssClass(this.getElement(),"ace_dark"),c.cssClass&&w.addCssClass(this.getElement(),c.cssClass),this.theme={isDark:c.isDark,cssClass:c.cssClass}},i.prototype.show=function(c,f,g){c!=null&&this.setText(c),f!=null&&g!=null&&this.setPosition(f,g),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(c){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i})(),n=(function(){function i(){this.popups=[]}return i.prototype.addPopup=function(c){this.popups.push(c),this.updatePopups()},i.prototype.removePopup=function(c){var f=this.popups.indexOf(c);f!==-1&&(this.popups.splice(f,1),this.updatePopups())},i.prototype.updatePopups=function(){var c,f,g,k;this.popups.sort(function(E,x){return x.priority-E.priority});var $=[];try{for(var C=p(this.popups),b=C.next();!b.done;b=C.next()){var T=b.value,L=!0;try{for(var A=(g=void 0,p($)),S=A.next();!S.done;S=A.next()){var I=S.value;if(this.doPopupsOverlap(I,T)){L=!1;break}}}catch(E){g={error:E}}finally{try{S&&!S.done&&(k=A.return)&&k.call(A)}finally{if(g)throw g.error}}L?$.push(T):T.hide()}}catch(E){c={error:E}}finally{try{b&&!b.done&&(f=C.return)&&f.call(C)}finally{if(c)throw c.error}}},i.prototype.doPopupsOverlap=function(c,f){var g=c.getElement().getBoundingClientRect(),k=f.getElement().getBoundingClientRect();return g.left<k.right&&g.right>k.left&&g.top<k.bottom&&g.bottom>k.top},i})(),t=new n;d.popupManager=t,d.Tooltip=s;var e=(function(i){y(c,i);function c(f){f===void 0&&(f=document.body);var g=i.call(this,f)||this;g.timeout=void 0,g.lastT=0,g.idleTime=350,g.lastEvent=void 0,g.onMouseOut=g.onMouseOut.bind(g),g.onMouseMove=g.onMouseMove.bind(g),g.waitForHover=g.waitForHover.bind(g),g.hide=g.hide.bind(g);var k=g.getElement();return k.style.whiteSpace="pre-wrap",k.style.pointerEvents="auto",k.addEventListener("mouseout",g.onMouseOut),k.tabIndex=-1,k.addEventListener("blur",(function(){k.contains(document.activeElement)||this.hide()}).bind(g)),k.addEventListener("wheel",u),g}return c.prototype.addToEditor=function(f){f.on("mousemove",this.onMouseMove),f.on("mousedown",this.hide);var g=f.renderer.getMouseEventTarget();g&&typeof g.removeEventListener=="function"&&g.addEventListener("mouseout",this.onMouseOut,!0)},c.prototype.removeFromEditor=function(f){f.off("mousemove",this.onMouseMove),f.off("mousedown",this.hide);var g=f.renderer.getMouseEventTarget();g&&typeof g.removeEventListener=="function"&&g.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},c.prototype.onMouseMove=function(f,g){this.lastEvent=f,this.lastT=Date.now();var k=g.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||k||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||k||(this.lastEvent=f,this.timeout=setTimeout(this.waitForHover,this.idleTime))},c.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var f=Date.now()-this.lastT;if(this.idleTime-f>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-f);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},c.prototype.isOutsideOfText=function(f){var g=f.editor,k=f.getDocumentPosition(),$=g.session.getLine(k.row);if(k.column==$.length){var C=g.renderer.pixelToScreenCoordinates(f.clientX,f.clientY),b=g.session.documentToScreenPosition(k.row,k.column);if(b.column!=C.column||b.row!=C.row)return!0}return!1},c.prototype.setDataProvider=function(f){this.$gatherData=f},c.prototype.showForRange=function(f,g,k,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=f.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.range=a.fromPoints(g.start,g.end);var b=C.textToScreenCoordinates(g.start.row,g.start.column),T=C.scroller.getBoundingClientRect();b.pageX<T.left&&(b.pageX=T.left);var L=this.getElement();L.innerHTML="",L.appendChild(k),L.style.maxHeight="",L.style.display="block",this.$setPosition(f,b,!0,g),w.$fixPositionBug(L)}},c.prototype.$setPosition=function(f,g,k,$){var C=10;k&&this.addMarker($,f.session);var b=f.renderer,T=this.getElement(),L=T.offsetHeight,A=T.offsetWidth,S=g.pageY,I=g.pageX,E=window.innerHeight-S-b.lineHeight,x=this.$shouldPlaceAbove(L,S,E-C);T.style.maxHeight=(x?S:E)-C+"px",T.style.top=x?"":S+b.lineHeight+"px",T.style.bottom=x?window.innerHeight-S+"px":"",T.style.left=Math.min(I,window.innerWidth-A-C)+"px"},c.prototype.$shouldPlaceAbove=function(f,g,k){return!(g-f<0&&g<k)},c.prototype.addMarker=function(f,g){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=g,this.marker=g&&g.addMarker(f,"ace_highlight-marker","text")},c.prototype.hide=function(f){f&&this.$fromKeyboard&&f.type=="keydown"&&f.code=="Escape"||!f&&document.activeElement==this.getElement()||f&&f.target&&(f.type!="keydown"||f.ctrlKey||f.metaKey)&&this.$element.contains(f.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,t.removePopup(this)))},c.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},c.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},c.prototype.onMouseOut=function(f){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!f.relatedTarget||this.getElement().contains(f.relatedTarget)||f&&f.currentTarget.contains(f.relatedTarget)||f.relatedTarget.classList.contains("ace_content")||this.hide())},c})(s);d.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(l,d,M){var y=this&&this.__extends||(function(){var e=function(i,c){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,g){f.__proto__=g}||function(f,g){for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(f[k]=g[k])},e(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");e(i,c);function f(){this.constructor=i}i.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})(),p=this&&this.__values||function(e){var i=typeof Symbol=="function"&&Symbol.iterator,c=i&&e[i],f=0;if(c)return c.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&f>=e.length&&(e=void 0),{value:e&&e[f++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},w=l("../lib/dom"),a=l("./mouse_event").MouseEvent,u=l("../tooltip").HoverTooltip,r=l("../config").nls,s=l("../range").Range;function n(e){var i=e.editor,c=i.renderer.$gutterLayer;e.$tooltip=new t(i),e.$tooltip.addToEditor(i),e.$tooltip.setDataProvider(function(f,g){var k=f.getDocumentPosition().row;e.$tooltip.showTooltip(k)}),e.editor.setDefaultHandler("guttermousedown",function(f){if(!(!i.isFocused()||f.getButton()!=0)){var g=c.getRegion(f);if(g!="foldWidgets"){var k=f.getDocumentPosition().row,$=i.session.selection;if(f.getShiftKey())$.selectTo(k,0);else{if(f.domEvent.detail==2)return i.selectAll(),f.preventDefault();e.$clickSelection=i.selection.getLineRange(k)}return e.setState("selectByLines"),e.captureMouse(f),f.preventDefault()}}})}d.GutterHandler=n;var t=(function(e){y(i,e);function i(c){var f=e.call(this,c.container)||this;f.id="gt"+ ++i.$uid,f.editor=c,f.visibleTooltipRow;var g=f.getElement();return g.setAttribute("role","tooltip"),g.setAttribute("id",f.id),g.style.pointerEvents="auto",f.idleTime=50,f.onDomMouseMove=f.onDomMouseMove.bind(f),f.onDomMouseOut=f.onDomMouseOut.bind(f),f.setClassName("ace_gutter-tooltip"),f}return i.prototype.onDomMouseMove=function(c){var f=new a(c,this.editor);this.onMouseMove(f,this.editor)},i.prototype.onDomMouseOut=function(c){var f=new a(c,this.editor);this.onMouseOut(f)},i.prototype.addToEditor=function(c){var f=c.renderer.$gutter;f.addEventListener("mousemove",this.onDomMouseMove),f.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,c)},i.prototype.removeFromEditor=function(c){var f=c.renderer.$gutter;f.removeEventListener("mousemove",this.onDomMouseMove),f.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,c)},i.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(c){var f,g=this.editor.renderer.$gutterLayer,k=g.$annotations[c],$;k?$={displayText:Array.from(k.displayText),type:Array.from(k.type)}:$={displayText:[],type:[]};var C=g.session.getFoldLine(c);if(C&&g.$showFoldedAnnotations){for(var b={error:[],security:[],warning:[],info:[],hint:[]},T={error:1,security:2,warning:3,info:4,hint:5},L,A=c+1;A<=C.end.row;A++)if(g.$annotations[A])for(var S=0;S<g.$annotations[A].text.length;S++){var I=g.$annotations[A].type[S];b[I].push(g.$annotations[A].text[S]),(!L||T[I]<T[L])&&(L=I)}if(["error","security","warning"].includes(L)){var E="".concat(i.annotationsToSummaryString(b)," in folded code.");$.displayText.push(E),$.type.push(L+"_fold")}}if($.displayText.length===0)return this.hide();for(var x={error:[],security:[],warning:[],info:[],hint:[]},v=g.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",A=0;A<$.displayText.length;A++){var m=w.createElement("span"),_=w.createElement("span");(f=_.classList).add.apply(f,["ace_".concat($.type[A]),v]),_.setAttribute("aria-label","".concat(i.annotationLabels[$.type[A].replace("_fold","")].singular)),_.setAttribute("role","img"),_.appendChild(w.createTextNode(" ")),m.appendChild(_),m.appendChild(w.createTextNode($.displayText[A])),m.appendChild(w.createElement("br")),x[$.type[A].replace("_fold","")].push(m)}var R=w.createElement("span");x.error.forEach(function(N){return R.appendChild(N)}),x.security.forEach(function(N){return R.appendChild(N)}),x.warning.forEach(function(N){return R.appendChild(N)}),x.info.forEach(function(N){return R.appendChild(N)}),x.hint.forEach(function(N){return R.appendChild(N)}),R.setAttribute("aria-live","polite");var O=this.$findLinkedAnnotationNode(c);O&&O.setAttribute("aria-describedby",this.id);var D=s.fromPoints({row:c,column:0},{row:c,column:0});this.showForRange(this.editor,D,R),this.visibleTooltipRow=c,this.editor._signal("showGutterTooltip",this)},i.prototype.$setPosition=function(c,f,g,k){var $=this.$findCellByRow(k.start.row);if($){var C=$&&$.element,b=C&&C.querySelector(".ace_gutter_annotation");if(b){var T=b.getBoundingClientRect();if(T){var L={pageX:T.right,pageY:T.top};return e.prototype.$setPosition.call(this,c,L,!1,k)}}}},i.prototype.$shouldPlaceAbove=function(c,f,g){return g<c},i.prototype.$findLinkedAnnotationNode=function(c){var f=this.$findCellByRow(c);if(f){var g=f.element;if(g.childNodes.length>2)return g.childNodes[2]}},i.prototype.$findCellByRow=function(c){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(f){return f.row===c})},i.prototype.hide=function(c){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var f=this.$findLinkedAnnotationNode(this.visibleTooltipRow);f&&f.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,c)}},i.annotationsToSummaryString=function(c){var f,g,k=[],$=["error","security","warning","info","hint"];try{for(var C=p($),b=C.next();!b.done;b=C.next()){var T=b.value;if(c[T].length){var L=c[T].length===1?i.annotationLabels[T].singular:i.annotationLabels[T].plural;k.push("".concat(c[T].length," ").concat(L))}}}catch(A){f={error:A}}finally{try{b&&!b.done&&(g=C.return)&&g.call(C)}finally{if(f)throw f.error}}return k.join(", ")},i.prototype.isOutsideOfText=function(c){var f=c.editor,g=f.renderer.$gutter.getBoundingClientRect();return!(c.clientX>=g.left&&c.clientX<=g.right&&c.clientY>=g.top&&c.clientY<=g.bottom)},i})(u);t.$uid=0,d.GutterTooltip=t}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(l,d,M){var y=l("../lib/dom"),p=l("../lib/event"),w=l("../lib/useragent"),a=200,u=200,r=5;function s(t){var e=t.editor,i=y.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach(function(F){t[F]=this[F]},this),e.on("mousedown",this.onMouseDown.bind(t));var f=e.container,g,k,$,C,b,T,L=0,A,S,I,E,x;this.onDragStart=function(F){if(this.cancelDrag||!f.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(F)},0),F.preventDefault()}b=e.getSelectionRange();var B=F.dataTransfer;B.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(i),B.setDragImage&&B.setDragImage(i,0,0),setTimeout(function(){e.container.removeChild(i)}),B.clearData(),B.setData("Text",e.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(F){if(f.draggable=!1,S=!1,this.setState(null),!e.getReadOnly()){var W=F.dataTransfer.dropEffect;!A&&W=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!(e.getReadOnly()||!P(F.dataTransfer)))return k=F.clientX,$=F.clientY,g||R(),L++,F.dataTransfer.dropEffect=A=U(F),p.preventDefault(F)},this.onDragOver=function(F){if(!(e.getReadOnly()||!P(F.dataTransfer)))return k=F.clientX,$=F.clientY,g||(R(),L++),D!==null&&(D=null),F.dataTransfer.dropEffect=A=U(F),p.preventDefault(F)},this.onDragLeave=function(F){if(L--,L<=0&&g)return O(),A=null,p.preventDefault(F)},this.onDrop=function(F){if(T){var W=F.dataTransfer;if(S)switch(A){case"move":b.contains(T.row,T.column)?b={start:T,end:T}:b=e.moveText(b,T);break;case"copy":b=e.moveText(b,T,!0);break}else{var B=W.getData("Text");b={start:T,end:e.session.insert(T,B)},e.focus(),A=null}return O(),p.preventDefault(F)}},p.addListener(f,"dragstart",this.onDragStart.bind(t),e),p.addListener(f,"dragend",this.onDragEnd.bind(t),e),p.addListener(f,"dragenter",this.onDragEnter.bind(t),e),p.addListener(f,"dragover",this.onDragOver.bind(t),e),p.addListener(f,"dragleave",this.onDragLeave.bind(t),e),p.addListener(f,"drop",this.onDrop.bind(t),e);function v(F,W){var B=Date.now(),H=!W||F.row!=W.row,V=!W||F.column!=W.column;if(!E||H||V)e.moveCursorToPosition(F),E=B,x={x:k,y:$};else{var G=n(x.x,x.y,k,$);G>r?E=null:B-E>=u&&(e.renderer.scrollCursorIntoView(),E=null)}}function m(F,W){var B=Date.now(),H=e.renderer.layerConfig.lineHeight,V=e.renderer.layerConfig.characterWidth,G=e.renderer.scroller.getBoundingClientRect(),Y={x:{left:k-G.left,right:G.right-k},y:{top:$-G.top,bottom:G.bottom-$}},Q=Math.min(Y.x.left,Y.x.right),ne=Math.min(Y.y.top,Y.y.bottom),q={row:F.row,column:F.column};Q/V<=2&&(q.column+=Y.x.left<Y.x.right?-3:2),ne/H<=1&&(q.row+=Y.y.top<Y.y.bottom?-1:1);var ie=F.row!=q.row,se=F.column!=q.column,ae=!W||F.row!=W.row;ie||se&&!ae?I?B-I>=a&&e.renderer.scrollCursorIntoView(q):I=B:I=null}function _(){var F=T;T=e.renderer.screenToTextCoordinates(k,$),v(T,F),m(T,F)}function R(){b=e.selection.toOrientedRange(),g=e.session.addMarker(b,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),_(),C=setInterval(_,20),L=0,p.addListener(document,"mousemove",N)}function O(){clearInterval(C),e.session.removeMarker(g),g=null,e.selection.fromOrientedRange(b),e.isFocused()&&!S&&e.$resetCursorStyle(),b=null,T=null,L=0,I=null,E=null,p.removeListener(document,"mousemove",N)}var D=null;function N(){D==null&&(D=setTimeout(function(){D!=null&&g&&O()},20))}function P(F){var W=F.types;return!W||Array.prototype.some.call(W,function(B){return B=="text/plain"||B=="Text"})}function U(F){var W=["copy","copymove","all","uninitialized"],B=["move","copymove","linkmove","all","uninitialized"],H=w.isMac?F.altKey:F.ctrlKey,V="uninitialized";try{V=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var G="none";return H&&W.indexOf(V)>=0?G="copy":B.indexOf(V)>=0?G="move":W.indexOf(V)>=0&&(G="copy"),G}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var i=w.isWin?"default":"move";t.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(w.isIE&&this.state=="dragReady"){var i=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&e.dragDrop()}if(this.state==="dragWait"){var i=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,i=t.inSelection(),c=t.getButton(),f=t.domEvent.detail||1;if(f===1&&c===0&&i){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var g=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in g&&(g.unselectable="on"),e.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var k=e.container;k.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(s.prototype);function n(t,e,i,c){return Math.sqrt(Math.pow(i-t,2)+Math.pow(c-e,2))}d.DragdropHandler=s}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(l,d,M){var y=l("./mouse_event").MouseEvent,p=l("../lib/event"),w=l("../lib/dom");d.addTouchListeners=function(a,u){var r="scroll",s,n,t,e,i,c,f=0,g,k=0,$=0,C=0,b,T;function L(){var v=window.navigator&&window.navigator.clipboard,m=!1,_=function(){var D=u.getCopyText(),N=u.session.getUndoManager().hasUndo();T.replaceChild(w.buildDom(m?["span",!D&&R("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],D&&R("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],D&&R("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],v&&R("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],N&&R("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],R("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],R("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),T.firstChild)},R=function(D){return u.commands.canExecute(D,u)},O=function(D){var N=D.target.getAttribute("action");if(N=="more"||!m)return m=!m,_();N=="paste"?v.readText().then(function(P){u.execCommand(N,P)}):N&&((N=="cut"||N=="copy")&&(v?v.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(N)),T.firstChild.style.display="none",m=!1,N!="openCommandPalette"&&u.focus()};T=w.buildDom(["div",{class:"ace_mobile-menu",onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container),T.addEventListener("touchstart",function(D){r="menu",D.stopPropagation(),D.preventDefault(),u.textInput.focus()}),T.addEventListener("touchend",function(D){D.stopPropagation(),D.preventDefault(),O(D)})}function A(){if(!u.getOption("enableMobileMenu")){T&&S();return}T||L();var v=u.selection.cursor,m=u.renderer.textToScreenCoordinates(v.row,v.column),_=u.renderer.textToScreenCoordinates(0,0).pageX,R=u.renderer.scrollLeft,O=u.container.getBoundingClientRect();T.style.top=m.pageY-O.top-3+"px",m.pageX-O.left<O.width-70?(T.style.left="",T.style.right="10px"):(T.style.right="",T.style.left=_+R-O.left+"px"),T.style.display="",T.firstChild.style.display="none",u.on("input",S)}function S(v){T&&(T.style.display="none"),u.off("input",S)}function I(){i=null,clearTimeout(i);var v=u.selection.getRange(),m=v.contains(g.row,g.column);(v.isEmpty()||!m)&&(u.selection.moveToPosition(g),u.selection.selectWord()),r="wait",A()}function E(){i=null,clearTimeout(i),u.selection.moveToPosition(g);var v=k>=2?u.selection.getLineRange(g.row):u.session.getBracketRange(g);v&&!v.isEmpty()?u.selection.setRange(v):u.selection.selectWord(),r="wait"}p.addListener(a,"contextmenu",function(v){if(b){var m=u.textInput.getElement();m.focus()}},u),p.addListener(a,"touchstart",function(v){var m=v.touches;if(i||m.length>1){clearTimeout(i),i=null,t=-1,r="zoom";return}b=u.$mouseHandler.isMousePressed=!0;var _=u.renderer.layerConfig.lineHeight,R=u.renderer.layerConfig.lineHeight,O=v.timeStamp;e=O;var D=m[0],N=D.clientX,P=D.clientY;Math.abs(s-N)+Math.abs(n-P)>_&&(t=-1),s=v.clientX=N,n=v.clientY=P,$=C=0;var U=new y(v,u);if(g=U.getDocumentPosition(),O-t<500&&m.length==1&&!f)k++,v.preventDefault(),v.button=0,E();else{k=0;var F=u.selection.cursor,W=u.selection.isEmpty()?F:u.selection.anchor,B=u.renderer.$cursorLayer.getPixelPosition(F,!0),H=u.renderer.$cursorLayer.getPixelPosition(W,!0),V=u.renderer.scroller.getBoundingClientRect(),G=u.renderer.layerConfig.offset,Y=u.renderer.scrollLeft,Q=function(ie,se){return ie=ie/R,se=se/_-.75,ie*ie+se*se};if(v.clientX<V.left){r="zoom";return}var ne=Q(v.clientX-V.left-B.left+Y,v.clientY-V.top-B.top+G),q=Q(v.clientX-V.left-H.left+Y,v.clientY-V.top-H.top+G);ne<3.5&&q<3.5&&(r=ne>q?"cursor":"anchor"),q<3.5?r="anchor":ne<3.5?r="cursor":r="scroll",i=setTimeout(I,450)}t=O},u),p.addListener(a,"touchend",function(v){b=u.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),r=="zoom"?(r="",f=0):i?(u.selection.moveToPosition(g),f=0,A()):r=="scroll"?(x(),S()):A(),clearTimeout(i),i=null},u),p.addListener(a,"touchmove",function(v){i&&(clearTimeout(i),i=null);var m=v.touches;if(!(m.length>1||r=="zoom")){var _=m[0],R=s-_.clientX,O=n-_.clientY;if(r=="wait")if(R*R+O*O>4)r="cursor";else return v.preventDefault();s=_.clientX,n=_.clientY,v.clientX=_.clientX,v.clientY=_.clientY;var D=v.timeStamp,N=D-e;if(e=D,r=="scroll"){var P=new y(v,u);P.speed=1,P.wheelX=R,P.wheelY=O,10*Math.abs(R)<Math.abs(O)&&(R=0),10*Math.abs(O)<Math.abs(R)&&(O=0),N!=0&&($=R/N,C=O/N),u._emit("mousewheel",P),P.propagationStopped||($=C=0)}else{var U=new y(v,u),F=U.getDocumentPosition();r=="cursor"?u.selection.moveCursorToPosition(F):r=="anchor"&&u.selection.setSelectionAnchor(F.row,F.column),u.renderer.scrollCursorIntoView(F),v.preventDefault()}}},u);function x(){f+=60,c=setInterval(function(){f--<=0&&(clearInterval(c),c=null),Math.abs($)<.01&&($=0),Math.abs(C)<.01&&(C=0),f<20&&($=.9*$),f<20&&(C=.9*C);var v=u.session.getScrollTop();u.renderer.scrollBy(10*$,10*C),v==u.session.getScrollTop()&&(f=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(l,d,M){var y=l("../lib/event"),p=l("../lib/useragent"),w=l("./default_handlers").DefaultHandlers,a=l("./default_gutter_handler").GutterHandler,u=l("./mouse_event").MouseEvent,r=l("./dragdrop_handler").DragdropHandler,s=l("./touch_handler").addTouchListeners,n=l("../config"),t=(function(){function e(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var c=this;this.editor=i,new w(this),new a(this),new r(this);var f=function($){var C=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());C&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},g=i.renderer.getMouseEventTarget();y.addListener(g,"click",this.onMouseEvent.bind(this,"click"),i),y.addListener(g,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),y.addMultiMouseDownListener([g,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),y.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),s(i.container,i);var k=i.renderer.$gutter;y.addListener(k,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),y.addListener(k,"click",this.onMouseEvent.bind(this,"gutterclick"),i),y.addListener(k,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),y.addListener(k,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),y.addListener(g,"mousedown",f,i),y.addListener(k,"mousedown",f,i),p.isIE&&i.renderer.scrollBarV&&(y.addListener(i.renderer.scrollBarV.element,"mousedown",f,i),y.addListener(i.renderer.scrollBarH.element,"mousedown",f,i)),i.on("mousemove",function($){if(!(c.state||c.$dragDelay||!c.$dragEnabled)){var C=i.renderer.screenToTextCoordinates($.x,$.y),b=i.session.selection.getRange(),T=i.renderer;T.scroller.style.cursor!="crosshair"&&(!b.isEmpty()&&b.insideStart(C.row,C.column)?T.setCursorStyle("default"):T.setCursorStyle(""))}})}return e.prototype.onMouseEvent=function(i,c){this.editor.session&&this.editor._emit(i,new u(c,this.editor))},e.prototype.onMouseMove=function(i,c){var f=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!f||!f.length||this.editor._emit(i,new u(c,this.editor))},e.prototype.onMouseWheel=function(i,c){var f=new u(c,this.editor);f.speed=this.$scrollSpeed*2,f.wheelX=c.wheelX,f.wheelY=c.wheelY,this.editor._emit(i,f)},e.prototype.setState=function(i){this.state=i},e.prototype.captureMouse=function(i,c){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var f=this.editor,g=this.editor.renderer;g.$isMousePressed=!0;var k=this,$=!0,C=function(S){if(S){if(p.isWebKit&&!S.which&&k.releaseMouse)return k.releaseMouse();k.x=S.clientX,k.y=S.clientY,c&&c(S),k.mouseEvent=new u(S,k.editor),k.$mouseMoved=!0}},b=function(S){f.off("beforeEndOperation",A),$=!1,f.session&&T(),k[k.state+"End"]&&k[k.state+"End"](S),k.state="",k.isMousePressed=g.$isMousePressed=!1,g.$keepTextAreaAtCursor&&g.$moveTextAreaToCursor(),k.$onCaptureMouseMove=k.releaseMouse=null,S&&k.onMouseEvent("mouseup",S),f.endOperation()},T=function(){k[k.state]&&k[k.state](),k.$mouseMoved=!1},L=function(){$&&(T(),y.nextFrame(L))};if(p.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){b(i)});var A=function(S){k.releaseMouse&&f.curOp.command.name&&f.curOp.selectionChanged&&(k[k.state+"End"]&&k[k.state+"End"](),k.state="",k.releaseMouse())};f.on("beforeEndOperation",A),f.startOperation({command:{name:"mouse"}}),k.$onCaptureMouseMove=C,k.releaseMouse=y.capture(this.editor.container,C,b),L()},e.prototype.cancelContextMenu=function(){var i=(function(c){c&&c.domEvent&&c.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),c&&c.domEvent&&y.stopEvent(c.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e})();t.prototype.releaseMouse=null,n.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),d.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(l,d,M){var y=l("../lib/dom"),p=(function(){function w(a){a.on("click",function(u){var r=u.getDocumentPosition(),s=a.session,n=s.getFoldAt(r.row,r.column,1);n&&(u.getAccelKey()?s.removeFold(n):s.expandFold(n),u.stop());var t=u.domEvent&&u.domEvent.target;t&&y.hasCssClass(t,"ace_inline_button")&&y.hasCssClass(t,"ace_toggle_wrap")&&(s.setOption("wrap",!s.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(u){var r=a.renderer.$gutterLayer.getRegion(u);if(r=="foldWidgets"){var s=u.getDocumentPosition().row,n=a.session;n.foldWidgets&&n.foldWidgets[s]&&a.session.onFoldWidgetClick(s,u),a.isFocused()||a.focus(),u.stop()}}),a.on("gutterdblclick",function(u){var r=a.renderer.$gutterLayer.getRegion(u);if(r=="foldWidgets"){var s=u.getDocumentPosition().row,n=a.session,t=n.getParentFoldRangeData(s,!0),e=t.range||t.firstRange;if(e){s=e.start.row;var i=n.getFoldAt(s,n.getLine(s).length,1);i?n.removeFold(i):(n.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}u.stop()}})}return w})();d.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(l,d,M){var y=l("../lib/keys"),p=l("../lib/event"),w=(function(){function a(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)}return a.prototype.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},a.prototype.setKeyboardHandler=function(u){var r=this.$handlers;if(r[r.length-1]!=u){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(u,1)}},a.prototype.addKeyboardHandler=function(u,r){if(u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var s=this.$handlers.indexOf(u);s!=-1&&this.$handlers.splice(s,1),r==null?this.$handlers.push(u):this.$handlers.splice(r,0,u),s==-1&&u.attach&&u.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(u){var r=this.$handlers.indexOf(u);return r==-1?!1:(this.$handlers.splice(r,1),u.detach&&u.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var u=this.$data,r=u.editor;return this.$handlers.map(function(s){return s.getStatusText&&s.getStatusText(r,u)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(u,r,s,n){for(var t,e=!1,i=this.$editor.commands,c=this.$handlers.length;c--&&(t=this.$handlers[c].handleKeyboard(this.$data,u,r,s,n),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=i.exec(t.command,this.$editor,t.args,n),e&&n&&u!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&p.stopEvent(n),e))););return!e&&u==-1&&(t={command:"insertstring"},e=i.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(u,r,s){var n=y.keyCodeToString(s);return this.$callKeyboardHandlers(r,n,s,u)},a.prototype.onTextInput=function(u){return this.$callKeyboardHandlers(-1,u)},a})();d.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(l,d,M){var y=0,p=0,w=!1,a=!1,u=!1,r=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],s=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],n=0,t=1,e=0,i=1,c=2,f=3,g=4,k=5,$=6,C=7,b=8,T=9,L=10,A=11,S=12,I=13,E=14,x=15,v=16,m=17,_=18,R=[_,_,_,_,_,_,_,_,_,$,k,$,b,k,_,_,_,_,_,_,_,_,_,_,_,_,_,_,k,k,k,$,b,g,g,A,A,A,g,g,g,g,g,L,T,L,T,T,c,c,c,c,c,c,c,c,c,c,T,g,g,g,g,g,g,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,g,g,g,g,g,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,g,g,g,_,_,_,_,_,_,k,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,T,g,A,A,A,A,g,g,g,g,e,g,g,_,g,g,A,A,c,c,g,e,g,g,g,c,e,g,g,g,g,g],O=[b,b,b,b,b,b,b,b,b,b,b,_,_,_,e,i,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,k,I,E,x,v,m,T,A,A,A,A,A,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,T,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b];function D(F,W,B,H){var V=y?s:r,G=null,Y=null,Q=null,ne=0,q=null,ie=null,se=-1,ae=null,ue=null,ye=[];if(!H)for(ae=0,H=[];ae<B;ae++)H[ae]=U(F[ae]);for(p=y,w=!1,a=!1,u=!1,ue=0;ue<B;ue++){if(G=ne,ye[ue]=Y=P(F,H,ye,ue),ne=V[G][Y],q=ne&240,ne&=15,W[ue]=Q=V[ne][5],q>0)if(q==16){for(ae=se;ae<ue;ae++)W[ae]=1;se=-1}else se=-1;if(ie=V[ne][6],ie)se==-1&&(se=ue);else if(se>-1){for(ae=se;ae<ue;ae++)W[ae]=Q;se=-1}H[ue]==k&&(W[ue]=0),p|=Q}if(u){for(ae=0;ae<B;ae++)if(H[ae]==$){W[ae]=y;for(var ee=ae-1;ee>=0&&H[ee]==b;ee--)W[ee]=y}}}function N(F,W,B){if(!(p<F)){if(F==1&&y==t&&!a){B.reverse();return}for(var H=B.length,V=0,G,Y,Q,ne;V<H;){if(W[V]>=F){for(G=V+1;G<H&&W[G]>=F;)G++;for(Y=V,Q=G-1;Y<Q;Y++,Q--)ne=B[Y],B[Y]=B[Q],B[Q]=ne;V=G}V++}}}function P(F,W,B,H){var V=W[H],G,Y,Q,ne;switch(V){case e:case i:w=!1;case g:case f:return V;case c:return w?f:c;case C:return w=!0,i;case b:return g;case T:return H<1||H+1>=W.length||(G=B[H-1])!=c&&G!=f||(Y=W[H+1])!=c&&Y!=f?g:(w&&(Y=f),Y==G?Y:g);case L:return G=H>0?B[H-1]:k,G==c&&H+1<W.length&&W[H+1]==c?c:g;case A:if(H>0&&B[H-1]==c)return c;if(w)return g;for(ne=H+1,Q=W.length;ne<Q&&W[ne]==A;)ne++;return ne<Q&&W[ne]==c?c:g;case S:for(Q=W.length,ne=H+1;ne<Q&&W[ne]==S;)ne++;if(ne<Q){var q=F[H],ie=q>=1425&&q<=2303||q==64286;if(G=W[ne],ie&&(G==i||G==C))return i}return H<1||(G=W[H-1])==k?g:B[H-1];case k:return w=!1,a=!0,y;case $:return u=!0,g;case I:case E:case v:case m:case x:w=!1;case _:return g}}function U(F){var W=F.charCodeAt(0),B=W>>8;return B==0?W>191?e:R[W]:B==5?/[\u0591-\u05f4]/.test(F)?i:e:B==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(F)?S:/[\u0660-\u0669\u066b-\u066c]/.test(F)?f:W==1642?A:/[\u06f0-\u06f9]/.test(F)?c:C:B==32&&W<=8287?O[W&255]:B==254&&W>=65136?C:g}d.L=e,d.R=i,d.EN=c,d.ON_R=3,d.AN=4,d.R_H=5,d.B=6,d.RLE=7,d.DOT="·",d.doBidiReorder=function(F,W,B){if(F.length<2)return{};var H=F.split(""),V=new Array(H.length),G=new Array(H.length),Y=[];y=B?t:n,D(H,Y,H.length,W);for(var Q=0;Q<V.length;V[Q]=Q,Q++);N(2,Y,V),N(1,Y,V);for(var Q=0;Q<V.length-1;Q++)W[Q]===f?Y[Q]=d.AN:Y[Q]===i&&(W[Q]>C&&W[Q]<I||W[Q]===g||W[Q]===_)?Y[Q]=d.ON_R:Q>0&&H[Q-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(H[Q])&&(Y[Q-1]=Y[Q]=d.R_H,Q++);H[H.length-1]===d.DOT&&(Y[H.length-1]=d.B),H[0]===""&&(Y[0]=d.RLE);for(var Q=0;Q<V.length;Q++)G[Q]=Y[V[Q]];return{logicalFromVisual:V,bidiLevels:G}},d.hasBidiCharacters=function(F,W){for(var B=!1,H=0;H<F.length;H++)W[H]=U(F.charAt(H)),!B&&(W[H]==i||W[H]==C||W[H]==f)&&(B=!0);return B},d.getVisualFromLogicalIdx=function(F,W){for(var B=0;B<W.logicalFromVisual.length;B++)if(W.logicalFromVisual[B]==F)return B;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(l,d,M){var y=l("./lib/bidiutil");l("./lib/lang");var p=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,w=(function(){function a(u){this.session=u,this.bidiMap={},this.currentRow=null,this.bidiUtil=y,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=p.test(u.getValue())}return a.prototype.isBidiRow=function(u,r,s){return!!this.seenBidi},a.prototype.onChange=function(u){this.seenBidi?this.currentRow=null:u.action=="insert"&&p.test(u.lines.join(`
|
|
176
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},a.prototype.getDocumentRow=function(){var u=0,r=this.session.$screenRowCache;if(r.length){var s=this.session.$getRowCacheIndex(r,this.currentRow);s>=0&&(u=this.session.$docRowCache[s])}return u},a.prototype.getSplitIndex=function(){var u=0,r=this.session.$screenRowCache;if(r.length)for(var s,n=this.session.$getRowCacheIndex(r,this.currentRow);this.currentRow-u>0&&(s=this.session.$getRowCacheIndex(r,this.currentRow-u-1),s===n);)n=s,u++;else u=this.currentRow;return u},a.prototype.markAsDirty=function(){this.currentRow=null},a.prototype.setShowInvisibles=function(u){this.showInvisibles=u,this.currentRow=null},a.prototype.setEolChar=function(u){this.EOL=u},a.prototype.setContentWidth=function(u){this.contentWidth=u},a.prototype.isRtlLine=function(u){return this.$isRtl?!0:u!=null?this.session.getLine(u).charAt(0)==this.RLE:this.isRtlDir},a.prototype.setRtlDirection=function(u,r){for(var s=u.getCursorPosition(),n=u.selection.getSelectionAnchor().row;n<=s.row;n++)!r&&u.session.getLine(n).charAt(0)===u.session.$bidiHandler.RLE?u.session.doc.removeInLine(n,0,1):r&&u.session.getLine(n).charAt(0)!==u.session.$bidiHandler.RLE&&u.session.doc.insert({column:0,row:n},u.session.$bidiHandler.RLE)},a})();d.BidiHandler=w}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(l,d,M){var y=l("./lib/oop"),p=l("./lib/lang"),w=l("./lib/event_emitter").EventEmitter,a=l("./range").Range,u=(function(){function r(s){this.session=s,this.doc=s.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(t){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(s,n){this.$isEmpty=!1,this.anchor.setPosition(s,n)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var s=this.anchor,n=this.lead;return s.row>n.row||s.row==n.row&&s.column>n.column},r.prototype.getRange=function(){var s=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,s):a.fromPoints(s,n)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(s,n){var t=n?s.end:s.start,e=n?s.start:s.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(s,n,t,e){if(!this.$silent){var i=this.$isEmpty,c=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(s,n),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||c)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(s){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),s.call(this)},r.prototype.selectTo=function(s,n){this.$moveSelection(function(){this.moveCursorTo(s,n)})},r.prototype.selectToPosition=function(s){this.$moveSelection(function(){this.moveCursorToPosition(s)})},r.prototype.moveTo=function(s,n){this.clearSelection(),this.moveCursorTo(s,n)},r.prototype.moveToPosition=function(s){this.clearSelection(),this.moveCursorToPosition(s)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(s,n){if(typeof n>"u"){var t=s||this.lead;s=t.row,n=t.column}return this.session.getWordRange(s,n)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var s=this.getCursor(),n=this.session.getAWordRange(s.row,s.column);this.setSelectionRange(n)},r.prototype.getLineRange=function(s,n){var t=typeof s=="number"?s:this.lead.row,e,i=this.session.getFoldLine(t);return i?(t=i.start.row,e=i.end.row):e=t,n===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(s,n,t){var e=s.column,i=s.column+n;return t<0&&(e=s.column-n,i=s.column),this.session.isTabStop(s)&&this.doc.getLine(s.row).slice(e,i).split(" ").length-1==n},r.prototype.moveCursorLeft=function(){var s=this.lead.getPosition(),n;if(n=this.session.getFoldAt(s.row,s.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(s.column===0)s.row>0&&this.moveCursorTo(s.row-1,this.doc.getLine(s.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(s,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var s=this.lead.getPosition(),n;if(n=this.session.getFoldAt(s.row,s.column,1))this.moveCursorTo(n.end.row,n.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 t=this.session.getTabSize(),s=this.lead;this.wouldMoveIntoSoftTab(s,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var s=this.lead.row,n=this.lead.column,t=this.session.documentToScreenRow(s,n),e=this.session.screenToDocumentPosition(t,0),i=this.session.getDisplayLine(s,null,e.row,e.column),c=i.match(/^\s*/);c[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(e.column+=c[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var s=this.lead,n=this.session.getDocumentLastRowColumnPosition(s.row,s.column);if(this.lead.column==n.column){var t=this.session.getLine(n.row);if(n.column==t.length){var e=t.search(/\s+$/);e>0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorFileEnd=function(){var s=this.doc.getLength()-1,n=this.doc.getLine(s).length;this.moveCursorTo(s,n)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var s=this.lead.row,n=this.lead.column,t=this.doc.getLine(s),e=t.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(s,n,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(n)),n>=t.length){this.moveCursorTo(s,t.length),this.moveCursorRight(),s<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,n)},r.prototype.moveCursorLongWordLeft=function(){var s=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(s,n,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(s,n,-1);e==null&&(e=this.doc.getLine(s).substring(0,n));var i=p.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(n-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(s,0),this.moveCursorLeft(),s>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,n)},r.prototype.$shortWordEndIndex=function(s){var n=0,t,e=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(s))n=this.session.tokenRe.lastIndex;else{for(;(t=s[n])&&e.test(t);)n++;if(n<1){for(i.lastIndex=0;(t=s[n])&&!i.test(t);)if(i.lastIndex=0,n++,e.test(t))if(n>2){n--;break}else{for(;(t=s[n])&&e.test(t);)n++;if(n>2)break}}}return i.lastIndex=0,n},r.prototype.moveCursorShortWordRight=function(){var s=this.lead.row,n=this.lead.column,t=this.doc.getLine(s),e=t.substring(n),i=this.session.getFoldAt(s,n,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(n==t.length){var c=this.doc.getLength();do s++,e=this.doc.getLine(s);while(s<c&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),n=0}var f=this.$shortWordEndIndex(e);this.moveCursorTo(s,n+f)},r.prototype.moveCursorShortWordLeft=function(){var s=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(s,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(s).substring(0,n);if(n===0){do s--,e=this.doc.getLine(s);while(s>0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var i=p.stringReverse(e),c=this.$shortWordEndIndex(i);return this.moveCursorTo(s,n-c)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(s,n){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e,i=this.session.$fontMetrics,c=n===0&&s!==0&&i;if(n===0&&(c&&this.$desiredColumn==null&&(e=i.textWidth(t.row,t.column),isFinite(e)&&(this.$desiredColumn=e/i.config.characterWidth)),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),s!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var f=this.session.lineWidgets[this.lead.row];s<0?s-=f.rowsAbove||0:s>0&&(s+=f.rowCount-(f.rowsAbove||0))}var g=t.row+s;if(c&&this.$desiredColumn!=null){e=this.$desiredColumn*i.config.characterWidth;var k=i.renderer&&i.renderer.$blockCursor;t.column=i.$pixelToColumn(g,t.column,e,k,!0)}var $=this.session.screenToDocumentPosition(g,t.column);this.moveCursorTo($.row,$.column+n,n===0)},r.prototype.moveCursorToPosition=function(s){this.moveCursorTo(s.row,s.column)},r.prototype.moveCursorTo=function(s,n,t){var e=this.session.getFoldAt(s,n,1);e&&(s=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(s);/[\uDC00-\uDFFF]/.test(i.charAt(n))&&i.charAt(n-1)&&(this.lead.row==s&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(s,n),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(s,n,t){var e=this.session.screenToDocumentPosition(s,n);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(s){this.setSelectionRange(s,s.cursor==s.start),this.$desiredColumn=s.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(s){var n=this.getRange();return s?(s.start.column=n.start.column,s.start.row=n.start.row,s.end.column=n.end.column,s.end.row=n.end.row):s=n,s.cursor=this.isBackwards()?s.start:s.end,s.desiredColumn=this.$desiredColumn,s},r.prototype.getRangeOfMovements=function(s){var n=this.getCursor();try{s(this);var t=this.getCursor();return a.fromPoints(n,t)}catch{return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},r.prototype.toJSON=function(){if(this.rangeCount)var s=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t});else{var s=this.getRange();s.isBackwards=this.isBackwards()}return s},r.prototype.fromJSON=function(s){if(s.start==null)if(this.rangeList&&s.length>1){this.toSingleRange(s[0]);for(var n=s.length;n--;){var t=a.fromPoints(s[n].start,s[n].end);s[n].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else s=s[0];this.rangeList&&this.toSingleRange(s),this.setSelectionRange(s,s.isBackwards)},r.prototype.isEqual=function(s){if((s.length||this.rangeCount)&&s.length!=this.rangeCount)return!1;if(!s.length||!this.ranges)return this.getRange().isEqual(s);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(s[n]))return!1;return!0},r})();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,y.implement(u.prototype,w),d.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(l,d,M){var y=l("./lib/report_error").reportError,p=2e3,w=(function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var r in this.states){for(var s=this.states[r],n=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},i="g",c=[],f=0;f<s.length;f++){var g=s[f];if(g.defaultToken&&(e.defaultToken=g.defaultToken),g.caseInsensitive&&i.indexOf("i")===-1&&(i+="i"),g.unicode&&i.indexOf("u")===-1&&(i+="u"),g.regex!=null){g.regex instanceof RegExp&&(g.regex=g.regex.toString().slice(1,-1));var k=g.regex,$=new RegExp("(?:("+k+")|(.))").exec("a").length-2;Array.isArray(g.token)?g.token.length==1||$==1?g.token=g.token[0]:$-1!=g.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:g,groupCount:$-1}),g.token=g.token[0]):(g.tokenArray=g.token,g.token=null,g.onMatch=this.$arrayTokens):typeof g.token=="function"&&!g.onMatch&&($>1?g.onMatch=this.$applyToken:g.onMatch=g.token),$>1&&(/\\\d/.test(g.regex)?k=g.regex.replace(/\\([0-9]+)/g,function(C,b){return"\\"+(parseInt(b,10)+t+1)}):($=1,k=this.removeCapturingGroups(g.regex)),!g.splitRegex&&typeof g.token!="string"&&c.push(g)),e[t]=f,t+=$,n.push(k),g.onMatch||(g.onMatch=null)}}n.length||(e[0]=0,n.push("$")),c.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,i)},this),this.regExps[r]=new RegExp("("+n.join(")|(")+")|($)",i)}}return a.prototype.$setMaxTokenCount=function(u){p=u|0},a.prototype.$applyToken=function(u){var r=this.splitRegex.exec(u).slice(1),s=this.token.apply(this,r);if(typeof s=="string")return[{type:s,value:u}];for(var n=[],t=0,e=s.length;t<e;t++)r[t]&&(n[n.length]={type:s[t],value:r[t]});return n},a.prototype.$arrayTokens=function(u){if(!u)return[];var r=this.splitRegex.exec(u);if(!r)return"text";for(var s=[],n=this.tokenArray,t=0,e=n.length;t<e;t++)r[t+1]&&(s[s.length]={type:n[t],value:r[t+1]});return s},a.prototype.removeCapturingGroups=function(u){var r=u.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(s,n){return n?"(?:":s});return r},a.prototype.createSplitterRegexp=function(u,r){if(u.indexOf("(?=")!=-1){var s=0,n=!1,t={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(b,T,L,A,S,I){return n?n=S!="]":S?n=!0:A?(s==t.stack&&(t.end=I+1,t.stack=-1),s--):L&&(s++,L.length!=1&&(t.stack=s,t.start=I)),b}),t.end!=null&&/^\)*$/.test(u.substr(t.end))&&(u=u.substring(0,t.start)+u.substr(t.end))}for(var e;e=/^(?:\((?:\?:)?)*\(\?<[=!]/.exec(u);){var i=e[0].length-4,c=-1,f=0,g=!1,k=/\\.|[\[\]()]/g;k.lastIndex=i;for(var $;$=k.exec(u);){var C=$[0];if(!(C.length>1)){if(g)g=C!="]";else if(C=="[")g=!0;else if(C=="(")f++;else if(C==")"&&--f==0){c=$.index+1;break}}}if(c==-1)break;u=u.substring(0,i)+u.substr(c)}return u.charAt(0)!="^"&&(u="^"+u),u.charAt(u.length-1)!="$"&&(u+="$"),new RegExp(u,(r||"").replace("g",""))},a.prototype.getLineTokens=function(u,r){if(r&&typeof r!="string"){var s=r.slice(0);r=s[0],r==="#tmp"&&(s.shift(),r=s.shift())}else var s=[];var n=r||"start",t=this.states[n];t||(n="start",t=this.states[n]);var e=this.matchMappings[n],i=this.regExps[n];i.lastIndex=0;for(var c,f=[],g=0,k=0,$={type:null,value:""};c=i.exec(u);){var C=e.defaultToken,b=null,T=c[0],L=i.lastIndex;if(L-T.length>g){var A=u.substring(g,L-T.length);$.type==C?$.value+=A:($.type&&f.push($),$={type:C,value:A})}for(var S=0;S<c.length-2;S++)if(c[S+1]!==void 0){b=t[e[S]],b.onMatch?C=b.onMatch(T,n,s,u):C=b.token,b.next&&(typeof b.next=="string"?n=b.next:n=b.next(n,s),t=this.states[n],t||(this.reportError("state doesn't exist",n),n="start",t=this.states[n]),e=this.matchMappings[n],g=L,i=this.regExps[n],i.lastIndex=L),b.consumeLineEnd&&(g=L);break}if(T){if(typeof C=="string")(!b||b.merge!==!1)&&$.type===C?$.value+=T:($.type&&f.push($),$={type:C,value:T});else if(C){$.type&&f.push($),$={type:null,value:""};for(var S=0;S<C.length;S++)f.push(C[S])}}if(g==u.length)break;if(g=L,k++>p){for(k>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:u});g<u.length;)$.type&&f.push($),$={value:u.substring(g,g+=500),type:"overflow"};n="start",s=[];break}}return $.type&&f.push($),s.length>1&&s[0]!==n&&s.unshift("#tmp",n),{tokens:f,state:s.length?s:n}},a})();w.prototype.reportError=y,d.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(l,d,M){var y=l("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,r){if(!r){for(var s in u)this.$rules[s]=u[s];return}for(var s in u){for(var n=u[s],t=0;t<n.length;t++){var e=n[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+s]=n}},this.getRules=function(){return this.$rules},this.embedRules=function(u,r,s,n,t){var e=typeof u=="function"?new u().getRules():u;if(n)for(var i=0;i<n.length;i++)n[i]=r+n[i];else{n=[];for(var c in e)n.push(r+c)}if(this.addRules(e,r),s)for(var f=Array.prototype[t?"push":"unshift"],i=0;i<n.length;i++)f.apply(this.$rules[n[i]],y(s));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var w=function(u,r){return(u!="start"||r.length)&&r.unshift(this.nextState,u),this.nextState},a=function(u,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var u=0,r=this.$rules;function s(n){var t=r[n];t.processed=!0;for(var e=0;e<t.length;e++){var i=t[e],c=null;Array.isArray(i)&&(c=i,i={}),!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var f=i.next||i.push;if(f&&Array.isArray(f)){var g=i.stateName;g||(g=i.token,typeof g!="string"&&(g=g[0]||""),r[g]&&(g+=u++)),r[g]=f,i.next=g,s(g)}else f=="pop"&&(i.next=a);if(i.push&&(i.nextState=i.next||i.push,i.next=w,delete i.push),i.rules)for(var k in i.rules)r[k]?r[k].push&&r[k].push.apply(r[k],i.rules[k]):r[k]=i.rules[k];var $=typeof i=="string"?i:i.include;if($&&($==="$self"&&($="start"),Array.isArray($)?c=$.map(function(b){return r[b]}):c=r[$]),c){var C=[e,1].concat(c);i.noEscape&&(C=C.filter(function(b){return!b.next})),t.splice.apply(t,C),e--}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}Object.keys(r).forEach(s,this)},this.createKeywordMapper=function(u,r,s,n){var t=Object.create(null);return this.$keywordList=[],Object.keys(u).forEach(function(e){for(var i=u[e],c=i.split(n||"|"),f=c.length;f--;){var g=c[f];this.$keywordList.push(g),s&&(g=g.toLowerCase()),t[g]=e}},this),u=null,s?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),d.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(l,d,M){var y;y=function(){this.$behaviours={}},(function(){this.add=function(p,w,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][w]=a},this.addBehaviours=function(p){for(var w in p)for(var a in p[w])this.add(w,a,p[w][a])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,w){if(typeof p=="function")var a=new p().getBehaviours(w);else var a=p.getBehaviours(w);this.addBehaviours(a)},this.getBehaviours=function(p){if(p){for(var w={},a=0;a<p.length;a++)this.$behaviours[p[a]]&&(w[p[a]]=this.$behaviours[p[a]]);return w}else return this.$behaviours}}).call(y.prototype),d.Behaviour=y}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(l,d,M){var y=l("./range").Range,p=(function(){function w(a,u,r){this.$session=a,this.$row=u,this.$rowTokens=a.getTokens(u);var s=a.getTokenAt(u,r);this.$tokenIndex=s?s.index:-1}return w.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},w.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,r=a[u].start;if(r!==void 0)return r;for(r=0;u>0;)u-=1,r+=a[u].value.length;return r},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new y(this.$row,u,this.$row,u+a.value.length)},w})();d.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(l,d,M){var y=l("../../lib/oop"),p=l("../behaviour").Behaviour,w=l("../../token_iterator").TokenIterator,a=l("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],s,n={},t={'"':'"',"'":"'"},e=function(f){var g=-1;if(f.multiSelect&&(g=f.selection.index,n.rangeCount!=f.multiSelect.rangeCount&&(n={rangeCount:f.multiSelect.rangeCount})),n[g])return s=n[g];s=n[g]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(f,g,k,$){var C=f.end.row-f.start.row;return{text:k+g+$,selection:[0,f.start.column+1,C,f.end.column+(C?0:1)]}},c;c=function(f){f=f||{},this.add("braces","insertion",function(g,k,$,C,b){var T=$.getCursorPosition(),L=C.doc.getLine(T.row);if(b=="{"){e($);var A=$.getSelectionRange(),S=C.doc.getTextRange(A),I=C.getTokenAt(T.row,T.column);if(S!==""&&S!=="{"&&$.getWrapBehavioursEnabled())return i(A,S,"{","}");if(I&&/(?:string)\.quasi|\.xml/.test(I.type)){var E=[/tag\-(?:open|name)/,/attribute\-name/];return E.some(function(D){return D.test(I.type)})||/(string)\.quasi/.test(I.type)&&I.value[T.column-I.start-1]!=="$"?void 0:(c.recordAutoInsert($,C,"}"),{text:"{}",selection:[1,1]})}else if(c.isSaneInsertion($,C))return/[\]\}\)]/.test(L[T.column])||$.inMultiSelectMode||f.braces?(c.recordAutoInsert($,C,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert($,C,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){e($);var x=L.substring(T.column,T.column+1);if(x=="}"){var v=C.$findOpeningBracket("}",{column:T.column+1,row:T.row});if(v!==null&&c.isAutoInsertedClosing(T,L,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
|
|
177
|
+
`||b==`\r
|
|
178
|
+
`){e($);var m="";c.isMaybeInsertedClosing(T,L)&&(m=a.stringRepeat("}",s.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var x=L.substring(T.column,T.column+1);if(x==="}"){var _=C.findMatchingBracket({row:T.row,column:T.column+1},"}");if(!_)return null;var R=this.$getIndent(C.getLine(_.row))}else if(m)var R=this.$getIndent(L);else{c.clearMaybeInsertedClosing();return}var O=R+C.getTabString();return{text:`
|
|
179
|
+
`+O+`
|
|
180
|
+
`+R+m,selection:[1,O.length,1,O.length]}}else c.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(g,k,$,C,b){var T=C.doc.getTextRange(b);if(!b.isMultiLine()&&T=="{"){e($);var L=C.doc.getLine(b.start.row),A=L.substring(b.end.column,b.end.column+1);if(A=="}")return b.end.column++,b;s.maybeInsertedBrackets--}}),this.add("parens","insertion",function(g,k,$,C,b){if(b=="("){e($);var T=$.getSelectionRange(),L=C.doc.getTextRange(T);if(L!==""&&$.getWrapBehavioursEnabled())return i(T,L,"(",")");if(c.isSaneInsertion($,C))return c.recordAutoInsert($,C,")"),{text:"()",selection:[1,1]}}else if(b==")"){e($);var A=$.getCursorPosition(),S=C.doc.getLine(A.row),I=S.substring(A.column,A.column+1);if(I==")"){var E=C.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(E!==null&&c.isAutoInsertedClosing(A,S,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(g,k,$,C,b){var T=C.doc.getTextRange(b);if(!b.isMultiLine()&&T=="("){e($);var L=C.doc.getLine(b.start.row),A=L.substring(b.start.column+1,b.start.column+2);if(A==")")return b.end.column++,b}}),this.add("brackets","insertion",function(g,k,$,C,b){if(b=="["){e($);var T=$.getSelectionRange(),L=C.doc.getTextRange(T);if(L!==""&&$.getWrapBehavioursEnabled())return i(T,L,"[","]");if(c.isSaneInsertion($,C))return c.recordAutoInsert($,C,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){e($);var A=$.getCursorPosition(),S=C.doc.getLine(A.row),I=S.substring(A.column,A.column+1);if(I=="]"){var E=C.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(E!==null&&c.isAutoInsertedClosing(A,S,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(g,k,$,C,b){var T=C.doc.getTextRange(b);if(!b.isMultiLine()&&T=="["){e($);var L=C.doc.getLine(b.start.row),A=L.substring(b.start.column+1,b.start.column+2);if(A=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(g,k,$,C,b){var T=C.$mode.$quotes||t;if(b.length==1&&T[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;e($);var L=b,A=$.getSelectionRange(),S=C.doc.getTextRange(A);if(S!==""&&(S.length!=1||!T[S])&&$.getWrapBehavioursEnabled())return i(A,S,L,L);if(!S){var I=$.getCursorPosition(),E=C.doc.getLine(I.row),x=E.substring(I.column-1,I.column),v=E.substring(I.column,I.column+1),m=C.getTokenAt(I.row,I.column),_=C.getTokenAt(I.row,I.column+1);if(x=="\\"&&m&&/escape/.test(m.type))return null;var R=m&&/string|escape/.test(m.type),O=!_||/string|escape/.test(_.type),D;if(v==L)D=R!==O,D&&/string\.end/.test(_.type)&&(D=!1);else{if(R&&!O||R&&O)return null;var N=C.$mode.tokenRe;N.lastIndex=0;var P=N.test(x);N.lastIndex=0;var U=N.test(v),F=C.$mode.$pairQuotesAfter,W=F&&F[L]&&F[L].test(x);if(!W&&P||U||v&&!/[\s;,.})\]\\]/.test(v))return null;var B=E[I.column-2];if(x==L&&(B==L||N.test(B)))return null;D=!0}return{text:D?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(g,k,$,C,b){var T=C.$mode.$quotes||t,L=C.doc.getTextRange(b);if(!b.isMultiLine()&&T.hasOwnProperty(L)){e($);var A=C.doc.getLine(b.start.row),S=A.substring(b.start.column+1,b.start.column+2);if(S==L)return b.end.column++,b}}),f.closeDocComment!==!1&&this.add("doc comment end","insertion",function(g,k,$,C,b){if(g==="doc-start"&&(b===`
|
|
181
|
+
`||b===`\r
|
|
182
|
+
`)&&$.selection.isEmpty()){var T=$.getCursorPosition();if(T.column===0)return;for(var L=C.doc.getLine(T.row),A=C.doc.getLine(T.row+1),S=C.getTokens(T.row),I=0,E=0;E<S.length;E++){I+=S[E].value.length;var x=S[E];if(I>=T.column){if(I===T.column){if(!/\.doc/.test(x.type))return;if(/\*\//.test(x.value)){var v=S[E+1];if(!v||!/\.doc/.test(v.type))return}}var m=T.column-(I-x.value.length),_=x.value.indexOf("*/"),R=x.value.indexOf("/**",_>-1?_+2:0);if(R!==-1&&m>R&&m<R+3||_!==-1&&R!==-1&&m>=_&&m<=R||!/\.doc/.test(x.type))return;break}}var O=this.$getIndent(L);if(/\s*\*/.test(A))return/^\s*\*/.test(L)?{text:b+O+"* ",selection:[1,2+O.length,1,2+O.length]}:{text:b+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(L.substring(0,T.column)))return{text:b+O+" * "+b+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})},c.isSaneInsertion=function(f,g){var k=f.getCursorPosition(),$=new w(g,k.row,k.column);if(!this.$matchTokenType($.getCurrentToken()||"text",u)){if(/[)}\]]/.test(f.session.getLine(k.row)[k.column]))return!0;var C=new w(g,k.row,k.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",u))return!1}return $.stepForward(),$.getCurrentTokenRow()!==k.row||this.$matchTokenType($.getCurrentToken()||"text",r)},c.$matchTokenType=function(f,g){return g.indexOf(f.type||f)>-1},c.recordAutoInsert=function(f,g,k){var $=f.getCursorPosition(),C=g.doc.getLine($.row);this.isAutoInsertedClosing($,C,s.autoInsertedLineEnd[0])||(s.autoInsertedBrackets=0),s.autoInsertedRow=$.row,s.autoInsertedLineEnd=k+C.substr($.column),s.autoInsertedBrackets++},c.recordMaybeInsert=function(f,g,k){var $=f.getCursorPosition(),C=g.doc.getLine($.row);this.isMaybeInsertedClosing($,C)||(s.maybeInsertedBrackets=0),s.maybeInsertedRow=$.row,s.maybeInsertedLineStart=C.substr(0,$.column)+k,s.maybeInsertedLineEnd=C.substr($.column),s.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(f,g,k){return s.autoInsertedBrackets>0&&f.row===s.autoInsertedRow&&k===s.autoInsertedLineEnd[0]&&g.substr(f.column)===s.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(f,g){return s.maybeInsertedBrackets>0&&f.row===s.maybeInsertedRow&&g.substr(f.column)===s.maybeInsertedLineEnd&&g.substr(0,f.column)==s.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){s.autoInsertedLineEnd=s.autoInsertedLineEnd.substr(1),s.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){s&&(s.maybeInsertedBrackets=0,s.maybeInsertedRow=-1)},y.inherits(c,p),d.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(l,d,M){for(var y=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],p=0,w=[],a=0;a<y.length;a+=2)w.push(p+=y[a]),y[a+1]&&w.push(45,p+=y[a+1]);d.wordChars=String.fromCharCode.apply(null,w)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(l,d,M){var y=l("../config"),p=l("../tokenizer").Tokenizer,w=l("./text_highlight_rules").TextHighlightRules,a=l("./behaviour/cstyle").CstyleBehaviour,u=l("../unicode"),r=l("../lib/lang"),s=l("../token_iterator").TokenIterator,n=l("../range").Range,t;t=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+u.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,i,c,f){var g=i.doc,k=!0,$=!0,C=1/0,b=i.getTabSize(),T=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var S=this.lineCommentStart.map(r.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var S=r.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;S=new RegExp("^(\\s*)(?:"+S+") ?"),T=i.getUseSoftTabs();var x=function(U,F){var W=U.match(S);if(W){var B=W[1].length,H=W[0].length;!_(U,B,H)&&W[0][H-1]==" "&&H--,g.removeInLine(F,B,H)}},m=L+" ",E=function(U,F){(!k||/\S/.test(U))&&(_(U,C,C)?g.insertInLine({row:F,column:C},m):g.insertInLine({row:F,column:C},L))},v=function(U,F){return S.test(U)},_=function(U,F,W){for(var B=0;F--&&U.charAt(F)==" ";)B++;if(B%b!=0)return!1;for(var B=0;U.charAt(W++)==" ";)B++;return b>2?B%b!=b-1:B%b==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,A=this.blockComment.end,S=new RegExp("^(\\s*)(?:"+r.escapeRegExp(L)+")"),I=new RegExp("(?:"+r.escapeRegExp(A)+")\\s*$"),E=function(D,N){v(D,N)||(!k||/\S/.test(D))&&(g.insertInLine({row:N,column:D.length},A),g.insertInLine({row:N,column:C},L))},x=function(D,N){var P;(P=D.match(I))&&g.removeInLine(N,D.length-P[0].length,D.length),(P=D.match(S))&&g.removeInLine(N,P[1].length,P[0].length)},v=function(D,N){if(S.test(D))return!0;for(var P=i.getTokens(N),U=0;U<P.length;U++)if(P[U].type==="comment")return!0}}function R(D){for(var N=c;N<=f;N++)D(g.getLine(N),N)}var O=1/0;R(function(D,N){var P=D.search(/\S/);P!==-1?(P<C&&(C=P),$&&!v(D,N)&&($=!1)):O>D.length&&(O=D.length)}),C==1/0&&(C=O,k=!1,$=!1),T&&C%b!=0&&(C=Math.floor(C/b)*b),R($?x:E)},this.toggleBlockComment=function(e,i,c,f){var g=this.blockComment;if(g){!g.start&&g[0]&&(g=g[0]);var k=new s(i,f.row,f.column),$=k.getCurrentToken();i.selection;var C=i.selection.toOrientedRange(),b,T;if($&&/comment/.test($.type)){for(var L,A;$&&/comment/.test($.type);){var S=$.value.indexOf(g.start);if(S!=-1){var I=k.getCurrentTokenRow(),E=k.getCurrentTokenColumn()+S;L=new n(I,E,I,E+g.start.length);break}$=k.stepBackward()}for(var k=new s(i,f.row,f.column),$=k.getCurrentToken();$&&/comment/.test($.type);){var S=$.value.indexOf(g.end);if(S!=-1){var I=k.getCurrentTokenRow(),E=k.getCurrentTokenColumn()+S;A=new n(I,E,I,E+g.end.length);break}$=k.stepForward()}A&&i.remove(A),L&&(i.remove(L),b=L.start.row,T=-g.start.length)}else T=g.start.length,b=c.start.row,i.insert(c.end,g.end),i.insert(c.start,g.start);C.start.row==b&&(C.start.column+=T),C.end.row==b&&(C.end.column+=T),i.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(e,i,c){return this.$getIndent(i)},this.checkOutdent=function(e,i,c){return!1},this.autoOutdent=function(e,i,c){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var i in e)if(e[i]){var c=e[i],f=c.prototype.$id,g=y.$modes[f];g||(y.$modes[f]=g=new c),y.$modes[i]||(y.$modes[i]=g),this.$embeds.push(i),this.$modes[i]=g}for(var k=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(b){(function(T){var L=k[b],A=T[L];T[k[b]]=function(){return this.$delegator(L,arguments,A)}})(C)},C=this,i=0;i<k.length;i++)$(i)},this.$delegator=function(e,i,c){var f=i[0]||"start";if(typeof f!="string"){if(Array.isArray(f[2])){var g=f[2][f[2].length-1],k=this.$modes[g];if(k)return k[e].apply(k,[f[1]].concat([].slice.call(i,1)))}f=f[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var C=f.split(this.$embeds[$]);if(!C[0]&&C[1]){i[0]=C[1];var k=this.$modes[this.$embeds[$]];return k[e].apply(k,i)}}var b=c.apply(this,i);return c?b:void 0},this.transformAction=function(e,i,c,f,g){if(this.$behaviour){var k=this.$behaviour.getBehaviours();for(var $ in k)if(k[$][i]){var C=k[$][i].apply(this,arguments);if(C)return C}}},this.getKeywords=function(e){if(!this.completionKeywords){var i=this.$tokenizer.rules,c=[];for(var f in i)for(var g=i[f],k=0,$=g.length;k<$;k++)if(typeof g[k].token=="string")/keyword|support|storage/.test(g[k].token)&&c.push(g[k].regex);else if(typeof g[k].token=="object"){for(var C=0,b=g[k].token.length;C<b;C++)if(/keyword|support|storage/.test(g[k].token[C])){var f=g[k].regex.match(/\(.+?\)/g)[C];c.push(f.substr(1,f.length-2))}}this.completionKeywords=c}return e?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,i,c,f){var g=this.$keywordList||this.$createKeywordList();return g.map(function(k){return{name:k,value:k,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),d.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(l,d,M){var y=l("./lib/dom"),p=(function(){function w(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return w.prototype.getRowLength=function(a){var u;return this.lineWidgets?u=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[a]?1+u:this.$wrapData[a].length+1+u},w.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(a+=u.rowCount)}),a},w.prototype.$onChangeEditor=function(a){this.attach(a.editor)},w.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(a){var u=this.editor;if(u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(s){s&&s.el&&s.el.parentNode&&(s._inDocument=!1,s.el.parentNode.removeChild(s.el))})}},w.prototype.updateOnFold=function(a,u){var r=u.lineWidgets;if(!(!r||!a.action)){for(var s=a.data,n=s.start.row,t=s.end.row,e=a.action=="add",i=n+1;i<t;i++)r[i]&&(r[i].hidden=e);r[t]&&(e?r[n]?r[t].hidden=e:r[n]=r[t]:(r[n]==r[t]&&(r[n]=void 0),r[t].hidden=e))}},w.prototype.updateOnChange=function(a){var u=this.session.lineWidgets;if(u){var r=a.start.row,s=a.end.row-r;if(s!==0)if(a.action=="remove"){var n=u.splice(r+1,s);!u[r]&&n[n.length-1]&&(u[r]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(s);u[r]&&u[r].column!=null&&a.start.column>u[r].column&&r++,t.unshift(r,0),u.splice.apply(u,t),this.$updateRows()}}},w.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(r,s){if(r)for(u=!1,r.row=s;r.$oldWidget;)r.$oldWidget.row=s,r=r.$oldWidget}),u&&(this.session.lineWidgets=null)}},w.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},w.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=y.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=y.createElement("div"),a.el.textContent=a.text),a.el&&(y.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&y.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var s=this.session.lineWidgets;a.row==r.end.row&&!s[r.start.row]?s[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},w.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,r=u&&u[a],s=[];r;)s.push(r),r=r.$oldWidget;return s},w.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(a,u){var r=this.session._changedWidgets,s=u.layerConfig;if(!(!r||!r.length)){for(var n=1/0,t=0;t<r.length;t++){var e=r[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,u.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/s.characterWidth));var i=e.h/s.lineHeight;e.coverLine&&(i-=this.session.getRowLineCount(e.row),i<0&&(i=0)),e.rowCount!=i&&(e.rowCount=i,e.row<n&&(n=e.row))}}n!=1/0&&(this.session._emit("changeFold",{data:{start:{row:n}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(a,u){var r=u.layerConfig,s=this.session.lineWidgets;if(s){for(var n=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,s.length);n>0&&!s[n];)n--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,u.$cursorLayer.config=r;for(var e=n;e<=t;e++){var i=s[e];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,u.container.appendChild(i.el));var c=u.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;i.coverLine||(c+=r.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=c-r.offset+"px";var f=i.coverGutter?0:u.gutterWidth;i.fixedWidth||(f-=u.scrollLeft),i.el.style.left=f+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=r.width+2*r.padding+"px"),i.fixedWidth?i.el.style.right=u.scrollBar.getWidth()+"px":i.el.style.right=""}}}},w})();d.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(l,d,M){d.applyDelta=function(y,p,w){var a=p.start.row,u=p.start.column,r=y[a]||"";switch(p.action){case"insert":var s=p.lines;if(s.length===1)y[a]=r.substring(0,u)+p.lines[0]+r.substring(u);else{var n=[a,1].concat(p.lines);y.splice.apply(y,n),y[a]=r.substring(0,u)+y[a],y[a+p.lines.length-1]+=r.substring(u)}break;case"remove":var t=p.end.column,e=p.end.row;a===e?y[a]=r.substring(0,u)+r.substring(t):y.splice(a,e-a+1,r.substring(0,u)+y[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(l,d,M){var y=l("./lib/oop"),p=l("./lib/event_emitter").EventEmitter,w=(function(){function r(s,n,t){this.$onChange=this.onChange.bind(this),this.attach(s),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(s){if(!(s.start.row==s.end.row&&s.start.row!=this.row)&&!(s.start.row>this.row)){var n=u(s,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},r.prototype.setPosition=function(s,n,t){var e;if(t?e={row:s,column:n}:e=this.$clipPositionToDocument(s,n),!(this.row==e.row&&this.column==e.column)){var i={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:i,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(s){this.document=s||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(s,n){var t={};return s>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):s<0?(t.row=0,t.column=0):(t.row=s,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,n))),n<0&&(t.column=0),t},r})();w.prototype.$insertRight=!1,y.implement(w.prototype,p);function a(r,s,n){var t=n?r.column<=s.column:r.column<s.column;return r.row<s.row||r.row==s.row&&t}function u(r,s,n){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),i=(t?1:-1)*(r.end.column-r.start.column),c=r.start,f=t?c:r.end;return a(s,c,n)?{row:s.row,column:s.column}:a(f,s,!n)?{row:s.row+e,column:s.column+(s.row==f.row?i:0)}:{row:c.row,column:c.column}}d.Anchor=w}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(l,d,M){var y=l("./lib/oop"),p=l("./apply_delta").applyDelta,w=l("./lib/event_emitter").EventEmitter,a=l("./range").Range,u=l("./anchor").Anchor,r=(function(){function s(n){this.$lines=[""],n.length===0?this.$lines=[""]:Array.isArray(n)?this.insertMergedLines({row:0,column:0},n):this.insert({row:0,column:0},n)}return s.prototype.setValue=function(n){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},n||"")},s.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},s.prototype.createAnchor=function(n,t){return new u(this,n,t)},s.prototype.$detectNewLine=function(n){var t=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
|
|
183
|
+
`,this._signal("changeNewLineMode")},s.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
184
|
+
`;case"unix":return`
|
|
185
|
+
`;default:return this.$autoNewLine||`
|
|
186
|
+
`}},s.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},s.prototype.getNewLineMode=function(){return this.$newLineMode},s.prototype.isNewLine=function(n){return n==`\r
|
|
187
|
+
`||n=="\r"||n==`
|
|
188
|
+
`},s.prototype.getLine=function(n){return this.$lines[n]||""},s.prototype.getLines=function(n,t){return this.$lines.slice(n,t+1)},s.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},s.prototype.getLength=function(){return this.$lines.length},s.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},s.prototype.getLinesForRange=function(n){var t;if(n.start.row===n.end.row)t=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{t=this.getLines(n.start.row,n.end.row),t[0]=(t[0]||"").substring(n.start.column);var e=t.length-1;n.end.row-n.start.row==e&&(t[e]=t[e].substring(0,n.end.column))}return t},s.prototype.insertLines=function(n,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,t)},s.prototype.removeLines=function(n,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,t)},s.prototype.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])},s.prototype.insert=function(n,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(n,this.$split(t))},s.prototype.insertInLine=function(n,t){var e=this.clippedPos(n.row,n.column),i=this.pos(n.row,n.column+t.length);return this.applyDelta({start:e,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},s.prototype.clippedPos=function(n,t){var e=this.getLength();n===void 0?n=e:n<0?n=0:n>=e&&(n=e-1,t=void 0);var i=this.getLine(n);return t==null&&(t=i.length),t=Math.min(Math.max(t,0),i.length),{row:n,column:t}},s.prototype.clonePos=function(n){return{row:n.row,column:n.column}},s.prototype.pos=function(n,t){return{row:n,column:t}},s.prototype.$clipPosition=function(n){var t=this.getLength();return n.row>=t?(n.row=Math.max(0,t-1),n.column=this.getLine(t-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},s.prototype.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var e=0;n<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),n--,e=this.$lines[n].length),this.insertMergedLines({row:n,column:e},t)},s.prototype.insertMergedLines=function(n,t){var e=this.clippedPos(n.row,n.column),i={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:i,action:"insert",lines:t}),this.clonePos(i)},s.prototype.remove=function(n){var t=this.clippedPos(n.start.row,n.start.column),e=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},s.prototype.removeInLine=function(n,t,e){var i=this.clippedPos(n,t),c=this.clippedPos(n,e);return this.applyDelta({start:i,end:c,action:"remove",lines:this.getLinesForRange({start:i,end:c})},!0),this.clonePos(i)},s.prototype.removeFullLines=function(n,t){n=Math.min(Math.max(0,n),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&n>0,i=t<this.getLength()-1,c=e?n-1:n,f=e?this.getLine(c).length:0,g=i?t+1:t,k=i?0:this.getLine(g).length,$=new a(c,f,g,k),C=this.$lines.slice(n,t+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),C},s.prototype.removeNewLine=function(n){n<this.getLength()-1&&n>=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},s.prototype.replace=function(n,t){if(n instanceof a||(n=a.fromPoints(n.start,n.end)),t.length===0&&n.isEmpty())return n.start;if(t==this.getTextRange(n))return n.end;this.remove(n);var e;return t?e=this.insert(n.start,t):e=n.start,e},s.prototype.applyDeltas=function(n){for(var t=0;t<n.length;t++)this.applyDelta(n[t])},s.prototype.revertDeltas=function(n){for(var t=n.length-1;t>=0;t--)this.revertDelta(n[t])},s.prototype.applyDelta=function(n,t){var e=n.action=="insert";(e?n.lines.length<=1&&!n.lines[0]:!a.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(p(this.$lines,n,t),this._signal("change",n)))},s.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row<t&&n.end.row<t||n.action=="insert"&&n.start.row<=t)&&this.applyDelta(n)},s.prototype.$splitAndapplyLargeDelta=function(n,t){for(var e=n.lines,i=e.length-t+1,c=n.start.row,f=n.start.column,g=0,k=0;g<i;g=k){k+=t-1;var $=e.slice(g,k);$.push(""),this.applyDelta({start:this.pos(c+g,f),end:this.pos(c+k,f=0),action:n.action,lines:$},!0)}n.lines=e.slice(g),n.start.row=c+g,n.start.column=f,this.applyDelta(n,!0)},s.prototype.revertDelta=function(n){this.$safeApplyDelta({start:this.clonePos(n.start),end:this.clonePos(n.end),action:n.action=="insert"?"remove":"insert",lines:n.lines.slice()})},s.prototype.indexToPosition=function(n,t){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,c=t||0,f=e.length;c<f;c++)if(n-=e[c].length+i,n<0)return{row:c,column:n+e[c].length+i};return{row:f-1,column:n+e[f-1].length+i}},s.prototype.positionToIndex=function(n,t){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,c=0,f=Math.min(n.row,e.length),g=t||0;g<f;++g)c+=e[g].length+i;return c+n.column},s.prototype.$split=function(n){return n.split(/\r\n|\r|\n/)},s})();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",y.implement(r.prototype,w),d.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(l,d,M){var y=l("./lib/oop"),p=l("./lib/event_emitter").EventEmitter,w=(function(){function a(u,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var s=this;this.$worker=function(){if(s.running){for(var n=new Date,t=s.currentLine,e=-1,i=s.doc,c=t;s.lines[t];)t++;var f=i.getLength(),g=0;for(s.running=!1;t<f;){s.$tokenizeRow(t),e=t;do t++;while(s.lines[t]);if(g++,g%5===0&&new Date-n>20){s.running=setTimeout(s.$worker,20);break}}s.currentLine=t,e==-1&&(e=t),c<=e&&s.fireUpdateEvent(c,e)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,r){var s={first:u,last:r};this._signal("update",{data:s})},a.prototype.start=function(u){this.currentLine=Math.min(u||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)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var r=u.start.row,s=u.end.row-r;if(s===0)this.lines[r]=null;else if(u.action=="remove")this.lines.splice(r,s+1,null),this.states.splice(r,s+1,null);else{var n=Array(s+1);n.unshift(r,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var r=this.doc.getLine(u),s=this.states[u-1],n=this.tokenizer.getLineTokens(r,s,u);return this.states[u]+""!=n.state+""?(this.states[u]=n.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=n.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a})();y.implement(w.prototype,p),d.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(l,d,M){var y=l("./lib/lang"),p=l("./range").Range,w=(function(){function a(u,r,s){s===void 0&&(s="text"),this.setRegexp(u),this.clazz=r,this.type=s,this.docLen=0}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,r,s,n){if(this.regExp){for(var t=n.firstRow,e=n.lastRow,i={},c=s.$editor&&s.$editor.$search,f=c&&c.$isMultilineSearch(s.$editor.getLastSearchOptions()),g=s.getValue().length,k=g!=this.docLen,$=t;$<=e;$++){var C=this.cache[$];if(C==null||k){if(f){C=[];var b=c.$multiLineForward(s,this.regExp,$,e);if(b){var T=b.endRow<=e?b.endRow-1:e;T>$&&($=T),C.push(new p(b.startRow,b.startCol,b.endRow,b.endCol))}C.length>this.MAX_RANGES&&(C=C.slice(0,this.MAX_RANGES))}else C=y.getMatchOffsets(s.getLine($),this.regExp),C.length>this.MAX_RANGES&&(C=C.slice(0,this.MAX_RANGES)),C=C.map(function(I){return new p($,I.offset,$,I.offset+I.length)});this.cache[$]=C.length?C:""}if(C.length!==0)for(var L=C.length;L--;){var A=C[L].toScreenRange(s),S=A.toString();i[S]||(i[S]=!0,r.drawSingleLineMarker(u,A,this.clazz,n))}}this.docLen=g}},a})();w.prototype.MAX_RANGES=500,d.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(l,d,M){var y=(function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(b){this.$session=b},C.prototype.add=function(b,T,L){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),T===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},C.prototype.addSelection=function(b,T){this.selections.push({value:b,rev:T||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(b,T){T==null&&(T=this.$rev+1);for(var L=this.$undoStack,A=L.length;A--;){var S=L[A][0];if(S.id<=b)break;S.id<T&&(S.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(b,T){for(var L=this.selections,A=L.length;A--;){var S=L[A];if(S.rev<b)return T&&(S=L[A+1]),S}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(b,T){T==null&&(T=this.$rev+1);for(var L=this.$undoStack,A=null,S=0,I=L.length;I--;){var E=L[I][0];if(E.id<T&&!A&&(A=I+1),E.id<=b){S=I+1;break}}return L.slice(S,A)},C.prototype.getChangedRanges=function(b,T){T==null&&(T=this.$rev+1)},C.prototype.getChangedLines=function(b,T){T==null&&(T=this.$rev+1)},C.prototype.undo=function(b,T){this.lastDeltas=null;var L=this.$undoStack;if(p(L,L.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var A=L.pop(),S=null;return A&&(S=b.undoChanges(A,T),this.$redoStack.push(A),this.$syncRev()),this.$fromUndo=!1,S}},C.prototype.redo=function(b,T){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(I){I[0].id=++this.$maxRev},this)}var A=this.$redoStack.pop(),S=null;return A&&(S=b.redoChanges(A,T),this.$undoStack.push(A),this.$syncRev()),this.$fromUndo=!1,S},C.prototype.$syncRev=function(){var b=this.$undoStack,T=b[b.length-1],L=T&&T[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},C.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=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(b){this.reset(),b&&(this.$undoStack=b.$undoStack||[],this.$redoStack=b.$redoStack||[])},C.prototype.$prettyPrint=function(b){return b?s(b):s(this.$undoStack)+`
|
|
189
|
+
---
|
|
190
|
+
`+s(this.$redoStack)},C})();y.prototype.hasUndo=y.prototype.canUndo,y.prototype.hasRedo=y.prototype.canRedo,y.prototype.isClean=y.prototype.isAtBookmark,y.prototype.markClean=y.prototype.bookmark;function p(C,b){for(var T=b;T--;){var L=C[T];if(L&&!L[0].ignore){for(;T<b-1;){var A=e(C[T],C[T+1]);C[T]=A[0],C[T+1]=A[1],T++}return!0}}}var w=l("./range").Range,a=w.comparePoints;w.comparePoints;function u(C){return{row:C.row,column:C.column}}function r(C){return{start:u(C.start),end:u(C.end),action:C.action,lines:C.lines.slice()}}function s(C){if(C=C||this,Array.isArray(C))return C.map(s).join(`
|
|
191
|
+
`);var b="";return C.action?(b=C.action=="insert"?"+":"-",b+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?b=C.value.map(n).join(`
|
|
192
|
+
`):b=n(C.value)),C.start&&(b+=n(C)),(C.id||C.rev)&&(b+=" ("+(C.id||C.rev)+")"),b}function n(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function t(C,b){var T=C.action=="insert",L=b.action=="insert";if(T&&L)if(a(b.start,C.end)>=0)c(b,C,-1);else if(a(b.start,C.start)<=0)c(C,b,1);else return null;else if(T&&!L)if(a(b.start,C.end)>=0)c(b,C,-1);else if(a(b.end,C.start)<=0)c(C,b,-1);else return null;else if(!T&&L)if(a(b.start,C.start)>=0)c(b,C,1);else if(a(b.start,C.start)<=0)c(C,b,1);else return null;else if(!T&&!L)if(a(b.start,C.start)>=0)c(b,C,1);else if(a(b.end,C.start)<=0)c(C,b,-1);else return null;return[b,C]}function e(C,b){for(var T=C.length;T--;)for(var L=0;L<b.length;L++)if(!t(C[T],b[L])){for(;T<C.length;){for(;L--;)t(b[L],C[T]);L=b.length,T++}return[C,b]}return C.selectionBefore=b.selectionBefore=C.selectionAfter=b.selectionAfter=null,[b,C]}function i(C,b){var T=C.action=="insert",L=b.action=="insert";if(T&&L)a(C.start,b.start)<0?c(b,C,1):c(C,b,1);else if(T&&!L)a(C.start,b.end)>=0?c(C,b,-1):(a(C.start,b.start)<=0||c(C,w.fromPoints(b.start,C.start),-1),c(b,C,1));else if(!T&&L)a(b.start,C.end)>=0?c(b,C,-1):(a(b.start,C.start)<=0||c(b,w.fromPoints(C.start,b.start),-1),c(C,b,1));else if(!T&&!L)if(a(b.start,C.end)>=0)c(b,C,-1);else if(a(b.end,C.start)<=0)c(C,b,-1);else{var A,S;return a(C.start,b.start)<0&&(A=C,C=g(C,b.start)),a(C.end,b.end)>0&&(S=g(C,b.end)),f(b.end,C.start,C.end,-1),S&&!A&&(C.lines=S.lines,C.start=S.start,C.end=S.end,S=C),[b,A,S].filter(Boolean)}return[b,C]}function c(C,b,T){f(C.start,b.start,b.end,T),f(C.end,b.start,b.end,T)}function f(C,b,T,L){C.row==(L==1?b:T).row&&(C.column+=L*(T.column-b.column)),C.row+=L*(T.row-b.row)}function g(C,b){var T=C.lines,L=C.end;C.end=u(b);var A=C.end.row-C.start.row,S=T.splice(A,T.length),I=A?b.column:b.column-C.start.column;T.push(S[0].substring(0,I)),S[0]=S[0].substr(I);var E={start:u(b),end:L,lines:S,action:C.action};return E}function k(C,b){b=r(b);for(var T=C.length;T--;){for(var L=C[T],A=0;A<L.length;A++){var S=L[A],I=i(S,b);b=I[0],I.length!=2&&(I[2]?(L.splice(A+1,1,I[1],I[2]),A++):I[1]||(L.splice(A,1),A--))}L.length||C.splice(T,1)}return C}function $(C,b){for(var T=0;T<b.length;T++)for(var L=b[T],A=0;A<L.length;A++)k(C,L[A])}d.UndoManager=y}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(l,d,M){var y=l("../range").Range,p=(function(){function w(a,u){this.foldData=a,Array.isArray(u)?this.folds=u:u=this.folds=[u];var r=u[u.length-1];this.range=new y(u[0].start.row,u[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(s){s.setFoldLine(this)},this)}return w.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(u){u.start.row+=a,u.end.row+=a})},w.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,r){return-u.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},w.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},w.prototype.walk=function(a,u,r){var s=0,n=this.folds,t,e,i,c=!0;u==null&&(u=this.end.row,r=this.end.column);for(var f=0;f<n.length;f++){if(t=n[f],e=t.range.compareStart(u,r),e==-1){a(null,u,r,s,c);return}if(i=a(null,t.start.row,t.start.column,s,c),i=!i&&a(t.placeholder,t.start.row,t.start.column,s),i||e===0)return;c=!t.sameRow,s=t.end.column}a(null,u,r,s,c)},w.prototype.getNextFoldTo=function(a,u){for(var r,s,n=0;n<this.folds.length;n++){if(r=this.folds[n],s=r.range.compareEnd(a,u),s==-1)return{fold:r,kind:"after"};if(s===0)return{fold:r,kind:"inside"}}return null},w.prototype.addRemoveChars=function(a,u,r){var s=this.getNextFoldTo(a,u),n,t;if(s){if(n=s.fold,s.kind=="inside"&&n.start.column!=u&&n.start.row!=a)window.console&&window.console.log(a,u,n);else if(n.start.row==a){t=this.folds;var e=t.indexOf(n);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(n=t[e],n.start.column+=r,!n.sameRow)return;n.end.column+=r}this.end.column+=r}}},w.prototype.split=function(a,u){var r=this.getNextFoldTo(a,u);if(!r||r.kind=="inside")return null;var s=r.fold,n=this.folds,t=this.foldData,e=n.indexOf(s),i=n[e-1];this.end.row=i.end.row,this.end.column=i.end.column,n=n.splice(e,n.length-e);var c=new w(t,n);return t.splice(t.indexOf(this)+1,0,c),c},w.prototype.merge=function(a){for(var u=a.folds,r=0;r<u.length;r++)this.addFold(u[r]);var s=this.foldData;s.splice(s.indexOf(a),1)},w.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(u){a.push(" "+u.toString())}),a.push("]"),a.join(`
|
|
193
|
+
`)},w.prototype.idxToPosition=function(a){for(var u=0,r=0;r<this.folds.length;r++){var s=this.folds[r];if(a-=s.start.column-u,a<0)return{row:s.start.row,column:s.start.column+a};if(a-=s.placeholder.length,a<0)return s.start;u=s.end.column}return{row:this.end.row,column:this.end.column+a}},w})();d.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(l,d,M){var y=l("./range").Range,p=y.comparePoints,w=(function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(u,r,s){for(var n=this.ranges,t=s||0;t<n.length;t++){var e=n[t],i=p(u,e.end);if(!(i>0)){var c=p(u,e.start);return i===0?r&&c!==0?-t-2:t:c>0||c===0&&!r?t:-t-1}}return-t-1},a.prototype.add=function(u){var r=!u.isEmpty(),s=this.pointIndex(u.start,r);s<0&&(s=-s-1);var n=this.pointIndex(u.end,r,s);return n<0?n=-n-1:n++,this.ranges.splice(s,n-s,u)},a.prototype.addList=function(u){for(var r=[],s=u.length;s--;)r.push.apply(r,this.add(u[s]));return r},a.prototype.substractPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var u=[],r=this.ranges;r=r.sort(function(i,c){return p(i.start,c.start)});for(var s=r[0],n,t=1;t<r.length;t++){n=s,s=r[t];var e=p(n.end,s.start);e<0||e==0&&!n.isEmpty()&&!s.isEmpty()||(p(n.end,s.end)<0&&(n.end.row=s.end.row,n.end.column=s.end.column),r.splice(t,1),u.push(s),s=n,t--)}return this.ranges=r,u},a.prototype.contains=function(u,r){return this.pointIndex({row:u,column:r})>=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(u,r){var s=this.ranges;if(s[0].start.row>r||s[s.length-1].start.row<u)return[];var n=this.pointIndex({row:u,column:0});n<0&&(n=-n-1);var t=this.pointIndex({row:r,column:0},n);t<0&&(t=-t-1);for(var e=[],i=n;i<t;i++)e.push(s[i]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(u){for(var r=u.start,s=u.end,n=r.row,t=s.row,e=this.ranges,i=0,c=e.length;i<c;i++){var f=e[i];if(f.end.row>=n)break}if(u.action=="insert")for(var g=t-n,k=-r.column+s.column;i<c;i++){var f=e[i];if(f.start.row>n)break;if(f.start.row==n&&f.start.column>=r.column&&(f.start.column==r.column&&this.$bias<=0||(f.start.column+=k,f.start.row+=g)),f.end.row==n&&f.end.column>=r.column){if(f.end.column==r.column&&this.$bias<0)continue;f.end.column==r.column&&k>0&&i<c-1&&f.end.column>f.start.column&&f.end.column==e[i+1].start.column&&(f.end.column-=k),f.end.column+=k,f.end.row+=g}}else for(var g=n-t,k=r.column-s.column;i<c;i++){var f=e[i];if(f.start.row>t)break;f.end.row<t&&(n<f.end.row||n==f.end.row&&r.column<f.end.column)?(f.end.row=n,f.end.column=r.column):f.end.row==t?f.end.column<=s.column?(g||f.end.column>r.column)&&(f.end.column=r.column,f.end.row=r.row):(f.end.column+=k,f.end.row+=g):f.end.row>t&&(f.end.row+=g),f.start.row<t&&(n<f.start.row||n==f.start.row&&r.column<f.start.column)?(f.start.row=n,f.start.column=r.column):f.start.row==t?f.start.column<=s.column?(g||f.start.column>r.column)&&(f.start.column=r.column,f.start.row=r.row):(f.start.column+=k,f.start.row+=g):f.start.row>t&&(f.start.row+=g)}if(g!=0&&i<c)for(;i<c;i++){var f=e[i];f.start.row+=g,f.end.row+=g}},a})();w.prototype.comparePoints=p,d.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(l,d,M){var y=this&&this.__extends||(function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,c){i.__proto__=c}||function(i,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(i[f]=c[f])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}})(),p=l("../range_list").RangeList,w=(function(n){y(t,n);function t(e,i){var c=n.call(this)||this;return c.foldLine=null,c.placeholder=i,c.range=e,c.start=e.start,c.end=e.end,c.sameRow=e.start.row==e.end.row,c.subFolds=c.ranges=[],c}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(i){i.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),i=new t(e,this.placeholder);return this.subFolds.forEach(function(c){i.subFolds.push(c.clone())}),i.collapseChildren=this.collapseChildren,i},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){u(e,this.start);for(var k=e.start.row,$=e.start.column,i=0,c=-1;i<this.subFolds.length&&(c=this.subFolds[i].range.compare(k,$),c==1);i++);var f=this.subFolds[i],g=0;if(c==0){if(f.range.containsRange(e))return f.addSubFold(e);g=1}for(var k=e.range.end.row,$=e.range.end.column,C=i,c=-1;C<this.subFolds.length&&(c=this.subFolds[C].range.compare(k,$),c==1);C++);c==0&&C++;for(var b=this.subFolds.splice(i,C-i,e),T=c==0?b.length-1:b.length,L=g;L<T;L++)e.addSubFold(b[L]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return s(e,this.start)},t})(p);function a(n,t){n.row-=t.row,n.row==0&&(n.column-=t.column)}function u(n,t){a(n.start,t),a(n.end,t)}function r(n,t){n.row==0&&(n.column+=t.column),n.row+=t.row}function s(n,t){r(n.start,t),r(n.end,t)}d.Fold=w}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(l,d,M){var y=l("../range").Range,p=l("./fold_line").FoldLine,w=l("./fold").Fold,a=l("../token_iterator").TokenIterator,u=l("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(s,n,t){var e=this.getFoldLine(s);if(!e)return null;for(var i=e.folds,c=0;c<i.length;c++){var f=i[c].range;if(f.contains(s,n)){if(t==1&&f.isEnd(s,n)&&!f.isEmpty())continue;if(t==-1&&f.isStart(s,n)&&!f.isEmpty())continue;return i[c]}}},this.getFoldsInRange=function(s){var n=s.start,t=s.end,e=this.$foldData,i=[];n.column+=1,t.column-=1;for(var c=0;c<e.length;c++){var f=e[c].range.compareRange(s);if(f!=2){if(f==-2)break;for(var g=e[c].folds,k=0;k<g.length;k++){var $=g[k];if(f=$.range.compareRange(s),f==-2)break;if(f==2)continue;if(f==42)break;i.push($)}}}return n.column-=1,t.column+=1,i},this.getFoldsInRangeList=function(s){if(Array.isArray(s)){var n=[];s.forEach(function(t){n=n.concat(this.getFoldsInRange(t))},this)}else var n=this.getFoldsInRange(s);return n},this.getAllFolds=function(){for(var s=[],n=this.$foldData,t=0;t<n.length;t++)for(var e=0;e<n[t].folds.length;e++)s.push(n[t].folds[e]);return s},this.getFoldStringAt=function(s,n,t,e){if(e=e||this.getFoldLine(s),!e)return null;for(var i={end:{column:0}},c,f,g=0;g<e.folds.length;g++){f=e.folds[g];var k=f.range.compareEnd(s,n);if(k==-1){c=this.getLine(f.start.row).substring(i.end.column,f.start.column);break}else if(k===0)return null;i=f}return c||(c=this.getLine(f.start.row).substring(i.end.column)),t==-1?c.substring(0,n-i.end.column):t==1?c.substring(n-i.end.column):c},this.getFoldLine=function(s,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var i=t[e];if(i.start.row<=s&&i.end.row>=s)return i;if(i.end.row>s)return null}return null},this.getNextFoldLine=function(s,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var i=t[e];if(i.end.row>=s)return i}return null},this.getFoldedRowCount=function(s,n){for(var t=this.$foldData,e=n-s+1,i=0;i<t.length;i++){var c=t[i],f=c.end.row,g=c.start.row;if(f>=n){g<n&&(g>=s?e-=n-g:e=0);break}else f>=s&&(g>=s?e-=f-g:e-=f-s+1)}return e},this.$addFoldLine=function(s){return this.$foldData.push(s),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),s},this.addFold=function(s,n){var t=this.$foldData,e=!1,i;s instanceof w?i=s:(i=new w(n,s),i.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(i.range);var c=i.start.row,f=i.start.column,g=i.end.row,k=i.end.column,$=this.getFoldAt(c,f,1),C=this.getFoldAt(g,k,-1);if($&&C==$)return $.addSubFold(i);$&&!$.range.isStart(c,f)&&this.removeFold($),C&&!C.range.isEnd(g,k)&&this.removeFold(C);var b=this.getFoldsInRange(i.range);b.length>0&&(this.removeFolds(b),i.collapseChildren||b.forEach(function(S){i.addSubFold(S)}));for(var T=0;T<t.length;T++){var L=t[T];if(g==L.start.row){L.addFold(i),e=!0;break}else if(c==L.end.row){if(L.addFold(i),e=!0,!i.sameRow){var A=t[T+1];if(A&&A.start.row==g){L.merge(A);break}}break}else if(g<=L.start.row)break}return e||(L=this.$addFoldLine(new p(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(s){s.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(s){var n=s.foldLine,t=n.start.row,e=n.end.row,i=this.$foldData,c=n.folds;if(c.length==1)i.splice(i.indexOf(n),1);else if(n.range.isEnd(s.end.row,s.end.column))c.pop(),n.end.row=c[c.length-1].end.row,n.end.column=c[c.length-1].end.column;else if(n.range.isStart(s.start.row,s.start.column))c.shift(),n.start.row=c[0].start.row,n.start.column=c[0].start.column;else if(s.sameRow)c.splice(c.indexOf(s),1);else{var f=n.split(s.start.row,s.start.column);c=f.folds,c.shift(),f.start.row=c[0].start.row,f.start.column=c[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:s,action:"remove"})},this.removeFolds=function(s){for(var n=[],t=0;t<s.length;t++)n.push(s[t]);n.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(s){this.removeFold(s),s.subFolds.forEach(function(n){s.restoreRange(n),this.addFold(n)},this),s.collapseChildren>0&&this.foldAll(s.start.row+1,s.end.row,s.collapseChildren-1),s.subFolds=[]},this.expandFolds=function(s){s.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(s,n){var t,e;if(s==null)t=new y(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof s=="number")t=new y(s,0,s,this.getLine(s).length);else if("row"in s)t=y.fromPoints(s,s);else{if(Array.isArray(s))return e=[],s.forEach(function(c){e=e.concat(this.unfold(c))},this),e;t=s}e=this.getFoldsInRangeList(t);for(var i=e;e.length==1&&y.comparePoints(e[0].start,t.start)<0&&y.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),i.length)return i},this.isRowFolded=function(s,n){return!!this.getFoldLine(s,n)},this.getRowFoldEnd=function(s,n){var t=this.getFoldLine(s,n);return t?t.end.row:s},this.getRowFoldStart=function(s,n){var t=this.getFoldLine(s,n);return t?t.start.row:s},this.getFoldDisplayLine=function(s,n,t,e,i){e==null&&(e=s.start.row),i==null&&(i=0),n==null&&(n=s.end.row),t==null&&(t=this.getLine(n).length);var c=this.doc,f="";return s.walk(function(g,k,$,C){if(!(k<e)){if(k==e){if($<i)return;C=Math.max(i,C)}g!=null?f+=g:f+=c.getLine(k).substring(C,$)}},n,t),f},this.getDisplayLine=function(s,n,t,e){var i=this.getFoldLine(s);if(i)return this.getFoldDisplayLine(i,s,n,t,e);var c;return c=this.doc.getLine(s),c.substring(e||0,n||c.length)},this.$cloneFoldData=function(){var s=[];return s=this.$foldData.map(function(n){var t=n.folds.map(function(e){return e.clone()});return new p(s,t)}),s},this.toggleFold=function(s){var n=this.selection,t=n.getRange(),e,i;if(t.isEmpty()){var c=t.start;if(e=this.getFoldAt(c.row,c.column),e){this.expandFold(e);return}else if(s){var f=this.getFoldLine(c.row);f&&this.expandFolds(f.folds);return}else(i=this.findMatchingBracket(c))?t.comparePoint(i)==1?t.end=i:(t.start=i,t.start.column++,t.end.column--):(i=this.findMatchingBracket({row:c.row,column:c.column+1}))?(t.comparePoint(i)==1?t.end=i:t.start=i,t.start.column++):t=this.getCommentFoldRange(c.row,c.column)||t}else{var g=this.getFoldsInRange(t);if(s&&g.length){this.expandFolds(g);return}else g.length==1&&(e=g[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var k="...";if(!t.isMultiLine()){if(k=this.getTextRange(t),k.length<4)return;k=k.trim().substring(0,2)+".."}this.addFold(k,t)},this.getCommentFoldRange=function(s,n,t){var e=new a(this,s,n),i=e.getCurrentToken(),c=i&&i.type;if(i&&/^comment|string/.test(c)){c=c.match(/comment|string/)[0],c=="comment"&&(c+="|doc-start|\\.doc");var f=new RegExp(c),g=new y;if(t!=1){do i=e.stepBackward();while(i&&f.test(i.type));i=e.stepForward()}g.start.row=e.getCurrentTokenRow(),g.start.column=e.getCurrentTokenColumn()+i.value.length,e=new a(this,s,n);var k=this.getState(e.$row);if(t!=-1){var $=-1;do if(i=e.stepForward(),$==-1){var C=this.getState(e.$row);k.toString()!==C.toString()&&($=e.$row)}else if(e.$row>$)break;while(i&&f.test(i.type));i=e.stepBackward()}else i=e.getCurrentToken();return g.end.row=e.getCurrentTokenRow(),g.end.column=e.getCurrentTokenColumn(),g.start.row==g.end.row&&g.start.column>g.end.column?void 0:g}},this.foldAll=function(s,n,t,e){t==null&&(t=1e5);var i=this.foldWidgets;if(i){n=n||this.getLength(),s=s||0;for(var c=s;c<n;c++)if(i[c]==null&&(i[c]=this.getFoldWidget(c)),i[c]=="start"&&!(e&&!e(c))){var f=this.getFoldWidgetRange(c);f&&f.isMultiLine()&&f.end.row<=n&&f.start.row>=s&&(c=f.end.row,f.collapseChildren=t,this.addFold("...",f))}}},this.foldToLevel=function(s){for(this.foldAll();s-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var s=this;this.foldAll(null,null,null,function(n){for(var t=s.getTokens(n),e=0;e<t.length;e++){var i=t[e];if(!(i.type=="text"&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(s){if(!this.$foldStyles[s])throw new Error("invalid fold style: "+s+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=s){this.$foldStyle=s,s=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(s){if(this.$foldMode!=s){if(this.$foldMode=s,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!s||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=s.getFoldWidget.bind(s,this,this.$foldStyle),this.getFoldWidgetRange=s.getFoldWidgetRange.bind(s,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(s,n){var t=this.foldWidgets;if(!t||n&&t[s])return{};for(var e=s-1,i;e>=0;){var c=t[e];if(c==null&&(c=t[e]=this.getFoldWidget(e)),c=="start"){var f=this.getFoldWidgetRange(e);if(i||(i=f),f&&f.end.row>=s)break}e--}return{range:e!==-1&&f,firstRange:i}},this.onFoldWidgetClick=function(s,n){n instanceof u&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(s,t);if(!e){var i=n.target||n.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(s,n){if(this.getFoldWidget){var t=this.getFoldWidget(s),e=this.getLine(s),i=t==="end"?-1:1,c=this.getFoldAt(s,i===-1?0:e.length,i);if(c)return n.children||n.all?this.removeFold(c):this.expandFold(c),c;var f=this.getFoldWidgetRange(s,!0);if(f&&!f.isMultiLine()&&(c=this.getFoldAt(f.start.row,f.start.column,1),c&&f.isEqual(c.range)))return this.removeFold(c),c;if(n.siblings){var g=this.getParentFoldRangeData(s);if(g.range)var k=g.range.start.row+1,$=g.range.end.row;this.foldAll(k,$,n.all?1e4:0)}else n.children?($=f?f.end.row:this.getLength(),this.foldAll(s+1,$,n.all?1e4:0)):f&&(n.all&&(f.collapseChildren=1e4),this.addFold("...",f));return f}},this.toggleFoldWidget=function(s){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var t=this.$toggleFoldWidget(n,{});if(!t){var e=this.getParentFoldRangeData(n,!0);if(t=e.range||e.firstRange,t){n=t.start.row;var i=this.getFoldAt(n,this.getLine(n).length,1);i?this.removeFold(i):this.addFold("...",t)}}},this.updateFoldWidgets=function(s){var n=s.start.row,t=s.end.row-n;if(t===0)this.foldWidgets[n]=null;else if(s.action=="remove")this.foldWidgets.splice(n,t+1,null);else{var e=Array(t+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(s){var n=s.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}d.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(l,d,M){var y=l("../token_iterator").TokenIterator,p=l("../range").Range;function w(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var r=u||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var s=r.match(/([\(\[\{])|([\)\]\}])/);return s?s[1]?this.$findClosingBracket(s[1],a):this.$findOpeningBracket(s[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),r=!0,s,n=u.charAt(a.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=u.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;s=p.fromPoints(a,e),r||(s.end.column++,s.start.column--),s.cursor=s.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;s=p.fromPoints(e,a),r||(s.start.column++,s.end.column--),s.cursor=s.start}return s},this.getMatchingBracketRanges=function(a,u){var r=this.getLine(a.row),s=/([\(\[\{])|([\)\]\}])/,n=!u&&r.charAt(a.column-1),t=n&&n.match(s);if(t||(n=(u===void 0||u)&&r.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(s)),!t)return null;var e=new p(a.row,a.column-1,a.row,a.column),i=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!i)return[e];var c=new p(i.row,i.column,i.row,i.column+1);return[e,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,r){var s=this.$brackets[a],n=1,t=new y(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=u.column-t.getCurrentTokenColumn()-2,c=e.value;;){for(;i>=0;){var f=c.charAt(i);if(f==s){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:i+t.getCurrentTokenColumn()}}else f==a&&(n+=1);i-=1}do e=t.stepBackward();while(e&&!r.test(e.type));if(e==null)break;c=e.value,i=c.length-1}return null}},this.$findClosingBracket=function(a,u,r){var s=this.$brackets[a],n=1,t=new y(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=u.column-t.getCurrentTokenColumn();;){for(var c=e.value,f=c.length;i<f;){var g=c.charAt(i);if(g==s){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:i+t.getCurrentTokenColumn()}}else g==a&&(n+=1);i+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;i=0}return null}},this.getMatchingTags=function(a){var u=new y(this,a.row,a.column),r=this.$findTagName(u);if(r){var s=u.stepBackward();return s.value==="<"?this.$findClosingTag(u,r):this.$findOpeningTag(u,r)}},this.$findTagName=function(a){var u=a.getCurrentToken(),r=!1,s=!1;if(u&&u.type.indexOf("tag-name")===-1)do s?u=a.stepBackward():u=a.stepForward(),u&&(u.value==="/>"?s=!0:u.type.indexOf("tag-name")!==-1&&(r=!0));while(u&&!r);return u},this.$findClosingTag=function(a,u){var r,s=u.value,n=u.value,t=0,e=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var i=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),c=!1;do{if(r=u,r.type.indexOf("tag-close")!==-1&&!c){var f=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0}if(u=a.stepForward(),u){if(u.value===">"&&!c){var f=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0}if(u.type.indexOf("tag-name")!==-1){if(s=u.value,n===s){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){a.stepBackward();var g=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);u=a.stepForward();var k=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),u&&u.value===">")var $=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===s&&u.value==="/>"&&(t--,t<0))var g=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),k=g,$=k,f=new p(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(u&&t>=0);if(e&&f&&g&&$&&i&&k)return{openTag:new p(e.start.row,e.start.column,f.end.row,f.end.column),closeTag:new p(g.start.row,g.start.column,$.end.row,$.end.column),openTagName:i,closeTagName:k}},this.$findOpeningTag=function(a,u){var r=a.getCurrentToken(),s=u.value,n=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),i=e+2,c=new p(t,e,t,i);a.stepForward();var f=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),!(!u||u.value!==">")){var g=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=r,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),i=e+u.value.length,r=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(s===u.value)if(r.value==="<"){if(n++,n>0){var k=new p(t,e,t,i),$=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var C=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value==="</"&&n--}else if(u.value==="/>"){for(var b=0,T=r;T;){if(T.type.indexOf("tag-name")!==-1&&T.value===s){n--;break}else if(T.value==="<")break;T=a.stepBackward(),b++}for(var L=0;L<b;L++)a.stepForward()}}while(r&&n<=0);if($&&C&&c&&g&&k&&f)return{openTag:new p($.start.row,$.start.column,C.end.row,C.end.column),closeTag:new p(c.start.row,c.start.column,g.end.row,g.end.column),openTagName:k,closeTagName:f}}}}d.BracketMatch=w}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(l,d,M){var y=l("./lib/oop"),p=l("./lib/lang"),w=l("./bidihandler").BidiHandler,a=l("./config"),u=l("./lib/event_emitter").EventEmitter,r=l("./selection").Selection,s=l("./mode/text").Mode,n=l("./range").Range,t=l("./line_widgets").LineWidgets,e=l("./document").Document,i=l("./background_tokenizer").BackgroundTokenizer,c=l("./search_highlight").SearchHighlight,f=l("./undomanager").UndoManager,g=(function(){function E(x,v){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"+ ++E.$uid,this.$foldData.toString=function(){return this.join(`
|
|
194
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new s().getTokenizer(),this);var m=this;this.bgTokenizer.on("update",function(_){m._signal("tokenizerUpdate",_)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof x!="object"||!x.getLine)&&(x=new e(x)),this.setDocument(x),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),a.resetOptions(this),this.setMode(v),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return E.prototype.$initOperationListeners=function(){var x=this;this.curOp=null,this.on("change",function(){x.curOp||(x.startOperation(),x.curOp.selectionBefore=x.$lastSel),x.curOp.docChanged=!0},!0),this.on("changeSelection",function(){x.curOp||(x.startOperation(),x.curOp.selectionBefore=x.$lastSel),x.curOp.selectionChanged=!0},!0),this.$operationResetTimer=p.delayedCall(this.endOperation.bind(this,!0))},E.prototype.startOperation=function(x){if(this.curOp){if(!x||this.curOp.command)return;this.prevOp=this.curOp}x||(x={}),this.$operationResetTimer.schedule(),this.curOp={command:x.command||{},args:x.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",x)},E.prototype.endOperation=function(x){if(this.curOp){if(x&&x.returnValue===!1){this.curOp=null,this._signal("endOperation",x);return}if(x==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var v=this.selection.toJSON();this.curOp.selectionAfter=v,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(v),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",x)}},E.prototype.setDocument=function(x){this.doc&&this.doc.off("change",this.$onChange),this.doc=x,x.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},E.prototype.getDocument=function(){return this.doc},Object.defineProperty(E.prototype,"widgetManager",{get:function(){var x=new t(this);return this.widgetManager=x,this.$editor&&x.attach(this.$editor),x},set:function(x){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:x})},enumerable:!1,configurable:!0}),E.prototype.$resetRowCache=function(x){if(!x){this.$docRowCache=[],this.$screenRowCache=[];return}var v=this.$docRowCache.length,m=this.$getRowCacheIndex(this.$docRowCache,x)+1;v>m&&(this.$docRowCache.splice(m,v),this.$screenRowCache.splice(m,v))},E.prototype.$getRowCacheIndex=function(x,v){for(var m=0,_=x.length-1;m<=_;){var R=m+_>>1,O=x[R];if(v>O)m=R+1;else if(v<O)_=R-1;else return R}return m-1},E.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},E.prototype.onChangeFold=function(x){var v=x.data;this.$resetRowCache(v.start.row)},E.prototype.onChange=function(x){this.$modified=!0,this.$bidiHandler.onChange(x),this.$resetRowCache(x.start.row);var v=this.$updateInternalDataOnChange(x);!this.$fromUndo&&this.$undoManager&&(v&&v.length&&(this.$undoManager.add({action:"removeFolds",folds:v},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(x,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(x),this._signal("change",x)},E.prototype.onSelectionChange=function(){this._signal("changeSelection")},E.prototype.setValue=function(x){this.doc.setValue(x),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},E.fromJSON=function(x){typeof x=="string"&&(x=JSON.parse(x));var v=new f;x.history&&(v.$undoStack=x.history.$undoStack||[],v.$redoStack=x.history.$redoStack||[],v.mark=x.history.mark||0,v.$rev=x.history.rev||0);var m=new E(x.value);return x.folds.forEach(function(_){m.addFold("...",n.fromPoints(_.start,_.end))}),m.setAnnotations(x.annotations),m.setBreakpoints(x.breakpoints),m.setMode(x.mode),m.setScrollLeft(x.scrollLeft),m.setScrollTop(x.scrollTop),m.setUndoManager(v),m.selection.fromJSON(x.selection),m},E.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(x){return x.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},E.prototype.toString=function(){return this.doc.getValue()},E.prototype.getSelection=function(){return this.selection},E.prototype.getState=function(x){return this.bgTokenizer.getState(x)},E.prototype.getTokens=function(x){return this.bgTokenizer.getTokens(x)},E.prototype.getTokenAt=function(x,v){var m=this.bgTokenizer.getTokens(x),_,R=0;if(v==null){var O=m.length-1;R=this.getLine(x).length}else for(var O=0;O<m.length&&(R+=m[O].value.length,!(R>=v));O++);return _=m[O],_?(_.index=O,_.start=R-_.value.length,_):null},E.prototype.setUndoManager=function(x){if(this.$undoManager=x,this.$informUndoManager&&this.$informUndoManager.cancel(),x){var v=this;x.addSession(this),this.$syncInformUndoManager=function(){v.$informUndoManager.cancel(),v.mergeUndoDeltas=!1},this.$informUndoManager=p.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},E.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},E.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},E.prototype.getTabString=function(){return this.getUseSoftTabs()?p.stringRepeat(" ",this.getTabSize()):" "},E.prototype.setUseSoftTabs=function(x){this.setOption("useSoftTabs",x)},E.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},E.prototype.setTabSize=function(x){this.setOption("tabSize",x)},E.prototype.getTabSize=function(){return this.$tabSize},E.prototype.isTabStop=function(x){return this.$useSoftTabs&&x.column%this.$tabSize===0},E.prototype.setNavigateWithinSoftTabs=function(x){this.setOption("navigateWithinSoftTabs",x)},E.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},E.prototype.setOverwrite=function(x){this.setOption("overwrite",x)},E.prototype.getOverwrite=function(){return this.$overwrite},E.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},E.prototype.addGutterDecoration=function(x,v){this.$decorations[x]||(this.$decorations[x]=""),this.$decorations[x]+=" "+v,this._signal("changeBreakpoint",{})},E.prototype.removeGutterCustomWidget=function(x){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(x)},E.prototype.addGutterCustomWidget=function(x,v){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(x,v)},E.prototype.removeGutterDecoration=function(x,v){this.$decorations[x]=(this.$decorations[x]||"").replace(" "+v,""),this._signal("changeBreakpoint",{})},E.prototype.getBreakpoints=function(){return this.$breakpoints},E.prototype.setBreakpoints=function(x){this.$breakpoints=[];for(var v=0;v<x.length;v++)this.$breakpoints[x[v]]="ace_breakpoint";this._signal("changeBreakpoint",{})},E.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},E.prototype.setBreakpoint=function(x,v){v===void 0&&(v="ace_breakpoint"),v?this.$breakpoints[x]=v:delete this.$breakpoints[x],this._signal("changeBreakpoint",{})},E.prototype.clearBreakpoint=function(x){delete this.$breakpoints[x],this._signal("changeBreakpoint",{})},E.prototype.addMarker=function(x,v,m,_){var R=this.$markerId++,O={range:x,type:m||"line",renderer:typeof m=="function"?m:null,clazz:v,inFront:!!_,id:R};return _?(this.$frontMarkers[R]=O,this._signal("changeFrontMarker")):(this.$backMarkers[R]=O,this._signal("changeBackMarker")),R},E.prototype.addDynamicMarker=function(x,v){if(x.update){var m=this.$markerId++;return x.id=m,x.inFront=!!v,v?(this.$frontMarkers[m]=x,this._signal("changeFrontMarker")):(this.$backMarkers[m]=x,this._signal("changeBackMarker")),x}},E.prototype.removeMarker=function(x){var v=this.$frontMarkers[x]||this.$backMarkers[x];if(v){var m=v.inFront?this.$frontMarkers:this.$backMarkers;delete m[x],this._signal(v.inFront?"changeFrontMarker":"changeBackMarker")}},E.prototype.getMarkers=function(x){return x?this.$frontMarkers:this.$backMarkers},E.prototype.highlight=function(x){if(!this.$searchHighlight){var v=new c(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(v)}this.$searchHighlight.setRegexp(x)},E.prototype.highlightLines=function(x,v,m,_){typeof v!="number"&&(m=v,v=x),m||(m="ace_step");var R=new n(x,0,v,1/0);return R.id=this.addMarker(R,m,"fullLine",_),R},E.prototype.setAnnotations=function(x){this.$annotations=x,this._signal("changeAnnotation",{})},E.prototype.getAnnotations=function(){return this.$annotations||[]},E.prototype.clearAnnotations=function(){this.setAnnotations([])},E.prototype.$detectNewLine=function(x){var v=x.match(/^.*?(\r?\n)/m);v?this.$autoNewLine=v[1]:this.$autoNewLine=`
|
|
195
|
+
`},E.prototype.getWordRange=function(x,v){var m=this.getLine(x),_=!1;if(v>0&&(_=!!m.charAt(v-1).match(this.tokenRe)),_||(_=!!m.charAt(v).match(this.tokenRe)),_)var R=this.tokenRe;else if(/^\s+$/.test(m.slice(v-1,v+1)))var R=/\s/;else var R=this.nonTokenRe;var O=v;if(O>0){do O--;while(O>=0&&m.charAt(O).match(R));O++}for(var D=v;D<m.length&&m.charAt(D).match(R);)D++;return new n(x,O,x,D)},E.prototype.getAWordRange=function(x,v){for(var m=this.getWordRange(x,v),_=this.getLine(m.end.row);_.charAt(m.end.column).match(/[ \t]/);)m.end.column+=1;return m},E.prototype.setNewLineMode=function(x){this.doc.setNewLineMode(x)},E.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},E.prototype.setUseWorker=function(x){this.setOption("useWorker",x)},E.prototype.getUseWorker=function(){return this.$useWorker},E.prototype.onReloadTokenizer=function(x){var v=x.data;this.bgTokenizer.start(v.first),this._signal("tokenizerUpdate",x)},E.prototype.setMode=function(x,v){if(x&&typeof x=="object"){if(x.getTokenizer)return this.$onChangeMode(x);var m=x,_=m.path}else _=x||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new s),this.$modes[_]&&!m){this.$onChangeMode(this.$modes[_]),v&&v();return}this.$modeId=_,a.loadModule(["mode",_],(function(R){if(!this.destroyed){if(this.$modeId!==_)return v&&v();this.$modes[_]&&!m?this.$onChangeMode(this.$modes[_]):R&&R.Mode&&(R=new R.Mode(m),m||(this.$modes[_]=R,R.$id=_),this.$onChangeMode(R)),v&&v()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},E.prototype.$onChangeMode=function(x,v){if(v||(this.$modeId=x.$id),this.$mode!==x){var m=this.$mode;this.$mode=x,this.$stopWorker(),this.$useWorker&&this.$startWorker();var _=x.getTokenizer();if(_.on!==void 0){var R=this.onReloadTokenizer.bind(this);_.on("update",R)}this.bgTokenizer.setTokenizer(_),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=x.tokenRe,this.nonTokenRe=x.nonTokenRe,v||(x.attachToSession&&x.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(x.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:m,mode:x}))}},E.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},E.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(x){a.warn("Could not load worker",x),this.$worker=null}},E.prototype.getMode=function(){return this.$mode},E.prototype.setScrollTop=function(x){this.$scrollTop===x||isNaN(x)||(this.$scrollTop=x,this._signal("changeScrollTop",x))},E.prototype.getScrollTop=function(){return this.$scrollTop},E.prototype.setScrollLeft=function(x){this.$scrollLeft===x||isNaN(x)||(this.$scrollLeft=x,this._signal("changeScrollLeft",x))},E.prototype.getScrollLeft=function(){return this.$scrollLeft},E.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},E.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var x=0;return this.lineWidgets.forEach(function(v){v&&v.screenWidth>x&&(x=v.screenWidth)}),this.lineWidgetWidth=x},E.prototype.$computeWidth=function(x){if(this.$modified||x){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var v=this.doc.getAllLines(),m=this.$rowLengthCache,_=0,R=0,O=this.$foldData[R],D=O?O.start.row:1/0,N=v.length,P=0;P<N;P++){if(P>D){if(P=O.end.row+1,P>=N)break;O=this.$foldData[R++],D=O?O.start.row:1/0}m[P]==null&&(m[P]=this.$getStringScreenWidth(v[P])[0]),m[P]>_&&(_=m[P])}this.screenWidth=_}},E.prototype.getLine=function(x){return this.doc.getLine(x)},E.prototype.getLines=function(x,v){return this.doc.getLines(x,v)},E.prototype.getLength=function(){return this.doc.getLength()},E.prototype.getTextRange=function(x){return this.doc.getTextRange(x||this.selection.getRange())},E.prototype.insert=function(x,v){return this.doc.insert(x,v)},E.prototype.remove=function(x){return this.doc.remove(x)},E.prototype.removeFullLines=function(x,v){return this.doc.removeFullLines(x,v)},E.prototype.undoChanges=function(x,v){if(x.length){this.$fromUndo=!0;for(var m=x.length-1;m!=-1;m--){var _=x[m];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!v&&this.$undoSelect&&(x.selectionBefore?this.selection.fromJSON(x.selectionBefore):this.selection.setRange(this.$getUndoSelection(x,!0))),this.$fromUndo=!1}},E.prototype.redoChanges=function(x,v){if(x.length){this.$fromUndo=!0;for(var m=0;m<x.length;m++){var _=x[m];(_.action=="insert"||_.action=="remove")&&this.doc.$safeApplyDelta(_)}!v&&this.$undoSelect&&(x.selectionAfter?this.selection.fromJSON(x.selectionAfter):this.selection.setRange(this.$getUndoSelection(x,!1))),this.$fromUndo=!1}},E.prototype.setUndoSelect=function(x){this.$undoSelect=x},E.prototype.$getUndoSelection=function(x,v){function m(N){return v?N.action!=="insert":N.action==="insert"}for(var _,R,O=0;O<x.length;O++){var D=x[O];if(D.start){if(!_){m(D)?_=n.fromPoints(D.start,D.end):_=n.fromPoints(D.start,D.start);continue}m(D)?(R=D.start,_.compare(R.row,R.column)==-1&&_.setStart(R),R=D.end,_.compare(R.row,R.column)==1&&_.setEnd(R)):(R=D.start,_.compare(R.row,R.column)==-1&&(_=n.fromPoints(D.start,D.start)))}}return _},E.prototype.replace=function(x,v){return this.doc.replace(x,v)},E.prototype.moveText=function(x,v,m){var _=this.getTextRange(x),R=this.getFoldsInRange(x),O=n.fromPoints(v,v);if(!m){this.remove(x);var D=x.start.row-x.end.row,N=D?-x.end.column:x.start.column-x.end.column;N&&(O.start.row==x.end.row&&O.start.column>x.end.column&&(O.start.column+=N),O.end.row==x.end.row&&O.end.column>x.end.column&&(O.end.column+=N)),D&&O.start.row>=x.end.row&&(O.start.row+=D,O.end.row+=D)}if(O.end=this.insert(O.start,_),R.length){var P=x.start,U=O.start,D=U.row-P.row,N=U.column-P.column;this.addFolds(R.map(function(B){return B=B.clone(),B.start.row==P.row&&(B.start.column+=N),B.end.row==P.row&&(B.end.column+=N),B.start.row+=D,B.end.row+=D,B}))}return O},E.prototype.indentRows=function(x,v,m){m=m.replace(/\t/g,this.getTabString());for(var _=x;_<=v;_++)this.doc.insertInLine({row:_,column:0},m)},E.prototype.outdentRows=function(x){for(var v=x.collapseRows(),m=new n(0,0,0,0),_=this.getTabSize(),R=v.start.row;R<=v.end.row;++R){var O=this.getLine(R);m.start.row=R,m.end.row=R;for(var D=0;D<_&&O.charAt(D)==" ";++D);D<_&&O.charAt(D)==" "?(m.start.column=D,m.end.column=D+1):(m.start.column=0,m.end.column=D),this.remove(m)}},E.prototype.$moveLines=function(x,v,m){if(x=this.getRowFoldStart(x),v=this.getRowFoldEnd(v),m<0){var _=this.getRowFoldStart(x+m);if(_<0)return 0;var R=_-x}else if(m>0){var _=this.getRowFoldEnd(v+m);if(_>this.doc.getLength()-1)return 0;var R=_-v}else{x=this.$clipRowToDocument(x),v=this.$clipRowToDocument(v);var R=v-x+1}var O=new n(x,0,v,Number.MAX_VALUE),D=this.getFoldsInRange(O).map(function(P){return P=P.clone(),P.start.row+=R,P.end.row+=R,P}),N=m==0?this.doc.getLines(x,v):this.doc.removeFullLines(x,v);return this.doc.insertFullLines(x+R,N),D.length&&this.addFolds(D),R},E.prototype.moveLinesUp=function(x,v){return this.$moveLines(x,v,-1)},E.prototype.moveLinesDown=function(x,v){return this.$moveLines(x,v,1)},E.prototype.duplicateLines=function(x,v){return this.$moveLines(x,v,0)},E.prototype.$clipRowToDocument=function(x){return Math.max(0,Math.min(x,this.doc.getLength()-1))},E.prototype.$clipColumnToRow=function(x,v){return v<0?0:Math.min(this.doc.getLine(x).length,v)},E.prototype.$clipPositionToDocument=function(x,v){if(v=Math.max(0,v),x<0)x=0,v=0;else{var m=this.doc.getLength();x>=m?(x=m-1,v=this.doc.getLine(m-1).length):v=Math.min(this.doc.getLine(x).length,v)}return{row:x,column:v}},E.prototype.$clipRangeToDocument=function(x){x.start.row<0?(x.start.row=0,x.start.column=0):x.start.column=this.$clipColumnToRow(x.start.row,x.start.column);var v=this.doc.getLength()-1;return x.end.row>v?(x.end.row=v,x.end.column=this.doc.getLine(v).length):x.end.column=this.$clipColumnToRow(x.end.row,x.end.column),x},E.prototype.setUseWrapMode=function(x){if(x!=this.$useWrapMode){if(this.$useWrapMode=x,this.$modified=!0,this.$resetRowCache(0),x){var v=this.getLength();this.$wrapData=Array(v),this.$updateWrapData(0,v-1)}this._signal("changeWrapMode")}},E.prototype.getUseWrapMode=function(){return this.$useWrapMode},E.prototype.setWrapLimitRange=function(x,v){(this.$wrapLimitRange.min!==x||this.$wrapLimitRange.max!==v)&&(this.$wrapLimitRange={min:x,max:v},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},E.prototype.adjustWrapLimit=function(x,v){var m=this.$wrapLimitRange;m.max<0&&(m={min:v,max:v});var _=this.$constrainWrapLimit(x,m.min,m.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},E.prototype.$constrainWrapLimit=function(x,v,m){return v&&(x=Math.max(v,x)),m&&(x=Math.min(m,x)),x},E.prototype.getWrapLimit=function(){return this.$wrapLimit},E.prototype.setWrapLimit=function(x){this.setWrapLimitRange(x,x)},E.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},E.prototype.$updateInternalDataOnChange=function(x){var v=this.$useWrapMode,m=x.action,_=x.start,R=x.end,O=_.row,D=R.row,N=D-O,P=null;if(this.$updating=!0,N!=0)if(m==="remove"){this[v?"$wrapData":"$rowLengthCache"].splice(O,N);var U=this.$foldData;P=this.getFoldsInRange(x),this.removeFolds(P);var F=this.getFoldLine(R.row),W=0;if(F){F.addRemoveChars(R.row,R.column,_.column-R.column),F.shiftRow(-N);var B=this.getFoldLine(O);B&&B!==F&&(B.merge(F),F=B),W=U.indexOf(F)+1}for(W;W<U.length;W++){var F=U[W];F.start.row>=R.row&&F.shiftRow(-N)}D=O}else{var H=Array(N);H.unshift(O,0);var V=v?this.$wrapData:this.$rowLengthCache;V.splice.apply(V,H);var U=this.$foldData,F=this.getFoldLine(O),W=0;if(F){var G=F.range.compareInside(_.row,_.column);G==0?(F=F.split(_.row,_.column),F&&(F.shiftRow(N),F.addRemoveChars(D,0,R.column-_.column))):G==-1&&(F.addRemoveChars(O,0,R.column-_.column),F.shiftRow(N)),W=U.indexOf(F)+1}for(W;W<U.length;W++){var F=U[W];F.start.row>=O&&F.shiftRow(N)}}else{N=Math.abs(x.start.column-x.end.column),m==="remove"&&(P=this.getFoldsInRange(x),this.removeFolds(P),N=-N);var F=this.getFoldLine(O);F&&F.addRemoveChars(O,_.column,N)}return v&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,v?this.$updateWrapData(O,D):this.$updateRowLengthCache(O,D),P},E.prototype.$updateRowLengthCache=function(x,v){this.$rowLengthCache[x]=null,this.$rowLengthCache[v]=null},E.prototype.$updateWrapData=function(x,v){var m=this.doc.getAllLines(),_=this.getTabSize(),R=this.$wrapData,O=this.$wrapLimit,D,N,P=x;for(v=Math.min(v,m.length-1);P<=v;)N=this.getFoldLine(P,N),N?(D=[],N.walk((function(U,F,W,B){var H;if(U!=null){H=this.$getDisplayTokens(U,D.length),H[0]=C;for(var V=1;V<H.length;V++)H[V]=b}else H=this.$getDisplayTokens(m[F].substring(B,W),D.length);D=D.concat(H)}).bind(this),N.end.row,m[N.end.row].length+1),R[N.start.row]=this.$computeWrapSplits(D,O,_),P=N.end.row+1):(D=this.$getDisplayTokens(m[P]),R[P]=this.$computeWrapSplits(D,O,_),P++)},E.prototype.$computeWrapSplits=function(x,v,m){if(x.length==0)return[];var _=[],R=x.length,O=0,D=0,N=this.$wrapAsCode,P=this.$indentedSoftWrap,U=v<=Math.max(2*m,8)||P===!1?0:Math.floor(v/2);function F(){var G=0;if(U===0)return G;if(P)for(var Y=0;Y<x.length;Y++){var Q=x[Y];if(Q==L)G+=1;else if(Q==A)G+=m;else{if(Q==S)continue;break}}return N&&P!==!1&&(G+=m),Math.min(G,U)}function W(G){for(var Y=G-O,Q=O;Q<G;Q++){var ne=x[Q];(ne===12||ne===2)&&(Y-=1)}_.length||(B=F(),_.indent=B),D+=Y,_.push(D),O=G}for(var B=0;R-O>v-B;){var H=O+v-B;if(x[H-1]>=L&&x[H]>=L){W(H);continue}if(x[H]==C||x[H]==b){for(H;H!=O-1&&x[H]!=C;H--);if(H>O){W(H);continue}for(H=O+v,H;H<x.length&&x[H]==b;H++);if(H==x.length)break;W(H);continue}for(var V=Math.max(H-(v-(v>>2)),O-1);H>V&&x[H]<C;)H--;if(N){for(;H>V&&x[H]<C;)H--;for(;H>V&&x[H]==T;)H--}else for(;H>V&&x[H]<L;)H--;if(H>V){W(++H);continue}H=O+v,x[H]==$&&H--,W(H-B)}return _},E.prototype.$getDisplayTokens=function(x,v){var m=[],_;v=v||0;for(var R=0;R<x.length;R++){var O=x.charCodeAt(R);if(O==9){_=this.getScreenTabSize(m.length+v),m.push(A);for(var D=1;D<_;D++)m.push(S)}else O==32?m.push(L):O>39&&O<48||O>57&&O<64?m.push(T):O>=4352&&I(O)?m.push(k,$):m.push(k)}return m},E.prototype.$getStringScreenWidth=function(x,v,m){if(v==0)return[0,0];v==null&&(v=1/0),m=m||0;var _,R;for(R=0;R<x.length&&(_=x.charCodeAt(R),_==9?m+=this.getScreenTabSize(m):m+=1,!(m>v));R++);return[m,R]},E.prototype.getRowLength=function(x){var v=1;return this.lineWidgets&&(v+=this.lineWidgets[x]&&this.lineWidgets[x].rowCount||0),!this.$useWrapMode||!this.$wrapData[x]?v:this.$wrapData[x].length+v},E.prototype.getRowLineCount=function(x){return!this.$useWrapMode||!this.$wrapData[x]?1:this.$wrapData[x].length+1},E.prototype.getRowWrapIndent=function(x){if(this.$useWrapMode){var v=this.screenToDocumentPosition(x,Number.MAX_VALUE),m=this.$wrapData[v.row];return m.length&&m[0]<v.column?m.indent:0}else return 0},E.prototype.getScreenLastRowColumn=function(x){var v=this.screenToDocumentPosition(x,Number.MAX_VALUE);return this.documentToScreenColumn(v.row,v.column)},E.prototype.getDocumentLastRowColumn=function(x,v){var m=this.documentToScreenRow(x,v);return this.getScreenLastRowColumn(m)},E.prototype.getDocumentLastRowColumnPosition=function(x,v){var m=this.documentToScreenRow(x,v);return this.screenToDocumentPosition(m,Number.MAX_VALUE/10)},E.prototype.getRowSplitData=function(x){if(this.$useWrapMode)return this.$wrapData[x]},E.prototype.getScreenTabSize=function(x){return this.$tabSize-(x%this.$tabSize|0)},E.prototype.screenToDocumentRow=function(x,v){return this.screenToDocumentPosition(x,v).row},E.prototype.screenToDocumentColumn=function(x,v){return this.screenToDocumentPosition(x,v).column},E.prototype.screenToDocumentPosition=function(x,v){if(x<0)return{row:0,column:0};var m,_=0,R=0,O,D=0,N=0,P=this.$screenRowCache,U=this.$getRowCacheIndex(P,x),F=P.length;if(F&&U>=0)var D=P[U],_=this.$docRowCache[U],W=x>P[F-1];else var W=!F;for(var B=this.getLength()-1,H=this.getNextFoldLine(_),V=H?H.start.row:1/0;D<=x&&(N=this.getRowLength(_),!(D+N>x||_>=B));)D+=N,_++,_>V&&(_=H.end.row+1,H=this.getNextFoldLine(_,H),V=H?H.start.row:1/0),W&&(this.$docRowCache.push(_),this.$screenRowCache.push(D));if(H&&H.start.row<=_)m=this.getFoldDisplayLine(H),_=H.start.row;else{if(D+N<=x||_>B)return{row:B,column:this.getLine(B).length};m=this.getLine(_),H=null}var G=0,Y=Math.floor(x-D);if(this.$useWrapMode){var Q=this.$wrapData[_];Q&&(O=Q[Y],Y>0&&Q.length&&(G=Q.indent,R=Q[Y-1]||Q[Q.length-1],m=m.substring(R)))}return R+=this.$getStringScreenWidth(m,v-G)[1],this.$useWrapMode&&R>=O&&(R=O-1),H?H.idxToPosition(R):{row:_,column:R}},E.prototype.documentToScreenPosition=function(x,v){if(typeof v>"u")var m=this.$clipPositionToDocument(x.row,x.column);else m=this.$clipPositionToDocument(x,v);x=m.row,v=m.column;var _=0,R=null,O=null;O=this.getFoldAt(x,v,1),O&&(x=O.start.row,v=O.start.column);var D,N=0,P=this.$docRowCache,U=this.$getRowCacheIndex(P,x),F=P.length;if(F&&U>=0)var N=P[U],_=this.$screenRowCache[U],W=x>P[F-1];else var W=!F;for(var B=this.getNextFoldLine(N),H=B?B.start.row:1/0;N<x;){if(N>=H){if(D=B.end.row+1,D>x)break;B=this.getNextFoldLine(D,B),H=B?B.start.row:1/0}else D=N+1;_+=this.getRowLength(N),N=D,W&&(this.$docRowCache.push(N),this.$screenRowCache.push(_))}var V="";B&&N>=H?(V=this.getFoldDisplayLine(B,x,v),R=B.start.row):(V=this.getLine(x).substring(0,v),R=x);var G=0;if(this.$useWrapMode){var Y=this.$wrapData[R];if(Y){for(var Q=0;V.length>=Y[Q];)_++,Q++;V=V.substring(Y[Q-1]||0,V.length),G=Q>0?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[N]&&this.lineWidgets[N].rowsAbove&&(_+=this.lineWidgets[N].rowsAbove),{row:_,column:G+this.$getStringScreenWidth(V)[0]}},E.prototype.documentToScreenColumn=function(x,v){return this.documentToScreenPosition(x,v).column},E.prototype.documentToScreenRow=function(x,v){return this.documentToScreenPosition(x,v).row},E.prototype.getScreenLength=function(){var x=0,v=null;if(this.$useWrapMode)for(var R=this.$wrapData.length,O=0,_=0,v=this.$foldData[_++],D=v?v.start.row:1/0;O<R;){var N=this.$wrapData[O];x+=N?N.length+1:1,O++,O>D&&(O=v.end.row+1,v=this.$foldData[_++],D=v?v.start.row:1/0)}else{x=this.getLength();for(var m=this.$foldData,_=0;_<m.length;_++)v=m[_],x-=v.end.row-v.start.row}return this.lineWidgets&&(x+=this.$getWidgetScreenLength()),x},E.prototype.$setFontMetrics=function(x){this.$enableVarChar&&(this.$getStringScreenWidth=function(v,m,_){if(m===0)return[0,0];m||(m=1/0),_=_||0;var R,O;for(O=0;O<v.length&&(R=v.charAt(O),R===" "?_+=this.getScreenTabSize(_):_+=x.getCharacterWidth(R),!(_>m));O++);return[_,O]})},E.prototype.getPrecedingCharacter=function(){var x=this.selection.getCursor();if(x.column===0)return x.row===0?"":this.doc.getNewLineCharacter();var v=this.getLine(x.row);return v[x.column-1]},E.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()},E})();g.$uid=0,g.prototype.$modes=a.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=I,y.implement(g.prototype,u);var k=1,$=2,C=3,b=4,T=9,L=10,A=11,S=12;function I(E){return E<4352?!1:E>=4352&&E<=4447||E>=4515&&E<=4519||E>=4602&&E<=4607||E>=9001&&E<=9002||E>=11904&&E<=11929||E>=11931&&E<=12019||E>=12032&&E<=12245||E>=12272&&E<=12283||E>=12288&&E<=12350||E>=12353&&E<=12438||E>=12441&&E<=12543||E>=12549&&E<=12589||E>=12593&&E<=12686||E>=12688&&E<=12730||E>=12736&&E<=12771||E>=12784&&E<=12830||E>=12832&&E<=12871||E>=12880&&E<=13054||E>=13056&&E<=19903||E>=19968&&E<=42124||E>=42128&&E<=42182||E>=43360&&E<=43388||E>=44032&&E<=55203||E>=55216&&E<=55238||E>=55243&&E<=55291||E>=63744&&E<=64255||E>=65040&&E<=65049||E>=65072&&E<=65106||E>=65108&&E<=65126||E>=65128&&E<=65131||E>=65281&&E<=65376||E>=65504&&E<=65510}l("./edit_session/folding").Folding.call(g.prototype),l("./edit_session/bracket_match").BracketMatch.call(g.prototype),a.defineOptions(g.prototype,"session",{wrap:{set:function(E){if(!E||E=="off"?E=!1:E=="free"?E=!0:E=="printMargin"?E=-1:typeof E=="string"&&(E=parseInt(E,10)||!1),this.$wrap!=E)if(this.$wrap=E,!E)this.setUseWrapMode(!1);else{var x=typeof E=="number"?E:null;this.setWrapLimitRange(x,x),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(E){E=E=="auto"?this.$mode.type!="text":E!="text",E!=this.$wrapAsCode&&(this.$wrapAsCode=E,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(E){this.$useWorker=E,this.$stopWorker(),E&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(E){E=parseInt(E),E>0&&this.$tabSize!==E&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=E,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(E){this.setFoldStyle(E)},handlesSet:!0},overwrite:{set:function(E){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(E){this.doc.setNewLineMode(E)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(E){this.setMode(E)},get:function(){return this.$modeId},handlesSet:!0}}),d.EditSession=g}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(l,d,M){var y=l("./lib/lang"),p=l("./lib/oop"),w=l("./range").Range,a=(function(){function n(){this.$options={}}return n.prototype.set=function(t){return p.mixin(this.$options,t),this},n.prototype.getOptions=function(){return y.copyObject(this.$options)},n.prototype.setOptions=function(t){this.$options=t},n.prototype.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var c=null;return i.forEach(function(f,g,k,$){return c=new w(f,g,k,$),g==$&&e.start&&e.start.start&&e.skipCurrent!=!1&&c.isEqual(e.start)?(c=null,!1):!0}),c},n.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,c=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),f=[],g=e.re;if(e.$isMultiLine){var k=g.length,$=c.length-k,C;e:for(var b=g.offset||0;b<=$;b++){for(var T=0;T<k;T++)if(c[b+T].search(g[T])==-1)continue e;var L=c[b],A=c[b+k-1],S=L.length-L.match(g[0])[0].length,I=A.match(g[k-1])[0].length;C&&C.end.row===b&&C.end.column>S||(f.push(C=new w(b,S,b+k-1,I)),k>2&&(b=b+k-2))}}else for(var E,x=0;x<c.length;x++)if(this.$isMultilineSearch(e)){var v=c.length-1;if(E=this.$multiLineForward(t,g,x,v),E){var m=E.endRow<=v?E.endRow-1:v;m>x&&(x=m),f.push(new w(E.startRow,E.startCol,E.endRow,E.endCol))}}else{E=y.getMatchOffsets(c[x],g);for(var T=0;T<E.length;T++){var _=E[T];f.push(new w(x,_.offset,x,_.offset+_.length))}}if(i){for(var R=i.start.column,O=i.end.column,x=0,T=f.length-1;x<T&&f[x].start.column<R&&f[x].start.row==0;)x++;for(var D=i.end.row-i.start.row;x<T&&f[T].end.column>O&&f[T].end.row==D;)T--;for(f=f.slice(x,T+1),x=0,T=f.length;x<T;x++)f[x].start.row+=i.start.row,f[x].end.row+=i.start.row}return f},n.prototype.parseReplaceString=function(t){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",c=0,f=t.length;c<f;c++){var g=t.charCodeAt(c);if(g===e.Backslash){if(c++,c>=f){i+="\\";break}var k=t.charCodeAt(c);switch(k){case e.Backslash:i+="\\";break;case e.n:i+=`
|
|
196
|
+
`;break;case e.t:i+=" ";break}continue}if(g===e.DollarSign){if(c++,c>=f){i+="$";break}var $=t.charCodeAt(c);if($===e.DollarSign){i+="$$";continue}if($===e.Digit0||$===e.Ampersand){i+="$&";continue}if(e.Digit1<=$&&$<=e.Digit9){i+="$"+t[c];continue}}i+=t[c]}return i||t},n.prototype.replace=function(t,e){var i=this.$options,c=this.$assembleRegExp(i);if(i.$isMultiLine)return e;if(c){var f=this.$isMultilineSearch(i);f&&(t=t.replace(/\r\n|\r|\n/g,`
|
|
197
|
+
`));var g=c.exec(t);if(!g||!f&&g[0].length!=t.length)return null;if(e=i.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(c,e),i.preserveCase){e=e.split("");for(var k=Math.min(t.length,t.length);k--;){var $=t[k];$&&$.toLowerCase()!=$?e[k]=e[k].toUpperCase():e[k]=e[k].toLowerCase()}e=e.join("")}return e}},n.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var i=t.needle;if(!t.needle)return t.re=!1;t.regExp||(i=y.escapeRegExp(i));var c=t.caseSensitive?"gm":"gmi";try{new RegExp(i,"u"),t.$supportsUnicodeFlag=!0,c+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(i=u(i,t)),t.$isMultiLine=!e&&/[\n\r]/.test(i),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(i,c);try{var f=new RegExp(i,c)}catch{f=!1}return t.re=f},n.prototype.$assembleMultilineRegExp=function(t,e){for(var i=t.replace(/\r\n|\r|\n/g,`$
|
|
198
|
+
^`).split(`
|
|
199
|
+
`),c=[],f=0;f<i.length;f++)try{c.push(new RegExp(i[f],e))}catch{return!1}return c},n.prototype.$isMultilineSearch=function(t){return t.re&&/\\r\\n|\\r|\\n/.test(t.re.source)&&t.regExp&&!t.$isMultiLine},n.prototype.$multiLineForward=function(t,e,i,c){for(var f,g=s(t,i),k=i;k<=c;){for(var $=0;$<g&&!(k>c);$++){var C=t.getLine(k++);f=f==null?C:f+`
|
|
200
|
+
`+C}var b=e.exec(f);if(e.lastIndex=0,b){var T=f.slice(0,b.index).split(`
|
|
201
|
+
`),L=b[0].split(`
|
|
202
|
+
`),A=i+T.length-1,S=T[T.length-1].length,I=A+L.length-1,E=L.length==1?S+L[0].length:L[L.length-1].length;return{startRow:A,startCol:S,endRow:I,endCol:E}}}return null},n.prototype.$multiLineBackward=function(t,e,i,c,f){for(var g,k=s(t,c),$=t.getLine(c).length-i,C=c;C>=f;){for(var b=0;b<k&&C>=f;b++){var T=t.getLine(C--);g=g==null?T:T+`
|
|
203
|
+
`+g}var L=r(g,e,$);if(L){var A=g.slice(0,L.index).split(`
|
|
204
|
+
`),S=L[0].split(`
|
|
205
|
+
`),I=C+A.length,E=A[A.length-1].length,x=I+S.length-1,v=S.length==1?E+S[0].length:S[S.length-1].length;return{startRow:I,startCol:E,endRow:x,endCol:v}}}return null},n.prototype.$matchIterator=function(t,e){var i=this.$assembleRegExp(e);if(!i)return!1;var c=this.$isMultilineSearch(e),f=this.$multiLineForward,g=this.$multiLineBackward,k=e.backwards==!0,$=e.skipCurrent!=!1,C=i.unicode,b=e.range,T=e.start;T||(T=b?b[k?"end":"start"]:t.selection.getRange()),T.start&&(T=T[$!=k?"end":"start"]);var L=b?b.start.row:0,A=b?b.end.row:t.getLength()-1;if(k)var S=function(x){var v=T.row;if(!E(v,T.column,x)){for(v--;v>=L;v--)if(E(v,Number.MAX_VALUE,x))return;if(e.wrap!=!1){for(v=A,L=T.row;v>=L;v--)if(E(v,Number.MAX_VALUE,x))return}}};else var S=function(v){var m=T.row;if(!E(m,T.column,v)){for(m=m+1;m<=A;m++)if(E(m,0,v))return;if(e.wrap!=!1){for(m=L,A=T.row;m<=A;m++)if(E(m,0,v))return}}};if(e.$isMultiLine)var I=i.length,E=function(x,v,m){var _=k?x-I+1:x;if(!(_<0||_+I>t.getLength())){var R=t.getLine(_),O=R.search(i[0]);if(!(!k&&O<v||O===-1)){for(var D=1;D<I;D++)if(R=t.getLine(_+D),R.search(i[D])==-1)return;var N=R.match(i[I-1])[0].length;if(!(k&&N>v)&&m(_,O,_+I-1,N))return!0}}};else if(k)var E=function(v,m,_){if(c){var R=g(t,i,m,v,L);if(!R)return!1;if(_(R.startRow,R.startCol,R.endRow,R.endCol))return!0}else{var O=t.getLine(v),D=[],N,P=0;for(i.lastIndex=0;N=i.exec(O);){var U=N[0].length;if(P=N.index,!U){if(P>=O.length)break;i.lastIndex=P+=y.skipEmptyMatch(O,P,C)}if(N.index+U>m)break;D.push(N.index,U)}for(var F=D.length-1;F>=0;F-=2){var W=D[F-1],U=D[F];if(_(v,W,v,W+U))return!0}}};else var E=function(v,m,_){if(i.lastIndex=m,c){var R=f(t,i,v,A);if(R){var O=R.endRow<=A?R.endRow-1:A;O>v&&(v=O)}if(!R)return!1;if(_(R.startRow,R.startCol,R.endRow,R.endCol))return!0}else for(var D=t.getLine(v),N,P;P=i.exec(D);){var U=P[0].length;if(N=P.index,_(v,N,v,N+U))return!0;if(!U&&(i.lastIndex=N+=y.skipEmptyMatch(D,N,C),N>=D.length))return!1}};return{forEach:S}},n})();function u(n,t){var e=y.supportsLookbehind();function i(k,$){$===void 0&&($=!0);var C=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(k)||t.regExp?e&&t.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var c=Array.from(n),f=c[0],g=c[c.length-1];return i(f)+n+i(g,!1)}function r(n,t,e){for(var i=null,c=0;c<=n.length;){t.lastIndex=c;var f=t.exec(n);if(!f)break;var g=f.index+f[0].length;if(g>n.length-e)break;(!i||g>i.index+i[0].length)&&(i=f),c=f.index+1}return i}function s(n,t){var e=5e3,i={row:t,column:0},c=n.doc.positionToIndex(i),f=c+e,g=n.doc.indexToPosition(f),k=g.row;return k+1}d.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(l,d,M){var y=this&&this.__extends||(function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,c){i.__proto__=c}||function(i,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(i[f]=c[f])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}})(),p=l("../lib/keys"),w=l("../lib/useragent"),a=p.KEY_MODS,u=(function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,i){this.platform=e||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=i},n.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},n.prototype.removeCommand=function(t,e){var i=t&&(typeof t=="string"?t:t.name);t=this.commands[i],e||delete this.commands[i];var c=this.commandKeyBinding;for(var f in c){var g=c[f];if(g==t)delete c[f];else if(Array.isArray(g)){var k=g.indexOf(t);k!=-1&&(g.splice(k,1),g.length==1&&(c[f]=g[0]))}}},n.prototype.bindKey=function(t,e,i){if(typeof t=="object"&&t&&(i==null&&(i=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(c){var f="";if(c.indexOf(" ")!=-1){var g=c.split(/\s+/);c=g.pop(),g.forEach(function(C){var b=this.parseKeys(C),T=a[b.hashId]+b.key;f+=(f?" ":"")+T,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var k=this.parseKeys(c),$=a[k.hashId]+k.key;this._addCommandToBinding(f+$,e,i)},this)}},n.prototype._addCommandToBinding=function(t,e,i){var c=this.commandKeyBinding,f;if(!e)delete c[t];else if(!c[t]||this.$singleCommand)c[t]=e;else{Array.isArray(c[t])?(f=c[t].indexOf(e))!=-1&&c[t].splice(f,1):c[t]=[c[t]],typeof i!="number"&&(i=r(e));var g=c[t];for(f=0;f<g.length;f++){var k=g[f],$=r(k);if($>i)break}g.splice(f,0,e)}},n.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var i=t[e];if(i){if(typeof i=="string")return this.bindKey(i,e);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=e),this.addCommand(i))}},this)},n.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},n.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},n.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},n.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),i=e.pop(),c=p[i];if(p.FUNCTION_KEYS[c])i=p.FUNCTION_KEYS[c].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var f=0,g=e.length;g--;){var k=p.KEY_MODS[e[g]];if(k==null)return typeof console<"u"&&console.error("invalid modifier "+e[g]+" in "+t),!1;f|=k}return{key:i,hashId:f}},n.prototype.findKeyCommand=function(t,e){var i=a[t]+e;return this.commandKeyBinding[i]},n.prototype.handleKeyboard=function(t,e,i,c){if(!(c<0)){var f=a[e]+i,g=this.commandKeyBinding[f];return t.$keyChain&&(t.$keyChain+=" "+f,g=this.commandKeyBinding[t.$keyChain]||g),g&&(g=="chainKeys"||g[g.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||f,{command:"null"}):(t.$keyChain&&((!e||e==4)&&i.length==1?t.$keyChain=t.$keyChain.slice(0,-f.length-1):(e==-1||c>0)&&(t.$keyChain="")),{command:g})}},n.prototype.getStatusText=function(t,e){return e.$keyChain||""},n})();function r(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var s=(function(n){y(t,n);function t(e,i){var c=n.call(this,e,i)||this;return c.$singleCommand=!0,c}return t})(u);s.call=function(n,t,e){u.prototype.$init.call(n,t,e,!0)},u.call=function(n,t,e){u.prototype.$init.call(n,t,e,!1)},d.HashHandler=s,d.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(l,d,M){var y=this&&this.__extends||(function(){var r=function(s,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},r(s,n)};return function(s,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(s,n);function t(){this.constructor=s}s.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})(),p=l("../lib/oop"),w=l("../keyboard/hash_handler").MultiHashHandler,a=l("../lib/event_emitter").EventEmitter,u=(function(r){y(s,r);function s(n,t){var e=r.call(this,t,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),e}return s.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var i=n.length;i--;)if(this.exec(n[i],t,e))return!0;return!1}typeof n=="string"&&(n=this.commands[n]);var c={editor:t,command:n,args:e};return this.canExecute(n,t)?(c.returnValue=this._emit("exec",c),this._signal("afterExec",c),c.returnValue!==!1):(this._signal("commandUnavailable",c),!1)},s.prototype.canExecute=function(n,t){return typeof n=="string"&&(n=this.commands[n]),!(!n||t&&t.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(t))},s.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._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(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},s.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,n):this.exec(t[0],n,t[1])},this)}finally{this.$inReplay=!1}}},s.prototype.trimMacro=function(n){return n.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},s})(w);p.implement(u.prototype,a),d.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(l,d,M){var y=l("../lib/lang"),p=l("../config"),w=l("../range").Range;function a(r,s){return{win:r,mac:s}}d.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){p.loadModule("ace/ext/settings_menu",function(s){s.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){p.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){p.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(r,s){typeof s=="number"&&!isNaN(s)&&r.gotoLine(s),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(r){p.loadModule("ace/ext/searchbox",function(s){s.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(r,s){r.navigateUp(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(r,s){r.navigateDown(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(r,s){r.navigateLeft(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(r,s){r.navigateRight(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var s=r.$copyWithEmptySelection&&r.selection.isEmpty(),n=s?r.selection.getLineRange():r.selection.getRange();r._emit("cut",n),n.isEmpty()||r.session.remove(n),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,s){r.$handlePaste(s)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(r){p.loadModule("ace/ext/searchbox",function(s){s.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(r){var s=r.selection.getRange();s.start.column=0,r.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var s=r.selection.getRange();s.end.column=Number.MAX_VALUE,r.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,s){r.insert(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,s){r.insert(y.stringRepeat(s.text||"",s.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var s=r.selection.getRange();s.start.column=s.end.column=0,s.end.row++,r.selection.setRange(s,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(r){for(var s=r.selection.isBackwards(),n=s?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=s?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(n.row).length,i=r.session.doc.getTextRange(r.selection.getRange()),c=i.replace(/\n\s*/," ").length,f=r.session.doc.getLine(n.row),g=n.row+1;g<=t.row+1;g++){var k=y.stringTrimLeft(y.stringTrimRight(r.session.doc.getLine(g)));k.length!==0&&(k=" "+k),f+=k}t.row+1<r.session.doc.getLength()-1&&(f+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new w(n.row,0,t.row+2,0),f),c>0?(r.selection.moveCursorTo(n.row,n.column),r.selection.selectTo(n.row,n.column+c)):(e=r.session.doc.getLine(n.row).length>e?e+1:e,r.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var s=r.session.doc.getLength()-1,n=r.session.doc.getLine(s).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var i=0;i<t.length;i++)i==t.length-1&&(t[i].end.row===s&&t[i].end.column===n||e.push(new w(t[i].end.row,t[i].end.column,s,n))),i===0?t[i].start.row===0&&t[i].start.column===0||e.push(new w(0,0,t[i].start.row,t[i].start.column)):e.push(new w(t[i-1].end.row,t[i-1].end.column,t[i].start.row,t[i].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var i=0;i<e.length;i++)r.selection.addRange(e[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
|
|
206
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var s=r.getCursorPosition();r.selection.moveTo(s.row-1,Number.MAX_VALUE),r.insert(`
|
|
207
|
+
`),s.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)d.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(l,d,M){var y=l("../lib/keys"),p=(function(){function a(u){this.editor=u,this.gutterLayer=u.renderer.$gutterLayer,this.element=u.renderer.$gutter,this.lines=u.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return a.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))},a.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))},a.prototype.$onGutterKeyDown=function(u){if(this.annotationTooltip.isOpen){u.preventDefault(),u.keyCode===y.escape&&this.annotationTooltip.hide();return}if(u.target===this.element){if(u.keyCode!=y.enter)return;u.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout((function(){var s=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),n=this.$findNearestFoldLaneWidget(s),t=this.$findNearestAnnotation(s);if(!(n===null&&t===null)){var e=this.$findClosestNumber(n,t,s);if(e===n)if(this.activeLane="fold",this.activeRowIndex=n,this.$isCustomWidgetVisible(n)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(u),setTimeout((function(){this.editor._signal("gutterkeydown",new w(u,this))}).bind(this),10)},a.prototype.$handleGutterKeyboardInteraction=function(u){if(u.keyCode===y.tab){u.preventDefault();return}if(u.keyCode===y.escape){u.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(u.keyCode===y.up){switch(u.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(u.keyCode===y.down){switch(u.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(u.keyCode===y.left){u.preventDefault(),this.$switchLane("annotation");return}if(u.keyCode===y.right){u.preventDefault(),this.$switchLane("fold");return}if(u.keyCode===y.enter||u.keyCode===y.space){switch(u.preventDefault(),this.activeLane){case"fold":var r=this.$rowIndexToRow(this.activeRowIndex),s=this.editor.session.$gutterCustomWidgets[r];if(s)s.callbacks&&s.callbacks.onClick&&s.callbacks.onClick(u,r);else if(this.gutterLayer.session.foldWidgets[r]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),u),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==r&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(r),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}},a.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()},a.prototype.$isFoldWidgetVisible=function(u){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(u)),s=this.$getFoldWidget(u).style.display!=="none";return r&&s},a.prototype.$isCustomWidgetVisible=function(u){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(u)),s=!!this.$getCustomWidget(u);return r&&s},a.prototype.$isAnnotationVisible=function(u){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(u)),s=this.$getAnnotation(u).style.display!=="none";return r&&s},a.prototype.$getFoldWidget=function(u){var r=this.lines.get(u),s=r.element;return s.childNodes[1]},a.prototype.$getCustomWidget=function(u){var r=this.lines.get(u),s=r.element;return s.childNodes[3]},a.prototype.$getAnnotation=function(u){var r=this.lines.get(u),s=r.element;return s.childNodes[2]},a.prototype.$findNearestFoldLaneWidget=function(u){if(this.$isCustomWidgetVisible(u)||this.$isFoldWidgetVisible(u))return u;for(var r=0;u-r>0||u+r<this.lines.getLength()-1;){if(r++,u-r>=0&&this.$isCustomWidgetVisible(u-r))return u-r;if(u+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(u+r))return u+r;if(u-r>=0&&this.$isFoldWidgetVisible(u-r))return u-r;if(u+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(u+r))return u+r}return null},a.prototype.$findNearestAnnotation=function(u){if(this.$isAnnotationVisible(u))return u;for(var r=0;u-r>0||u+r<this.lines.getLength()-1;){if(r++,u-r>=0&&this.$isAnnotationVisible(u-r))return u-r;if(u+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(u+r))return u+r}return null},a.prototype.$focusFoldWidget=function(u){if(u!=null){var r=this.$getFoldWidget(u);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$focusCustomWidget=function(u){if(u!=null){var r=this.$getCustomWidget(u);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},a.prototype.$focusAnnotation=function(u){if(u!=null){var r=this.$getAnnotation(u);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$blurFoldWidget=function(u){var r=this.$getFoldWidget(u);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$blurCustomWidget=function(u){var r=this.$getCustomWidget(u);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},a.prototype.$blurAnnotation=function(u){var r=this.$getAnnotation(u);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isFoldWidgetVisible(u)||this.$isCustomWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=u,this.$isFoldWidgetVisible(u)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var u=this.activeRowIndex;u<this.lines.getLength()-1;)if(u++,this.$isFoldWidgetVisible(u)||this.$isCustomWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=u,this.$isFoldWidgetVisible(u)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var u=this.activeRowIndex;u<this.lines.getLength()-1;)if(u++,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$findClosestNumber=function(u,r,s){return u===null?r:r===null||Math.abs(s-u)<=Math.abs(s-r)?u:r},a.prototype.$switchLane=function(u){switch(u){case"annotation":if(this.activeLane==="annotation")break;var r=this.$findNearestAnnotation(this.activeRowIndex);if(r==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var s=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(s===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$isCustomWidgetVisible(s)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(u){var r=this.lines.get(u);return r?r.row:null},a.prototype.$rowToRowIndex=function(u){for(var r=0;r<this.lines.getLength();r++){var s=this.lines.get(r);if(s.row==u)return r}return null},a})();d.GutterKeyboardHandler=p;var w=(function(){function a(u,r){this.gutterKeyboardHandler=r,this.domEvent=u}return a.prototype.getKey=function(){return y.keyCodeToString(this.domEvent.keyCode)},a.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},a.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},a.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},a})();d.GutterKeyboardEvent=w}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(l,d,M){var y=this&&this.__values||function(v){var m=typeof Symbol=="function"&&Symbol.iterator,_=m&&v[m],R=0;if(_)return _.call(v);if(v&&typeof v.length=="number")return{next:function(){return v&&R>=v.length&&(v=void 0),{value:v&&v[R++],done:!v}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},p=l("./lib/oop"),w=l("./lib/dom"),a=l("./lib/lang"),u=l("./lib/useragent"),r=l("./keyboard/textinput").TextInput,s=l("./mouse/mouse_handler").MouseHandler,n=l("./mouse/fold_handler").FoldHandler,t=l("./keyboard/keybinding").KeyBinding,e=l("./edit_session").EditSession,i=l("./search").Search,c=l("./range").Range,f=l("./lib/event_emitter").EventEmitter,g=l("./commands/command_manager").CommandManager,k=l("./commands/default_commands").commands,$=l("./config"),C=l("./token_iterator").TokenIterator,b=l("./keyboard/gutter_handler").GutterKeyboardHandler,T=l("./config").nls,L=l("./clipboard"),A=l("./lib/keys"),S=l("./lib/event"),I=l("./tooltip").HoverTooltip,E=(function(){function v(m,_,R){this.id="editor"+ ++v.$uid,this.session,this.$toDestroy=[];var O=m.getContainerElement();this.container=O,this.renderer=m,this.commands=new g(u.isMac?"mac":"win",k),typeof document=="object"&&(this.textInput=new r(m.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new s(this),new n(this)),this.keyBinding=new t(this),this.$search=new i().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(D,N){N._$emitInputEvent.schedule(31)}),this.setSession(_||R&&R.session||new e("")),$.resetOptions(this),R&&this.setOptions(R),$._signal("editor",this)}return v.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},v.prototype.startOperation=function(m){this.session.startOperation(m)},v.prototype.endOperation=function(m){this.session.endOperation(m)},v.prototype.onStartOperation=function(m){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,m||(this.previousCommand=null)},v.prototype.onEndOperation=function(m){if(this.curOp&&this.session){if(m&&m.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var _=this.curOp.command,R=_&&_.scrollIntoView;if(R){switch(R){case"center-animate":R="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var O=this.selection.getRange(),D=this.renderer.layerConfig;(O.start.row>=D.lastRow||O.end.row<=D.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}R=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},v.prototype.$historyTracker=function(m){if(this.$mergeUndoDeltas){var _=this.prevOp,R=this.$mergeableCommands,O=_.command&&m.command.name==_.command.name;if(m.command.name=="insertstring"){var D=m.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),O=O&&this.mergeNextCommand&&(!/\s/.test(D)||/\s/.test(_.args)),this.mergeNextCommand=!0}else O=O&&R.indexOf(m.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(O=!1),O?this.session.mergeUndoDeltas=!0:R.indexOf(m.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},v.prototype.setKeyboardHandler=function(m,_){if(m&&typeof m=="string"&&m!="ace"){this.$keybindingId=m;var R=this;$.loadModule(["keybinding",m],function(O){R.$keybindingId==m&&R.keyBinding.setKeyboardHandler(O&&O.handler),_&&_()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(m),_&&_()},v.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},v.prototype.setSession=function(m){if(this.session!=m){this.curOp&&this.endOperation(),this.curOp={};var _=this.session;if(_){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 R=this.session.getSelection();this.session.$fontMetrics=null,R.off("changeCursor",this.$onCursorChange),R.off("changeSelection",this.$onSelectionChange)}this.session=m,m?(this.$onDocumentChange=this.onDocumentChange.bind(this),m.on("change",this.$onDocumentChange),this.renderer.setSession(m),m.$fontMetrics=this.renderer.$fontMetrics,this.$onChangeMode=this.onChangeMode.bind(this),m.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),m.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),m.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),m.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),m.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),m.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=m.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(m)),this._signal("changeSession",{session:m,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),_&&(_.$editor=null),m&&m._signal("changeEditor",{editor:this}),m&&(m.$editor=this),m&&!m.destroyed&&m.bgTokenizer.scheduleStart()}},v.prototype.getSession=function(){return this.session},v.prototype.setValue=function(m,_){return this.session.doc.setValue(m),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),m},v.prototype.getValue=function(){return this.session.getValue()},v.prototype.getSelection=function(){return this.selection},v.prototype.resize=function(m){this.renderer.onResize(m)},v.prototype.setTheme=function(m,_){this.renderer.setTheme(m,_)},v.prototype.getTheme=function(){return this.renderer.getTheme()},v.prototype.setStyle=function(m,_){this.renderer.setStyle(m,_)},v.prototype.unsetStyle=function(m){this.renderer.unsetStyle(m)},v.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},v.prototype.setFontSize=function(m){this.setOption("fontSize",m)},v.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var m=this;this.$highlightPending=!0,setTimeout(function(){m.$highlightPending=!1;var _=m.session;if(!(!_||_.destroyed)){_.$bracketHighlight&&(_.$bracketHighlight.markerIds.forEach(function(B){_.removeMarker(B)}),_.$bracketHighlight=null);var R=m.getCursorPosition(),O=m.getKeyboardHandler(),D=O&&O.$getDirectionForHighlight&&O.$getDirectionForHighlight(m),N=_.getMatchingBracketRanges(R,D);if(!N){var P=new C(_,R.row,R.column),U=P.getCurrentToken();if(U&&/\b(?:tag-open|tag-name)/.test(U.type)){var F=_.getMatchingTags(R);F&&(N=[F.openTagName.isEmpty()?F.openTag:F.openTagName,F.closeTagName.isEmpty()?F.closeTag:F.closeTagName])}}if(!N&&_.$mode.getMatching&&(N=_.$mode.getMatching(m.session)),!N){m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray(N)?N.length==1&&(W="ace_error_bracket"):N=[N],N.length==2&&(c.comparePoints(N[0].end,N[1].start)==0?N=[c.fromPoints(N[0].start,N[1].end)]:c.comparePoints(N[0].start,N[1].end)==0&&(N=[c.fromPoints(N[1].start,N[0].end)])),_.$bracketHighlight={ranges:N,markerIds:N.map(function(B){return _.addMarker(B,W,"text")})},m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide()}},50)}},v.prototype.focus=function(){this.textInput.focus()},v.prototype.isFocused=function(){return this.textInput.isFocused()},v.prototype.blur=function(){this.textInput.blur()},v.prototype.onFocus=function(m){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",m))},v.prototype.onBlur=function(m){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",m))},v.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},v.prototype.onDocumentChange=function(m){var _=this.session.$useWrapMode,R=m.start.row==m.end.row?m.end.row:1/0;this.renderer.updateLines(m.start.row,R,_),this._signal("change",m),this.$cursorChange()},v.prototype.onTokenizerUpdate=function(m){var _=m.data;this.renderer.updateLines(_.first,_.last)},v.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},v.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},v.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},v.prototype.$updateHighlightActiveLine=function(){var m=this.getSession(),_;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(_=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(_=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(_=!1)),m.$highlightLineMarker&&!_)m.removeMarker(m.$highlightLineMarker.id),m.$highlightLineMarker=null;else if(!m.$highlightLineMarker&&_){var R=new c(_.row,_.column,_.row,1/0);R.id=m.addMarker(R,"ace_active-line","screenLine"),m.$highlightLineMarker=R}else _&&(m.$highlightLineMarker.start.row=_.row,m.$highlightLineMarker.end.row=_.row,m.$highlightLineMarker.start.column=_.column,m._signal("changeBackMarker"))},v.prototype.onSelectionChange=function(m){var _=this.session;if(_.$selectionMarker&&_.removeMarker(_.$selectionMarker),_.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var R=this.selection.getRange(),O=this.getSelectionStyle();_.$selectionMarker=_.addMarker(R,"ace_selection",O)}var D=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(D),this._signal("changeSelection")},v.prototype.$getSelectionHighLightRegexp=function(){var m=this.session,_=this.getSelectionRange();if(!(_.isEmpty()||_.isMultiLine())){var R=_.start.column,O=_.end.column,D=m.getLine(_.start.row),N=D.substring(R,O);if(!(N.length>5e3||!/[\w\d]/.test(N))){var P=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:N}),U=D.substring(R-1,O+1);if(P.test(U))return P}}},v.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},v.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},v.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},v.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},v.prototype.onChangeMode=function(m){this.renderer.updateText(),this._emit("changeMode",m)},v.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},v.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},v.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},v.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},v.prototype.getCopyText=function(){var m=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),R=!1;if(!m&&this.$copyWithEmptySelection){R=!0;for(var O=this.selection.getAllRanges(),D=0;D<O.length;D++){var N=O[D];D&&O[D-1].start.row==N.start.row||(m+=this.session.getLine(N.start.row)+_)}}var P={text:m};return this._signal("copy",P),L.lineMode=R?P.text:!1,P.text},v.prototype.onCopy=function(){this.commands.exec("copy",this)},v.prototype.onCut=function(){this.commands.exec("cut",this)},v.prototype.onPaste=function(m,_){var R={text:m,event:_};this.commands.exec("paste",this,R)},v.prototype.$handlePaste=function(m){typeof m=="string"&&(m={text:m}),this._signal("paste",m);var _=m.text,R=_===L.lineMode,O=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)R?O.insert({row:this.selection.lead.row,column:0},_):this.insert(_);else if(R)this.selection.rangeList.ranges.forEach(function(W){O.insert({row:W.start.row,column:0},_)});else{var D=_.split(/\r\n|\r|\n/),N=this.selection.rangeList.ranges,P=D.length==2&&(!D[0]||!D[1]);if(D.length!=N.length||P)return this.commands.exec("insertstring",this,_);for(var U=N.length;U--;){var F=N[U];F.isEmpty()||O.remove(F),O.insert(F.start,D[U])}}},v.prototype.execCommand=function(m,_){return this.commands.exec(m,this,_)},v.prototype.insert=function(m,_){var R=this.session,O=R.getMode(),D=this.getCursorPosition();if(this.getBehavioursEnabled()&&!_){var N=O.transformAction(R.getState(D.row),"insertion",this,R,m);N&&(m!==N.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),m=N.text)}if(m==" "&&(m=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&m.indexOf(`
|
|
208
|
+
`)==-1){var P=c.fromPoints(D,D);P.end.column+=m.length,this.session.remove(P)}}else{var P=this.getSelectionRange();D=this.session.remove(P),this.clearSelection()}if(m==`
|
|
209
|
+
`||m==`\r
|
|
210
|
+
`){var B=R.getLine(D.row);if(D.column>B.search(/\S|$/)){var U=B.substr(D.column).search(/\S|$/);R.doc.removeInLine(D.row,D.column,D.column+U)}}this.clearSelection();var F=D.column,W=R.getState(D.row),B=R.getLine(D.row),H=O.checkOutdent(W,B,m);if(R.insert(D,m),N&&N.selection&&(N.selection.length==2?this.selection.setSelectionRange(new c(D.row,F+N.selection[0],D.row,F+N.selection[1])):this.selection.setSelectionRange(new c(D.row+N.selection[0],N.selection[1],D.row+N.selection[2],N.selection[3]))),this.$enableAutoIndent){if(R.getDocument().isNewLine(m)){var V=O.getNextLineIndent(W,B.slice(0,D.column),R.getTabString());R.insert({row:D.row+1,column:0},V)}H&&O.autoOutdent(W,R,D.row)}},v.prototype.autoIndent=function(){for(var m=this.session,_=m.getMode(),R=this.selection.isEmpty()?[new c(0,0,m.doc.getLength()-1,0)]:this.selection.getAllRanges(),O="",D="",N="",P=m.getTabString(),U=0;U<R.length;U++)for(var F=R[U].start.row,W=R[U].end.row,B=F;B<=W;B++){B>0&&(O=m.getState(B-1),D=m.getLine(B-1),N=_.getNextLineIndent(O,D,P));var H=m.getLine(B),V=_.$getIndent(H);if(N!==V){if(V.length>0){var G=new c(B,0,B,V.length);m.remove(G)}N.length>0&&m.insert({row:B,column:0},N)}_.autoOutdent(O,m,B)}},v.prototype.onTextInput=function(m,_){if(!_)return this.keyBinding.onTextInput(m);this.startOperation({command:{name:"insertstring"}});var R=this.applyComposition.bind(this,m,_);this.selection.rangeCount?this.forEachSelection(R):R(),this.endOperation()},v.prototype.applyComposition=function(m,_){if(_.extendLeft||_.extendRight){var R=this.selection.getRange();R.start.column-=_.extendLeft,R.end.column+=_.extendRight,R.start.column<0&&(R.start.row--,R.start.column+=this.session.getLine(R.start.row).length+1),this.selection.setRange(R),!m&&!R.isEmpty()&&this.execCommand(_.extendLeft?"backspace":"del")}if((m||!this.selection.isEmpty())&&this.insert(m,!0),_.restoreStart||_.restoreEnd){var R=this.selection.getRange();R.start.column-=_.restoreStart,R.end.column-=_.restoreEnd,this.selection.setRange(R)}},v.prototype.onCommandKey=function(m,_,R){return this.keyBinding.onCommandKey(m,_,R)},v.prototype.setOverwrite=function(m){this.session.setOverwrite(m)},v.prototype.getOverwrite=function(){return this.session.getOverwrite()},v.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},v.prototype.setScrollSpeed=function(m){this.setOption("scrollSpeed",m)},v.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},v.prototype.setDragDelay=function(m){this.setOption("dragDelay",m)},v.prototype.getDragDelay=function(){return this.getOption("dragDelay")},v.prototype.setSelectionStyle=function(m){this.setOption("selectionStyle",m)},v.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},v.prototype.setHighlightActiveLine=function(m){this.setOption("highlightActiveLine",m)},v.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},v.prototype.setHighlightGutterLine=function(m){this.setOption("highlightGutterLine",m)},v.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},v.prototype.setHighlightSelectedWord=function(m){this.setOption("highlightSelectedWord",m)},v.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},v.prototype.setAnimatedScroll=function(m){this.renderer.setAnimatedScroll(m)},v.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},v.prototype.setShowInvisibles=function(m){this.renderer.setShowInvisibles(m)},v.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},v.prototype.setDisplayIndentGuides=function(m){this.renderer.setDisplayIndentGuides(m)},v.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},v.prototype.setHighlightIndentGuides=function(m){this.renderer.setHighlightIndentGuides(m)},v.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},v.prototype.setShowPrintMargin=function(m){this.renderer.setShowPrintMargin(m)},v.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},v.prototype.setPrintMarginColumn=function(m){this.renderer.setPrintMarginColumn(m)},v.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},v.prototype.setReadOnly=function(m){this.setOption("readOnly",m)},v.prototype.getReadOnly=function(){return this.getOption("readOnly")},v.prototype.setBehavioursEnabled=function(m){this.setOption("behavioursEnabled",m)},v.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},v.prototype.setWrapBehavioursEnabled=function(m){this.setOption("wrapBehavioursEnabled",m)},v.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},v.prototype.setShowFoldWidgets=function(m){this.setOption("showFoldWidgets",m)},v.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},v.prototype.setFadeFoldWidgets=function(m){this.setOption("fadeFoldWidgets",m)},v.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},v.prototype.remove=function(m){this.selection.isEmpty()&&(m=="left"?this.selection.selectLeft():this.selection.selectRight());var _=this.getSelectionRange();if(this.getBehavioursEnabled()){var R=this.session,O=R.getState(_.start.row),D=R.getMode().transformAction(O,"deletion",this,R,_);if(_.end.column===0){var N=R.getTextRange(_);if(N[N.length-1]==`
|
|
211
|
+
`){var P=R.getLine(_.end.row);/^\s+$/.test(P)&&(_.end.column=P.length)}}D&&(_=D)}this.session.remove(_),this.clearSelection()},v.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},v.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},v.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},v.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var m=this.getSelectionRange();m.start.column==m.end.column&&m.start.row==m.end.row&&(m.end.column=0,m.end.row++),this.session.remove(m),this.clearSelection()},v.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var m=this.getCursorPosition();this.insert(`
|
|
212
|
+
`),this.moveCursorToPosition(m)},v.prototype.setGhostText=function(m,_){this.renderer.setGhostText(m,_)},v.prototype.removeGhostText=function(){this.renderer.removeGhostText()},v.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var m=this.getCursorPosition(),_=m.column;if(_!==0){var R=this.session.getLine(m.row),O,D;_<R.length?(O=R.charAt(_)+R.charAt(_-1),D=new c(m.row,_-1,m.row,_+1)):(O=R.charAt(_-1)+R.charAt(_-2),D=new c(m.row,_-2,m.row,_)),this.session.replace(D,O),this.session.selection.moveToPosition(D.end)}}},v.prototype.toLowerCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var _=this.getSelectionRange(),R=this.session.getTextRange(_);this.session.replace(_,R.toLowerCase()),this.selection.setSelectionRange(m)},v.prototype.toUpperCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var _=this.getSelectionRange(),R=this.session.getTextRange(_);this.session.replace(_,R.toUpperCase()),this.selection.setSelectionRange(m)},v.prototype.indent=function(){var m=this.session,_=this.getSelectionRange();if(_.start.row<_.end.row){var R=this.$getSelectedRows();m.indentRows(R.first,R.last," ");return}else if(_.start.column<_.end.column){var O=m.getTextRange(_);if(!/^\s+$/.test(O)){var R=this.$getSelectedRows();m.indentRows(R.first,R.last," ");return}}var D=m.getLine(_.start.row),N=_.start,P=m.getTabSize(),U=m.documentToScreenColumn(N.row,N.column);if(this.session.getUseSoftTabs())var F=P-U%P,W=a.stringRepeat(" ",F);else{for(var F=U%P;D[_.start.column-1]==" "&&F;)_.start.column--,F--;this.selection.setSelectionRange(_),W=" "}return this.insert(W)},v.prototype.blockIndent=function(){var m=this.$getSelectedRows();this.session.indentRows(m.first,m.last," ")},v.prototype.blockOutdent=function(){var m=this.session.getSelection();this.session.outdentRows(m.getRange())},v.prototype.sortLines=function(){for(var m=this.$getSelectedRows(),_=this.session,R=[],O=m.first;O<=m.last;O++)R.push(_.getLine(O));R.sort(function(P,U){return P.toLowerCase()<U.toLowerCase()?-1:P.toLowerCase()>U.toLowerCase()?1:0});for(var D=new c(0,0,0,0),O=m.first;O<=m.last;O++){var N=_.getLine(O);D.start.row=O,D.end.row=O,D.end.column=N.length,_.replace(D,R[O-m.first])}},v.prototype.toggleCommentLines=function(){var m=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(m,this.session,_.first,_.last)},v.prototype.toggleBlockComment=function(){var m=this.getCursorPosition(),_=this.session.getState(m.row),R=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,R,m)},v.prototype.getNumberAt=function(m,_){var R=/[\-]?[0-9]+(?:\.[0-9]+)?/g;R.lastIndex=0;for(var O=this.session.getLine(m);R.lastIndex<_;){var D=R.exec(O);if(D.index<=_&&D.index+D[0].length>=_){var N={value:D[0],start:D.index,end:D.index+D[0].length};return N}}return null},v.prototype.modifyNumber=function(m){var _=this.selection.getCursor().row,R=this.selection.getCursor().column,O=new c(_,R-1,_,R),D=this.session.getTextRange(O);if(!isNaN(parseFloat(D))&&isFinite(D)){var N=this.getNumberAt(_,R);if(N){var P=N.value.indexOf(".")>=0?N.start+N.value.indexOf(".")+1:N.end,U=N.start+N.value.length-P,F=parseFloat(N.value);F*=Math.pow(10,U),P!==N.end&&R<P?m*=Math.pow(10,N.end-R-1):m*=Math.pow(10,N.end-R),F+=m,F/=Math.pow(10,U);var W=F.toFixed(U),B=new c(_,N.start,_,N.end);this.session.replace(B,W),this.moveCursorTo(_,Math.max(N.start+1,R+W.length-N.value.length))}}else this.toggleWord()},v.prototype.toggleWord=function(){var m=this.selection.getCursor().row,_=this.selection.getCursor().column;this.selection.selectWord();var R=this.getSelectedText(),O=this.selection.getWordRange().start.column,D=R.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),N=_-O-1;N<0&&(N=0);var P=0,U=0,F=this;R.match(/[A-Za-z0-9_]+/)&&D.forEach(function(q,ie){U=P+q.length,N>=P&&N<=U&&(R=q,F.selection.clearSelection(),F.moveCursorTo(m,P+O),F.selection.selectTo(m,U+O)),P=U});for(var W=this.$toggleWordPairs,B,H=0;H<W.length;H++)for(var V=W[H],G=0;G<=1;G++){var Y=+!G,Q=R.match(new RegExp("^\\s?_?("+a.escapeRegExp(V[G])+")\\s?$","i"));if(Q){var ne=R.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(Q[1])+")($|\\s)","g"));ne&&(B=R.replace(new RegExp(a.escapeRegExp(V[G]),"i"),function(q){var ie=V[Y];return q.toUpperCase()==q?ie=ie.toUpperCase():q.charAt(0).toUpperCase()==q.charAt(0)&&(ie=ie.substr(0,0)+V[Y].charAt(0).toUpperCase()+ie.substr(1)),ie}),this.insert(B),B="")}}},v.prototype.findLinkAt=function(m,_){var R,O,D=this.session.getLine(m),N=D.split(/((?:https?|ftp):\/\/[\S]+)/),P=_;P<0&&(P=0);var U=0,F=0,W;try{for(var B=y(N),H=B.next();!H.done;H=B.next()){var V=H.value;if(F=U+V.length,P>=U&&P<=F&&V.match(/((?:https?|ftp):\/\/[\S]+)/)){W=V.replace(/[\s:.,'";}\]]+$/,"");break}U=F}}catch(G){R={error:G}}finally{try{H&&!H.done&&(O=B.return)&&O.call(B)}finally{if(R)throw R.error}}return W},v.prototype.openLink=function(){var m=this.selection.getCursor(),_=this.findLinkAt(m.row,m.column);return _&&window.open(_,"_blank"),_!=null},v.prototype.removeLines=function(){var m=this.$getSelectedRows();this.session.removeFullLines(m.first,m.last),this.clearSelection()},v.prototype.duplicateSelection=function(){var m=this.selection,_=this.session,R=m.getRange(),O=m.isBackwards();if(R.isEmpty()){var D=R.start.row;_.duplicateLines(D,D)}else{var N=O?R.start:R.end,P=_.insert(N,_.getTextRange(R));R.start=N,R.end=P,m.setSelectionRange(R,O)}},v.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},v.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},v.prototype.moveText=function(m,_,R){return this.session.moveText(m,_,R)},v.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},v.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},v.prototype.$moveLines=function(m,_){var R,O,D=this.selection;if(!D.inMultiSelectMode||this.inVirtualSelectionMode){var N=D.toOrientedRange();R=this.$getSelectedRows(N),O=this.session.$moveLines(R.first,R.last,_?0:m),_&&m==-1&&(O=0),N.moveBy(O,0),D.fromOrientedRange(N)}else{var P=D.rangeList.ranges;D.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var U=0,F=0,W=P.length,B=0;B<W;B++){var H=B;P[B].moveBy(U,0),R=this.$getSelectedRows(P[B]);for(var V=R.first,G=R.last;++B<W;){F&&P[B].moveBy(F,0);var Y=this.$getSelectedRows(P[B]);if(_&&Y.first!=G)break;if(!_&&Y.first>G+1)break;G=Y.last}for(B--,U=this.session.$moveLines(V,G,_?0:m),_&&m==-1&&(H=B+1);H<=B;)P[H].moveBy(U,0),H++;_||(U=0),F+=U}D.fromOrientedRange(D.ranges[0]),D.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},v.prototype.$getSelectedRows=function(m){return m=(m||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(m.start.row),last:this.session.getRowFoldEnd(m.end.row)}},v.prototype.onCompositionStart=function(m){this.renderer.showComposition(m)},v.prototype.onCompositionUpdate=function(m){this.renderer.setCompositionText(m)},v.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},v.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},v.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},v.prototype.isRowVisible=function(m){return m>=this.getFirstVisibleRow()&&m<=this.getLastVisibleRow()},v.prototype.isRowFullyVisible=function(m){return m>=this.renderer.getFirstFullyVisibleRow()&&m<=this.renderer.getLastFullyVisibleRow()},v.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},v.prototype.$moveByPage=function(m,_){var R=this.renderer,O=this.renderer.layerConfig,D=m*Math.floor(O.height/O.lineHeight);_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(D,0)}):_===!1&&(this.selection.moveCursorBy(D,0),this.selection.clearSelection());var N=R.scrollTop;R.scrollBy(0,D*O.lineHeight),_!=null&&R.scrollCursorIntoView(null,.5),R.animateScrolling(N)},v.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},v.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},v.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},v.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},v.prototype.scrollPageDown=function(){this.$moveByPage(1)},v.prototype.scrollPageUp=function(){this.$moveByPage(-1)},v.prototype.scrollToRow=function(m){this.renderer.scrollToRow(m)},v.prototype.scrollToLine=function(m,_,R,O){this.renderer.scrollToLine(m,_,R,O)},v.prototype.centerSelection=function(){var m=this.getSelectionRange(),_={row:Math.floor(m.start.row+(m.end.row-m.start.row)/2),column:Math.floor(m.start.column+(m.end.column-m.start.column)/2)};this.renderer.alignCursor(_,.5)},v.prototype.getCursorPosition=function(){return this.selection.getCursor()},v.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},v.prototype.getSelectionRange=function(){return this.selection.getRange()},v.prototype.selectAll=function(){this.selection.selectAll()},v.prototype.clearSelection=function(){this.selection.clearSelection()},v.prototype.moveCursorTo=function(m,_){this.selection.moveCursorTo(m,_)},v.prototype.moveCursorToPosition=function(m){this.selection.moveCursorToPosition(m)},v.prototype.jumpToMatching=function(m,_){var R=this.getCursorPosition(),O=new C(this.session,R.row,R.column),D=O.getCurrentToken(),N=0;D&&D.type.indexOf("tag-name")!==-1&&(D=O.stepBackward());var P=D||O.stepForward();if(P){var U,F=!1,W={},B=R.column-P.start,H,V={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(P.value.match(/[{}()\[\]]/g)){for(;B<P.value.length&&!F;B++)if(V[P.value[B]])switch(H=V[P.value[B]]+"."+P.type.replace("rparen","lparen"),isNaN(W[H])&&(W[H]=0),P.value[B]){case"(":case"[":case"{":W[H]++;break;case")":case"]":case"}":W[H]--,W[H]===-1&&(U="bracket",F=!0);break}}else P.type.indexOf("tag-name")!==-1&&(isNaN(W[P.value])&&(W[P.value]=0),D.value==="<"&&N>1?W[P.value]++:D.value==="</"&&W[P.value]--,W[P.value]===-1&&(U="tag",F=!0));F||(D=P,N++,P=O.stepForward(),B=0)}while(P&&!F);if(U){var G,Y;if(U==="bracket")G=this.session.getBracketRange(R),G||(G=new c(O.getCurrentTokenRow(),O.getCurrentTokenColumn()+B-1,O.getCurrentTokenRow(),O.getCurrentTokenColumn()+B-1),Y=G.start,(_||Y.row===R.row&&Math.abs(Y.column-R.column)<2)&&(G=this.session.getBracketRange(Y)));else if(U==="tag"){if(!P||P.type.indexOf("tag-name")===-1)return;if(G=new c(O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2,O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2),G.compare(R.row,R.column)===0){var Q=this.session.getMatchingTags(R);Q&&(Q.openTag.contains(R.row,R.column)?(G=Q.closeTag,Y=G.start):(G=Q.openTag,Q.closeTag.start.row===R.row&&Q.closeTag.start.column===R.column?Y=G.end:Y=G.start))}Y=Y||G.start}Y=G&&G.cursor||Y,Y&&(m?G&&_?this.selection.setRange(G):G&&G.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Y.row,Y.column):this.selection.moveTo(Y.row,Y.column))}}},v.prototype.gotoLine=function(m,_,R){this.selection.clearSelection(),this.session.unfold({row:m-1,column:_||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(m-1,_||0),this.isRowFullyVisible(m-1)||this.scrollToLine(m-1,!0,R)},v.prototype.navigateTo=function(m,_){this.selection.moveTo(m,_)},v.prototype.navigateUp=function(m){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var _=this.selection.anchor.getPosition();return this.moveCursorToPosition(_)}this.selection.clearSelection(),this.selection.moveCursorBy(-m||-1,0)},v.prototype.navigateDown=function(m){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var _=this.selection.anchor.getPosition();return this.moveCursorToPosition(_)}this.selection.clearSelection(),this.selection.moveCursorBy(m||1,0)},v.prototype.navigateLeft=function(m){if(this.selection.isEmpty())for(m=m||1;m--;)this.selection.moveCursorLeft();else{var _=this.getSelectionRange().start;this.moveCursorToPosition(_)}this.clearSelection()},v.prototype.navigateRight=function(m){if(this.selection.isEmpty())for(m=m||1;m--;)this.selection.moveCursorRight();else{var _=this.getSelectionRange().end;this.moveCursorToPosition(_)}this.clearSelection()},v.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},v.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},v.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},v.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},v.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},v.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},v.prototype.replace=function(m,_){_&&this.$search.set(_);var R=this.$search.find(this.session),O=0;return R&&(this.$tryReplace(R,m)&&(O=1),this.selection.setSelectionRange(R),this.renderer.scrollSelectionIntoView(R.start,R.end)),O},v.prototype.replaceAll=function(m,_){_&&this.$search.set(_);var R=this.$search.findAll(this.session),O=0;if(!R.length)return O;var D=this.getSelectionRange();this.selection.moveTo(0,0);for(var N=R.length-1;N>=0;--N)this.$tryReplace(R[N],m)&&O++;return this.selection.setSelectionRange(D),O},v.prototype.$tryReplace=function(m,_){var R=this.session.getTextRange(m);return _=this.$search.replace(R,_),_!==null?(m.end=this.session.replace(m,_),m):null},v.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},v.prototype.find=function(m,_,R){_||(_={}),typeof m=="string"||m instanceof RegExp?_.needle=m:typeof m=="object"&&p.mixin(_,m);var O=this.selection.getRange();_.needle==null&&(m=this.session.getTextRange(O)||this.$search.$options.needle,m||(O=this.session.getWordRange(O.start.row,O.start.column),m=this.session.getTextRange(O)),this.$search.set({needle:m})),this.$search.set(_),_.start||this.$search.set({start:O});var D=this.$search.find(this.session);if(_.preventScroll)return D;if(D)return this.revealRange(D,R),D;_.backwards?O.start=O.end:O.end=O.start,this.selection.setRange(O)},v.prototype.findNext=function(m,_){this.find({skipCurrent:!0,backwards:!1},m,_)},v.prototype.findPrevious=function(m,_){this.find(m,{skipCurrent:!0,backwards:!0},_)},v.prototype.revealRange=function(m,_){this.session.unfold(m),this.selection.setSelectionRange(m);var R=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(m.start,m.end,.5),_!==!1&&this.renderer.animateScrolling(R)},v.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},v.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},v.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(m){m.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()},v.prototype.setAutoScrollEditorIntoView=function(m){if(m){var _,R=this,O=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var D=this.$scrollAnchor;D.style.cssText="position:absolute",this.container.insertBefore(D,this.container.firstChild);var N=this.on("changeSelection",function(){O=!0}),P=this.renderer.on("beforeRender",function(){O&&(_=R.renderer.container.getBoundingClientRect())}),U=this.renderer.on("afterRender",function(){if(O&&_&&(R.isFocused()||R.searchBox&&R.searchBox.isFocused())){var F=R.renderer,W=F.$cursorLayer.$pixelPos,B=F.layerConfig,H=W.top-B.offset;W.top>=0&&H+_.top<0?O=!0:W.top<B.height&&W.top+_.top+B.lineHeight>window.innerHeight?O=!1:O=null,O!=null&&(D.style.top=H+"px",D.style.left=W.left+"px",D.style.height=B.lineHeight+"px",D.scrollIntoView(O)),O=_=null}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",N),this.renderer.off("afterRender",U),this.renderer.off("beforeRender",P))}}},v.prototype.$resetCursorStyle=function(){var m=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(m)),_.isBlinking=!this.$readOnly&&m!="wide",w.setCssClass(_.element,"ace_slim-cursors",/slim/.test(m)))},v.prototype.prompt=function(m,_,R){var O=this;$.loadModule("ace/ext/prompt",function(D){D.prompt(O,m,_,R)})},Object.defineProperty(v.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new I(this.container))},set:function(m){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=m},enumerable:!1,configurable:!0}),v})();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],p.implement(E.prototype,f),$.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(v){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:v})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(v){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(v){var m=this;if(this.textInput.setReadOnly(v),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(R){var O=!1;if(R&&R.type=="keydown"){if(R&&R.key&&!R.ctrlKey&&!R.metaKey&&(R.key==" "&&R.preventDefault(),O=R.key.length==1),!O)return}else R&&R.type!=="exec"&&(O=!0);if(O){var D=w.createElement("div");D.textContent=T("editor.tooltip.disable-editing","Editing is disabled"),m.hoverTooltip.isOpen||m.hoverTooltip.showForRange(m,m.getSelectionRange(),D)}else m.hoverTooltip&&m.hoverTooltip.isOpen&&m.hoverTooltip.hide()});var _=this.textInput.getElement();v?(S.addListener(_,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(_,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(v){this.textInput.setCopyWithEmptySelection(v)},initialValue:!1},cursorStyle:{set:function(v){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(v){this.setAutoScrollEditorIntoView(v)}},keyboardHandler:{set:function(v){this.setKeyboardHandler(v)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(v){this.session.setValue(v)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(v){this.setSession(v)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(v){this.renderer.$gutterLayer.setShowLineNumbers(v),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),v&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(v){this.$showLineNumbers&&v?x.attach(this):x.detach(this)}},placeholder:{set:function(v){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var m=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(m&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),w.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!m&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),w.addCssClass(this.container,"ace_hasPlaceholder");var _=w.createElement("div");_.className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!m&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(v){var m={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(O){O.blur(),O.renderer.scroller.focus()},readOnly:!0},_=function(O){if(O.target==this.renderer.scroller&&O.keyCode===A.enter){O.preventDefault();var D=this.getCursorPosition().row;this.isRowVisible(D)||this.scrollToLine(D,!0,!0),this.focus()}},R;v?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(m),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",T("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",T("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),R||(R=new b(this)),R.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",_.bind(this)),this.commands.removeCommand(m),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),R&&R.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(v){this.$textInputAriaLabel=v},initialValue:""},enableMobileMenu:{set:function(v){this.$enableMobileMenu=v},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 x={getText:function(v,m){return(Math.abs(v.selection.lead.row-m)||m+1+(m<9?"·":""))+""},getWidth:function(v,m,_){return Math.max(m.toString().length,(_.lastRow+1).toString().length,2)*_.characterWidth},update:function(v,m){m.renderer.$loop.schedule(m.renderer.CHANGE_GUTTER)},attach:function(v){v.renderer.$gutterLayer.$renderer=this,v.on("changeSelection",this.update),this.update(null,v)},detach:function(v){v.renderer.$gutterLayer.$renderer==this&&(v.renderer.$gutterLayer.$renderer=null),v.off("changeSelection",this.update),this.update(null,v)}};d.Editor=E}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(l,d,M){var y=l("../lib/dom"),p=(function(){function w(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(a){y.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(a,u,r){var s=u.firstRowScreen*u.lineHeight,n=Math.floor(s/this.canvasHeight),t=r.documentToScreenRow(a,0)*u.lineHeight;return t-n*this.canvasHeight},w.prototype.$getCellByScreenRow=function(a,u){for(var r=u.firstRowScreen*u.lineHeight,s=Math.floor(r/this.canvasHeight),n=a*u.lineHeight-s*this.canvasHeight,t=this.cells.length-1;t>=0;t--){var e=this.cells[t],i=parseInt(e.element.style.top),c=parseInt(e.element.style.height);if(i<=n){if(i+c<n)return null;var f=n-i;return{cell:e,offset:f}}}return null},w.prototype.computeLineHeight=function(a,u,r){return u.lineHeight*r.getRowLineCount(a)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(a){return this.cells[a]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=y.createFragment(this.element),r=0;r<a.length;r++)u.appendChild(a[r].element);this.element.appendChild(u)}else this.cells.push(a),this.element.appendChild(a.element)},w.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var u=y.createFragment(this.element),r=0;r<a.length;r++)u.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(u,this.element.firstChild):this.element.appendChild(u)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},w.prototype.createCell=function(a,u,r,s){var n=this.cellCache.pop();if(!n){var t=y.createElement("div");s&&s(t),this.element.appendChild(t),n={element:t,text:"",row:a}}return n.row=a,n},w})();d.Lines=p}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(l,d,M){var y=l("../lib/dom"),p=l("../lib/oop"),w=l("../lib/lang"),a=l("../lib/event_emitter").EventEmitter,u=l("./lines").Lines,r=l("../config").nls,s=(function(){function t(e){this.$showCursorMarker=null,this.element=y.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new u(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,i)},t.prototype.removeGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,i)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var i=0;i<e.length;i++){var c=e[i],f=c.row,g=this.$annotations[f];g||(g=this.$annotations[f]={text:[],type:[],displayText:[]});var k=c.text,$=c.text,C=c.type;k=k?w.escapeHTML(k):c.html||"",$=$||c.html||"",g.text.indexOf(k)===-1&&(g.text.push(k),g.type.push(C),g.displayText.push($));var b=c.className;b?g.className=b:C==="error"?g.className=" ace_error":C==="security"&&!/\bace_error\b/.test(g.className)?g.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(g.className)?g.className=" ace_warning":C==="info"&&!g.className?g.className=" ace_info":C==="hint"&&!g.className&&(g.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var i=e.start.row,c=e.end.row-i;if(c!==0)if(e.action=="remove")this.$annotations.splice(i,c+1,null);else{var f=new Array(c+1);f.unshift(i,1),this.$annotations.splice.apply(this.$annotations,f)}}},t.prototype.update=function(e){this.config=e;var i=this.session,c=e.firstRow,f=Math.min(e.lastRow+e.gutterOffset,i.getLength()-1);this.oldLastRow=f,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var g=i.getNextFoldLine(c),k=g?g.start.row:1/0,$=null,C=-1,b=c;;){if(b>k&&(b=g.end.row+1,g=i.getNextFoldLine(b,g),k=g?g.start.row:1/0),b>f){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}$=this.$lines.get(++C),$?$.row=b:($=this.$lines.createCell(b,e,this.session,n),this.$lines.push($)),this.$renderCell($,e,g,b),b++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var i=this.session,c=i.gutterRenderer||this.$renderer,f=i.$firstLineNumber,g=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(g=i.getLength()+f-1);var k=c?c.getWidth(i,g,e):g.toString().length*e.characterWidth,$=this.$padding||this.$computePadding();k+=$.left+$.right,k!==this.gutterWidth&&!isNaN(k)&&(this.gutterWidth=k,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",k))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var c=0;c<i.length;c++){var f=i[c];if(f.row>=this.$cursorRow){if(f.row>this.$cursorRow){var g=this.session.getFoldLine(this.$cursorRow);if(c>0&&g&&g.start.row==i[c-1].row)f=i[c-1];else break}f.element.className="ace_gutter-active-line "+f.element.className,this.$cursorCell=f;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=y.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=e.selection.cursor,c=this.config,f=this.$lines,g=c.firstRowScreen*c.lineHeight,k=Math.floor(g/f.canvasHeight),$=e.documentToScreenRow(i)*c.lineHeight,C=$-k*f.canvasHeight;y.setStyle(this.$highlightElement.style,"height",c.lineHeight+"px"),y.setStyle(this.$highlightElement.style,"top",C+"px")}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var c=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),f=this.oldLastRow;if(this.oldLastRow=c,!i||f<e.firstRow)return this.update(e);if(c<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var g=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);g>0;g--)this.$lines.shift();if(f>c)for(var g=this.session.getFoldedRowCount(c+1,f);g>0;g--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,i.firstRow-1)),c>f&&this.$lines.push(this.$renderLines(e,f+1,c)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,i,c){for(var f=[],g=i,k=this.session.getNextFoldLine(g),$=k?k.start.row:1/0;g>$&&(g=k.end.row+1,k=this.session.getNextFoldLine(g,k),$=k?k.start.row:1/0),!(g>c);){var C=this.$lines.createCell(g,e,this.session,n);this.$renderCell(C,e,k,g),f.push(C),g++}return f},t.prototype.$renderCell=function(e,i,c,f){var g=e.element,k=this.session,$=g.childNodes[0],C=g.childNodes[1],b=g.childNodes[2],T=g.childNodes[3],L=b.firstChild,A=k.$firstLineNumber,S=k.$breakpoints,I=k.$decorations,E=k.gutterRenderer||this.$renderer,x=this.$showFoldWidgets&&k.foldWidgets,v=c?c.start.row:Number.MAX_VALUE,m=i.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",R=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",O=(E?E.getText(k,f):f+A).toString();if(this.$highlightGutterLine&&(f==this.$cursorRow||c&&f<this.$cursorRow&&f>=v&&this.$cursorRow<=c.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),S[f]&&(_+=S[f]),I[f]&&(_+=I[f]),this.$annotations[f]&&f!==v&&(_+=this.$annotations[f].className),x){var D=x[f];D==null&&(D=x[f]=k.getFoldWidget(f))}if(D){var N="ace_fold-widget ace_"+D,P=D=="start"&&f==v&&f<c.end.row;if(P){N+=" ace_closed";for(var U="",F=!1,W=f+1;W<=c.end.row;W++)if(this.$annotations[W]){if(this.$annotations[W].className===" ace_error"){F=!0,U=" ace_error_fold";break}this.$annotations[W].className===" ace_security"?(F=!0,U=" ace_security_fold"):this.$annotations[W].className===" ace_warning"&&U!==" ace_security_fold"&&(F=!0,U=" ace_warning_fold")}_+=U}else N+=" ace_open";C.className!=N&&(C.className=N),y.setStyle(C.style,"height",m),y.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var B=k.getFoldWidgetRange(f);B?C.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[B.start.row+1,B.end.row+1])):c?C.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[c.start.row+1,c.end.row+1])):C.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[f+1])),P?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else C&&(y.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));var H=this.session.$gutterCustomWidgets[f];if(H?this.$addCustomWidget(f,H,e):T&&this.$removeCustomWidget(f,e),F&&this.$showFoldedAnnotations){b.className="ace_gutter_annotation",L.className=R,L.className+=U,y.setStyle(L.style,"height",m),y.setStyle(b.style,"display","block"),y.setStyle(b.style,"height",m);var V;switch(U){case" ace_error_fold":V=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[O]);break;case" ace_security_fold":V=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[O]);break;case" ace_warning_fold":V=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[O]);break}b.setAttribute("aria-label",V),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else if(this.$annotations[f]){b.className="ace_gutter_annotation",L.className=R,this.$useSvgGutterIcons?L.className+=this.$annotations[f].className:g.classList.add(this.$annotations[f].className.replace(" ","")),y.setStyle(L.style,"height",m),y.setStyle(b.style,"display","block"),y.setStyle(b.style,"height",m);var V;switch(this.$annotations[f].className){case" ace_error":V=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[O]);break;case" ace_security":V=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[O]);break;case" ace_warning":V=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[O]);break;case" ace_info":V=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[O]);break;case" ace_hint":V=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[O]);break}b.setAttribute("aria-label",V),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else y.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0");return O!==$.data&&($.data=O),g.className!=_&&(g.className=_),y.setStyle(e.element.style,"height",this.$lines.computeLineHeight(f,i,k)+"px"),y.setStyle(e.element.style,"top",this.$lines.computeLineTop(f,i,k)+"px"),e.text=O,b.style.display==="none"&&C.style.display==="none"&&!H?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?y.addCssClass(this.element,"ace_folding-enabled"):y.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,i){var c=i||this.$getGutterCell(e);if(c&&c.element){var f=c.element.childNodes[1];f&&y.setStyle(f.style,"display","none")}},t.prototype.$showFoldWidget=function(e,i){var c=i||this.$getGutterCell(e);if(c&&c.element){var f=c.element.childNodes[1];f&&this.session.foldWidgets&&this.session.foldWidgets[c.row]&&y.setStyle(f.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var i=this.$lines.cells,c=0,f=i.length-1;if(!(e<i[0].row||e>i[f].row)){for(;c<=f;){var g=Math.floor((c+f)/2),k=i[g];if(k.row>e)f=g-1;else if(k.row<e)c=g+1;else return k}return k}},t.prototype.$addCustomWidget=function(e,i,c){var f=i.className,g=i.label,k=i.title,$=i.callbacks;this.session.$gutterCustomWidgets[e]={className:f,label:g,title:k,callbacks:$},this.$hideFoldWidget(e,c);var C=c||this.$getGutterCell(e);if(C&&C.element){var b=C.element.querySelector(".ace_custom-widget");b&&b.remove(),b=y.createElement("span"),b.className="ace_custom-widget ".concat(f),b.setAttribute("tabindex","-1"),b.setAttribute("role","button"),b.setAttribute("aria-label",g),b.setAttribute("title",k),y.setStyle(b.style,"display","inline-block"),y.setStyle(b.style,"height","inherit"),$&&$.onClick&&b.addEventListener("click",function(T){$.onClick(T,e),T.stopPropagation()}),C.element.appendChild(b)}},t.prototype.$removeCustomWidget=function(e,i){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,i);var c=i||this.$getGutterCell(e);if(c&&c.element){var f=c.element.querySelector(".ace_custom-widget");f&&c.element.removeChild(f)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=y.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var i=this.$padding||this.$computePadding(),c=this.element.getBoundingClientRect();if(e.x<i.left+c.left)return"markers";if(this.$showFoldWidgets&&e.x>c.right-i.right)return"foldWidgets"},t})();s.prototype.$fixedWidth=!1,s.prototype.$highlightGutterLine=!0,s.prototype.$renderer=void 0,s.prototype.$showLineNumbers=!0,s.prototype.$showFoldWidgets=!0,p.implement(s.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var i=y.createElement("span");t.appendChild(i);var c=y.createElement("span");t.appendChild(c);var f=y.createElement("span");return c.appendChild(f),t}d.Gutter=s}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(l,d,M){var y=l("../range").Range,p=l("../lib/dom"),w=(function(){function u(r){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return u.prototype.setPadding=function(r){this.$padding=r},u.prototype.setSession=function(r){this.session=r},u.prototype.setMarkers=function(r){this.markers=r},u.prototype.elt=function(r,s){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=s,n.className=r},u.prototype.update=function(r){if(r){this.config=r,this.element.style.display="none",this.i=0;var s;for(var n in this.markers){var t=this.markers[n];if(!t.range){t.update(s,this,this.session,r);continue}var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var i=this.$getTop(e.start.row,r),c=this.$padding+r.fontMetrics.textWidth(e.start.row,e.start.column);t.renderer(s,e,c,i,r)}else t.type=="fullLine"?this.drawFullLineMarker(s,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(s,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(s,e,t.clazz,r):this.drawMultiLineMarker(s,e,t.clazz,r):this.drawSingleLineMarker(s,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild);this.element.style.display=""}},u.prototype.$getTop=function(r,s){return(r-s.firstRowScreen)*s.lineHeight},u.prototype.drawTextMarker=function(r,s,n,t,e){for(var i=this.session,c=s.start.row,f=s.end.row,g=c,k=0,$=0,C=i.getScreenLastRowColumn(g),b=new y(g,s.start.column,g,$);g<=f;g++)b.start.row=b.end.row=g,b.start.column=g==c?s.start.column:i.getRowWrapIndent(g),b.end.column=C,k=$,$=C,C=g+1<f?i.getScreenLastRowColumn(g+1):g==f?0:s.end.column,this.drawSingleLineMarker(r,b,n+(g==c?" ace_start":"")+" ace_br"+a(g==c||g==c+1&&s.start.column,k<$,$>C,g==f),t,g==f?0:1,e)},u.prototype.drawMultiLineMarker=function(r,s,n,t,e){var i=this.$padding,c=t.lineHeight,f=this.$getTop(s.start.row,t),g=i+t.fontMetrics.textWidth(s.start.row,s.start.column);if(e=e||"",this.session.$bidiHandler.isBidiRow(s.start.row)){var k=s.clone();k.end.row=k.start.row,k.end.column=Number.MAX_VALUE,this.drawBidiSingleLineMarker(r,k,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+c+"px;right:"+i+"px;top:"+f+"px;left:"+g+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(s.end.row)){var k=s.clone();k.start.row=k.end.row,k.start.column=0,this.drawBidiSingleLineMarker(r,k,n+" ace_br12",t,null,e)}else{f=this.$getTop(s.end.row,t);var $=t.fontMetrics.textWidth(s.end.row,s.end.column);this.elt(n+" ace_br12","height:"+c+"px;width:"+$+"px;top:"+f+"px;left:"+i+"px;"+(e||""))}if(c=(s.end.row-s.start.row-1)*t.lineHeight,!(c<=0)){f=this.$getTop(s.start.row+1,t);var C=(s.start.column?1:0)|(s.end.column?0:8);this.elt(n+(C?" ace_br"+C:""),"height:"+c+"px;right:"+i+"px;top:"+f+"px;left:"+i+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(r,s,n,t,e,i){if(this.session.$bidiHandler.isBidiRow(s.start.row))return this.drawBidiSingleLineMarker(r,s,n,t,e,i);var c=t.lineHeight,f=t.fontMetrics.textWidth(s.start.row,s.end.column)+(e||0)*t.characterWidth,g=this.$getTop(s.start.row,t),k=t.fontMetrics.textWidth(s.start.row,s.start.column);this.elt(n,"height:"+c+"px;width:"+(f-k)+"px;top:"+g+"px;left:"+(this.$padding+k)+"px;"+(i||""))},u.prototype.drawBidiSingleLineMarker=function(r,s,n,t,e,i){var c=t.lineHeight,f=this.$getTop(s.start.row,t),g=this.$padding,k=this.config.fontMetrics.getRects(s.start,s.end);k.forEach(function($){this.elt(n,"height:"+c+"px;width:"+($.width+(e||0))+"px;top:"+f+"px;left:"+(g+$.left)+"px;"+(i||""))},this)},u.prototype.drawFullLineMarker=function(r,s,n,t,e){var i=this.$getTop(s.start.row,t),c=t.lineHeight;s.start.row!=s.end.row&&(c+=this.$getTop(s.end.row,t)-i),this.elt(n,"height:"+c+"px;top:"+i+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(r,s,n,t,e){var i=this.$getTop(s.start.row,t),c=t.lineHeight;this.elt(n,"height:"+c+"px;top:"+i+"px;left:0;right:0;"+(e||""))},u})();w.prototype.$padding=0;function a(u,r,s,n){return(u?1:0)|(r?2:0)|(s?4:0)|(n?8:0)}d.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(l,d,M){var y=new Set(["text","rparen","lparen"]);d.isTextToken=function(p){return y.has(p)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(l,d,M){var y=l("../lib/oop"),p=l("../lib/dom"),w=l("../lib/lang"),a=l("./lines").Lines,u=l("../lib/event_emitter").EventEmitter,r=l("../config").nls,s=l("./text_util").isTextToken,n=(function(){function t(e){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==`
|
|
213
|
+
`&&e.getNewLineMode()!="windows",c=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var i=this.$tabStrings=[0],c=1;c<e+1;c++)if(this.showTabs){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_tab",f.textContent=w.stringRepeat(this.TAB_CHAR,c),i.push(f)}else i.push(this.dom.createTextNode(w.stringRepeat(" ",c),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var g="ace_indent-guide",k=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):$,f=this.dom.createElement("span");f.className=g+k,f.textContent=$,this.$tabStrings[" "]=f;var f=this.dom.createElement("span");f.className=g+C,f.textContent=b,this.$tabStrings[" "]=f}},t.prototype.updateLines=function(e,i,c){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var f=Math.max(i,e.firstRow),g=Math.min(c,e.lastRow),k=this.element.childNodes,$=0,b=e.firstRow;b<f;b++){var T=this.session.getFoldLine(b);if(T)if(T.containsRow(f)){f=T.start.row;break}else b=T.end.row;$++}for(var C=!1,b=f,T=this.session.getNextFoldLine(b),L=T?T.start.row:1/0;b>L&&(b=T.end.row+1,T=this.session.getNextFoldLine(b,T),L=T?T.start.row:1/0),!(b>g);){var A=k[$++];if(A){this.dom.removeChildren(A),this.$renderLine(A,b,b==L?T:!1),C&&(A.style.top=this.$lines.computeLineTop(b,e,this.session)+"px");var S=e.lineHeight*this.session.getRowLength(b)+"px";A.style.height!=S&&(C=!0,A.style.height=S)}b++}if(C)for(;$<this.$lines.cells.length;){var I=this.$lines.cells[$++];I.element.style.top=this.$lines.computeLineTop(I.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var c=e.lastRow,f=i?i.lastRow:-1;if(!i||f<e.firstRow)return this.update(e);if(c<i.firstRow)return this.update(e);if(!i||i.lastRow<e.firstRow)return this.update(e);if(e.lastRow<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var g=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);g>0;g--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var g=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);g>0;g--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,i.firstRow-1)),e.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,i,c){for(var f=[],g=i,k=this.session.getNextFoldLine(g),$=k?k.start.row:1/0;g>$&&(g=k.end.row+1,k=this.session.getNextFoldLine(g,k),$=k?k.start.row:1/0),!(g>c);){var C=this.$lines.createCell(g,e,this.session),b=C.element;this.dom.removeChildren(b),p.setStyle(b.style,"height",this.$lines.computeLineHeight(g,e,this.session)+"px"),p.setStyle(b.style,"top",this.$lines.computeLineTop(g,e,this.session)+"px"),this.$renderLine(b,g,g==$?k:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",f.push(C),g++}return f},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,c=e.lastRow,f=this.$lines;f.getLength();)f.pop();f.push(this.$renderLinesFragment(e,i,c))},t.prototype.$renderToken=function(e,i,c,f){for(var g=this,k=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200C\u200E\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+)/g,$=this.dom.createFragment(this.element),C,b=0;C=k.exec(f);){var T=C[1],L=C[2],A=C[3],S=C[4];if(!(!g.showSpaces&&L)){var I=b!=C.index?f.slice(b,C.index):"";if(b=C.index+C[0].length,I&&$.appendChild(this.dom.createTextNode(I,this.element)),T){var E=g.session.getScreenTabSize(i+C.index),x=g.$tabStrings[E].cloneNode(!0);x.charCount=1,$.appendChild(x),i+=E-1}else if(L)if(g.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=w.stringRepeat(g.SPACE_CHAR,L.length),$.appendChild(v)}else $.appendChild(this.dom.createTextNode(L,this.element));else if(A){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=w.stringRepeat(g.SPACE_CHAR,A.length),$.appendChild(v)}else if(S)if(g.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=w.stringRepeat(g.CJK_SPACE_CHAR,S.length),$.appendChild(v)}else $.appendChild(this.dom.createTextNode(S,this.element))}}var m=b?f.slice(b):f;if(m.length>256)for(var _=0;_<m.length;)$.appendChild(this.dom.createTextNode(m.slice(_,_+=256),this.element));else $.appendChild(this.dom.createTextNode(m,this.element));if(s(c.type))e.appendChild($);else{var R="ace_"+c.type.replace(/\./g," ace_"),v=this.dom.createElement("span");c.type=="fold"&&(v.style.width=c.value.length*this.config.characterWidth+"px",v.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),v.className=R,v.appendChild($),e.appendChild(v)}return i+f.length},t.prototype.renderIndentGuide=function(e,i,c){var f=i.search(this.$indentGuideRe);if(f<=0||f>=c)return i;if(i[0]==" "){f-=f%this.tabSize;for(var g=f/this.tabSize,k=0;k<g;k++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(f)}else if(i[0]==" "){for(var k=0;k<f;k++){var $=this.$tabStrings[" "].cloneNode(!0);$.charCount=1,e.appendChild($)}return this.$highlightIndentGuide(),i.substr(f)}return this.$highlightIndentGuide(),i},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var i=this.session.selection.getCursor(),c=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,f=Math.floor(c/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:f,start:i.row};var g=this.session.$bracketHighlight;if(g){for(var k=this.session.$bracketHighlight.ranges,$=0;$<k.length;$++)if(i.row!==k[$].start.row){this.$highlightIndentGuideMarker.end=k[$].start.row+1,i.row>k[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[i.row]!==""&&i.column===e[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=i.row+1;$<e.length;$++){var C=e[$],b=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=$,b<=c))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<e.length;i++)e[i].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,i){var c=this.session.doc.getLine(e.row);if(c!==""){var f=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)f=e.element.childNodes[0];else return;var g=f.childNodes;if(g){var k=g[i-1];k&&k.classList&&k.classList.contains("ace_indent-guide")&&k.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var c=0;c<e.length;c++){var f=e[c];if(this.$highlightIndentGuideMarker.end&&f.row>=this.$highlightIndentGuideMarker.start+1){if(f.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,i)}}else for(var c=e.length-1;c>=0;c--){var f=e[c];if(this.$highlightIndentGuideMarker.end&&f.row<this.$highlightIndentGuideMarker.start){if(f.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,i)}}}},t.prototype.$createLineElement=function(e){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},t.prototype.$renderWrappedLine=function(e,i,c){var f=0,g=0,k=c[0],$=0,C=this.$createLineElement();e.appendChild(C);for(var b=0;b<i.length;b++){var T=i[b],L=T.value;if(b==0&&this.displayIndentGuides){if(f=L.length,L=this.renderIndentGuide(C,L,k),!L)continue;f-=L.length}if(f+L.length<k)$=this.$renderToken(C,$,T,L),f+=L.length;else{for(;f+L.length>=k;){$=this.$renderToken(C,$,T,L.substring(0,k-f)),L=L.substring(k-f),f=k,C=this.$createLineElement(),e.appendChild(C);var A=this.dom.createTextNode(w.stringRepeat(" ",c.indent),this.element);A.charCount=0,C.appendChild(A),g++,$=0,k=c[g]||Number.MAX_VALUE}L.length!=0&&(f+=L.length,$=this.$renderToken(C,$,T,L))}}c[c.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,$,null,"",!0)},t.prototype.$renderSimpleLine=function(e,i){for(var c=0,f=0;f<i.length;f++){var g=i[f],k=g.value;if(!(f==0&&this.displayIndentGuides&&(k=this.renderIndentGuide(e,k),!k))){if(c+k.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,c,g,k);c=this.$renderToken(e,c,g,k)}}},t.prototype.$renderOverflowMessage=function(e,i,c,f,g){c&&this.$renderToken(e,i,c,f.slice(0,this.MAX_LINE_LENGTH-i));var k=this.dom.createElement("span");k.className="ace_inline_button ace_keyword ace_toggle_wrap",k.textContent=g?"<hide>":"<click to see more...>",e.appendChild(k)},t.prototype.$renderLine=function(e,i,c){if(!c&&c!=!1&&(c=this.session.getFoldLine(i)),c)var f=this.$getFoldLineTokens(i,c);else var f=this.session.getTokens(i);var g=e;if(f.length){var k=this.session.getRowSplitData(i);if(k&&k.length){this.$renderWrappedLine(e,f,k);var g=e.lastChild}else{var g=e;this.$useLineGroups()&&(g=this.$createLineElement(),e.appendChild(g)),this.$renderSimpleLine(g,f)}}else this.$useLineGroups()&&(g=this.$createLineElement(),e.appendChild(g));if(this.showEOL&&g){c&&(i=c.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,g.appendChild($)}},t.prototype.$getFoldLineTokens=function(e,i){var c=this.session,f=[];function g($,C,b){for(var T=0,L=0;L+$[T].value.length<C;)if(L+=$[T].value.length,T++,T==$.length)return;if(L!=C){var A=$[T].value.substring(C-L);A.length>b-C&&(A=A.substring(0,b-C)),f.push({type:$[T].type,value:A}),L=C+A.length,T+=1}for(;L<b&&T<$.length;){var A=$[T].value;A.length+L>b?f.push({type:$[T].type,value:A.substring(0,b-L)}):f.push($[T]),L+=A.length,T+=1}}var k=c.getTokens(e);return i.walk(function($,C,b,T,L){$!=null?f.push({type:"fold",value:$}):(L&&(k=c.getTokens(C)),k.length&&g(k,T,b))},i.end.row,this.session.getLine(i.end.row).length),f},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t})();n.prototype.EOF_CHAR="¶",n.prototype.EOL_CHAR_LF="¬",n.prototype.EOL_CHAR_CRLF="¤",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="—",n.prototype.SPACE_CHAR="·",n.prototype.CJK_SPACE_CHAR="・",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,y.implement(n.prototype,u),d.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(l,d,M){var y=l("../lib/dom"),p=(function(){function w(a){this.element=y.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),y.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(a){for(var u=this.cursors,r=u.length;r--;)y.setStyle(u[r].style,"opacity",a?"":"0")},w.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&y.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,y.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(a){this.$padding=a},w.prototype.setSession=function(a){this.session=a},w.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},w.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},w.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,y.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var a=y.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},w.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},w.prototype.hideCursor=function(){this.isVisible=!1,y.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,y.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,y.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&y.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),y.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},w.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0,width:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),s=this.config.fontMetrics.textWidth(r.row,r.column),n=this.$padding+s,t=(r.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight,e=this.config.fontMetrics.textWidth(r.row,r.column+1)-s;return{left:n,top:t,width:Math.abs(e)||this.config.characterWidth}},w.prototype.isCursorInView=function(a,u){return a.top>=0&&a.top<u.maxHeight},w.prototype.update=function(a){this.config=a;var u=this.session.$selectionMarkers,r=0,s=0;(u===void 0||u.length===0)&&(u=[{cursor:null}]);for(var r=0,n=u.length;r<n;r++){var t=this.getPixelPosition(u[r].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[s++]||this.addCursor(),i=e.style;this.drawCursor?this.drawCursor(e,t,a,u[r],this.session):this.isCursorInView(t,a)?(y.setStyle(i,"display","block"),y.translate(e,t.left,t.top),y.setStyle(i,"width",Math.round(t.width)+"px"),y.setStyle(i,"height",a.lineHeight+"px")):y.setStyle(i,"display","none")}}for(;this.cursors.length>s;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=t,this.restartTimer()},w.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?y.addCssClass(this.element,"ace_overwrite-cursors"):y.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();p.prototype.$padding=0,p.prototype.drawCursor=null,d.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(l,d,M){var y=this&&this.__extends||(function(){var e=function(i,c){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,g){f.__proto__=g}||function(f,g){for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(f[k]=g[k])},e(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");e(i,c);function f(){this.constructor=i}i.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})(),p=l("./lib/oop"),w=l("./lib/dom"),a=l("./lib/event"),u=l("./lib/event_emitter").EventEmitter,r=32768,s=(function(){function e(i,c){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.element.tabIndex=-1,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},e})();p.implement(s.prototype,u);var n=(function(e){y(i,e);function i(c,f){var g=e.call(this,c,"-v")||this;return g.scrollTop=0,g.scrollHeight=0,f.$scrollbarWidth=g.width=w.scrollbarWidth(c.ownerDocument),g.inner.style.width=g.element.style.width=(g.width||15)+5+"px",g.$minWidth=0,g}return i.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(c){this.element.style.height=c+"px"},i.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>r?(this.coeff=r/c,c=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=c+"px"},i.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff)},i})(s);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=(function(e){y(i,e);function i(c,f){var g=e.call(this,c,"-h")||this;return g.scrollLeft=0,g.height=f.$scrollbarWidth,g.inner.style.height=g.element.style.height=(g.height||15)+5+"px",g}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(c){this.element.style.width=c+"px"},i.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px"},i.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px"},i.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c)},i})(s);d.ScrollBar=n,d.ScrollBarV=n,d.ScrollBarH=t,d.VScrollBar=n,d.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(l,d,M){var y=this&&this.__extends||(function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(c[g]=f[g])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function c(){this.constructor=e}e.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}})(),p=l("./lib/oop"),w=l("./lib/dom"),a=l("./lib/event"),u=l("./lib/event_emitter").EventEmitter;w.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
214
|
+
position: absolute;
|
|
215
|
+
background: rgba(128, 128, 128, 0.6);
|
|
216
|
+
-moz-box-sizing: border-box;
|
|
217
|
+
box-sizing: border-box;
|
|
218
|
+
border: 1px solid #bbb;
|
|
219
|
+
border-radius: 2px;
|
|
220
|
+
z-index: 8;
|
|
221
|
+
}
|
|
222
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
223
|
+
position: absolute;
|
|
224
|
+
z-index: 6;
|
|
225
|
+
background: none;
|
|
226
|
+
overflow: hidden!important;
|
|
227
|
+
}
|
|
228
|
+
.ace_editor>.ace_sb-v {
|
|
229
|
+
z-index: 6;
|
|
230
|
+
right: 0;
|
|
231
|
+
top: 0;
|
|
232
|
+
width: 12px;
|
|
233
|
+
}
|
|
234
|
+
.ace_editor>.ace_sb-v div {
|
|
235
|
+
z-index: 8;
|
|
236
|
+
right: 0;
|
|
237
|
+
width: 100%;
|
|
238
|
+
}
|
|
239
|
+
.ace_editor>.ace_sb-h {
|
|
240
|
+
bottom: 0;
|
|
241
|
+
left: 0;
|
|
242
|
+
height: 12px;
|
|
243
|
+
}
|
|
244
|
+
.ace_editor>.ace_sb-h div {
|
|
245
|
+
bottom: 0;
|
|
246
|
+
height: 100%;
|
|
247
|
+
}
|
|
248
|
+
.ace_editor>.ace_sb_grabbed {
|
|
249
|
+
z-index: 8;
|
|
250
|
+
background: #000;
|
|
251
|
+
}`,"ace_scrollbar.css",!1);var r=(function(){function t(e,i){this.element=w.createElement("div"),this.element.className="ace_sb"+i,this.inner=w.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t})();p.implement(r.prototype,u);var s=(function(t){y(e,t);function e(i,c){var f=t.call(this,i,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,f.parent=i,f.width=f.VScrollWidth,f.renderer=c,f.inner.style.width=f.element.style.width=(f.width||15)+"px",f.$minWidth=0,f}return e.prototype.onMouseDown=function(i,c){if(i==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var f=this,g=c.clientY,k=function(S){g=S.clientY},$=function(){clearInterval(L)},C=c.clientY,b=this.thumbTop,T=function(){if(g!==void 0){var S=f.scrollTopFromThumbTop(b+g-C);S!==f.scrollTop&&f._emit("scroll",{data:S})}};a.capture(this.inner,k,$);var L=setInterval(T,20);return a.preventDefault(c)}var A=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),a.preventDefault(c)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(i){var c=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return c=c>>0,c<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(i,c){this.pageHeight===i&&!c||(this.pageHeight=i,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})))},e.prototype.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(r);s.prototype.setInnerHeight=s.prototype.setScrollHeight;var n=(function(t){y(e,t);function e(i,c){var f=t.call(this,i,"-h")||this;return f.scrollLeft=0,f.scrollWidth=0,f.height=f.HScrollHeight,f.inner.style.height=f.element.style.height=(f.height||12)+"px",f.renderer=c,f}return e.prototype.onMouseDown=function(i,c){if(i==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var f=this,g=c.clientX,k=function(S){g=S.clientX},$=function(){clearInterval(L)},C=c.clientX,b=this.thumbLeft,T=function(){if(g!==void 0){var S=f.scrollLeftFromThumbLeft(b+g-C);S!==f.scrollLeft&&f._emit("scroll",{data:S})}};a.capture(this.inner,k,$);var L=setInterval(T,20);return a.preventDefault(c)}var A=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),a.preventDefault(c)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(i){var c=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return c=c>>0,c<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},e.prototype.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(i,c){this.pageWidth===i&&!c||(this.pageWidth=i,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})))},e.prototype.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(r);n.prototype.setInnerWidth=n.prototype.setScrollWidth,d.ScrollBar=s,d.ScrollBarV=s,d.ScrollBarH=n,d.VScrollBar=s,d.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(l,d,M){var y=l("./lib/event"),p=(function(){function w(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var r=this;this._flush=function(s){r.pending=!1;var n=r.changes;if(n&&(y.blockIdle(100),r.changes=0,r.onRender(n)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return w.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(y.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},w})();d.RenderLoop=p}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/event_emitter"],function(l,d,M){var y=this&&this.__read||function(L,A){var S=typeof Symbol=="function"&&L[Symbol.iterator];if(!S)return L;var I=S.call(L),E,x=[],v;try{for(;(A===void 0||A-- >0)&&!(E=I.next()).done;)x.push(E.value)}catch(m){v={error:m}}finally{try{E&&!E.done&&(S=I.return)&&S.call(I)}finally{if(v)throw v.error}}return x},p=l("../lib/oop"),w=l("../lib/dom"),a=l("../lib/lang"),u=l("../lib/event"),r=l("../lib/event_emitter").EventEmitter,s=512,n=typeof ResizeObserver=="function",t=200,e=(function(){function L(A,S,I){this.config={characterWidth:1},this.$characterSize={width:0,height:0},this.textLayer=S,this.renderer=I,this.el=w.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=w.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=w.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),A.appendChild(this.el),this.$measureNode.textContent=a.stringRepeat("X",s),n?this.$addObserver():this.checkForSizeChanges(),this.textLayer.$setFontMetrics(this),this.$scratchRange=document.createRange()}return L.prototype.$setMeasureNodeStyles=function(A,S){A.width=A.height="auto",A.left=A.top="0px",A.visibility="hidden",A.position="absolute",A.whiteSpace="pre",A.font="inherit",A.overflow=S?"hidden":"visible"},L.prototype.checkForSizeChanges=function(A){if(A===void 0&&(A=this.$measureSizes()),A&&(this.$characterSize.width!==A.width||this.$characterSize.height!==A.height)){this.$measureNode.style.fontWeight="bold";var S=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=A,this.charSizes=Object.create(null),this.allowBoldFonts=S&&S.width===A.width&&S.height===A.height,this._emit("changeCharacterSize",{data:A})}},L.prototype.$addObserver=function(){var A=this;this.$observer=new window.ResizeObserver(function(S){A.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},L.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var A=this;return this.$pollSizeChangesTimer=u.onIdle(function S(){A.checkForSizeChanges(),u.onIdle(S,500)},500)},L.prototype.setPolling=function(A){A?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},L.prototype.$measureSizes=function(A){var S={height:(A||this.$measureNode).clientHeight,width:(A||this.$measureNode).clientWidth/s};return S.width===0||S.height===0?null:S},L.prototype.$measureCharWidth=function(A){this.$main.textContent=a.stringRepeat(A,s);var S=this.$main.getBoundingClientRect();return S.width/s},L.prototype.getCharacterWidth=function(A){var S=this.charSizes[A];return S===void 0&&(S=this.charSizes[A]=this.$measureCharWidth(A)/this.$characterSize.width),S},L.prototype.getTextWidth=function(A){return A?(this.$main.textContent=A,this.$main.clientWidth):0},L.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},L.prototype.$initTransformMeasureNodes=function(){var A=function(S,I){return["div",{style:"position: absolute;left:"+S+"px;top:"+I+"px;"}]};this.els=w.buildDom([A(0,0),A(t,0),A(0,t),A(t,t)],this.el)},L.prototype.getTransform=function(){if(this.config.$transformData)return this.config.$transformData;this.els||this.$initTransformMeasureNodes();function A(N){var P=N.getBoundingClientRect();return[P.left,P.top]}var S=A(this.els[0]),I=A(this.els[1]),E=A(this.els[2]),x=A(this.els[3]),v=c(f(x,I),f(x,E),f(g(I,E),g(x,S))),m=k((1+v[0])/t,f(I,S)),_=k((1+v[1])/t,f(E,S)),R=[m[0],_[0],0,m[1],_[1],0,v[0]/t,v[1]/t,1],O=1/(R[0]*R[4]-R[3]*R[1]),D=[R[4]*O,-R[1]*O,0,-R[3]*O,R[0]*O,0,(R[3]*R[7]-R[4]*R[6])*O,(R[1]*R[6]-R[0]*R[7])*O,1];return this.config.$transformData={M:R,MInv:D,t:S},this.config.$transformData},L.prototype.transformCoordinates=function(A,S){this.config.$transformData||this.getTransform();var I=this.config.$transformData;return S?g(C(I.M,S[0],S[1]),I.t):C(I.MInv,A[0]-I.t[0],A[1]-I.t[1])},L.prototype.recoverRect=function(A,S){var I=A.M,E=Math.abs(I[6])<1e-10&&Math.abs(I[7])<1e-10,x=S.left,v=S.top,m=S.width,_=S.height;if(x-=A.t[0],v-=A.t[1],E){var R=y(I,6),O=R[0],D=R[1],N=R[2],P=R[3],U=R[4],F=R[5],W=[Math.abs(O),Math.abs(D),Math.abs(P),Math.abs(U)],B=W[0]*W[3]-W[2]*W[1],H=void 0,V=void 0;Math.abs(B)<1e-10?(V=this.config&&this.config.lineHeight||0,H=(m-W[1]*V)/W[0]):(H=(W[3]*m-W[1]*_)/B,V=(-W[2]*m+W[0]*_)/B);var G=O*U-D*P,Y=x+m/2-N,Q=v+_/2-F,ne=(U*Y-D*Q)/G,q=(-P*Y+O*Q)/G;return{left:ne-H/2,top:q-V/2,width:H,height:V,right:ne+H/2,bottom:q+V/2}}return $(A,S)},L.prototype.$findElementForScreenRow=function(A){var S=this.textLayer;if(!this.config)return null;var I=S.$lines.$getCellByScreenRow(A,this.config),E=I&&I.cell.element;if(E&&S.$useLineGroups()){var x=Math.floor(I.offset/this.config.lineHeight);E=E.children[Math.max(x,0)]}return E},L.prototype.textWidth=function(A,S){var I=this.$findElementForScreenRow(A);return!I||!document.createRange?S*this.config.characterWidth:this.$measureLineToColumn(I,S)},L.prototype.$measureLineToColumn=function(A,S){var I=this.textLayer;try{var E=this.$findColumnPosition(A,S);if(!E)return S*this.config.characterWidth;this.$scratchRange.setStart(E.node,E.offset),this.$scratchRange.setEnd(E.node,E.offset);var x=this.$scratchRange.getBoundingClientRect();if(this.renderer.$hasCssTransforms){var v=this.getTransform(),m=this.recoverRect(v,x),_=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft;return m.left-_+E.overflow*this.config.characterWidth}var R=I.element.getBoundingClientRect();return x.left-R.left+E.overflow*this.config.characterWidth}catch(O){return console.error("Error measuring text width:",O),S*this.config.characterWidth}},L.prototype.$findColumnPosition=function(A,S){for(var I=document.createTreeWalker(A,NodeFilter.SHOW_TEXT,null),E=0,x,v;x=I.nextNode();){var m=x.nodeValue,_=m.length;if(E+_>=S)return{node:x,offset:S-E,overflow:0};E+=_,v=x}return v&&{node:v,offset:v.nodeValue.length,overflow:S-E}},L.prototype.$pixelToColumn=function(A,S,I,E,x){var v=this,m=this.$scratchRange,_=this.$findElementForScreenRow(A);if(!_||S<0)return S;var R=this.renderer.$hasCssTransforms,O=R&&this.getTransform();x&&(R?I+=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft:I+=this.textLayer.element.getBoundingClientRect().left);var D=0,N=function(F){var W=[];if(F.nodeType===Node.TEXT_NODE?(m.setStart(F,0),m.setEnd(F,F.nodeValue.length),W=Array.from(m.getClientRects())):F.nodeType===Node.ELEMENT_NODE&&(W=Array.from(F.getClientRects())),R){for(var B=[],H=0;H<W.length;H++){var V=W[H];B.push(v.recoverRect(O,V))}W=B}return W},P=this;function U(F){if(F.nodeType===Node.TEXT_NODE){for(var W=F.nodeValue.length,B=Number.MAX_VALUE,H=-1,V=void 0,G=F.nodeValue,Y=0;Y<=W;Y++)if(m.setStart(F,Y),m.setEnd(F,Y),!(Y>0&&Y<W&&/[\uDC00-\uDFFF]/.test(G.charAt(Y))&&/[\uD800-\uDBFF]/.test(G.charAt(Y-1)))){var Q=m.getBoundingClientRect();R&&(Q=P.recoverRect(O,Q));var ne=I-Q.left,q=Math.abs(ne);q<B&&(H=Y,B=q,V=ne)}return E&&V<0&&(H=Math.max(0,H-1)),D=D+H}else if(F.nodeType===Node.ELEMENT_NODE)for(var ie=F.childNodes,se=0;se<ie.length;se++){for(var ae=ie[se],ue=N(ae),Y=0;Y<ue.length;Y++){var Q=ue[Y];if(Q.left<=I&&I<=Q.left+Q.width)return U(ae),D}D+=ae.nodeType===Node.TEXT_NODE?ae.nodeValue.length:ae.textContent.length}}return U(_),D},L.prototype.getRects=function(A,S){var I=A.row,E=this.textLayer,x=this.$findElementForScreenRow(I);if(x)try{var v=this.$findColumnPosition(x,A.column),m=this.$findColumnPosition(x,S.column);if(v&&m){this.$scratchRange.setStart(v.node,v.offset),this.$scratchRange.setEnd(m.node,m.offset);var _=this.$scratchRange.getClientRects(),R=this.renderer&&this.renderer.$hasCssTransforms;if(R){for(var O=this.getTransform(),D=[],N=0;N<_.length;N++){var P=this.recoverRect(O,_[N]);P.right=P.left+P.width,D.push(P)}var U=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft,W=i(D).map(function(H){return{left:H.left-U,width:H.right-H.left}});return W}var F=E.element.getBoundingClientRect(),W=i(_).map(function(B){return{left:B.left-F.left,width:B.right-B.left}});return W}}catch(B){console.error("Error measuring text width:",B)}return[{left:A.column*this.config.characterWidth,width:(S.column-A.column)*this.config.characterWidth}]},L})();function i(L){for(var A=[],S=0;S<L.length;S++){for(var I=L[S],E=!1,x=0;x<A.length;x++){var v=A[x];if(v.left<=I.left&&I.left<=v.right||v.left<=I.right&&I.right<=v.right||I.left<=v.left&&v.right<=I.right){v.left=Math.min(v.left,I.left),v.right=Math.max(v.right,I.right),E=!0;break}}E||A.push({left:I.left,right:I.right,top:I.top,height:I.height})}return A}function c(L,A,S){var I=L[1]*A[0]-L[0]*A[1];return[(-A[1]*S[0]+A[0]*S[1])/I,(+L[1]*S[0]-L[0]*S[1])/I]}function f(L,A){return[L[0]-A[0],L[1]-A[1]]}function g(L,A){return[L[0]+A[0],L[1]+A[1]]}function k(L,A){return[L*A[0],L*A[1]]}p.implement(e.prototype,r),d.FontMetrics=e;function $(L,A){var S=A.left,I=A.top,E=A.width,x=A.height,v=L.M;S-=L.t[0],I-=L.t[1],A={left:S,top:I,width:E,height:x};for(var m=[I,S+E,I+x,S],_=[!0,!1,!0,!1],R=[[0,0],[1,0],[1,1],[0,1]],O=null,D=[27,57,23,53,43,9,10,11,14,37,31,56,40,41,47],N=-D.length;N<256;N++){var P=N<0?D[D.length+N]:N,U=[P>>0&3,P>>2&3,P>>4&3,P>>6&3],F=U.map(function(q){return R[q]}),W=F.map(function(q,ie){var se=y(q,2),ae=se[0],ue=se[1],ye=m[ie],ee=_[ie]?v.slice(3,6):v.slice(0,3),de=v.slice(6,9),Ce=ee[0]-ye*de[0],$e=ee[1]-ye*de[1];return[Ce,$e,ae*Ce,ue*$e,ye*de[2]-ee[2]]}),B=T(W),O;if(B){var H=y(B,4),V=H[0],G=H[1],Y=H[2],Q=H[3];if(Y<0&&(V+=Y,Y=-Y),Q<0&&(G+=Q,Q=-Q),b(v,V,G,Y,Q,A)){O={left:V,top:G,width:Y,height:Q,right:V+Y,bottom:G+Q,mappingIdx:N};break}}}return O||console.warn("No valid mapping found in 256 combinations."),O}var C=function(L,A,S){var I=L[6]*A+L[7]*S+L[8];return[(L[0]*A+L[1]*S+L[2])/I,(L[3]*A+L[4]*S+L[5])/I]};function b(L,A,S,I,E,x){var v=[[A,S],[A+I,S],[A+I,S+E],[A,S+E]];return v.every(function(m){var _=C(L,m[0],m[1]);return x.left-.5<=_[0]&&_[0]<=x.left+x.width+.5&&x.top-.5<=_[1]&&_[1]<=x.top+x.height+.5})}function T(L){for(var A,S=4,I=0;I<S;I++){for(var E=I,x=I+1;x<S;x++)Math.abs(L[x][I])>Math.abs(L[E][I])&&(E=x);A=y([L[E],L[I]],2),L[I]=A[0],L[E]=A[1];var v=L[I][I];if(Math.abs(v)<1e-10)return null;for(var x=I;x<=S;x++)L[I][x]/=v;for(var m=0;m<S;m++)if(m!==I)for(var _=L[m][I],x=I;x<=S;x++)L[m][x]-=_*L[I][x]}return L.map(function(R){return R[S]})}}),ace.define("ace/css/editor-css",["require","exports","module"],function(l,d,M){M.exports=`
|
|
252
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
|
253
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
|
254
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
255
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
256
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
257
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
258
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
259
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
260
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
261
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
262
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
263
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
264
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
265
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
266
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
.ace_editor {
|
|
270
|
+
position: relative;
|
|
271
|
+
overflow: hidden;
|
|
272
|
+
padding: 0;
|
|
273
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
274
|
+
direction: ltr;
|
|
275
|
+
text-align: left;
|
|
276
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
277
|
+
forced-color-adjust: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ace_scroller {
|
|
281
|
+
position: absolute;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
top: 0;
|
|
284
|
+
bottom: 0;
|
|
285
|
+
background-color: inherit;
|
|
286
|
+
-ms-user-select: none;
|
|
287
|
+
-moz-user-select: none;
|
|
288
|
+
-webkit-user-select: none;
|
|
289
|
+
user-select: none;
|
|
290
|
+
cursor: text;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ace_content {
|
|
294
|
+
position: absolute;
|
|
295
|
+
box-sizing: border-box;
|
|
296
|
+
min-width: 100%;
|
|
297
|
+
contain: style size layout;
|
|
298
|
+
font-variant-ligatures: no-common-ligatures;
|
|
299
|
+
}
|
|
300
|
+
.ace_invisible {
|
|
301
|
+
font-variant-ligatures: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ace_keyboard-focus:focus {
|
|
305
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
306
|
+
outline: none;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.ace_dragging .ace_scroller:before{
|
|
310
|
+
position: absolute;
|
|
311
|
+
top: 0;
|
|
312
|
+
left: 0;
|
|
313
|
+
right: 0;
|
|
314
|
+
bottom: 0;
|
|
315
|
+
content: '';
|
|
316
|
+
background: rgba(250, 250, 250, 0.01);
|
|
317
|
+
z-index: 1000;
|
|
318
|
+
}
|
|
319
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
|
320
|
+
background: rgba(0, 0, 0, 0.01);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.ace_gutter {
|
|
324
|
+
position: absolute;
|
|
325
|
+
overflow : hidden;
|
|
326
|
+
width: auto;
|
|
327
|
+
top: 0;
|
|
328
|
+
bottom: 0;
|
|
329
|
+
left: 0;
|
|
330
|
+
cursor: default;
|
|
331
|
+
z-index: 4;
|
|
332
|
+
-ms-user-select: none;
|
|
333
|
+
-moz-user-select: none;
|
|
334
|
+
-webkit-user-select: none;
|
|
335
|
+
user-select: none;
|
|
336
|
+
contain: style size layout;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.ace_gutter-active-line {
|
|
340
|
+
position: absolute;
|
|
341
|
+
left: 0;
|
|
342
|
+
right: 0;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ace_scroller.ace_scroll-left:after {
|
|
346
|
+
content: "";
|
|
347
|
+
position: absolute;
|
|
348
|
+
top: 0;
|
|
349
|
+
right: 0;
|
|
350
|
+
bottom: 0;
|
|
351
|
+
left: 0;
|
|
352
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
353
|
+
pointer-events: none;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
357
|
+
position: absolute;
|
|
358
|
+
top: 0;
|
|
359
|
+
left: 0;
|
|
360
|
+
right: 0;
|
|
361
|
+
padding-left: 19px;
|
|
362
|
+
padding-right: 6px;
|
|
363
|
+
background-repeat: no-repeat;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
367
|
+
margin-left: -14px;
|
|
368
|
+
float: left;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
|
372
|
+
margin-left: -19px;
|
|
373
|
+
float: left;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.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 {
|
|
377
|
+
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==");
|
|
378
|
+
background-repeat: no-repeat;
|
|
379
|
+
background-position: 2px center;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
383
|
+
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==");
|
|
384
|
+
background-repeat: no-repeat;
|
|
385
|
+
background-position: 2px center;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
389
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
390
|
+
background-repeat: no-repeat;
|
|
391
|
+
background-position: 2px center;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.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 {
|
|
395
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.ace_icon_svg.ace_error {
|
|
399
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
400
|
+
background-color: crimson;
|
|
401
|
+
}
|
|
402
|
+
.ace_icon_svg.ace_security {
|
|
403
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
404
|
+
background-color: crimson;
|
|
405
|
+
}
|
|
406
|
+
.ace_icon_svg.ace_warning {
|
|
407
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
408
|
+
background-color: darkorange;
|
|
409
|
+
}
|
|
410
|
+
.ace_icon_svg.ace_info {
|
|
411
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
412
|
+
background-color: royalblue;
|
|
413
|
+
}
|
|
414
|
+
.ace_icon_svg.ace_hint {
|
|
415
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
416
|
+
background-color: silver;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.ace_icon_svg.ace_error_fold {
|
|
420
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
421
|
+
background-color: crimson;
|
|
422
|
+
}
|
|
423
|
+
.ace_icon_svg.ace_security_fold {
|
|
424
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
425
|
+
background-color: crimson;
|
|
426
|
+
}
|
|
427
|
+
.ace_icon_svg.ace_warning_fold {
|
|
428
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
429
|
+
background-color: darkorange;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.ace_scrollbar {
|
|
433
|
+
contain: strict;
|
|
434
|
+
position: absolute;
|
|
435
|
+
right: 0;
|
|
436
|
+
bottom: 0;
|
|
437
|
+
z-index: 6;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.ace_scrollbar-inner {
|
|
441
|
+
position: absolute;
|
|
442
|
+
cursor: text;
|
|
443
|
+
left: 0;
|
|
444
|
+
top: 0;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.ace_scrollbar-v{
|
|
448
|
+
overflow-x: hidden;
|
|
449
|
+
overflow-y: scroll;
|
|
450
|
+
top: 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.ace_scrollbar-h {
|
|
454
|
+
overflow-x: scroll;
|
|
455
|
+
overflow-y: hidden;
|
|
456
|
+
left: 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.ace_print-margin {
|
|
460
|
+
position: absolute;
|
|
461
|
+
height: 100%;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ace_text-input {
|
|
465
|
+
position: absolute;
|
|
466
|
+
z-index: 0;
|
|
467
|
+
width: 0.5em;
|
|
468
|
+
height: 1em;
|
|
469
|
+
opacity: 0;
|
|
470
|
+
background: transparent;
|
|
471
|
+
-moz-appearance: none;
|
|
472
|
+
appearance: none;
|
|
473
|
+
border: none;
|
|
474
|
+
resize: none;
|
|
475
|
+
outline: none;
|
|
476
|
+
overflow: hidden;
|
|
477
|
+
font: inherit;
|
|
478
|
+
padding: 0 1px;
|
|
479
|
+
margin: 0 -1px;
|
|
480
|
+
contain: strict;
|
|
481
|
+
-ms-user-select: text;
|
|
482
|
+
-moz-user-select: text;
|
|
483
|
+
-webkit-user-select: text;
|
|
484
|
+
user-select: text;
|
|
485
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
|
486
|
+
white-space: pre!important;
|
|
487
|
+
}
|
|
488
|
+
.ace_text-input.ace_composition {
|
|
489
|
+
background: transparent;
|
|
490
|
+
color: inherit;
|
|
491
|
+
z-index: 1000;
|
|
492
|
+
opacity: 1;
|
|
493
|
+
}
|
|
494
|
+
.ace_composition_placeholder { color: transparent }
|
|
495
|
+
.ace_composition_marker {
|
|
496
|
+
border-bottom: 1px solid;
|
|
497
|
+
position: absolute;
|
|
498
|
+
border-radius: 0;
|
|
499
|
+
margin-top: 1px;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
[ace_nocontext=true] {
|
|
503
|
+
transform: none!important;
|
|
504
|
+
filter: none!important;
|
|
505
|
+
clip-path: none!important;
|
|
506
|
+
mask : none!important;
|
|
507
|
+
contain: none!important;
|
|
508
|
+
perspective: none!important;
|
|
509
|
+
mix-blend-mode: initial!important;
|
|
510
|
+
z-index: auto;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.ace_layer {
|
|
514
|
+
z-index: 1;
|
|
515
|
+
position: absolute;
|
|
516
|
+
overflow: hidden;
|
|
517
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
518
|
+
word-wrap: normal;
|
|
519
|
+
white-space: pre;
|
|
520
|
+
height: 100%;
|
|
521
|
+
width: 100%;
|
|
522
|
+
box-sizing: border-box;
|
|
523
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
524
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
|
525
|
+
pointer-events: none;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.ace_gutter-layer {
|
|
529
|
+
position: relative;
|
|
530
|
+
width: auto;
|
|
531
|
+
text-align: right;
|
|
532
|
+
pointer-events: auto;
|
|
533
|
+
height: 1000000px;
|
|
534
|
+
contain: style size layout;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.ace_text-layer {
|
|
538
|
+
font: inherit !important;
|
|
539
|
+
position: absolute;
|
|
540
|
+
height: 1000000px;
|
|
541
|
+
width: 1000000px;
|
|
542
|
+
contain: style size layout;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
546
|
+
contain: style size layout;
|
|
547
|
+
position: absolute;
|
|
548
|
+
top: 0;
|
|
549
|
+
left: 0;
|
|
550
|
+
right: 0;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.ace_hidpi .ace_text-layer,
|
|
554
|
+
.ace_hidpi .ace_gutter-layer,
|
|
555
|
+
.ace_hidpi .ace_content,
|
|
556
|
+
.ace_hidpi .ace_gutter {
|
|
557
|
+
contain: strict;
|
|
558
|
+
}
|
|
559
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
|
560
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
561
|
+
contain: strict;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.ace_cjk {
|
|
565
|
+
display: inline-block;
|
|
566
|
+
text-align: center;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.ace_cursor-layer {
|
|
570
|
+
z-index: 4;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.ace_cursor {
|
|
574
|
+
z-index: 4;
|
|
575
|
+
position: absolute;
|
|
576
|
+
box-sizing: border-box;
|
|
577
|
+
border-left: 2px solid;
|
|
578
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
579
|
+
transform: translatez(0);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.ace_multiselect .ace_cursor {
|
|
583
|
+
border-left-width: 1px;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.ace_slim-cursors .ace_cursor {
|
|
587
|
+
border-left-width: 1px;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.ace_overwrite-cursors .ace_cursor {
|
|
591
|
+
border-left-width: 0;
|
|
592
|
+
border-bottom: 1px solid;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.ace_hidden-cursors .ace_cursor {
|
|
596
|
+
opacity: 0.2;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
600
|
+
opacity: 0;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.ace_smooth-blinking .ace_cursor {
|
|
604
|
+
transition: opacity 0.18s;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.ace_animate-blinking .ace_cursor {
|
|
608
|
+
animation-duration: 1000ms;
|
|
609
|
+
animation-timing-function: step-end;
|
|
610
|
+
animation-name: blink-ace-animate;
|
|
611
|
+
animation-iteration-count: infinite;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
615
|
+
animation-duration: 1000ms;
|
|
616
|
+
animation-timing-function: ease-in-out;
|
|
617
|
+
animation-name: blink-ace-animate-smooth;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
@keyframes blink-ace-animate {
|
|
621
|
+
from, to { opacity: 1; }
|
|
622
|
+
60% { opacity: 0; }
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
@keyframes blink-ace-animate-smooth {
|
|
626
|
+
from, to { opacity: 1; }
|
|
627
|
+
45% { opacity: 1; }
|
|
628
|
+
60% { opacity: 0; }
|
|
629
|
+
85% { opacity: 0; }
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
633
|
+
position: absolute;
|
|
634
|
+
z-index: 3;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.ace_marker-layer .ace_selection {
|
|
638
|
+
position: absolute;
|
|
639
|
+
z-index: 5;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.ace_marker-layer .ace_bracket {
|
|
643
|
+
position: absolute;
|
|
644
|
+
z-index: 6;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.ace_marker-layer .ace_error_bracket {
|
|
648
|
+
position: absolute;
|
|
649
|
+
border-bottom: 1px solid #DE5555;
|
|
650
|
+
border-radius: 0;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.ace_marker-layer .ace_active-line {
|
|
654
|
+
position: absolute;
|
|
655
|
+
z-index: 2;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.ace_marker-layer .ace_selected-word {
|
|
659
|
+
position: absolute;
|
|
660
|
+
z-index: 4;
|
|
661
|
+
box-sizing: border-box;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ace_line .ace_fold {
|
|
665
|
+
box-sizing: border-box;
|
|
666
|
+
|
|
667
|
+
display: inline-block;
|
|
668
|
+
height: 11px;
|
|
669
|
+
margin-top: -2px;
|
|
670
|
+
vertical-align: middle;
|
|
671
|
+
|
|
672
|
+
background-image:
|
|
673
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
674
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
675
|
+
background-repeat: no-repeat, repeat-x;
|
|
676
|
+
background-position: center center, top left;
|
|
677
|
+
color: transparent;
|
|
678
|
+
|
|
679
|
+
border: 1px solid black;
|
|
680
|
+
border-radius: 2px;
|
|
681
|
+
|
|
682
|
+
cursor: pointer;
|
|
683
|
+
pointer-events: auto;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.ace_dark .ace_fold {
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.ace_fold:hover{
|
|
690
|
+
background-image:
|
|
691
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
692
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.ace_tooltip {
|
|
696
|
+
background-color: #f5f5f5;
|
|
697
|
+
border: 1px solid gray;
|
|
698
|
+
border-radius: 1px;
|
|
699
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
700
|
+
color: black;
|
|
701
|
+
padding: 3px 4px;
|
|
702
|
+
position: fixed;
|
|
703
|
+
z-index: 999999;
|
|
704
|
+
box-sizing: border-box;
|
|
705
|
+
cursor: default;
|
|
706
|
+
white-space: pre-wrap;
|
|
707
|
+
word-wrap: break-word;
|
|
708
|
+
line-height: normal;
|
|
709
|
+
font-style: normal;
|
|
710
|
+
font-weight: normal;
|
|
711
|
+
letter-spacing: normal;
|
|
712
|
+
pointer-events: none;
|
|
713
|
+
overflow: auto;
|
|
714
|
+
max-width: min(33em, 66vw);
|
|
715
|
+
overscroll-behavior: contain;
|
|
716
|
+
}
|
|
717
|
+
.ace_tooltip pre {
|
|
718
|
+
white-space: pre-wrap;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.ace_tooltip.ace_dark {
|
|
722
|
+
background-color: #636363;
|
|
723
|
+
color: #fff;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.ace_tooltip:focus {
|
|
727
|
+
outline: 1px solid #5E9ED6;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.ace_icon {
|
|
731
|
+
display: inline-block;
|
|
732
|
+
width: 18px;
|
|
733
|
+
vertical-align: top;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.ace_icon_svg {
|
|
737
|
+
display: inline-block;
|
|
738
|
+
width: 12px;
|
|
739
|
+
vertical-align: top;
|
|
740
|
+
-webkit-mask-repeat: no-repeat;
|
|
741
|
+
-webkit-mask-size: 12px;
|
|
742
|
+
-webkit-mask-position: center;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
746
|
+
padding-right: 13px;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.ace_fold-widget, .ace_custom-widget {
|
|
750
|
+
box-sizing: border-box;
|
|
751
|
+
|
|
752
|
+
margin: 0 -12px 0 1px;
|
|
753
|
+
display: none;
|
|
754
|
+
width: 11px;
|
|
755
|
+
vertical-align: top;
|
|
756
|
+
|
|
757
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
758
|
+
background-repeat: no-repeat;
|
|
759
|
+
background-position: center;
|
|
760
|
+
|
|
761
|
+
border-radius: 3px;
|
|
762
|
+
|
|
763
|
+
border: 1px solid transparent;
|
|
764
|
+
cursor: pointer;
|
|
765
|
+
pointer-events: auto;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.ace_custom-widget {
|
|
769
|
+
background: none;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.ace_folding-enabled .ace_fold-widget {
|
|
773
|
+
display: inline-block;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.ace_fold-widget.ace_end {
|
|
777
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
.ace_fold-widget.ace_closed {
|
|
781
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.ace_fold-widget:hover {
|
|
785
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
786
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
787
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.ace_fold-widget:active {
|
|
791
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
792
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
793
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Dark version for fold widgets
|
|
797
|
+
*/
|
|
798
|
+
.ace_dark .ace_fold-widget {
|
|
799
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
800
|
+
}
|
|
801
|
+
.ace_dark .ace_fold-widget.ace_end {
|
|
802
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
803
|
+
}
|
|
804
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
806
|
+
}
|
|
807
|
+
.ace_dark .ace_fold-widget:hover {
|
|
808
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
809
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
810
|
+
}
|
|
811
|
+
.ace_dark .ace_fold-widget:active {
|
|
812
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.ace_inline_button {
|
|
816
|
+
border: 1px solid lightgray;
|
|
817
|
+
display: inline-block;
|
|
818
|
+
margin: -1px 8px;
|
|
819
|
+
padding: 0 5px;
|
|
820
|
+
pointer-events: auto;
|
|
821
|
+
cursor: pointer;
|
|
822
|
+
}
|
|
823
|
+
.ace_inline_button:hover {
|
|
824
|
+
border-color: gray;
|
|
825
|
+
background: rgba(200,200,200,0.2);
|
|
826
|
+
display: inline-block;
|
|
827
|
+
pointer-events: auto;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.ace_fold-widget.ace_invalid {
|
|
831
|
+
background-color: #FFB4B4;
|
|
832
|
+
border-color: #DE5555;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
|
836
|
+
transition: opacity 0.4s ease 0.05s;
|
|
837
|
+
opacity: 0;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
841
|
+
transition: opacity 0.05s ease 0.05s;
|
|
842
|
+
opacity:1;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.ace_underline {
|
|
846
|
+
text-decoration: underline;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.ace_bold {
|
|
850
|
+
font-weight: bold;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.ace_nobold .ace_bold {
|
|
854
|
+
font-weight: normal;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
.ace_italic {
|
|
858
|
+
font-style: italic;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
.ace_error-marker {
|
|
863
|
+
background-color: rgba(255, 0, 0,0.2);
|
|
864
|
+
position: absolute;
|
|
865
|
+
z-index: 9;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.ace_highlight-marker {
|
|
869
|
+
background-color: rgba(255, 255, 0,0.2);
|
|
870
|
+
position: absolute;
|
|
871
|
+
z-index: 8;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.ace_mobile-menu {
|
|
875
|
+
position: absolute;
|
|
876
|
+
line-height: 1.5;
|
|
877
|
+
border-radius: 4px;
|
|
878
|
+
-ms-user-select: none;
|
|
879
|
+
-moz-user-select: none;
|
|
880
|
+
-webkit-user-select: none;
|
|
881
|
+
user-select: none;
|
|
882
|
+
background: white;
|
|
883
|
+
box-shadow: 1px 3px 2px grey;
|
|
884
|
+
border: 1px solid #dcdcdc;
|
|
885
|
+
color: black;
|
|
886
|
+
}
|
|
887
|
+
.ace_dark > .ace_mobile-menu {
|
|
888
|
+
background: #333;
|
|
889
|
+
color: #ccc;
|
|
890
|
+
box-shadow: 1px 3px 2px grey;
|
|
891
|
+
border: 1px solid #444;
|
|
892
|
+
|
|
893
|
+
}
|
|
894
|
+
.ace_mobile-button {
|
|
895
|
+
padding: 2px;
|
|
896
|
+
cursor: pointer;
|
|
897
|
+
overflow: hidden;
|
|
898
|
+
}
|
|
899
|
+
.ace_mobile-button:hover {
|
|
900
|
+
background-color: #eee;
|
|
901
|
+
opacity:1;
|
|
902
|
+
}
|
|
903
|
+
.ace_mobile-button:active {
|
|
904
|
+
background-color: #ddd;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.ace_placeholder {
|
|
908
|
+
position: relative;
|
|
909
|
+
font-family: arial;
|
|
910
|
+
transform: scale(0.9);
|
|
911
|
+
transform-origin: left;
|
|
912
|
+
white-space: pre;
|
|
913
|
+
opacity: 0.7;
|
|
914
|
+
margin: 0 10px;
|
|
915
|
+
z-index: 1;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.ace_ghost_text {
|
|
919
|
+
opacity: 0.5;
|
|
920
|
+
font-style: italic;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.ace_ghost_text_container > div {
|
|
924
|
+
white-space: pre;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
.ghost_text_line_wrapped::after {
|
|
928
|
+
content: "↩";
|
|
929
|
+
position: absolute;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
|
933
|
+
margin: 0px 4px
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
.ace_screenreader-only {
|
|
937
|
+
position:absolute;
|
|
938
|
+
left:-10000px;
|
|
939
|
+
top:auto;
|
|
940
|
+
width:1px;
|
|
941
|
+
height:1px;
|
|
942
|
+
overflow:hidden;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.ace_hidden_token {
|
|
946
|
+
display: none;
|
|
947
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(l,d,M){var y=l("../lib/dom"),p=l("../lib/oop"),w=l("../lib/event_emitter").EventEmitter,a=(function(){function u(r,s){this.renderer=s,this.pixelRatio=1,this.maxHeight=s.layerConfig.maxHeight,this.lineHeight=s.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(r)}return u.prototype.$createCanvas=function(){this.canvas=y.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},u.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},u.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var s=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var n=this.canvas.getContext("2d");function t(x,v){return x.priority<v.priority?-1:x.priority>v.priority?1:0}var e=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),e){var i={info:1,warning:2,error:3};e.forEach(function(x){x.priority=i[x.type]||null}),e=e.sort(t);for(var c=0;c<e.length;c++){var f=e[c].row,g=this.getVerticalOffsetForRow(f),k=g+this.lineHeight,$=Math.round(this.heightRatio*g),C=Math.round(this.heightRatio*k),b=Math.round(($+C)/2),T=C-b;T<this.halfMinDecorationHeight&&(T=this.halfMinDecorationHeight),b-T<0&&(b=T),b+T>this.canvasHeight&&(b=this.canvasHeight-T);var L=b-T,A=b+T,S=A-L;n.fillStyle=s[e[c].type]||null,n.fillRect(0,L,Math.round(this.oneZoneWidth-1),S)}}var I=this.renderer.session.selection.getCursor();if(I){var E=Math.round(this.getVerticalOffsetForRow(I.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,E,this.canvasWidth,2)}},u.prototype.getVerticalOffsetForRow=function(r){r=r|0;var s=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return s},u.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.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},u.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},u.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},u})();p.implement(a.prototype,w),d.Decorator=a}),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(l,d,M){var y=l("./lib/oop"),p=l("./lib/dom"),w=l("./lib/lang"),a=l("./config"),u=l("./layer/gutter").Gutter,r=l("./layer/marker").Marker,s=l("./layer/text").Text,n=l("./layer/cursor").Cursor,t=l("./scrollbar").HScrollBar,e=l("./scrollbar").VScrollBar,i=l("./scrollbar_custom").HScrollBar,c=l("./scrollbar_custom").VScrollBar,f=l("./renderloop").RenderLoop,g=l("./layer/font_metrics").FontMetrics,k=l("./lib/event_emitter").EventEmitter,$=l("./css/editor-css"),C=l("./layer/decorators").Decorator,b=l("./lib/useragent"),T=l("./layer/text_util").isTextToken;p.importCssString($,"ace_editor.css",!1);var L=(function(){function A(S,I){var E=this;this.container=S||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(I),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var x=this.$textLayer=new s(this.content);this.canvas=x.element,this.$markerFront=new r(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(v){E.$scrollAnimation||E.session.setScrollTop(v.data-E.scrollMargin.top)}),this.scrollBarH.on("scroll",function(v){E.$scrollAnimation||E.session.setScrollLeft(v.data-E.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container,this.$textLayer,this),this.$textLayer.on("changeCharacterSize",function(v){E.updateCharacterSize(),E.onResize(!0,E.gutterWidth,E.$size.width,E.$size.height),E._signal("changeCharacterSize",v)}),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,fontMetrics:this.$fontMetrics,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.$fontMetrics.config=this.layerConfig,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=!b.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(S){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=S,S&&this.scrollMargin.top&&S.getScrollTop()<=0&&S.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(S),this.$markerBack.setSession(S),this.$markerFront.setSession(S),this.$gutterLayer.setSession(S),this.$textLayer.setSession(S),S&&(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))},A.prototype.updateLines=function(S,I,E){if(I===void 0&&(I=1/0),this.$changedLines?(this.$changedLines.firstRow>S&&(this.$changedLines.firstRow=S),this.$changedLines.lastRow<I&&(this.$changedLines.lastRow=I)):this.$changedLines={firstRow:S,lastRow:I},this.$changedLines.lastRow<this.layerConfig.firstRow)if(E)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(S){S?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(S,I,E,x){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=S?1:0;var v=this.container;x||(x=v.clientHeight||v.scrollHeight),!x&&this.$maxLines&&this.lineHeight>1&&(!v.style.height||v.style.height=="0px")&&(v.style.height="1px",x=v.clientHeight||v.scrollHeight),E||(E=v.clientWidth||v.scrollWidth);var m=this.$updateCachedSize(S,I,E,x);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!E&&!x)return this.resizing=0;S&&(this.$gutterLayer.$padding=null),S?this.$renderChanges(m|this.$changes,!0):this.$loop.schedule(m|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(S,I,E,x){x-=this.$extraHeight||0;var v=0,m=this.$size,_={width:m.width,height:m.height,scrollerHeight:m.scrollerHeight,scrollerWidth:m.scrollerWidth};if(x&&(S||m.height!=x)&&(m.height=x,v|=this.CHANGE_SIZE,m.scrollerHeight=m.height,this.$horizScroll&&(m.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(m.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",v=v|this.CHANGE_SCROLL),E&&(S||m.width!=E)){v|=this.CHANGE_SIZE,m.width=E,I==null&&(I=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=I,p.setStyle(this.scrollBarH.element.style,"left",I+"px"),p.setStyle(this.scroller.style,"left",I+this.margin.left+"px"),m.scrollerWidth=Math.max(0,E-I-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var R=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",R),p.setStyle(this.scroller.style,"right",R),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(m.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||S)&&(v|=this.CHANGE_FULL)}return m.$dirty=!E||!x,v&&this._signal("resize",_),v},A.prototype.onGutterResize=function(S){var I=this.$showGutter?S:0;I!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,I,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()},A.prototype.adjustWrapLimit=function(){var S=this.$size.scrollerWidth-this.$padding*2,I=Math.floor(S/this.characterWidth);return this.session.adjustWrapLimit(I,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(S){this.setOption("animatedScroll",S)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(S){this.setOption("showInvisibles",S),this.session.$bidiHandler.setShowInvisibles(S)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(S){this.setOption("displayIndentGuides",S)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(S){this.setOption("highlightIndentGuides",S)},A.prototype.setShowPrintMargin=function(S){this.setOption("showPrintMargin",S)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(S){this.setOption("printMarginColumn",S)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(S){return this.setOption("showGutter",S)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},A.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var S=p.createElement("div");S.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",S.appendChild(this.$printMarginEl),this.content.insertBefore(S,this.content.firstChild)}var I=this.$printMarginEl.style;I.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",I.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var S=this.textarea.style,I=this.$composition;if(!this.$keepTextAreaAtCursor&&!I){p.translate(this.textarea,-100,0);return}var E=this.$cursorLayer.$pixelPos;if(E){I&&I.markerRange&&(E=this.$cursorLayer.getPixelPosition(I.markerRange.start,!0));var x=this.layerConfig,v=E.top,m=E.left;v-=x.offset;var _=I&&I.useTextareaForIME||b.isMobile?this.lineHeight:1;if(v<0||v>x.height-_){p.translate(this.textarea,0,0);return}var R=1,O=this.$size.height-_;if(!I)v+=this.lineHeight;else if(I.useTextareaForIME){var D=this.textarea.value;R=this.$fontMetrics.getTextWidth(D)+1}else v+=this.lineHeight+2;m-=this.scrollLeft,m>this.$size.scrollerWidth-R&&(m=this.$size.scrollerWidth-R),m+=this.gutterWidth+this.margin.left,p.setStyle(S,"height",_+"px"),p.setStyle(S,"width",R+"px"),p.translate(this.textarea,Math.min(m,this.$size.scrollerWidth-R),Math.min(v,O))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var S=this.layerConfig,I=S.lastRow,E=this.session.documentToScreenRow(I,0)*S.lineHeight;return E-this.session.getScrollTop()>S.height-S.lineHeight?I-1:I},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(S){this.$padding=S,this.$textLayer.setPadding(S),this.$cursorLayer.setPadding(S),this.$markerFront.setPadding(S),this.$markerBack.setPadding(S),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(S,I,E,x){var v=this.scrollMargin;v.top=S|0,v.bottom=I|0,v.right=x|0,v.left=E|0,v.v=v.top+v.bottom,v.h=v.left+v.right,v.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-v.top),this.updateFull()},A.prototype.setMargin=function(S,I,E,x){var v=this.margin;v.top=S|0,v.bottom=I|0,v.right=x|0,v.left=E|0,v.v=v.top+v.bottom,v.h=v.left+v.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(S){this.setOption("hScrollBarAlwaysVisible",S)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(S){this.setOption("vScrollBarAlwaysVisible",S)},A.prototype.$updateScrollBarV=function(){var S=this.layerConfig.maxHeight,I=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(S-=(I-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>S-I&&(S=this.scrollTop+I,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(S+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(S,I){if(this.$changes&&(S|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!S&&!I){this.$changes|=S;return}if(this.$size.$dirty)return this.$changes|=S,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",S);var E=this.layerConfig;if(S&this.CHANGE_FULL||S&this.CHANGE_SIZE||S&this.CHANGE_TEXT||S&this.CHANGE_LINES||S&this.CHANGE_SCROLL||S&this.CHANGE_H_SCROLL){if(S|=this.$computeLayerConfig()|this.$loop.clear(),E.firstRow!=this.layerConfig.firstRow&&E.firstRowScreen==this.layerConfig.firstRowScreen){var x=this.scrollTop+(E.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;x>0&&(this.scrollTop=x,S=S|this.CHANGE_SCROLL,S|=this.$computeLayerConfig()|this.$loop.clear())}E=this.layerConfig}if(S&this.CHANGE_H_SCROLL&&(this.$updateContentTransformAndSize(E,S),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),S&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(E),this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$markerBack.update(E),this.$markerFront.update(E),this.$cursorLayer.update(E),this.$updateContentTransformAndSize(E,S),this.$moveTextAreaToCursor(),this._signal("afterRender",S);return}if(S&this.CHANGE_SCROLL){this.$changedLines=null,S&this.CHANGE_TEXT||S&this.CHANGE_LINES?this.$textLayer.update(E):this.$textLayer.scrollLines(E),this.$showGutter&&(S&this.CHANGE_GUTTER||S&this.CHANGE_LINES?this.$gutterLayer.update(E):this.$gutterLayer.scrollLines(E)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$markerBack.update(E),this.$markerFront.update(E),this.$cursorLayer.update(E),this.$updateContentTransformAndSize(E,S),this.$moveTextAreaToCursor(),this._signal("afterRender",S);return}S&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(E),this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$updateContentTransformAndSize(E,S)):S&this.CHANGE_LINES?((this.$updateLines()||S&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$updateContentTransformAndSize(E,S)):S&this.CHANGE_TEXT||S&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):S&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)),S&this.CHANGE_CURSOR&&(this.$cursorLayer.update(E),this.$moveTextAreaToCursor()),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(E),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(E),this._signal("afterRender",S)},A.prototype.$autosize=function(){var S=this.session.getScreenLength()*this.lineHeight,I=this.$maxLines*this.lineHeight,E=Math.min(I,Math.max((this.$minLines||1)*this.lineHeight,S))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(E+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&E>this.$maxPixelHeight&&(E=this.$maxPixelHeight);var x=E<=2*this.lineHeight,v=!x&&S>I;if(E!=this.desiredHeight||this.$size.height!=this.desiredHeight||v!=this.$vScroll){v!=this.$vScroll&&(this.$vScroll=v,this.scrollBarV.setVisible(v));var m=this.container.clientWidth;this.container.style.height=E+"px",this.$updateCachedSize(!0,this.$gutterWidth,m,E),this.desiredHeight=E,this._signal("autosize")}},A.prototype.$updateContentTransformAndSize=function(S,I){var E=this.scrollMargin;if(this.session&&!this.session.getUseWrapMode()){var x=this.$getLongestRenderedLine();S.width<x&&(S.width=x)}this.session&&this.session.setScrollLeft(Math.max(-E.left,Math.min(this.scrollLeft,S.width+2*this.$padding-this.$size.scrollerWidth+E.right))),p.translate(this.content,-this.scrollLeft,-S.offset);var v=S.width+2*this.$padding+"px",m=S.minHeight+"px";p.setStyle(this.content.style,"width",v),p.setStyle(this.content.style,"height",m),this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH()},A.prototype.$getLongestRenderedLine=function(){for(var S=0,I=this.$hasCssTransforms&&this.$fontMetrics.getTransform(),E=this.$textLayer.$lines.cells,x=0;x<E.length;x++){var v=E[x].element;this.$fontMetrics.$scratchRange.setStart(v,0),this.$fontMetrics.$scratchRange.setEnd(v,v.childNodes.length);var m=this.$fontMetrics.$scratchRange.getBoundingClientRect();this.$hasCssTransforms&&(m=this.$fontMetrics.recoverRect(I,m)||m);var _=m.width;_>S&&(S=_)}return S},A.prototype.$computeLayerConfig=function(){var S=this.session,I=this.$size,E=I.height<=2*this.lineHeight,x=this.session.getScreenLength(),v=x*this.lineHeight,m=this.$getLongestLine(),_=!E&&(this.$hScrollBarAlwaysVisible||I.scrollerWidth-m-2*this.$padding<0),R=this.$horizScroll!==_;R&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),E=I.height<=2*this.lineHeight);var D=I.scrollerHeight+this.lineHeight,N=!this.$maxLines&&this.$scrollPastEnd?(I.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;v+=N;var P=this.scrollMargin;this.session.setScrollTop(Math.max(-P.top,Math.min(this.scrollTop,v-I.scrollerHeight+P.bottom)));var U=!E&&(this.$vScrollBarAlwaysVisible||I.scrollerHeight-v+N<0||this.scrollTop>P.top),F=O!==U;F&&(this.$vScroll=U,this.scrollBarV.setVisible(U));var W=this.scrollTop%this.lineHeight,B=Math.ceil(D/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),V=H+B,G,Y,Q=this.lineHeight;H=S.screenToDocumentRow(H,0);var ne=S.getFoldLine(H);ne&&(H=ne.start.row),G=S.documentToScreenRow(H,0),Y=S.getRowLength(H)*Q,V=Math.min(S.screenToDocumentRow(V,0),S.getLength()-1),D=I.scrollerHeight+S.getRowLength(V)*Q+Y,W=this.scrollTop-G*Q,W<0&&G>0&&(G=Math.max(0,G+Math.floor(W/Q)),W=this.scrollTop-G*Q);var q=0;return(this.layerConfig.width!=m||R)&&(q=this.CHANGE_H_SCROLL),(R||F)&&(q|=this.$updateCachedSize(!0,this.gutterWidth,I.width,I.height),this._signal("scrollbarVisibilityChanged"),F&&(m=this.$getLongestLine())),this.layerConfig={width:m,padding:this.$padding,firstRow:H,firstRowScreen:G,lastRow:V,lineHeight:Q,characterWidth:this.characterWidth,fontMetrics:this.$fontMetrics,minHeight:D,maxHeight:v,offset:W,gutterOffset:Q?Math.max(0,Math.ceil((W+I.height-I.scrollerHeight)/Q)):0,height:this.$size.scrollerHeight},this.$fontMetrics.config=this.layerConfig,this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(m-this.$padding),q},A.prototype.$updateLines=function(){if(this.$changedLines){var S=this.$changedLines.firstRow,I=this.$changedLines.lastRow;this.$changedLines=null;var E=this.layerConfig;if(!(S>E.lastRow+1)&&!(I<E.firstRow)){if(I===1/0){this.$showGutter&&this.$gutterLayer.update(E),this.$textLayer.update(E);return}return this.$textLayer.updateLines(E,S,I),!0}}},A.prototype.$getLongestLine=function(){var S=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(S+=1),this.$textLayer&&S>this.$textLayer.MAX_LINE_LENGTH&&(S=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(S*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(S,I){this.$gutterLayer.addGutterDecoration(S,I)},A.prototype.removeGutterDecoration=function(S,I){this.$gutterLayer.removeGutterDecoration(S,I)},A.prototype.updateBreakpoints=function(S){this._rows=S,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(S){this.$gutterLayer.setAnnotations(S),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(S,I,E){this.scrollCursorIntoView(S,E),this.scrollCursorIntoView(I,E)},A.prototype.scrollCursorIntoView=function(S,I,E){if(this.$size.scrollerHeight!==0){var x=this.$cursorLayer.getPixelPosition(S),v=x.left,m=x.top,_=E&&E.top||0,R=E&&E.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+_>m?(I&&O+_>m+this.lineHeight&&(m-=I*this.$size.scrollerHeight),m===0&&(m=-this.scrollMargin.top),this.session.setScrollTop(m)):O+this.$size.scrollerHeight-R<m+this.lineHeight&&(I&&O+this.$size.scrollerHeight-R<m-this.lineHeight&&(m+=I*this.$size.scrollerHeight),this.session.setScrollTop(m+this.lineHeight+R-this.$size.scrollerHeight));var D=this.scrollLeft,N=2*this.layerConfig.characterWidth;v-N<D?(v-=N,v<this.$padding+N&&(v=-this.scrollMargin.left),this.session.setScrollLeft(v)):(v+=N,D+this.$size.scrollerWidth<v+this.characterWidth?this.session.setScrollLeft(Math.round(v+this.characterWidth-this.$size.scrollerWidth)):D<=this.$padding&&v-D<this.characterWidth&&this.session.setScrollLeft(0))}},A.prototype.getScrollTop=function(){return this.session.getScrollTop()},A.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},A.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},A.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},A.prototype.scrollToRow=function(S){this.session.setScrollTop(S*this.lineHeight)},A.prototype.alignCursor=function(S,I){typeof S=="number"&&(S={row:S,column:0});var E=this.$cursorLayer.getPixelPosition(S),x=this.$size.scrollerHeight-this.lineHeight,v=E.top-x*(I||0);return this.session.setScrollTop(v),v},A.prototype.$calcSteps=function(S,I){var E=0,x=this.STEPS,v=[],m=function(_,R,O){return O*(Math.pow(_-1,3)+1)+R};for(E=0;E<x;++E)v.push(m(E/this.STEPS,S,I-S));return v},A.prototype.scrollToLine=function(S,I,E,x){var v=this.$cursorLayer.getPixelPosition({row:S,column:0}),m=v.top;I&&(m-=this.$size.scrollerHeight/2);var _=this.scrollTop;this.session.setScrollTop(m),E!==!1&&this.animateScrolling(_,x)},A.prototype.animateScrolling=function(S,I){var E=this.scrollTop;if(!this.$animatedScroll)return;var x=this;if(S==E)return;if(this.$scrollAnimation){var v=this.$scrollAnimation.steps;if(v.length&&(S=v[0],S==E))return}var m=x.$calcSteps(S,E);this.$scrollAnimation={from:S,to:E,steps:m},clearInterval(this.$timer),x.session.setScrollTop(m.shift()),x.session.$scrollTop=E;function _(){x.$timer=clearInterval(x.$timer),x.$scrollAnimation=null,x.$stopAnimation=!1,I&&I()}this.$timer=setInterval(function(){if(x.$stopAnimation){_();return}if(!x.session)return clearInterval(x.$timer);m.length?(x.session.setScrollTop(m.shift()),x.session.$scrollTop=E):E!=null?(x.session.$scrollTop=-1,x.session.setScrollTop(E),E=null):_()},10)},A.prototype.scrollToY=function(S){this.scrollTop!==S&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=S)},A.prototype.scrollToX=function(S){this.scrollLeft!==S&&(this.scrollLeft=S),this.$loop.schedule(this.CHANGE_H_SCROLL)},A.prototype.scrollTo=function(S,I){this.session.setScrollTop(I),this.session.setScrollLeft(S)},A.prototype.scrollBy=function(S,I){I&&this.session.setScrollTop(this.session.getScrollTop()+I),S&&this.session.setScrollLeft(this.session.getScrollLeft()+S)},A.prototype.isScrollableBy=function(S,I){if(I<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||I>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||S<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||S>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(S,I){var E;if(this.$hasCssTransforms){E={top:this.margin.top,left:this.gutterWidth+this.margin.left};var x=this.$fontMetrics.transformCoordinates([S,I]);S=x[0],I=x[1]}else E=this.scroller.getBoundingClientRect();var v=S+this.scrollLeft-E.left-this.$padding,m=v/this.characterWidth,_=(I+this.scrollTop-E.top)/this.lineHeight,R=this.$blockCursor?Math.floor(m):Math.round(m);return R=this.$fontMetrics.$pixelToColumn(_,R,S,this.$blockCursor),{row:_,column:R,side:m-R>0?1:-1,offsetX:v}},A.prototype.screenToTextCoordinates=function(S,I){var E=this.pixelToScreenCoordinates(S,I);return this.session.screenToDocumentPosition(E.row,Math.max(E.column,0))},A.prototype.textToScreenCoordinates=function(S,I){var E=this.session.documentToScreenPosition(S,I),x=this.$padding+this.$fontMetrics.textWidth(E.row,E.column),v=E.row*this.lineHeight;if(this.$hasCssTransforms){var m=this.$fontMetrics.transformCoordinates(null,[this.gutterWidth+this.margin.left+x-this.scrollLeft,this.margin.top+v-this.scrollTop]);return{pageX:m[0],pageY:m[1]}}var _=this.scroller.getBoundingClientRect();return{pageX:_.left+x-this.scrollLeft,pageY:_.top+v-this.scrollTop}},A.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(S){this.$composition=S,S.cssText||(S.cssText=this.textarea.style.cssText),S.useTextareaForIME==null&&(S.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):S.markerId=this.session.addMarker(S.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(S){var I=this.session.selection.cursor;this.addToken(S,"composition_placeholder",I.row,I.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var S=this.session.selection.cursor;this.removeExtraToken(S.row,S.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(S,I){var E=this.session.selection.cursor,x=I||{row:E.row,column:E.column};this.removeGhostText();var v=this.$calculateWrappedTextChunks(S,x);this.addToken(v[0].text,"ghost_text",x.row,x.column),this.$ghostText={text:S,position:{row:x.row,column:x.column}};var m=p.createElement("div");if(v.length>1){var _=this.hideTokensAfterPosition(x.row,x.column),R;v.slice(1).forEach(function(F){var W=p.createElement("div"),B=p.createElement("span");B.className="ace_ghost_text",F.wrapped&&(W.className="ghost_text_line_wrapped"),F.text.length===0&&(F.text=" "),B.appendChild(p.createTextNode(F.text)),W.appendChild(B),m.appendChild(W),R=W}),_.forEach(function(F){var W=p.createElement("span");T(F.type)||(W.className="ace_"+F.type.replace(/\./g," ace_")),W.appendChild(p.createTextNode(F.value)),R.appendChild(W)}),this.$ghostTextWidget={el:m,row:x.row,column:x.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var O=this.$cursorLayer.getPixelPosition(x,!0),D=this.container,N=D.getBoundingClientRect().height,P=v.length*this.lineHeight,U=P<N-O.top;if(U)return;P<N?this.scrollBy(0,(v.length-1)*this.lineHeight):this.scrollToRow(x.row)}},A.prototype.$calculateWrappedTextChunks=function(S,I){var E=this.$size.scrollerWidth-this.$padding*2,x=Math.floor(E/this.characterWidth)-2;x=x<=0?60:x;for(var v=S.split(/\r?\n/),m=[],_=0;_<v.length;_++){var R=this.session.$getDisplayTokens(v[_],I.column),O=this.session.$computeWrapSplits(R,x,this.session.$tabSize);if(O.length>0){var D=0;O.push(v[_].length);for(var N=0;N<O.length;N++){var P=v[_].slice(D,O[N]);m.push({text:P,wrapped:!0}),D=O[N]}}else m.push({text:v[_],wrapped:!1})}return m},A.prototype.removeGhostText=function(){if(this.$ghostText){var S=this.$ghostText.position;this.removeExtraToken(S.row,S.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},A.prototype.addToken=function(S,I,E,x){var v=this.session;v.bgTokenizer.lines[E]=null;var m={type:I,value:S},_=v.getTokens(E);if(x==null||!_.length)_.push(m);else for(var R=0,O=0;O<_.length;O++){var D=_[O];if(R+=D.value.length,x<=R){var N=D.value.length-(R-x),P=D.value.slice(0,N),U=D.value.slice(N);_.splice(O,1,{type:D.type,value:P},m,{type:D.type,value:U});break}}this.updateLines(E,E)},A.prototype.hideTokensAfterPosition=function(S,I){for(var E=this.session.getTokens(S),x=0,v=!1,m=[],_=0;_<E.length;_++){var R=E[_];if(x+=R.value.length,R.type!=="ghost_text"){if(v){m.push({type:R.type,value:R.value}),R.type="hidden_token";continue}x===I&&(v=!0)}}return this.updateLines(S,S),m},A.prototype.removeExtraToken=function(S,I){this.session.bgTokenizer.lines[S]=null,this.updateLines(S,S)},A.prototype.setTheme=function(S,I){var E=this;if(this.$themeId=S,E._dispatchEvent("themeChange",{theme:S}),!S||typeof S=="string"){var x=S||this.$options.theme.initialValue;a.loadModule(["theme",x],v)}else v(S);function v(m){if(E.$themeId!=S)return I&&I();if(!m||!m.cssClass)throw new Error("couldn't load module "+S+" or it didn't call define");m.$id&&(E.$themeId=m.$id),p.importCssString(m.cssText,m.cssClass,E.container),E.theme&&p.removeCssClass(E.container,E.theme.cssClass);var _="padding"in m?m.padding:"padding"in(E.theme||{})?4:E.$padding;if(E.$padding&&_!=E.$padding&&E.setPadding(_),E.$gutterLayer){var R=m.$showGutterCursorMarker;R&&!E.$gutterLayer.$showCursorMarker?E.$gutterLayer.$showCursorMarker="theme":!R&&E.$gutterLayer.$showCursorMarker=="theme"&&(E.$gutterLayer.$showCursorMarker=null)}E.$theme=m.cssClass,E.theme=m,p.addCssClass(E.container,m.cssClass),p.setCssClass(E.container,"ace_dark",m.isDark),E.$size&&(E.$size.width=0,E.$updateSizeAsync()),E._dispatchEvent("themeLoaded",{theme:m}),I&&I(),b.isSafari&&E.scroller&&(E.scroller.style.background="red",E.scroller.style.background="")}},A.prototype.getTheme=function(){return this.$themeId},A.prototype.setStyle=function(S,I){p.setCssClass(this.container,S,I!==!1)},A.prototype.unsetStyle=function(S){p.removeCssClass(this.container,S)},A.prototype.setCursorStyle=function(S){p.setStyle(this.scroller.style,"cursor",S)},A.prototype.setMouseCursor=function(S){p.setStyle(this.scroller.style,"cursor",S)},A.prototype.attachToShadowRoot=function(){p.importCssString($,"ace_editor.css",this.container)},A.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},A.prototype.$updateCustomScrollbar=function(S){var I=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),S===!0?(this.scrollBarV=new c(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(E){I.$scrollAnimation||I.session.setScrollTop(E.data-I.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(E){I.$scrollAnimation||I.session.setScrollLeft(E.data-I.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(E){I.$scrollAnimation||I.session.setScrollTop(E.data-I.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(E){I.$scrollAnimation||I.session.setScrollLeft(E.data-I.scrollMargin.left)}))},A.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var S=this;this.$resizeTimer=w.delayedCall(function(){S.destroyed||S.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(I){var E=I[0].contentRect.width,x=I[0].contentRect.height;Math.abs(S.$size.width-E)>1||Math.abs(S.$size.height-x)>1?S.$resizeTimer.delay():S.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A})();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,y.implement(L.prototype,k),a.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&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(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),d.VirtualRenderer=L}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(l,d,M){var y=l("../lib/oop"),p=l("../lib/net"),w=l("../lib/event_emitter").EventEmitter,a=l("../config");function u(t){var e="importScripts('"+p.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new i;return c.append(e),c.getBlob("application/javascript")}}function r(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=u(t),i=window.URL||window.webkitURL,c=i.createObjectURL(e);return new Worker(c)}return new Worker(t)}var s=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){y.implement(this,w),this.$createWorkerFromOldConfig=function(t,e,i,c,f){if(l.nameToUrl&&!l.toUrl&&(l.toUrl=l.nameToUrl),a.get("packaged")||!l.toUrl)c=c||a.moduleUrl(e,"worker");else{var g=this.$normalizePath;c=c||g(l.toUrl("ace/worker/worker.js",null,"_"));var k={};t.forEach(function($){k[$]=g(l.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(c),f&&this.send("importScripts",f),this.$worker.postMessage({init:!0,tlns:k,module:e,classname:i}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var i=this.callbacks[e.id];i&&(i(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return p.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,i){if(i){var c=this.callbackId++;this.callbacks[c]=i,e.push(c)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(s.prototype);var n=function(t,e,i){var c=null,f=!1,g=Object.create(w),k=[],$=new s({messageBuffer:k,terminate:function(){},postMessage:function(b){k.push(b),c&&(f?setTimeout(C):C())}});$.setEmitSync=function(b){f=b};var C=function(){var b=k.shift();b.command?c[b.command].apply(c,b.args):b.event&&g._signal(b.event,b.data)};return g.postMessage=function(b){$.onMessage({data:b})},g.callback=function(b,T){this.postMessage({type:"call",id:T,data:b})},g.emit=function(b,T){this.postMessage({type:"event",name:b,data:T})},a.loadModule(["worker",e],function(b){for(c=new b[i](g);k.length;)C()}),$};d.UIWorkerClient=n,d.WorkerClient=s,d.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(l,d,M){var y=l("./range").Range,p=l("./lib/event_emitter").EventEmitter,w=l("./lib/oop"),a=(function(){function u(r,s,n,t,e,i){var c=this;this.length=s,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){c.onCursorChange()})},this.$pos=n;var f=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=f.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var r=this,s=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=s.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=n.addMarker(new y(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var i=s.createAnchor(e.row,e.column);i.$insertRight=!0,i.detach(),r.others.push(i)}),n.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,s=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=r.addMarker(new y(n.row,n.column,n.row,n.column+s.length),s.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},u.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var s=r;if(s.start.row===s.end.row&&s.start.row===this.pos.row){this.$updating=!0;var n=r.action==="insert"?s.end.column-s.start.column:s.start.column-s.end.column,t=s.start.column>=this.pos.column&&s.start.column<=this.pos.column+this.length+1,e=s.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=n),t&&!this.session.$fromUndo){if(r.action==="insert")for(var i=this.others.length-1;i>=0;i--){var c=this.others[i],f={row:c.row,column:c.column+e};this.doc.insertMergedLines(f,r.lines)}else if(r.action==="remove")for(var i=this.others.length-1;i>=0;i--){var c=this.others[i],f={row:c.row,column:c.column+e};this.doc.remove(new y(f.row,f.column,f.row,f.column-n))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var s=this.others.length;s--;)this.others[s].onChange(r);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var r=this,s=this.session,n=function(e,i){s.removeMarker(e.markerId),e.markerId=s.addMarker(new y(e.row,e.column,e.row,e.column+r.length),i,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},u.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var s=this.session.selection.getCursor();s.row===this.pos.row&&s.column>=this.pos.column&&s.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},u.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},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),s=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,n=0;n<s;n++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},u})();w.implement(a.prototype,p),d.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(l,d,M){var y=l("../lib/event"),p=l("../lib/useragent");function w(u,r){return u.row==r.row&&u.column==r.column}function a(u){var r=u.domEvent,s=r.altKey,n=r.shiftKey,t=r.ctrlKey,e=u.getAccelKey(),i=u.getButton();if(t&&p.isMac&&(i=r.button),u.editor.inMultiSelectMode&&i==2){u.editor.textInput.onContextMenu(u.domEvent);return}if(!t&&!s&&!e){i===0&&u.editor.inMultiSelectMode&&u.editor.exitMultiSelectMode();return}if(i===0){var c=u.editor,f=c.selection,g=c.inMultiSelectMode,k=u.getDocumentPosition(),$=f.getCursor(),C=u.inSelection()||f.isEmpty()&&w(k,$),b=u.x,T=u.y,L=function(P){b=P.clientX,T=P.clientY},A=c.session,S=c.renderer.pixelToScreenCoordinates(b,T),I=S,E;if(c.$mouseHandler.$enableJumpToDef)t&&s||e&&s?E=n?"block":"add":s&&c.$blockSelectEnabled&&(E="block");else if(e&&!s){if(E="add",!g&&n)return}else s&&c.$blockSelectEnabled&&(E="block");if(E&&p.isMac&&r.ctrlKey&&c.$mouseHandler.cancelContextMenu(),E=="add"){if(!g&&C)return;if(!g){var x=f.toOrientedRange();c.addSelectionMarker(x)}var v=f.rangeList.rangeAtPoint(k);c.inVirtualSelectionMode=!0,n&&(v=null,x=f.ranges[0]||x,c.removeSelectionMarker(x)),c.once("mouseup",function(){var P=f.toOrientedRange();v&&P.isEmpty()&&w(v.cursor,P.cursor)?f.substractPoint(P.cursor):(n?f.substractPoint(x.cursor):x&&(c.removeSelectionMarker(x),f.addRange(x)),f.addRange(P)),c.inVirtualSelectionMode=!1})}else if(E=="block"){u.stop(),c.inVirtualSelectionMode=!0;var m,_=[],R=function(){var P=c.renderer.pixelToScreenCoordinates(b,T),U=A.screenToDocumentPosition(P.row,P.column);w(I,P)&&w(U,f.lead)||(I=P,c.selection.moveToPosition(U),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(_),_=f.rectangularRangeBlock(I,S),c.$mouseHandler.$clickSelection&&_.length==1&&_[0].isEmpty()&&(_[0]=c.$mouseHandler.$clickSelection.clone()),_.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers())};g&&!e?f.toSingleRange():!g&&e&&(m=f.toOrientedRange(),c.addSelectionMarker(m)),n?S=A.documentToScreenPosition(f.lead):f.moveToPosition(k),I={row:-1,column:-1};var O=function(P){R(),clearInterval(N),c.removeSelectionMarkers(_),_.length||(_=[f.toOrientedRange()]),m&&(c.removeSelectionMarker(m),f.toSingleRange(m));for(var U=0;U<_.length;U++)f.addRange(_[U]);c.inVirtualSelectionMode=!1,c.$mouseHandler.$clickSelection=null},D=R;y.capture(c.container,L,O);var N=setInterval(function(){D()},20);return u.preventDefault()}}}d.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(l,d,M){d.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(p){p.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(p){p.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(p){p.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],d.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var y=l("../keyboard/hash_handler").HashHandler;d.keyboardHandler=new y(d.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(l,d,M){var y=l("./range_list").RangeList,p=l("./range").Range,w=l("./selection").Selection,a=l("./mouse/multi_select_handler").onMouseDown,u=l("./lib/event"),r=l("./lib/lang"),s=l("./commands/multi_select_commands");d.commands=s.defaultCommands.concat(s.multiSelectCommands);var n=l("./search").Search,t=new n;function e($,C,b){return t.$options.wrap=!0,t.$options.needle=C,t.$options.backwards=b==-1,t.find($)}var i=l("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,C){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}$.cursor||($.cursor=$.end);var T=this.rangeList.add($);return this.$onAddRange($),T.length&&this.$onRemoveRange(T),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),$&&this.fromOrientedRange($)},this.substractPoint=function($){var C=this.rangeList.substractPoint($);if(C)return this.$onRemoveRange(C),C[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 C=this.rangeList.ranges.pop();$.push(C),this.rangeCount=0}for(var b=$.length;b--;){var T=this.ranges.indexOf($[b]);T!=-1&&this.ranges.splice(T,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)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new y,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],C=[],b=0;b<$.length;b++){var T=$[b],L=T.start.row,A=T.end.row;if(L===A)C.push(T.clone());else{for(C.push(new p(L,T.start.column,L,this.session.getLine(L).length));++L<A;)C.push(this.getLineRange(L,!0));C.push(new p(A,0,A,T.end.column))}b==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var b=C.length;b--;)this.addRange(C[b])},this.joinSelections=function(){var $=this.rangeList.ranges,C=$[$.length-1],b=p.fromPoints($[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,C=$[$.length-1],b=p.fromPoints($[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)}else{var T=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock(T,L);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,C,b){var T=[],L=$.column<C.column;if(L)var A=$.column,S=C.column;else var A=C.column,S=$.column;var I=$.row<C.row;if(I)var E=$.row,x=C.row;else var E=C.row,x=$.row;A<0&&(A=0),E<0&&(E=0),E==x&&(b=!0);for(var v,m=E;m<=x;m++){var _=p.fromPoints(this.session.screenToDocumentPosition(m,A),this.session.screenToDocumentPosition(m,S));if(_.isEmpty()){if(v&&f(_.end,v))break;v=_.end}_.cursor=L?_.start:_.end,T.push(_)}if(I&&T.reverse(),!b){for(var R=T.length-1;T[R].isEmpty()&&R>0;)R--;if(R>0)for(var O=0;T[O].isEmpty();)O++;for(var D=R;D>=O;D--)T[D].isEmpty()&&T.splice(D,1)}return T}}).call(w.prototype);var c=l("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var C=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",C),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var C=this.session.$selectionMarkers.indexOf($);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var C=this.session.$selectionMarkers,b=$.length;b--;){var T=$[b];if(T.marker){this.session.removeMarker(T.marker);var L=C.indexOf(T);L!=-1&&C.splice(L,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(s.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(s.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var C=$.command,b=$.editor;if(b.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?T=b.forEachSelection(C,$.args):C.multiSelectAction=="forEachLine"?T=b.forEachSelection(C,$.args,!0):C.multiSelectAction=="single"?(b.exitMultiSelectMode(),T=C.exec(b,$.args||{})):T=C.multiSelectAction(b,$.args||{});else{var T=C.exec(b,$.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return T}},this.forEachSelection=function($,C,b){if(!this.inVirtualSelectionMode){var T=b&&b.keepOrder,L=b==!0||b&&b.$byLines,A=this.session,S=this.selection,I=S.rangeList,E=(T?S:I).ranges,x;if(!E.length)return $.exec?$.exec(this,C||{}):$(this,C||{});var v=S._eventRegistry;S._eventRegistry={};var m=new w(A);this.inVirtualSelectionMode=!0;try{for(var _=E.length;_--;){if(L)for(;_>0&&E[_].start.row==E[_-1].end.row;)_--;m.fromOrientedRange(E[_]),m.index=_,this.selection=A.selection=m;var R=$.exec?$.exec(this,C||{}):$(this,C||{});!x&&R!==void 0&&(x=R),m.toOrientedRange(E[_])}m.detach()}finally{this.selection=A.selection=S,this.inVirtualSelectionMode=!1,S._eventRegistry=v,S.mergeOverlappingRanges(),S.ranges[0]&&S.fromOrientedRange(S.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),x}}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,b=[],T=0;T<C.length;T++)b.push(this.session.getTextRange(C[T]));var L=this.session.getDocument().getNewLineCharacter();$=b.join(L),$.length==(b.length-1)*L.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(!b||this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var T=C==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;T.row!=C.row||this.session.$clipPositionToDocument(T.row,T.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,C,b){if(C=C||{},C.needle=$||C.needle,C.needle==null){var T=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(T)}this.$search.set(C);var L=this.$search.findAll(this.session);if(!L.length)return 0;var A=this.multiSelect;b||A.toSingleRange(L[0]);for(var S=L.length;S--;)A.addRange(L[S],!0);return T&&A.rangeList.rangeAtPoint(T.start)&&A.addRange(T,!0),L.length},this.selectMoreLines=function($,C){var b=this.selection.toOrientedRange(),T=b.cursor==b.end,L=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var A=this.session.screenToDocumentPosition(L.row+$,L.column);if(b.isEmpty())var I=A;else var S=this.session.documentToScreenPosition(T?b.end:b.start),I=this.session.screenToDocumentPosition(S.row+$,S.column);if(T){var E=p.fromPoints(A,I);E.cursor=E.start}else{var E=p.fromPoints(I,A);E.cursor=E.end}if(E.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(C)var x=b.cursor;this.selection.addRange(E),x&&this.selection.substractPoint(x)},this.transposeSelections=function($){for(var C=this.session,b=C.multiSelect,T=b.ranges,L=T.length;L--;){var A=T[L];if(A.isEmpty()){var S=C.getWordRange(A.start.row,A.start.column);A.start.row=S.start.row,A.start.column=S.start.column,A.end.row=S.end.row,A.end.column=S.end.column}}b.mergeOverlappingRanges();for(var I=[],L=T.length;L--;){var A=T[L];I.unshift(C.getTextRange(A))}$<0?I.unshift(I.pop()):I.push(I.shift());for(var L=T.length;L--;){var A=T[L],E=A.clone();C.replace(A,I[L]),A.start.row=E.start.row,A.start.column=E.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function($,C,b){var T=this.session,L=T.multiSelect,A=L.toOrientedRange();if(!(A.isEmpty()&&(A=T.getWordRange(A.start.row,A.start.column),A.cursor=$==-1?A.start:A.end,this.multiSelect.addRange(A),b))){var S=T.getTextRange(A),I=e(T,S,$);I&&(I.cursor=$==-1?I.start:I.end,this.session.unfold(I),this.multiSelect.addRange(I),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(A.cursor)}},this.alignCursors=function(){var $=this.session,C=$.multiSelect,b=C.ranges,T=-1,L=b.filter(function(D){if(D.cursor.row==T)return!0;T=D.cursor.row});if(!b.length||L.length==b.length-1){var A=this.selection.getRange(),S=A.start.row,I=A.end.row,E=S==I;if(E){var x=this.session.getLength(),v;do v=this.session.getLine(I);while(/[=:]/.test(v)&&++I<x);do v=this.session.getLine(S);while(/[=:]/.test(v)&&--S>0);S<0&&(S=0),I>=x&&(I=x-1)}var m=this.session.removeFullLines(S,I);m=this.$reAlignText(m,E),this.session.insert({row:S,column:0},m.join(`
|
|
948
|
+
`)+`
|
|
949
|
+
`),E||(A.start.column=0,A.end.column=m[m.length-1].length),this.selection.setRange(A)}else{L.forEach(function(D){C.substractPoint(D.cursor)});var _=0,R=1/0,O=b.map(function(D){var N=D.cursor,P=$.getLine(N.row),U=P.substr(N.column).search(/\S/g);return U==-1&&(U=0),N.column>_&&(_=N.column),U<R&&(R=U),U});b.forEach(function(D,N){var P=D.cursor,U=_-P.column,F=O[N]-R;U>F?$.insert(P,r.stringRepeat(" ",U-F)):$.remove(new p(P.row,P.column,P.row,P.column-U+F)),D.start.column=D.end.column=_,D.start.row=D.end.row=P.row,D.cursor=D.end}),C.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,C){var b=!0,T=!0,L,A,S;return $.map(function(m){var _=m.match(/(\s*)(.*?)(\s*)([=:].*)/);return _?L==null?(L=_[1].length,A=_[2].length,S=_[3].length,_):(L+A+S!=_[1].length+_[2].length+_[3].length&&(T=!1),L!=_[1].length&&(b=!1),L>_[1].length&&(L=_[1].length),A<_[2].length&&(A=_[2].length),S>_[3].length&&(S=_[3].length),_):[m]}).map(C?E:b?T?x:E:v);function I(m){return r.stringRepeat(" ",m)}function E(m){return m[2]?I(L)+m[2]+I(A-m[2].length+S)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function x(m){return m[2]?I(L+A-m[2].length)+m[2]+I(S)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function v(m){return m[2]?I(L)+m[2]+I(S)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}}}).call(c.prototype);function f($,C){return $.row==C.row&&$.column==C.column}d.onSessionChange=function($){var C=$.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var b=$.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function g($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=d.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",a),$.commands.addCommands(s.defaultCommands),k($))}function k($){if(!$.textInput)return;var C=$.textInput.getElement(),b=!1;u.addListener(C,"keydown",function(L){var A=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);$.$blockSelectEnabled&&A?b||($.renderer.setMouseCursor("crosshair"),b=!0):b&&T()},$),u.addListener(C,"keyup",T,$),u.addListener(C,"blur",T,$);function T(L){b&&($.renderer.setMouseCursor(""),b=!1)}}d.MultiSelect=g,l("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function($){g(this),$?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(l,d,M){var y=l("../../range").Range,p=d.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,a,u){var r=w.getLine(u);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(w,a,u){return null},this.indentationBlock=function(w,a,u){var r=/\S/,s=w.getLine(a),n=s.search(r);if(n!=-1){for(var t=u||s.length,e=w.getLength(),i=a,c=a;++a<e;){var f=w.getLine(a).search(r);if(f!=-1){if(f<=n){var g=w.getTokenAt(a,0);if(!g||g.type!=="string")break}c=a}}if(c>i){var k=w.getLine(c).length;return new y(i,t,c,k)}}},this.openingBracketBlock=function(w,a,u,r,s){var n={row:u,column:r+1},t=w.$findClosingBracket(a,n,s);if(t){var e=w.foldWidgets[t.row];return e==null&&(e=w.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=w.getLine(t.row).length),y.fromPoints(n,t)}},this.closingBracketBlock=function(w,a,u,r,s){var n={row:u,column:r},t=w.$findOpeningBracket(a,n);if(t)return t.column++,n.column--,y.fromPoints(t,n)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(l,d,M){var y=l("../lib/dom"),p=l("../range").Range,w=l("../config").nls;function a(r,s,n){for(var t=0,e=r.length-1;t<=e;){var i=t+e>>1,c=n(s,r[i]);if(c>0)t=i+1;else if(c<0)e=i-1;else return i}return-(t+1)}function u(r,s,n){var t=r.getAnnotations().sort(p.comparePoints);if(t.length){var e=a(t,{row:s,column:-1},p.comparePoints);e<0&&(e=-e-1),e>=t.length?e=n>0?0:t.length-1:e===0&&n<0&&(e=t.length-1);var i=t[e];if(!(!i||!n)){if(i.row===s){do i=t[e+=n];while(i&&i.row===s);if(!i)return t.slice()}var c=[];s=i.row;do c[n<0?"unshift":"push"](i),i=t[e+=n];while(i&&i.row==s);return c.length&&c}}}d.showErrorMarker=function(r,s){var n=r.session,t=r.getCursorPosition(),e=t.row,i=n.widgetManager.getWidgetsAtRow(e).filter(function(L){return L.type=="errorMarker"})[0];i?i.destroy():e-=s;var c=u(n,e,s),f;if(c){var g=c[0];t.column=(g.pos&&typeof g.column!="number"?g.pos.sc:g.column)||0,t.row=g.row,f=r.renderer.$gutterLayer.$annotations[t.row]}else{if(i)return;f={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(t.row),r.selection.moveToPosition(t);var k={row:t.row,fixedWidth:!0,coverGutter:!0,el:y.createElement("div"),type:"errorMarker"},$=k.el.appendChild(y.createElement("div")),C=k.el.appendChild(y.createElement("div"));C.className="error_widget_arrow "+f.className;var b=r.renderer.$cursorLayer.getPixelPosition(t).left;C.style.left=b+r.renderer.gutterWidth-5+"px",k.el.className="error_widget_wrapper",$.className="error_widget "+f.className,f.displayText.forEach(function(L,A){$.appendChild(y.createTextNode(L)),A<f.displayText.length-1&&$.appendChild(y.createElement("br"))}),$.appendChild(y.createElement("div"));var T=function(L,A,S){if(A===0&&(S==="esc"||S==="return"))return k.destroy(),{command:"null"}};k.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(T),n.widgetManager.removeLineWidget(k),r.off("changeSelection",k.destroy),r.off("changeSession",k.destroy),r.off("mouseup",k.destroy),r.off("change",k.destroy))},r.keyBinding.addKeyboardHandler(T),r.on("changeSelection",k.destroy),r.on("changeSession",k.destroy),r.on("mouseup",k.destroy),r.on("change",k.destroy),r.session.widgetManager.addLineWidget(k),k.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:k.el.offsetHeight})},y.importCssString(`
|
|
950
|
+
.error_widget_wrapper {
|
|
951
|
+
background: inherit;
|
|
952
|
+
color: inherit;
|
|
953
|
+
border:none
|
|
954
|
+
}
|
|
955
|
+
.error_widget {
|
|
956
|
+
border-top: solid 2px;
|
|
957
|
+
border-bottom: solid 2px;
|
|
958
|
+
margin: 5px 0;
|
|
959
|
+
padding: 10px 40px;
|
|
960
|
+
white-space: pre-wrap;
|
|
961
|
+
}
|
|
962
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
963
|
+
border-color: #ff5a5a
|
|
964
|
+
}
|
|
965
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
966
|
+
border-color: #F1D817
|
|
967
|
+
}
|
|
968
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
969
|
+
border-color: #5a5a5a
|
|
970
|
+
}
|
|
971
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
972
|
+
border-color: #5aaa5a
|
|
973
|
+
}
|
|
974
|
+
.error_widget_arrow {
|
|
975
|
+
position: absolute;
|
|
976
|
+
border: solid 5px;
|
|
977
|
+
border-top-color: transparent!important;
|
|
978
|
+
border-right-color: transparent!important;
|
|
979
|
+
border-left-color: transparent!important;
|
|
980
|
+
top: -5px;
|
|
981
|
+
}
|
|
982
|
+
`,"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(l,d,M){l("./loader_build")(d);var y=l("./lib/dom"),p=l("./range").Range,w=l("./editor").Editor,a=l("./edit_session").EditSession,u=l("./undomanager").UndoManager,r=l("./virtual_renderer").VirtualRenderer;l("./worker/worker_client"),l("./keyboard/hash_handler"),l("./placeholder"),l("./multi_select"),l("./mode/folding/fold_mode"),l("./theme/textmate"),l("./ext/error_marker"),d.config=l("./config"),d.edit=function(n,t){if(typeof n=="string"){var e=n;if(n=document.getElementById(e),!n)throw new Error("ace.edit can't find div #"+e)}if(n&&n.env&&n.env.editor instanceof w)return n.env.editor;var i="";if(n&&/input|textarea/i.test(n.tagName)){var c=n;i=c.value,n=y.createElement("pre"),c.parentNode.replaceChild(n,c)}else n&&(i=n.textContent,n.innerHTML="");var f=d.createEditSession(i),g=new w(new r(n),f,t),k={document:f,editor:g,onResize:g.resize.bind(g,null)};return c&&(k.textarea=c),g.on("destroy",function(){k.editor.container.env=null}),g.container.env=g.env=k,g},d.createEditSession=function(n,t){var e=new a(n,t);return e.setUndoManager(new u),e},d.Range=p,d.Editor=w,d.EditSession=a,d.UndoManager=u,d.VirtualRenderer=r;var s=d.config.version;d.version=s}),(function(){ace.require(["ace/ace"],function(l){l&&(l.config.init(!0),l.define=ace.define);var d=(function(){return this})();!d&&typeof window<"u"&&(d=window),!d&&typeof self<"u"&&(d=self),d.ace||(d.ace=l);for(var M in l)l.hasOwnProperty(M)&&(d.ace[M]=l[M]);d.ace.default=d.ace,o&&(o.exports=d.ace)})})()})(xt)),xt.exports}var ar=sr(),At={exports:{}},pn;function lr(){return pn||(pn=1,(function(o,h){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(l,d,M){var y=l("../lib/oop"),p=l("./text_highlight_rules").TextHighlightRules,w=d.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};d.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},d.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},d.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var a=d.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=d.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},r=d.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},s=d.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},n=d.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},t=d.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=d.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},i=d.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},c=function(){var f="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",g="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",k="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",C=this.$keywords=this.createKeywordMapper({keyword:g,"constant.language":k,"variable.language":$,"support.function":f,"invalid.deprecated":"debugger"},"identifier"),b=`\\\\(?: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})*})`,T={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:b},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:b},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(L,A,S){S.length&&(S=[]);var I=L[L.length-1];return S.unshift(I,A),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(L,A,S){S.length&&(S=[]);var I=L[L.length-1];return S.unshift(I,A),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(L,A,S){S.length&&(S=[]);var I=L[L.length-1];return S.unshift(I,A),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(L,A,S){S.length&&(S=[]);var I=L[L.length-1];return S.unshift(I,A),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(L,A,S){S.length&&(S=[]);var I=L[L.length-1];return S.unshift(I,A),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},i,{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\\?(?:"+b+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},n,t,w,a,e,u,r,s,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:C,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(L,A,S){var I=L[2]=="-"||L[2]=="~"?"indentedHeredoc":"heredoc",E=L.split(this.splitRegex);return S.push(I,E[3]),[{type:"constant",value:E[1]},{type:"string",value:E[2]},{type:"support.class",value:E[3]},{type:"string",value:E[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(L,A,S){return L===S[1]?(S.shift(),S.shift(),this.next=S[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(L,A,S){return L===S[1]?(S.shift(),S.shift(),this.next=S[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(L,A){return A[0]==="heredoc"||A[0]==="indentedHeredoc"?A[0]:L}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(L,A,S){return this.next="",L=="}"&&S.length>1&&S[1]!="start"&&(S.shift(),this.next=S.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,A,S){return S.length&&L===S[0]?(S.unshift(L,A),this.token):"string"}},{token:"constant.language.escape",regex:b},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,A,S){return S.length&&L===T[S[0]]?(S.shift(),this.next=S.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,A,S){return S.length&&L===S[0]?(S.unshift(L,A),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,A,S){return S.length&&L===T[S[0]]?(S.shift(),this.next=S.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,A,S){return S.length&&L===S[0]?(S.unshift(L,A),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,A,S){return S.length&&L===T[S[0]]?(S.shift(),this.next=S.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,A,S){return S.length&&L===S[0]?(S.unshift(L,A),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:b},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,A,S){return S.length&&L===T[S[0]]?(S.shift(),this.next=S.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(L,A,S){return S.length&&L===S[0]?(S.unshift(L,A),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(L,A,S){return S.length&&L[0]===T[S[0]]?(S.shift(),this.next=S.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()};y.inherits(c,p),d.RubyHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(l,d,M){var y=l("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,a){return/^\s+$/.test(w)?/^\s*\}/.test(a):!1},this.autoOutdent=function(w,a){var u=w.getLine(a),r=u.match(/^(\s*\})/);if(!r)return 0;var s=r[1].length,n=w.findMatchingBracket({row:a,column:s});if(!n||n.row==a)return 0;var t=this.$getIndent(w.getLine(n.row));w.replace(new y(a,0,a,s-1),t)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),d.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(l,d,M){var y=l("../../lib/oop"),p=l("./fold_mode").FoldMode,w=l("../../range").Range,a=l("../../token_iterator").TokenIterator,u=d.FoldMode=function(){};y.inherits(u,p),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(r,s,n){var t=r.getLine(n),e=this.foldingStartMarker.test(t),i=this.foldingStopMarker.test(t);if(e&&!i){var c=t.match(this.foldingStartMarker);if(c[1]){if((c[1]=="if"||c[1]=="else"||c[1]=="while"||c[1]=="until"||c[1]=="unless")&&(c[1]=="else"&&/^\s*else\s*$/.test(t)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(t)===!1)||c[1]=="when"&&/\sthen\s/.test(t)===!0)return;if(r.getTokenAt(n,c.index+2).type==="keyword")return"start"}else if(!c[3]||r.getTokenAt(n,c.index+1).type==="comment.multiline")return"start"}if(s!="markbeginend"||!i||e&&i)return"";var c=t.match(this.foldingStopMarker);if(c[3]==="end"){if(r.getTokenAt(n,c.index+1).type==="keyword")return"end"}else if(!c[1]||r.getTokenAt(n,c.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(r,s,n){var t=r.doc.getLine(n),e=this.foldingStartMarker.exec(t);if(e)return e[1]||e[3]?this.rubyBlock(r,n,e.index+2):this.openingBracketBlock(r,"{",n,e.index);var e=this.foldingStopMarker.exec(t);if(e)return e[3]==="end"&&r.getTokenAt(n,e.index+1).type==="keyword"?this.rubyBlock(r,n,e.index+1):e[1]==="=end"&&r.getTokenAt(n,e.index+1).type==="comment.multiline"?this.rubyBlock(r,n,e.index+1):this.closingBracketBlock(r,"}",n,e.index+e[0].length)},this.rubyBlock=function(r,E,n,t){var e=new a(r,E,n),i=e.getCurrentToken();if(!(!i||i.type!="keyword"&&i.type!="comment.multiline")){var c=i.value,f=r.getLine(E);switch(i.value){case"if":case"unless":case"while":case"until":var g=new RegExp("^\\s*"+i.value);if(!g.test(f))return;var k=this.indentKeywords[c];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var k=1;break;case"else":var g=new RegExp("^\\s*"+i.value+"\\s*$");if(!g.test(f))return;var k=1;break;default:var k=this.indentKeywords[c]}var $=[c];if(k){var C=k===-1?r.getLine(E-1).length:r.getLine(E).length,b=E,T=[];if(T.push(e.getCurrentTokenRange()),e.step=k===-1?e.stepBackward:e.stepForward,i.type=="comment.multiline"){for(;i=e.step();)if(i.type==="comment.multiline"){if(k==1){if(C=6,i.value=="=end")break}else if(i.value=="=begin")break}}else for(;i=e.step();){var L=!1;if(i.type==="keyword"){var A=k*this.indentKeywords[i.value];switch(f=r.getLine(e.getCurrentTokenRow()),i.value){case"do":for(var S=e.$tokenIndex-1;S>=0;S--){var I=e.$rowTokens[S];if(I&&(I.value=="while"||I.value=="until"||I.value=="for")){A=0;break}}break;case"else":var g=new RegExp("^\\s*"+i.value+"\\s*$");(!g.test(f)||c=="case")&&(A=0,L=!0);break;case"if":case"unless":case"while":case"until":var g=new RegExp("^\\s*"+i.value);g.test(f)||(A=0,L=!0);break;case"when":(/\sthen\s/.test(f)||c=="case")&&(A=0,L=!0)}if(A>0)$.unshift(i.value);else if(A<=0&&L===!1){if($.shift(),!$.length&&((c=="while"||c=="until"||c=="for")&&i.value!="do"||i.value=="do"&&k==-1&&A!=0||i.value!="do"))break;A===0&&$.unshift(i.value)}}}if(!i)return null;if(t)return T.push(e.getCurrentTokenRange()),T;var E=e.getCurrentTokenRow();if(k===-1){if(i.type==="comment.multiline")var x=6;else var x=r.getLine(E).length;return new w(E,x,b-1,C)}return new w(b,C,E-1,r.getLine(E-1).length)}}}}).call(u.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(l,d,M){var y=l("../lib/oop"),p=l("./text").Mode,w=l("./ruby_highlight_rules").RubyHighlightRules,a=l("./matching_brace_outdent").MatchingBraceOutdent,u=l("../range").Range,r=l("./folding/ruby").FoldMode,s=function(){this.HighlightRules=w,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new r,this.indentKeywords=this.foldingRules.indentKeywords};y.inherits(s,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(n,t,e){var i=this.$getIndent(t),c=this.getTokenizer().getLineTokens(t,n),f=c.tokens;if(f.length&&f[f.length-1].type=="comment")return i;if(n=="start"){var g=t.match(/^.*[\{\(\[]\s*$/),k=t.match(/^\s*(class|def|module)\s.*$/),$=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),C=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(g||k||$||C)&&(i+=e)}return i},this.checkOutdent=function(n,t,e){return/^\s+(end|else|rescue|ensure)$/.test(t+e)||this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(n,t,e){var i=t.getLine(e);if(/}/.test(i))return this.$outdent.autoOutdent(t,e);var c=this.$getIndent(i),f=t.getLine(e-1),g=this.$getIndent(f),k=t.getTabString();g.length<=c.length&&c.slice(-k.length)==k&&t.remove(new u(e,c.length-k.length,e,c.length))},this.getMatching=function(n,t,e){if(t==null){var i=n.selection.lead;e=i.column,t=i.row}var c=n.getTokenAt(t,e);if(c&&c.value in this.indentKeywords)return this.foldingRules.rubyBlock(n,t,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(s.prototype),d.Mode=s}),(function(){ace.require(["ace/mode/ruby"],function(l){o&&(o.exports=l)})})()})(At)),At.exports}lr();var kt={exports:{}},mn;function cr(){return mn||(mn=1,(function(o,h){ace.define("ace/theme/twilight-css",["require","exports","module"],function(l,d,M){M.exports=`.ace-twilight .ace_gutter {
|
|
983
|
+
background: #232323;
|
|
984
|
+
color: #E2E2E2
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
.ace-twilight .ace_print-margin {
|
|
988
|
+
width: 1px;
|
|
989
|
+
background: #232323
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.ace-twilight {
|
|
993
|
+
background-color: #141414;
|
|
994
|
+
color: #F8F8F8
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.ace-twilight .ace_cursor {
|
|
998
|
+
color: #A7A7A7
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
|
1002
|
+
background: rgba(221, 240, 255, 0.20)
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
|
1006
|
+
box-shadow: 0 0 3px 0px #141414;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
|
1010
|
+
background: rgb(102, 82, 0)
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
|
1014
|
+
margin: -1px 0 0 -1px;
|
|
1015
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
|
1019
|
+
background: rgba(255, 255, 255, 0.031)
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
.ace-twilight .ace_gutter-active-line {
|
|
1023
|
+
background-color: rgba(255, 255, 255, 0.031)
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
|
1027
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.ace-twilight .ace_invisible {
|
|
1031
|
+
color: rgba(255, 255, 255, 0.25)
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.ace-twilight .ace_keyword,
|
|
1035
|
+
.ace-twilight .ace_meta {
|
|
1036
|
+
color: #CDA869
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.ace-twilight .ace_constant,
|
|
1040
|
+
.ace-twilight .ace_constant.ace_character,
|
|
1041
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
|
1042
|
+
.ace-twilight .ace_constant.ace_other,
|
|
1043
|
+
.ace-twilight .ace_heading,
|
|
1044
|
+
.ace-twilight .ace_markup.ace_heading,
|
|
1045
|
+
.ace-twilight .ace_support.ace_constant {
|
|
1046
|
+
color: #CF6A4C
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
|
1050
|
+
color: #F8F8F8;
|
|
1051
|
+
background-color: rgba(86, 45, 86, 0.75)
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
|
1055
|
+
text-decoration: underline;
|
|
1056
|
+
font-style: italic;
|
|
1057
|
+
color: #D2A8A1
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.ace-twilight .ace_support {
|
|
1061
|
+
color: #9B859D
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.ace-twilight .ace_fold {
|
|
1065
|
+
background-color: #AC885B;
|
|
1066
|
+
border-color: #F8F8F8
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.ace-twilight .ace_support.ace_function {
|
|
1070
|
+
color: #DAD085
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.ace-twilight .ace_list,
|
|
1074
|
+
.ace-twilight .ace_markup.ace_list,
|
|
1075
|
+
.ace-twilight .ace_storage {
|
|
1076
|
+
color: #F9EE98
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
|
1080
|
+
.ace-twilight .ace_meta.ace_tag {
|
|
1081
|
+
color: #AC885B
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.ace-twilight .ace_string {
|
|
1085
|
+
color: #8F9D6A
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.ace-twilight .ace_string.ace_regexp {
|
|
1089
|
+
color: #E9C062
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.ace-twilight .ace_comment {
|
|
1093
|
+
font-style: italic;
|
|
1094
|
+
color: #5F5A60
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.ace-twilight .ace_variable {
|
|
1098
|
+
color: #7587A6
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
.ace-twilight .ace_xml-pe {
|
|
1102
|
+
color: #494949
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.ace-twilight .ace_indent-guide {
|
|
1106
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
.ace-twilight .ace_indent-guide-active {
|
|
1110
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1111
|
+
}
|
|
1112
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(l,d,M){d.isDark=!0,d.cssClass="ace-twilight",d.cssText=l("./twilight-css");var y=l("../lib/dom");y.importCssString(d.cssText,d.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(l){o&&(o.exports=l)})})()})(kt)),kt.exports}cr();function vn(o,h){return function(){return o.apply(h,arguments)}}const{toString:hr}=Object.prototype,{getPrototypeOf:_e}=Object,{iterator:ze,toStringTag:yn}=Symbol,Be=(({hasOwnProperty:o})=>(h,l)=>o.call(h,l))(Object.prototype),wn=o=>typeof o=="string"&&(o==="__proto__"||o==="constructor"||o==="prototype"),bn=(o,h,l)=>o===Object.prototype||!l&&h===null,ur=o=>{if(!Object.isExtensible(o))return!1;const h=Object.getOwnPropertyNames(o);return Object.getOwnPropertySymbols&&h.push(...Object.getOwnPropertySymbols(o)),h.every(l=>{if(wn(l))return!1;const d=Object.getOwnPropertyDescriptor(o,l);return!!d&&d.configurable&&d.writable===!0})},He=(o,h)=>{let l=o;const d=[];for(;l!=null;){if(d.indexOf(l)!==-1)return!1;d.push(l);const M=_e(l);if(bn(l,M,l===o))return!1;if(Be(l,h))return!0;l=M}return!1},dr=(o,h)=>o!=null&&He(o,h)?o[h]:void 0,fr=o=>{if(o==null||typeof o!="object"&&typeof o!="function")return o;const h=_e(o);if(h===null&&ur(o))return o;const l=Object.create(null),d=Object.create(null),M=[];let y=o;for(;y!=null&&M.indexOf(y)===-1;){M.push(y);const p=y===o?h:_e(y);if(bn(y,p,y===o))break;const w=Object.getOwnPropertyNames(y);Object.getOwnPropertySymbols&&w.push(...Object.getOwnPropertySymbols(y));for(const a of w)wn(a)||Be(d,a)||(l[a]=o[a],d[a]=!0);y=p}return l},Et=(o=>h=>{const l=hr.call(h);return o[l]||(o[l]=l.slice(8,-1).toLowerCase())})(Object.create(null)),be=o=>(o=o.toLowerCase(),h=>Et(h)===o),rt=o=>h=>typeof h===o,{isArray:Ee}=Array,Me=rt("undefined");function Oe(o){return o!==null&&!Me(o)&&o.constructor!==null&&!Me(o.constructor)&&we(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Cn=be("ArrayBuffer");function gr(o){let h;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?h=ArrayBuffer.isView(o):h=o&&o.buffer&&Cn(o.buffer),h}const pr=rt("string"),we=rt("function"),$n=rt("number"),De=o=>o!==null&&typeof o=="object",mr=o=>o===!0||o===!1,ot=o=>{if(!De(o))return!1;const h=_e(o);return(h===null||h===Object.prototype||_e(h)===null)&&!He(o,yn)&&!He(o,ze)},vr=o=>{if(!De(o)||Oe(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},yr=be("Date"),wr=be("File"),br=o=>!!(o&&typeof o.uri<"u"),Cr=o=>o&&typeof o.getParts<"u",$r=be("Blob"),Sr=be("FileList"),_r=be("Set"),xr=o=>De(o)&&we(o.pipe);function Ar(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Sn=Ar(),_n=typeof Sn.FormData<"u"?Sn.FormData:void 0,kr=o=>{if(!o)return!1;if(_n&&o instanceof _n)return!0;const h=_e(o);if(!h||h===Object.prototype||!we(o.append))return!1;const l=Et(o);return l==="formdata"||l==="object"&&we(o.toString)&&o.toString()==="[object FormData]"},Er=be("URLSearchParams"),[Mr,Tr,Lr,Rr]=["ReadableStream","Request","Response","Headers"].map(be),Ir=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ue(o,h,{allOwnKeys:l=!1}={}){if(o===null||typeof o>"u")return;let d,M;if(typeof o!="object"&&(o=[o]),Ee(o))for(d=0,M=o.length;d<M;d++)h.call(null,o[d],d,o);else{if(Oe(o))return;const y=l?Object.getOwnPropertyNames(o):Object.keys(o),p=y.length;let w;for(d=0;d<p;d++)w=y[d],h.call(null,o[w],w,o)}}function xn(o,h){if(Oe(o))return null;h=h.toLowerCase();const l=Object.keys(o);let d=l.length,M;for(;d-- >0;)if(M=l[d],h===M.toLowerCase())return M;return null}const Te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,An=o=>!Me(o)&&o!==Te;function Mt(...o){const{caseless:h,skipUndefined:l}=An(this)&&this||{},d={},M=(y,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const w=h&&typeof p=="string"&&xn(d,p)||p,a=Be(d,w)?d[w]:void 0;ot(a)&&ot(y)?d[w]=Mt(a,y):ot(y)?d[w]=Mt({},y):Ee(y)?d[w]=y.slice():(!l||!Me(y))&&(d[w]=y)};for(let y=0,p=o.length;y<p;y++){const w=o[y];if(!w||Oe(w)||(Ue(w,M),typeof w!="object"||Ee(w)))continue;const a=Object.getOwnPropertySymbols(w);for(let u=0;u<a.length;u++){const r=a[u];jr.call(w,r)&&M(w[r],r)}}return d}const Or=(o,h,l,{allOwnKeys:d}={})=>(Ue(h,(M,y)=>{l&&we(M)?Object.defineProperty(o,y,{__proto__:null,value:vn(M,l),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(o,y,{__proto__:null,value:M,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:d}),o),Dr=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),Nr=(o,h,l,d)=>{o.prototype=Object.create(h.prototype,d),Object.defineProperty(o.prototype,"constructor",{__proto__:null,value:o,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(o,"super",{__proto__:null,value:h.prototype}),l&&Object.assign(o.prototype,l)},Fr=(o,h,l,d)=>{let M,y,p;const w={};if(h=h||{},o==null)return h;do{for(M=Object.getOwnPropertyNames(o),y=M.length;y-- >0;)p=M[y],(!d||d(p,o,h))&&!w[p]&&(h[p]=o[p],w[p]=!0);o=l!==!1&&_e(o)}while(o&&(!l||l(o,h))&&o!==Object.prototype);return h},Pr=(o,h,l)=>{o=String(o),(l===void 0||l>o.length)&&(l=o.length),l-=h.length;const d=o.indexOf(h,l);return d!==-1&&d===l},Wr=o=>{if(!o)return null;if(Ee(o))return o;let h=o.length;if(!$n(h))return null;const l=new Array(h);for(;h-- >0;)l[h]=o[h];return l},zr=(o=>h=>o&&h instanceof o)(typeof Uint8Array<"u"&&_e(Uint8Array)),Br=(o,h)=>{const l=(o&&o[ze]).call(o);let d;for(;(d=l.next())&&!d.done;){const M=d.value;h.call(o,M[0],M[1])}},Hr=(o,h)=>{let l;const d=[];for(;(l=o.exec(h))!==null;)d.push(l);return d},Ur=be("HTMLFormElement"),Vr=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,l,d){return l.toUpperCase()+d}),{propertyIsEnumerable:jr}=Object.prototype,Gr=be("RegExp"),kn=(o,h)=>{const l=Object.getOwnPropertyDescriptors(o),d={};Ue(l,(M,y)=>{let p;(p=h(M,y,o))!==!1&&(d[y]=p||M)}),Object.defineProperties(o,d)},Kr=o=>{kn(o,(h,l)=>{if(we(o)&&["arguments","caller","callee"].includes(l))return!1;const d=o[l];if(we(d)){if(h.enumerable=!1,"writable"in h){h.writable=!1;return}h.set||(h.set=()=>{throw Error("Can not rewrite read-only method '"+l+"'")})}})},Yr=(o,h)=>{const l={},d=M=>{M.forEach(y=>{l[y]=!0})};return Ee(o)?d(o):d(String(o).split(h)),l},Qr=()=>{},Zr=(o,h)=>o!=null&&Number.isFinite(o=+o)?o:h;function Xr(o){return!!(o&&we(o.append)&&o[yn]==="FormData"&&o[ze])}const Jr=o=>{const h=new WeakSet,l=d=>{if(De(d)){if(h.has(d))return;if(Oe(d))return d;if(!("toJSON"in d)){h.add(d);let M;if(_r(d)){M=[];for(const y of d){const p=l(y);!Me(p)&&M.push(p)}}else M=Ee(d)?[]:{},Ue(d,(y,p)=>{const w=l(y);!Me(w)&&(M[p]=w)});return h.delete(d),M}}return d};return l(o)},qr=be("AsyncFunction"),eo=o=>o&&(De(o)||we(o))&&we(o.then)&&we(o.catch),En=((o,h)=>o?setImmediate:h?((l,d)=>(Te.addEventListener("message",({source:M,data:y})=>{M===Te&&y===l&&d.length&&d.shift()()},!1),M=>{d.push(M),Te.postMessage(l,"*")}))(`axios@${Math.random()}`,[]):l=>setTimeout(l))(typeof setImmediate=="function",we(Te.postMessage)),to=typeof queueMicrotask<"u"?queueMicrotask.bind(Te):typeof process<"u"&&process.nextTick||En,Mn=o=>o!=null&&we(o[ze]),no=o=>o!=null&&He(o,ze)&&Mn(o),z={isArray:Ee,isArrayBuffer:Cn,isBuffer:Oe,isFormData:kr,isArrayBufferView:gr,isString:pr,isNumber:$n,isBoolean:mr,isObject:De,isPlainObject:ot,isEmptyObject:vr,isReadableStream:Mr,isRequest:Tr,isResponse:Lr,isHeaders:Rr,isUndefined:Me,isDate:yr,isFile:wr,isReactNativeBlob:br,isReactNative:Cr,isBlob:$r,isRegExp:Gr,isFunction:we,isStream:xr,isURLSearchParams:Er,isTypedArray:zr,isFileList:Sr,forEach:Ue,merge:Mt,extend:Or,trim:Ir,stripBOM:Dr,inherits:Nr,toFlatObject:Fr,kindOf:Et,kindOfTest:be,endsWith:Pr,toArray:Wr,forEachEntry:Br,matchAll:Hr,isHTMLForm:Ur,hasOwnProperty:Be,hasOwnProp:Be,hasOwnInPrototypeChain:He,getSafeProp:dr,toSafeFlatObject:fr,reduceDescriptors:kn,freezeMethods:Kr,toObjectSet:Yr,toCamelCase:Vr,noop:Qr,toFiniteNumber:Zr,findKey:xn,global:Te,isContextDefined:An,isSpecCompliantForm:Xr,toJSONObject:Jr,isAsyncFn:qr,isThenable:eo,setImmediate:En,asap:to,isIterable:Mn,isSafeIterable:no},io=z.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"]),ro=o=>{const h={};let l,d,M;return o&&o.split(`
|
|
1113
|
+
`).forEach(function(y){M=y.indexOf(":"),l=y.substring(0,M).trim().toLowerCase(),d=y.substring(M+1).trim();const p=z.hasOwnProp(h,l);!l||p&&z.hasOwnProp(io,l)||(l==="set-cookie"?p?h[l].push(d):h[l]=[d]:h[l]=p?h[l]+", "+d:d)}),h};function oo(o){let h=0,l=o.length;for(;h<l;){const d=o.charCodeAt(h);if(d!==9&&d!==32)break;h+=1}for(;l>h;){const d=o.charCodeAt(l-1);if(d!==9&&d!==32)break;l-=1}return h===0&&l===o.length?o:o.slice(h,l)}const so=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ao=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Tt(o,h){return z.isArray(o)?o.map(l=>Tt(l,h)):oo(String(o).replace(h,""))}const lo=o=>Tt(o,so),co=o=>Tt(o,ao);function Tn(o){const h=Object.create(null);return z.forEach(o.toJSON(),(l,d)=>{h[d]=co(l)}),h}const Ln=Symbol("internals");function Ve(o){return o&&String(o).trim().toLowerCase()}function st(o){return o===!1||o==null?o:z.isArray(o)?o.map(st):lo(String(o))}function ho(o){const h=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let d;for(;d=l.exec(o);)h[d[1]]=d[2];return h}const uo=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Lt(o){let h=0,l=o.length;for(;h<l;){const d=o.charCodeAt(h);if(d!==9&&d!==32)break;h+=1}for(;l>h;){const d=o.charCodeAt(l-1);if(d!==9&&d!==32)break;l-=1}return h===0&&l===o.length?o:o.slice(h,l)}function fo(o){const h=o.length-1;if(h<1||o.charCodeAt(0)!==34||o.charCodeAt(h)!==34)return o;let l="";for(let d=1;d<h;d++){const M=o.charCodeAt(d);if(M===34||M===92&&(d+=1,d>=h))return o;l+=o[d]}return l}function go(o){const h=Object.create(null),l=String(o);let d=0,M=!1,y=!1;function p(w){const a=Lt(l.slice(d,w)),u=a.indexOf("=");if(u<1)return;const r=Lt(a.slice(0,u));if(!uo.test(r))return;const s=r.toLowerCase();if(s==="__proto__"||s==="constructor"||s==="prototype")return;const n=Lt(a.slice(u+1));h[s]=fo(n)}for(let w=0;w<l.length;w++){const a=l.charCodeAt(w);M?y?y=!1:a===92?y=!0:a===34&&(M=!1):a===34?M=!0:(a===44||a===59)&&(p(w),d=w+1)}return p(l.length),h}const po=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function Rt(o,h,l,d,M){if(z.isFunction(d))return d.call(this,h,l);if(M&&(h=l),!!z.isString(h)){if(z.isString(d))return h.indexOf(d)!==-1;if(z.isRegExp(d))return d.test(h)}}function mo(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(h,l,d)=>l.toUpperCase()+d)}function vo(o,h){const l=z.toCamelCase(" "+h);["get","set","has"].forEach(d=>{Object.defineProperty(o,d+l,{__proto__:null,value:function(M,y,p){return this[d].call(this,h,M,y,p)},configurable:!0})})}let me=class{constructor(o){o&&this.set(o)}set(o,h,l){const d=this;function M(p,w,a){const u=Ve(w);if(!u)return;const r=z.findKey(d,u);(!r||d[r]===void 0||a===!0||a===void 0&&d[r]!==!1)&&(d[r||w]=st(p))}const y=(p,w)=>z.forEach(p,(a,u)=>M(a,u,w));if(z.isPlainObject(o)||o instanceof this.constructor)y(o,h);else if(z.isString(o)&&(o=o.trim())&&!po(o))y(ro(o),h);else if(z.isObject(o)&&z.isSafeIterable(o)){let p=Object.create(null),w,a;for(const u of o){if(!z.isArray(u))throw new TypeError("Object iterator must return a key-value pair");a=u[0],z.hasOwnProp(p,a)?(w=p[a],p[a]=z.isArray(w)?[...w,u[1]]:[w,u[1]]):p[a]=u[1]}y(p,h)}else o!=null&&M(h,o,l);return this}get(o,h){if(o=Ve(o),o){const l=z.findKey(this,o);if(l){const d=this[l];if(!h)return d;if(h===!0)return ho(d);if(z.isFunction(h))return h.call(this,d,l);if(z.isRegExp(h))return h.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,h){if(o=Ve(o),o){const l=z.findKey(this,o);return!!(l&&this[l]!==void 0&&(!h||Rt(this,this[l],l,h)))}return!1}delete(o,h){const l=this;let d=!1;function M(y){if(y=Ve(y),y){const p=z.findKey(l,y);p&&(!h||Rt(l,l[p],p,h))&&(delete l[p],d=!0)}}return z.isArray(o)?o.forEach(M):M(o),d}clear(o){const h=Object.keys(this);let l=h.length,d=!1;for(;l--;){const M=h[l];(!o||Rt(this,this[M],M,o,!0))&&(delete this[M],d=!0)}return d}normalize(o){const h=this,l={};return z.forEach(this,(d,M)=>{const y=z.findKey(l,M);if(y){h[y]=st(d),delete h[M];return}const p=o?mo(M):String(M).trim();p!==M&&delete h[M],h[p]=st(d),l[p]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const h=Object.create(null);return z.forEach(this,(l,d)=>{l!=null&&l!==!1&&(h[d]=o&&z.isArray(l)?l.join(", "):l)}),h}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,h])=>o+": "+h).join(`
|
|
1114
|
+
`)}getSetCookie(){const o=this.get("set-cookie");return z.isArray(o)?o:o==null||o===!1?[]:[o]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static parseParameters(o){return go(o)}static concat(o,...h){const l=new this(o);return h.forEach(d=>l.set(d)),l}static accessor(o){const h=(this[Ln]=this[Ln]={accessors:{}}).accessors,l=this.prototype;function d(M){const y=Ve(M);h[y]||(vo(l,M),h[y]=!0)}return z.isArray(o)?o.forEach(d):d(o),this}};me.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(me.prototype,({value:o},h)=>{let l=h[0].toUpperCase()+h.slice(1);return{get:()=>o,set(d){this[l]=d}}}),z.freezeMethods(me);const at="[REDACTED ****]";function yo(o){if(z.hasOwnProp(o,"toJSON"))return!0;let h=Object.getPrototypeOf(o);for(;h&&h!==Object.prototype;){if(z.hasOwnProp(h,"toJSON"))return!0;h=Object.getPrototypeOf(h)}return!1}function wo(o,h){const l=new Set(h.map(y=>String(y).toLowerCase())),d=[],M=y=>{if(y===null||typeof y!="object"||z.isBuffer(y))return y;if(d.indexOf(y)!==-1)return;y instanceof me&&(y=y.toJSON()),d.push(y);let p;if(z.isArray(y))p=[],y.forEach((w,a)=>{const u=M(w);z.isUndefined(u)||(p[a]=u)});else{if(!z.isPlainObject(y)&&yo(y))return d.pop(),y;p=Object.create(null);for(const[w,a]of Object.entries(y)){const u=l.has(w.toLowerCase())?at:M(a);z.isUndefined(u)||(p[w]=u)}}return d.pop(),p};return M(o)}function Rn(o){try{return String(o)}catch{return""}}function bo(o){return o.errors.map(h=>{try{return h&&h.message?Rn(h.message):Rn(h)}catch{return""}}).filter(Boolean).join("; ")||o.name||"AggregateError"}let X=class Mi extends Error{static from(h,l,d,M,y,p){let w=h.message;!w&&z.isArray(h.errors)&&h.errors.length&&(w=bo(h));const a=new Mi(w,l||h.code,d,M,y);return Object.defineProperty(a,"cause",{__proto__:null,value:h,writable:!0,enumerable:!1,configurable:!0}),a.name=h.name,h.status!=null&&a.status==null&&(a.status=h.status),p&&Object.assign(a,p),a}constructor(h,l,d,M,y){super(h),Object.defineProperty(this,"message",{__proto__:null,value:h,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,l&&(this.code=l),d&&(this.config=d),M&&(this.request=M),y&&(this.response=y,this.status=y.status)}toJSON(){const h=this.config,l=h&&z.hasOwnProp(h,"redact")?h.redact:void 0,d=z.isArray(l)&&l.length>0?wo(h,l):z.toJSONObject(h);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:d,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",X.ERR_BAD_OPTION="ERR_BAD_OPTION",X.ECONNABORTED="ECONNABORTED",X.ETIMEDOUT="ETIMEDOUT",X.ECONNREFUSED="ECONNREFUSED",X.ERR_NETWORK="ERR_NETWORK",X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",X.ERR_DEPRECATED="ERR_DEPRECATED",X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",X.ERR_BAD_REQUEST="ERR_BAD_REQUEST",X.ERR_CANCELED="ERR_CANCELED",X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",X.ERR_INVALID_URL="ERR_INVALID_URL",X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Co=null,In=100;function It(o){return z.isPlainObject(o)||z.isArray(o)}function On(o){return z.endsWith(o,"[]")?o.slice(0,-2):o}function Ot(o,h,l){return o?o.concat(h).map(function(d,M){return d=On(d),!l&&M?"["+d+"]":d}).join(l?".":""):h}function $o(o){return z.isArray(o)&&!o.some(It)}const So=z.toFlatObject(z,{},null,function(o){return/^is[A-Z]/.test(o)});function lt(o,h,l){if(!z.isObject(o))throw new TypeError("target must be an object");h=h||new FormData;const d=(g,k)=>{const $=z.getSafeProp(l,g);return z.isUndefined($)?k:$},M=d("metaTokens",!0),y=d("visitor")||i,p=d("dots",!1),w=d("indexes",!1),a=d("Blob")||typeof Blob<"u"&&Blob,u=d("maxDepth",In),r=a&&z.isSpecCompliantForm(h),s=[];if(!z.isFunction(y))throw new TypeError("visitor must be a function");function n(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!r&&z.isBlob(g))throw new X("Blob is not supported. Use a Buffer instead.");if(z.isArrayBuffer(g)||z.isTypedArray(g)){if(r&&typeof a=="function")return new a([g]);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return g}function t(g){if(g>u)throw new X("Object is too deeply nested ("+g+" levels). Max depth: "+u,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function e(g,k){if(u===1/0)return JSON.stringify(g);const $=[];return JSON.stringify(g,function(C,b){if(!z.isObject(b))return b;for(;$.length&&$[$.length-1]!==this;)$.pop();return $.push(b),t(k+$.length-1),b})}function i(g,k,$){let C=g;if(z.isReactNative(h)&&z.isReactNativeBlob(g))return h.append(Ot($,k,p),n(g)),!1;if(g&&!$&&typeof g=="object"){if(z.endsWith(k,"{}"))k=M?k:k.slice(0,-2),g=e(g,1);else if(z.isArray(g)&&$o(g)||(z.isFileList(g)||z.endsWith(k,"[]"))&&(C=z.toArray(g)))return k=On(k),C.forEach(function(b,T){!(z.isUndefined(b)||b===null)&&h.append(w===!0?Ot([k],T,p):w===null?k:k+"[]",n(b))}),!1}return It(g)?!0:(h.append(Ot($,k,p),n(g)),!1)}const c=Object.assign(So,{defaultVisitor:i,convertValue:n,isVisitable:It});function f(g,k,$=0){if(!z.isUndefined(g)){if(t($),s.indexOf(g)!==-1)throw new Error("Circular reference detected in "+k.join("."));s.push(g),z.forEach(g,function(C,b){(!(z.isUndefined(C)||C===null)&&y.call(h,C,z.isString(b)?b.trim():b,k,c))===!0&&f(C,k?k.concat(b):[b],$+1)}),s.pop()}}if(!z.isObject(o))throw new TypeError("data must be an object");return f(o),h}function Dn(o){const h={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(o).replace(/[!'()~]|%20/g,function(l){return h[l]})}function Dt(o,h){this._pairs=[],o&<(o,this,h)}const Nn=Dt.prototype;Nn.append=function(o,h){this._pairs.push([o,h])},Nn.toString=function(o){const h=o?l=>o.call(this,l,Dn):Dn;return this._pairs.map(function(l){return h(l[0])+"="+h(l[1])},"").join("&")};function _o(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fn(o,h,l){if(!h)return o;o=o||"";const d=z.isFunction(l)?{serialize:l}:l,M=z.getSafeProp(d,"encode")||_o,y=z.getSafeProp(d,"serialize");let p;if(y?p=y(h,d):p=z.isURLSearchParams(h)?h.toString():new Dt(h,d).toString(M),p){const w=o.indexOf("#");w!==-1&&(o=o.slice(0,w)),o+=(o.indexOf("?")===-1?"?":"&")+p}return o}const je=Symbol("internals");function Pn(o){return o?o.length:0}function Wn(o){if(o)for(;o.length&&o[o.length-1]===null;)o.pop()}function Ge(o,h){const l=o.handlers,d=Pn(l);l!==h.handlersRef?(h.handlersRef=l,h.handlerEntries.clear()):d!==h.handlersLength&&(d?h.handlerEntries.forEach(function(M,y){l[M.index]!==M.handler&&h.handlerEntries.delete(y)}):h.handlerEntries.clear()),h.handlersLength=d}class zn{constructor(){this.handlers=[],this[je]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(h,l,d){const M={fulfilled:h,rejected:l,synchronous:d?d.synchronous:!1,runWhen:d?d.runWhen:null},y=this[je];this.handlers==null&&(this.handlers=[]),Ge(this,y);const p=y.nextId++;return this.handlers.push(M),y.handlerEntries.set(p,{handler:M,index:this.handlers.length-1}),y.handlersLength=this.handlers.length,p}eject(h){const l=this[je];Ge(this,l);const d=l.handlerEntries.get(h);if(d){if(l.handlerEntries.delete(h),this.handlers[d.index]!==d.handler)return;this.handlers[d.index]=null,l.iterationDepth||(Wn(this.handlers),l.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Ge(this,this[je]))}forEach(h){const l=this[je];Ge(this,l),l.iterationDepth++;try{z.forEach(this.handlers,function(d){d!==null&&h(d)})}finally{--l.iterationDepth||(Ge(this,l),Wn(this.handlers),l.handlersLength=Pn(this.handlers))}}}const Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xo=typeof URLSearchParams<"u"?URLSearchParams:Dt,Ao=typeof FormData<"u"?FormData:null,ko=typeof Blob<"u"?Blob:null,Eo={isBrowser:!0,classes:{URLSearchParams:xo,FormData:Ao,Blob:ko},protocols:["http","https","file","blob","url","data"]},Ft=typeof window<"u"&&typeof document<"u",Pt=typeof navigator=="object"&&navigator||void 0,Mo=Ft&&(!Pt||["ReactNative","NativeScript","NS"].indexOf(Pt.product)<0),To=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lo=Ft&&window.location.href||"http://localhost",Ro=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ft,hasStandardBrowserEnv:Mo,hasStandardBrowserWebWorkerEnv:To,navigator:Pt,origin:Lo},Symbol.toStringTag,{value:"Module"})),ge={...Ro,...Eo};function Io(o,h){return lt(o,new ge.classes.URLSearchParams,{visitor:function(l,d,M,y){return ge.isNode&&z.isBuffer(l)?(this.append(d,l.toString("base64")),!1):y.defaultVisitor.apply(this,arguments)},...h})}const Bn=In;function Hn(o){if(o>Bn)throw new X("FormData field is too deeply nested ("+o+" levels). Max depth: "+Bn,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Oo(o){const h=[],l=/[^.[\]]+|\[([^.[\]]*)]/g;let d;for(;(d=l.exec(o))!==null;)Hn(h.length),h.push(d[0]==="[]"?"":d[1]||d[0]);return h}function Do(o){const h={},l=Object.keys(o);let d;const M=l.length;let y;for(d=0;d<M;d++)y=l[d],h[y]=o[y];return h}function Un(o){function h(l,d,M,y){Hn(y);let p=l[y++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),a=y>=l.length;return p=!p&&z.isArray(M)?M.length:p,a?(z.hasOwnProp(M,p)?M[p]=z.isArray(M[p])?M[p].concat(d):[M[p],d]:M[p]=d,!w):((!z.hasOwnProp(M,p)||!z.isObject(M[p]))&&(M[p]=[]),h(l,d,M[p],y)&&z.isArray(M[p])&&(M[p]=Do(M[p])),!w)}if(z.isFormData(o)&&z.isFunction(o.entries)){const l={};return z.forEachEntry(o,(d,M)=>{h(Oo(d),M,l,0)}),l}return null}const Vn=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ne=(o,h)=>o!=null&&z.hasOwnProp(o,h)?o[h]:void 0;function No(o,h,l){if(z.isString(o))try{return(h||JSON.parse)(o),z.trim(o)}catch(d){if(d.name!=="SyntaxError")throw d}return(l||JSON.stringify)(o)}const Ke={transitional:Nt,adapter:["xhr","http","fetch"],transformRequest:[function(o,h){const l=h.getContentType()||"",d=l.indexOf("application/json")>-1,M=z.isObject(o);if(M&&z.isHTMLForm(o)&&(o=new FormData(o)),z.isFormData(o))return d?JSON.stringify(Un(o)):o;if(z.isArrayBuffer(o)||z.isBuffer(o)||z.isStream(o)||z.isFile(o)||z.isBlob(o)||z.isReadableStream(o))return o;if(z.isArrayBufferView(o))return o.buffer;if(z.isURLSearchParams(o))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let y;if(M){const p=Ne(this,"formSerializer");if(l.indexOf("application/x-www-form-urlencoded")>-1)return Io(o,p).toString();if((y=z.isFileList(o))||l.indexOf("multipart/form-data")>-1){const w=Ne(this,"env"),a=w&&w.FormData;return lt(y?{"files[]":o}:o,a&&new a,p)}}return M||d?(h.setContentType("application/json",!1),No(o)):o}],transformResponse:[function(o){const h=Ne(this,"transitional")||Ke.transitional,l=h&&h.forcedJSONParsing,d=Ne(this,"responseType"),M=d==="json";if(z.isResponse(o)||z.isReadableStream(o))return o;if(o&&z.isString(o)&&(l&&!d||M)){const y=!(h&&h.silentJSONParsing)&&M;try{return JSON.parse(o,Ne(this,"parseReviver"))}catch(p){if(y)throw p.name==="SyntaxError"?X.from(p,X.ERR_BAD_RESPONSE,this,null,Ne(this,"response")):p}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(Vn,o=>{Ke.headers[o]={}});function Wt(o,h){const l=this||Ke,d=h||l,M=me.from(d.headers);let y=d.data;return z.forEach(o,function(p){y=p.call(l,y,M.normalize(),h?h.status:void 0)}),M.normalize(),y}function jn(o){return!!(o&&o.__CANCEL__)}let Ye=class extends X{constructor(o,h,l){super(o??"canceled",X.ERR_CANCELED,h,l),this.name="CanceledError",this.__CANCEL__=!0}};function Gn(o,h,l){const d=l.config.validateStatus;!l.status||!d||d(l.status)?o(l):h(new X("Request failed with status code "+l.status,l.status>=400&&l.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,l.config,l.request,l))}const Fo=/[\t\n\r]/g;function Kn(o){if(typeof o!="string")return o;let h=0;for(;h<o.length&&o.charCodeAt(h)<=32;)h++;return o.slice(h).replace(Fo,"")}function zt(o){const h=/^([-+\w]{1,25}):(?:\/\/)?/.exec(o);return h&&h[1]||""}function Po(o,h){o=o||10;const l=new Array(o),d=new Array(o);let M=0,y=0,p;return h=h!==void 0?h:1e3,function(w){const a=Date.now(),u=d[y];p||(p=a),l[M]=w,d[M]=a;let r=y,s=0;for(;r!==M;)s+=l[r++],r=r%o;if(M=(M+1)%o,M===y&&(y=(y+1)%o),a-p<h)return;const n=u&&a-u;return n?Math.round(s*1e3/n):void 0}}function Wo(o,h){let l=0,d=1e3/h,M,y;const p=(w,a=Date.now())=>{l=a,M=null,y&&(clearTimeout(y),y=null),o(...w)};return[(...w)=>{const a=Date.now(),u=a-l;u>=d?p(w,a):(M=w,y||(y=setTimeout(()=>{y=null,p(M)},d-u)))},()=>M&&p(M),(...w)=>p(w)]}const ct=(o,h,l=3)=>{let d=0;const M=Po(50,250);return Wo(y=>{if(!y||!z.isNumber(y.loaded))return;const p=y.loaded,w=y.lengthComputable?y.total:void 0,a=Math.max(0,w!=null?Math.min(p,w):p),u=Math.max(0,a-d),r=M(u);d=Math.max(d,a);const s={loaded:a,total:w,progress:w?a/w:void 0,bytes:u,rate:r||void 0,estimated:r&&w?(w-a)/r:void 0,event:y,lengthComputable:w!=null,[h?"download":"upload"]:!0};o(s)},l)},Yn=(o,h)=>{const l=o!=null;return[d=>h[0]({lengthComputable:l,total:o,loaded:d}),h[1]]},Qn=(o,h=z.asap)=>(...l)=>h(()=>o(...l)),zo=ge.hasStandardBrowserEnv?((o,h)=>l=>(l=new URL(l,ge.origin),o.protocol===l.protocol&&o.host===l.host&&(h||o.port===l.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,Bo=ge.hasStandardBrowserEnv?{write(o,h,l,d,M,y,p){if(typeof document>"u")return;const w=[`${o}=${encodeURIComponent(h)}`];z.isNumber(l)&&w.push(`expires=${new Date(l).toUTCString()}`),z.isString(d)&&w.push(`path=${d}`),z.isString(M)&&w.push(`domain=${M}`),y===!0&&w.push("secure"),z.isString(p)&&w.push(`SameSite=${p}`),document.cookie=w.join("; ")},read(o){if(typeof document>"u")return null;const h=document.cookie.split(";");for(let l=0;l<h.length;l++){const d=h[l].replace(/^\s+/,""),M=d.indexOf("=");if(M!==-1&&d.slice(0,M)===o)try{return decodeURIComponent(d.slice(M+1))}catch{return d.slice(M+1)}}return null},remove(o){this.write(o,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ho(o){return typeof o!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function Uo(o,h){if(!h)return o;let l=o.length;for(;l>0&&o.charCodeAt(l-1)===47;)l--;return o.slice(0,l)+"/"+h.replace(/^\/+/,"")}const Vo=/^https?:(?!\/\/)/i;function jo(o){return o&&o.replace(/(^|&)([^=&]*=)?[^&]+/g,(h,l,d="")=>`${l}${d}${at}`)}function Go(o){const h=o.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${at}@`),l=h.indexOf("#"),d=(l===-1?h:h.slice(0,l)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${at}`);return l===-1?d:`${d}#${jo(h.slice(l+1))}`}function Zn(o,h){if(typeof o=="string"){const l=Kn(o);if(Vo.test(l))throw new X(`Invalid URL ${JSON.stringify(Go(l))}: missing "//" after protocol`,X.ERR_INVALID_URL,h)}}function Xn(o,h,l,d){Zn(h,d);let M=!Ho(h);return o&&(M||l===!1)?(Zn(o,d),Uo(o,h)):h}const Jn=o=>o instanceof me?{...o}:o,Ko=o=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(o).concat(Object.getOwnPropertySymbols(o).filter(h=>Object.getOwnPropertyDescriptor(o,h).enumerable)):Object.keys(o);function Le(o,h){o=o||{},h=h||{};const l=Object.create(null);Object.defineProperty(l,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function d(r,s,n,t){return z.isPlainObject(r)&&z.isPlainObject(s)?z.merge.call({caseless:t},r,s):z.isPlainObject(s)?z.merge({},s):z.isArray(s)?s.slice():s}function M(r,s,n,t){if(z.isUndefined(s)){if(!z.isUndefined(r))return d(void 0,r,n,t)}else return d(r,s,n,t)}function y(r,s){if(!z.isUndefined(s))return d(void 0,s)}function p(r,s){if(z.isUndefined(s)){if(!z.isUndefined(r))return d(void 0,r)}else return d(void 0,s)}function w(r){const s=z.hasOwnProp(h,"transitional")?h.transitional:void 0;if(!z.isUndefined(s))if(z.isPlainObject(s)){if(z.hasOwnProp(s,r))return s[r]}else return;const n=z.hasOwnProp(o,"transitional")?o.transitional:void 0;if(z.isPlainObject(n)&&z.hasOwnProp(n,r))return n[r]}function a(r,s,n){if(z.hasOwnProp(h,n))return d(r,s);if(z.hasOwnProp(o,n))return d(void 0,r)}const u={url:y,method:y,data:y,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutErrorMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,allowedSocketPaths:p,responseEncoding:p,validateStatus:a,headers:(r,s,n)=>M(Jn(r),Jn(s),n,!0)};return z.forEach(Ko({...o,...h}),function(r){if(r==="__proto__"||r==="constructor"||r==="prototype")return;const s=z.hasOwnProp(u,r)?u[r]:M,n=z.hasOwnProp(o,r)?o[r]:void 0,t=z.hasOwnProp(h,r)?h[r]:void 0,e=s(n,t,r);z.isUndefined(e)&&s!==a||(l[r]=e)}),z.hasOwnProp(h,"validateStatus")&&z.isUndefined(h.validateStatus)&&w("validateStatusUndefinedResolves")===!1&&(z.hasOwnProp(o,"validateStatus")?l.validateStatus=d(void 0,o.validateStatus):delete l.validateStatus),l}const Yo=["content-type","content-length"];function Qo(o,h,l){if(l!=="content-only"){o.set(h);return}Object.entries(h||{}).forEach(([d,M])=>{Yo.includes(d.toLowerCase())&&o.set(d,M)})}const Zo=o=>encodeURIComponent(o).replace(/%([0-9A-F]{2})/gi,(h,l)=>String.fromCharCode(parseInt(l,16)));function qn(o){const h=Le({},o),l=n=>z.hasOwnProp(h,n)?h[n]:void 0,d=l("data");let M=l("withXSRFToken");const y=l("xsrfHeaderName"),p=l("xsrfCookieName");let w=l("headers");const a=l("auth"),u=l("baseURL"),r=l("allowAbsoluteUrls"),s=l("url");if(h.headers=w=me.from(w),h.url=Fn(Xn(u,s,r,h),l("params"),l("paramsSerializer")),a){const n=z.getSafeProp(a,"username")||"",t=z.getSafeProp(a,"password")||"";try{w.set("Authorization","Basic "+btoa(n+":"+(t?Zo(t):"")))}catch(e){throw X.from(e,X.ERR_BAD_OPTION_VALUE,o)}}if(z.isFormData(d)){const n=z.getSafeProp(d,"getHeaders");ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv||z.isReactNative(d)?w.setContentType(void 0):z.isFunction(n)&&Qo(w,n.call(d),l("formDataHeaderPolicy"))}if(ge.hasStandardBrowserEnv&&(z.isFunction(M)&&(M=M(h)),M===!0||M==null&&zo(h.url))){const n=y&&p&&Bo.read(p);n&&w.set(y,n)}return h}const Xo=typeof XMLHttpRequest<"u",Jo=Xo&&function(o){return new Promise(function(h,l){const d=qn(o);let M=d.data;const y=me.from(d.headers).normalize();let{responseType:p,onUploadProgress:w,onDownloadProgress:a}=d,u,r,s,n,t,e;function i(){n&&n(),t&&t(),d.cancelToken&&d.cancelToken.unsubscribe(u),d.signal&&d.signal.removeEventListener("abort",u)}let c=new XMLHttpRequest;c.open(d.method.toUpperCase(),d.url,!0),c.timeout=d.timeout;function f(k){if(!c)return;if(c.status===0&&(zt(Kn(d.url))||zt(ge.origin))!=="file"&&!(c.responseURL&&c.responseURL.startsWith("file:"))){l(new X("Request aborted",X.ECONNABORTED,o,c)),i(),c=null;return}try{k?e&&e(k):t&&t()}catch(b){setTimeout(()=>{throw b})}if(!c)return;const $=me.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),C={data:!p||p==="text"||p==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:$,config:o,request:c};Gn(function(b){h(b),i()},function(b){l(b),i()},C),c=null}"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(f)},c.onabort=function(){c&&(l(new X("Request aborted",X.ECONNABORTED,o,c)),i(),c=null)},c.onerror=function(k){const $=k&&k.message?k.message:"Network Error",C=new X($,X.ERR_NETWORK,o,c);C.event=k||null,l(C),i(),c=null},c.ontimeout=function(){let k=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const $=d.transitional||Nt;d.timeoutErrorMessage&&(k=d.timeoutErrorMessage),l(new X(k,$.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,o,c)),i(),c=null},M===void 0&&y.setContentType(null),"setRequestHeader"in c&&z.forEach(Tn(y),function(k,$){c.setRequestHeader($,k)}),z.isUndefined(d.withCredentials)||(c.withCredentials=!!d.withCredentials),p&&p!=="json"&&(c.responseType=d.responseType),a&&([s,t,e]=ct(a,!0),c.addEventListener("progress",s)),w&&c.upload&&([r,n]=ct(w),c.upload.addEventListener("progress",r),c.upload.addEventListener("loadend",n)),(d.cancelToken||d.signal)&&(u=k=>{c&&(l(!k||k.type?new Ye(null,o,c):k),c.abort(),i(),c=null)},d.cancelToken&&d.cancelToken.subscribe(u),d.signal&&(d.signal.aborted?u():d.signal.addEventListener("abort",u)));const g=zt(d.url);if(g&&!ge.protocols.includes(g)){l(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,o)),i();return}c.send(M||null)})},qo=(o,h)=>{if(o=o?o.filter(Boolean):[],!h&&!o.length)return;const l=new AbortController;let d=!1;const M=function(a){if(!d){d=!0,p();const u=a instanceof Error?a:this.reason;l.abort(u instanceof X?u:new Ye(u instanceof Error?u.message:u))}};let y=h&&setTimeout(()=>{y=null,M(new X(`timeout of ${h}ms exceeded`,X.ETIMEDOUT))},h);const p=()=>{o&&(y&&clearTimeout(y),y=null,o.forEach(a=>{a.unsubscribe?a.unsubscribe(M):a.removeEventListener("abort",M)}),o=null)};o.forEach(a=>{if(!d){if(a.aborted){M.call(a);return}a.addEventListener("abort",M,{once:!0})}});const{signal:w}=l;return w.unsubscribe=()=>z.asap(p),w},es=function*(o,h){let l=o.byteLength;if(l<h){yield o;return}let d=0,M;for(;d<l;)M=d+h,yield o.slice(d,M),d=M},ts=async function*(o,h){for await(const l of ns(o))yield*es(l,h)},ns=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const h=o.getReader();try{for(;;){const{done:l,value:d}=await h.read();if(l)break;yield d}}finally{await h.cancel()}},ei=(o,h,l,d)=>{const M=ts(o,h);let y=0,p,w=a=>{p||(p=!0,d&&d(a))};return new ReadableStream({async pull(a){try{const{done:u,value:r}=await M.next();if(u){w(),a.close();return}let s=r.byteLength;if(l){let n=y+=s;l(n)}a.enqueue(new Uint8Array(r))}catch(u){throw w(u),u}},cancel(a){return w(a),M.return()}},{highWaterMark:2})},ti=o=>o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102,ni=(o,h,l)=>h+2<l&&ti(o.charCodeAt(h+1))&&ti(o.charCodeAt(h+2)),ii=o=>o<=57?o-48:(o&223)-55,is=o=>o>=65&&o<=90||o>=97&&o<=122||o>=48&&o<=57||o===43||o===47||o===45||o===95,rs=o=>o===9||o===10||o===12||o===13||o===32,os=o=>{const h=Math.floor(o/4),l=o%4;return h*3+(l===2?1:l===3?2:0)},ss=o=>{const h=o.length;let l=0;return h>0&&o.charCodeAt(h-1)===61&&(l++,h>1&&o.charCodeAt(h-2)===61&&l++),Math.floor((h-l)*3/4)},as=o=>{const h=o.length;let l=0,d=0,M=!1;for(let y=0;y<h;y++){let p=o.charCodeAt(y);if(p===37&&ni(o,y,h)&&(p=ii(o.charCodeAt(y+1))*16+ii(o.charCodeAt(y+2)),y+=2),!rs(p)){if(p===61){d++;continue}if(!is(p)||d>0){M=!0;continue}l++}}return M||d>2||d>0&&(l+d)%4!==0||l%4===1?ss(o):os(l)},ls=(o,h)=>{if(!o||typeof o!="string"||!o.startsWith("data:"))return 0;const l=o.indexOf(",");if(l<0)return 0;const d=o.slice(5,l),M=o.slice(l+1);if(/;base64/i.test(d))return h(M);let y=0;for(let p=0,w=M.length;p<w;p++){const a=M.charCodeAt(p);if(a===37&&ni(M,p,w))y+=1,p+=2;else if(a<128)y+=1;else if(a<2048)y+=2;else if(a>=55296&&a<=56319&&p+1<w){const u=M.charCodeAt(p+1);u>=56320&&u<=57343?(y+=4,p++):y+=3}else y+=3}return y};function cs(o){const h=typeof o=="string"?o.indexOf("#"):-1;return ls(h===-1?o:o.slice(0,h),as)}const Bt="1.20.0",ri=64*1024,hs={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:ht}=z,us=o=>encodeURIComponent(o).replace(/%([0-9A-F]{2})/gi,(h,l)=>String.fromCharCode(parseInt(l,16))),oi=o=>{if(!z.isString(o))return o;try{return decodeURIComponent(o)}catch{return o}},si=(o,...h)=>{try{return!!o(...h)}catch{return!1}},ds=o=>{const h=o.indexOf("://");let l=o;return h!==-1&&(l=l.slice(h+3)),l.includes("@")||l.includes(":")},fs=o=>{const h=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:l,TextEncoder:d}=h;o=z.merge.call({skipUndefined:!0},{Request:h.Request,Response:h.Response},o);const{fetch:M,Request:y,Response:p}=o,w=M?ht(M):typeof fetch=="function",a=ht(y),u=ht(p);if(!w)return!1;const r=w&&ht(l),s=w&&(typeof d=="function"?(f=>g=>f.encode(g))(new d):async f=>new Uint8Array(await new y(f).arrayBuffer())),n=a&&r&&si(()=>{let f=!1;const g=new y(ge.origin,{body:new l,method:"POST",get duplex(){return f=!0,"half"}}),k=g.headers.has("Content-Type");return g.body!=null&&g.body.cancel(),f&&!k}),t=u&&r&&si(()=>z.isReadableStream(new p("").body)),e={stream:t&&(f=>f.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!e[f]&&(e[f]=(g,k)=>{let $=g&&g[f];if($)return $.call(g);throw new X(`Response type '${f}' is not supported`,X.ERR_NOT_SUPPORT,k)})});const i=async f=>{if(f==null)return 0;if(z.isBlob(f))return f.size;if(z.isSpecCompliantForm(f))return(await new y(ge.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(z.isArrayBufferView(f)||z.isArrayBuffer(f))return f.byteLength;if(z.isURLSearchParams(f)&&(f=f+""),z.isString(f))return(await s(f)).byteLength},c=async(f,g)=>z.toFiniteNumber(f.getContentLength())??i(g);return async f=>{let{url:g,method:k,data:$,signal:C,cancelToken:b,timeout:T,onDownloadProgress:L,onUploadProgress:A,responseType:S,headers:I,withCredentials:E="same-origin",fetchOptions:x,maxContentLength:v,maxBodyLength:m,maxRedirects:_}=qn(f);const R=z.isNumber(v)&&v>-1,O=z.isNumber(m)&&m>-1,D=V=>z.hasOwnProp(f,V)?f[V]:void 0;let N=M||fetch;S=S?(S+"").toLowerCase():"text";let P=qo([C,b&&b.toAbortSignal()],T),U=null;const F=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let W,B=null;const H=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,f,U);try{let V;const G=D("auth");if(G){const ee=z.getSafeProp(G,"username")||"",de=z.getSafeProp(G,"password")||"";V={username:ee,password:de}}if(ds(g)){const ee=new URL(g,ge.origin);if(!V&&(ee.username||ee.password)){const de=oi(ee.username),Ce=oi(ee.password);V={username:de,password:Ce}}(ee.username||ee.password)&&(ee.username="",ee.password="",g=ee.href)}if(V&&(I.delete("authorization"),I.set("Authorization","Basic "+btoa(us((V.username||"")+":"+(V.password||""))))),R&&typeof g=="string"&&g.startsWith("data:")&&cs(g)>v)throw new X("maxContentLength size of "+v+" exceeded",X.ERR_BAD_RESPONSE,f,U);if(O&&k!=="get"&&k!=="head"){const ee=await i($);if(typeof ee=="number"&&isFinite(ee)&&(W=ee,ee>m))throw H()}const Y=O&&(z.isReadableStream($)||z.isStream($)),Q=(ee,de,Ce)=>ei(ee,ri,$e=>{if(O&&$e>m)throw B=H();de&&de($e)},Ce);if(n&&k!=="get"&&k!=="head"&&(A||Y)){if(W=W??await c(I,$),W!==0||Y){let ee=new y(g,{method:"POST",body:$,duplex:"half"}),de;if(z.isFormData($)&&(de=ee.headers.get("content-type"))&&I.setContentType(de),ee.body){const[Ce,$e]=A&&Yn(W,ct(Qn(A)))||[];$=Q(ee.body,Ce,$e)}}}else if(Y&&!a&&r&&k!=="get"&&k!=="head")$=Q($);else if(Y&&a&&!n&&k!=="get"&&k!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,f,U);z.isString(E)||(E=E?"include":"omit");const ne=a&&"credentials"in y.prototype;if(z.isFormData($)){const ee=I.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&I.delete("content-type")}I.set("User-Agent","axios/"+Bt,!1);const q=x==null?x:Object.assign(Object.create(null),x);q&&(delete q.body,delete q.headers,delete q.method,delete q.signal,delete q.duplex,delete q.credentials);const ie=Object.assign(Object.create(null),q,{signal:P,method:k.toUpperCase(),headers:Tn(I.normalize()),body:$,duplex:"half",credentials:ne?E:void 0});a&&(z.forEach(hs,(ee,de)=>{ie[de]===void 0&&(ie[de]=ee)}),ie.signal===void 0&&(ie.signal=null),ie.body===void 0&&(ie.body=null)),_===0&&(ie.redirect="manual",q&&(q.redirect="manual")),U=a&&new y(g,ie);let se=await(a?N(U,q):N(g,ie));const ae=me.from(se.headers);if(R){const ee=z.toFiniteNumber(ae.getContentLength());if(ee!=null&&ee>v)throw new X("maxContentLength size of "+v+" exceeded",X.ERR_BAD_RESPONSE,f,U)}const ue=t&&(S==="stream"||S==="response");if(t&&se.body&&(L||R||ue&&F)){const ee={};["status","statusText","headers"].forEach(Ze=>{ee[Ze]=se[Ze]});const de=z.toFiniteNumber(ae.getContentLength()),[Ce,$e]=L&&Yn(de,ct(Qn(L),!0))||[];let Ei=0;const ga=Ze=>{if(R&&(Ei=Ze,Ei>v))throw new X("maxContentLength size of "+v+" exceeded",X.ERR_BAD_RESPONSE,f,U);Ce&&Ce(Ze)};se=new p(ei(se.body,ri,ga,()=>{$e&&$e(),F&&F()}),ee)}S=S||"text";let ye=await e[z.findKey(e,S)||"text"](se,f);if(R&&!t&&!ue){let ee;if(ye!=null&&(typeof ye.byteLength=="number"?ee=ye.byteLength:typeof ye.size=="number"?ee=ye.size:typeof ye=="string"&&(ee=typeof d=="function"?new d().encode(ye).byteLength:ye.length)),typeof ee=="number"&&ee>v)throw new X("maxContentLength size of "+v+" exceeded",X.ERR_BAD_RESPONSE,f,U)}return!ue&&F&&F(),await new Promise((ee,de)=>{Gn(ee,de,{data:ye,headers:me.from(se.headers),status:se.status,statusText:se.statusText,config:f,request:U})})}catch(V){if(F&&F(),P&&P.aborted&&P.reason instanceof X){const G=P.reason;throw G.config=f,U&&(G.request=U),V!==G&&Object.defineProperty(G,"cause",{__proto__:null,value:V,writable:!0,enumerable:!1,configurable:!0}),G}if(B)throw U&&!B.request&&(B.request=U),B;if(V instanceof X)throw U&&!V.request&&(V.request=U),V;if(V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)){const G=new X("Network Error",X.ERR_NETWORK,f,U,V&&V.response);throw Object.defineProperty(G,"cause",{__proto__:null,value:V.cause||V,writable:!0,enumerable:!1,configurable:!0}),G}throw X.from(V,V&&V.code,f,U,V&&V.response)}}},gs=new Map,ai=o=>{let h=o&&o.env||{};const{fetch:l,Request:d,Response:M}=h,y=[d,M,l];let p=y.length,w=p,a,u,r=gs;for(;w--;)a=y[w],u=r.get(a),u===void 0&&r.set(a,u=w?new Map:fs(h)),r=u;return u};ai();const Ht={http:Co,xhr:Jo,fetch:{get:ai}};z.forEach(Ht,(o,h)=>{if(o){try{Object.defineProperty(o,"name",{__proto__:null,value:h})}catch{}Object.defineProperty(o,"adapterName",{__proto__:null,value:h})}});const li=o=>`- ${o}`,ps=o=>z.isFunction(o)||o===null||o===!1;function ms(o,h){o=z.isArray(o)?o:[o];const{length:l}=o;let d,M;const y={};for(let p=0;p<l;p++){d=o[p];let w;if(M=d,!ps(d)&&(M=Ht[(w=String(d)).toLowerCase()],M===void 0))throw new X(`Unknown adapter '${w}'`);if(M&&(z.isFunction(M)||(M=M.get(h))))break;y[w||"#"+p]=M}if(!M){const p=Object.entries(y).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let w=l?p.length>1?`since :
|
|
1115
|
+
`+p.map(li).join(`
|
|
1116
|
+
`):" "+li(p[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+w,X.ERR_NOT_SUPPORT)}return M}const ci={getAdapter:ms,adapters:Ht};function Ut(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new Ye(null,o)}function Vt(o){const h=z.toSafeFlatObject(o);return Ut(h),h.headers=me.from(z.getSafeProp(h,"headers")),h.data=Wt.call(h,h.transformRequest),["post","put","patch"].indexOf(h.method)!==-1&&h.headers.setContentType("application/x-www-form-urlencoded",!1),ci.getAdapter(h.adapter||Ke.adapter,h)(h).then(function(l){Ut(h),h.response=l;try{l.data=Wt.call(h,h.transformResponse,l)}finally{delete h.response}return l.headers=me.from(l.headers),l},function(l){if(!jn(l)&&(Ut(h),l&&l.response)){h.response=l.response;try{l.response.data=Wt.call(h,h.transformResponse,l.response)}finally{delete h.response}l.response.headers=me.from(l.response.headers)}return Promise.reject(l)})}const ut={};["object","boolean","number","function","string","symbol"].forEach((o,h)=>{ut[o]=function(l){return typeof l===o||"a"+(h<1?"n ":" ")+o}});const hi={};ut.transitional=function(o,h,l){function d(M,y){return"[Axios v"+Bt+"] Transitional option '"+M+"'"+y+(l?". "+l:"")}return(M,y,p)=>{if(o===!1)throw new X(d(y," has been removed"+(h?" in "+h:"")),X.ERR_DEPRECATED);return h&&!hi[y]&&(hi[y]=!0,console.warn(d(y," has been deprecated since v"+h+" and will be removed in the near future"))),o?o(M,y,p):!0}},ut.spelling=function(o){return(h,l)=>(console.warn(`${l} is likely a misspelling of ${o}`),!0)};function vs(o,h,l){if(typeof o!="object"||o===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const d=Object.keys(o);let M=d.length;for(;M-- >0;){const y=d[M],p=Object.prototype.hasOwnProperty.call(h,y)?h[y]:void 0;if(p){const w=o[y],a=w===void 0||p(w,y,o);if(a!==!0)throw new X("option "+y+" must be "+a,X.ERR_BAD_OPTION_VALUE);continue}if(l!==!0)throw new X("Unknown option "+y,X.ERR_BAD_OPTION)}}const dt={assertOptions:vs,validators:ut},ve=dt.validators;let Re=class{constructor(o){this.defaults=o||{},this.interceptors={request:new zn,response:new zn}}async request(o,h){try{return await this._request(o,h)}catch(l){if(l instanceof Error)try{let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const M=d.stack;let y="";if(typeof M=="string"){const p=M.indexOf(`
|
|
1117
|
+
`);y=p===-1?"":M.slice(p+1)}if(!l.stack)l.stack=y;else if(y){const p=y.indexOf(`
|
|
1118
|
+
`),w=p===-1?-1:y.indexOf(`
|
|
1119
|
+
`,p+1),a=w===-1?"":y.slice(w+1);String(l.stack).endsWith(a)||(l.stack+=`
|
|
1120
|
+
`+y)}}catch{}throw l}}_request(o,h){typeof o=="string"?(h=h||{},h.url=o):h=o||{},h=Le(this.defaults,h);const{transitional:l,paramsSerializer:d,headers:M}=h;l!==void 0&&dt.assertOptions(l,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean),legacyInterceptorReqResOrdering:ve.transitional(ve.boolean),advertiseZstdAcceptEncoding:ve.transitional(ve.boolean),validateStatusUndefinedResolves:ve.transitional(ve.boolean)},!1),d!=null&&(z.isFunction(d)?h.paramsSerializer={serialize:d}:dt.assertOptions(d,{encode:ve.function,serialize:ve.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),dt.assertOptions(h,{baseUrl:ve.spelling("baseURL"),withXsrfToken:ve.spelling("withXSRFToken")},!0),h.method=(z.getSafeProp(h,"method")||z.getSafeProp(this.defaults,"method")||"get").toLowerCase();let y=M&&z.merge(M.common,M[h.method]);M&&z.forEach(Vn.concat("common"),t=>{delete M[t]}),h.headers=me.concat(y,M);const p=[];let w=!0;this.interceptors.request.forEach(function(t){if(typeof t.runWhen=="function"&&t.runWhen(h)===!1)return;w=w&&t.synchronous;const e=h.transitional||Nt;e&&e.legacyInterceptorReqResOrdering?p.unshift(t.fulfilled,t.rejected):p.push(t.fulfilled,t.rejected)});const a=[];this.interceptors.response.forEach(function(t){a.push(t.fulfilled,t.rejected)});let u,r=0,s;if(!w){const t=[Vt.bind(this),void 0];for(t.unshift(...p),t.push(...a),s=t.length,u=Promise.resolve(h);r<s;)u=u.then(t[r++],t[r++]);return u}s=p.length;let n=h;for(;r<s;){const t=p[r++],e=p[r++];try{n=t?t(n):n}catch(i){if(!e){u=Promise.reject(i);break}try{const c=e.call(this,i);z.isThenable(c)&&(u=Promise.resolve(c).then(()=>Vt.call(this,n)))}catch(c){u=Promise.reject(c)}break}}if(!u)try{u=Vt.call(this,n)}catch(t){u=Promise.reject(t)}for(r=0,s=a.length;r<s;)u=u.then(a[r++],a[r++]);return u}getUri(o){o=Le(this.defaults,o);const h=Xn(o.baseURL,o.url,o.allowAbsoluteUrls,o);return Fn(h,o.params,o.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(o){Re.prototype[o]=function(h,l){return this.request(Le(l||{},{method:o,url:h,data:l&&z.hasOwnProp(l,"data")?l.data:void 0}))}}),z.forEach(["post","put","patch","query"],function(o){function h(l){return function(d,M,y){return this.request(Le(y||{},{method:o,headers:l?{"Content-Type":"multipart/form-data"}:{},url:d,data:M}))}}Re.prototype[o]=h(),o!=="query"&&(Re.prototype[o+"Form"]=h(!0))});let ys=class Ti{constructor(h){if(typeof h!="function")throw new TypeError("executor must be a function.");let l;this.promise=new Promise(function(M){l=M});const d=this;this.promise.then(M=>{if(!d._listeners)return;let y=d._listeners.length;for(;y-- >0;)d._listeners[y](M);d._listeners=null}),this.promise.then=M=>{let y;const p=new Promise(w=>{d.subscribe(w),y=w}).then(M);return p.cancel=function(){d.unsubscribe(y)},p},h(function(M,y,p){d.reason||(d.reason=new Ye(M,y,p),l(d.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(h){if(this.reason){h(this.reason);return}this._listeners?this._listeners.push(h):this._listeners=[h]}unsubscribe(h){if(!this._listeners)return;const l=this._listeners.indexOf(h);l!==-1&&this._listeners.splice(l,1)}toAbortSignal(){const h=new AbortController,l=d=>{h.abort(d)};return this.subscribe(l),h.signal.unsubscribe=()=>this.unsubscribe(l),h.signal}static source(){let h;return{token:new Ti(function(l){h=l}),cancel:h}}};function ws(o){return function(h){return o.apply(null,h)}}function bs(o){return z.isObject(o)&&o.isAxiosError===!0}const ft={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ft).forEach(([o,h])=>{ft[h]===void 0&&(ft[h]=o)});function ui(o){const h=new Re(o),l=vn(Re.prototype.request,h);return z.extend(l,Re.prototype,h,{allOwnKeys:!0}),z.extend(l,h,null,{allOwnKeys:!0}),l.create=function(d){return ui(Le(o,d))},l}const he=ui(Ke);he.Axios=Re,he.CanceledError=Ye,he.CancelToken=ys,he.isCancel=jn,he.VERSION=Bt,he.toFormData=lt,he.AxiosError=X,he.Cancel=he.CanceledError,he.all=function(o){return Promise.all(o)},he.spread=ws,he.isAxiosError=bs,he.mergeConfig=Le,he.AxiosHeaders=me,he.formToJSON=o=>Un(z.isHTMLForm(o)?new FormData(o):o),he.getAdapter=ci.getAdapter,he.HttpStatusCode=ft,he.default=he;const{Axios:ma,AxiosError:va,CanceledError:ya,isCancel:wa,CancelToken:ba,VERSION:Ca,all:$a,Cancel:Sa,isAxiosError:_a,spread:xa,toFormData:Aa,AxiosHeaders:ka,HttpStatusCode:Ea,formToJSON:Ma,getAdapter:Ta,mergeConfig:La,create:Ra}=he;function gt(o){return o?.name==="AuthRequiredError"}const Cs=new Set(["OpenC3::AuthError","OpenC3::ForbiddenError"]);function $s(o){return o?.response?.status===401||o?.status===401||Cs.has(o?.name)}function Ss(o){!gt(o)&&!$s(o)&&console.error(o)}class di extends Error{constructor(h="Authentication required"){super(h),this.name="AuthRequiredError"}}globalThis.__openc3AuthRejectionHandler||(globalThis.__openc3AuthRejectionHandler=!0,globalThis.addEventListener?.("unhandledrejection",o=>{gt(o.reason)&&o.preventDefault()}));let fi=!1;function gi(){fi||(fi=!0,OpenC3Auth.login())}async function jt(){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch(o){throw gt(o)?o:(gi(),new di(o?.message))}if(!localStorage.openc3Token)throw gi(),new di}const pi=200,Gt=he.create({baseURL:location.origin,timeout:6e4,params:{}});Gt.interceptors.response.use(o=>o,o=>{if(o.response){if(o.response.config.headers["Ignore-Errors"]&&o.response.config.headers["Ignore-Errors"].includes(o.response.status.toString()))return Promise.reject(o);if(o.response.status===401)return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(y){y&&OpenC3Auth.setTokens()}).catch(Ss),Promise.reject(o);const h=o.response?.data?.error?.data?.class;if(h==="HazardousError"||h==="CriticalCmdError")return Promise.reject(o);let l=`HTTP ${o.response.status} - `;o.response?.statusText&&(l+=`${o.response.statusText} `);const d=o.response?.config?.data;typeof d=="string"&&d.length>0&&(d.length>pi?l+=`${d.slice(0,pi)}... `:l+=`${d} `),o.response?.data?.message?l+=`${o.response.data.message}`:o.response?.data?.exception?l+=`${o.response.data.exception}`:o.response?.data?.error?.message?(o.response.data.error.class&&(l+=`${o.response.data.error.class} `),l+=`${o.response.data.error.message}`):l+=`${o.response?.data}`;const{$cosmosNotify:M}=window;throw M&&M.serious({title:"Network error",body:l}),o}else throw o});const pt=async function(o,h,{data:l,params:d={},headers:M,noAuth:y=!1,optionalAuth:p=!1,noScope:w=!1,onUploadProgress:a=!1,responseType:u}={}){if(!y)if(p){try{await jt()}catch(r){if(!gt(r))throw r}localStorage.openc3Token&&(M.Authorization=localStorage.openc3Token)}else await jt(),M.Authorization=localStorage.openc3Token;return M.manual=!0,!w&&!d.scope&&(d.scope=window.openc3Scope),Gt({method:o,url:h,data:l,params:d,headers:M,onUploadProgress:a,responseType:u})},Kt={Accept:"application/json"},mi={...Kt,"Content-Type":"application/json"},vi={get:function(o,{params:h,headers:l=Kt,noScope:d,noAuth:M,optionalAuth:y,onUploadProgress:p,responseType:w}={}){return pt("get",o,{params:h,headers:l,noScope:d,noAuth:M,optionalAuth:y,onUploadProgress:p,responseType:w})},put:function(o,{data:h,params:l,headers:d=mi,noScope:M,noAuth:y,onUploadProgress:p}={}){return pt("put",o,{data:h,params:l,headers:d,noScope:M,noAuth:y,onUploadProgress:p})},post:function(o,{data:h,params:l,headers:d=mi,noScope:M,noAuth:y,onUploadProgress:p,responseType:w}={}){return pt("post",o,{data:h,params:l,headers:d,noScope:M,noAuth:y,onUploadProgress:p,responseType:w})},delete:function(o,{params:h,headers:l=Kt,noScope:d,noAuth:M,onUploadProgress:y}={}){return pt("delete",o,{params:h,headers:l,noScope:d,noAuth:M,onUploadProgress:y})}};function mt(o){return _s.test(o)}const _s=/^-?[0-9]+$/;function yi(o){return xs.test(o)}const xs=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function wi(o,h){if(mt(o))return Number.isSafeInteger(Number.parseInt(o,10));const l=Number.parseFloat(o);if(Number.isInteger(l)&&!Number.isSafeInteger(l))return!1;const d=String(l);if(o===d)return!0;const M=bi(o),y=bi(d);return!!(M===y||h?.approx===!0&&y.length>=14&&M.startsWith(y.substring(0,14)))}let Qe=(function(o){return o.underflow="underflow",o.overflow="overflow",o.truncate_integer="truncate_integer",o.truncate_float="truncate_float",o})({});function As(o){if(wi(o,{approx:!1}))return;if(mt(o))return Qe.truncate_integer;const h=Number.parseFloat(o);return Number.isFinite(h)?h===0?Qe.underflow:Qe.truncate_float:Qe.overflow}function bi(o){const{start:h,end:l}=ks(o),d=o.substring(h,l),M=d.indexOf(".");return M===-1?d:d.substring(0,M)+d.substring(M+1)}function ks(o){let h=0;for(o[0]==="-"&&h++;o[h]==="0"||o[h]===".";)h++;let l=o.lastIndexOf("e");for(l===-1&&(l=o.lastIndexOf("E")),l===-1&&(l=o.length);(o[l-1]==="0"||o[l-1]===".")&&l>h;)l--;return{start:h,end:l}}const Ci=Symbol.for("lossless-json.LosslessNumber");class Es{value;isLosslessNumber=!0;get[Ci](){return!0}constructor(h){if(!yi(h))throw new Error(`Invalid number (value: "${h}")`);this.value=h}valueOf(){const h=As(this.value);if(h===void 0||h===Qe.truncate_float)return Number.parseFloat(this.value);if(mt(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${h} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function $i(o){return o!==null&&typeof o=="object"&&o[Ci]===!0}function Ms(o){return new Es(o)}function Ts(o,h){return Yt({"":o},"",o,h)}function Yt(o,h,l,d){return Array.isArray(l)?d.call(o,h,Rs(l,d)):l&&typeof l=="object"&&!$i(l)?d.call(o,h,Ls(l,d)):d.call(o,h,l)}function Ls(o,h){for(const l of Object.keys(o)){const d=Yt(o,l,o[l],h);d!==void 0?o[l]=d:delete o[l]}return o}function Rs(o,h){for(let l=0;l<o.length;l++){const d=Yt(o,String(l),o[l],h);d===void 0?delete o[l]:o[l]=d}return o}function Is(o,h,l){const d=typeof l=="function"?{parseNumber:l}:l,M=d?.parseNumber??Ms,y=d?.onDuplicateKey??T;let p=0;const w=r();return f(w),k(),h?Ts(w,h):w;function a(){if(o.charCodeAt(p)===Ws){p++,n();const R={};let O=!0;for(;p<o.length&&o.charCodeAt(p)!==xi;){O?O=!1:(i(),n());const D=p,N=t();if(N===void 0){b();return}n(),c();const P=r();if(P===void 0){E();return}if(Object.prototype.hasOwnProperty.call(R,N)&&!Qt(P,R[N])){const U=y({key:N,position:D+1,oldValue:R[N],newValue:P});U!==void 0&&Si(R,N,U)}else Si(R,N,P)}return o.charCodeAt(p)!==xi&&L(),p++,R}}function u(){if(o.charCodeAt(p)===zs){p++,n();const R=[];let O=!0;for(;p<o.length&&o.charCodeAt(p)!==Ai;){O?O=!1:i();const D=r();g(D),R.push(D)}return o.charCodeAt(p)!==Ai&&A(),p++,R}}function r(){n();const R=t()??e()??a()??u()??s("true",!0)??s("false",!1)??s("null",null);return n(),R}function s(R,O){if(o.slice(p,p+R.length)===R)return p+=R.length,O}function n(){for(;Os(o.charCodeAt(p));)p++}function t(){if(o.charCodeAt(p)===Zt){p++;let R="";for(;p<o.length&&o.charCodeAt(p)!==Zt;){if(o.charCodeAt(p)===Ps){const O=o[p+1],D=Fs[O];D!==void 0?(R+=D,p++):O==="u"?vt(o.charCodeAt(p+2))&&vt(o.charCodeAt(p+3))&&vt(o.charCodeAt(p+4))&&vt(o.charCodeAt(p+5))?(R+=String.fromCharCode(Number.parseInt(o.slice(p+2,p+6),16)),p+=5):x(p):I(p)}else Ns(o.charCodeAt(p))?R+=o[p]:S(o[p]);p++}return C(),p++,R}}function e(){const R=p;if(o.charCodeAt(p)===ki&&(p++,$(R)),o.charCodeAt(p)===Xt)p++;else if(Ds(o.charCodeAt(p)))for(p++;yt(o.charCodeAt(p));)p++;else return;if(o.charCodeAt(p)===Ys)for(p++,$(R);yt(o.charCodeAt(p));)p++;if(o.charCodeAt(p)===qs||o.charCodeAt(p)===Js)for(p++,(o.charCodeAt(p)===ki||o.charCodeAt(p)===js)&&p++,$(R);yt(o.charCodeAt(p));)p++;if(p>R)return M(o.slice(R,p))}function i(){if(o.charCodeAt(p)!==Ks)throw new SyntaxError(`Comma ',' expected after value ${_()}`);p++}function c(){if(o.charCodeAt(p)!==Qs)throw new SyntaxError(`Colon ':' expected after property name ${_()}`);p++}function f(R){if(R===void 0)throw new SyntaxError(`JSON value expected ${_()}`)}function g(R){if(R===void 0)throw new SyntaxError(`Array item expected ${_()}`)}function k(){if(p<o.length)throw new SyntaxError(`Expected end of input ${_()}`)}function $(R){if(!yt(o.charCodeAt(p))){const O=o.slice(R,p);throw new SyntaxError(`Invalid number '${O}', expecting a digit ${_()}`)}}function C(){if(o.charCodeAt(p)!==Zt)throw new SyntaxError(`End of string '"' expected ${_()}`)}function b(){throw new SyntaxError(`Quoted object key expected ${_()}`)}function T({key:R,position:O}){throw new SyntaxError(`Duplicate key '${R}' encountered at position ${O}`)}function L(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${_()}`)}function A(){throw new SyntaxError(`Array item or end of array ']' expected ${_()}`)}function S(R){throw new SyntaxError(`Invalid character '${R}' ${v()}`)}function I(R){const O=o.slice(R,R+2);throw new SyntaxError(`Invalid escape character '${O}' ${v()}`)}function E(){throw new SyntaxError(`Object value expected after ':' ${v()}`)}function x(R){const O=o.slice(R,R+6);throw new SyntaxError(`Invalid unicode character '${O}' ${v()}`)}function v(){return`at position ${p}`}function m(){return p<o.length?`but got '${o[p]}'`:"but reached end of input"}function _(){return`${m()} ${v()}`}}function Si(o,h,l){h==="__proto__"?Object.defineProperty(o,h,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[h]=l}function Os(o){return o===Bs||o===Hs||o===Us||o===Vs}function vt(o){return o>=Xt&&o<=Jt||o>=Zs&&o<=ea||o>=Xs&&o<=ta}function yt(o){return o>=Xt&&o<=Jt}function Ds(o){return o>=Gs&&o<=Jt}function Ns(o){return o>=32&&o<=1114111}function Qt(o,h){return o===h?!0:Array.isArray(o)&&Array.isArray(h)?o.length===h.length&&o.every((l,d)=>Qt(l,h[d])):_i(o)&&_i(h)?[...new Set([...Object.keys(o),...Object.keys(h)])].every(l=>Qt(o[l],h[l])):!1}function _i(o){return typeof o=="object"&&o!==null}const Fs={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
1121
|
+
`,r:"\r",t:" "},Ps=92,Ws=123,xi=125,zs=91,Ai=93,Bs=32,Hs=10,Us=9,Vs=13,Zt=34,js=43,ki=45,Xt=48,Gs=49,Jt=57,Ks=44,Ys=46,Qs=58,Zs=65,Xs=97,Js=69,qs=101,ea=70,ta=102;function na(o,h,l,d){return M(o);function M(a,u){if(Array.isArray(d)){const r=d.find(s=>s.test(a));if(r){const s=r.stringify(a);if(typeof s!="string"||!yi(s))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${s})`);return s}}if(typeof a=="boolean"||typeof a=="number"||typeof a=="string"||a===null||a instanceof Date||a instanceof Boolean||a instanceof Number||a instanceof String)return JSON.stringify(a);if($i(a)||typeof a=="bigint")return a.toString();if(Array.isArray(a))return y(a);if(a&&typeof a=="object")return p(a)}function y(a,u){if(a.length===0)return"[]";let r="[";for(let s=0;s<a.length;s++){const n=a[s];if(typeof n<"u"&&typeof n!="function"){const t=M(n);r+=t===void 0?"null":t}else r+="null";s<a.length-1&&(r+=",")}return r+="]",r}function p(a,u){if(typeof a.toJSON=="function")return M(a.toJSON());const r=Array.isArray(h)?[...new Set(h.map(String))]:Object.keys(a);if(r.length===0)return"{}";let s=!0,n="{";for(const t of r){const e=a[t];if(w(t,e)){const i=M(e);if(i===void 0)continue;s?s=!1:n+=",";const c=JSON.stringify(t);n+=`${c}:`,n+=i}}return n+="}",n}function w(a,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function ia(o){return mt(o)&&!wi(o)?BigInt(o):Number.parseFloat(o)}class ra{id=1;constructor(){}async exec(h,l,d={},M={},y=6e4){await jt(),this.id=this.id+1;try{return d.scope=window.openc3Scope,M.manual=!0,(await Gt.post("/openc3-api/api",{jsonrpc:"2.0",method:h,params:l,id:this.id,keyword_params:d},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...M},timeout:y,transformRequest:[(p,w)=>na(p)],transformResponse:[p=>{try{return Is(p,void 0,ia)}catch{const w=typeof p=="string"?p.substring(0,200):String(p),a=new Error(`Server returned non-JSON response: ${w}`);throw a.name="ServerError",a}}]})).data.result}catch(p){let w=new Error;throw p.response?(w.name=p.response.data.error.data.class,w.message=p.response.data.error.data.message,w.object=p.response.data.error):p.request?(w.name="Request error",w.message="Request error, no response received"):w=p,w}}decode_openc3_type(h){if(h!==null&&typeof h=="object"&&h.json_class=="Float"&&h.raw){if(h.raw=="NaN")return NaN;if(h.raw=="Infinity")return 1/0;if(h.raw=="-Infinity")return-1/0}return null}encode_openc3_type(h){return Number.isNaN(h)?{json_class:"Float",raw:"NaN"}:h==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:h==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(h=>{h&&(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(h){return this.exec("set_offline_access",[h])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(h,l,d,M,y){return this.exec("map_target_to_interface",[h,l],{cmd_only:d,tlm_only:M,unmap_old:y})}unmap_target_from_interface(h,l,d,M){return this.exec("unmap_target_from_interface",[h,l],{cmd_only:d,tlm_only:M})}connect_interface(h,...l){return l.length>0?this.exec("connect_interface",[h,...l]):this.exec("connect_interface",[h])}disconnect_interface(h){return this.exec("disconnect_interface",[h])}interface_cmd(h,l,...d){return this.exec("interface_cmd",[h,l,...d])}interface_target_enable(h,l,d=!1,M=!1){return this.exec("interface_target_enable",[h,l],{cmd_only:d,tlm_only:M})}interface_target_disable(h,l,d=!1,M=!1){return this.exec("interface_target_disable",[h,l],{cmd_only:d,tlm_only:M})}interface_details(h){return this.exec("interface_details",[h])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(h,l,d,M,y){return this.exec("map_target_to_router",[h,l],{cmd_only:d,tlm_only:M,unmap_old:y})}unmap_target_from_router(h,l,d,M){return this.exec("unmap_target_from_router",[h,l],{cmd_only:d,tlm_only:M})}connect_router(h){return this.exec("connect_router",[h])}disconnect_router(h){return this.exec("disconnect_router",[h])}router_target_enable(h,l,d=!1,M=!1){return this.exec("router_target_enable",[h,l],{cmd_only:d,tlm_only:M})}router_target_disable(h,l,d=!1,M=!1){return this.exec("router_target_disable",[h,l],{cmd_only:d,tlm_only:M})}router_details(h){return this.exec("router_details",[h])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(h){return this.exec("get_tlm_cnts",[h])}get_item(h,l,d){return this.exec("get_item",[h,l,d])}get_param(h,l,d){return this.exec("get_param",[h,l,d])}get_parameter(h,l,d){return this.get_param(h,l,d)}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(h){return this.exec("set_limits_set",[h])}delete_limits_set(h){return this.exec("delete_limits_set",[h])}get_target(h){return this.exec("get_target",[h])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.get_target_names()}get_tlm(h,l){return this.exec("get_tlm",[h,l])}get_telemetry(h,l){return this.get_tlm(h,l)}get_all_tlm(h){return this.exec("get_all_tlm",[h])}get_all_telemetry(h){return this.get_all_tlm(h)}get_all_tlm_names(h,l=!1){return this.exec("get_all_tlm_names",[h],{hidden:l})}get_all_telemetry_names(h){return this.get_all_tlm_names(h)}get_all_tlm_item_names(h){return this.exec("get_all_tlm_item_names",[h])}async get_tlm_packet(h,l,d,M=30){const y=await this.exec("get_tlm_packet",[h,l],{type:d,stale_time:M});if(y!=null){let p=y.length,w=null;for(let a=0;a<p;a++)w=this.decode_openc3_type(y[a][1]),w!==null&&(y[a][1]=w)}return y}get_packet_derived_items(h,l){return this.exec("get_packet_derived_items",[h,l])}get_tlm_buffer(h,l){return this.exec("get_tlm_buffer",[h,l])}get_tlm_available(h,l={},d={}){return this.exec("get_tlm_available",[h],l,d)}async get_tlm_values(h,l=30,d=null,M=null,y=null,p={}){let w={stale_time:l};d!==null&&(w.cache_timeout=d),M!==null&&(w.start_time=M.toISOString()),y!==null&&(w.end_time=y.toISOString());const a=await this.exec("get_tlm_values",[h],w,p,1e4);if(a&&a.length>0){let u=a.length,r=null;for(let s=0;s<u;s++)r=this.decode_openc3_type(a[s][0]),r!==null&&(a[s][0]=r)}return a}get_limits(h,l,d){return this.exec("get_limits",[h,l,d])}async tlm(h,l,d,M="CONVERTED"){let y=null;if(l===void 0)y=await this.exec("tlm",[h]);else if(d===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(l))y=await this.exec("tlm",[h],{type:l});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${l}. Valid options are RAW, CONVERTED or FORMATTED.`,w}else y=await this.exec("tlm",[h,l,d],{type:M});let p=this.decode_openc3_type(y);return p!==null&&(y=p),y}async inject_tlm(h,l,d=null,M="CONVERTED",y=!1){await this.exec("inject_tlm",[h,l,d],{type:M,stored:y})}set_tlm(h,l,d,M){return this.exec("set_tlm",[h,l,d],{type:M})}override_tlm(h,l,d,M){return this.exec("override_tlm",[h,l,d],{type:M})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(h,l,d,M){return this.exec("normalize_tlm",[h,l,d],{type:M})}get_all_cmds(h){return this.exec("get_all_cmds",[h])}get_all_commands(h){return this.get_all_cmds(h)}get_all_cmd_names(h,l=!1){return this.exec("get_all_cmd_names",[h],{hidden:l})}get_all_command_names(h){return this.get_all_cmd_names(h)}get_cmd(h,l){return this.exec("get_cmd",[h,l])}get_command(h,l){return this.get_cmd(h,l)}get_cmd_cnts(h){return this.exec("get_cmd_cnts",[h])}get_cmd_value(h,l,d,M="CONVERTED"){return this.exec("get_cmd_value",[h,l,d,M])}get_cmd_buffer(h,l){return this.exec("get_cmd_buffer",[h,l])}_cmd(h,l,d,M,y,p={}){let w=null;for(let a in M)Object.prototype.hasOwnProperty.call(M,a)&&(w=this.encode_openc3_type(M[a]),w!==null&&(M[a]=w));return this.exec(h,[l,d,M],p,y)}get_cmd_hazardous(h,l,d,M={}){return l===void 0?this.exec("get_cmd_hazardous",h,{},M):this._cmd("get_cmd_hazardous",h,l,d,M)}cmd(h,l,d,M={},y={}){return l===void 0?this.exec("cmd",h,y,M):this._cmd("cmd",h,l,d,M,y)}cmd_no_range_check(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_no_range_check",h,y,M):this._cmd("cmd_no_range_check",h,l,d,M,y)}cmd_raw(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_raw",h,y,M):this._cmd("cmd_raw",h,l,d,M,y)}cmd_raw_no_range_check(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_raw_no_range_check",h,y,M):this._cmd("cmd_raw_no_range_check",h,l,d,M,y)}cmd_no_hazardous_check(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_no_hazardous_check",h,y,M):this._cmd("cmd_no_hazardous_check",h,l,d,M,y)}cmd_no_checks(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_no_checks",h,y,M):this._cmd("cmd_no_checks",h,l,d,M,y)}cmd_raw_no_hazardous_check(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_raw_no_hazardous_check",h,y,M):this._cmd("cmd_raw_no_hazardous_check",h,l,d,M,y)}cmd_raw_no_checks(h,l,d,M={},y={}){return l===void 0?this.exec("cmd_raw_no_checks",h,y,M):this._cmd("cmd_raw_no_checks",h,l,d,M,y)}build_cmd(h,l,d,M={},y={}){return l===void 0?this.exec("build_cmd",h,y,M):this._cmd("build_cmd",h,l,d,M,y)}build_command(h,l,d,M={},y={}){return this.build_cmd(h,l,d,M,y)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(h,l){return this.exec("send_raw",[h,l])}list_configs(h){return this.exec("list_configs",[h])}load_config(h,l){return this.exec("load_config",[h,l])}save_config(h,l,d){return this.exec("save_config",[h,l,d])}delete_config(h,l){return this.exec("delete_config",[h,l])}enable_limits(h,l,d){return this.exec("enable_limits",[h,l,d])}disable_limits(h,l,d){return this.exec("disable_limits",[h,l,d])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(h){return this.exec("get_overall_limits_state",[h])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(h,l){return this.exec("get_setting",[h],l)}get_settings(h,l){return this.exec("get_settings",h,l)}set_setting(h,l){return this.exec("set_setting",[h,l])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(h,l){return this.set_setting(h,l)}get_metrics(h=!1){return this.exec("get_metrics",[],{detailed:h})}open_tab(h){window.open(h,"_blank")}async hashString(h){if(window.isSecureContext){const l=new TextEncoder().encode(h),d=await crypto.subtle.digest("SHA-256",l),M=new Uint8Array(d);return Array.from(M).map(y=>y.toString(16).padStart(2,"0")).join("")}}}const oa={components:{CriticalCmdDialog:cn,CommandEditor:or,TopBar:Ni,Openc3Screen:Xi},mixins:[_t],data(){return{title:"Command Sender",editor:null,targetName:"",commandName:"",commandDescription:"",hazardousDescription:"",paramList:"",queueName:null,validateParameter:null,lastTargetName:"",lastCommandName:"",lastParamList:"",lastQueueName:null,ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,disableCommandValidation:!1,interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",commandIsHazardous:!1,hazardousDialogDescription:"",hazardousDialogHazardousDescription:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{hazardousModes(){const o=[];return this.ignoreRangeChecks&&o.push("range checks are ignored"),this.cmdRaw&&o.push("parameter conversions are disabled"),o.join(" and ")},hazardousMessage(){const o=`Command ${this.hazardousCommand}`;return this.hazardousModes?this.commandIsHazardous?`${o} is Hazardous and ${this.hazardousModes}`:`${o} is considered Hazardous because ${this.hazardousModes}`:`${o} is Hazardous`},readOnlyUser:function(){const o=OpenC3Auth.userroles()||[];return o.length>0&&o.every(h=>h==="viewer")},menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.$refs.commandEditor.triggerUpdateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw}},{label:"Disable Command Validation",checkbox:!0,checked:this.disableCommandValidation,command:()=>{this.disableCommandValidation=!this.disableCommandValidation}}]}]}},created(){this.api=new ra,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),vi.get("/openc3-api/autocomplete/keywords/screen").then(o=>{this.keywords=o.data})},mounted(){this.editor=ar.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode("ace/mode/ruby"),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.setHighlightActiveLine(!1),this.editor.setValue(localStorage.command_sender__history),this.history=this.editor.getValue().trim(),this.editor.clearSelection(),this.editor.focus(),this.editor.setAutoScrollEditorIntoView(!0),this.editor.setOption("maxLines",30),this.editor.setOption("minLines",1),this.editor.container.addEventListener("keydown",o=>{if(o.key==="Enter"){if(o.preventDefault(),this.sendDisabled)return;let h=this.editor.session.getLine(this.editor.getCursorPosition().row);if(h==="")return;this.queueName=null;const l=h.match(/,\s*queue(?::|\s*=)\s*(?:"([^"]+)"|([f|F]alse))/);l&&(l[1]?this.queueName=l[1]:this.queueName=!1,h=h.replace(/,\s*queue(?::|\s*=)\s*(?:"([^"]+)"|([f|F]alse))/,"")),this.validateParameter=null;const d=h.match(/,\s*validate(?::|\s*=)\s*(false|true)/i);d&&(this.validateParameter=d[1],h=h.replace(/,\s*validate(?::|\s*=)\s*(false|true)/i,""));let M=h.indexOf('"'),y=h.lastIndexOf('"');h=h.substr(M+1,y-M-1),this.sendCmd(h)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{commandChanged(o){(this.targetName!==o.targetName||this.commandName!==o.packetName)&&(this.targetName=o.targetName,this.commandName=o.packetName,this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(h=>{}):this.$router.replace({name:"CommandSender"}).catch(h=>{})),o.queueName!==void 0&&(this.queueName=o.queueName)},onCommandLoaded(o){if(o)if(this.commandDescription=o.description,this.hazardousDescription=o.hazardous_description||"",o.screen)this.loadScreen(o.screen[0],o.screen[1]).then(h=>{this.screenTarget=o.screen[0],this.screenName=o.screen[1],this.screenDefinition=h.data,this.screenCount+=1});else{if(o.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let h=`SCREEN AUTO AUTO 1.0
|
|
1122
|
+
`;for(const l of o.related_items)h+=`LABELVALUE '${l[0]}' '${l[1]}' '${l[2]}' FORMATTED 20
|
|
1123
|
+
`;this.screenDefinition=h}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}else this.commandDescription="",this.hazardousDescription="",this.screenTarget=null,this.screenName=null,this.screenDefinition=null,this.screenCount+=1},createParamList(){let o={};for(const h of this.$refs.commandEditor.getRows())h.val!==null&&(o[h.parameter_name]=this.convertToValue(h));return o},buildCmd(){let o;try{o=this.createParamList()}catch(h){this.status=h.message,this.displayErrorDialog=!0;return}this.sendCmd(this.targetName,this.commandName,o)},sendCmd(o,h,l){if(this.readOnlyUser){this.status="Viewers cannot send commands";return}const d={targetName:o,commandName:h,paramList:l,queueName:this.queueName};this.lastTargetName=o,this.lastCommandName=h,this.lastParamList=l,this.lastQueueName=this.queueName,this.sendDisabled=!0,this.api.get_cmd_hazardous(o,h,l).then(M=>{M||this.hazardousModes?(this.commandIsHazardous=M,h===void 0?(this.hazardousCommand=o.split(" ").slice(0,2).join(" "),this.api.get_cmd(...this.hazardousCommand.split(" ")).then(y=>{this.showHazardousDialog(y)},()=>{this.showHazardousDialog(null)})):(this.hazardousCommand=`${o} ${h}`,this.showHazardousDialog({description:this.commandDescription,hazardous_description:this.hazardousDescription}))):this.executeCmd(d,!1)},M=>{this.processCmdError(o,h,M)})},showHazardousDialog(o){this.hazardousDialogDescription=o?.description||"",this.hazardousDialogHazardousDescription=o?.hazardous_description||"",this.displaySendHazardous=!0},sendHazardousCmd(){this.displaySendHazardous=!1,this.executeCmd({targetName:this.lastTargetName,commandName:this.lastCommandName,paramList:this.lastParamList,queueName:this.lastQueueName},!0)},executeCmd(o,h){const{targetName:l,commandName:d,paramList:M,queueName:y}=o;let p={};this.validateParameter!==null?p.validate=this.validateParameter.toLowerCase()==="true":this.disableCommandValidation&&(p.validate=!1),y!==null&&(p.queue=y);const w=this.cmdRaw?"_raw":"",a=this.ignoreRangeChecks?`cmd${w}_no_range_check`:`cmd${w}`;let u;this.ignoreRangeChecks?u=h?`cmd${w}_no_checks`:`cmd${w}_no_range_check`:u=h?`cmd${w}_no_hazardous_check`:`cmd${w}`;const r={"Ignore-Errors":this.ignoreRangeChecks?"428":"428 500"};this.api[u](l,d,M,r,p).then(s=>{this.processCmdSuccess(a,s)},s=>{this.processCmdError(l,d,s)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdSuccess(o,h){let l=`${o}("${h.target_name} ${h.cmd_name}`,d=Object.keys(h.cmd_params);if(d.length>0){l+=" with ";for(let y=0;y<d.length;y++){let p=d[y],w="";h.obfuscated_items.includes(p)?w="*****":w=this.convertToString(h.cmd_params[p]),typeof h.cmd_params[p]=="string"&&w.charAt(0)!=="'"&&w.charAt(0)!=='"'&&(w=`'${w}'`),l+=p+" "+w,y<d.length-1&&(l+=", ")}}const M=[];if(this.lastQueueName!==null){const y=this.lastQueueName===!1?!1:`"${this.lastQueueName}"`;M.push(this.formatKeyword("queue",y))}if(this.validateParameter!==null?M.push(this.formatKeyword("validate",this.validateParameter)):this.disableCommandValidation&&M.push(this.formatKeyword("validate",!1)),M.length>0?l+='", '+M.join(", ")+")":l+='")',!this.history.includes(l)){let y=l;this.history.length!==0&&(y+=`
|
|
1124
|
+
${this.history}`),this.editor.setValue(y),this.editor.moveCursorTo(0,0)}if(l+=" sent.",this.status.includes(l)){let y=this.status.split("sent.");if(y[1].includes("(")){let p=Number.parseInt(y[1].substr(2,y[1].indexOf(")")-2));l=y[0]+"sent. ("+(p+1)+")"}else l+=" (2)"}this.status=l,this.processCmdResponse()},processCmdError(o,h,l){h===void 0&&([o,h]=o.split(" ").slice(0,2));const d="sending "+o+" "+h;this.displayError(d,l,!0),this.processCmdResponse()},processCmdResponse(){this.history=this.editor.getValue(),localStorage.command_sender__history=this.editor.getValue(),this.sendDisabled=!1},formatKeyword(o,h){const l=St.getDefaultScriptingLanguage()==="python";return h===!1?l?`${o}=False`:`${o}: false`:l?`${o}=${h}`:`${o}: ${h}`},clearHistory(){this.editor.setValue(""),this.history="",localStorage.removeItem("command_sender__history")},displayError(o,h,l=!1){this.status=`Error ${o} due to ${h.name}`,h.message&&h.message!==""&&(this.status+=": ",this.status+=h.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),l&&(h.message.includes("CriticalCmdError")?(this.criticalCmdUuid=h.object.data.instance_variables["@uuid"],this.criticalCmdString=h.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=h.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(o,h){return vi.get("/openc3-api/screen/"+o+"/"+h,{headers:{Accept:"text/plain"}})},cancelRawCmd(){this.displaySendRaw=!1,this.status="Raw command not sent"}}},sa={ref:"editor",class:"editor","data-test":"sender-history"},aa={style:{position:"relative"}},la={class:"mx-1"},ca=["textContent"],ha={key:0,class:"mt-1"},ua={key:1,class:"openc3-yellow font-weight-bold mt-2","data-test":"hazardous-description"},da={class:"mx-1"};function fa(o,h,l,d,M,y){const p=Z("top-bar"),w=Z("command-editor"),a=Z("v-card"),u=Z("v-col"),r=Z("v-btn"),s=Z("v-tooltip"),n=Z("v-row"),t=Z("v-card-subtitle"),e=Z("openc3-screen"),i=Z("critical-cmd-dialog"),c=Z("v-spacer"),f=Z("v-toolbar"),g=Z("v-card-text"),k=Z("v-dialog"),$=Z("v-icon"),C=Z("v-card-actions"),b=Z("v-select");return J(),fe("div",null,[j(p,{menus:y.menus,title:M.title},null,8,["menus","title"]),j(w,{ref:"commandEditor","initial-target-name":o.$route.params.target,"initial-packet-name":o.$route.params.packet,"send-disabled":M.sendDisabled,"read-only":y.readOnlyUser,"states-in-hex":M.statesInHex,"show-ignored-params":M.showIgnoredParams,"cmd-raw":M.cmdRaw,"ignore-range-checks":M.ignoreRangeChecks,onCommandChanged:h[0]||(h[0]=T=>y.commandChanged(T)),onCommandLoaded:h[1]||(h[1]=T=>y.onCommandLoaded(T)),onBuildCmd:h[2]||(h[2]=T=>y.buildCmd(T))},null,8,["initial-target-name","initial-packet-name","send-disabled","read-only","states-in-hex","show-ignored-params","cmd-raw","ignore-range-checks"]),j(a,{class:"pa-3"},{default:K(()=>[le("Status: "+ce(M.status),1)]),_:1}),h[23]||(h[23]=oe("div",{style:{height:"15px"}},null,-1)),j(n,{"no-gutters":""},{default:K(()=>[j(u,{class:"pr-4"},{default:K(()=>[j(a,{class:"pb-2"},{default:K(()=>[j(t,null,{default:K(()=>[j(n,null,{default:K(()=>[j(u,{class:"pt-6"},{default:K(()=>[...h[10]||(h[10]=[le(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])]),_:1}),j(u,null,{default:K(()=>[j(s,{"open-delay":600,location:"top"},{activator:K(({props:T})=>[oe("div",Ie(T,{class:"float-right"}),[j(r,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:y.clearHistory},null,8,["onClick"])],16)]),default:K(()=>[h[11]||(h[11]=oe("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),j(n,{"no-gutters":"",class:"mt-2 mb-2"},{default:K(()=>[j(u,null,{default:K(()=>[oe("pre",sa,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),M.screenDefinition?(J(),re(u,{key:0,md:"auto"},{default:K(()=>[oe("div",aa,[j(e,{target:M.screenTarget,screen:M.screenName,definition:M.screenDefinition,keywords:M.keywords,count:M.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])])]),_:1})):pe("",!0)]),_:1}),h[24]||(h[24]=oe("div",{style:{height:"15px"}},null,-1)),j(i,{modelValue:M.displayCriticalCmd,"onUpdate:modelValue":h[3]||(h[3]=T=>M.displayCriticalCmd=T),uuid:M.criticalCmdUuid,"cmd-string":M.criticalCmdString,"cmd-user":M.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),j(k,{modelValue:M.displayErrorDialog,"onUpdate:modelValue":h[5]||(h[5]=T=>M.displayErrorDialog=T),"max-width":"600"},{default:K(()=>[j(a,null,{default:K(()=>[j(f,{height:"24"},{default:K(()=>[j(c),h[12]||(h[12]=oe("span",null," Error ",-1)),j(c)]),_:1}),j(g,null,{default:K(()=>[oe("div",la,[j(n,{class:"my-2"},{default:K(()=>[j(g,null,{default:K(()=>[oe("span",{textContent:ce(M.status)},null,8,ca)]),_:1})]),_:1}),j(n,null,{default:K(()=>[j(c),j(r,{color:"primary","data-test":"error-dialog-ok",onClick:h[4]||(h[4]=T=>M.displayErrorDialog=!1)},{default:K(()=>[...h[13]||(h[13]=[le(" Ok ",-1)])]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),j(k,{modelValue:M.displaySendHazardous,"onUpdate:modelValue":h[6]||(h[6]=T=>M.displaySendHazardous=T),"max-width":"600",persistent:"",onKeydown:nt(y.cancelHazardousCmd,["esc"])},{default:K(()=>[j(a,null,{default:K(()=>[j(f,{height:"24"},{default:K(()=>[j(c),h[14]||(h[14]=oe("span",null," Hazardous Warning ",-1)),j(c)]),_:1}),j(g,{class:"mt-6"},{default:K(()=>[le(" Warning: "+ce(y.hazardousMessage)+". Send? ",1),M.hazardousDialogDescription?(J(),fe("div",ha," Description: "+ce(M.hazardousDialogDescription),1)):pe("",!0),M.hazardousDialogHazardousDescription?(J(),fe("div",ua,[j($,{class:"mr-1"},{default:K(()=>[...h[15]||(h[15]=[le("mdi-alert",-1)])]),_:1}),le(" Hazardous: "+ce(M.hazardousDialogHazardousDescription),1)])):pe("",!0)]),_:1}),j(C,{class:"px-2"},{default:K(()=>[j(c),j(r,{variant:"outlined",onClick:y.cancelHazardousCmd},{default:K(()=>[...h[16]||(h[16]=[le(" Cancel ",-1)])]),_:1},8,["onClick"]),j(r,{variant:"flat",onClick:y.sendHazardousCmd},{default:K(()=>[...h[17]||(h[17]=[le(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),j(k,{modelValue:M.displaySendRaw,"onUpdate:modelValue":h[9]||(h[9]=T=>M.displaySendRaw=T),"max-width":"600",persistent:"",onKeydown:nt(y.cancelRawCmd,["esc"])},{default:K(()=>[j(a,null,{default:K(()=>[j(f,{height:"24"},{default:K(()=>[j(c),h[18]||(h[18]=oe("span",null," Send Raw ",-1)),j(c)]),_:1}),j(g,null,{default:K(()=>[oe("div",da,[j(n,{class:"my-2"},{default:K(()=>[j(u,null,{default:K(()=>[...h[19]||(h[19]=[le("Interface:",-1)])]),_:1}),j(u,null,{default:K(()=>[j(b,{modelValue:M.selectedInterface,"onUpdate:modelValue":h[7]||(h[7]=T=>M.selectedInterface=T),variant:"solo","hide-details":"",density:"compact",items:M.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),j(n,{"no-gutters":""},{default:K(()=>[j(u,null,{default:K(()=>[...h[20]||(h[20]=[le("Filename:",-1)])]),_:1}),j(u,null,{default:K(()=>[oe("input",{type:"file",onChange:h[8]||(h[8]=T=>o.selectRawCmdFile(T))},null,32)]),_:1})]),_:1}),j(n,null,{default:K(()=>[j(c),j(r,{variant:"outlined","data-test":"raw-cancel",onClick:y.cancelRawCmd},{default:K(()=>[...h[21]||(h[21]=[le(" Cancel ",-1)])]),_:1},8,["onClick"]),j(r,{class:"bg-primary","data-test":"raw-ok",onClick:o.sendRawCmd},{default:K(()=>[...h[22]||(h[22]=[le(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])])}const Ia=Li("default",tn(oa,[["render",fa],["__scopeId","data-v-a17c9da1"]]))})}}));
|